POST | /voss/invoice | init voss invoice |
---|
import 'package:servicestack/servicestack.dart';
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
class CreateVossInvoice implements IConvertible
{
/**
* Company ids to create invoice. If none added invoice for all will be created
*/
// @ApiMember(Description="Company ids to create invoice. If none added invoice for all will be created")
List<String>? CompanyIds;
/**
* Controls up to which point of time transactions are included in invoice, can be set to any date, if not provided current UTC time will be used instead
*/
// @ApiMember(Description="Controls up to which point of time transactions are included in invoice, can be set to any date, if not provided current UTC time will be used instead")
DateTime? InvoiceDate;
/**
* If present the operation will start only after this date
*/
// @ApiMember(Description="If present the operation will start only after this date")
DateTime? ScheduledStartTime;
/**
* Optional CRON expression for recurring operations.
*/
// @ApiMember(Description="Optional CRON expression for recurring operations.")
String? RecurringSchedule;
/**
* Only usage.
*/
// @ApiMember(Description="Only usage.")
bool? OnlyUsage;
CreateVossInvoice({this.CompanyIds,this.InvoiceDate,this.ScheduledStartTime,this.RecurringSchedule,this.OnlyUsage});
CreateVossInvoice.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyIds = JsonConverters.fromJson(json['CompanyIds'],'List<String>',context!);
InvoiceDate = JsonConverters.fromJson(json['InvoiceDate'],'DateTime',context!);
ScheduledStartTime = JsonConverters.fromJson(json['ScheduledStartTime'],'DateTime',context!);
RecurringSchedule = json['RecurringSchedule'];
OnlyUsage = json['OnlyUsage'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyIds': JsonConverters.toJson(CompanyIds,'List<String>',context!),
'InvoiceDate': JsonConverters.toJson(InvoiceDate,'DateTime',context!),
'ScheduledStartTime': JsonConverters.toJson(ScheduledStartTime,'DateTime',context!),
'RecurringSchedule': RecurringSchedule,
'OnlyUsage': OnlyUsage
};
getTypeName() => "CreateVossInvoice";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
'CreateVossInvoice': TypeInfo(TypeOf.Class, create:() => CreateVossInvoice()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /voss/invoice HTTP/1.1
Host: testapi.bokamera.se
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"CompanyIds":["00000000-0000-0000-0000-000000000000"],"InvoiceDate":"0001-01-01T00:00:00","ScheduledStartTime":"0001-01-01T00:00:00","RecurringSchedule":"String","OnlyUsage":false}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {}