| POST,OPTIONS | /v1/routeplan/autopay |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class RoutePlanWriteResponse implements IConvertible
{
bool? Ok;
ResponseStatus? ResponseStatus;
RoutePlanWriteResponse({this.Ok,this.ResponseStatus});
RoutePlanWriteResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Ok = json['Ok'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Ok': Ok,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "RoutePlanWriteResponse";
TypeContext? context = _ctx;
}
class RoutePlanAutoPayRequest implements IConvertible
{
int? AgreementID;
bool? Enrolled;
RoutePlanAutoPayRequest({this.AgreementID,this.Enrolled});
RoutePlanAutoPayRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgreementID = json['AgreementID'];
Enrolled = json['Enrolled'];
return this;
}
Map<String, dynamic> toJson() => {
'AgreementID': AgreementID,
'Enrolled': Enrolled
};
getTypeName() => "RoutePlanAutoPayRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'RoutePlanWriteResponse': TypeInfo(TypeOf.Class, create:() => RoutePlanWriteResponse()),
'RoutePlanAutoPayRequest': TypeInfo(TypeOf.Class, create:() => RoutePlanAutoPayRequest()),
});
Dart RoutePlanAutoPayRequest DTOs
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 /v1/routeplan/autopay HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
AgreementID: 0,
Enrolled: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Ok: False,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}