| POST | /v1/Vehicle/SecuredStatus | Set secured status for vehicle |
|---|
# frozen_string_literal: true
# encoding: utf-8
require 'json'
require 'servicestack'
class ValidateVehicleResponse
include ServiceStack::DTO
# @return [String]
attr_accessor :comm
# @return [String]
attr_accessor :failure_reason
# @return [Integer]
attr_accessor :failure_reason_id
def self.properties
{
comm: { name: 'comm' },
failure_reason: { name: 'failureReason' },
failure_reason_id: { name: 'failureReasonId' },
}
end
end
class ValidateSecuredStatusResponse
include ServiceStack::DTO
# @return [List]
attr_accessor :validate_vehicle_responses
def self.properties
{
validate_vehicle_responses: { name: 'validateVehicleResponses', type: [ValidateVehicleResponse] },
}
end
end
class SecuredStatusRequest
include ServiceStack::DTO
# @return [String]
attr_accessor :commission_number
# @return [String]
attr_accessor :vehicle_type
# @return [String]
attr_accessor :reason
# @return [TrueClass]
attr_accessor :secured
def self.properties
{
commission_number: { name: 'commissionNumber' },
vehicle_type: { name: 'vehicleType' },
reason: { name: 'reason' },
secured: { name: 'secured' },
}
end
def response_type() = ValidateSecuredStatusResponse
def get_type_name() = 'SecuredStatusRequest'
end
Ruby SecuredStatusRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Vehicle/SecuredStatus HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"commissionNumber":"String","vehicleType":"String","reason":"String","secured":false}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"validateVehicleResponses":[{}]}