| PUT | /invoices/recurringInvoices/obligations |
|---|
import 'package:servicestack/servicestack.dart';
class ErrorDetail implements IConvertible
{
int? Id;
String? Message;
String? Value;
ErrorDetail({this.Id,this.Message,this.Value});
ErrorDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Message = json['Message'];
Value = json['Value'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Message': Message,
'Value': Value
};
getTypeName() => "ErrorDetail";
TypeContext? context = _ctx;
}
class ObligationResponse implements IHaveErrorField, IConvertible
{
List<ErrorDetail>? ErrorDetails;
bool? IsError;
int? MemberCount;
double? TotalAmount;
ObligationResponse({this.ErrorDetails,this.IsError,this.MemberCount,this.TotalAmount});
ObligationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ErrorDetails = JsonConverters.fromJson(json['ErrorDetails'],'List<ErrorDetail>',context!);
IsError = json['IsError'];
MemberCount = json['MemberCount'];
TotalAmount = JsonConverters.toDouble(json['TotalAmount']);
return this;
}
Map<String, dynamic> toJson() => {
'ErrorDetails': JsonConverters.toJson(ErrorDetails,'List<ErrorDetail>',context!),
'IsError': IsError,
'MemberCount': MemberCount,
'TotalAmount': TotalAmount
};
getTypeName() => "ObligationResponse";
TypeContext? context = _ctx;
}
class ObligationLineItem implements IConvertible
{
int? ChartOfAccountId;
String? ChartOfAccountRefId;
double? Amount;
ObligationLineItem({this.ChartOfAccountId,this.ChartOfAccountRefId,this.Amount});
ObligationLineItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ChartOfAccountId = json['ChartOfAccountId'];
ChartOfAccountRefId = json['ChartOfAccountRefId'];
Amount = JsonConverters.toDouble(json['Amount']);
return this;
}
Map<String, dynamic> toJson() => {
'ChartOfAccountId': ChartOfAccountId,
'ChartOfAccountRefId': ChartOfAccountRefId,
'Amount': Amount
};
getTypeName() => "ObligationLineItem";
TypeContext? context = _ctx;
}
class UserObligation implements IConvertible
{
String? UserId;
int? FiscalYear;
String? GroupId;
List<ObligationLineItem>? LineItems;
bool? OptedToPayCTADues;
UserObligation({this.UserId,this.FiscalYear,this.GroupId,this.LineItems,this.OptedToPayCTADues});
UserObligation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['UserId'];
FiscalYear = json['FiscalYear'];
GroupId = json['GroupId'];
LineItems = JsonConverters.fromJson(json['LineItems'],'List<ObligationLineItem>',context!);
OptedToPayCTADues = json['OptedToPayCTADues'];
return this;
}
Map<String, dynamic> toJson() => {
'UserId': UserId,
'FiscalYear': FiscalYear,
'GroupId': GroupId,
'LineItems': JsonConverters.toJson(LineItems,'List<ObligationLineItem>',context!),
'OptedToPayCTADues': OptedToPayCTADues
};
getTypeName() => "UserObligation";
TypeContext? context = _ctx;
}
class UserObligations extends ListBase<UserObligation> implements IConvertible
{
final List<UserObligation> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
UserObligation operator [](int index) => l[index];
void operator []=(int index, UserObligation value) { l[index] = value; }
UserObligations();
UserObligations.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "UserObligations";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
'ErrorDetail': TypeInfo(TypeOf.Class, create:() => ErrorDetail()),
'ObligationResponse': TypeInfo(TypeOf.Class, create:() => ObligationResponse()),
'List<ErrorDetail>': TypeInfo(TypeOf.Class, create:() => <ErrorDetail>[]),
'ObligationLineItem': TypeInfo(TypeOf.Class, create:() => ObligationLineItem()),
'UserObligation': TypeInfo(TypeOf.Class, create:() => UserObligation()),
'List<ObligationLineItem>': TypeInfo(TypeOf.Class, create:() => <ObligationLineItem>[]),
'UserObligations': TypeInfo(TypeOf.Class, create:() => UserObligations()),
});
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/obligations HTTP/1.1
Host: devapi.billhighway.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
[
]
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
}