/* Options: Date: 2025-06-27 22:10:56 SwiftVersion: 6.0 Version: 8.81 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: MotabilityVehiclesRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/v1/{VehicleType}/Vehicle/Motability", "GET") public class MotabilityVehiclesRequest : IReturn, IGet, Codable { public typealias Return = VehiclesByRetailerResponse public var vehicleType:String? required public init(){} } public class VehiclesByRetailerResponse : Codable { public var vehicles:[VehicleIdentifierData] = [] required public init(){} } public class VehicleIdentifierData : VehicleData { public var retailer:String? public var hasMotabilityError:Bool? public var equipment:[Equipment] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case retailer case hasMotabilityError case equipment } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) retailer = try container.decodeIfPresent(String.self, forKey: .retailer) hasMotabilityError = try container.decodeIfPresent(Bool.self, forKey: .hasMotabilityError) equipment = try container.decodeIfPresent([Equipment].self, forKey: .equipment) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if retailer != nil { try container.encode(retailer, forKey: .retailer) } if hasMotabilityError != nil { try container.encode(hasMotabilityError, forKey: .hasMotabilityError) } if equipment.count > 0 { try container.encode(equipment, forKey: .equipment) } } } public class Equipment : Codable { public var id:Int? public var code:String? public var Description:String? required public init(){} } public class VehicleData : VehicleDataBase { public var engine:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case engine } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) engine = try container.decodeIfPresent(String.self, forKey: .engine) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if engine != nil { try container.encode(engine, forKey: .engine) } } } public class VehicleDataBase : Codable { public var vin:String? public var Description:String? public var model:String? public var otr:String? public var retailPriceExVAT:String? public var actualPrice:String? public var fuelType:String? public var transmission:String? public var transmissionType:String? public var colour:String? public var colourCode:String? public var colourDescription:String? public var commissionNumber:String? public var offerAvailable:Bool? public var campaignDiscountOfferTotal:Int? public var campaignDiscountOfferTotalCurrent:Int? public var campaignDiscountOfferTotalPending:Int? public var campaignServiceOfferTotal:Int? public var campaignServiceOfferTotalCurrent:Int? public var campaignServiceOfferTotalPending:Int? public var campaignCustomOfferTotal:Int? public var campaignPersonalisedOfferTotalCurrent:Int? public var campaignPersonalisedOfferTotalPending:Int? public var campaignPersonalisedOfferTotal:Int? public var campaignCustomOfferTotalCurrent:Int? public var campaignCustomOfferTotalPending:Int? public var campaignOtherOfferTotal:Int? public var campaignOtherOfferTotalCurrent:Int? public var campaignOtherOfferTotalPending:Int? public var retailerDiscountOfferTotal:Int? public var retailerDiscountOfferTotalCurrent:Int? public var retailerDiscountOfferTotalPending:Int? public var retailerServiceOfferTotal:Int? public var retailerServiceOfferTotalCurrent:Int? public var retailerServiceOfferTotalPending:Int? public var retailerCustomOfferTotal:Int? public var retailerCustomOfferTotalCurrent:Int? public var retailerCustomOfferTotalPending:Int? public var retailerWarrantyOfferTotal:Int? public var retailerWarrantyOfferTotalCurrent:Int? public var retailerWarrantyOfferTotalPending:Int? public var retailerOfferTotal:Int? public var retailerOfferTotalCurrent:Int? public var retailerOfferTotalPending:Int? public var campaignOfferTotal:Int? public var campaignOfferTotalCurrent:Int? public var campaignOfferTotalPending:Int? public var campaignAndOfferTotal:Int? public var campaignAndOfferTotalCurrent:Int? public var campaignAndOfferTotalPending:Int? public var offerTotal:Int? public var offerTotalCurrent:Int? public var offerTotalPending:Int? public var creation:String? public var modified:String? public var electricRange:Int? public var electricConsumption:Int? public var portArrivalDate:Date? public var daysSincePortArrival:Int? public var retailPriceIncVAT:Double? public var bodyStyle:String? public var upholstery:String? public var upholsteryCode:String? public var upholsteryType:String? public var packageNames:[String] = [] public var line:String? public var currentRetailerOfferPrice:Double? public var retailPrice:String? public var vatQualifying:Bool? public var retailerId:Int? public var gssnId:String? public var noImage:Bool? public var imageUrl:String? public var isAvailableOnline:Bool? public var isBackOrdered:Bool? public var creationDate:String? public var maintenanceDate:String? public var registrationNumber:String? public var registrationDate:Date? public var mileage:Int? public var tradeInDate:Date? public var source:String? public var vehicleType:String? public var offerAmount:String? public var offerExpiry:String? public var activeOffers:[Int] = [] public var campaignMessagesTotal:Int? public var underOffer:Bool? public var isDisplayStock:Bool? public var displayRetailer:String? public var displayRetailerGssnId:String? public var location:String? public var account:String? public var accountType:String? public var usageCode:String? public var bm7NST:String? public var isSellable:Bool? public var secured:Bool? public var specialist:Bool? public var isMotabilityRetailer:Bool? public var upholsteryDescription:String? public var inBackOrderAccount:Bool? public var fullModelYearCode:String? public var productionDate:Date? public var baumuster:String? public var isMotability:Bool? public var pipAdvanceRentalGross:Double? public var wpmsAdvanceRentalGross:Double? public var ispVehicleCustomerDescriptions:[String]? required public init(){} }