/* Options: Date: 2025-12-06 06:44:18 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.1fetch.co.za //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: ValidateWaypoints.* //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 RequestQuoteWaypoint implements IRequestWaypoint, IConvertible { /** * Number of waypoint for ordering */ // @ApiMember(Description="Number of waypoint for ordering", IsRequired=true) int? WaypointNumber; /** * Waypoint Latitude */ // @ApiMember(Description="Waypoint Latitude", IsRequired=true) double? Latitude; /** * Waypoint Longitude */ // @ApiMember(Description="Waypoint Longitude", IsRequired=true) double? Longitude; /** * Name of contact person at waypoint */ // @ApiMember(Description="Name of contact person at waypoint", IsRequired=true) String? ContactName; /** * Telephone number of contact person at waypoint */ // @ApiMember(Description="Telephone number of contact person at waypoint", IsRequired=true) String? ContactNumber; /** * Instructions for driver to follow at waypoint */ // @ApiMember(Description="Instructions for driver to follow at waypoint", IsRequired=true) String? DeliveryInstructions; /** * Waypoint address */ // @ApiMember(Description="Waypoint address", IsRequired=true) String? Address; RequestQuoteWaypoint({this.WaypointNumber,this.Latitude,this.Longitude,this.ContactName,this.ContactNumber,this.DeliveryInstructions,this.Address}); RequestQuoteWaypoint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { WaypointNumber = json['WaypointNumber']; Latitude = JsonConverters.toDouble(json['Latitude']); Longitude = JsonConverters.toDouble(json['Longitude']); ContactName = json['ContactName']; ContactNumber = json['ContactNumber']; DeliveryInstructions = json['DeliveryInstructions']; Address = json['Address']; return this; } Map toJson() => { 'WaypointNumber': WaypointNumber, 'Latitude': Latitude, 'Longitude': Longitude, 'ContactName': ContactName, 'ContactNumber': ContactNumber, 'DeliveryInstructions': DeliveryInstructions, 'Address': Address }; getTypeName() => "RequestQuoteWaypoint"; 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; } abstract class IRequestWaypoint { double? Latitude; double? Longitude; int? WaypointNumber; String? ContactName; String? ContactNumber; String? DeliveryInstructions; String? Address; } 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 ValidateWaypointsResponse extends ApiServiceResponse implements IConvertible { /** * List with validation information for each waypoint */ // @ApiMember(Description="List with validation information for each waypoint") List? WaypointValidations; /** * The total distance for the order */ // @ApiMember(Description="The total distance for the order") double? TotalDistance; /** * The total distance for the order, formatted as a string */ // @ApiMember(Description="The total distance for the order, formatted as a string") String? TotalDistanceValue; /** * List of information for pricing etc between each waypoint */ // @ApiMember(Description="List of information for pricing etc between each waypoint") List? Waypoints; /** * Is there an issue for the waypoints details specified? */ // @ApiMember(Description="Is there an issue for the waypoints details specified?") bool? WaypointIssue; ValidateWaypointsResponse({this.WaypointValidations,this.TotalDistance,this.TotalDistanceValue,this.Waypoints,this.WaypointIssue}); ValidateWaypointsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); WaypointValidations = JsonConverters.fromJson(json['WaypointValidations'],'List',context!); TotalDistance = JsonConverters.toDouble(json['TotalDistance']); TotalDistanceValue = json['TotalDistanceValue']; Waypoints = JsonConverters.fromJson(json['Waypoints'],'List',context!); WaypointIssue = json['WaypointIssue']; return this; } Map toJson() => super.toJson()..addAll({ 'WaypointValidations': JsonConverters.toJson(WaypointValidations,'List',context!), 'TotalDistance': TotalDistance, 'TotalDistanceValue': TotalDistanceValue, 'Waypoints': JsonConverters.toJson(Waypoints,'List',context!), 'WaypointIssue': WaypointIssue }); getTypeName() => "ValidateWaypointsResponse"; TypeContext? context = _ctx; } // @Route("/quote/validatewaypoints", "POST") class ValidateWaypoints extends ApiServiceRequest implements IReturn, ILogRequest, IConvertible, IPost { /** * Array of waypoints */ // @ApiMember(Description="Array of waypoints", IsRequired=true) List? Waypoints; /** * Set this to true to prevent while testing the API. */ // @ApiMember(Description="Set this to true to prevent while testing the API.", IsRequired=true) bool? Test; ValidateWaypoints({this.Waypoints,this.Test}); ValidateWaypoints.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Waypoints = JsonConverters.fromJson(json['Waypoints'],'List',context!); Test = json['Test']; return this; } Map toJson() => super.toJson()..addAll({ 'Waypoints': JsonConverters.toJson(Waypoints,'List',context!), 'Test': Test }); createResponse() => ValidateWaypointsResponse(); getResponseTypeName() => "ValidateWaypointsResponse"; getTypeName() => "ValidateWaypoints"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.1fetch.co.za', types: { 'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()), 'IServiceRequest': TypeInfo(TypeOf.Interface), 'IHasApiKey': TypeInfo(TypeOf.Interface), 'ILogRequest': TypeInfo(TypeOf.Interface), 'RequestQuoteWaypoint': TypeInfo(TypeOf.Class, create:() => RequestQuoteWaypoint()), 'LinkedWaypoint': TypeInfo(TypeOf.Class, create:() => LinkedWaypoint()), 'WaypointQuoteInformation': TypeInfo(TypeOf.Class, create:() => WaypointQuoteInformation()), 'WaypointValidationInformation': TypeInfo(TypeOf.Class, create:() => WaypointValidationInformation()), 'IRequestWaypoint': TypeInfo(TypeOf.Interface), 'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()), 'ValidateWaypointsResponse': TypeInfo(TypeOf.Class, create:() => ValidateWaypointsResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ValidateWaypoints': TypeInfo(TypeOf.Class, create:() => ValidateWaypoints()), 'List': TypeInfo(TypeOf.Class, create:() => []), });