Mercedes.Agency.Orchestration.API

<back to all web services

UpdateCarConfiguratorRequest

CarConfigurator
Requires Authentication
The following routes are available for this service:
PUT/v1/configuratorRemoves a back order from a car configuratorThis endpoint calls Agency API when a ConfigurationCode is removed from a back order.
#![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 KeyInformation {
    #[serde(rename = "bM7NST")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub b_m7_n_s_t: Option<String>,
    #[serde(rename = "configurationDate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub configuration_date: Option<String>,
    #[serde(rename = "modelYear")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub model_year: Option<String>,
    #[serde(rename = "halfYear")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub half_year: Option<String>,
    #[serde(rename = "typeClass")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub type_class: Option<String>,
    #[serde(rename = "isPrivateVan")]
    pub is_private_van: bool,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct EquipmentCache {
    pub code: String,
    pub description: String,
    #[serde(rename = "standardFlag")]
    pub standard_flag: String,
    pub price: f64,
    pub category: String,
    pub importance: String,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct OrderingOptions {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub interior: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub exterior: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub options: Option<Vec<String>>,
    #[serde(rename = "wheelOptions")]
    pub wheel_options: Vec<EquipmentCache>,
    #[serde(rename = "trimOptions")]
    pub trim_options: Vec<EquipmentCache>,
    #[serde(rename = "equipmentOptionCodes")]
    pub equipment_option_codes: Vec<EquipmentCache>,
    #[serde(rename = "optionCodes")]
    pub option_codes: Vec<EquipmentCache>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct ResponseStatus {
    #[serde(rename = "errorCode")]
    pub error_code: String,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct CarConfiguratorResponse {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "keyInformation")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub key_information: Option<KeyInformation>,
    #[serde(rename = "orderingOptions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ordering_options: Option<OrderingOptions>,
    #[serde(rename = "responseStatus")]
    pub response_status: ResponseStatus,
    #[serde(rename = "configuratorCode")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub configurator_code: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct UpdateCarConfiguratorRequest {
    /// Configurator code
    // ApiMember(Description="Configurator code", IsRequired=true)
    #[serde(rename = "configuratorCode")]
    pub configurator_code: String,
    /// BackOrder Guid
    // ApiMember(Description="BackOrder Guid")
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub guid: Option<String>,
    /// GasId of the user making the request
    // ApiMember(Description="GasId of the user making the request")
    #[serde(rename = "gasId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub gas_id: Option<String>,
}

Rust UpdateCarConfiguratorRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /v1/configurator HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ConfiguratorCode: String,
	Guid: 00000000000000000000000000000000,
	GasId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Name: String,
	KeyInformation: 
	{
		BM7NST: String,
		ConfigurationDate: String,
		ModelYear: String,
		HalfYear: String,
		TypeClass: String,
		IsPrivateVan: False
	},
	OrderingOptions: 
	{
		Interior: 
		[
			String
		],
		Exterior: 
		[
			String
		],
		Options: 
		[
			String
		],
		WheelOptions: 
		[
			{
				Code: String,
				Description: String,
				StandardFlag: String,
				Price: 0,
				Category: String,
				Importance: String
			}
		],
		TrimOptions: 
		[
			{
				Code: String,
				Description: String,
				StandardFlag: String,
				Price: 0,
				Category: String,
				Importance: String
			}
		],
		EquipmentOptionCodes: 
		[
			{
				Code: String,
				Description: String,
				StandardFlag: String,
				Price: 0,
				Category: String,
				Importance: String
			}
		],
		OptionCodes: 
		[
			{
				Code: String,
				Description: String,
				StandardFlag: String,
				Price: 0,
				Category: String,
				Importance: String
			}
		]
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String
	},
	ConfiguratorCode: String
}