| PUT | /invoices/recurringInvoices/obligation |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class UserObligation
{
public String UserId = null;
public Integer FiscalYear = null;
public String GroupId = null;
public ArrayList<ObligationLineItem> LineItems = null;
public Boolean OptedToPayCTADues = null;
public String getUserId() { return UserId; }
public UserObligation setUserId(String value) { this.UserId = value; return this; }
public Integer getFiscalYear() { return FiscalYear; }
public UserObligation setFiscalYear(Integer value) { this.FiscalYear = value; return this; }
public String getGroupId() { return GroupId; }
public UserObligation setGroupId(String value) { this.GroupId = value; return this; }
public ArrayList<ObligationLineItem> getLineItems() { return LineItems; }
public UserObligation setLineItems(ArrayList<ObligationLineItem> value) { this.LineItems = value; return this; }
public Boolean isOptedToPayCTADues() { return OptedToPayCTADues; }
public UserObligation setOptedToPayCTADues(Boolean value) { this.OptedToPayCTADues = value; return this; }
}
public static class ObligationLineItem
{
public Integer ChartOfAccountId = null;
public String ChartOfAccountRefId = null;
public BigDecimal Amount = null;
public Integer getChartOfAccountId() { return ChartOfAccountId; }
public ObligationLineItem setChartOfAccountId(Integer value) { this.ChartOfAccountId = value; return this; }
public String getChartOfAccountRefId() { return ChartOfAccountRefId; }
public ObligationLineItem setChartOfAccountRefId(String value) { this.ChartOfAccountRefId = value; return this; }
public BigDecimal getAmount() { return Amount; }
public ObligationLineItem setAmount(BigDecimal value) { this.Amount = value; return this; }
}
public static class ObligationResponse implements IHaveErrorField
{
public ArrayList<ErrorDetail> ErrorDetails = null;
public Boolean IsError = null;
public Integer MemberCount = null;
public BigDecimal TotalAmount = null;
public ArrayList<ErrorDetail> getErrorDetails() { return ErrorDetails; }
public ObligationResponse setErrorDetails(ArrayList<ErrorDetail> value) { this.ErrorDetails = value; return this; }
public Boolean getIsError() { return IsError; }
public ObligationResponse setIsError(Boolean value) { this.IsError = value; return this; }
public Integer getMemberCount() { return MemberCount; }
public ObligationResponse setMemberCount(Integer value) { this.MemberCount = value; return this; }
public BigDecimal getTotalAmount() { return TotalAmount; }
public ObligationResponse setTotalAmount(BigDecimal value) { this.TotalAmount = value; return this; }
}
public static class ErrorDetail
{
public Integer Id = null;
public String Message = null;
public String Value = null;
public Integer getId() { return Id; }
public ErrorDetail setId(Integer value) { this.Id = value; return this; }
public String getMessage() { return Message; }
public ErrorDetail setMessage(String value) { this.Message = value; return this; }
public String getValue() { return Value; }
public ErrorDetail setValue(String value) { this.Value = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /invoices/recurringInvoices/obligation HTTP/1.1
Host: devapi.billhighway.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
UserId: String,
FiscalYear: 0,
GroupId: String,
LineItems:
[
{
ChartOfAccountId: 0,
ChartOfAccountRefId: String,
Amount: 0
}
],
OptedToPayCTADues: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ErrorDetails:
[
{
Id: 0,
Message: String,
Value: String
}
],
IsError: True,
MemberCount: 0,
TotalAmount: 0
}