Mercedes.VehicleManagement.API

<back to all web services

OnlineShowroomStockRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/OnlineShowroom/StockSearch for Online Showroom StockCalls Vehicle Data API online showroom stock endpoint and searches for vehicles given a list of retailers. The results are used to populate the Online Showroom Stock datatable grid in OneAdmin
# frozen_string_literal: true
# encoding: utf-8


require 'json'
require 'servicestack'


class StockDataRow
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :commission_number
    # @return [String]
    attr_accessor :description
    # @return [String]
    attr_accessor :sales_description_long
    # @return [String]
    attr_accessor :model
    # @return [String]
    attr_accessor :colour
    # @return [String]
    attr_accessor :colour_group
    # @return [String]
    attr_accessor :fuel_type
    # @return [String]
    attr_accessor :transmission
    # @return [String]
    attr_accessor :transmission_type
    # @return [String]
    attr_accessor :packages
    # @return [String]
    attr_accessor :lines
    # @return [String]
    attr_accessor :upholstery
    # @return [String]
    attr_accessor :upholstery_code
    # @return [String]
    attr_accessor :display_stock_agent
    # @return [String]
    attr_accessor :location
    # @return [String]
    attr_accessor :vin
    # @return [String]
    attr_accessor :vid
    # @return [String]
    attr_accessor :vehicle_type
    # @return [String]
    attr_accessor :vehicle_class
    # @return [DateTime]
    attr_accessor :creation_date
    # @return [DateTime]
    attr_accessor :last_updated
    # @return [DateTime]
    attr_accessor :port_arrival_date
    # @return [BigDecimal]
    attr_accessor :combined_gross_offer_value
    # @return [String]
    attr_accessor :current_location
    # @return [TrueClass]
    attr_accessor :not_visible_online_showroom
    # @return [String]
    attr_accessor :nvos_reason
    # @return [TrueClass]
    attr_accessor :nvos_reason_one_admin_excluded
    # @return [TrueClass]
    attr_accessor :nvos_reason_linked_to_back_order
    # @return [TrueClass]
    attr_accessor :included_after_deduplication
    # @return [TrueClass]
    attr_accessor :unique
    # @return [TrueClass]
    attr_accessor :duplicate
    # @return [Integer]
    attr_accessor :duplicate_group
    # @return [TrueClass]
    attr_accessor :lowest_comm
    # @return [String]
    attr_accessor :rule
    # @return [String]
    attr_accessor :fin
    # @return [String]
    attr_accessor :chassis_number
    # @return [String]
    attr_accessor :model_year
    # @return [String]
    attr_accessor :model_year_code
    # @return [String]
    attr_accessor :half_model_year_code
    # @return [String]
    attr_accessor :full_model_year_code
    # @return [String]
    attr_accessor :body_style
    # @return [String]
    attr_accessor :engine
    # @return [String]
    attr_accessor :cesar_id_ship_to_party
    # @return [String]
    attr_accessor :vehicle_usage_code
    # @return [BigDecimal]
    attr_accessor :acceleration
    # @return [Integer]
    attr_accessor :boot_capacity
    # @return [BigDecimal]
    attr_accessor :top_speed
    # @return [String]
    attr_accessor :drive_concept
    # @return [BigDecimal]
    attr_accessor :combustion_power_hp
    # @return [BigDecimal]
    attr_accessor :electric_power_kw
    # @return [BigDecimal]
    attr_accessor :electric_power_hp
    # @return [BigDecimal]
    attr_accessor :combined_power_kw
    # @return [BigDecimal]
    attr_accessor :combined_power_h_p
    # @return [TrueClass]
    attr_accessor :under_offer
    # @return [TrueClass]
    attr_accessor :is_sellable
    # @return [TrueClass]
    attr_accessor :mbuk_secured
    # @return [TrueClass]
    attr_accessor :is_display_stock
    # @return [TrueClass]
    attr_accessor :is_specialist_car
    # @return [String]
    attr_accessor :account
    # @return [String]
    attr_accessor :product_range
    # @return [TrueClass]
    attr_accessor :is_a_m_g
    # @return [BigDecimal]
    attr_accessor :actual_price
    # @return [BigDecimal]
    attr_accessor :retail_price__ex_v_a_t
    # @return [BigDecimal]
    attr_accessor :retail_price__inc_v_a_t
    # @return [BigDecimal]
    attr_accessor :otr
    # @return [String]
    attr_accessor :nst
    # @return [String]
    attr_accessor :bm7_n_s_t
    # @return [BigDecimal]
    attr_accessor :electric_range
    # @return [BigDecimal]
    attr_accessor :electric_consumption
    # @return [BigDecimal]
    attr_accessor :emission
    # @return [String]
    attr_accessor :emission_directive
    # @return [String]
    attr_accessor :emission_combined
    # @return [String]
    attr_accessor :emission_extra_urban
    # @return [String]
    attr_accessor :emission_urban
    # @return [String]
    attr_accessor :energy_efficiency_class
    # @return [String]
    attr_accessor :wltp_emission_combined
    # @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 [BigDecimal]
    attr_accessor :total_money_offers_excl_discretionary
    # @return [BigDecimal]
    attr_accessor :discretionary_money_offer
    # @return [BigDecimal]
    attr_accessor :total_money_offers_incl_discretionary
    # @return [Integer]
    attr_accessor :non_discretionary_n_m_o_count
    # @return [Integer]
    attr_accessor :non_discretionary_m_o_count
    # @return [Integer]
    attr_accessor :discretionary_n_m_o_count
    # @return [Integer]
    attr_accessor :discretionary_m_o_count
    # @return [BigDecimal]
    attr_accessor :total_offer_v_i_p_amount
    # @return [String]
    attr_accessor :stock_level_indicator
    # @return [DateTime]
    attr_accessor :confirmed_production_date
    # @return [DateTime]
    attr_accessor :forecasted_arrival_date

    def self.properties
        {
            commission_number: { name: 'commissionNumber' },
            description: { name: 'description' },
            sales_description_long: { name: 'salesDescriptionLong' },
            model: { name: 'model' },
            colour: { name: 'colour' },
            colour_group: { name: 'colourGroup' },
            fuel_type: { name: 'fuelType' },
            transmission: { name: 'transmission' },
            transmission_type: { name: 'transmissionType' },
            packages: { name: 'packages' },
            lines: { name: 'lines' },
            upholstery: { name: 'upholstery' },
            upholstery_code: { name: 'upholsteryCode' },
            display_stock_agent: { name: 'displayStockAgent' },
            location: { name: 'location' },
            vin: { name: 'vin' },
            vid: { name: 'vid' },
            vehicle_type: { name: 'vehicleType' },
            vehicle_class: { name: 'vehicleClass' },
            creation_date: { name: 'creationDate', type: DateTime },
            last_updated: { name: 'lastUpdated', type: DateTime },
            port_arrival_date: { name: 'portArrivalDate', type: DateTime },
            combined_gross_offer_value: { name: 'combinedGrossOfferValue' },
            current_location: { name: 'currentLocation' },
            not_visible_online_showroom: { name: 'notVisibleOnlineShowroom' },
            nvos_reason: { name: 'nvosReason' },
            nvos_reason_one_admin_excluded: { name: 'nvosReasonOneAdminExcluded' },
            nvos_reason_linked_to_back_order: { name: 'nvosReasonLinkedToBackOrder' },
            included_after_deduplication: { name: 'includedAfterDeduplication' },
            unique: { name: 'unique' },
            duplicate: { name: 'duplicate' },
            duplicate_group: { name: 'duplicateGroup' },
            lowest_comm: { name: 'lowestComm' },
            rule: { name: 'rule' },
            fin: { name: 'fin' },
            chassis_number: { name: 'chassisNumber' },
            model_year: { name: 'modelYear' },
            model_year_code: { name: 'modelYearCode' },
            half_model_year_code: { name: 'halfModelYearCode' },
            full_model_year_code: { name: 'fullModelYearCode' },
            body_style: { name: 'bodyStyle' },
            engine: { name: 'engine' },
            cesar_id_ship_to_party: { name: 'cesarIdShipToParty' },
            vehicle_usage_code: { name: 'vehicleUsageCode' },
            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' },
            under_offer: { name: 'underOffer' },
            is_sellable: { name: 'isSellable' },
            mbuk_secured: { name: 'mbukSecured' },
            is_display_stock: { name: 'isDisplayStock' },
            is_specialist_car: { name: 'isSpecialistCar' },
            account: { name: 'account' },
            product_range: { name: 'productRange' },
            is_a_m_g: { name: 'isAMG' },
            actual_price: { name: 'actualPrice' },
            retail_price__ex_v_a_t: { name: 'retailPrice_ExVAT' },
            retail_price__inc_v_a_t: { name: 'retailPrice_IncVAT' },
            otr: { name: 'otr' },
            nst: { name: 'nst' },
            bm7_n_s_t: { name: 'bm7NST' },
            electric_range: { name: 'electricRange' },
            electric_consumption: { name: 'electricConsumption' },
            emission: { name: 'emission' },
            emission_directive: { name: 'emissionDirective' },
            emission_combined: { name: 'emissionCombined' },
            emission_extra_urban: { name: 'emissionExtraUrban' },
            emission_urban: { name: 'emissionUrban' },
            energy_efficiency_class: { name: 'energyEfficiencyClass' },
            wltp_emission_combined: { name: 'wltpEmissionCombined' },
            wltp_combined: { name: 'wltpCombined' },
            wltp_low: { name: 'wltpLow' },
            wltp_medium: { name: 'wltpMedium' },
            wltp_high: { name: 'wltpHigh' },
            wltp_extra_high: { name: 'wltpExtraHigh' },
            total_money_offers_excl_discretionary: { name: 'totalMoneyOffersExclDiscretionary' },
            discretionary_money_offer: { name: 'discretionaryMoneyOffer' },
            total_money_offers_incl_discretionary: { name: 'totalMoneyOffersInclDiscretionary' },
            non_discretionary_n_m_o_count: { name: 'nonDiscretionaryNMOCount' },
            non_discretionary_m_o_count: { name: 'nonDiscretionaryMOCount' },
            discretionary_n_m_o_count: { name: 'discretionaryNMOCount' },
            discretionary_m_o_count: { name: 'discretionaryMOCount' },
            total_offer_v_i_p_amount: { name: 'totalOfferVIPAmount' },
            stock_level_indicator: { name: 'stockLevelIndicator' },
            confirmed_production_date: { name: 'confirmedProductionDate', type: DateTime },
            forecasted_arrival_date: { name: 'forecastedArrivalDate', type: DateTime },
        }
    end

