| GET,OPTIONS | /v1/billing/run/{BillingRunID} |
|---|
import 'package:servicestack/servicestack.dart';
class BillingRun implements IConvertible
{
int? BillingRunID;
String? TenantId;
String? BranchId;
String? BranchName;
String? RunType;
String? PeriodKey;
String? Status;
int? InvoicesCreated;
int? CreditsApplied;
String? Error;
String? CreatedBy;
DateTime? StartedAt;
DateTime? CompletedAt;
BillingRun({this.BillingRunID,this.TenantId,this.BranchId,this.BranchName,this.RunType,this.PeriodKey,this.Status,this.InvoicesCreated,this.CreditsApplied,this.Error,this.CreatedBy,this.StartedAt,this.CompletedAt});
BillingRun.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BillingRunID = json['BillingRunID'];
TenantId = json['TenantId'];
BranchId = json['BranchId'];
BranchName = json['BranchName'];
RunType = json['RunType'];
PeriodKey = json['PeriodKey'];
Status = json['Status'];
InvoicesCreated = json['InvoicesCreated'];
CreditsApplied = json['CreditsApplied'];
Error = json['Error'];
CreatedBy = json['CreatedBy'];
StartedAt = JsonConverters.fromJson(json['StartedAt'],'DateTime',context!);
CompletedAt = JsonConverters.fromJson(json['CompletedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'BillingRunID': BillingRunID,
'TenantId': TenantId,
'BranchId': BranchId,
'BranchName': BranchName,
'RunType': RunType,
'PeriodKey': PeriodKey,
'Status': Status,
'InvoicesCreated': InvoicesCreated,
'CreditsApplied': CreditsApplied,
'Error': Error,
'CreatedBy': CreatedBy,
'StartedAt': JsonConverters.toJson(StartedAt,'DateTime',context!),
'CompletedAt': JsonConverters.toJson(CompletedAt,'DateTime',context!)
};
getTypeName() => "BillingRun";
TypeContext? context = _ctx;
}
class BillingRunStatusResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
BillingRun? BillingRun;
BillingRunStatusResponse({this.ResponseStatus,this.BillingRun});
BillingRunStatusResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
BillingRun = JsonConverters.fromJson(json['BillingRun'],'BillingRun',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'BillingRun': JsonConverters.toJson(BillingRun,'BillingRun',context!)
};
getTypeName() => "BillingRunStatusResponse";
TypeContext? context = _ctx;
}
class BillingRunStatusRequest implements IConvertible
{
int? BillingRunID;
BillingRunStatusRequest({this.BillingRunID});
BillingRunStatusRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BillingRunID = json['BillingRunID'];
return this;
}
Map<String, dynamic> toJson() => {
'BillingRunID': BillingRunID
};
getTypeName() => "BillingRunStatusRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'BillingRun': TypeInfo(TypeOf.Class, create:() => BillingRun()),
'BillingRunStatusResponse': TypeInfo(TypeOf.Class, create:() => BillingRunStatusResponse()),
'BillingRunStatusRequest': TypeInfo(TypeOf.Class, create:() => BillingRunStatusRequest()),
});
Dart BillingRunStatusRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/billing/run/{BillingRunID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<BillingRunStatusResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<BillingRun>
<BillingRunID>0</BillingRunID>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<CompletedAt>0001-01-01T00:00:00</CompletedAt>
<CreatedBy>String</CreatedBy>
<CreditsApplied>0</CreditsApplied>
<Error>String</Error>
<InvoicesCreated>0</InvoicesCreated>
<PeriodKey>String</PeriodKey>
<RunType>String</RunType>
<StartedAt>0001-01-01T00:00:00</StartedAt>
<Status>String</Status>
<TenantId>00000000-0000-0000-0000-000000000000</TenantId>
</BillingRun>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</BillingRunStatusResponse>