/* Options: Date: 2026-08-27 07:10:45 SwiftVersion: 6.0 Version: 10.08 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://dev-api-booster.richemont.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: GetStock.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/stock/{brand}", "GET") public class GetStock : StockRequest, IReturn { public typealias Return = GetStockResponse 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 GetStockResponse : List { 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 StockRequest : Codable { /** * Brand */ // @ApiMember(Description="Brand", IsRequired=true) public var brand:String? /** * POS Legacy */ // @ApiMember(Description="POS Legacy") public var posCodes:[String]? /** * Article Codes */ // @ApiMember(Description="Article Codes") public var articleCodes:[String]? /** * Include Extra Info */ // @ApiMember(Description="Include Extra Info") public var includeExtraInfo:Bool? /** * Cluster Id */ // @ApiMember(Description="Cluster Id") public var clusterIds:[String]? /** * Include Consignment NotAuthorized POS */ // @ApiMember(Description="Include Consignment NotAuthorized POS") public var includeConsignmentNotAuthorizedPOS:Bool? /** * Include Retail Sales Price in the Output, by default: false */ // @ApiMember(Description="Include Retail Sales Price in the Output, by default: false") public var includeRSP:Bool? /** * In Stock Since date from */ // @ApiMember(Description="In Stock Since date from ") public var dateFrom:Date? /** * In Stock Since date to */ // @ApiMember(Description="In Stock Since date to") public var dateTo:Date? /** * Item type, 'standard' OR 'consigned'. By default, all are coming */ // @ApiMember(Description="Item type, 'standard' OR 'consigned'. By default, all are coming") public var type:String? /** * Storage Location Identifier e.g. CPO, NEW, REP */ // @ApiMember(Description="Storage Location Identifier e.g. CPO, NEW, REP") public var storageLocationId:String? /** * Inventory segment e.g. CPO or null */ // @ApiMember(Description="Inventory segment e.g. CPO or null") public var inventorySegment:String? required public init(){} } public class Pos : Codable { /** * POS Code */ // @ApiMember(Description="POS Code", IsRequired=true) public var posCode:String? /** * Name of the POS */ // @ApiMember(Description="Name of the POS", IsRequired=true) public var name:String? /** * City of the POS */ // @ApiMember(Description="City of the POS", IsRequired=true) public var city:String? /** * Address of the POS */ // @ApiMember(Description="Address of the POS", IsRequired=true) public var address:String? /** * Country of the POS */ // @ApiMember(Description="Country of the POS", IsRequired=true) public var country:String? /** * Brand of the POS */ // @ApiMember(Description="Brand of the POS", IsRequired=true) public var brand:String? required public init(){} } public class PosStockItem : Codable { /** * Brand */ // @ApiMember(Description="Brand", IsRequired=true) public var brand:String? /** * Pos Code */ // @ApiMember(Description="Pos Code", IsRequired=true) public var posCode:String? /** * Shared Stock Location */ // @ApiMember(Description="Shared Stock Location", IsRequired=true) public var sharedStockLocation:Pos? /** * Stock Items */ // @ApiMember(Description="Stock Items") public var stockItems:[StockItem]? required public init(){} } public class Pos : Codable { /** * Name of the POS */ // @ApiMember(Description="Name of the POS", IsRequired=true) public var name:String? /** * POS Code */ // @ApiMember(Description="POS Code", IsRequired=true) public var posCode:String? /** * Pos Code To Be Displayed */ // @ApiMember(Description="Pos Code To Be Displayed", IsRequired=true) public var posCodeToBeDisplayed:String? /** * Country of the POS */ // @ApiMember(Description="Country of the POS", IsRequired=true) public var country:String? /** * City of the POS */ // @ApiMember(Description="City of the POS", IsRequired=true) public var city:String? /** * Postal Code */ // @ApiMember(Description="Postal Code", IsRequired=true) public var postalCode:String? /** * State */ // @ApiMember(Description="State", IsRequired=true) public var state:String? /** * Street */ // @ApiMember(Description="Street", IsRequired=true) public var street:String? required public init(){} } public class StockPositionItem : Codable { /** * Quantity */ // @ApiMember(Description="Quantity", IsRequired=true) public var quantity:Int? /** * Serial Number */ // @ApiMember(Description="Serial Number") public var serialNumber:String? /** * Stock Date */ // @ApiMember(Description="Stock Date", IsRequired=true) public var stockDate:String? /** * Loaded On Date */ // @ApiMember(Description="Loaded On Date", IsRequired=true) public var loadedOnDate:String? /** * Type e.g. consignment or standard */ // @ApiMember(Description="Type e.g. consignment or standard", IsRequired=true) public var type:String? /** * Is Consignment Sellable */ // @ApiMember(Description="Is Consignment Sellable ", IsRequired=true) public var isConsignmentSellable:Bool? /** * Sell-In Price. Disclaimer: this data will be arriving empty/null due to DealerCost project still being in test phase. */ // @ApiMember(Description="Sell-In Price. Disclaimer: this data will be arriving empty/null due to DealerCost project still being in test phase.") public var unitNetAmount:UnitNetAmount? /** * Retail Sales Price */ // @ApiMember(Description="Retail Sales Price") public var retailSalesPrice:UnitNetAmount? /** * Storage Location */ // @ApiMember(Description="Storage Location") public var storageLocation:StorageLocation? required public init(){} } public class StockItem : Codable { /** * Article Code */ // @ApiMember(Description="Article Code", IsRequired=true) public var articleCode:String? /** * Current Stock Quantity */ // @ApiMember(Description="Current Stock Quantity", IsRequired=true) public var currentStockQuantity:Int? /** * Serial Numbers */ // @ApiMember(Description="Serial Numbers") public var serialNumbers:[String]? /** * Stock Item in Details */ // @ApiMember(Description="Stock Item in Details", IsRequired=true) public var stockPositions:[StockPositionItem] = [] required public init(){} } public class UnitNetAmount : Codable { /** * Currency Iso Code */ // @ApiMember(Description="Currency Iso Code", IsRequired=true) public var currencyIsoCode:String? /** * Value */ // @ApiMember(Description="Value", IsRequired=true) public var value:Double? required public init(){} } public class StorageLocation : Codable { /** * Storage Location Identifier */ // @ApiMember(Description="Storage Location Identifier", IsRequired=true) public var storageLocationId:String? /** * Storage Location Description */ // @ApiMember(Description="Storage Location Description") public var storageLocationDs:String? required public init(){} }