POST | /billables |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
/**
* Report/create a new billable
*/
// @Api(Description="Report/create a new billable")
class NewBillable implements IPost, IConvertible
{
/**
* The account to associate the billable with
*/
// @ApiMember(Description="The account to associate the billable with")
String? accountId;
/**
* The customer to associate the billable with
*/
// @ApiMember(Description="The customer to associate the billable with")
String? customerId;
/**
* The session ID to associate the billable with. You must specify either this or (AccountId + CustomerID)
*/
// @ApiMember(Description="The session ID to associate the billable with. You must specify either this or (AccountId + CustomerID)")
String? sessionId;
/**
* The call SID to report
*/
// @ApiMember(Description="The call SID to report")
String? callSid;
NewBillable({this.accountId,this.customerId,this.sessionId,this.callSid});
NewBillable.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
accountId = json['accountId'];
customerId = json['customerId'];
sessionId = json['sessionId'];
callSid = json['callSid'];
return this;
}
Map<String, dynamic> toJson() => {
'accountId': accountId,
'customerId': customerId,
'sessionId': sessionId,
'callSid': callSid
};
getTypeName() => "NewBillable";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'team.evovoice.io', types: <String, TypeInfo> {
'NewBillable': TypeInfo(TypeOf.Class, create:() => NewBillable()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /billables HTTP/1.1
Host: team.evovoice.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
accountId: String,
customerId: String,
sessionId: String,
callSid: String
}