GET | /v1/{VehicleType}/Vehicle/Motability | Get motability vehicle data |
---|
<?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 VehicleDataBase implements JsonSerializable
{
public function __construct(
/** @var string */
public string $vin='',
/** @var string */
public string $description='',
/** @var string */
public string $model='',
/** @var string */
public string $otr='',
/** @var string */
public string $retailPriceExVAT='',
/** @var string */
public string $actualPrice='',
/** @var string */
public string $fuelType='',
/** @var string */
public string $transmission='',
/** @var string */
public string $transmissionType='',
/** @var string */
public string $colour='',
/** @var string */
public string $colourCode='',
/** @var string */
public string $colourDescription='',
/** @var string */
public string $commissionNumber='',
/** @var bool|null */
public ?bool $offerAvailable=null,
/** @var int */
public int $campaignDiscountOfferTotal=0,
/** @var int */
public int $campaignDiscountOfferTotalCurrent=0,
/** @var int */
public int $campaignDiscountOfferTotalPending=0,
/** @var int */
public int $campaignServiceOfferTotal=0,
/** @var int */
public int $campaignServiceOfferTotalCurrent=0,
/** @var int */
public int $campaignServiceOfferTotalPending=0,
/** @var int */
public int $campaignCustomOfferTotal=0,
/** @var int */
public int $campaignPersonalisedOfferTotalCurrent=0,
/** @var int */
public int $campaignPersonalisedOfferTotalPending=0,
/** @var int */
public int $campaignPersonalisedOfferTotal=0,
/** @var int */
public int $campaignCustomOfferTotalCurrent=0,
/** @var int */
public int $campaignCustomOfferTotalPending=0,
/** @var int */
public int $campaignOtherOfferTotal=0,
/** @var int */
public int $campaignOtherOfferTotalCurrent=0,
/** @var int */
public int $campaignOtherOfferTotalPending=0,
/** @var int */
public int $retailerDiscountOfferTotal=0,
/** @var int */
public int $retailerDiscountOfferTotalCurrent=0,
/** @var int */
public int $retailerDiscountOfferTotalPending=0,
/** @var int */
public int $retailerServiceOfferTotal=0,
/** @var int */
public int $retailerServiceOfferTotalCurrent=0,
/** @var int */
public int $retailerServiceOfferTotalPending=0,
/** @var int */
public int $retailerCustomOfferTotal=0,
/** @var int */
public int $retailerCustomOfferTotalCurrent=0,
/** @var int */
public int $retailerCustomOfferTotalPending=0,
/** @var int */
public int $retailerWarrantyOfferTotal=0,
/** @var int */
public int $retailerWarrantyOfferTotalCurrent=0,
/** @var int */
public int $retailerWarrantyOfferTotalPending=0,
/** @var int */
public int $retailerOfferTotal=0,
/** @var int */
public int $retailerOfferTotalCurrent=0,
/** @var int */
public int $retailerOfferTotalPending=0,
/** @var int */
public int $campaignOfferTotal=0,
/** @var int */
public int $campaignOfferTotalCurrent=0,
/** @var int */
public int $campaignOfferTotalPending=0,
/** @var int */
public int $campaignAndOfferTotal=0,
/** @var int */
public int $campaignAndOfferTotalCurrent=0,
/** @var int */
public int $campaignAndOfferTotalPending=0,
/** @var int */
public int $offerTotal=0,
/** @var int */
public int $offerTotalCurrent=0,
/** @var int */
public int $offerTotalPending=0,
/** @var string */
public string $creation='',
/** @var string */
public string $modified='',
/** @var int */
public int $electricRange=0,
/** @var int */
public int $electricConsumption=0,
/** @var DateTime|null */
public ?DateTime $portArrivalDate=null,
/** @var int|null */
public ?int $daysSincePortArrival=null,
/** @var float */
public float $retailPriceIncVAT=0.0,
/** @var string */
public string $bodyStyle='',
/** @var string */
public string $upholstery='',
/** @var string */
public string $upholsteryCode='',
/** @var string */
public string $upholsteryType='',
/** @var array<string>|null */
public ?array $packageNames=null,
/** @var string */
public string $line='',
/** @var float */
public float $currentRetailerOfferPrice=0.0,
/** @var string */
public string $retailPrice='',
/** @var bool|null */
public ?bool $vatQualifying=null,
/** @var int */
public int $retailerId=0,
/** @var string */
public string $gssnId='',
/** @var bool|null */
public ?bool $noImage=null,
/** @var string */
public string $imageUrl='',
/** @var bool|null */
public ?bool $isAvailableOnline=null,
/** @var bool|null */
public ?bool $isBackOrdered=null,
/** @var string */
public string $creationDate='',
/** @var string */
public string $maintenanceDate='',
/** @var string */
public string $registrationNumber='',
/** @var DateTime|null */
public ?DateTime $registrationDate=null,
/** @var int|null */
public ?int $mileage=null,
/** @var DateTime|null */
public ?DateTime $tradeInDate=null,
/** @var string */
public string $source='',
/** @var string */
public string $vehicleType='',
/** @var string */
public string $offerAmount='',
/** @var string */
public string $offerExpiry='',
/** @var int[] */
public array $activeOffers=[],
/** @var int */
public int $campaignMessagesTotal=0,
/** @var bool|null */
public ?bool $underOffer=null,
/** @var bool|null */
public ?bool $isDisplayStock=null,
/** @var string */
public string $displayRetailer='',
/** @var string */
public string $displayRetailerGssnId='',
/** @var string */
public string $location='',
/** @var string */
public string $account='',
/** @var string */
public string $accountType='',
/** @var string */
public string $usageCode='',
/** @var string */
public string $bm7NST='',
/** @var bool|null */
public ?bool $isSellable=null,
/** @var bool|null */
public ?bool $secured=null,
/** @var bool|null */
public ?bool $specialist=null,
/** @var bool|null */
public ?bool $isMotabilityRetailer=null,
/** @var string */
public string $upholsteryDescription='',
/** @var bool|null */
public ?bool $inBackOrderAccount=null,
/** @var string|null */
public ?string $fullModelYearCode=null,
/** @var DateTime|null */
public ?DateTime $productionDate=null,
/** @var string */
public string $baumuster='',
/** @var bool|null */
public ?bool $isMotability=null,
/** @var float|null */
public ?float $pipAdvanceRentalGross=null,
/** @var float|null */
public ?float $wpmsAdvanceRentalGross=null,
/** @var array<string>|null */
public ?array $ispVehicleCustomerDescriptions=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['vin'])) $this->vin = $o['vin'];
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['model'])) $this->model = $o['model'];
if (isset($o['otr'])) $this->otr = $o['otr'];
if (isset($o['retailPriceExVAT'])) $this->retailPriceExVAT = $o['retailPriceExVAT'];
if (isset($o['actualPrice'])) $this->actualPrice = $o['actualPrice'];
if (isset($o['fuelType'])) $this->fuelType = $o['fuelType'];
if (isset($o['transmission'])) $this->transmission = $o['transmission'];
if (isset($o['transmissionType'])) $this->transmissionType = $o['transmissionType'];
if (isset($o['colour'])) $this->colour = $o['colour'];
if (isset($o['colourCode'])) $this->colourCode = $o['colourCode'];
if (isset($o['colourDescription'])) $this->colourDescription = $o['colourDescription'];
if (isset($o['commissionNumber'])) $this->commissionNumber = $o['commissionNumber'];
if (isset($o['offerAvailable'])) $this->offerAvailable = $o['offerAvailable'];
if (isset($o['campaignDiscountOfferTotal'])) $this->campaignDiscountOfferTotal = $o['campaignDiscountOfferTotal'];
if (isset($o['campaignDiscountOfferTotalCurrent'])) $this->campaignDiscountOfferTotalCurrent = $o['campaignDiscountOfferTotalCurrent'];
if (isset($o['campaignDiscountOfferTotalPending'])) $this->campaignDiscountOfferTotalPending = $o['campaignDiscountOfferTotalPending'];
if (isset($o['campaignServiceOfferTotal'])) $this->campaignServiceOfferTotal = $o['campaignServiceOfferTotal'];
if (isset($o['campaignServiceOfferTotalCurrent'])) $this->campaignServiceOfferTotalCurrent = $o['campaignServiceOfferTotalCurrent'];
if (isset($o['campaignServiceOfferTotalPending'])) $this->campaignServiceOfferTotalPending = $o['campaignServiceOfferTotalPending'];
if (isset($o['campaignCustomOfferTotal'])) $this->campaignCustomOfferTotal = $o['campaignCustomOfferTotal'];
if (isset($o['campaignPersonalisedOfferTotalCurrent'])) $this->campaignPersonalisedOfferTotalCurrent = $o['campaignPersonalisedOfferTotalCurrent'];
if (isset($o['campaignPersonalisedOfferTotalPending'])) $this->campaignPersonalisedOfferTotalPending = $o['campaignPersonalisedOfferTotalPending'];
if (isset($o['campaignPersonalisedOfferTotal'])) $this->campaignPersonalisedOfferTotal = $o['campaignPersonalisedOfferTotal'];
if (isset($o['campaignCustomOfferTotalCurrent'])) $this->campaignCustomOfferTotalCurrent = $o['campaignCustomOfferTotalCurrent'];
if (isset($o['campaignCustomOfferTotalPending'])) $this->campaignCustomOfferTotalPending = $o['campaignCustomOfferTotalPending'];
if (isset($o['campaignOtherOfferTotal'])) $this->campaignOtherOfferTotal = $o['campaignOtherOfferTotal'];
if (isset($o['campaignOtherOfferTotalCurrent'])) $this->campaignOtherOfferTotalCurrent = $o['campaignOtherOfferTotalCurrent'];
if (isset($o['campaignOtherOfferTotalPending'])) $this->campaignOtherOfferTotalPending = $o['campaignOtherOfferTotalPending'];
if (isset($o['retailerDiscountOfferTotal'])) $this->retailerDiscountOfferTotal = $o['retailerDiscountOfferTotal'];
if (isset($o['retailerDiscountOfferTotalCurrent'])) $this->retailerDiscountOfferTotalCurrent = $o['retailerDiscountOfferTotalCurrent'];
if (isset($o['retailerDiscountOfferTotalPending'])) $this->retailerDiscountOfferTotalPending = $o['retailerDiscountOfferTotalPending'];
if (isset($o['retailerServiceOfferTotal'])) $this->retailerServiceOfferTotal = $o['retailerServiceOfferTotal'];
if (isset($o['retailerServiceOfferTotalCurrent'])) $this->retailerServiceOfferTotalCurrent = $o['retailerServiceOfferTotalCurrent'];
if (isset($o['retailerServiceOfferTotalPending'])) $this->retailerServiceOfferTotalPending = $o['retailerServiceOfferTotalPending'];
if (isset($o['retailerCustomOfferTotal'])) $this->retailerCustomOfferTotal = $o['retailerCustomOfferTotal'];
if (isset($o['retailerCustomOfferTotalCurrent'])) $this->retailerCustomOfferTotalCurrent = $o['retailerCustomOfferTotalCurrent'];
if (isset($o['retailerCustomOfferTotalPending'])) $this->retailerCustomOfferTotalPending = $o['retailerCustomOfferTotalPending'];
if (isset($o['retailerWarrantyOfferTotal'])) $this->retailerWarrantyOfferTotal = $o['retailerWarrantyOfferTotal'];
if (isset($o['retailerWarrantyOfferTotalCurrent'])) $this->retailerWarrantyOfferTotalCurrent = $o['retailerWarrantyOfferTotalCurrent'];
if (isset($o['retailerWarrantyOfferTotalPending'])) $this->retailerWarrantyOfferTotalPending = $o['retailerWarrantyOfferTotalPending'];
if (isset($o['retailerOfferTotal'])) $this->retailerOfferTotal = $o['retailerOfferTotal'];
if (isset($o['retailerOfferTotalCurrent'])) $this->retailerOfferTotalCurrent = $o['retailerOfferTotalCurrent'];
if (isset($o['retailerOfferTotalPending'])) $this->retailerOfferTotalPending = $o['retailerOfferTotalPending'];
if (isset($o['campaignOfferTotal'])) $this->campaignOfferTotal = $o['campaignOfferTotal'];
if (isset($o['campaignOfferTotalCurrent'])) $this->campaignOfferTotalCurrent = $o['campaignOfferTotalCurrent'];
if (isset($o['campaignOfferTotalPending'])) $this->campaignOfferTotalPending = $o['campaignOfferTotalPending'];
if (isset($o['campaignAndOfferTotal'])) $this->campaignAndOfferTotal = $o['campaignAndOfferTotal'];
if (isset($o['campaignAndOfferTotalCurrent'])) $this->campaignAndOfferTotalCurrent = $o['campaignAndOfferTotalCurrent'];
if (isset($o['campaignAndOfferTotalPending'])) $this->campaignAndOfferTotalPending = $o['campaignAndOfferTotalPending'];
if (isset($o['offerTotal'])) $this->offerTotal = $o['offerTotal'];
if (isset($o['offerTotalCurrent'])) $this->offerTotalCurrent = $o['offerTotalCurrent'];
if (isset($o['offerTotalPending'])) $this->offerTotalPending = $o['offerTotalPending'];
if (isset($o['creation'])) $this->creation = $o['creation'];
if (isset($o['modified'])) $this->modified = $o['modified'];
if (isset($o['electricRange'])) $this->electricRange = $o['electricRange'];
if (isset($o['electricConsumption'])) $this->electricConsumption = $o['electricConsumption'];
if (isset($o['portArrivalDate'])) $this->portArrivalDate = JsonConverters::from('DateTime', $o['portArrivalDate']);
if (isset($o['daysSincePortArrival'])) $this->daysSincePortArrival = $o['daysSincePortArrival'];
if (isset($o['retailPriceIncVAT'])) $this->retailPriceIncVAT = $o['retailPriceIncVAT'];
if (isset($o['bodyStyle'])) $this->bodyStyle = $o['bodyStyle'];
if (isset($o['upholstery'])) $this->upholstery = $o['upholstery'];
if (isset($o['upholsteryCode'])) $this->upholsteryCode = $o['upholsteryCode'];
if (isset($o['upholsteryType'])) $this->upholsteryType = $o['upholsteryType'];
if (isset($o['packageNames'])) $this->packageNames = JsonConverters::fromArray('string', $o['packageNames']);
if (isset($o['line'])) $this->line = $o['line'];
if (isset($o['currentRetailerOfferPrice'])) $this->currentRetailerOfferPrice = $o['currentRetailerOfferPrice'];
if (isset($o['retailPrice'])) $this->retailPrice = $o['retailPrice'];
if (isset($o['vatQualifying'])) $this->vatQualifying = $o['vatQualifying'];
if (isset($o['retailerId'])) $this->retailerId = $o['retailerId'];
if (isset($o['gssnId'])) $this->gssnId = $o['gssnId'];
if (isset($o['noImage'])) $this->noImage = $o['noImage'];
if (isset($o['imageUrl'])) $this->imageUrl = $o['imageUrl'];
if (isset($o['isAvailableOnline'])) $this->isAvailableOnline = $o['isAvailableOnline'];
if (isset($o['isBackOrdered'])) $this->isBackOrdered = $o['isBackOrdered'];
if (isset($o['creationDate'])) $this->creationDate = $o['creationDate'];
if (isset($o['maintenanceDate'])) $this->maintenanceDate = $o['maintenanceDate'];
if (isset($o['registrationNumber'])) $this->registrationNumber = $o['registrationNumber'];
if (isset($o['registrationDate'])) $this->registrationDate = JsonConverters::from('DateTime', $o['registrationDate']);
if (isset($o['mileage'])) $this->mileage = $o['mileage'];
if (isset($o['tradeInDate'])) $this->tradeInDate = JsonConverters::from('DateTime', $o['tradeInDate']);
if (isset($o['source'])) $this->source = $o['source'];
if (isset($o['vehicleType'])) $this->vehicleType = $o['vehicleType'];
if (isset($o['offerAmount'])) $this->offerAmount = $o['offerAmount'];
if (isset($o['offerExpiry'])) $this->offerExpiry = $o['offerExpiry'];
if (isset($o['activeOffers'])) $this->activeOffers = JsonConverters::fromArray('int', $o['activeOffers']);
if (isset($o['campaignMessagesTotal'])) $this->campaignMessagesTotal = $o['campaignMessagesTotal'];
if (isset($o['underOffer'])) $this->underOffer = $o['underOffer'];
if (isset($o['isDisplayStock'])) $this->isDisplayStock = $o['isDisplayStock'];
if (isset($o['displayRetailer'])) $this->displayRetailer = $o['displayRetailer'];
if (isset($o['displayRetailerGssnId'])) $this->displayRetailerGssnId = $o['displayRetailerGssnId'];
if (isset($o['location'])) $this->location = $o['location'];
if (isset($o['account'])) $this->account = $o['account'];
if (isset($o['accountType'])) $this->accountType = $o['accountType'];
if (isset($o['usageCode'])) $this->usageCode = $o['usageCode'];
if (isset($o['bm7NST'])) $this->bm7NST = $o['bm7NST'];
if (isset($o['isSellable'])) $this->isSellable = $o['isSellable'];
if (isset($o['secured'])) $this->secured = $o['secured'];
if (isset($o['specialist'])) $this->specialist = $o['specialist'];
if (isset($o['isMotabilityRetailer'])) $this->isMotabilityRetailer = $o['isMotabilityRetailer'];
if (isset($o['upholsteryDescription'])) $this->upholsteryDescription = $o['upholsteryDescription'];
if (isset($o['inBackOrderAccount'])) $this->inBackOrderAccount = $o['inBackOrderAccount'];
if (isset($o['fullModelYearCode'])) $this->fullModelYearCode = $o['fullModelYearCode'];
if (isset($o['productionDate'])) $this->productionDate = JsonConverters::from('DateTime', $o['productionDate']);
if (isset($o['baumuster'])) $this->baumuster = $o['baumuster'];
if (isset($o['isMotability'])) $this->isMotability = $o['isMotability'];
if (isset($o['pipAdvanceRentalGross'])) $this->pipAdvanceRentalGross = $o['pipAdvanceRentalGross'];
if (isset($o['wpmsAdvanceRentalGross'])) $this->wpmsAdvanceRentalGross = $o['wpmsAdvanceRentalGross'];
if (isset($o['ispVehicleCustomerDescriptions'])) $this->ispVehicleCustomerDescriptions = JsonConverters::fromArray('string', $o['ispVehicleCustomerDescriptions']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->vin)) $o['vin'] = $this->vin;
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->model)) $o['model'] = $this->model;
if (isset($this->otr)) $o['otr'] = $this->otr;
if (isset($this->retailPriceExVAT)) $o['retailPriceExVAT'] = $this->retailPriceExVAT;
if (isset($this->actualPrice)) $o['actualPrice'] = $this->actualPrice;
if (isset($this->fuelType)) $o['fuelType'] = $this->fuelType;
if (isset($this->transmission)) $o['transmission'] = $this->transmission;
if (isset($this->transmissionType)) $o['transmissionType'] = $this->transmissionType;
if (isset($this->colour)) $o['colour'] = $this->colour;
if (isset($this->colourCode)) $o['colourCode'] = $this->colourCode;
if (isset($this->colourDescription)) $o['colourDescription'] = $this->colourDescription;
if (isset($this->commissionNumber)) $o['commissionNumber'] = $this->commissionNumber;
if (isset($this->offerAvailable)) $o['offerAvailable'] = $this->offerAvailable;
if (isset($this->campaignDiscountOfferTotal)) $o['campaignDiscountOfferTotal'] = $this->campaignDiscountOfferTotal;
if (isset($this->campaignDiscountOfferTotalCurrent)) $o['campaignDiscountOfferTotalCurrent'] = $this->campaignDiscountOfferTotalCurrent;
if (isset($this->campaignDiscountOfferTotalPending)) $o['campaignDiscountOfferTotalPending'] = $this->campaignDiscountOfferTotalPending;
if (isset($this->campaignServiceOfferTotal)) $o['campaignServiceOfferTotal'] = $this->campaignServiceOfferTotal;
if (isset($this->campaignServiceOfferTotalCurrent)) $o['campaignServiceOfferTotalCurrent'] = $this->campaignServiceOfferTotalCurrent;
if (isset($this->campaignServiceOfferTotalPending)) $o['campaignServiceOfferTotalPending'] = $this->campaignServiceOfferTotalPending;
if (isset($this->campaignCustomOfferTotal)) $o['campaignCustomOfferTotal'] = $this->campaignCustomOfferTotal;
if (isset($this->campaignPersonalisedOfferTotalCurrent)) $o['campaignPersonalisedOfferTotalCurrent'] = $this->campaignPersonalisedOfferTotalCurrent;
if (isset($this->campaignPersonalisedOfferTotalPending)) $o['campaignPersonalisedOfferTotalPending'] = $this->campaignPersonalisedOfferTotalPending;
if (isset($this->campaignPersonalisedOfferTotal)) $o['campaignPersonalisedOfferTotal'] = $this->campaignPersonalisedOfferTotal;
if (isset($this->campaignCustomOfferTotalCurrent)) $o['campaignCustomOfferTotalCurrent'] = $this->campaignCustomOfferTotalCurrent;
if (isset($this->campaignCustomOfferTotalPending)) $o['campaignCustomOfferTotalPending'] = $this->campaignCustomOfferTotalPending;
if (isset($this->campaignOtherOfferTotal)) $o['campaignOtherOfferTotal'] = $this->campaignOtherOfferTotal;
if (isset($this->campaignOtherOfferTotalCurrent)) $o['campaignOtherOfferTotalCurrent'] = $this->campaignOtherOfferTotalCurrent;
if (isset($this->campaignOtherOfferTotalPending)) $o['campaignOtherOfferTotalPending'] = $this->campaignOtherOfferTotalPending;
if (isset($this->retailerDiscountOfferTotal)) $o['retailerDiscountOfferTotal'] = $this->retailerDiscountOfferTotal;
if (isset($this->retailerDiscountOfferTotalCurrent)) $o['retailerDiscountOfferTotalCurrent'] = $this->retailerDiscountOfferTotalCurrent;
if (isset($this->retailerDiscountOfferTotalPending)) $o['retailerDiscountOfferTotalPending'] = $this->retailerDiscountOfferTotalPending;
if (isset($this->retailerServiceOfferTotal)) $o['retailerServiceOfferTotal'] = $this->retailerServiceOfferTotal;
if (isset($this->retailerServiceOfferTotalCurrent)) $o['retailerServiceOfferTotalCurrent'] = $this->retailerServiceOfferTotalCurrent;
if (isset($this->retailerServiceOfferTotalPending)) $o['retailerServiceOfferTotalPending'] = $this->retailerServiceOfferTotalPending;
if (isset($this->retailerCustomOfferTotal)) $o['retailerCustomOfferTotal'] = $this->retailerCustomOfferTotal;
if (isset($this->retailerCustomOfferTotalCurrent)) $o['retailerCustomOfferTotalCurrent'] = $this->retailerCustomOfferTotalCurrent;
if (isset($this->retailerCustomOfferTotalPending)) $o['retailerCustomOfferTotalPending'] = $this->retailerCustomOfferTotalPending;
if (isset($this->retailerWarrantyOfferTotal)) $o['retailerWarrantyOfferTotal'] = $this->retailerWarrantyOfferTotal;
if (isset($this->retailerWarrantyOfferTotalCurrent)) $o['retailerWarrantyOfferTotalCurrent'] = $this->retailerWarrantyOfferTotalCurrent;
if (isset($this->retailerWarrantyOfferTotalPending)) $o['retailerWarrantyOfferTotalPending'] = $this->retailerWarrantyOfferTotalPending;
if (isset($this->retailerOfferTotal)) $o['retailerOfferTotal'] = $this->retailerOfferTotal;
if (isset($this->retailerOfferTotalCurrent)) $o['retailerOfferTotalCurrent'] = $this->retailerOfferTotalCurrent;
if (isset($this->retailerOfferTotalPending)) $o['retailerOfferTotalPending'] = $this->retailerOfferTotalPending;
if (isset($this->campaignOfferTotal)) $o['campaignOfferTotal'] = $this->campaignOfferTotal;
if (isset($this->campaignOfferTotalCurrent)) $o['campaignOfferTotalCurrent'] = $this->campaignOfferTotalCurrent;
if (isset($this->campaignOfferTotalPending)) $o['campaignOfferTotalPending'] = $this->campaignOfferTotalPending;
if (isset($this->campaignAndOfferTotal)) $o['campaignAndOfferTotal'] = $this->campaignAndOfferTotal;
if (isset($this->campaignAndOfferTotalCurrent)) $o['campaignAndOfferTotalCurrent'] = $this->campaignAndOfferTotalCurrent;
if (isset($this->campaignAndOfferTotalPending)) $o['campaignAndOfferTotalPending'] = $this->campaignAndOfferTotalPending;
if (isset($this->offerTotal)) $o['offerTotal'] = $this->offerTotal;
if (isset($this->offerTotalCurrent)) $o['offerTotalCurrent'] = $this->offerTotalCurrent;
if (isset($this->offerTotalPending)) $o['offerTotalPending'] = $this->offerTotalPending;
if (isset($this->creation)) $o['creation'] = $this->creation;
if (isset($this->modified)) $o['modified'] = $this->modified;
if (isset($this->electricRange)) $o['electricRange'] = $this->electricRange;
if (isset($this->electricConsumption)) $o['electricConsumption'] = $this->electricConsumption;
if (isset($this->portArrivalDate)) $o['portArrivalDate'] = JsonConverters::to('DateTime', $this->portArrivalDate);
if (isset($this->daysSincePortArrival)) $o['daysSincePortArrival'] = $this->daysSincePortArrival;
if (isset($this->retailPriceIncVAT)) $o['retailPriceIncVAT'] = $this->retailPriceIncVAT;
if (isset($this->bodyStyle)) $o['bodyStyle'] = $this->bodyStyle;
if (isset($this->upholstery)) $o['upholstery'] = $this->upholstery;
if (isset($this->upholsteryCode)) $o['upholsteryCode'] = $this->upholsteryCode;
if (isset($this->upholsteryType)) $o['upholsteryType'] = $this->upholsteryType;
if (isset($this->packageNames)) $o['packageNames'] = JsonConverters::toArray('string', $this->packageNames);
if (isset($this->line)) $o['line'] = $this->line;
if (isset($this->currentRetailerOfferPrice)) $o['currentRetailerOfferPrice'] = $this->currentRetailerOfferPrice;
if (isset($this->retailPrice)) $o['retailPrice'] = $this->retailPrice;
if (isset($this->vatQualifying)) $o['vatQualifying'] = $this->vatQualifying;
if (isset($this->retailerId)) $o['retailerId'] = $this->retailerId;
if (isset($this->gssnId)) $o['gssnId'] = $this->gssnId;
if (isset($this->noImage)) $o['noImage'] = $this->noImage;
if (isset($this->imageUrl)) $o['imageUrl'] = $this->imageUrl;
if (isset($this->isAvailableOnline)) $o['isAvailableOnline'] = $this->isAvailableOnline;
if (isset($this->isBackOrdered)) $o['isBackOrdered'] = $this->isBackOrdered;
if (isset($this->creationDate)) $o['creationDate'] = $this->creationDate;
if (isset($this->maintenanceDate)) $o['maintenanceDate'] = $this->maintenanceDate;
if (isset($this->registrationNumber)) $o['registrationNumber'] = $this->registrationNumber;
if (isset($this->registrationDate)) $o['registrationDate'] = JsonConverters::to('DateTime', $this->registrationDate);
if (isset($this->mileage)) $o['mileage'] = $this->mileage;
if (isset($this->tradeInDate)) $o['tradeInDate'] = JsonConverters::to('DateTime', $this->tradeInDate);
if (isset($this->source)) $o['source'] = $this->source;
if (isset($this->vehicleType)) $o['vehicleType'] = $this->vehicleType;
if (isset($this->offerAmount)) $o['offerAmount'] = $this->offerAmount;
if (isset($this->offerExpiry)) $o['offerExpiry'] = $this->offerExpiry;
if (isset($this->activeOffers)) $o['activeOffers'] = JsonConverters::toArray('int', $this->activeOffers);
if (isset($this->campaignMessagesTotal)) $o['campaignMessagesTotal'] = $this->campaignMessagesTotal;
if (isset($this->underOffer)) $o['underOffer'] = $this->underOffer;
if (isset($this->isDisplayStock)) $o['isDisplayStock'] = $this->isDisplayStock;
if (isset($this->displayRetailer)) $o['displayRetailer'] = $this->displayRetailer;
if (isset($this->displayRetailerGssnId)) $o['displayRetailerGssnId'] = $this->displayRetailerGssnId;
if (isset($this->location)) $o['location'] = $this->location;
if (isset($this->account)) $o['account'] = $this->account;
if (isset($this->accountType)) $o['accountType'] = $this->accountType;
if (isset($this->usageCode)) $o['usageCode'] = $this->usageCode;
if (isset($this->bm7NST)) $o['bm7NST'] = $this->bm7NST;
if (isset($this->isSellable)) $o['isSellable'] = $this->isSellable;
if (isset($this->secured)) $o['secured'] = $this->secured;
if (isset($this->specialist)) $o['specialist'] = $this->specialist;
if (isset($this->isMotabilityRetailer)) $o['isMotabilityRetailer'] = $this->isMotabilityRetailer;
if (isset($this->upholsteryDescription)) $o['upholsteryDescription'] = $this->upholsteryDescription;
if (isset($this->inBackOrderAccount)) $o['inBackOrderAccount'] = $this->inBackOrderAccount;
if (isset($this->fullModelYearCode)) $o['fullModelYearCode'] = $this->fullModelYearCode;
if (isset($this->productionDate)) $o['productionDate'] = JsonConverters::to('DateTime', $this->productionDate);
if (isset($this->baumuster)) $o['baumuster'] = $this->baumuster;
if (isset($this->isMotability)) $o['isMotability'] = $this->isMotability;
if (isset($this->pipAdvanceRentalGross)) $o['pipAdvanceRentalGross'] = $this->pipAdvanceRentalGross;
if (isset($this->wpmsAdvanceRentalGross)) $o['wpmsAdvanceRentalGross'] = $this->wpmsAdvanceRentalGross;
if (isset($this->ispVehicleCustomerDescriptions)) $o['ispVehicleCustomerDescriptions'] = JsonConverters::toArray('string', $this->ispVehicleCustomerDescriptions);
return empty($o) ? new class(){} : $o;
}
}
class VehicleData extends VehicleDataBase implements JsonSerializable
{
/**
* @param string $vin
* @param string $description
* @param string $model
* @param string $otr
* @param string $retailPriceExVAT
* @param string $actualPrice
* @param string $fuelType
* @param string $transmission
* @param string $transmissionType
* @param string $colour
* @param string $colourCode
* @param string $colourDescription
* @param string $commissionNumber
* @param bool|null $offerAvailable
* @param int $campaignDiscountOfferTotal
* @param int $campaignDiscountOfferTotalCurrent
* @param int $campaignDiscountOfferTotalPending
* @param int $campaignServiceOfferTotal
* @param int $campaignServiceOfferTotalCurrent
* @param int $campaignServiceOfferTotalPending
* @param int $campaignCustomOfferTotal
* @param int $campaignPersonalisedOfferTotalCurrent
* @param int $campaignPersonalisedOfferTotalPending
* @param int $campaignPersonalisedOfferTotal
* @param int $campaignCustomOfferTotalCurrent
* @param int $campaignCustomOfferTotalPending
* @param int $campaignOtherOfferTotal
* @param int $campaignOtherOfferTotalCurrent
* @param int $campaignOtherOfferTotalPending
* @param int $retailerDiscountOfferTotal
* @param int $retailerDiscountOfferTotalCurrent
* @param int $retailerDiscountOfferTotalPending
* @param int $retailerServiceOfferTotal
* @param int $retailerServiceOfferTotalCurrent
* @param int $retailerServiceOfferTotalPending
* @param int $retailerCustomOfferTotal
* @param int $retailerCustomOfferTotalCurrent
* @param int $retailerCustomOfferTotalPending
* @param int $retailerWarrantyOfferTotal
* @param int $retailerWarrantyOfferTotalCurrent
* @param int $retailerWarrantyOfferTotalPending
* @param int $retailerOfferTotal
* @param int $retailerOfferTotalCurrent
* @param int $retailerOfferTotalPending
* @param int $campaignOfferTotal
* @param int $campaignOfferTotalCurrent
* @param int $campaignOfferTotalPending
* @param int $campaignAndOfferTotal
* @param int $campaignAndOfferTotalCurrent
* @param int $campaignAndOfferTotalPending
* @param int $offerTotal
* @param int $offerTotalCurrent
* @param int $offerTotalPending
* @param string $creation
* @param string $modified
* @param int $electricRange
* @param int $electricConsumption
* @param DateTime|null $portArrivalDate
* @param int|null $daysSincePortArrival
* @param float $retailPriceIncVAT
* @param string $bodyStyle
* @param string $upholstery
* @param string $upholsteryCode
* @param string $upholsteryType
* @param array<string>|null $packageNames
* @param string $line
* @param float $currentRetailerOfferPrice
* @param string $retailPrice
* @param bool|null $vatQualifying
* @param int $retailerId
* @param string $gssnId
* @param bool|null $noImage
* @param string $imageUrl
* @param bool|null $isAvailableOnline
* @param bool|null $isBackOrdered
* @param string $creationDate
* @param string $maintenanceDate
* @param string $registrationNumber
* @param DateTime|null $registrationDate
* @param int|null $mileage
* @param DateTime|null $tradeInDate
* @param string $source
* @param string $vehicleType
* @param string $offerAmount
* @param string $offerExpiry
* @param int[] $activeOffers
* @param int $campaignMessagesTotal
* @param bool|null $underOffer
* @param bool|null $isDisplayStock
* @param string $displayRetailer
* @param string $displayRetailerGssnId
* @param string $location
* @param string $account
* @param string $accountType
* @param string $usageCode
* @param string $bm7NST
* @param bool|null $isSellable
* @param bool|null $secured
* @param bool|null $specialist
* @param bool|null $isMotabilityRetailer
* @param string $upholsteryDescription
* @param bool|null $inBackOrderAccount
* @param string|null $fullModelYearCode
* @param DateTime|null $productionDate
* @param string $baumuster
* @param bool|null $isMotability
* @param float|null $pipAdvanceRentalGross
* @param float|null $wpmsAdvanceRentalGross
* @param array<string>|null $ispVehicleCustomerDescriptions
*/
public function __construct(
string $vin='',
string $description='',
string $model='',
string $otr='',
string $retailPriceExVAT='',
string $actualPrice='',
string $fuelType='',
string $transmission='',
string $transmissionType='',
string $colour='',
string $colourCode='',
string $colourDescription='',
string $commissionNumber='',
?bool $offerAvailable=null,
int $campaignDiscountOfferTotal=0,
int $campaignDiscountOfferTotalCurrent=0,
int $campaignDiscountOfferTotalPending=0,
int $campaignServiceOfferTotal=0,
int $campaignServiceOfferTotalCurrent=0,
int $campaignServiceOfferTotalPending=0,
int $campaignCustomOfferTotal=0,
int $campaignPersonalisedOfferTotalCurrent=0,
int $campaignPersonalisedOfferTotalPending=0,
int $campaignPersonalisedOfferTotal=0,
int $campaignCustomOfferTotalCurrent=0,
int $campaignCustomOfferTotalPending=0,
int $campaignOtherOfferTotal=0,
int $campaignOtherOfferTotalCurrent=0,
int $campaignOtherOfferTotalPending=0,
int $retailerDiscountOfferTotal=0,
int $retailerDiscountOfferTotalCurrent=0,
int $retailerDiscountOfferTotalPending=0,
int $retailerServiceOfferTotal=0,
int $retailerServiceOfferTotalCurrent=0,
int $retailerServiceOfferTotalPending=0,
int $retailerCustomOfferTotal=0,
int $retailerCustomOfferTotalCurrent=0,
int $retailerCustomOfferTotalPending=0,
int $retailerWarrantyOfferTotal=0,
int $retailerWarrantyOfferTotalCurrent=0,
int $retailerWarrantyOfferTotalPending=0,
int $retailerOfferTotal=0,
int $retailerOfferTotalCurrent=0,
int $retailerOfferTotalPending=0,
int $campaignOfferTotal=0,
int $campaignOfferTotalCurrent=0,
int $campaignOfferTotalPending=0,
int $campaignAndOfferTotal=0,
int $campaignAndOfferTotalCurrent=0,
int $campaignAndOfferTotalPending=0,
int $offerTotal=0,
int $offerTotalCurrent=0,
int $offerTotalPending=0,
string $creation='',
string $modified='',
int $electricRange=0,
int $electricConsumption=0,
?DateTime $portArrivalDate=null,
?int $daysSincePortArrival=null,
float $retailPriceIncVAT=0.0,
string $bodyStyle='',
string $upholstery='',
string $upholsteryCode='',
string $upholsteryType='',
?array $packageNames=null,
string $line='',
float $currentRetailerOfferPrice=0.0,
string $retailPrice='',
?bool $vatQualifying=null,
int $retailerId=0,
string $gssnId='',
?bool $noImage=null,
string $imageUrl='',
?bool $isAvailableOnline=null,
?bool $isBackOrdered=null,
string $creationDate='',
string $maintenanceDate='',
string $registrationNumber='',
?DateTime $registrationDate=null,
?int $mileage=null,
?DateTime $tradeInDate=null,
string $source='',
string $vehicleType='',
string $offerAmount='',
string $offerExpiry='',
array $activeOffers=[],
int $campaignMessagesTotal=0,
?bool $underOffer=null,
?bool $isDisplayStock=null,
string $displayRetailer='',
string $displayRetailerGssnId='',
string $location='',
string $account='',
string $accountType='',
string $usageCode='',
string $bm7NST='',
?bool $isSellable=null,
?bool $secured=null,
?bool $specialist=null,
?bool $isMotabilityRetailer=null,
string $upholsteryDescription='',
?bool $inBackOrderAccount=null,
?string $fullModelYearCode=null,
?DateTime $productionDate=null,
string $baumuster='',
?bool $isMotability=null,
?float $pipAdvanceRentalGross=null,
?float $wpmsAdvanceRentalGross=null,
?array $ispVehicleCustomerDescriptions=null,
/** @var string */
public string $engine=''
) {
parent::__construct($vin,$description,$model,$otr,$retailPriceExVAT,$actualPrice,$fuelType,$transmission,$transmissionType,$colour,$colourCode,$colourDescription,$commissionNumber,$offerAvailable,$campaignDiscountOfferTotal,$campaignDiscountOfferTotalCurrent,$campaignDiscountOfferTotalPending,$campaignServiceOfferTotal,$campaignServiceOfferTotalCurrent,$campaignServiceOfferTotalPending,$campaignCustomOfferTotal,$campaignPersonalisedOfferTotalCurrent,$campaignPersonalisedOfferTotalPending,$campaignPersonalisedOfferTotal,$campaignCustomOfferTotalCurrent,$campaignCustomOfferTotalPending,$campaignOtherOfferTotal,$campaignOtherOfferTotalCurrent,$campaignOtherOfferTotalPending,$retailerDiscountOfferTotal,$retailerDiscountOfferTotalCurrent,$retailerDiscountOfferTotalPending,$retailerServiceOfferTotal,$retailerServiceOfferTotalCurrent,$retailerServiceOfferTotalPending,$retailerCustomOfferTotal,$retailerCustomOfferTotalCurrent,$retailerCustomOfferTotalPending,$retailerWarrantyOfferTotal,$retailerWarrantyOfferTotalCurrent,$retailerWarrantyOfferTotalPending,$retailerOfferTotal,$retailerOfferTotalCurrent,$retailerOfferTotalPending,$campaignOfferTotal,$campaignOfferTotalCurrent,$campaignOfferTotalPending,$campaignAndOfferTotal,$campaignAndOfferTotalCurrent,$campaignAndOfferTotalPending,$offerTotal,$offerTotalCurrent,$offerTotalPending,$creation,$modified,$electricRange,$electricConsumption,$portArrivalDate,$daysSincePortArrival,$retailPriceIncVAT,$bodyStyle,$upholstery,$upholsteryCode,$upholsteryType,$packageNames,$line,$currentRetailerOfferPrice,$retailPrice,$vatQualifying,$retailerId,$gssnId,$noImage,$imageUrl,$isAvailableOnline,$isBackOrdered,$creationDate,$maintenanceDate,$registrationNumber,$registrationDate,$mileage,$tradeInDate,$source,$vehicleType,$offerAmount,$offerExpiry,$activeOffers,$campaignMessagesTotal,$underOffer,$isDisplayStock,$displayRetailer,$displayRetailerGssnId,$location,$account,$accountType,$usageCode,$bm7NST,$isSellable,$secured,$specialist,$isMotabilityRetailer,$upholsteryDescription,$inBackOrderAccount,$fullModelYearCode,$productionDate,$baumuster,$isMotability,$pipAdvanceRentalGross,$wpmsAdvanceRentalGross,$ispVehicleCustomerDescriptions);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['engine'])) $this->engine = $o['engine'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->engine)) $o['engine'] = $this->engine;
return empty($o) ? new class(){} : $o;
}
}
class Equipment implements JsonSerializable
{
public function __construct(
/** @var int */
public int $id=0,
/** @var string|null */
public ?string $code=null,
/** @var string|null */
public ?string $description=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['code'])) $this->code = $o['code'];
if (isset($o['description'])) $this->description = $o['description'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->code)) $o['code'] = $this->code;
if (isset($this->description)) $o['description'] = $this->description;
return empty($o) ? new class(){} : $o;
}
}
class VehicleIdentifierData extends VehicleData implements JsonSerializable
{
/**
* @param string $vin
* @param string $description
* @param string $model
* @param string $otr
* @param string $retailPriceExVAT
* @param string $actualPrice
* @param string $fuelType
* @param string $transmission
* @param string $transmissionType
* @param string $colour
* @param string $colourCode
* @param string $colourDescription
* @param string $commissionNumber
* @param bool|null $offerAvailable
* @param int $campaignDiscountOfferTotal
* @param int $campaignDiscountOfferTotalCurrent
* @param int $campaignDiscountOfferTotalPending
* @param int $campaignServiceOfferTotal
* @param int $campaignServiceOfferTotalCurrent
* @param int $campaignServiceOfferTotalPending
* @param int $campaignCustomOfferTotal
* @param int $campaignPersonalisedOfferTotalCurrent
* @param int $campaignPersonalisedOfferTotalPending
* @param int $campaignPersonalisedOfferTotal
* @param int $campaignCustomOfferTotalCurrent
* @param int $campaignCustomOfferTotalPending
* @param int $campaignOtherOfferTotal
* @param int $campaignOtherOfferTotalCurrent
* @param int $campaignOtherOfferTotalPending
* @param int $retailerDiscountOfferTotal
* @param int $retailerDiscountOfferTotalCurrent
* @param int $retailerDiscountOfferTotalPending
* @param int $retailerServiceOfferTotal
* @param int $retailerServiceOfferTotalCurrent
* @param int $retailerServiceOfferTotalPending
* @param int $retailerCustomOfferTotal
* @param int $retailerCustomOfferTotalCurrent
* @param int $retailerCustomOfferTotalPending
* @param int $retailerWarrantyOfferTotal
* @param int $retailerWarrantyOfferTotalCurrent
* @param int $retailerWarrantyOfferTotalPending
* @param int $retailerOfferTotal
* @param int $retailerOfferTotalCurrent
* @param int $retailerOfferTotalPending
* @param int $campaignOfferTotal
* @param int $campaignOfferTotalCurrent
* @param int $campaignOfferTotalPending
* @param int $campaignAndOfferTotal
* @param int $campaignAndOfferTotalCurrent
* @param int $campaignAndOfferTotalPending
* @param int $offerTotal
* @param int $offerTotalCurrent
* @param int $offerTotalPending
* @param string $creation
* @param string $modified
* @param int $electricRange
* @param int $electricConsumption
* @param DateTime|null $portArrivalDate
* @param int|null $daysSincePortArrival
* @param float $retailPriceIncVAT
* @param string $bodyStyle
* @param string $upholstery
* @param string $upholsteryCode
* @param string $upholsteryType
* @param array<string>|null $packageNames
* @param string $line
* @param float $currentRetailerOfferPrice
* @param string $retailPrice
* @param bool|null $vatQualifying
* @param int $retailerId
* @param string $gssnId
* @param bool|null $noImage
* @param string $imageUrl
* @param bool|null $isAvailableOnline
* @param bool|null $isBackOrdered
* @param string $creationDate
* @param string $maintenanceDate
* @param string $registrationNumber
* @param DateTime|null $registrationDate
* @param int|null $mileage
* @param DateTime|null $tradeInDate
* @param string $source
* @param string $vehicleType
* @param string $offerAmount
* @param string $offerExpiry
* @param int[] $activeOffers
* @param int $campaignMessagesTotal
* @param bool|null $underOffer
* @param bool|null $isDisplayStock
* @param string $displayRetailer
* @param string $displayRetailerGssnId
* @param string $location
* @param string $account
* @param string $accountType
* @param string $usageCode
* @param string $bm7NST
* @param bool|null $isSellable
* @param bool|null $secured
* @param bool|null $specialist
* @param bool|null $isMotabilityRetailer
* @param string $upholsteryDescription
* @param bool|null $inBackOrderAccount
* @param string|null $fullModelYearCode
* @param DateTime|null $productionDate
* @param string $baumuster
* @param bool|null $isMotability
* @param float|null $pipAdvanceRentalGross
* @param float|null $wpmsAdvanceRentalGross
* @param array<string>|null $ispVehicleCustomerDescriptions
* @param string $engine
*/
public function __construct(
string $vin='',
string $description='',
string $model='',
string $otr='',
string $retailPriceExVAT='',
string $actualPrice='',
string $fuelType='',
string $transmission='',
string $transmissionType='',
string $colour='',
string $colourCode='',
string $colourDescription='',
string $commissionNumber='',
?bool $offerAvailable=null,
int $campaignDiscountOfferTotal=0,
int $campaignDiscountOfferTotalCurrent=0,
int $campaignDiscountOfferTotalPending=0,
int $campaignServiceOfferTotal=0,
int $campaignServiceOfferTotalCurrent=0,
int $campaignServiceOfferTotalPending=0,
int $campaignCustomOfferTotal=0,
int $campaignPersonalisedOfferTotalCurrent=0,
int $campaignPersonalisedOfferTotalPending=0,
int $campaignPersonalisedOfferTotal=0,
int $campaignCustomOfferTotalCurrent=0,
int $campaignCustomOfferTotalPending=0,
int $campaignOtherOfferTotal=0,
int $campaignOtherOfferTotalCurrent=0,
int $campaignOtherOfferTotalPending=0,
int $retailerDiscountOfferTotal=0,
int $retailerDiscountOfferTotalCurrent=0,
int $retailerDiscountOfferTotalPending=0,
int $retailerServiceOfferTotal=0,
int $retailerServiceOfferTotalCurrent=0,
int $retailerServiceOfferTotalPending=0,
int $retailerCustomOfferTotal=0,
int $retailerCustomOfferTotalCurrent=0,
int $retailerCustomOfferTotalPending=0,
int $retailerWarrantyOfferTotal=0,
int $retailerWarrantyOfferTotalCurrent=0,
int $retailerWarrantyOfferTotalPending=0,
int $retailerOfferTotal=0,
int $retailerOfferTotalCurrent=0,
int $retailerOfferTotalPending=0,
int $campaignOfferTotal=0,
int $campaignOfferTotalCurrent=0,
int $campaignOfferTotalPending=0,
int $campaignAndOfferTotal=0,
int $campaignAndOfferTotalCurrent=0,
int $campaignAndOfferTotalPending=0,
int $offerTotal=0,
int $offerTotalCurrent=0,
int $offerTotalPending=0,
string $creation='',
string $modified='',
int $electricRange=0,
int $electricConsumption=0,
?DateTime $portArrivalDate=null,
?int $daysSincePortArrival=null,
float $retailPriceIncVAT=0.0,
string $bodyStyle='',
string $upholstery='',
string $upholsteryCode='',
string $upholsteryType='',
?array $packageNames=null,
string $line='',
float $currentRetailerOfferPrice=0.0,
string $retailPrice='',
?bool $vatQualifying=null,
int $retailerId=0,
string $gssnId='',
?bool $noImage=null,
string $imageUrl='',
?bool $isAvailableOnline=null,
?bool $isBackOrdered=null,
string $creationDate='',
string $maintenanceDate='',
string $registrationNumber='',
?DateTime $registrationDate=null,
?int $mileage=null,
?DateTime $tradeInDate=null,
string $source='',
string $vehicleType='',
string $offerAmount='',
string $offerExpiry='',
array $activeOffers=[],
int $campaignMessagesTotal=0,
?bool $underOffer=null,
?bool $isDisplayStock=null,
string $displayRetailer='',
string $displayRetailerGssnId='',
string $location='',
string $account='',
string $accountType='',
string $usageCode='',
string $bm7NST='',
?bool $isSellable=null,
?bool $secured=null,
?bool $specialist=null,
?bool $isMotabilityRetailer=null,
string $upholsteryDescription='',
?bool $inBackOrderAccount=null,
?string $fullModelYearCode=null,
?DateTime $productionDate=null,
string $baumuster='',
?bool $isMotability=null,
?float $pipAdvanceRentalGross=null,
?float $wpmsAdvanceRentalGross=null,
?array $ispVehicleCustomerDescriptions=null,
string $engine='',
/** @var string */
public string $retailer='',
/** @var bool|null */
public ?bool $hasMotabilityError=null,
/** @var array<Equipment>|null */
public ?array $equipment=null
) {
parent::__construct($vin,$description,$model,$otr,$retailPriceExVAT,$actualPrice,$fuelType,$transmission,$transmissionType,$colour,$colourCode,$colourDescription,$commissionNumber,$offerAvailable,$campaignDiscountOfferTotal,$campaignDiscountOfferTotalCurrent,$campaignDiscountOfferTotalPending,$campaignServiceOfferTotal,$campaignServiceOfferTotalCurrent,$campaignServiceOfferTotalPending,$campaignCustomOfferTotal,$campaignPersonalisedOfferTotalCurrent,$campaignPersonalisedOfferTotalPending,$campaignPersonalisedOfferTotal,$campaignCustomOfferTotalCurrent,$campaignCustomOfferTotalPending,$campaignOtherOfferTotal,$campaignOtherOfferTotalCurrent,$campaignOtherOfferTotalPending,$retailerDiscountOfferTotal,$retailerDiscountOfferTotalCurrent,$retailerDiscountOfferTotalPending,$retailerServiceOfferTotal,$retailerServiceOfferTotalCurrent,$retailerServiceOfferTotalPending,$retailerCustomOfferTotal,$retailerCustomOfferTotalCurrent,$retailerCustomOfferTotalPending,$retailerWarrantyOfferTotal,$retailerWarrantyOfferTotalCurrent,$retailerWarrantyOfferTotalPending,$retailerOfferTotal,$retailerOfferTotalCurrent,$retailerOfferTotalPending,$campaignOfferTotal,$campaignOfferTotalCurrent,$campaignOfferTotalPending,$campaignAndOfferTotal,$campaignAndOfferTotalCurrent,$campaignAndOfferTotalPending,$offerTotal,$offerTotalCurrent,$offerTotalPending,$creation,$modified,$electricRange,$electricConsumption,$portArrivalDate,$daysSincePortArrival,$retailPriceIncVAT,$bodyStyle,$upholstery,$upholsteryCode,$upholsteryType,$packageNames,$line,$currentRetailerOfferPrice,$retailPrice,$vatQualifying,$retailerId,$gssnId,$noImage,$imageUrl,$isAvailableOnline,$isBackOrdered,$creationDate,$maintenanceDate,$registrationNumber,$registrationDate,$mileage,$tradeInDate,$source,$vehicleType,$offerAmount,$offerExpiry,$activeOffers,$campaignMessagesTotal,$underOffer,$isDisplayStock,$displayRetailer,$displayRetailerGssnId,$location,$account,$accountType,$usageCode,$bm7NST,$isSellable,$secured,$specialist,$isMotabilityRetailer,$upholsteryDescription,$inBackOrderAccount,$fullModelYearCode,$productionDate,$baumuster,$isMotability,$pipAdvanceRentalGross,$wpmsAdvanceRentalGross,$ispVehicleCustomerDescriptions,$engine);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['retailer'])) $this->retailer = $o['retailer'];
if (isset($o['hasMotabilityError'])) $this->hasMotabilityError = $o['hasMotabilityError'];
if (isset($o['equipment'])) $this->equipment = JsonConverters::fromArray('Equipment', $o['equipment']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->retailer)) $o['retailer'] = $this->retailer;
if (isset($this->hasMotabilityError)) $o['hasMotabilityError'] = $this->hasMotabilityError;
if (isset($this->equipment)) $o['equipment'] = JsonConverters::toArray('Equipment', $this->equipment);
return empty($o) ? new class(){} : $o;
}
}
class VehiclesByRetailerResponse implements JsonSerializable
{
public function __construct(
/** @var array<VehicleIdentifierData>|null */
public ?array $vehicles=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['vehicles'])) $this->vehicles = JsonConverters::fromArray('VehicleIdentifierData', $o['vehicles']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->vehicles)) $o['vehicles'] = JsonConverters::toArray('VehicleIdentifierData', $this->vehicles);
return empty($o) ? new class(){} : $o;
}
}
class MotabilityVehiclesRequest implements IGet, JsonSerializable
{
public function __construct(
/** @var string */
public string $vehicleType=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['vehicleType'])) $this->vehicleType = $o['vehicleType'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->vehicleType)) $o['vehicleType'] = $this->vehicleType;
return empty($o) ? new class(){} : $o;
}
}
PHP MotabilityVehiclesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/{VehicleType}/Vehicle/Motability HTTP/1.1 Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <VehiclesByRetailerResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO"> <Vehicles> <VehicleIdentifierData> <Account>String</Account> <AccountType>String</AccountType> <ActiveOffers xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:int>0</d4p1:int> </ActiveOffers> <ActualPrice>String</ActualPrice> <Baumuster>String</Baumuster> <Bm7NST>String</Bm7NST> <BodyStyle>String</BodyStyle> <CampaignAndOfferTotal>0</CampaignAndOfferTotal> <CampaignAndOfferTotalCurrent>0</CampaignAndOfferTotalCurrent> <CampaignAndOfferTotalPending>0</CampaignAndOfferTotalPending> <CampaignCustomOfferTotal>0</CampaignCustomOfferTotal> <CampaignCustomOfferTotalCurrent>0</CampaignCustomOfferTotalCurrent> <CampaignCustomOfferTotalPending>0</CampaignCustomOfferTotalPending> <CampaignDiscountOfferTotal>0</CampaignDiscountOfferTotal> <CampaignDiscountOfferTotalCurrent>0</CampaignDiscountOfferTotalCurrent> <CampaignDiscountOfferTotalPending>0</CampaignDiscountOfferTotalPending> <CampaignMessagesTotal>0</CampaignMessagesTotal> <CampaignOfferTotal>0</CampaignOfferTotal> <CampaignOfferTotalCurrent>0</CampaignOfferTotalCurrent> <CampaignOfferTotalPending>0</CampaignOfferTotalPending> <CampaignOtherOfferTotal>0</CampaignOtherOfferTotal> <CampaignOtherOfferTotalCurrent>0</CampaignOtherOfferTotalCurrent> <CampaignOtherOfferTotalPending>0</CampaignOtherOfferTotalPending> <CampaignPersonalisedOfferTotal>0</CampaignPersonalisedOfferTotal> <CampaignPersonalisedOfferTotalCurrent>0</CampaignPersonalisedOfferTotalCurrent> <CampaignPersonalisedOfferTotalPending>0</CampaignPersonalisedOfferTotalPending> <CampaignServiceOfferTotal>0</CampaignServiceOfferTotal> <CampaignServiceOfferTotalCurrent>0</CampaignServiceOfferTotalCurrent> <CampaignServiceOfferTotalPending>0</CampaignServiceOfferTotalPending> <Colour>String</Colour> <ColourCode>String</ColourCode> <ColourDescription>String</ColourDescription> <CommissionNumber>String</CommissionNumber> <Creation>String</Creation> <CreationDate>String</CreationDate> <CurrentRetailerOfferPrice>0</CurrentRetailerOfferPrice> <DaysSincePortArrival>0</DaysSincePortArrival> <Description>String</Description> <DisplayRetailer>String</DisplayRetailer> <DisplayRetailerGssnId>String</DisplayRetailerGssnId> <ElectricConsumption>0</ElectricConsumption> <ElectricRange>0</ElectricRange> <FuelType>String</FuelType> <FullModelYearCode>String</FullModelYearCode> <GssnId>String</GssnId> <ImageUrl>String</ImageUrl> <InBackOrderAccount>false</InBackOrderAccount> <IsAvailableOnline>false</IsAvailableOnline> <IsBackOrdered>false</IsBackOrdered> <IsDisplayStock>false</IsDisplayStock> <IsMotability>false</IsMotability> <IsMotabilityRetailer>false</IsMotabilityRetailer> <IsSellable>false</IsSellable> <IspVehicleCustomerDescriptions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>String</d4p1:string> </IspVehicleCustomerDescriptions> <Line>String</Line> <Location>String</Location> <MaintenanceDate>String</MaintenanceDate> <Mileage>0</Mileage> <Model>String</Model> <Modified>String</Modified> <NoImage>false</NoImage> <OfferAmount>String</OfferAmount> <OfferAvailable>false</OfferAvailable> <OfferExpiry>String</OfferExpiry> <OfferTotal>0</OfferTotal> <OfferTotalCurrent>0</OfferTotalCurrent> <OfferTotalPending>0</OfferTotalPending> <Otr>String</Otr> <PackageNames xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>String</d4p1:string> </PackageNames> <PipAdvanceRentalGross>0</PipAdvanceRentalGross> <PortArrivalDate>0001-01-01T00:00:00</PortArrivalDate> <ProductionDate>0001-01-01T00:00:00</ProductionDate> <RegistrationDate>0001-01-01T00:00:00</RegistrationDate> <RegistrationNumber>String</RegistrationNumber> <RetailPrice>String</RetailPrice> <RetailPriceExVAT>String</RetailPriceExVAT> <RetailPriceIncVAT>0</RetailPriceIncVAT> <RetailerCustomOfferTotal>0</RetailerCustomOfferTotal> <RetailerCustomOfferTotalCurrent>0</RetailerCustomOfferTotalCurrent> <RetailerCustomOfferTotalPending>0</RetailerCustomOfferTotalPending> <RetailerDiscountOfferTotal>0</RetailerDiscountOfferTotal> <RetailerDiscountOfferTotalCurrent>0</RetailerDiscountOfferTotalCurrent> <RetailerDiscountOfferTotalPending>0</RetailerDiscountOfferTotalPending> <RetailerId>0</RetailerId> <RetailerOfferTotal>0</RetailerOfferTotal> <RetailerOfferTotalCurrent>0</RetailerOfferTotalCurrent> <RetailerOfferTotalPending>0</RetailerOfferTotalPending> <RetailerServiceOfferTotal>0</RetailerServiceOfferTotal> <RetailerServiceOfferTotalCurrent>0</RetailerServiceOfferTotalCurrent> <RetailerServiceOfferTotalPending>0</RetailerServiceOfferTotalPending> <RetailerWarrantyOfferTotal>0</RetailerWarrantyOfferTotal> <RetailerWarrantyOfferTotalCurrent>0</RetailerWarrantyOfferTotalCurrent> <RetailerWarrantyOfferTotalPending>0</RetailerWarrantyOfferTotalPending> <Secured>false</Secured> <Source>String</Source> <Specialist>false</Specialist> <TradeInDate>0001-01-01T00:00:00</TradeInDate> <Transmission>String</Transmission> <TransmissionType>String</TransmissionType> <UnderOffer>false</UnderOffer> <Upholstery>String</Upholstery> <UpholsteryCode>String</UpholsteryCode> <UpholsteryDescription>String</UpholsteryDescription> <UpholsteryType>String</UpholsteryType> <UsageCode>String</UsageCode> <VATQualifying>false</VATQualifying> <VehicleType>String</VehicleType> <Vin>String</Vin> <WpmsAdvanceRentalGross>0</WpmsAdvanceRentalGross> <Engine>String</Engine> <Equipment xmlns:d4p1="http://schemas.datacontract.org/2004/07/Mercedes.OS.Vehicle.Shared.POCO"> <d4p1:Equipment> <d4p1:Code>String</d4p1:Code> <d4p1:Description>String</d4p1:Description> <d4p1:Id>0</d4p1:Id> </d4p1:Equipment> </Equipment> <HasMotabilityError>false</HasMotabilityError> <Retailer>String</Retailer> </VehicleIdentifierData> </Vehicles> </VehiclesByRetailerResponse>