/* Options: Date: 2026-09-09 11:01:44 SwiftVersion: 6.0 Version: 10.08 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://services.acct.2service.nl //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: GetOrderTracking.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/dealers/order/tracking", "GET") public class GetOrderTracking : AuthenticatedRequest, IReturn { public typealias Return = OrderTrackingResponse /** * Order number to retrieve tracking for. */ // @ApiMember(Description="Order number to retrieve tracking for.", IsRequired=true) public var orderNumber:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case orderNumber } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) orderNumber = try container.decodeIfPresent(String.self, forKey: .orderNumber) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if orderNumber != nil { try container.encode(orderNumber, forKey: .orderNumber) } } } public class OrderTrackingResponse : OperationResult_1 { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class AuthenticatedRequest : Codable { /** * Session token received from successful authentication. */ // @ApiMember(Description="Session token received from successful authentication.", IsRequired=true, ParameterType="query") public var sessionToken:String? required public init(){} } public class OperationResult_1 : OperationResult { /** * Result value */ // @ApiMember(Description="Result value", ParameterType="model") public var result:T? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case result } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) result = try container.decodeIfPresent(T.self, forKey: .result) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if result != nil { try container.encode(result, forKey: .result) } } } public class OrderTrackingResult : Codable { /** * Order number. */ // @ApiMember(Description="Order number.") public var orderNumber:String? /** * Order date. */ // @ApiMember(Description="Order date.") public var orderDate:Date? /** * Order status. */ // @ApiMember(Description="Order status.") public var status:OrderStatus? /** * List of shipments (if any). */ // @ApiMember(Description="List of shipments (if any).") public var shipments:[ShipmentResult]? required public init(){} } public class ShipmentResult : Codable { /** * ID of the shipment. */ // @ApiMember(Description="ID of the shipment.") public var shipmentId:Int? /** * Determines of the shipment has been dispatched. */ // @ApiMember(Description="Determines of the shipment has been dispatched.") public var hasBeenDispatched:Bool? /** * Date/time of dispatch. */ // @ApiMember(Description="Date/time of dispatch.") public var dispatchDate:Date? /** * List of articles in shipment. */ // @ApiMember(Description="List of articles in shipment.") public var articles:[ShipmentArticleResult]? /** * List of packages for shipment. */ // @ApiMember(Description="List of packages for shipment.") public var packages:[ShipmentPackageResult]? required public init(){} } public class OperationResult : Codable { /** * Specifies if the operation was successful. */ // @ApiMember(Description="Specifies if the operation was successful.", ParameterType="model") public var isSuccessful:Bool? /** * States error message in case of unsuccessful operation. */ // @ApiMember(Description="States error message in case of unsuccessful operation.", ParameterType="model") public var errorMessage:String? required public init(){} } public enum OrderStatus : Int, Codable { case Open = 1 case Completed = 2 case Cancelled = 3 } public class ShipmentArticleResult : Codable { /** * Order number. */ // @ApiMember(Description="Order number.") public var orderNumber:String? /** * Article number. */ // @ApiMember(Description="Article number.") public var articleNumber:String? /** * Quantity. */ // @ApiMember(Description="Quantity.") public var quantity:Int? /** * Custom reference. */ // @ApiMember(Description="Custom reference.") public var customReference:String? required public init(){} } public class ShipmentPackageResult : Codable { /** * Shipment method. */ // @ApiMember(Description="Shipment method.") public var shipmentMethod:String? /** * Tracking number. */ // @ApiMember(Description="Tracking number.") public var trackingNumber:String? /** * Tracking URL. */ // @ApiMember(Description="Tracking URL.") public var trackingUrl:String? required public init(){} }