| Requires any of the roles: | Agent, Administrator |
| PUT,OPTIONS | /v1/invoice/{InvoiceUID}/payment |
|---|
import 'package:servicestack/servicestack.dart';
class InvoiceRecordPaymentResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
bool? Success;
bool? Paid;
String? ReceiptUrl;
String? Message;
InvoiceRecordPaymentResponse({this.ResponseStatus,this.Success,this.Paid,this.ReceiptUrl,this.Message});
InvoiceRecordPaymentResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Success = json['Success'];
Paid = json['Paid'];
ReceiptUrl = json['ReceiptUrl'];
Message = json['Message'];
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Success': Success,
'Paid': Paid,
'ReceiptUrl': ReceiptUrl,
'Message': Message
};
getTypeName() => "InvoiceRecordPaymentResponse";
TypeContext? context = _ctx;
}
class InvoiceRecordPaymentRequest implements IConvertible
{
String? InvoiceUID;
String? StripeToken;
InvoiceRecordPaymentRequest({this.InvoiceUID,this.StripeToken});
InvoiceRecordPaymentRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
InvoiceUID = json['InvoiceUID'];
StripeToken = json['StripeToken'];
return this;
}
Map<String, dynamic> toJson() => {
'InvoiceUID': InvoiceUID,
'StripeToken': StripeToken
};
getTypeName() => "InvoiceRecordPaymentRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'InvoiceRecordPaymentResponse': TypeInfo(TypeOf.Class, create:() => InvoiceRecordPaymentResponse()),
'InvoiceRecordPaymentRequest': TypeInfo(TypeOf.Class, create:() => InvoiceRecordPaymentRequest()),
});
Dart InvoiceRecordPaymentRequest DTOs
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.
PUT /v1/invoice/{InvoiceUID}/payment HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"InvoiceUID":"00000000000000000000000000000000","StripeToken":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Success":false,"Paid":false,"ReceiptUrl":"String","Message":"String"}