/* 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: PicUpCreateShipmentRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class IHasApiKey { String? ApiKey; } abstract class ILogRequest { } class BucketDetails implements IConvertible { // @DataMember(Name="delivery_date") DateTime? delivery_date; BucketDetails({this.delivery_date}); BucketDetails.fromJson(Map json) { fromMap(json); } fromMap(Map json) { delivery_date = JsonConverters.fromJson(json['DeliveryDate'],'DateTime',context!); return this; } Map toJson() => { 'delivery_date': JsonConverters.toJson(delivery_date,'DateTime',context!) }; getTypeName() => "BucketDetails"; TypeContext? context = _ctx; } class CourierRequest implements IConvertible { // @DataMember(Name="bucket_details") BucketDetails? bucket_details; // @DataMember(Name="shipments") List? shipments; CourierRequest({this.bucket_details,this.shipments}); CourierRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { bucket_details = JsonConverters.fromJson(json['BucketDetails'],'BucketDetails',context!); shipments = JsonConverters.fromJson(json['Shipments'],'List',context!); return this; } Map toJson() => { 'bucket_details': JsonConverters.toJson(bucket_details,'BucketDetails',context!), 'shipments': JsonConverters.toJson(shipments,'List',context!) }; getTypeName() => "CourierRequest"; TypeContext? context = _ctx; } class LinkedWaypoint implements IConvertible { int? FromWaypointNumber; int? ToWaypointNumber; double? FromLatitude; double? FromLongitude; double? ToLatitude; double? ToLongitude; LinkedWaypoint({this.FromWaypointNumber,this.ToWaypointNumber,this.FromLatitude,this.FromLongitude,this.ToLatitude,this.ToLongitude}); LinkedWaypoint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { FromWaypointNumber = json['FromWaypointNumber']; ToWaypointNumber = json['ToWaypointNumber']; FromLatitude = JsonConverters.toDouble(json['FromLatitude']); FromLongitude = JsonConverters.toDouble(json['FromLongitude']); ToLatitude = JsonConverters.toDouble(json['ToLatitude']); ToLongitude = JsonConverters.toDouble(json['ToLongitude']); return this; } Map toJson() => { 'FromWaypointNumber': FromWaypointNumber, 'ToWaypointNumber': ToWaypointNumber, 'FromLatitude': FromLatitude, 'FromLongitude': FromLongitude, 'ToLatitude': ToLatitude, 'ToLongitude': ToLongitude }; getTypeName() => "LinkedWaypoint"; TypeContext? context = _ctx; } class WaypointQuoteInformation extends LinkedWaypoint implements IConvertible { /** * Distance between waypoints as a number */ // @ApiMember(Description="Distance between waypoints as a number") double? Distance; /** * String formatted distance */ // @ApiMember(Description="String formatted distance") String? DistanceValue; bool? WaypointValid; String? Message; List? ErrorDetails; /** * Caculated price between waypoints excluding vat */ // @ApiMember(Description="Caculated price between waypoints excluding vat") double? Price; /** * Price excluding vat formatted as a string rand value */ // @ApiMember(Description="Price excluding vat formatted as a string rand value") String? PriceValue; /** * The price between waypoints including vat */ // @ApiMember(Description="The price between waypoints including vat") double? PriceWithVAT; /** * The price including vat formatted as a rand value string */ // @ApiMember(Description="The price including vat formatted as a rand value string") String? PriceValueWithVAT; WaypointQuoteInformation({this.Distance,this.DistanceValue,this.WaypointValid,this.Message,this.ErrorDetails,this.Price,this.PriceValue,this.PriceWithVAT,this.PriceValueWithVAT}); WaypointQuoteInformation.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Distance = JsonConverters.toDouble(json['Distance']); DistanceValue = json['DistanceValue']; WaypointValid = json['WaypointValid']; Message = json['Message']; ErrorDetails = JsonConverters.fromJson(json['ErrorDetails'],'List',context!); Price = JsonConverters.toDouble(json['Price']); PriceValue = json['PriceValue']; PriceWithVAT = JsonConverters.toDouble(json['PriceWithVAT']); PriceValueWithVAT = json['PriceValueWithVAT']; return this; } Map toJson() => super.toJson()..addAll({ 'Distance': Distance, 'DistanceValue': DistanceValue, 'WaypointValid': WaypointValid, 'Message': Message, 'ErrorDetails': JsonConverters.toJson(ErrorDetails,'List',context!), 'Price': Price, 'PriceValue': PriceValue, 'PriceWithVAT': PriceWithVAT, 'PriceValueWithVAT': PriceValueWithVAT }); getTypeName() => "WaypointQuoteInformation"; TypeContext? context = _ctx; } class WaypointValidationInformation implements IConvertible { int? WaypointNumber; bool? IsValid; List? ErrorMessages; WaypointValidationInformation({this.WaypointNumber,this.IsValid,this.ErrorMessages}); WaypointValidationInformation.fromJson(Map json) { fromMap(json); } fromMap(Map json) { WaypointNumber = json['WaypointNumber']; IsValid = json['IsValid']; ErrorMessages = JsonConverters.fromJson(json['ErrorMessages'],'List',context!); return this; } Map toJson() => { 'WaypointNumber': WaypointNumber, 'IsValid': IsValid, 'ErrorMessages': JsonConverters.toJson(ErrorMessages,'List',context!) }; getTypeName() => "WaypointValidationInformation"; TypeContext? context = _ctx; } class PicUpCreateShipmentResponse implements IConvertible { // @DataMember(Name="is_success") bool? is_success; // @DataMember(Name="courier_reference") String? courier_reference; // @DataMember(Name="error") String? error; /** * List of order information for pricing etc between each waypoint */ // @ApiMember(Description="List of order information for pricing etc between each waypoint") List? Waypoints; /** * List with validation information for each waypoint */ // @ApiMember(Description="List with validation information for each waypoint") List? WaypointValidations; /** * The 1Fetch Waybill reference for the shipment */ // @ApiMember(Description="The 1Fetch Waybill reference for the shipment") String? Waybill; PicUpCreateShipmentResponse({this.is_success,this.courier_reference,this.error,this.Waypoints,this.WaypointValidations,this.Waybill}); PicUpCreateShipmentResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { is_success = json['IsSuccess']; courier_reference = json['CourierReference']; error = json['Error']; Waypoints = JsonConverters.fromJson(json['Waypoints'],'List',context!); WaypointValidations = JsonConverters.fromJson(json['WaypointValidations'],'List',context!); Waybill = json['Waybill']; return this; } Map toJson() => { 'is_success': is_success, 'courier_reference': courier_reference, 'error': error, 'Waypoints': JsonConverters.toJson(Waypoints,'List',context!), 'WaypointValidations': JsonConverters.toJson(WaypointValidations,'List',context!), 'Waybill': Waybill }; getTypeName() => "PicUpCreateShipmentResponse"; TypeContext? context = _ctx; } // @Route("/picup/createshipment", "POST") class PicUpCreateShipmentRequest implements IReturn, IHasApiKey, ILogRequest, IConvertible, IPost { String? ApiKey; // @DataMember(Name="courier_request") CourierRequest? courier_request; PicUpCreateShipmentRequest({this.ApiKey,this.courier_request}); PicUpCreateShipmentRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ApiKey = json['ApiKey']; courier_request = JsonConverters.fromJson(json['CourierRequest'],'CourierRequest',context!); return this; } Map toJson() => { 'ApiKey': ApiKey, 'courier_request': JsonConverters.toJson(courier_request,'CourierRequest',context!) }; createResponse() => PicUpCreateShipmentResponse(); getResponseTypeName() => "PicUpCreateShipmentResponse"; getTypeName() => "PicUpCreateShipmentRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: '1fetch.api.client.prod.86degrees.com', types: { 'IHasApiKey': TypeInfo(TypeOf.Interface), 'ILogRequest': TypeInfo(TypeOf.Interface), 'BucketDetails': TypeInfo(TypeOf.Class, create:() => BucketDetails()), 'CourierRequest': TypeInfo(TypeOf.Class, create:() => CourierRequest()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'Shipment': TypeInfo(TypeOf.Class, create:() => Shipment()), 'LinkedWaypoint': TypeInfo(TypeOf.Class, create:() => LinkedWaypoint()), 'WaypointQuoteInformation': TypeInfo(TypeOf.Class, create:() => WaypointQuoteInformation()), 'WaypointValidationInformation': TypeInfo(TypeOf.Class, create:() => WaypointValidationInformation()), 'PicUpCreateShipmentResponse': TypeInfo(TypeOf.Class, create:() => PicUpCreateShipmentResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'PicUpCreateShipmentRequest': TypeInfo(TypeOf.Class, create:() => PicUpCreateShipmentRequest()), });