/* Options: Date: 2026-09-09 11:05:53 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: GetShipments.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/dealers/shipments", "GET") public class GetShipments : AuthenticatedRequest, IReturn { public typealias Return = ShipmentsResponse /** * Start of date range to retrieve shipments for. */ // @ApiMember(Description="Start of date range to retrieve shipments for.", IsRequired=true) public var dateFrom:Date? /** * End of date range to retrieve shipments for. */ // @ApiMember(Description="End of date range to retrieve shipments for.") public var dateTo:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case dateFrom case dateTo } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) dateFrom = try container.decodeIfPresent(Date.self, forKey: .dateFrom) dateTo = try container.decodeIfPresent(Date.self, forKey: .dateTo) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if dateFrom != nil { try container.encode(dateFrom, forKey: .dateFrom) } if dateTo != nil { try container.encode(dateTo, forKey: .dateTo) } } } public class ShipmentsResponse : OperationResult_1<[ShipmentResult]> { 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 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(){} }