| GET | /v1/vehicle/MotabilityVehicles | Get motability eligible vehicles | Get motability eligible vehicles |
|---|
#![allow(
dead_code,
non_camel_case_types,
non_snake_case,
clippy::upper_case_acronyms
)]
use serde::{Deserialize, Serialize};
use serde_json::Value;
use std::collections::HashMap;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct GetMotabilityVehiclesRequest {}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct VehicleStockManagementResponse<T> {
#[serde(rename = "totalVehicles")]
pub total_vehicles: i32,
pub vehicles: Vec<T>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct Package {
pub id: i32,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct MotabilityVehicle {
#[serde(rename = "commissionNumber")]
pub commission_number: String,
pub vin: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub vtn: Option<String>,
pub description: String,
pub model: String,
#[serde(rename = "bM7NST")]
pub b_m7_n_s_t: String,
#[serde(rename = "modelYearCode")]
pub model_year_code: String,
#[serde(rename = "halfModelYearCode")]
pub half_model_year_code: String,
#[serde(rename = "fullModelYearCode")]
pub full_model_year_code: String,
pub fuel: String,
#[serde(rename = "primaryPaintColourCode")]
pub primary_paint_colour_code: String,
pub colour: String,
#[serde(rename = "primaryUpholsteryCode")]
pub primary_upholstery_code: String,
pub upholstery: String,
pub packages: Vec<Package>,
pub account: String,
pub location: String,
#[serde(rename = "isDisplayStock")]
pub is_display_stock: bool,
#[serde(rename = "displayStockAgent")]
pub display_stock_agent: String,
#[serde(rename = "isSellable")]
pub is_sellable: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct MotabilityStockResponse {
#[serde(flatten)]
pub vehicle_stock_management_response: VehicleStockManagementResponse<MotabilityVehicle>,
}
Rust GetMotabilityVehiclesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/vehicle/MotabilityVehicles HTTP/1.1 Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"TotalVehicles":0,"Vehicles":[{"CommissionNumber":"String","Vin":"String","Vtn":"String","Description":"String","Model":"String","BM7NST":"String","ModelYearCode":"String","HalfModelYearCode":"String","FullModelYearCode":"String.String","Fuel":"String","PrimaryPaintColourCode":"String","Colour":"String","PrimaryUpholsteryCode":"String","Upholstery":"String","Account":"String","Location":"String","IsDisplayStock":false,"DisplayStockAgent":"String","IsSellable":false}]}