/* Options: Date: 2025-12-06 06:17:15 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://1fetch.api.client.prod.86degrees.com //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: RequestQuote.* //ExcludeTypes: //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.* */ import java.math.* import java.util.* import net.servicestack.client.* @Route(Path="/quote", Verbs="POST") open class RequestQuote : ApiServiceRequest(), IReturn, ILogRequest { /** * Array of waypoints */ @ApiMember(Description="Array of waypoints", IsRequired=true) var Waypoints:ArrayList = ArrayList() /** * Is this a scheduled order? */ @ApiMember(Description="Is this a scheduled order?", IsRequired=true) var IsScheduled:Boolean? = null /** * Specify the scheduling type, required if IsScheduled is true */ @ApiMember(Description="Specify the scheduling type, required if IsScheduled is true") var ScheduleType:ScheduleType? = null /** * 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") var ScheduledDate:String? = null /** * 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.") var QuoteId:UUID? = null /** * Set this to true to prevent creating the quote */ @ApiMember(Description="Set this to true to prevent creating the quote", IsRequired=true) var Test:Boolean? = null companion object { private val responseType = RequestQuoteResponse::class.java } override fun getResponseType(): Any? = RequestQuote.responseType } open class RequestQuoteResponse : ApiServiceResponse() { /** * Is there an issue for the waypoints details specified? */ @ApiMember(Description="Is there an issue for the waypoints details specified?") var WaypointIssue:Boolean? = null /** * 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?") var QuoteReady:Boolean? = null /** * Is the quote expired? */ @ApiMember(Description="Is the quote expired?") var QuoteExpired:Boolean? = null /** * The total distance for the quote */ @ApiMember(Description="The total distance for the quote") var TotalDistance:Double? = null /** * The total distance for the quote, formatted as a string */ @ApiMember(Description="The total distance for the quote, formatted as a string") var TotalDistanceValue:String? = null /** * 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") var ScheduledDate:String? = null /** * The subtotal of the order before VAT */ @ApiMember(Description="The subtotal of the order before VAT") var SubTotal:String? = null /** * The total of the order after VAT */ @ApiMember(Description="The total of the order after VAT") var FinalPrice:String? = null /** * The amount of VAT */ @ApiMember(Description="The amount of VAT ") var VATValue:String? = null /** * 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") var SchedulingNotice:String? = null /** * 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") var SchedulingError:String? = null /** * 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") var QuoteId:UUID? = null /** * User friendly waybill number */ @ApiMember(Description="User friendly waybill number") var WayBill:String? = null /** * The date this order was created */ @ApiMember(Description="The date this order was created") var DateCreated:String? = null /** * The date this quote was last changed */ @ApiMember(Description="The date this quote was last changed") var LastUpdated:String? = null /** * List of quote information for pricing etc between each waypoint */ @ApiMember(Description="List of quote information for pricing etc between each waypoint") var Waypoints:ArrayList = ArrayList() /** * List with validation information for each waypoint */ @ApiMember(Description="List with validation information for each waypoint") var WaypointValidations:ArrayList = ArrayList() } open class ApiServiceRequest : IServiceRequest, IHasApiKey { /** * The API Key required for authentication */ @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true) var ApiKey:String? = null } open interface IServiceRequest { } open interface IHasApiKey { var ApiKey:String? } open interface ILogRequest { } open class RequestQuoteWaypoint : IRequestWaypoint { /** * Number of waypoint for ordering */ @ApiMember(Description="Number of waypoint for ordering", IsRequired=true) var WaypointNumber:Int? = null /** * Waypoint Latitude */ @ApiMember(Description="Waypoint Latitude", IsRequired=true) var Latitude:Double? = null /** * Waypoint Longitude */ @ApiMember(Description="Waypoint Longitude", IsRequired=true) var Longitude:Double? = null /** * Name of contact person at waypoint */ @ApiMember(Description="Name of contact person at waypoint", IsRequired=true) var ContactName:String? = null /** * Telephone number of contact person at waypoint */ @ApiMember(Description="Telephone number of contact person at waypoint", IsRequired=true) var ContactNumber:String? = null /** * Instructions for driver to follow at waypoint */ @ApiMember(Description="Instructions for driver to follow at waypoint", IsRequired=true) var DeliveryInstructions:String? = null /** * Waypoint address */ @ApiMember(Description="Waypoint address", IsRequired=true) var Address:String? = null } enum class ScheduleType(val value:Int) { @SerializedName("0") NextAvailable(0), @SerializedName("1") SpecificTime(1), } open class WaypointQuoteInformation : LinkedWaypoint() { /** * Distance between waypoints as a number */ @ApiMember(Description="Distance between waypoints as a number") var Distance:Double? = null /** * String formatted distance */ @ApiMember(Description="String formatted distance") var DistanceValue:String? = null var WaypointValid:Boolean? = null var Message:String? = null var ErrorDetails:ArrayList = ArrayList() /** * Caculated price between waypoints excluding vat */ @ApiMember(Description="Caculated price between waypoints excluding vat") var Price:BigDecimal? = null /** * Price excluding vat formatted as a string rand value */ @ApiMember(Description="Price excluding vat formatted as a string rand value") var PriceValue:String? = null /** * The price between waypoints including vat */ @ApiMember(Description="The price between waypoints including vat") var PriceWithVAT:BigDecimal? = null /** * The price including vat formatted as a rand value string */ @ApiMember(Description="The price including vat formatted as a rand value string") var PriceValueWithVAT:String? = null } open class WaypointValidationInformation { var WaypointNumber:Int? = null var IsValid:Boolean? = null var ErrorMessages:ArrayList = ArrayList() } open interface IRequestWaypoint { var Latitude:Double? var Longitude:Double? var WaypointNumber:Int? var ContactName:String? var ContactNumber:String? var DeliveryInstructions:String? var Address:String? } open class LinkedWaypoint { var FromWaypointNumber:Int? = null var ToWaypointNumber:Int? = null var FromLatitude:Double? = null var FromLongitude:Double? = null var ToLatitude:Double? = null var ToLongitude:Double? = null } open class ApiServiceResponse : IServiceResponse { /** * Information about the response. */ @ApiMember(Description="Information about the response.", IsRequired=true) var Description:String? = null /** * Heading or summary of the response. */ @ApiMember(Description="Heading or summary of the response.", IsRequired=true) var Heading:String? = null /** * Did the intended operation for this response complete successfully? */ @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true) var WasSuccessful:Boolean? = null }