| GET,OPTIONS | /v1/qbo/pending |
|---|
import 'package:servicestack/servicestack.dart';
class QboPendingInvoice implements IConvertible
{
int? InvoiceID;
String? InvoiceUID;
String? InvoiceNumber;
DateTime? InvoiceDate;
double? Total;
String? CustomerName;
bool? IsPaid;
String? SyncStatus;
String? ExternalRef;
QboPendingInvoice({this.InvoiceID,this.InvoiceUID,this.InvoiceNumber,this.InvoiceDate,this.Total,this.CustomerName,this.IsPaid,this.SyncStatus,this.ExternalRef});
QboPendingInvoice.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
InvoiceID = json['InvoiceID'];
InvoiceUID = json['InvoiceUID'];
InvoiceNumber = json['InvoiceNumber'];
InvoiceDate = JsonConverters.fromJson(json['InvoiceDate'],'DateTime',context!);
Total = JsonConverters.toDouble(json['Total']);
CustomerName = json['CustomerName'];
IsPaid = json['IsPaid'];
SyncStatus = json['SyncStatus'];
ExternalRef = json['ExternalRef'];
return this;
}
Map<String, dynamic> toJson() => {
'InvoiceID': InvoiceID,
'InvoiceUID': InvoiceUID,
'InvoiceNumber': InvoiceNumber,
'InvoiceDate': JsonConverters.toJson(InvoiceDate,'DateTime',context!),
'Total': Total,
'CustomerName': CustomerName,
'IsPaid': IsPaid,
'SyncStatus': SyncStatus,
'ExternalRef': ExternalRef
};
getTypeName() => "QboPendingInvoice";
TypeContext? context = _ctx;
}
class QboPendingResponse implements IConvertible
{
List<QboPendingInvoice>? Invoices = [];
ResponseStatus? ResponseStatus;
QboPendingResponse({this.Invoices,this.ResponseStatus});
QboPendingResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Invoices = JsonConverters.fromJson(json['Invoices'],'List<QboPendingInvoice>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Invoices': JsonConverters.toJson(Invoices,'List<QboPendingInvoice>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "QboPendingResponse";
TypeContext? context = _ctx;
}
class QboPendingRequest implements IConvertible
{
QboPendingRequest();
QboPendingRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "QboPendingRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'QboPendingInvoice': TypeInfo(TypeOf.Class, create:() => QboPendingInvoice()),
'QboPendingResponse': TypeInfo(TypeOf.Class, create:() => QboPendingResponse()),
'List<QboPendingInvoice>': TypeInfo(TypeOf.Class, create:() => <QboPendingInvoice>[]),
'QboPendingRequest': TypeInfo(TypeOf.Class, create:() => QboPendingRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/qbo/pending HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Invoices":[{"InvoiceID":0,"InvoiceUID":"00000000000000000000000000000000","InvoiceNumber":"String","InvoiceDate":"0001-01-01T00:00:00.0000000","Total":0,"CustomerName":"String","IsPaid":false,"SyncStatus":"String","ExternalRef":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}