| POST | /v1/motability/pricing | Gets the motability pricing information for the current user role | Gets the motability pricing information for the current user role |
|---|
#![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 GetMotabilityPricingRequest {}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct MotabilityPricingCsv {
pub id: i32,
#[serde(rename = "criteriaBM7NST")]
pub criteria_b_m7_n_s_t: String,
pub vtn: String,
#[serde(rename = "backOrderDropDown")]
pub back_order_drop_down: String,
#[serde(rename = "criteriaFullModelYearCode")]
pub criteria_full_model_year_code: String,
#[serde(rename = "criteriaValidOptionCodes")]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub criteria_valid_option_codes: Option<String>,
#[serde(rename = "criteriaInvalidOptionCodes")]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub criteria_invalid_option_codes: Option<String>,
#[serde(rename = "pipNet")]
pub pip_net: f64,
#[serde(rename = "pipVat")]
pub pip_vat: f64,
#[serde(rename = "pipGross")]
pub pip_gross: f64,
#[serde(rename = "wpmsNet")]
pub wpms_net: f64,
#[serde(rename = "wpmsVat")]
pub wpms_vat: f64,
#[serde(rename = "wpmsGross")]
pub wpms_gross: f64,
#[serde(rename = "discountNet")]
pub discount_net: f64,
#[serde(rename = "discountVat")]
pub discount_vat: f64,
#[serde(rename = "discountGross")]
pub discount_gross: f64,
#[serde(rename = "listPriceNet")]
pub list_price_net: f64,
#[serde(rename = "listPriceVat")]
pub list_price_vat: f64,
#[serde(rename = "listPriceGross")]
pub list_price_gross: f64,
#[serde(rename = "deliveryChargeNet")]
pub delivery_charge_net: f64,
#[serde(rename = "deliveryChargeVat")]
pub delivery_charge_vat: f64,
#[serde(rename = "deliveryChargeGross")]
pub delivery_charge_gross: f64,
#[serde(rename = "fuelChargeNet")]
pub fuel_charge_net: f64,
#[serde(rename = "fuelChargeVat")]
pub fuel_charge_vat: f64,
#[serde(rename = "fuelChargeGross")]
pub fuel_charge_gross: f64,
#[serde(rename = "numberPlateFeeNet")]
pub number_plate_fee_net: f64,
#[serde(rename = "numberPlateFeeVat")]
pub number_plate_fee_vat: f64,
#[serde(rename = "numberPlateFeeGross")]
pub number_plate_fee_gross: f64,
#[serde(rename = "firstRegistrationFeeNet")]
pub first_registration_fee_net: f64,
#[serde(rename = "firstRegistrationFeeVat")]
pub first_registration_fee_vat: f64,
#[serde(rename = "firstRegistrationFeeGross")]
pub first_registration_fee_gross: f64,
#[serde(rename = "roadFundLicenceNet")]
pub road_fund_licence_net: f64,
#[serde(rename = "roadFundLicenceVat")]
pub road_fund_licence_vat: f64,
#[serde(rename = "roadFundLicenceGross")]
pub road_fund_licence_gross: f64,
#[serde(rename = "validFrom")]
pub valid_from: String,
#[serde(rename = "validTo")]
pub valid_to: String,
#[serde(rename = "governmentGrantNet")]
pub government_grant_net: f64,
#[serde(rename = "governmentGrantVat")]
pub government_grant_vat: f64,
#[serde(rename = "governmentGrantGross")]
pub government_grant_gross: f64,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
pub enum MotabilityPricingStatus {
#[default]
#[serde(rename = "Pending")]
Pending,
#[serde(rename = "Current")]
Current,
#[serde(rename = "RecentlyExpired")]
RecentlyExpired,
#[serde(rename = "Expired")]
Expired,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct MotabilityPricing {
#[serde(flatten)]
pub motability_pricing_csv: MotabilityPricingCsv,
#[serde(rename = "motabilityPricingStatus")]
pub motability_pricing_status: MotabilityPricingStatus,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct GetMotabilityPricingResponse {
#[serde(rename = "motabilityPricing")]
pub motability_pricing: Vec<MotabilityPricing>,
}
Rust GetMotabilityPricingRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/motability/pricing HTTP/1.1
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"MotabilityPricing":[{"MotabilityPricingStatus":"Pending","Id":0,"CriteriaBM7NST":"String","VTN":"String","BackOrderDropDown":"String","CriteriaFullModelYearCode":"String","CriteriaValidOptionCodes":"String","CriteriaInvalidOptionCodes":"String","PIPNet":0,"PIPVat":0,"PIPGross":0,"WPMSNet":0,"WPMSVat":0,"WPMSGross":0,"DiscountNet":0,"DiscountVat":0,"DiscountGross":0,"ListPriceNet":0,"ListPriceVat":0,"ListPriceGross":0,"DeliveryChargeNet":0,"DeliveryChargeVat":0,"DeliveryChargeGross":0,"FuelChargeNet":0,"FuelChargeVat":0,"FuelChargeGross":0,"NumberPlateFeeNet":0,"NumberPlateFeeVat":0,"NumberPlateFeeGross":0,"FirstRegistrationFeeNet":0,"FirstRegistrationFeeVat":0,"FirstRegistrationFeeGross":0,"RoadFundLicenceNet":0,"RoadFundLicenceVat":0,"RoadFundLicenceGross":0,"ValidFrom":"\/Date(-62135596800000-0000)\/","ValidTo":"\/Date(-62135596800000-0000)\/","GovernmentGrantNet":0,"GovernmentGrantVat":0,"GovernmentGrantGross":0}]}