Mercedes.VehicleManagement.API

<back to all web services

DisplayStockOverviewRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/DisplayStockOverviewFilter Display Stock vehicle data with usedCode and MBUKSecured
# frozen_string_literal: true
# encoding: utf-8


require 'json'
require 'servicestack'


class VehicleDisplayStock
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :vin
    # @return [String]
    attr_accessor :vehicle_description
    # @return [String]
    attr_accessor :commission_number
    # @return [String]
    attr_accessor :retailer
    # @return [String]
    attr_accessor :model
    # @return [String]
    attr_accessor :fuel_type
    # @return [String]
    attr_accessor :transmission
    # @return [String]
    attr_accessor :colour
    # @return [String]
    attr_accessor :actual_price
    # @return [DateTime]
    attr_accessor :gb_dest_date
    # @return [String]
    attr_accessor :vehicle_usage
    # @return [TrueClass]
    attr_accessor :under_offer
    # @return [TrueClass]
    attr_accessor :is_sellable
    # @return [String]
    attr_accessor :vehicle_type
    # @return [String]
    attr_accessor :vid
    # @return [String]
    attr_accessor :fin
    # @return [String]
    attr_accessor :chassis_number
    # @return [String]
    attr_accessor :line
    # @return [String]
    attr_accessor :model_year
    # @return [String]
    attr_accessor :model_year_code
    # @return [String]
    attr_accessor :vehicle_class
    # @return [String]
    attr_accessor :retail_price__ex_v_a_t
    # @return [String]
    attr_accessor :retail_price__inc_v_a_t
    # @return [String]
    attr_accessor :otr
    # @return [String]
    attr_accessor :body_style
    # @return [String]
    attr_accessor :product_range
    # @return [String]
    attr_accessor :engine
    # @return [TrueClass]
    attr_accessor :is_a_m_g
    # @return [String]
    attr_accessor :colour_group
    # @return [String]
    attr_accessor :upholstery
    # @return [String]
    attr_accessor :packages
    # @return [String]
    attr_accessor :nst
    # @return [String]
    attr_accessor :b_m7_n_s_t
    # @return [String]
    attr_accessor :acceleration
    # @return [String]
    attr_accessor :boot_capacity
    # @return [String]
    attr_accessor :top_speed
    # @return [String]
    attr_accessor :drive_concept
    # @return [String]
    attr_accessor :combustion_power_hp
    # @return [String]
    attr_accessor :electric_power_kw
    # @return [String]
    attr_accessor :electric_power_hp
    # @return [String]
    attr_accessor :combined_power_kw
    # @return [String]
    attr_accessor :combined_power_h_p
    # @return [String]
    attr_accessor :electric_range
    # @return [String]
    attr_accessor :electric_consumption
    # @return [String]
    attr_accessor :emission_combined
    # @return [String]
    attr_accessor :emission_extra_urban
    # @return [String]
    attr_accessor :emission_urban
    # @return [String]
    attr_accessor :emission
    # @return [String]
    attr_accessor :emission_directive
    # @return [String]
    attr_accessor :energy_efficiency_class
    # @return [String]
    attr_accessor :wltp_combined
    # @return [String]
    attr_accessor :wltp_low
    # @return [String]
    attr_accessor :wltp_medium
    # @return [String]
    attr_accessor :wltp_high
    # @return [String]
    attr_accessor :wltp_extra_high
    # @return [String]
    attr_accessor :wltp_emission_combined
    # @return [DateTime]
    attr_accessor :port_arrival_date
    # @return [DateTime]
    attr_accessor :creation_date
    # @return [DateTime]
    attr_accessor :last_updated
    # @return [TrueClass]
    attr_accessor :is_display_stock
    # @return [String]
    attr_accessor :display_stock_agent
    # @return [TrueClass]
    attr_accessor :is_specialist_car
    # @return [String]
    attr_accessor :account
    # @return [String]
    attr_accessor :location
    # @return [String]
    attr_accessor :cesar_id_ship_to_party
    # @return [String]
    attr_accessor :vehicle_usage_code
    # @return [TrueClass]
    attr_accessor :mbuk_secured
    # @return [TrueClass]
    attr_accessor :is_allocated_to_back_order
    # @return [String]
    attr_accessor :back_order_reference
    # @return [String]
    attr_accessor :market_area_name
    # @return [Integer]
    attr_accessor :market_area_id
    # @return [String]
    attr_accessor :days_at_site
    # @return [TrueClass]
    attr_accessor :eligible_for_ma_transfer

    def self.properties
        {
            vin: { name: 'vin' },
            vehicle_description: { name: 'vehicleDescription' },
            commission_number: { name: 'commissionNumber' },
            retailer: { name: 'retailer' },
            model: { name: 'model' },
            fuel_type: { name: 'fuelType' },
            transmission: { name: 'transmission' },
            colour: { name: 'colour' },
            actual_price: { name: 'actualPrice' },
            gb_dest_date: { name: 'gbDestDate', type: DateTime },
            vehicle_usage: { name: 'vehicleUsage' },
            under_offer: { name: 'underOffer' },
            is_sellable: { name: 'isSellable' },
            vehicle_type: { name: 'vehicleType' },
            vid: { name: 'vid' },
            fin: { name: 'fin' },
            chassis_number: { name: 'chassisNumber' },
            line: { name: 'line' },
            model_year: { name: 'modelYear' },
            model_year_code: { name: 'modelYearCode' },
            vehicle_class: { name: 'vehicleClass' },
            retail_price__ex_v_a_t: { name: 'retailPrice_ExVAT' },
            retail_price__inc_v_a_t: { name: 'retailPrice_IncVAT' },
            otr: { name: 'otr' },
            body_style: { name: 'bodyStyle' },
            product_range: { name: 'productRange' },
            engine: { name: 'engine' },
            is_a_m_g: { name: 'isAMG' },
            colour_group: { name: 'colourGroup' },
            upholstery: { name: 'upholstery' },
            packages: { name: 'packages' },
            nst: { name: 'nst' },
            b_m7_n_s_t: { name: 'bM7NST' },
            acceleration: { name: 'acceleration' },
            boot_capacity: { name: 'bootCapacity' },
            top_speed: { name: 'topSpeed' },
            drive_concept: { name: 'driveConcept' },
            combustion_power_hp: { name: 'combustionPowerHp' },
            electric_power_kw: { name: 'electricPowerKw' },
            electric_power_hp: { name: 'electricPowerHp' },
            combined_power_kw: { name: 'combinedPowerKw' },
            combined_power_h_p: { name: 'combinedPowerHP' },
            electric_range: { name: 'electricRange' },
            electric_consumption: { name: 'electricConsumption' },
            emission_combined: { name: 'emissionCombined' },
            emission_extra_urban: { name: 'emissionExtraUrban' },
            emission_urban: { name: 'emissionUrban' },
            emission: { name: 'emission' },
            emission_directive: { name: 'emissionDirective' },
            energy_efficiency_class: { name: 'energyEfficiencyClass' },
            wltp_combined: { name: 'wltpCombined' },
            wltp_low: { name: 'wltpLow' },
            wltp_medium: { name: 'wltpMedium' },
            wltp_high: { name: 'wltpHigh' },
            wltp_extra_high: { name: 'wltpExtraHigh' },
            wltp_emission_combined: { name: 'wltpEmissionCombined' },
            port_arrival_date: { name: 'portArrivalDate', type: DateTime },
            creation_date: { name: 'creationDate', type: DateTime },
            last_updated: { name: 'lastUpdated', type: DateTime },
            is_display_stock: { name: 'isDisplayStock' },
            display_stock_agent: { name: 'displayStockAgent' },
            is_specialist_car: { name: 'isSpecialistCar' },
            account: { name: 'account' },
            location: { name: 'location' },
            cesar_id_ship_to_party: { name: 'cesarIdShipToParty' },
            vehicle_usage_code: { name: 'vehicleUsageCode' },
            mbuk_secured: { name: 'mbukSecured' },
            is_allocated_to_back_order: { name: 'isAllocatedToBackOrder' },
            back_order_reference: { name: 'backOrderReference' },
            market_area_name: { name: 'marketAreaName' },
            market_area_id: { name: 'marketAreaId' },
            days_at_site: { name: 'daysAtSite' },
            eligible_for_ma_transfer: { name: 'eligibleForMaTransfer' },
        }
    end

