| GET,OPTIONS | /v1/dispatch/settings/modules |
|---|
import 'package:servicestack/servicestack.dart';
class DispatchModuleView implements IConvertible
{
String? Key;
String? Mode;
bool? Allowed;
bool? Enabled;
int? InFlight;
DispatchModuleView({this.Key,this.Mode,this.Allowed,this.Enabled,this.InFlight});
DispatchModuleView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Mode = json['Mode'];
Allowed = json['Allowed'];
Enabled = json['Enabled'];
InFlight = json['InFlight'];
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Mode': Mode,
'Allowed': Allowed,
'Enabled': Enabled,
'InFlight': InFlight
};
getTypeName() => "DispatchModuleView";
TypeContext? context = _ctx;
}
class DispatchPatternView implements IConvertible
{
String? PatternId;
String? Name;
String? Source;
String? Facility;
String? Unit;
bool? HasQuotas;
bool? IsInverted;
int? LoadLimitMins;
String? TicketSource;
String? PayBasis;
bool? IsActive;
DispatchPatternView({this.PatternId,this.Name,this.Source,this.Facility,this.Unit,this.HasQuotas,this.IsInverted,this.LoadLimitMins,this.TicketSource,this.PayBasis,this.IsActive});
DispatchPatternView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PatternId = json['PatternId'];
Name = json['Name'];
Source = json['Source'];
Facility = json['Facility'];
Unit = json['Unit'];
HasQuotas = json['HasQuotas'];
IsInverted = json['IsInverted'];
LoadLimitMins = json['LoadLimitMins'];
TicketSource = json['TicketSource'];
PayBasis = json['PayBasis'];
IsActive = json['IsActive'];
return this;
}
Map<String, dynamic> toJson() => {
'PatternId': PatternId,
'Name': Name,
'Source': Source,
'Facility': Facility,
'Unit': Unit,
'HasQuotas': HasQuotas,
'IsInverted': IsInverted,
'LoadLimitMins': LoadLimitMins,
'TicketSource': TicketSource,
'PayBasis': PayBasis,
'IsActive': IsActive
};
getTypeName() => "DispatchPatternView";
TypeContext? context = _ctx;
}
class DispatchModulesResponse implements IConvertible
{
List<DispatchModuleView>? Modules = [];
List<DispatchPatternView>? Patterns = [];
ResponseStatus? ResponseStatus;
DispatchModulesResponse({this.Modules,this.Patterns,this.ResponseStatus});
DispatchModulesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Modules = JsonConverters.fromJson(json['Modules'],'List<DispatchModuleView>',context!);
Patterns = JsonConverters.fromJson(json['Patterns'],'List<DispatchPatternView>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Modules': JsonConverters.toJson(Modules,'List<DispatchModuleView>',context!),
'Patterns': JsonConverters.toJson(Patterns,'List<DispatchPatternView>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "DispatchModulesResponse";
TypeContext? context = _ctx;
}
class DispatchModulesRequest implements IConvertible
{
DispatchModulesRequest();
DispatchModulesRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "DispatchModulesRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DispatchModuleView': TypeInfo(TypeOf.Class, create:() => DispatchModuleView()),
'DispatchPatternView': TypeInfo(TypeOf.Class, create:() => DispatchPatternView()),
'DispatchModulesResponse': TypeInfo(TypeOf.Class, create:() => DispatchModulesResponse()),
'List<DispatchModuleView>': TypeInfo(TypeOf.Class, create:() => <DispatchModuleView>[]),
'List<DispatchPatternView>': TypeInfo(TypeOf.Class, create:() => <DispatchPatternView>[]),
'DispatchModulesRequest': TypeInfo(TypeOf.Class, create:() => DispatchModulesRequest()),
});
Dart DispatchModulesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/dispatch/settings/modules HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Modules":[{"Key":"String","Mode":"String","Allowed":false,"Enabled":false,"InFlight":0}],"Patterns":[{"PatternId":"String","Name":"String","Source":"String","Facility":"String","Unit":"String","HasQuotas":false,"IsInverted":false,"LoadLimitMins":0,"TicketSource":"String","PayBasis":"String","IsActive":false}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}