| POST,OPTIONS | /v1/book/{Slug}/orders | ||
|---|---|---|---|
| POST,OPTIONS | /v1/book/{Slug}/orders/confirm |
import 'package:servicestack/servicestack.dart';
class CourierBookOrderResponse implements IConvertible
{
bool? Done;
bool? NeedsAction;
String? ClientSecret;
String? SetupIntentId;
String? Code;
String? TrackUrl;
String? IcsUrl;
String? WindowText;
String? Promise;
double? Total;
String? PayTiming;
String? CardLast4;
String? Repeats;
String? LinkSentBy;
String? ReopenStep;
ResponseStatus? ResponseStatus;
CourierBookOrderResponse({this.Done,this.NeedsAction,this.ClientSecret,this.SetupIntentId,this.Code,this.TrackUrl,this.IcsUrl,this.WindowText,this.Promise,this.Total,this.PayTiming,this.CardLast4,this.Repeats,this.LinkSentBy,this.ReopenStep,this.ResponseStatus});
CourierBookOrderResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Done = json['Done'];
NeedsAction = json['NeedsAction'];
ClientSecret = json['ClientSecret'];
SetupIntentId = json['SetupIntentId'];
Code = json['Code'];
TrackUrl = json['TrackUrl'];
IcsUrl = json['IcsUrl'];
WindowText = json['WindowText'];
Promise = json['Promise'];
Total = JsonConverters.toDouble(json['Total']);
PayTiming = json['PayTiming'];
CardLast4 = json['CardLast4'];
Repeats = json['Repeats'];
LinkSentBy = json['LinkSentBy'];
ReopenStep = json['ReopenStep'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Done': Done,
'NeedsAction': NeedsAction,
'ClientSecret': ClientSecret,
'SetupIntentId': SetupIntentId,
'Code': Code,
'TrackUrl': TrackUrl,
'IcsUrl': IcsUrl,
'WindowText': WindowText,
'Promise': Promise,
'Total': Total,
'PayTiming': PayTiming,
'CardLast4': CardLast4,
'Repeats': Repeats,
'LinkSentBy': LinkSentBy,
'ReopenStep': ReopenStep,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "CourierBookOrderResponse";
TypeContext? context = _ctx;
}
class CourierBookOrderRequest implements IConvertible
{
String? Slug;
String? Profile;
String? TurnstileToken;
String? Level;
String? WindowId;
String? Recur;
String? Address;
String? Unit;
String? City;
String? Zip;
double? Lat;
double? Lng;
String? PickupName;
String? DropAddress;
String? DropUnit;
String? DropCity;
String? DropZip;
double? DropLat;
double? DropLng;
String? RecipientName;
int? Units;
String? Handoff;
String? GateCode;
String? Note;
String? Name;
String? Phone;
String? Email;
bool? SmsConsent;
bool? Terms;
String? PaymentMethodId;
String? SetupIntentId;
double? QuotedTotal;
String? Lang;
CourierBookOrderRequest({this.Slug,this.Profile,this.TurnstileToken,this.Level,this.WindowId,this.Recur,this.Address,this.Unit,this.City,this.Zip,this.Lat,this.Lng,this.PickupName,this.DropAddress,this.DropUnit,this.DropCity,this.DropZip,this.DropLat,this.DropLng,this.RecipientName,this.Units,this.Handoff,this.GateCode,this.Note,this.Name,this.Phone,this.Email,this.SmsConsent,this.Terms,this.PaymentMethodId,this.SetupIntentId,this.QuotedTotal,this.Lang});
CourierBookOrderRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Slug = json['Slug'];
Profile = json['Profile'];
TurnstileToken = json['TurnstileToken'];
Level = json['Level'];
WindowId = json['WindowId'];
Recur = json['Recur'];
Address = json['Address'];
Unit = json['Unit'];
City = json['City'];
Zip = json['Zip'];
Lat = JsonConverters.toDouble(json['Lat']);
Lng = JsonConverters.toDouble(json['Lng']);
PickupName = json['PickupName'];
DropAddress = json['DropAddress'];
DropUnit = json['DropUnit'];
DropCity = json['DropCity'];
DropZip = json['DropZip'];
DropLat = JsonConverters.toDouble(json['DropLat']);
DropLng = JsonConverters.toDouble(json['DropLng']);
RecipientName = json['RecipientName'];
Units = json['Units'];
Handoff = json['Handoff'];
GateCode = json['GateCode'];
Note = json['Note'];
Name = json['Name'];
Phone = json['Phone'];
Email = json['Email'];
SmsConsent = json['SmsConsent'];
Terms = json['Terms'];
PaymentMethodId = json['PaymentMethodId'];
SetupIntentId = json['SetupIntentId'];
QuotedTotal = JsonConverters.toDouble(json['QuotedTotal']);
Lang = json['Lang'];
return this;
}
Map<String, dynamic> toJson() => {
'Slug': Slug,
'Profile': Profile,
'TurnstileToken': TurnstileToken,
'Level': Level,
'WindowId': WindowId,
'Recur': Recur,
'Address': Address,
'Unit': Unit,
'City': City,
'Zip': Zip,
'Lat': Lat,
'Lng': Lng,
'PickupName': PickupName,
'DropAddress': DropAddress,
'DropUnit': DropUnit,
'DropCity': DropCity,
'DropZip': DropZip,
'DropLat': DropLat,
'DropLng': DropLng,
'RecipientName': RecipientName,
'Units': Units,
'Handoff': Handoff,
'GateCode': GateCode,
'Note': Note,
'Name': Name,
'Phone': Phone,
'Email': Email,
'SmsConsent': SmsConsent,
'Terms': Terms,
'PaymentMethodId': PaymentMethodId,
'SetupIntentId': SetupIntentId,
'QuotedTotal': QuotedTotal,
'Lang': Lang
};
getTypeName() => "CourierBookOrderRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'CourierBookOrderResponse': TypeInfo(TypeOf.Class, create:() => CourierBookOrderResponse()),
'CourierBookOrderRequest': TypeInfo(TypeOf.Class, create:() => CourierBookOrderRequest()),
});
Dart CourierBookOrderRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/book/{Slug}/orders HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Slug":"String","Profile":"String","TurnstileToken":"String","Level":"String","WindowId":"String","Recur":"String","Address":"String","Unit":"String","City":"String","Zip":"String","Lat":0,"Lng":0,"PickupName":"String","DropAddress":"String","DropUnit":"String","DropCity":"String","DropZip":"String","DropLat":0,"DropLng":0,"RecipientName":"String","Units":0,"Handoff":"String","GateCode":"String","Note":"String","Name":"String","Phone":"String","Email":"String","SmsConsent":false,"Terms":false,"PaymentMethodId":"String","SetupIntentId":"String","QuotedTotal":0,"Lang":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Done":false,"NeedsAction":false,"ClientSecret":"String","SetupIntentId":"String","Code":"String","TrackUrl":"String","IcsUrl":"String","WindowText":"String","Promise":"String","Total":0,"PayTiming":"String","CardLast4":"String","Repeats":"String","LinkSentBy":"String","ReopenStep":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}