| GET | /v1/vehicle/MotabilityVehicles | Get motability eligible vehicles | Get motability eligible vehicles |
|---|
# frozen_string_literal: true
# encoding: utf-8
require 'json'
require 'servicestack'
class GetMotabilityVehiclesRequest
include ServiceStack::DTO
end
class VehicleStockManagementResponse
include ServiceStack::DTO
# @return [Integer]
attr_accessor :total_vehicles
# @return [List]
attr_accessor :vehicles
def self.properties
{
total_vehicles: { name: 'totalVehicles' },
vehicles: { name: 'vehicles' },
}
end
end
class Package
include ServiceStack::DTO
# @return [Integer]
attr_accessor :id
# @return [String]
attr_accessor :description
def self.properties
{
id: { name: 'id' },
description: { name: 'description' },
}
end
end
class MotabilityVehicle
include ServiceStack::DTO
# @return [String]
attr_accessor :commission_number
# @return [String]
attr_accessor :vin
# @return [String]
attr_accessor :vtn
# @return [String]
attr_accessor :description
# @return [String]
attr_accessor :model
# @return [String]
attr_accessor :b_m7_n_s_t
# @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 :fuel
# @return [String]
attr_accessor :primary_paint_colour_code
# @return [String]
attr_accessor :colour
# @return [String]
attr_accessor :primary_upholstery_code
# @return [String]
attr_accessor :upholstery
# @return [ICollection]
attr_accessor :packages
# @return [String]
attr_accessor :account
# @return [String]
attr_accessor :location
# @return [TrueClass]
attr_accessor :is_display_stock
# @return [String]
attr_accessor :display_stock_agent
# @return [TrueClass]
attr_accessor :is_sellable
def self.properties
{
commission_number: { name: 'commissionNumber' },
vin: { name: 'vin' },
vtn: { name: 'vtn' },
description: { name: 'description' },
model: { name: 'model' },
b_m7_n_s_t: { name: 'bM7NST' },
model_year_code: { name: 'modelYearCode' },
half_model_year_code: { name: 'halfModelYearCode' },
full_model_year_code: { name: 'fullModelYearCode' },
fuel: { name: 'fuel' },
primary_paint_colour_code: { name: 'primaryPaintColourCode' },
colour: { name: 'colour' },
primary_upholstery_code: { name: 'primaryUpholsteryCode' },
upholstery: { name: 'upholstery' },
packages: { name: 'packages', type: [Package] },
account: { name: 'account' },
location: { name: 'location' },
is_display_stock: { name: 'isDisplayStock' },
display_stock_agent: { name: 'displayStockAgent' },
is_sellable: { name: 'isSellable' },
}
end
end
class MotabilityStockResponse < VehicleStockManagementResponse
end
Ruby GetMotabilityVehiclesRequest 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/vehicle/MotabilityVehicles HTTP/1.1 Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"TotalVehicles":0,"Vehicles":[{"CommissionNumber":"String","Vin":"String","Vtn":"String","Description":"String","Model":"String","BM7NST":"String","ModelYearCode":"String","HalfModelYearCode":"String","FullModelYearCode":"String.String","Fuel":"String","PrimaryPaintColourCode":"String","Colour":"String","PrimaryUpholsteryCode":"String","Upholstery":"String","Account":"String","Location":"String","IsDisplayStock":false,"DisplayStockAgent":"String","IsSellable":false}]}