/* Options: Date: 2026-10-23 13:38:42 Version: 10.20 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: MotabilityVehiclesRequest.* //ExcludeTypes: //DefaultImports: serde::{Deserialize, Serialize},serde_json::Value,std::collections::HashMap */ #![allow( dead_code, non_camel_case_types, non_snake_case, clippy::upper_case_acronyms )] use serde::{Deserialize, Serialize}; use serde_json::Value; use servicestack::*; use std::collections::HashMap; #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct VehicleDataBase { pub vin: String, pub description: String, pub model: String, pub otr: String, #[serde(rename = "retailPriceExVAT")] pub retail_price_ex_v_a_t: String, #[serde(rename = "actualPrice")] pub actual_price: String, #[serde(rename = "p11D")] pub p11_d: String, #[serde(rename = "fuelType")] pub fuel_type: String, pub transmission: String, #[serde(rename = "transmissionType")] pub transmission_type: String, pub colour: String, #[serde(rename = "colourCode")] pub colour_code: String, #[serde(rename = "colourDescription")] pub colour_description: String, #[serde(rename = "commissionNumber")] pub commission_number: String, #[serde(rename = "offerAvailable")] pub offer_available: bool, #[serde(rename = "campaignDiscountOfferTotal")] pub campaign_discount_offer_total: i32, #[serde(rename = "campaignDiscountOfferTotalCurrent")] pub campaign_discount_offer_total_current: i32, #[serde(rename = "campaignDiscountOfferTotalPending")] pub campaign_discount_offer_total_pending: i32, #[serde(rename = "campaignServiceOfferTotal")] pub campaign_service_offer_total: i32, #[serde(rename = "campaignServiceOfferTotalCurrent")] pub campaign_service_offer_total_current: i32, #[serde(rename = "campaignServiceOfferTotalPending")] pub campaign_service_offer_total_pending: i32, #[serde(rename = "campaignCustomOfferTotal")] pub campaign_custom_offer_total: i32, #[serde(rename = "campaignPersonalisedOfferTotalCurrent")] pub campaign_personalised_offer_total_current: i32, #[serde(rename = "campaignPersonalisedOfferTotalPending")] pub campaign_personalised_offer_total_pending: i32, #[serde(rename = "campaignPersonalisedOfferTotal")] pub campaign_personalised_offer_total: i32, #[serde(rename = "campaignCustomOfferTotalCurrent")] pub campaign_custom_offer_total_current: i32, #[serde(rename = "campaignCustomOfferTotalPending")] pub campaign_custom_offer_total_pending: i32, #[serde(rename = "campaignOtherOfferTotal")] pub campaign_other_offer_total: i32, #[serde(rename = "campaignOtherOfferTotalCurrent")] pub campaign_other_offer_total_current: i32, #[serde(rename = "campaignOtherOfferTotalPending")] pub campaign_other_offer_total_pending: i32, #[serde(rename = "retailerDiscountOfferTotal")] pub retailer_discount_offer_total: i32, #[serde(rename = "retailerDiscountOfferTotalCurrent")] pub retailer_discount_offer_total_current: i32, #[serde(rename = "retailerDiscountOfferTotalPending")] pub retailer_discount_offer_total_pending: i32, #[serde(rename = "retailerServiceOfferTotal")] pub retailer_service_offer_total: i32, #[serde(rename = "retailerServiceOfferTotalCurrent")] pub retailer_service_offer_total_current: i32, #[serde(rename = "retailerServiceOfferTotalPending")] pub retailer_service_offer_total_pending: i32, #[serde(rename = "retailerCustomOfferTotal")] pub retailer_custom_offer_total: i32, #[serde(rename = "retailerCustomOfferTotalCurrent")] pub retailer_custom_offer_total_current: i32, #[serde(rename = "retailerCustomOfferTotalPending")] pub retailer_custom_offer_total_pending: i32, #[serde(rename = "retailerWarrantyOfferTotal")] pub retailer_warranty_offer_total: i32, #[serde(rename = "retailerWarrantyOfferTotalCurrent")] pub retailer_warranty_offer_total_current: i32, #[serde(rename = "retailerWarrantyOfferTotalPending")] pub retailer_warranty_offer_total_pending: i32, #[serde(rename = "retailerOfferTotal")] pub retailer_offer_total: i32, #[serde(rename = "retailerOfferTotalCurrent")] pub retailer_offer_total_current: i32, #[serde(rename = "retailerOfferTotalPending")] pub retailer_offer_total_pending: i32, #[serde(rename = "campaignOfferTotal")] pub campaign_offer_total: i32, #[serde(rename = "campaignOfferTotalCurrent")] pub campaign_offer_total_current: i32, #[serde(rename = "campaignOfferTotalPending")] pub campaign_offer_total_pending: i32, #[serde(rename = "campaignAndOfferTotal")] pub campaign_and_offer_total: i32, #[serde(rename = "campaignAndOfferTotalCurrent")] pub campaign_and_offer_total_current: i32, #[serde(rename = "campaignAndOfferTotalPending")] pub campaign_and_offer_total_pending: i32, #[serde(rename = "offerTotal")] pub offer_total: i32, #[serde(rename = "offerTotalCurrent")] pub offer_total_current: i32, #[serde(rename = "offerTotalPending")] pub offer_total_pending: i32, pub creation: String, pub modified: String, #[serde(rename = "electricRange")] pub electric_range: i32, #[serde(rename = "electricConsumption")] pub electric_consumption: i32, #[serde(rename = "portArrivalDate")] #[serde(default, skip_serializing_if = "Option::is_none")] pub port_arrival_date: Option, #[serde(rename = "daysSincePortArrival")] #[serde(default, skip_serializing_if = "Option::is_none")] pub days_since_port_arrival: Option, #[serde(rename = "retailPriceIncVAT")] pub retail_price_inc_v_a_t: f64, #[serde(rename = "bodyStyle")] pub body_style: String, pub upholstery: String, #[serde(rename = "upholsteryCode")] pub upholstery_code: String, #[serde(rename = "upholsteryType")] pub upholstery_type: String, #[serde(rename = "packageNames")] pub package_names: Vec, pub line: String, #[serde(rename = "mappedLine")] pub mapped_line: String, #[serde(rename = "currentRetailerOfferPrice")] pub current_retailer_offer_price: f64, #[serde(rename = "retailPrice")] pub retail_price: String, #[serde(rename = "vatQualifying")] pub vat_qualifying: bool, #[serde(rename = "retailerId")] pub retailer_id: i32, #[serde(rename = "gssnId")] pub gssn_id: String, #[serde(rename = "noImage")] pub no_image: bool, #[serde(rename = "imageUrl")] pub image_url: String, #[serde(rename = "isAvailableOnline")] pub is_available_online: bool, #[serde(rename = "isBackOrdered")] pub is_back_ordered: bool, #[serde(rename = "creationDate")] pub creation_date: String, #[serde(rename = "maintenanceDate")] pub maintenance_date: String, #[serde(rename = "registrationNumber")] pub registration_number: String, #[serde(rename = "registrationDate")] #[serde(default, skip_serializing_if = "Option::is_none")] pub registration_date: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub mileage: Option, #[serde(rename = "tradeInDate")] #[serde(default, skip_serializing_if = "Option::is_none")] pub trade_in_date: Option, pub source: String, #[serde(rename = "vehicleType")] pub vehicle_type: String, #[serde(rename = "offerAmount")] pub offer_amount: String, #[serde(rename = "offerExpiry")] pub offer_expiry: String, #[serde(rename = "activeOffers")] pub active_offers: Vec, #[serde(rename = "campaignMessagesTotal")] pub campaign_messages_total: i32, #[serde(rename = "underOffer")] pub under_offer: bool, #[serde(rename = "isDisplayStock")] pub is_display_stock: bool, #[serde(rename = "displayRetailer")] pub display_retailer: String, #[serde(rename = "displayRetailerGssnId")] pub display_retailer_gssn_id: String, pub location: String, pub account: String, #[serde(rename = "accountType")] pub account_type: String, #[serde(rename = "usageCode")] pub usage_code: String, #[serde(rename = "bm7NST")] pub bm7_n_s_t: String, #[serde(rename = "isSellable")] pub is_sellable: bool, pub secured: bool, pub specialist: bool, #[serde(rename = "isMotabilityRetailer")] pub is_motability_retailer: bool, #[serde(rename = "upholsteryDescription")] pub upholstery_description: String, #[serde(rename = "inBackOrderAccount")] pub in_back_order_account: bool, #[serde(rename = "fullModelYearCode")] #[serde(default, skip_serializing_if = "Option::is_none")] pub full_model_year_code: Option, pub baumuster: String, #[serde(rename = "isMotability")] pub is_motability: bool, #[serde(rename = "pipAdvanceRentalGross")] #[serde(default, skip_serializing_if = "Option::is_none")] pub pip_advance_rental_gross: Option, #[serde(rename = "wpmsAdvanceRentalGross")] #[serde(default, skip_serializing_if = "Option::is_none")] pub wpms_advance_rental_gross: Option, #[serde(rename = "ispVehicleCustomerDescriptions")] #[serde(default, skip_serializing_if = "Option::is_none")] pub isp_vehicle_customer_descriptions: Option>, #[serde(rename = "eligibleForMaTransfer")] pub eligible_for_ma_transfer: bool, #[serde(rename = "confirmedProductionDate")] #[serde(default, skip_serializing_if = "Option::is_none")] pub confirmed_production_date: Option, #[serde(rename = "forecastedArrivalDate")] #[serde(default, skip_serializing_if = "Option::is_none")] pub forecasted_arrival_date: Option, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct VehicleData { #[serde(flatten)] pub vehicle_data_base: VehicleDataBase, pub engine: String, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct Equipment { #[serde(default, skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub description: Option, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct VehicleIdentifierData { #[serde(flatten)] pub vehicle_data: VehicleData, pub retailer: String, #[serde(rename = "hasMotabilityError")] pub has_motability_error: bool, pub equipment: Vec, #[serde(rename = "vehicleClass")] #[serde(default, skip_serializing_if = "Option::is_none")] pub vehicle_class: Option, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct VehiclesByRetailerResponse { pub vehicles: Vec, } // Route("/v1/{VehicleType}/Vehicle/Motability", "GET") #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct MotabilityVehiclesRequest { #[serde(rename = "vehicleType")] pub vehicle_type: String, } impl IRequest for MotabilityVehiclesRequest { const NAME: &'static str = "MotabilityVehiclesRequest"; const VERB: &'static str = "GET"; } impl IReturn for MotabilityVehiclesRequest { type Response = VehiclesByRetailerResponse; }