| POST | /payments/credit |
|---|
import 'package:servicestack/servicestack.dart';
class CreateApplyCreditReply implements IConvertible
{
int? ErrorCode;
String? ErrorMessage;
CreateApplyCreditReply({this.ErrorCode,this.ErrorMessage});
CreateApplyCreditReply.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ErrorCode = json['ErrorCode'];
ErrorMessage = json['ErrorMessage'];
return this;
}
Map<String, dynamic> toJson() => {
'ErrorCode': ErrorCode,
'ErrorMessage': ErrorMessage
};
getTypeName() => "CreateApplyCreditReply";
TypeContext? context = _ctx;
}
class SalesForceCreditInvoiceDetails implements IConvertible
{
int? Invoice;
double? AmountPaid;
String? Region;
String? CostCenter;
SalesForceCreditInvoiceDetails({this.Invoice,this.AmountPaid,this.Region,this.CostCenter});
SalesForceCreditInvoiceDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Invoice = json['Invoice'];
AmountPaid = JsonConverters.toDouble(json['AmountPaid']);
Region = json['Region'];
CostCenter = json['CostCenter'];
return this;
}
Map<String, dynamic> toJson() => {
'Invoice': Invoice,
'AmountPaid': AmountPaid,
'Region': Region,
'CostCenter': CostCenter
};
getTypeName() => "SalesForceCreditInvoiceDetails";
TypeContext? context = _ctx;
}
class CreateApplyCredit implements IConvertible
{
String? ClassName;
String? UniqueId;
DateTime? CreatedDateTime;
int? ClientId;
String? GroupId;
String? UserId;
int? BhUserId;
int? CreditId;
String? CurrencyType;
String? CreditType;
String? Notes;
List<SalesForceCreditInvoiceDetails>? InvoiceDetails;
CreateApplyCredit({this.ClassName,this.UniqueId,this.CreatedDateTime,this.ClientId,this.GroupId,this.UserId,this.BhUserId,this.CreditId,this.CurrencyType,this.CreditType,this.Notes,this.InvoiceDetails});
CreateApplyCredit.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ClassName = json['ClassName'];
UniqueId = json['UniqueId'];
CreatedDateTime = JsonConverters.fromJson(json['CreatedDateTime'],'DateTime',context!);
ClientId = json['ClientId'];
GroupId = json['GroupId'];
UserId = json['UserId'];
BhUserId = json['BhUserId'];
CreditId = json['CreditId'];
CurrencyType = json['CurrencyType'];
CreditType = json['CreditType'];
Notes = json['Notes'];
InvoiceDetails = JsonConverters.fromJson(json['InvoiceDetails'],'List<SalesForceCreditInvoiceDetails>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ClassName': ClassName,
'UniqueId': UniqueId,
'CreatedDateTime': JsonConverters.toJson(CreatedDateTime,'DateTime',context!),
'ClientId': ClientId,
'GroupId': GroupId,
'UserId': UserId,
'BhUserId': BhUserId,
'CreditId': CreditId,
'CurrencyType': CurrencyType,
'CreditType': CreditType,
'Notes': Notes,
'InvoiceDetails': JsonConverters.toJson(InvoiceDetails,'List<SalesForceCreditInvoiceDetails>',context!)
};
getTypeName() => "CreateApplyCredit";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
'CreateApplyCreditReply': TypeInfo(TypeOf.Class, create:() => CreateApplyCreditReply()),
'SalesForceCreditInvoiceDetails': TypeInfo(TypeOf.Class, create:() => SalesForceCreditInvoiceDetails()),
'CreateApplyCredit': TypeInfo(TypeOf.Class, create:() => CreateApplyCredit()),
'List<SalesForceCreditInvoiceDetails>': TypeInfo(TypeOf.Class, create:() => <SalesForceCreditInvoiceDetails>[]),
});
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.
POST /payments/credit HTTP/1.1
Host: devapi.billhighway.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ClassName: String,
UniqueId: String,
CreatedDateTime: 0001-01-01,
ClientId: 0,
GroupId: String,
UserId: String,
BhUserId: 0,
CreditId: 0,
CurrencyType: String,
CreditType: String,
Notes: String,
InvoiceDetails:
[
{
Invoice: 0,
AmountPaid: 0,
Region: String,
CostCenter: String
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ErrorCode: 0,
ErrorMessage: String
}