/* Options: Date: 2026-09-09 11:05:48 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: GetShipment.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/dealers/shipment/{ShipmentId}", "GET") public class GetShipment : AuthenticatedRequest, IReturn { public typealias Return = ShipmentResponse /** * Shipment ID to retrieve the status for. */ // @ApiMember(Description="Shipment ID to retrieve the status for.", IsRequired=true, ParameterType="path") public var shipmentId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case shipmentId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) shipmentId = try container.decodeIfPresent(Int.self, forKey: .shipmentId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if shipmentId != nil { try container.encode(shipmentId, forKey: .shipmentId) } } } public class ShipmentResponse : 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 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 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(){} }