Trendsic Platform Service

<back to all web services

DispatchPickupBookRequest

The following routes are available for this service:
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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	SchedulerUrl: String,
	Address: String,
	Unit: String,
	City: String,
	Zip: String,
	Zone: String,
	Bags: 0,
	Needs: 
	[
		String
	],
	Note: String,
	CustomerName: String,
	CustomerPhone: String,
	PayMode: String,
	AccountCode: String,
	TurnstileToken: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Code: String,
	Fare: 0,
	Zone: String,
	Bags: 0,
	PayMode: String,
	PayLine: String,
	TrackUrl: String,
	BookToken: String,
	ClientSecret: String,
	PublishableKey: String,
	Delivery: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}