end

class DisplayStockOverviewResponse
    include ServiceStack::DTO

    # @return [List]
    attr_accessor :vehicles

    def self.properties
        {
            vehicles: { name: 'vehicles', type: [VehicleDisplayStock] },
        }
    end

end

class DisplayStockOverviewRequest
    include ServiceStack::DTO

    # @ApiMember(Description: "Is vehicle secured", IsRequired: "true")
    # @return [TrueClass]
    attr_accessor :is_secured

    # @ApiMember(Description: "Usage codes", IsRequired: "true")
    # @return [List]
    attr_accessor :usage_code

    def self.properties
        {
            is_secured: { name: 'isSecured' },
            usage_code: { name: 'usageCode' },
        }
    end

    def response_type() = DisplayStockOverviewResponse
    def get_type_name() = 'DisplayStockOverviewRequest'
end

Ruby DisplayStockOverviewRequest 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.

POST /v1/DisplayStockOverview HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	isSecured: False,
	usageCode: 
	[
		String
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	vehicles: 
	[
		{
			vin: String,
			vehicleDescription: String,
			commissionNumber: String,
			retailer: String,
			model: String,
			fuelType: String,
			transmission: String,
			colour: String,
			actualPrice: String,
			gbDestDate: 0001-01-01,
			vehicleUsage: String,
			underOffer: False,
			isSellable: False,
			vehicleType: String,
			vid: String,
			fin: String,
			chassisNumber: String,
			line: String,
			modelYear: String,
			modelYearCode: String,
			vehicleClass: String,
			retailPrice_ExVAT: String,
			retailPrice_IncVAT: String,
			otr: String,
			bodyStyle: String,
			productRange: String,
			engine: String,
			isAMG: False,
			colourGroup: String,
			upholstery: String,
			packages: String,
			nst: String,
			bM7NST: String,
			acceleration: String,
			bootCapacity: String,
			topSpeed: String,
			driveConcept: String,
			combustionPowerHp: String,
			electricPowerKw: String,
			electricPowerHp: String,
			combinedPowerKw: String,
			combinedPowerHP: String,
			electricRange: String,
			electricConsumption: String,
			emissionCombined: String,
			emissionExtraUrban: String,
			emissionUrban: String,
			emission: String,
			emissionDirective: String,
			energyEfficiencyClass: String,
			wltpCombined: String,
			wltpLow: String,
			wltpMedium: String,
			wltpHigh: String,
			wltpExtraHigh: String,
			wltpEmissionCombined: String,
			portArrivalDate: 0001-01-01,
			creationDate: 0001-01-01,
			lastUpdated: 0001-01-01,
			isDisplayStock: False,
			displayStockAgent: String,
			isSpecialistCar: False,
			account: String,
			location: String,
			cesarIdShipToParty: String,
			vehicleUsageCode: String,
			mbukSecured: False,
			isAllocatedToBackOrder: False,
			backOrderReference: String,
			marketAreaName: String,
			marketAreaId: 0,
			daysAtSite: String,
			eligibleForMaTransfer: False
		}
	]
}