/* Options: Date: 2026-09-09 11:02:49 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: GetPartInfo.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/dealers/part", "GET") public class GetPartInfo : AuthenticatedRequest, IReturn { public typealias Return = PartInfoResponse /** * Part number to retrieve info for. */ // @ApiMember(Description="Part number to retrieve info for.", IsRequired=true) public var partNumber:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case partNumber } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) partNumber = try container.decodeIfPresent(String.self, forKey: .partNumber) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if partNumber != nil { try container.encode(partNumber, forKey: .partNumber) } } } public class PartInfoResponse : 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 PartInfoResult : Codable { /** * Unique ID for the part. */ // @ApiMember(Description="Unique ID for the part.") public var id:Int? /** * Part number. */ // @ApiMember(Description="Part number.") public var partNumber:String? /** * Description of the part. */ // @ApiMember(Description="Description of the part.") public var Description:String? /** * Part manufacturer. */ // @ApiMember(Description="Part manufacturer.") public var manufacturer:String? /** * Determines if the part can be ordered. */ // @ApiMember(Description="Determines if the part can be ordered.") public var canBeOrdered:Bool? /** * Textual representation of the status of the part. */ // @ApiMember(Description="Textual representation of the status of the part.") public var statusText:String? /** * Available stock to order. */ // @ApiMember(Description="Available stock to order.") public var availableStockQuantity:Int? /** * Average days needed for delivery. */ // @ApiMember(Description="Average days needed for delivery.") public var averageDeliveryInDays:Int? /** * Price of a single unit, excluding VAT. */ // @ApiMember(Description="Price of a single unit, excluding VAT.") public var unitPrice:Double? /** * EAN number. */ // @ApiMember(Description="EAN number.") public var eanNumber:String? /** * Images */ // @ApiMember(Description="Images") public var images:[PartInfoResultImage]? /** * Secondary article numbers */ // @ApiMember(Description="Secondary article numbers") public var secondaryArticleNumbers:[String]? /** * Replacement article numbers */ // @ApiMember(Description="Replacement article numbers") public var replacementArticleNumbers:[String]? /** * Stock quantities */ // @ApiMember(Description="Stock quantities") public var stockQuantities:[PartStockQuantity]? 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 PartInfoResultImage : Codable { /** * Image number */ // @ApiMember(Description="Image number") public var imageNumber:Int? /** * Image URL */ // @ApiMember(Description="Image URL") public var imageUrl:String? required public init(){} } public class PartStockQuantity : Codable { /** * Location ID */ // @ApiMember(Description="Location ID") public var locationId:Int? /** * Location code */ // @ApiMember(Description="Location code") public var locationCode:String? /** * Stock quantity in location */ // @ApiMember(Description="Stock quantity in location") public var stockQuantity:Int? required public init(){} }