| GET | /v1/Vehicle/SecuredOffline | Get all secured vehicles which are offline | Get audit of all secured vehicles which are currently offline, including the user who secured it, the date and the reason. |
|---|
# frozen_string_literal: true
# encoding: utf-8
require 'json'
require 'servicestack'
class SecuredOfflineVehicle
include ServiceStack::DTO
# @return [String]
attr_accessor :commission_number
# @return [String]
attr_accessor :vin
# @return [String]
attr_accessor :sales_description
# @return [String]
attr_accessor :model
# @return [String]
attr_accessor :colour
# @return [String]
attr_accessor :fuel_type
# @return [String]
attr_accessor :upholstery
# @return [String]
attr_accessor :account
# @return [String]
attr_accessor :gas_id
# @return [String]
attr_accessor :secure_reason
# @return [String]
attr_accessor :secure_date
# @return [String]
attr_accessor :offline_date
def self.properties
{
commission_number: { name: 'commissionNumber' },
vin: { name: 'vin' },
sales_description: { name: 'salesDescription' },
model: { name: 'model' },
colour: { name: 'colour' },
fuel_type: { name: 'fuelType' },
upholstery: { name: 'upholstery' },
account: { name: 'account' },
gas_id: { name: 'gasId' },
secure_reason: { name: 'secureReason' },
secure_date: { name: 'secureDate' },
offline_date: { name: 'offlineDate' },
}
end
end
class SecuredOfflineVehicleResponse
include ServiceStack::DTO
# @return [List]
attr_accessor :vehicles
def self.properties
{
vehicles: { name: 'vehicles', type: [SecuredOfflineVehicle] },
}
end
end
class SecuredOfflineVehicleRequest
include ServiceStack::DTO
def response_type() = SecuredOfflineVehicleResponse
def get_type_name() = 'SecuredOfflineVehicleRequest'
end
Ruby SecuredOfflineVehicleRequest 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/SecuredOffline 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
{"vehicles":[{"commissionNumber":"String","vin":"String","salesDescription":"String","model":"String","colour":"String","fuelType":"String","upholstery":"String","account":"String","gasId":"String","secureReason":"String","secureDate":"String","offlineDate":"String"}]}