/* Options: Date: 2025-12-06 06:18:22 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://1fetch.api.client.prod.86degrees.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: Order.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class ApiServiceRequest implements IServiceRequest, IHasApiKey, IConvertible { /** * The API Key required for authentication */ // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true) String? ApiKey; ApiServiceRequest({this.ApiKey}); ApiServiceRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ApiKey = json['ApiKey']; return this; } Map toJson() => { 'ApiKey': ApiKey }; getTypeName() => "ApiServiceRequest"; TypeContext? context = _ctx; } abstract class IServiceRequest { } abstract class IHasApiKey { String? ApiKey; } abstract class ILogRequest { } class OrderStatus { static const OrderStatus AwaitingPayment = const OrderStatus._(0); static const OrderStatus ProcessingPayment = const OrderStatus._(1); static const OrderStatus AwaitingDispatch = const OrderStatus._(2); static const OrderStatus DriverDispatched = const OrderStatus._(3); static const OrderStatus PackageEnRoute = const OrderStatus._(4); static const OrderStatus Completed = const OrderStatus._(5); static const OrderStatus Cancelled = const OrderStatus._(6); static const OrderStatus DeliveryFailed = const OrderStatus._(7); final int _value; const OrderStatus._(this._value); int get value => _value; static List get values => const [AwaitingPayment,ProcessingPayment,AwaitingDispatch,DriverDispatched,PackageEnRoute,Completed,Cancelled,DeliveryFailed]; } class ScanDetail implements IConvertible { /** * List of URLs for images captured at the waypoint */ // @ApiMember(Description="List of URLs for images captured at the waypoint") List? PhotoUrls; /** * List of URLs for images of signatures captured at the waypoint */ // @ApiMember(Description="List of URLs for images of signatures captured at the waypoint") List? SignatureUrls; /** * Name of person the driver interacted with at the waypoint */ // @ApiMember(Description="Name of person the driver interacted with at the waypoint") String? ReceivedBy; /** * The date the driver interacted with the person */ // @ApiMember(Description="The date the driver interacted with the person") String? ReceivedDate; /** * Number of packages collected by the driver */ // @ApiMember(Description="Number of packages collected by the driver") int? PackagesCollected; ScanDetail({this.PhotoUrls,this.SignatureUrls,this.ReceivedBy,this.ReceivedDate,this.PackagesCollected}); ScanDetail.fromJson(Map json) { fromMap(json); } fromMap(Map json) { PhotoUrls = JsonConverters.fromJson(json['PhotoUrls'],'List',context!); SignatureUrls = JsonConverters.fromJson(json['SignatureUrls'],'List',context!); ReceivedBy = json['ReceivedBy']; ReceivedDate = json['ReceivedDate']; PackagesCollected = json['PackagesCollected']; return this; } Map toJson() => { 'PhotoUrls': JsonConverters.toJson(PhotoUrls,'List',context!), 'SignatureUrls': JsonConverters.toJson(SignatureUrls,'List',context!), 'ReceivedBy': ReceivedBy, 'ReceivedDate': ReceivedDate, 'PackagesCollected': PackagesCollected }; getTypeName() => "ScanDetail"; TypeContext? context = _ctx; } class OrderItemWaypoint implements IConvertible { /** * Has the driver completed this waypoint */ // @ApiMember(Description="Has the driver completed this waypoint") bool? Completed; double? Latitude; double? Longitude; String? Address; String? ContactName; String? ContactNumber; String? DeliveryInstructions; /** * Details captured at waypoint */ // @ApiMember(Description="Details captured at waypoint") ScanDetail? ScanDetail; OrderItemWaypoint({this.Completed,this.Latitude,this.Longitude,this.Address,this.ContactName,this.ContactNumber,this.DeliveryInstructions,this.ScanDetail}); OrderItemWaypoint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Completed = json['Completed']; Latitude = JsonConverters.toDouble(json['Latitude']); Longitude = JsonConverters.toDouble(json['Longitude']); Address = json['Address']; ContactName = json['ContactName']; ContactNumber = json['ContactNumber']; DeliveryInstructions = json['DeliveryInstructions']; ScanDetail = JsonConverters.fromJson(json['ScanDetail'],'ScanDetail',context!); return this; } Map toJson() => { 'Completed': Completed, 'Latitude': Latitude, 'Longitude': Longitude, 'Address': Address, 'ContactName': ContactName, 'ContactNumber': ContactNumber, 'DeliveryInstructions': DeliveryInstructions, 'ScanDetail': JsonConverters.toJson(ScanDetail,'ScanDetail',context!) }; getTypeName() => "OrderItemWaypoint"; TypeContext? context = _ctx; } class OrderTransitPoint implements IConvertible { /** * Origin waypoint number */ // @ApiMember(Description="Origin waypoint number") int? FromWaypointNumber; /** * Destination waypoint number */ // @ApiMember(Description="Destination waypoint number") int? ToWaypointNumber; /** * Distance between waypoints */ // @ApiMember(Description="Distance between waypoints") double? Distance; /** * Distance between waypoints rounded and converted to a string */ // @ApiMember(Description="Distance between waypoints rounded and converted to a string") String? DistanceValue; /** * Price calculated between waypoints */ // @ApiMember(Description="Price calculated between waypoints") double? Price; /** * Price calculated between waypoints formatted as ZA currency */ // @ApiMember(Description="Price calculated between waypoints formatted as ZA currency") String? PriceValue; OrderTransitPoint({this.FromWaypointNumber,this.ToWaypointNumber,this.Distance,this.DistanceValue,this.Price,this.PriceValue}); OrderTransitPoint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { FromWaypointNumber = json['FromWaypointNumber']; ToWaypointNumber = json['ToWaypointNumber']; Distance = JsonConverters.toDouble(json['Distance']); DistanceValue = json['DistanceValue']; Price = JsonConverters.toDouble(json['Price']); PriceValue = json['PriceValue']; return this; } Map toJson() => { 'FromWaypointNumber': FromWaypointNumber, 'ToWaypointNumber': ToWaypointNumber, 'Distance': Distance, 'DistanceValue': DistanceValue, 'Price': Price, 'PriceValue': PriceValue }; getTypeName() => "OrderTransitPoint"; TypeContext? context = _ctx; } class EventDetail implements IConvertible { String? Description; String? Time; DateTime? EventDateTime; EventDetail({this.Description,this.Time,this.EventDateTime}); EventDetail.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Description = json['Description']; Time = json['Time']; EventDateTime = JsonConverters.fromJson(json['EventDateTime'],'DateTime',context!); return this; } Map toJson() => { 'Description': Description, 'Time': Time, 'EventDateTime': JsonConverters.toJson(EventDateTime,'DateTime',context!) }; getTypeName() => "EventDetail"; TypeContext? context = _ctx; } class OrderDetail implements IConvertible { /** * ID of quote attached to the order */ // @ApiMember(Description="ID of quote attached to the order") String? QuoteId; /** * ID of order */ // @ApiMember(Description="ID of order") String? OrderId; /** * User friendly order identifier */ // @ApiMember(Description="User friendly order identifier") String? Waybill; /** * Invoice number for the order */ // @ApiMember(Description="Invoice number for the order") String? InvoiceNumber; /** * 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") String? ScheduledDate; /** * Order status number */ // @ApiMember(Description="Order status number") OrderStatus? OrderStatus; /** * String value of order status */ // @ApiMember(Description="String value of order status") String? OrderStatusValue; /** * List of waypoints for this order */ // @ApiMember(Description="List of waypoints for this order") List? Waypoints; /** * List of sections between waypoints */ // @ApiMember(Description="List of sections between waypoints") List? TransitPoints; /** * Order Final price including VAT */ // @ApiMember(Description="Order Final price including VAT") double? FinalPrice; /** * Final price formatted as ZA currency */ // @ApiMember(Description="Final price formatted as ZA currency") String? FinalPriceValue; /** * Total distance for the order in km */ // @ApiMember(Description="Total distance for the order in km") double? TotalDistance; /** * Total distance for the order formatted as a string */ // @ApiMember(Description="Total distance for the order formatted as a string") String? TotalDistanceValue; /** * Date order was placed */ // @ApiMember(Description="Date order was placed") String? Date; /** * 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") String? EncodedPolyPath; /** * 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") List? Events; OrderDetail({this.QuoteId,this.OrderId,this.Waybill,this.InvoiceNumber,this.ScheduledDate,this.OrderStatus,this.OrderStatusValue,this.Waypoints,this.TransitPoints,this.FinalPrice,this.FinalPriceValue,this.TotalDistance,this.TotalDistanceValue,this.Date,this.EncodedPolyPath,this.Events}); OrderDetail.fromJson(Map json) { fromMap(json); } fromMap(Map json) { QuoteId = json['QuoteId']; OrderId = json['OrderId']; Waybill = json['Waybill']; InvoiceNumber = json['InvoiceNumber']; ScheduledDate = json['ScheduledDate']; OrderStatus = JsonConverters.fromJson(json['OrderStatus'],'OrderStatus',context!); OrderStatusValue = json['OrderStatusValue']; Waypoints = JsonConverters.fromJson(json['Waypoints'],'List',context!); TransitPoints = JsonConverters.fromJson(json['TransitPoints'],'List',context!); FinalPrice = JsonConverters.toDouble(json['FinalPrice']); FinalPriceValue = json['FinalPriceValue']; TotalDistance = JsonConverters.toDouble(json['TotalDistance']); TotalDistanceValue = json['TotalDistanceValue']; Date = json['Date']; EncodedPolyPath = json['EncodedPolyPath']; Events = JsonConverters.fromJson(json['Events'],'List',context!); return this; } Map toJson() => { 'QuoteId': QuoteId, 'OrderId': OrderId, 'Waybill': Waybill, 'InvoiceNumber': InvoiceNumber, 'ScheduledDate': ScheduledDate, 'OrderStatus': JsonConverters.toJson(OrderStatus,'OrderStatus',context!), 'OrderStatusValue': OrderStatusValue, 'Waypoints': JsonConverters.toJson(Waypoints,'List',context!), 'TransitPoints': JsonConverters.toJson(TransitPoints,'List',context!), 'FinalPrice': FinalPrice, 'FinalPriceValue': FinalPriceValue, 'TotalDistance': TotalDistance, 'TotalDistanceValue': TotalDistanceValue, 'Date': Date, 'EncodedPolyPath': EncodedPolyPath, 'Events': JsonConverters.toJson(Events,'List',context!) }; getTypeName() => "OrderDetail"; TypeContext? context = _ctx; } class ApiServiceResponse implements IServiceResponse, IConvertible { /** * Information about the response. */ // @ApiMember(Description="Information about the response.", IsRequired=true) String? Description; /** * Heading or summary of the response. */ // @ApiMember(Description="Heading or summary of the response.", IsRequired=true) String? Heading; /** * Did the intended operation for this response complete successfully? */ // @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true) bool? WasSuccessful; ApiServiceResponse({this.Description,this.Heading,this.WasSuccessful}); ApiServiceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Description = json['Description']; Heading = json['Heading']; WasSuccessful = json['WasSuccessful']; return this; } Map toJson() => { 'Description': Description, 'Heading': Heading, 'WasSuccessful': WasSuccessful }; getTypeName() => "ApiServiceResponse"; TypeContext? context = _ctx; } class OrderResponse extends ApiServiceResponse implements IConvertible { /** * 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") List? OrderItems; /** * Total number of items in order collection */ // @ApiMember(Description="Total number of items in order collection") int? TotalCount; /** * Used to indicate if there are more items available */ // @ApiMember(Description="Used to indicate if there are more items available") bool? LastPage; OrderResponse({this.OrderItems,this.TotalCount,this.LastPage}); OrderResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); OrderItems = JsonConverters.fromJson(json['OrderItems'],'List',context!); TotalCount = json['TotalCount']; LastPage = json['LastPage']; return this; } Map toJson() => super.toJson()..addAll({ 'OrderItems': JsonConverters.toJson(OrderItems,'List',context!), 'TotalCount': TotalCount, 'LastPage': LastPage }); getTypeName() => "OrderResponse"; TypeContext? context = _ctx; } // @Route("/order", "GET") class Order extends ApiServiceRequest implements IReturn, ILogRequest, IConvertible, IGet { /** * The ID if getting specific order */ // @ApiMember(Description="The ID if getting specific order") String? OrderId; /** * The amount of elements to offset the index by */ // @ApiMember(Description="The amount of elements to offset the index by") int? Offset; /** * The number of elements to be returned, defaults to 10 */ // @ApiMember(Description="The number of elements to be returned, defaults to 10") int? Count; Order({this.OrderId,this.Offset,this.Count}); Order.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); OrderId = json['OrderId']; Offset = json['Offset']; Count = json['Count']; return this; } Map toJson() => super.toJson()..addAll({ 'OrderId': OrderId, 'Offset': Offset, 'Count': Count }); createResponse() => OrderResponse(); getResponseTypeName() => "OrderResponse"; getTypeName() => "Order"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: '1fetch.api.client.prod.86degrees.com', types: { 'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()), 'IServiceRequest': TypeInfo(TypeOf.Interface), 'IHasApiKey': TypeInfo(TypeOf.Interface), 'ILogRequest': TypeInfo(TypeOf.Interface), 'OrderStatus': TypeInfo(TypeOf.Enum, enumValues:OrderStatus.values), 'ScanDetail': TypeInfo(TypeOf.Class, create:() => ScanDetail()), 'OrderItemWaypoint': TypeInfo(TypeOf.Class, create:() => OrderItemWaypoint()), 'OrderTransitPoint': TypeInfo(TypeOf.Class, create:() => OrderTransitPoint()), 'EventDetail': TypeInfo(TypeOf.Class, create:() => EventDetail()), 'OrderDetail': TypeInfo(TypeOf.Class, create:() => OrderDetail()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()), 'OrderResponse': TypeInfo(TypeOf.Class, create:() => OrderResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'Order': TypeInfo(TypeOf.Class, create:() => Order()), });