| POST,OPTIONS | /v1/routeplan/property |
|---|
import 'package:servicestack/servicestack.dart';
class RoutePlanPropertyCreateResponse implements IConvertible
{
int? AgreementID;
int? ProjectID;
ResponseStatus? ResponseStatus;
RoutePlanPropertyCreateResponse({this.AgreementID,this.ProjectID,this.ResponseStatus});
RoutePlanPropertyCreateResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgreementID = json['AgreementID'];
ProjectID = json['ProjectID'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'AgreementID': AgreementID,
'ProjectID': ProjectID,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "RoutePlanPropertyCreateResponse";
TypeContext? context = _ctx;
}
class RoutePlanPropertyCreateRequest implements IConvertible
{
String? Name;
String? Acreage;
int? Minutes;
String? Profile;
int? Dow;
List<int>? EquipmentIDs = [];
int? TerritoryID;
RoutePlanPropertyCreateRequest({this.Name,this.Acreage,this.Minutes,this.Profile,this.Dow,this.EquipmentIDs,this.TerritoryID});
RoutePlanPropertyCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Acreage = json['Acreage'];
Minutes = json['Minutes'];
Profile = json['Profile'];
Dow = json['Dow'];
EquipmentIDs = JsonConverters.fromJson(json['EquipmentIDs'],'List<int>',context!);
TerritoryID = json['TerritoryID'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Acreage': Acreage,
'Minutes': Minutes,
'Profile': Profile,
'Dow': Dow,
'EquipmentIDs': JsonConverters.toJson(EquipmentIDs,'List<int>',context!),
'TerritoryID': TerritoryID
};
getTypeName() => "RoutePlanPropertyCreateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'RoutePlanPropertyCreateResponse': TypeInfo(TypeOf.Class, create:() => RoutePlanPropertyCreateResponse()),
'RoutePlanPropertyCreateRequest': TypeInfo(TypeOf.Class, create:() => RoutePlanPropertyCreateRequest()),
});
Dart RoutePlanPropertyCreateRequest 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/property HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Name: String,
Acreage: String,
Minutes: 0,
Profile: String,
Dow: 0,
EquipmentIDs:
[
0
],
TerritoryID: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
AgreementID: 0,
ProjectID: 0,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}