| POST,OPTIONS | /v1/dispatch/public/pickup/{SchedulerUrl} |
|---|
import 'package:servicestack/servicestack.dart';
class DispatchPickupBookResponse implements IConvertible
{
String? Code;
double? Fare;
String? Zone;
int? Bags;
String? PayMode;
String? PayLine;
String? TrackUrl;
String? BookToken;
String? ClientSecret;
String? PublishableKey;
String? Delivery;
ResponseStatus? ResponseStatus;
DispatchPickupBookResponse({this.Code,this.Fare,this.Zone,this.Bags,this.PayMode,this.PayLine,this.TrackUrl,this.BookToken,this.ClientSecret,this.PublishableKey,this.Delivery,this.ResponseStatus});
DispatchPickupBookResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Code = json['Code'];
Fare = JsonConverters.toDouble(json['Fare']);
Zone = json['Zone'];
Bags = json['Bags'];
PayMode = json['PayMode'];
PayLine = json['PayLine'];
TrackUrl = json['TrackUrl'];
BookToken = json['BookToken'];
ClientSecret = json['ClientSecret'];
PublishableKey = json['PublishableKey'];
Delivery = json['Delivery'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Code': Code,
'Fare': Fare,
'Zone': Zone,
'Bags': Bags,
'PayMode': PayMode,
'PayLine': PayLine,
'TrackUrl': TrackUrl,
'BookToken': BookToken,
'ClientSecret': ClientSecret,
'PublishableKey': PublishableKey,
'Delivery': Delivery,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "DispatchPickupBookResponse";
TypeContext? context = _ctx;
}
class DispatchPickupBookRequest implements IConvertible
{
String? SchedulerUrl;
String? Address;
String? Unit;
String? City;
String? Zip;
String? Zone;
int? Bags;
List<String>? Needs = [];
String? Note;
String? CustomerName;
String? CustomerPhone;
String? PayMode;
String? AccountCode;
String? TurnstileToken;
DispatchPickupBookRequest({this.SchedulerUrl,this.Address,this.Unit,this.City,this.Zip,this.Zone,this.Bags,this.Needs,this.Note,this.CustomerName,this.CustomerPhone,this.PayMode,this.AccountCode,this.TurnstileToken});
DispatchPickupBookRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SchedulerUrl = json['SchedulerUrl'];
Address = json['Address'];
Unit = json['Unit'];
City = json['City'];
Zip = json['Zip'];
Zone = json['Zone'];
Bags = json['Bags'];
Needs = JsonConverters.fromJson(json['Needs'],'List<String>',context!);
Note = json['Note'];
CustomerName = json['CustomerName'];
CustomerPhone = json['CustomerPhone'];
PayMode = json['PayMode'];
AccountCode = json['AccountCode'];
TurnstileToken = json['TurnstileToken'];
return this;
}
Map<String, dynamic> toJson() => {
'SchedulerUrl': SchedulerUrl,
'Address': Address,
'Unit': Unit,
'City': City,
'Zip': Zip,
'Zone': Zone,
'Bags': Bags,
'Needs': JsonConverters.toJson(Needs,'List<String>',context!),
'Note': Note,
'CustomerName': CustomerName,
'CustomerPhone': CustomerPhone,
'PayMode': PayMode,
'AccountCode': AccountCode,
'TurnstileToken': TurnstileToken
};
getTypeName() => "DispatchPickupBookRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DispatchPickupBookResponse': TypeInfo(TypeOf.Class, create:() => DispatchPickupBookResponse()),
'DispatchPickupBookRequest': TypeInfo(TypeOf.Class, create:() => DispatchPickupBookRequest()),
});
Dart DispatchPickupBookRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dispatch/public/pickup/{SchedulerUrl} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<DispatchPickupBookRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AccountCode>String</AccountCode>
<Address>String</Address>
<Bags>0</Bags>
<City>String</City>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<Needs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Needs>
<Note>String</Note>
<PayMode>String</PayMode>
<SchedulerUrl>String</SchedulerUrl>
<TurnstileToken>String</TurnstileToken>
<Unit>String</Unit>
<Zip>String</Zip>
<Zone>String</Zone>
</DispatchPickupBookRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DispatchPickupBookResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Bags>0</Bags>
<BookToken>String</BookToken>
<ClientSecret>String</ClientSecret>
<Code>String</Code>
<Delivery>String</Delivery>
<Fare>0</Fare>
<PayLine>String</PayLine>
<PayMode>String</PayMode>
<PublishableKey>String</PublishableKey>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<TrackUrl>String</TrackUrl>
<Zone>String</Zone>
</DispatchPickupBookResponse>