/* Options: Date: 2025-12-06 06:22:06 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://1fetch.api.client.prod.86degrees.com //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: PlaceOrder.* //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } export class ApiServiceRequest implements IServiceRequest, IHasApiKey { /** @description The API Key required for authentication */ // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true) public ApiKey: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export interface IServiceRequest { } export interface IHasApiKey { ApiKey: string; } export interface ILogRequest { } export class RequestQuoteWaypoint implements IRequestWaypoint { /** @description Number of waypoint for ordering */ // @ApiMember(Description="Number of waypoint for ordering", IsRequired=true) public WaypointNumber: number; /** @description Waypoint Latitude */ // @ApiMember(Description="Waypoint Latitude", IsRequired=true) public Latitude: number; /** @description Waypoint Longitude */ // @ApiMember(Description="Waypoint Longitude", IsRequired=true) public Longitude: number; /** @description Name of contact person at waypoint */ // @ApiMember(Description="Name of contact person at waypoint", IsRequired=true) public ContactName: string; /** @description Telephone number of contact person at waypoint */ // @ApiMember(Description="Telephone number of contact person at waypoint", IsRequired=true) public ContactNumber: string; /** @description Instructions for driver to follow at waypoint */ // @ApiMember(Description="Instructions for driver to follow at waypoint", IsRequired=true) public DeliveryInstructions: string; /** @description Waypoint address */ // @ApiMember(Description="Waypoint address", IsRequired=true) public Address: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export enum ScheduleType { NextAvailable = 0, SpecificTime = 1, } export class LinkedWaypoint { public FromWaypointNumber: number; public ToWaypointNumber: number; public FromLatitude: number; public FromLongitude: number; public ToLatitude: number; public ToLongitude: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class WaypointQuoteInformation extends LinkedWaypoint { /** @description Distance between waypoints as a number */ // @ApiMember(Description="Distance between waypoints as a number") public Distance: number; /** @description String formatted distance */ // @ApiMember(Description="String formatted distance") public DistanceValue: string; public WaypointValid: boolean; public Message: string; public ErrorDetails: string[]; /** @description Caculated price between waypoints excluding vat */ // @ApiMember(Description="Caculated price between waypoints excluding vat") public Price: number; /** @description Price excluding vat formatted as a string rand value */ // @ApiMember(Description="Price excluding vat formatted as a string rand value") public PriceValue: string; /** @description The price between waypoints including vat */ // @ApiMember(Description="The price between waypoints including vat") public PriceWithVAT: number; /** @description The price including vat formatted as a rand value string */ // @ApiMember(Description="The price including vat formatted as a rand value string") public PriceValueWithVAT: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class WaypointValidationInformation { public WaypointNumber: number; public IsValid: boolean; public ErrorMessages: string[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export interface IRequestWaypoint { Latitude: number; Longitude: number; WaypointNumber: number; ContactName: string; ContactNumber: string; DeliveryInstructions: string; Address: string; } export class ApiServiceResponse implements IServiceResponse { /** @description Information about the response. */ // @ApiMember(Description="Information about the response.", IsRequired=true) public Description: string; /** @description Heading or summary of the response. */ // @ApiMember(Description="Heading or summary of the response.", IsRequired=true) public Heading: string; /** @description Did the intended operation for this response complete successfully? */ // @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true) public WasSuccessful: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class PlaceOrderResponse extends ApiServiceResponse { /** @description The ID of the order. */ // @ApiMember(Description="The ID of the order.") public OrderId: string; /** @description Were there any validation issues for any waypoints */ // @ApiMember(Description="Were there any validation issues for any waypoints") public WaypointIssue: boolean; /** @description The total distance for the order */ // @ApiMember(Description="The total distance for the order") public TotalDistance: number; /** @description The total distance for the order, formatted as a string */ // @ApiMember(Description="The total distance for the order, formatted as a string") public TotalDistanceValue: string; /** @description The date and time the order is scheduled for in ISO 8601 string format, will be set if IsScheduled is true */ // @ApiMember(Description="The date and time the order is scheduled for in ISO 8601 string format, will be set if IsScheduled is true") public ScheduledDate: string; /** @description The subtotal of the order before VAT */ // @ApiMember(Description="The subtotal of the order before VAT") public SubTotal: string; /** @description The total of the order after VAT */ // @ApiMember(Description="The total of the order after VAT") public FinalPrice: string; /** @description The amount of VAT */ // @ApiMember(Description="The amount of VAT ") public VATValue: string; /** @description Will contain a message if there a problem with a scheduled order */ // @ApiMember(Description="Will contain a message if there a problem with a scheduled order") public SchedulingNotice: string; /** @description Will contain a message if there is a problem with a scheduled quote, if the order is scheduled to soon to opening times */ // @ApiMember(Description="Will contain a message if there is a problem with a scheduled quote, if the order is scheduled to soon to opening times") public SchedulingError: string; /** @description User friendly waybill number */ // @ApiMember(Description="User friendly waybill number") public WayBill: string; /** @description List of order information for pricing etc between each waypoint */ // @ApiMember(Description="List of order information for pricing etc between each waypoint") public Waypoints: WaypointQuoteInformation[]; /** @description List with validation information for each waypoint */ // @ApiMember(Description="List with validation information for each waypoint") public WaypointValidations: WaypointValidationInformation[]; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } // @Route("/order", "POST") export class PlaceOrder extends ApiServiceRequest implements IReturn, ILogRequest { /** @description Optionally provide your own reference identifier */ // @ApiMember(Description="Optionally provide your own reference identifier") public ClientReference: string; /** @description Optionally provide a reference for the customer/business */ // @ApiMember(Description="Optionally provide a reference for the customer/business") public CustomerReference: string; /** @description Array of waypoints */ // @ApiMember(Description="Array of waypoints", IsRequired=true) public Waypoints: RequestQuoteWaypoint[]; /** @description Is this a scheduled order? */ // @ApiMember(Description="Is this a scheduled order?", IsRequired=true) public IsScheduled: boolean; /** @description Specify the scheduling type, required if IsScheduled is true */ // @ApiMember(Description="Specify the scheduling type, required if IsScheduled is true") public ScheduleType: ScheduleType; /** @description Specify the scheduled date for this delivery in ISO 8601 string format, required if IsScheduled is true and ScheduleType is SpecificTime */ // @ApiMember(Description="Specify the scheduled date for this delivery in ISO 8601 string format, required if IsScheduled is true and ScheduleType is SpecificTime") public ScheduledDate: string; /** @description Set this to true to prevent creating an order and billing for it */ // @ApiMember(Description="Set this to true to prevent creating an order and billing for it", IsRequired=true) public Test: boolean; /** @description Is your account allows Urgent Orders, you can use this flag to indicate when an Order is urgent. */ // @ApiMember(Description="Is your account allows Urgent Orders, you can use this flag to indicate when an Order is urgent.") public IsUrgent: boolean; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'PlaceOrder'; } public getMethod() { return 'POST'; } public createResponse() { return new PlaceOrderResponse(); } }