' Options: 'Date: 2025-12-06 06:45:16 'Version: 8.0 'Tip: To override a DTO option, remove "''" prefix before updating 'BaseUrl: https://api.1fetch.co.za ' '''GlobalNamespace: '''MakePartial: True '''MakeVirtual: True '''MakeDataContractsExtensible: False '''AddReturnMarker: True '''AddDescriptionAsComments: True '''AddDataContractAttributes: False '''AddIndexesToDataMembers: False '''AddGeneratedCodeAttributes: False '''AddResponseStatus: False '''AddImplicitVersion: '''InitializeCollections: True '''ExportValueTypes: False 'IncludeTypes: Order.* '''ExcludeTypes: '''AddNamespaces: '''AddDefaultXmlNamespace: http://schemas.servicestack.net/types Imports System Imports System.Collections Imports System.Collections.Generic Imports System.Runtime.Serialization Imports ServiceStack Imports ServiceStack.DataAnnotations Imports WebService.ClientServiceModel.Base Imports CommonService.Api.Operations.Base Imports CommonService.Api.Operations Imports WebService.ClientServiceModel Imports BusinessLogic.Entities Namespace Global Namespace BusinessLogic.Entities Public Enum OrderStatus AwaitingPayment = 0 ProcessingPayment = 1 AwaitingDispatch = 2 DriverDispatched = 3 PackageEnRoute = 4 Completed = 5 Cancelled = 6 DeliveryFailed = 7 End Enum End Namespace Namespace CommonService.Api.Operations Public Interface IHasApiKey Property ApiKey As String End Interface Public Interface ILogRequest End Interface End Namespace Namespace CommonService.Api.Operations.Base Public Interface IServiceRequest End Interface End Namespace Namespace WebService.ClientServiceModel Public Partial Class EventDetail Public Overridable Property Description As String Public Overridable Property Time As String Public Overridable Property EventDateTime As Date End Class Public Partial Class Order Inherits ApiServiceRequest Implements IReturn(Of OrderResponse) Implements ILogRequest ''' '''The ID if getting specific order ''' Public Overridable Property OrderId As String ''' '''The amount of elements to offset the index by ''' Public Overridable Property Offset As Integer ''' '''The number of elements to be returned, defaults to 10 ''' Public Overridable Property Count As Integer End Class Public Partial Class OrderDetail Public Sub New() Waypoints = New List(Of OrderItemWaypoint) TransitPoints = New List(Of OrderTransitPoint) Events = New List(Of EventDetail) End Sub ''' '''ID of quote attached to the order ''' Public Overridable Property QuoteId As Guid ''' '''ID of order ''' Public Overridable Property OrderId As Guid ''' '''User friendly order identifier ''' Public Overridable Property Waybill As String ''' '''Invoice number for the order ''' Public Overridable Property InvoiceNumber As String ''' '''The date and time the order is scheduled for in ISO 8601 string format, will be set if IsScheduled is true ''' Public Overridable Property ScheduledDate As String ''' '''Order status number ''' Public Overridable Property OrderStatus As OrderStatus ''' '''String value of order status ''' Public Overridable Property OrderStatusValue As String ''' '''List of waypoints for this order ''' Public Overridable Property Waypoints As List(Of OrderItemWaypoint) ''' '''List of sections between waypoints ''' Public Overridable Property TransitPoints As List(Of OrderTransitPoint) ''' '''Order Final price including VAT ''' Public Overridable Property FinalPrice As Decimal ''' '''Final price formatted as ZA currency ''' Public Overridable Property FinalPriceValue As String ''' '''Total distance for the order in km ''' Public Overridable Property TotalDistance As Double ''' '''Total distance for the order formatted as a string ''' Public Overridable Property TotalDistanceValue As String ''' '''Date order was placed ''' Public Overridable Property [Date] As String ''' '''Google encoded maps polyline path for drawing route on a google map ''' Public Overridable Property EncodedPolyPath As String ''' '''List of events as they occurred while the order was in progress ''' Public Overridable Property Events As List(Of EventDetail) End Class Public Partial Class OrderItemWaypoint ''' '''Has the driver completed this waypoint ''' Public Overridable Property Completed As Boolean Public Overridable Property Latitude As Double Public Overridable Property Longitude As Double Public Overridable Property Address As String Public Overridable Property ContactName As String Public Overridable Property ContactNumber As String Public Overridable Property DeliveryInstructions As String ''' '''Details captured at waypoint ''' Public Overridable Property ScanDetail As ScanDetail End Class Public Partial Class OrderResponse Inherits ApiServiceResponse Public Sub New() OrderItems = New List(Of OrderDetail) End Sub ''' '''List with order details, will only contain one item if requested with order id ''' Public Overridable Property OrderItems As List(Of OrderDetail) ''' '''Total number of items in order collection ''' Public Overridable Property TotalCount As Integer ''' '''Used to indicate if there are more items available ''' Public Overridable Property LastPage As Boolean End Class Public Partial Class OrderTransitPoint ''' '''Origin waypoint number ''' Public Overridable Property FromWaypointNumber As Integer ''' '''Destination waypoint number ''' Public Overridable Property ToWaypointNumber As Integer ''' '''Distance between waypoints ''' Public Overridable Property Distance As Double ''' '''Distance between waypoints rounded and converted to a string ''' Public Overridable Property DistanceValue As String ''' '''Price calculated between waypoints ''' Public Overridable Property Price As Decimal ''' '''Price calculated between waypoints formatted as ZA currency ''' Public Overridable Property PriceValue As String End Class Public Partial Class ScanDetail Public Sub New() PhotoUrls = New List(Of String) SignatureUrls = New List(Of String) End Sub ''' '''List of URLs for images captured at the waypoint ''' Public Overridable Property PhotoUrls As List(Of String) ''' '''List of URLs for images of signatures captured at the waypoint ''' Public Overridable Property SignatureUrls As List(Of String) ''' '''Name of person the driver interacted with at the waypoint ''' Public Overridable Property ReceivedBy As String ''' '''The date the driver interacted with the person ''' Public Overridable Property ReceivedDate As String ''' '''Number of packages collected by the driver ''' Public Overridable Property PackagesCollected As Integer End Class End Namespace Namespace WebService.ClientServiceModel.Base Public Partial Class ApiServiceRequest Implements IServiceRequest Implements IHasApiKey ''' '''The API Key required for authentication ''' Public Overridable Property ApiKey As String End Class Public Partial Class ApiServiceResponse Implements IServiceResponse ''' '''Information about the response. ''' Public Overridable Property Description As String ''' '''Heading or summary of the response. ''' Public Overridable Property Heading As String ''' '''Did the intended operation for this response complete successfully? ''' Public Overridable Property WasSuccessful As Boolean End Class End Namespace End Namespace