| 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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"vehicle":{"engine":"String","vin":"String","commissionNumber":"String","description":"String","model":"String","fullModelYearCode":"String","retailerId":0,"imageUrl":"String","colour":"String","colourDescription":"String","bodyStyle":"String","fuelType":"String","transmission":"String","transmissionType":"String","package":"String","packages":["String"],"line":"String","mappedLine":"String","upholstery":"String","upholsteryDescription":"String","usageCode":"String","account":"String","nst":"String","baumuster":"String","electricRange":0,"electricConsumption":0,"retailPrice_ExVAT":0,"actualPrice":0,"otrPrice":0,"p11D":0,"vehicleType":"String","secured":false,"portArrivalDate":"\/Date(-62135596800000-0000)\/","displayRetailer":"String","location":"String","bm7NST":"String","isAvailableOnline":false,"isSpecialistCar":false,"isSellable":false,"inBackOrderAccount":false,"vehicleAuditDetails":[{"userId":"String","status":false,"notes":"String","creationDate":"String"}],"ispVehicleCustomerDescriptions":["String"],"underOffer":false,"isAllocatedToBackOrder":false,"eligibleForMaTransfer":false,"confirmedProductionDate":"String","forecastedArrivalDate":"String"}}