POST | /v1/vehicle/backordervalidate/{VehicleIdentifier} | Validate Vehicle assignment to BackOrder by Vin or Commission Number |
---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class GetVehicleBackOrderValidateResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $CommissionNumber=null,
/** @var string|null */
public ?string $Vin=null,
/** @var bool|null */
public ?bool $IsDisplayStock=null,
/** @var bool|null */
public ?bool $Specialist=null,
/** @var string|null */
public ?string $DisplayRetailer=null,
/** @var bool|null */
public ?bool $IsValid=null,
/** @var string|null */
public ?string $ErrorMessage=null,
/** @var bool|null */
public ?bool $NotMotability=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CommissionNumber'])) $this->CommissionNumber = $o['CommissionNumber'];
if (isset($o['Vin'])) $this->Vin = $o['Vin'];
if (isset($o['IsDisplayStock'])) $this->IsDisplayStock = $o['IsDisplayStock'];
if (isset($o['Specialist'])) $this->Specialist = $o['Specialist'];
if (isset($o['DisplayRetailer'])) $this->DisplayRetailer = $o['DisplayRetailer'];
if (isset($o['IsValid'])) $this->IsValid = $o['IsValid'];
if (isset($o['ErrorMessage'])) $this->ErrorMessage = $o['ErrorMessage'];
if (isset($o['NotMotability'])) $this->NotMotability = $o['NotMotability'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CommissionNumber)) $o['CommissionNumber'] = $this->CommissionNumber;
if (isset($this->Vin)) $o['Vin'] = $this->Vin;
if (isset($this->IsDisplayStock)) $o['IsDisplayStock'] = $this->IsDisplayStock;
if (isset($this->Specialist)) $o['Specialist'] = $this->Specialist;
if (isset($this->DisplayRetailer)) $o['DisplayRetailer'] = $this->DisplayRetailer;
if (isset($this->IsValid)) $o['IsValid'] = $this->IsValid;
if (isset($this->ErrorMessage)) $o['ErrorMessage'] = $this->ErrorMessage;
if (isset($this->NotMotability)) $o['NotMotability'] = $this->NotMotability;
return empty($o) ? new class(){} : $o;
}
}
class GetVehicleBackOrderValidateRequest implements IPost, JsonSerializable
{
public function __construct(
/** @var string */
public string $VehicleIdentifier='',
/** @var string|null */
public ?string $BackOrderGuid=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['VehicleIdentifier'])) $this->VehicleIdentifier = $o['VehicleIdentifier'];
if (isset($o['BackOrderGuid'])) $this->BackOrderGuid = $o['BackOrderGuid'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->VehicleIdentifier)) $o['VehicleIdentifier'] = $this->VehicleIdentifier;
if (isset($this->BackOrderGuid)) $o['BackOrderGuid'] = $this->BackOrderGuid;
return empty($o) ? new class(){} : $o;
}
}
PHP GetVehicleBackOrderValidateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/vehicle/backordervalidate/{VehicleIdentifier} HTTP/1.1
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
VehicleIdentifier: String,
BackOrderGuid: 00000000000000000000000000000000
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { CommissionNumber: String, Vin: String, IsDisplayStock: False, Specialist: False, DisplayRetailer: String, IsValid: False, ErrorMessage: String, NotMotability: False }