| POST | /v1/billing/run/system |
|---|
import 'package:servicestack/servicestack.dart';
class RunBillingSystemTenantResult implements IConvertible
{
String? TenantId;
int? BillingRunID;
bool? Started;
String? Message;
RunBillingSystemTenantResult({this.TenantId,this.BillingRunID,this.Started,this.Message});
RunBillingSystemTenantResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TenantId = json['TenantId'];
BillingRunID = json['BillingRunID'];
Started = json['Started'];
Message = json['Message'];
return this;
}
Map<String, dynamic> toJson() => {
'TenantId': TenantId,
'BillingRunID': BillingRunID,
'Started': Started,
'Message': Message
};
getTypeName() => "RunBillingSystemTenantResult";
TypeContext? context = _ctx;
}
class RunBillingSystemResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
int? TenantsSwept;
int? RunsStarted;
int? Reclaimed;
List<RunBillingSystemTenantResult>? Results = [];
RunBillingSystemResponse({this.ResponseStatus,this.TenantsSwept,this.RunsStarted,this.Reclaimed,this.Results});
RunBillingSystemResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
TenantsSwept = json['TenantsSwept'];
RunsStarted = json['RunsStarted'];
Reclaimed = json['Reclaimed'];
Results = JsonConverters.fromJson(json['Results'],'List<RunBillingSystemTenantResult>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'TenantsSwept': TenantsSwept,
'RunsStarted': RunsStarted,
'Reclaimed': Reclaimed,
'Results': JsonConverters.toJson(Results,'List<RunBillingSystemTenantResult>',context!)
};
getTypeName() => "RunBillingSystemResponse";
TypeContext? context = _ctx;
}
class RunBillingSystemRequest implements IConvertible
{
String? RunType;
String? PeriodKey;
String? TenantId;
int? ReclaimStaleMinutes;
RunBillingSystemRequest({this.RunType,this.PeriodKey,this.TenantId,this.ReclaimStaleMinutes});
RunBillingSystemRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RunType = json['RunType'];
PeriodKey = json['PeriodKey'];
TenantId = json['TenantId'];
ReclaimStaleMinutes = json['ReclaimStaleMinutes'];
return this;
}
Map<String, dynamic> toJson() => {
'RunType': RunType,
'PeriodKey': PeriodKey,
'TenantId': TenantId,
'ReclaimStaleMinutes': ReclaimStaleMinutes
};
getTypeName() => "RunBillingSystemRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'RunBillingSystemTenantResult': TypeInfo(TypeOf.Class, create:() => RunBillingSystemTenantResult()),
'RunBillingSystemResponse': TypeInfo(TypeOf.Class, create:() => RunBillingSystemResponse()),
'List<RunBillingSystemTenantResult>': TypeInfo(TypeOf.Class, create:() => <RunBillingSystemTenantResult>[]),
'RunBillingSystemRequest': TypeInfo(TypeOf.Class, create:() => RunBillingSystemRequest()),
});
Dart RunBillingSystemRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/billing/run/system HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"RunType":"String","PeriodKey":"String","TenantId":"00000000000000000000000000000000","ReclaimStaleMinutes":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"TenantsSwept":0,"RunsStarted":0,"Reclaimed":0,"Results":[{"TenantId":"00000000000000000000000000000000","BillingRunID":0,"Started":false,"Message":"String"}]}