/* 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: Order.* //ExcludeTypes: //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.* */ import java.math.* import java.util.* import net.servicestack.client.* @Route(Path="/order", Verbs="GET") open class Order : ApiServiceRequest(), IReturn, ILogRequest { /** * The ID if getting specific order */ @ApiMember(Description="The ID if getting specific order") var OrderId:String? = null /** * The amount of elements to offset the index by */ @ApiMember(Description="The amount of elements to offset the index by") var Offset:Int? = null /** * The number of elements to be returned, defaults to 10 */ @ApiMember(Description="The number of elements to be returned, defaults to 10") var Count:Int? = null companion object { private val responseType = OrderResponse::class.java } override fun getResponseType(): Any? = Order.responseType } open class OrderResponse : ApiServiceResponse() { /** * List with order details, will only contain one item if requested with order id */ @ApiMember(Description="List with order details, will only contain one item if requested with order id") var OrderItems:ArrayList = ArrayList() /** * Total number of items in order collection */ @ApiMember(Description="Total number of items in order collection") var TotalCount:Int? = null /** * Used to indicate if there are more items available */ @ApiMember(Description="Used to indicate if there are more items available") var LastPage:Boolean? = null } 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 OrderDetail { /** * ID of quote attached to the order */ @ApiMember(Description="ID of quote attached to the order") var QuoteId:UUID? = null /** * ID of order */ @ApiMember(Description="ID of order") var OrderId:UUID? = null /** * User friendly order identifier */ @ApiMember(Description="User friendly order identifier") var Waybill:String? = null /** * Invoice number for the order */ @ApiMember(Description="Invoice number for the order") var InvoiceNumber: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 /** * Order status number */ @ApiMember(Description="Order status number") var OrderStatus:OrderStatus? = null /** * String value of order status */ @ApiMember(Description="String value of order status") var OrderStatusValue:String? = null /** * List of waypoints for this order */ @ApiMember(Description="List of waypoints for this order") var Waypoints:ArrayList = ArrayList() /** * List of sections between waypoints */ @ApiMember(Description="List of sections between waypoints") var TransitPoints:ArrayList = ArrayList() /** * Order Final price including VAT */ @ApiMember(Description="Order Final price including VAT") var FinalPrice:BigDecimal? = null /** * Final price formatted as ZA currency */ @ApiMember(Description="Final price formatted as ZA currency") var FinalPriceValue:String? = null /** * Total distance for the order in km */ @ApiMember(Description="Total distance for the order in km") var TotalDistance:Double? = null /** * Total distance for the order formatted as a string */ @ApiMember(Description="Total distance for the order formatted as a string") var TotalDistanceValue:String? = null /** * Date order was placed */ @ApiMember(Description="Date order was placed") var Date:String? = null /** * Google encoded maps polyline path for drawing route on a google map */ @ApiMember(Description="Google encoded maps polyline path for drawing route on a google map") var EncodedPolyPath:String? = null /** * List of events as they occurred while the order was in progress */ @ApiMember(Description="List of events as they occurred while the order was in progress") var Events:ArrayList = ArrayList() } enum class OrderStatus(val value:Int) { @SerializedName("0") AwaitingPayment(0), @SerializedName("1") ProcessingPayment(1), @SerializedName("2") AwaitingDispatch(2), @SerializedName("3") DriverDispatched(3), @SerializedName("4") PackageEnRoute(4), @SerializedName("5") Completed(5), @SerializedName("6") Cancelled(6), @SerializedName("7") DeliveryFailed(7), } open class OrderItemWaypoint { /** * Has the driver completed this waypoint */ @ApiMember(Description="Has the driver completed this waypoint") var Completed:Boolean? = null var Latitude:Double? = null var Longitude:Double? = null var Address:String? = null var ContactName:String? = null var ContactNumber:String? = null var DeliveryInstructions:String? = null /** * Details captured at waypoint */ @ApiMember(Description="Details captured at waypoint") var ScanDetail:ScanDetail? = null } open class OrderTransitPoint { /** * Origin waypoint number */ @ApiMember(Description="Origin waypoint number") var FromWaypointNumber:Int? = null /** * Destination waypoint number */ @ApiMember(Description="Destination waypoint number") var ToWaypointNumber:Int? = null /** * Distance between waypoints */ @ApiMember(Description="Distance between waypoints") var Distance:Double? = null /** * Distance between waypoints rounded and converted to a string */ @ApiMember(Description="Distance between waypoints rounded and converted to a string") var DistanceValue:String? = null /** * Price calculated between waypoints */ @ApiMember(Description="Price calculated between waypoints") var Price:BigDecimal? = null /** * Price calculated between waypoints formatted as ZA currency */ @ApiMember(Description="Price calculated between waypoints formatted as ZA currency") var PriceValue:String? = null } open class EventDetail { var Description:String? = null var Time:String? = null var EventDateTime:Date? = null } open class ScanDetail { /** * List of URLs for images captured at the waypoint */ @ApiMember(Description="List of URLs for images captured at the waypoint") var PhotoUrls:ArrayList = ArrayList() /** * List of URLs for images of signatures captured at the waypoint */ @ApiMember(Description="List of URLs for images of signatures captured at the waypoint") var SignatureUrls:ArrayList = ArrayList() /** * Name of person the driver interacted with at the waypoint */ @ApiMember(Description="Name of person the driver interacted with at the waypoint") var ReceivedBy:String? = null /** * The date the driver interacted with the person */ @ApiMember(Description="The date the driver interacted with the person") var ReceivedDate:String? = null /** * Number of packages collected by the driver */ @ApiMember(Description="Number of packages collected by the driver") var PackagesCollected:Int? = 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 }