' Options: 'Date: 2025-12-06 06:45:48 '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: PlaceOrder.* '''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 Interface IRequestWaypoint Property Latitude As Double Property Longitude As Double Property WaypointNumber As Integer Property ContactName As String Property ContactNumber As String Property DeliveryInstructions As String Property Address As String End Interface Public Partial Class LinkedWaypoint Public Overridable Property FromWaypointNumber As Integer Public Overridable Property ToWaypointNumber As Integer Public Overridable Property FromLatitude As Double Public Overridable Property FromLongitude As Double Public Overridable Property ToLatitude As Double Public Overridable Property ToLongitude As Double End Class 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 PlaceOrder Inherits ApiServiceRequest Implements IReturn(Of PlaceOrderResponse) Implements ILogRequest Public Sub New() Waypoints = New List(Of RequestQuoteWaypoint) End Sub ''' '''Optionally provide your own reference identifier ''' Public Overridable Property ClientReference As String ''' '''Optionally provide a reference for the customer/business ''' Public Overridable Property CustomerReference As String ''' '''Array of waypoints ''' Public Overridable Property Waypoints As List(Of RequestQuoteWaypoint) ''' '''Is this a scheduled order? ''' Public Overridable Property IsScheduled As Boolean ''' '''Specify the scheduling type, required if IsScheduled is true ''' Public Overridable Property ScheduleType As ScheduleType ''' '''Specify the scheduled date for this delivery in ISO 8601 string format, required if IsScheduled is true and ScheduleType is SpecificTime ''' Public Overridable Property ScheduledDate As String ''' '''Set this to true to prevent creating an order and billing for it ''' Public Overridable Property Test As Boolean ''' '''Is your account allows Urgent Orders, you can use this flag to indicate when an Order is urgent. ''' Public Overridable Property IsUrgent As Boolean End Class Public Partial Class PlaceOrderResponse Inherits ApiServiceResponse Public Sub New() Waypoints = New List(Of WaypointQuoteInformation) WaypointValidations = New List(Of WaypointValidationInformation) End Sub ''' '''The ID of the order. ''' Public Overridable Property OrderId As Guid ''' '''Were there any validation issues for any waypoints ''' Public Overridable Property WaypointIssue As Boolean ''' '''The total distance for the order ''' Public Overridable Property TotalDistance As Double ''' '''The total distance for the order, formatted as a string ''' Public Overridable Property TotalDistanceValue 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 ''' '''The subtotal of the order before VAT ''' Public Overridable Property SubTotal As String ''' '''The total of the order after VAT ''' Public Overridable Property FinalPrice As String ''' '''The amount of VAT ''' Public Overridable Property VATValue As String ''' '''Will contain a message if there a problem with a scheduled order ''' Public Overridable Property SchedulingNotice As String ''' '''Will contain a message if there is a problem with a scheduled quote, if the order is scheduled to soon to opening times ''' Public Overridable Property SchedulingError As String ''' '''User friendly waybill number ''' Public Overridable Property WayBill As String ''' '''List of order information for pricing etc between each waypoint ''' Public Overridable Property Waypoints As List(Of WaypointQuoteInformation) ''' '''List with validation information for each waypoint ''' Public Overridable Property WaypointValidations As List(Of WaypointValidationInformation) End Class Public Partial Class RequestQuoteWaypoint Implements IRequestWaypoint ''' '''Number of waypoint for ordering ''' Public Overridable Property WaypointNumber As Integer ''' '''Waypoint Latitude ''' Public Overridable Property Latitude As Double ''' '''Waypoint Longitude ''' Public Overridable Property Longitude As Double ''' '''Name of contact person at waypoint ''' Public Overridable Property ContactName As String ''' '''Telephone number of contact person at waypoint ''' Public Overridable Property ContactNumber As String ''' '''Instructions for driver to follow at waypoint ''' Public Overridable Property DeliveryInstructions As String ''' '''Waypoint address ''' Public Overridable Property Address As String End Class Public Enum ScheduleType NextAvailable = 0 SpecificTime = 1 End Enum Public Partial Class WaypointQuoteInformation Inherits LinkedWaypoint Public Sub New() ErrorDetails = New List(Of String) End Sub ''' '''Distance between waypoints as a number ''' Public Overridable Property Distance As Double ''' '''String formatted distance ''' Public Overridable Property DistanceValue As String Public Overridable Property WaypointValid As Boolean Public Overridable Property Message As String Public Overridable Property ErrorDetails As List(Of String) ''' '''Caculated price between waypoints excluding vat ''' Public Overridable Property Price As Decimal ''' '''Price excluding vat formatted as a string rand value ''' Public Overridable Property PriceValue As String ''' '''The price between waypoints including vat ''' Public Overridable Property PriceWithVAT As Decimal ''' '''The price including vat formatted as a rand value string ''' Public Overridable Property PriceValueWithVAT As String End Class Public Partial Class WaypointValidationInformation Public Sub New() ErrorMessages = New List(Of String) End Sub Public Overridable Property WaypointNumber As Integer Public Overridable Property IsValid As Boolean Public Overridable Property ErrorMessages As List(Of String) 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