/* Options: Date: 2025-12-06 06:37:59 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.1fetch.co.za //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: RequestQuote.* //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 RequestQuoteResponse extends ApiServiceResponse { /** @description Is there an issue for the waypoints details specified? */ // @ApiMember(Description="Is there an issue for the waypoints details specified?") public WaypointIssue: boolean; /** @description Is the quote created successfully and ready to be placed as an order? */ // @ApiMember(Description="Is the quote created successfully and ready to be placed as an order?") public QuoteReady: boolean; /** @description Is the quote expired? */ // @ApiMember(Description="Is the quote expired?") public QuoteExpired: boolean; /** @description The total distance for the quote */ // @ApiMember(Description="The total distance for the quote") public TotalDistance: number; /** @description The total distance for the quote, formatted as a string */ // @ApiMember(Description="The total distance for the quote, 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 might be a problem with a scheduled quote */ // @ApiMember(Description="Will contain a message if there might be a problem with a scheduled quote") 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 The ID of the generated quote, needed when you want to change this quote later */ // @ApiMember(Description="The ID of the generated quote, needed when you want to change this quote later") public QuoteId: string; /** @description User friendly waybill number */ // @ApiMember(Description="User friendly waybill number") public WayBill: string; /** @description The date this order was created */ // @ApiMember(Description="The date this order was created") public DateCreated: string; /** @description The date this quote was last changed */ // @ApiMember(Description="The date this quote was last changed") public LastUpdated: string; /** @description List of quote information for pricing etc between each waypoint */ // @ApiMember(Description="List of quote 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("/quote", "POST") export class RequestQuote extends ApiServiceRequest implements IReturn, ILogRequest { /** @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 Specify a quote Id to amend a quote. Required when amending an existing quote. */ // @ApiMember(Description="Specify a quote Id to amend a quote. Required when amending an existing quote.") public QuoteId: string; /** @description Set this to true to prevent creating the quote */ // @ApiMember(Description="Set this to true to prevent creating the quote", IsRequired=true) public Test: boolean; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'RequestQuote'; } public getMethod() { return 'POST'; } public createResponse() { return new RequestQuoteResponse(); } }