end

class OnlineShowroomStockResponse
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :total_vehicles
    # @return [List]
    attr_accessor :vehicles

    def self.properties
        {
            total_vehicles: { name: 'totalVehicles' },
            vehicles: { name: 'vehicles', type: [StockDataRow] },
        }
    end

end

class OnlineShowroomStockRequest
    include ServiceStack::DTO

    # @return [List]
    attr_accessor :gssns

    def self.properties
        {
            gssns: { name: 'gssns' },
        }
    end

    def response_type() = OnlineShowroomStockResponse
    def get_type_name() = 'OnlineShowroomStockRequest'
end

Ruby OnlineShowroomStockRequest DTOs

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

HTTP + XML

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

POST /v1/OnlineShowroom/Stock HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<OnlineShowroomStockRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.ServiceModel">
  <Gssns xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Gssns>
</OnlineShowroomStockRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<OnlineShowroomStockResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.ServiceModel">
  <TotalVehicles>0</TotalVehicles>
  <Vehicles xmlns:d2p1="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO.V3">
    <d2p1:StockDataRow>
      <d2p1:Acceleration>0</d2p1:Acceleration>
      <d2p1:Account>String</d2p1:Account>
      <d2p1:ActualPrice>0</d2p1:ActualPrice>
      <d2p1:Bm7NST>String</d2p1:Bm7NST>
      <d2p1:BodyStyle>String</d2p1:BodyStyle>
      <d2p1:BootCapacity>0</d2p1:BootCapacity>
      <d2p1:CesarIdShipToParty>String</d2p1:CesarIdShipToParty>
      <d2p1:ChassisNumber>String</d2p1:ChassisNumber>
      <d2p1:Colour>String</d2p1:Colour>
      <d2p1:ColourGroup>String</d2p1:ColourGroup>
      <d2p1:CombinedGrossOfferValue>0</d2p1:CombinedGrossOfferValue>
      <d2p1:CombinedPowerHP>0</d2p1:CombinedPowerHP>
      <d2p1:CombinedPowerKw>0</d2p1:CombinedPowerKw>
      <d2p1:CombustionPowerHp>0</d2p1:CombustionPowerHp>
      <d2p1:CommissionNumber>String</d2p1:CommissionNumber>
      <d2p1:ConfirmedProductionDate>0001-01-01T00:00:00</d2p1:ConfirmedProductionDate>
      <d2p1:CreationDate>0001-01-01T00:00:00</d2p1:CreationDate>
      <d2p1:CurrentLocation>String</d2p1:CurrentLocation>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:DiscretionaryMOCount>0</d2p1:DiscretionaryMOCount>
      <d2p1:DiscretionaryMoneyOffer>0</d2p1:DiscretionaryMoneyOffer>
      <d2p1:DiscretionaryNMOCount>0</d2p1:DiscretionaryNMOCount>
      <d2p1:DisplayStockAgent>String</d2p1:DisplayStockAgent>
      <d2p1:DriveConcept>String</d2p1:DriveConcept>
      <d2p1:Duplicate>false</d2p1:Duplicate>
      <d2p1:DuplicateGroup>0</d2p1:DuplicateGroup>
      <d2p1:ElectricConsumption>0</d2p1:ElectricConsumption>
      <d2p1:ElectricPowerHp>0</d2p1:ElectricPowerHp>
      <d2p1:ElectricPowerKw>0</d2p1:ElectricPowerKw>
      <d2p1:ElectricRange>0</d2p1:ElectricRange>
      <d2p1:Emission>0</d2p1:Emission>
      <d2p1:EmissionCombined>String</d2p1:EmissionCombined>
      <d2p1:EmissionDirective>String</d2p1:EmissionDirective>
      <d2p1:EmissionExtraUrban>String</d2p1:EmissionExtraUrban>
      <d2p1:EmissionUrban>String</d2p1:EmissionUrban>
      <d2p1:EnergyEfficiencyClass>String</d2p1:EnergyEfficiencyClass>
      <d2p1:Engine>String</d2p1:Engine>
      <d2p1:Fin>String</d2p1:Fin>
      <d2p1:ForecastedArrivalDate>0001-01-01T00:00:00</d2p1:ForecastedArrivalDate>
      <d2p1:FuelType>String</d2p1:FuelType>
      <d2p1:FullModelYearCode>String</d2p1:FullModelYearCode>
      <d2p1:HalfModelYearCode>String</d2p1:HalfModelYearCode>
      <d2p1:IncludedAfterDeduplication>false</d2p1:IncludedAfterDeduplication>
      <d2p1:IsAMG>false</d2p1:IsAMG>
      <d2p1:IsDisplayStock>false</d2p1:IsDisplayStock>
      <d2p1:IsSellable>false</d2p1:IsSellable>
      <d2p1:IsSpecialistCar>false</d2p1:IsSpecialistCar>
      <d2p1:LastUpdated>0001-01-01T00:00:00</d2p1:LastUpdated>
      <d2p1:Lines>String</d2p1:Lines>
      <d2p1:Location>String</d2p1:Location>
      <d2p1:LowestComm>false</d2p1:LowestComm>
      <d2p1:MBUKSecured>false</d2p1:MBUKSecured>
      <d2p1:Model>String</d2p1:Model>
      <d2p1:ModelYear>String</d2p1:ModelYear>
      <d2p1:ModelYearCode>String</d2p1:ModelYearCode>
      <d2p1:NST>String</d2p1:NST>
      <d2p1:NonDiscretionaryMOCount>0</d2p1:NonDiscretionaryMOCount>
      <d2p1:NonDiscretionaryNMOCount>0</d2p1:NonDiscretionaryNMOCount>
      <d2p1:NotVisibleOnlineShowroom>false</d2p1:NotVisibleOnlineShowroom>
      <d2p1:NvosReason>String</d2p1:NvosReason>
      <d2p1:NvosReasonLinkedToBackOrder>false</d2p1:NvosReasonLinkedToBackOrder>
      <d2p1:NvosReasonOneAdminExcluded>false</d2p1:NvosReasonOneAdminExcluded>
      <d2p1:OTR>0</d2p1:OTR>
      <d2p1:Packages>String</d2p1:Packages>
      <d2p1:PortArrivalDate>0001-01-01T00:00:00</d2p1:PortArrivalDate>
      <d2p1:ProductRange>String</d2p1:ProductRange>
      <d2p1:RetailPrice_ExVAT>0</d2p1:RetailPrice_ExVAT>
      <d2p1:RetailPrice_IncVAT>0</d2p1:RetailPrice_IncVAT>
      <d2p1:Rule>String</d2p1:Rule>
      <d2p1:SalesDescriptionLong>String</d2p1:SalesDescriptionLong>
      <d2p1:StockLevelIndicator>String</d2p1:StockLevelIndicator>
      <d2p1:TopSpeed>0</d2p1:TopSpeed>
      <d2p1:TotalMoneyOffersExclDiscretionary>0</d2p1:TotalMoneyOffersExclDiscretionary>
      <d2p1:TotalMoneyOffersInclDiscretionary>0</d2p1:TotalMoneyOffersInclDiscretionary>
      <d2p1:TotalOfferVIPAmount>0</d2p1:TotalOfferVIPAmount>
      <d2p1:Transmission>String</d2p1:Transmission>
      <d2p1:TransmissionType>String</d2p1:TransmissionType>
      <d2p1:UnderOffer>false</d2p1:UnderOffer>
      <d2p1:Unique>false</d2p1:Unique>
      <d2p1:Upholstery>String</d2p1:Upholstery>
      <d2p1:UpholsteryCode>String</d2p1:UpholsteryCode>
      <d2p1:VehicleClass>String</d2p1:VehicleClass>
      <d2p1:VehicleType>String</d2p1:VehicleType>
      <d2p1:VehicleUsageCode>String</d2p1:VehicleUsageCode>
      <d2p1:Vid>String</d2p1:Vid>
      <d2p1:Vin>String</d2p1:Vin>
      <d2p1:WLTPCombined>String</d2p1:WLTPCombined>
      <d2p1:WLTPEmissionCombined>String</d2p1:WLTPEmissionCombined>
      <d2p1:WLTPExtraHigh>String</d2p1:WLTPExtraHigh>
      <d2p1:WLTPHigh>String</d2p1:WLTPHigh>
      <d2p1:WLTPLow>String</d2p1:WLTPLow>
      <d2p1:WLTPMedium>String</d2p1:WLTPMedium>
    </d2p1:StockDataRow>
  </Vehicles>
</OnlineShowroomStockResponse>