| GET | /v1/details/{vehicleType}/{Identifier} | Get Vehicle Details | |
|---|---|---|---|
| GET | /details/{vehicleType}/{Identifier} | Get Vehicle Details |
# frozen_string_literal: true
# encoding: utf-8
require 'json'
require 'servicestack'
class VehicleAuditDetails
include ServiceStack::DTO
# @return [String]
attr_accessor :user_id
# @return [TrueClass]
attr_accessor :status
# @return [String]
attr_accessor :notes
# @return [String]
attr_accessor :creation_date
def self.properties
{
user_id: { name: 'userId' },
status: { name: 'status' },
notes: { name: 'notes' },
creation_date: { name: 'creationDate' },
}
end
end
class BackOrderVehicleDetailsBase
include ServiceStack::DTO
# @return [String]
attr_accessor :vin
# @return [String]
attr_accessor :commission_number
# @return [String]
attr_accessor :description
# @return [String]
attr_accessor :model
# @return [String]
attr_accessor :full_model_year_code
# @return [Integer]
attr_accessor :retailer_id
# @return [String]
attr_accessor :image_url
# @return [String]
attr_accessor :colour
# @return [String]
attr_accessor :colour_description
# @return [String]
attr_accessor :body_style
# @return [String]
attr_accessor :fuel_type
# @return [String]
attr_accessor :transmission
# @return [String]
attr_accessor :transmission_type
# @return [String]
attr_accessor :package
# @return [List]
attr_accessor :packages
# @return [String]
attr_accessor :line
# @return [String]
attr_accessor :mapped_line
# @return [String]
attr_accessor :upholstery
# @return [String]
attr_accessor :upholstery_description
# @return [String]
attr_accessor :usage_code
# @return [String]
attr_accessor :account
# @return [String]
attr_accessor :nst
# @return [String]
attr_accessor :baumuster
# @return [BigDecimal]
attr_accessor :electric_range
# @return [BigDecimal]
attr_accessor :electric_consumption
# @return [BigDecimal]
attr_accessor :retail_price__ex_v_a_t
# @return [BigDecimal]
attr_accessor :actual_price
# @return [BigDecimal]
attr_accessor :otr_price
# @return [BigDecimal]
attr_accessor :p11_d
# @return [String]
attr_accessor :vehicle_type
# @return [TrueClass]
attr_accessor :secured
# @return [DateTime]
attr_accessor :port_arrival_date
# @return [String]
attr_accessor :display_retailer
# @return [String]
attr_accessor :location
# @return [String]
attr_accessor :bm7_n_s_t
# @return [TrueClass]
attr_accessor :is_available_online
# @return [TrueClass]
attr_accessor :is_specialist_car
# @return [TrueClass]
attr_accessor :is_sellable
# @return [TrueClass]
attr_accessor :in_back_order_account
# @return [List]
attr_accessor :vehicle_audit_details
# @return [List]
attr_accessor :isp_vehicle_customer_descriptions
# @return [TrueClass]
attr_accessor :under_offer
# @return [TrueClass]
attr_accessor :is_allocated_to_back_order
# @return [TrueClass]
attr_accessor :eligible_for_ma_transfer
# @return [String]
attr_accessor :confirmed_production_date
# @return [String]
attr_accessor :forecasted_arrival_date
def self.properties
{
vin: { name: 'vin' },
commission_number: { name: 'commissionNumber' },
description: { name: 'description' },
model: { name: 'model' },
full_model_year_code: { name: 'fullModelYearCode' },
retailer_id: { name: 'retailerId' },
image_url: { name: 'imageUrl' },
colour: { name: 'colour' },
colour_description: { name: 'colourDescription' },
body_style: { name: 'bodyStyle' },
fuel_type: { name: 'fuelType' },
transmission: { name: 'transmission' },
transmission_type: { name: 'transmissionType' },
package: { name: 'package' },
packages: { name: 'packages' },
line: { name: 'line' },
mapped_line: { name: 'mappedLine' },
upholstery: { name: 'upholstery' },
upholstery_description: { name: 'upholsteryDescription' },
usage_code: { name: 'usageCode' },
account: { name: 'account' },
nst: { name: 'nst' },
baumuster: { name: 'baumuster' },
electric_range: { name: 'electricRange' },
electric_consumption: { name: 'electricConsumption' },
retail_price__ex_v_a_t: { name: 'retailPrice_ExVAT' },
actual_price: { name: 'actualPrice' },
otr_price: { name: 'otrPrice' },
p11_d: { name: 'p11D' },
vehicle_type: { name: 'vehicleType' },
secured: { name: 'secured' },
port_arrival_date: { name: 'portArrivalDate', type: DateTime },
display_retailer: { name: 'displayRetailer' },
location: { name: 'location' },
bm7_n_s_t: { name: 'bm7NST' },
is_available_online: { name: 'isAvailableOnline' },
is_specialist_car: { name: 'isSpecialistCar' },
is_sellable: { name: 'isSellable' },
in_back_order_account: { name: 'inBackOrderAccount' },
vehicle_audit_details: { name: 'vehicleAuditDetails', type: [VehicleAuditDetails] },
isp_vehicle_customer_descriptions: { name: 'ispVehicleCustomerDescriptions' },
under_offer: { name: 'underOffer' },
is_allocated_to_back_order: { name: 'isAllocatedToBackOrder' },
eligible_for_ma_transfer: { name: 'eligibleForMaTransfer' },
confirmed_production_date: { name: 'confirmedProductionDate' },
forecasted_arrival_date: { name: 'forecastedArrivalDate' },
}
end
end
class BackOrderVehicleDetails < BackOrderVehicleDetailsBase
# @return [String]
attr_accessor :engine
def self.properties
{
engine: { name: 'engine' },
}
end
end
class VehicleDetailsResponse
include ServiceStack::DTO
# @return [BackOrderVehicleDetails]
attr_accessor :vehicle
def self.properties
{
vehicle: { name: 'vehicle', type: BackOrderVehicleDetails },
}
end
end
class VehicleDetailsRequest
include ServiceStack::DTO
# @return [String]
attr_accessor :identifier
# @return [String]
attr_accessor :vehicle_type
def self.properties
{
identifier: { name: 'identifier' },
vehicle_type: { name: 'vehicleType' },
}
end
def response_type() = VehicleDetailsResponse
def get_type_name() = 'VehicleDetailsRequest'
end
Ruby VehicleDetailsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/details/{vehicleType}/{Identifier} HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<VehicleDetailsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO.V3">
<Vehicle>
<Account>String</Account>
<ActualPrice>0</ActualPrice>
<Baumuster>String</Baumuster>
<Bm7NST>String</Bm7NST>
<BodyStyle>String</BodyStyle>
<Colour>String</Colour>
<ColourDescription>String</ColourDescription>
<CommissionNumber>String</CommissionNumber>
<ConfirmedProductionDate>String</ConfirmedProductionDate>
<Description>String</Description>
<DisplayRetailer>String</DisplayRetailer>
<ElectricConsumption>0</ElectricConsumption>
<ElectricRange>0</ElectricRange>
<EligibleForMaTransfer>false</EligibleForMaTransfer>
<ForecastedArrivalDate>String</ForecastedArrivalDate>
<FuelType>String</FuelType>
<FullModelYearCode>String</FullModelYearCode>
<ImageUrl>String</ImageUrl>
<InBackOrderAccount>false</InBackOrderAccount>
<IsAllocatedToBackOrder>false</IsAllocatedToBackOrder>
<IsAvailableOnline>false</IsAvailableOnline>
<IsSellable>false</IsSellable>
<IsSpecialistCar>false</IsSpecialistCar>
<IspVehicleCustomerDescriptions xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</IspVehicleCustomerDescriptions>
<Line>String</Line>
<Location>String</Location>
<MappedLine>String</MappedLine>
<Model>String</Model>
<NST>String</NST>
<OTRPrice>0</OTRPrice>
<P11D>0</P11D>
<Package>String</Package>
<Packages xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Packages>
<PortArrivalDate>0001-01-01T00:00:00</PortArrivalDate>
<RetailPrice_ExVAT>0</RetailPrice_ExVAT>
<RetailerId>0</RetailerId>
<Secured>false</Secured>
<Transmission>String</Transmission>
<TransmissionType>String</TransmissionType>
<UnderOffer>false</UnderOffer>
<Upholstery>String</Upholstery>
<UpholsteryDescription>String</UpholsteryDescription>
<UsageCode>String</UsageCode>
<VehicleAuditDetails>
<VehicleAuditDetails>
<CreationDate>String</CreationDate>
<Notes>String</Notes>
<Status>false</Status>
<UserId>String</UserId>
</VehicleAuditDetails>
</VehicleAuditDetails>
<VehicleType>String</VehicleType>
<Vin>String</Vin>
<Engine>String</Engine>
</Vehicle>
</VehicleDetailsResponse>