| POST | /payments/credit |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CreateApplyCredit
{
public String ClassName = null;
public String UniqueId = null;
public Date CreatedDateTime = null;
public Integer ClientId = null;
public String GroupId = null;
public String UserId = null;
public Integer BhUserId = null;
public Integer CreditId = null;
public String CurrencyType = null;
public String CreditType = null;
public String Notes = null;
public ArrayList<SalesForceCreditInvoiceDetails> InvoiceDetails = null;
public String getClassName() { return ClassName; }
public CreateApplyCredit setClassName(String value) { this.ClassName = value; return this; }
public String getUniqueId() { return UniqueId; }
public CreateApplyCredit setUniqueId(String value) { this.UniqueId = value; return this; }
public Date getCreatedDateTime() { return CreatedDateTime; }
public CreateApplyCredit setCreatedDateTime(Date value) { this.CreatedDateTime = value; return this; }
public Integer getClientId() { return ClientId; }
public CreateApplyCredit setClientId(Integer value) { this.ClientId = value; return this; }
public String getGroupId() { return GroupId; }
public CreateApplyCredit setGroupId(String value) { this.GroupId = value; return this; }
public String getUserId() { return UserId; }
public CreateApplyCredit setUserId(String value) { this.UserId = value; return this; }
public Integer getBhUserId() { return BhUserId; }
public CreateApplyCredit setBhUserId(Integer value) { this.BhUserId = value; return this; }
public Integer getCreditId() { return CreditId; }
public CreateApplyCredit setCreditId(Integer value) { this.CreditId = value; return this; }
public String getCurrencyType() { return CurrencyType; }
public CreateApplyCredit setCurrencyType(String value) { this.CurrencyType = value; return this; }
public String getCreditType() { return CreditType; }
public CreateApplyCredit setCreditType(String value) { this.CreditType = value; return this; }
public String getNotes() { return Notes; }
public CreateApplyCredit setNotes(String value) { this.Notes = value; return this; }
public ArrayList<SalesForceCreditInvoiceDetails> getInvoiceDetails() { return InvoiceDetails; }
public CreateApplyCredit setInvoiceDetails(ArrayList<SalesForceCreditInvoiceDetails> value) { this.InvoiceDetails = value; return this; }
}
public static class SalesForceCreditInvoiceDetails
{
public Long Invoice = null;
public BigDecimal AmountPaid = null;
public String Region = null;
public String CostCenter = null;
public Long getInvoice() { return Invoice; }
public SalesForceCreditInvoiceDetails setInvoice(Long value) { this.Invoice = value; return this; }
public BigDecimal getAmountPaid() { return AmountPaid; }
public SalesForceCreditInvoiceDetails setAmountPaid(BigDecimal value) { this.AmountPaid = value; return this; }
public String getRegion() { return Region; }
public SalesForceCreditInvoiceDetails setRegion(String value) { this.Region = value; return this; }
public String getCostCenter() { return CostCenter; }
public SalesForceCreditInvoiceDetails setCostCenter(String value) { this.CostCenter = value; return this; }
}
public static class CreateApplyCreditReply
{
public Integer ErrorCode = null;
public String ErrorMessage = null;
public Integer getErrorCode() { return ErrorCode; }
public CreateApplyCreditReply setErrorCode(Integer value) { this.ErrorCode = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public CreateApplyCreditReply setErrorMessage(String value) { this.ErrorMessage = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /payments/credit HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateApplyCredit xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
<BhUserId>0</BhUserId>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<CreditId>0</CreditId>
<CreditType>String</CreditType>
<CurrencyType>String</CurrencyType>
<GroupId>String</GroupId>
<InvoiceDetails>
<SalesForceCreditInvoiceDetails>
<AmountPaid>0</AmountPaid>
<CostCenter>String</CostCenter>
<Invoice>0</Invoice>
<Region>String</Region>
</SalesForceCreditInvoiceDetails>
</InvoiceDetails>
<Notes>String</Notes>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
</CreateApplyCredit>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreateApplyCreditReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce"> <ErrorCode>0</ErrorCode> <ErrorMessage>String</ErrorMessage> </CreateApplyCreditReply>