POST | /v1/OnlineShowroom/Stock | Search for Online Showroom Stock | Calls Vehicle Data API online showroom stock endpoint and searches for vehicles given a list of retailers. The results are used to populate the Online Showroom Stock datatable grid in OneAdmin |
---|
<?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 StockDataRow implements JsonSerializable
{
public function __construct(
/** @var string */
public string $commissionNumber='',
/** @var string */
public string $description='',
/** @var string */
public string $salesDescriptionLong='',
/** @var string */
public string $model='',
/** @var string */
public string $colour='',
/** @var string */
public string $colourGroup='',
/** @var string */
public string $fuelType='',
/** @var string */
public string $transmission='',
/** @var string */
public string $transmissionType='',
/** @var string */
public string $packages='',
/** @var string */
public string $lines='',
/** @var string */
public string $upholstery='',
/** @var string */
public string $upholsteryCode='',
/** @var string */
public string $displayStockAgent='',
/** @var string */
public string $location='',
/** @var string */
public string $vin='',
/** @var string */
public string $vid='',
/** @var string */
public string $vehicleType='',
/** @var string */
public string $vehicleClass='',
/** @var DateTime */
public DateTime $creationDate=new DateTime(),
/** @var DateTime|null */
public ?DateTime $lastUpdated=null,
/** @var DateTime|null */
public ?DateTime $productionDate=null,
/** @var DateTime|null */
public ?DateTime $portArrivalDate=null,
/** @var float */
public float $combinedGrossOfferValue=0.0,
/** @var string */
public string $currentLocation='',
/** @var bool|null */
public ?bool $notVisibleOnlineShowroom=null,
/** @var string */
public string $nvosReason='',
/** @var bool|null */
public ?bool $nvosReasonOneAdminExcluded=null,
/** @var bool|null */
public ?bool $nvosReasonLinkedToBackOrder=null,
/** @var bool|null */
public ?bool $includedAfterDeduplication=null,
/** @var bool|null */
public ?bool $unique=null,
/** @var bool|null */
public ?bool $duplicate=null,
/** @var int|null */
public ?int $duplicateGroup=null,
/** @var bool|null */
public ?bool $lowestComm=null,
/** @var string */
public string $rule='',
/** @var string */
public string $fin='',
/** @var string */
public string $chassisNumber='',
/** @var string */
public string $modelYear='',
/** @var string */
public string $modelYearCode='',
/** @var string */
public string $halfModelYearCode='',
/** @var string */
public string $fullModelYearCode='',
/** @var string */
public string $bodyStyle='',
/** @var string */
public string $engine='',
/** @var string */
public string $cesarIdShipToParty='',
/** @var string */
public string $vehicleUsageCode='',
/** @var float|null */
public ?float $acceleration=null,
/** @var int|null */
public ?int $bootCapacity=null,
/** @var float|null */
public ?float $topSpeed=null,
/** @var string */
public string $driveConcept='',
/** @var float|null */
public ?float $combustionPowerHp=null,
/** @var float|null */
public ?float $electricPowerKw=null,
/** @var float|null */
public ?float $electricPowerHp=null,
/** @var float|null */
public ?float $combinedPowerKw=null,
/** @var float|null */
public ?float $combinedPowerHP=null,
/** @var bool|null */
public ?bool $underOffer=null,
/** @var bool|null */
public ?bool $isSellable=null,
/** @var bool|null */
public ?bool $mbukSecured=null,
/** @var bool|null */
public ?bool $isDisplayStock=null,
/** @var bool|null */
public ?bool $isSpecialistCar=null,
/** @var string */
public string $account='',
/** @var string */
public string $productRange='',
/** @var bool|null */
public ?bool $isAMG=null,
/** @var float */
public float $actualPrice=0.0,
/** @var float */
public float $retailPrice_ExVAT=0.0,
/** @var float */
public float $retailPrice_IncVAT=0.0,
/** @var float */
public float $otr=0.0,
/** @var string */
public string $nst='',
/** @var string */
public string $bm7NST='',
/** @var float|null */
public ?float $electricRange=null,
/** @var float|null */
public ?float $electricConsumption=null,
/** @var float|null */
public ?float $emission=null,
/** @var string */
public string $emissionDirective='',
/** @var string */
public string $emissionCombined='',
/** @var string */
public string $emissionExtraUrban='',
/** @var string */
public string $emissionUrban='',
/** @var string */
public string $energyEfficiencyClass='',
/** @var string */
public string $wltpEmissionCombined='',
/** @var string */
public string $wltpCombined='',
/** @var string */
public string $wltpLow='',
/** @var string */
public string $wltpMedium='',
/** @var string */
public string $wltpHigh='',
/** @var string */
public string $wltpExtraHigh='',
/** @var float */
public float $totalMoneyOffersExclDiscretionary=0.0,
/** @var float */
public float $discretionaryMoneyOffer=0.0,
/** @var float */
public float $totalMoneyOffersInclDiscretionary=0.0,
/** @var int */
public int $nonDiscretionaryNMOCount=0,
/** @var int */
public int $nonDiscretionaryMOCount=0,
/** @var int */
public int $discretionaryNMOCount=0,
/** @var int */
public int $discretionaryMOCount=0,
/** @var float */
public float $totalOfferVIPAmount=0.0,
/** @var string|null */
public ?string $stockLevelIndicator=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['commissionNumber'])) $this->commissionNumber = $o['commissionNumber'];
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['salesDescriptionLong'])) $this->salesDescriptionLong = $o['salesDescriptionLong'];
if (isset($o['model'])) $this->model = $o['model'];
if (isset($o['colour'])) $this->colour = $o['colour'];
if (isset($o['colourGroup'])) $this->colourGroup = $o['colourGroup'];
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['packages'])) $this->packages = $o['packages'];
if (isset($o['lines'])) $this->lines = $o['lines'];
if (isset($o['upholstery'])) $this->upholstery = $o['upholstery'];
if (isset($o['upholsteryCode'])) $this->upholsteryCode = $o['upholsteryCode'];
if (isset($o['displayStockAgent'])) $this->displayStockAgent = $o['displayStockAgent'];
if (isset($o['location'])) $this->location = $o['location'];
if (isset($o['vin'])) $this->vin = $o['vin'];
if (isset($o['vid'])) $this->vid = $o['vid'];
if (isset($o['vehicleType'])) $this->vehicleType = $o['vehicleType'];
if (isset($o['vehicleClass'])) $this->vehicleClass = $o['vehicleClass'];
if (isset($o['creationDate'])) $this->creationDate = JsonConverters::from('DateTime', $o['creationDate']);
if (isset($o['lastUpdated'])) $this->lastUpdated = JsonConverters::from('DateTime', $o['lastUpdated']);
if (isset($o['productionDate'])) $this->productionDate = JsonConverters::from('DateTime', $o['productionDate']);
if (isset($o['portArrivalDate'])) $this->portArrivalDate = JsonConverters::from('DateTime', $o['portArrivalDate']);
if (isset($o['combinedGrossOfferValue'])) $this->combinedGrossOfferValue = $o['combinedGrossOfferValue'];
if (isset($o['currentLocation'])) $this->currentLocation = $o['currentLocation'];
if (isset($o['notVisibleOnlineShowroom'])) $this->notVisibleOnlineShowroom = $o['notVisibleOnlineShowroom'];
if (isset($o['nvosReason'])) $this->nvosReason = $o['nvosReason'];
if (isset($o['nvosReasonOneAdminExcluded'])) $this->nvosReasonOneAdminExcluded = $o['nvosReasonOneAdminExcluded'];
if (isset($o['nvosReasonLinkedToBackOrder'])) $this->nvosReasonLinkedToBackOrder = $o['nvosReasonLinkedToBackOrder'];
if (isset($o['includedAfterDeduplication'])) $this->includedAfterDeduplication = $o['includedAfterDeduplication'];
if (isset($o['unique'])) $this->unique = $o['unique'];
if (isset($o['duplicate'])) $this->duplicate = $o['duplicate'];
if (isset($o['duplicateGroup'])) $this->duplicateGroup = $o['duplicateGroup'];
if (isset($o['lowestComm'])) $this->lowestComm = $o['lowestComm'];
if (isset($o['rule'])) $this->rule = $o['rule'];
if (isset($o['fin'])) $this->fin = $o['fin'];
if (isset($o['chassisNumber'])) $this->chassisNumber = $o['chassisNumber'];
if (isset($o['modelYear'])) $this->modelYear = $o['modelYear'];
if (isset($o['modelYearCode'])) $this->modelYearCode = $o['modelYearCode'];
if (isset($o['halfModelYearCode'])) $this->halfModelYearCode = $o['halfModelYearCode'];
if (isset($o['fullModelYearCode'])) $this->fullModelYearCode = $o['fullModelYearCode'];
if (isset($o['bodyStyle'])) $this->bodyStyle = $o['bodyStyle'];
if (isset($o['engine'])) $this->engine = $o['engine'];
if (isset($o['cesarIdShipToParty'])) $this->cesarIdShipToParty = $o['cesarIdShipToParty'];
if (isset($o['vehicleUsageCode'])) $this->vehicleUsageCode = $o['vehicleUsageCode'];
if (isset($o['acceleration'])) $this->acceleration = $o['acceleration'];
if (isset($o['bootCapacity'])) $this->bootCapacity = $o['bootCapacity'];
if (isset($o['topSpeed'])) $this->topSpeed = $o['topSpeed'];
if (isset($o['driveConcept'])) $this->driveConcept = $o['driveConcept'];
if (isset($o['combustionPowerHp'])) $this->combustionPowerHp = $o['combustionPowerHp'];
if (isset($o['electricPowerKw'])) $this->electricPowerKw = $o['electricPowerKw'];
if (isset($o['electricPowerHp'])) $this->electricPowerHp = $o['electricPowerHp'];
if (isset($o['combinedPowerKw'])) $this->combinedPowerKw = $o['combinedPowerKw'];
if (isset($o['combinedPowerHP'])) $this->combinedPowerHP = $o['combinedPowerHP'];
if (isset($o['underOffer'])) $this->underOffer = $o['underOffer'];
if (isset($o['isSellable'])) $this->isSellable = $o['isSellable'];
if (isset($o['mbukSecured'])) $this->mbukSecured = $o['mbukSecured'];
if (isset($o['isDisplayStock'])) $this->isDisplayStock = $o['isDisplayStock'];
if (isset($o['isSpecialistCar'])) $this->isSpecialistCar = $o['isSpecialistCar'];
if (isset($o['account'])) $this->account = $o['account'];
if (isset($o['productRange'])) $this->productRange = $o['productRange'];
if (isset($o['isAMG'])) $this->isAMG = $o['isAMG'];
if (isset($o['actualPrice'])) $this->actualPrice = $o['actualPrice'];
if (isset($o['retailPrice_ExVAT'])) $this->retailPrice_ExVAT = $o['retailPrice_ExVAT'];
if (isset($o['retailPrice_IncVAT'])) $this->retailPrice_IncVAT = $o['retailPrice_IncVAT'];
if (isset($o['otr'])) $this->otr = $o['otr'];
if (isset($o['nst'])) $this->nst = $o['nst'];
if (isset($o['bm7NST'])) $this->bm7NST = $o['bm7NST'];
if (isset($o['electricRange'])) $this->electricRange = $o['electricRange'];
if (isset($o['electricConsumption'])) $this->electricConsumption = $o['electricConsumption'];
if (isset($o['emission'])) $this->emission = $o['emission'];
if (isset($o['emissionDirective'])) $this->emissionDirective = $o['emissionDirective'];
if (isset($o['emissionCombined'])) $this->emissionCombined = $o['emissionCombined'];
if (isset($o['emissionExtraUrban'])) $this->emissionExtraUrban = $o['emissionExtraUrban'];
if (isset($o['emissionUrban'])) $this->emissionUrban = $o['emissionUrban'];
if (isset($o['energyEfficiencyClass'])) $this->energyEfficiencyClass = $o['energyEfficiencyClass'];
if (isset($o['wltpEmissionCombined'])) $this->wltpEmissionCombined = $o['wltpEmissionCombined'];
if (isset($o['wltpCombined'])) $this->wltpCombined = $o['wltpCombined'];
if (isset($o['wltpLow'])) $this->wltpLow = $o['wltpLow'];
if (isset($o['wltpMedium'])) $this->wltpMedium = $o['wltpMedium'];
if (isset($o['wltpHigh'])) $this->wltpHigh = $o['wltpHigh'];
if (isset($o['wltpExtraHigh'])) $this->wltpExtraHigh = $o['wltpExtraHigh'];
if (isset($o['totalMoneyOffersExclDiscretionary'])) $this->totalMoneyOffersExclDiscretionary = $o['totalMoneyOffersExclDiscretionary'];
if (isset($o['discretionaryMoneyOffer'])) $this->discretionaryMoneyOffer = $o['discretionaryMoneyOffer'];
if (isset($o['totalMoneyOffersInclDiscretionary'])) $this->totalMoneyOffersInclDiscretionary = $o['totalMoneyOffersInclDiscretionary'];
if (isset($o['nonDiscretionaryNMOCount'])) $this->nonDiscretionaryNMOCount = $o['nonDiscretionaryNMOCount'];
if (isset($o['nonDiscretionaryMOCount'])) $this->nonDiscretionaryMOCount = $o['nonDiscretionaryMOCount'];
if (isset($o['discretionaryNMOCount'])) $this->discretionaryNMOCount = $o['discretionaryNMOCount'];
if (isset($o['discretionaryMOCount'])) $this->discretionaryMOCount = $o['discretionaryMOCount'];
if (isset($o['totalOfferVIPAmount'])) $this->totalOfferVIPAmount = $o['totalOfferVIPAmount'];
if (isset($o['stockLevelIndicator'])) $this->stockLevelIndicator = $o['stockLevelIndicator'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->commissionNumber)) $o['commissionNumber'] = $this->commissionNumber;
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->salesDescriptionLong)) $o['salesDescriptionLong'] = $this->salesDescriptionLong;
if (isset($this->model)) $o['model'] = $this->model;
if (isset($this->colour)) $o['colour'] = $this->colour;
if (isset($this->colourGroup)) $o['colourGroup'] = $this->colourGroup;
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->packages)) $o['packages'] = $this->packages;
if (isset($this->lines)) $o['lines'] = $this->lines;
if (isset($this->upholstery)) $o['upholstery'] = $this->upholstery;
if (isset($this->upholsteryCode)) $o['upholsteryCode'] = $this->upholsteryCode;
if (isset($this->displayStockAgent)) $o['displayStockAgent'] = $this->displayStockAgent;
if (isset($this->location)) $o['location'] = $this->location;
if (isset($this->vin)) $o['vin'] = $this->vin;
if (isset($this->vid)) $o['vid'] = $this->vid;
if (isset($this->vehicleType)) $o['vehicleType'] = $this->vehicleType;
if (isset($this->vehicleClass)) $o['vehicleClass'] = $this->vehicleClass;
if (isset($this->creationDate)) $o['creationDate'] = JsonConverters::to('DateTime', $this->creationDate);
if (isset($this->lastUpdated)) $o['lastUpdated'] = JsonConverters::to('DateTime', $this->lastUpdated);
if (isset($this->productionDate)) $o['productionDate'] = JsonConverters::to('DateTime', $this->productionDate);
if (isset($this->portArrivalDate)) $o['portArrivalDate'] = JsonConverters::to('DateTime', $this->portArrivalDate);
if (isset($this->combinedGrossOfferValue)) $o['combinedGrossOfferValue'] = $this->combinedGrossOfferValue;
if (isset($this->currentLocation)) $o['currentLocation'] = $this->currentLocation;
if (isset($this->notVisibleOnlineShowroom)) $o['notVisibleOnlineShowroom'] = $this->notVisibleOnlineShowroom;
if (isset($this->nvosReason)) $o['nvosReason'] = $this->nvosReason;
if (isset($this->nvosReasonOneAdminExcluded)) $o['nvosReasonOneAdminExcluded'] = $this->nvosReasonOneAdminExcluded;
if (isset($this->nvosReasonLinkedToBackOrder)) $o['nvosReasonLinkedToBackOrder'] = $this->nvosReasonLinkedToBackOrder;
if (isset($this->includedAfterDeduplication)) $o['includedAfterDeduplication'] = $this->includedAfterDeduplication;
if (isset($this->unique)) $o['unique'] = $this->unique;
if (isset($this->duplicate)) $o['duplicate'] = $this->duplicate;
if (isset($this->duplicateGroup)) $o['duplicateGroup'] = $this->duplicateGroup;
if (isset($this->lowestComm)) $o['lowestComm'] = $this->lowestComm;
if (isset($this->rule)) $o['rule'] = $this->rule;
if (isset($this->fin)) $o['fin'] = $this->fin;
if (isset($this->chassisNumber)) $o['chassisNumber'] = $this->chassisNumber;
if (isset($this->modelYear)) $o['modelYear'] = $this->modelYear;
if (isset($this->modelYearCode)) $o['modelYearCode'] = $this->modelYearCode;
if (isset($this->halfModelYearCode)) $o['halfModelYearCode'] = $this->halfModelYearCode;
if (isset($this->fullModelYearCode)) $o['fullModelYearCode'] = $this->fullModelYearCode;
if (isset($this->bodyStyle)) $o['bodyStyle'] = $this->bodyStyle;
if (isset($this->engine)) $o['engine'] = $this->engine;
if (isset($this->cesarIdShipToParty)) $o['cesarIdShipToParty'] = $this->cesarIdShipToParty;
if (isset($this->vehicleUsageCode)) $o['vehicleUsageCode'] = $this->vehicleUsageCode;
if (isset($this->acceleration)) $o['acceleration'] = $this->acceleration;
if (isset($this->bootCapacity)) $o['bootCapacity'] = $this->bootCapacity;
if (isset($this->topSpeed)) $o['topSpeed'] = $this->topSpeed;
if (isset($this->driveConcept)) $o['driveConcept'] = $this->driveConcept;
if (isset($this->combustionPowerHp)) $o['combustionPowerHp'] = $this->combustionPowerHp;
if (isset($this->electricPowerKw)) $o['electricPowerKw'] = $this->electricPowerKw;
if (isset($this->electricPowerHp)) $o['electricPowerHp'] = $this->electricPowerHp;
if (isset($this->combinedPowerKw)) $o['combinedPowerKw'] = $this->combinedPowerKw;
if (isset($this->combinedPowerHP)) $o['combinedPowerHP'] = $this->combinedPowerHP;
if (isset($this->underOffer)) $o['underOffer'] = $this->underOffer;
if (isset($this->isSellable)) $o['isSellable'] = $this->isSellable;
if (isset($this->mbukSecured)) $o['mbukSecured'] = $this->mbukSecured;
if (isset($this->isDisplayStock)) $o['isDisplayStock'] = $this->isDisplayStock;
if (isset($this->isSpecialistCar)) $o['isSpecialistCar'] = $this->isSpecialistCar;
if (isset($this->account)) $o['account'] = $this->account;
if (isset($this->productRange)) $o['productRange'] = $this->productRange;
if (isset($this->isAMG)) $o['isAMG'] = $this->isAMG;
if (isset($this->actualPrice)) $o['actualPrice'] = $this->actualPrice;
if (isset($this->retailPrice_ExVAT)) $o['retailPrice_ExVAT'] = $this->retailPrice_ExVAT;
if (isset($this->retailPrice_IncVAT)) $o['retailPrice_IncVAT'] = $this->retailPrice_IncVAT;
if (isset($this->otr)) $o['otr'] = $this->otr;
if (isset($this->nst)) $o['nst'] = $this->nst;
if (isset($this->bm7NST)) $o['bm7NST'] = $this->bm7NST;
if (isset($this->electricRange)) $o['electricRange'] = $this->electricRange;
if (isset($this->electricConsumption)) $o['electricConsumption'] = $this->electricConsumption;
if (isset($this->emission)) $o['emission'] = $this->emission;
if (isset($this->emissionDirective)) $o['emissionDirective'] = $this->emissionDirective;
if (isset($this->emissionCombined)) $o['emissionCombined'] = $this->emissionCombined;
if (isset($this->emissionExtraUrban)) $o['emissionExtraUrban'] = $this->emissionExtraUrban;
if (isset($this->emissionUrban)) $o['emissionUrban'] = $this->emissionUrban;
if (isset($this->energyEfficiencyClass)) $o['energyEfficiencyClass'] = $this->energyEfficiencyClass;
if (isset($this->wltpEmissionCombined)) $o['wltpEmissionCombined'] = $this->wltpEmissionCombined;
if (isset($this->wltpCombined)) $o['wltpCombined'] = $this->wltpCombined;
if (isset($this->wltpLow)) $o['wltpLow'] = $this->wltpLow;
if (isset($this->wltpMedium)) $o['wltpMedium'] = $this->wltpMedium;
if (isset($this->wltpHigh)) $o['wltpHigh'] = $this->wltpHigh;
if (isset($this->wltpExtraHigh)) $o['wltpExtraHigh'] = $this->wltpExtraHigh;
if (isset($this->totalMoneyOffersExclDiscretionary)) $o['totalMoneyOffersExclDiscretionary'] = $this->totalMoneyOffersExclDiscretionary;
if (isset($this->discretionaryMoneyOffer)) $o['discretionaryMoneyOffer'] = $this->discretionaryMoneyOffer;
if (isset($this->totalMoneyOffersInclDiscretionary)) $o['totalMoneyOffersInclDiscretionary'] = $this->totalMoneyOffersInclDiscretionary;
if (isset($this->nonDiscretionaryNMOCount)) $o['nonDiscretionaryNMOCount'] = $this->nonDiscretionaryNMOCount;
if (isset($this->nonDiscretionaryMOCount)) $o['nonDiscretionaryMOCount'] = $this->nonDiscretionaryMOCount;
if (isset($this->discretionaryNMOCount)) $o['discretionaryNMOCount'] = $this->discretionaryNMOCount;
if (isset($this->discretionaryMOCount)) $o['discretionaryMOCount'] = $this->discretionaryMOCount;
if (isset($this->totalOfferVIPAmount)) $o['totalOfferVIPAmount'] = $this->totalOfferVIPAmount;
if (isset($this->stockLevelIndicator)) $o['stockLevelIndicator'] = $this->stockLevelIndicator;
return empty($o) ? new class(){} : $o;
}
}
class OnlineShowroomStockResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $totalVehicles=0,
/** @var array<StockDataRow>|null */
public ?array $vehicles=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['totalVehicles'])) $this->totalVehicles = $o['totalVehicles'];
if (isset($o['vehicles'])) $this->vehicles = JsonConverters::fromArray('StockDataRow', $o['vehicles']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->totalVehicles)) $o['totalVehicles'] = $this->totalVehicles;
if (isset($this->vehicles)) $o['vehicles'] = JsonConverters::toArray('StockDataRow', $this->vehicles);
return empty($o) ? new class(){} : $o;
}
}
class OnlineShowroomStockRequest implements IPost, JsonSerializable
{
public function __construct(
/** @var array<string>|null */
public ?array $gssns=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['gssns'])) $this->gssns = JsonConverters::fromArray('string', $o['gssns']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->gssns)) $o['gssns'] = JsonConverters::toArray('string', $this->gssns);
return empty($o) ? new class(){} : $o;
}
}
PHP OnlineShowroomStockRequest 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/OnlineShowroom/Stock HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"gssns":["String"]}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"totalVehicles":0,"vehicles":[{"commissionNumber":"String","description":"String","salesDescriptionLong":"String","model":"String","colour":"String","colourGroup":"String","fuelType":"String","transmission":"String","transmissionType":"String","packages":"String","lines":"String","upholstery":"String","upholsteryCode":"String","displayStockAgent":"String","location":"String","vin":"String","vid":"String","vehicleType":"String","vehicleClass":"String","creationDate":"\/Date(-62135596800000-0000)\/","lastUpdated":"\/Date(-62135596800000-0000)\/","productionDate":"\/Date(-62135596800000-0000)\/","portArrivalDate":"\/Date(-62135596800000-0000)\/","combinedGrossOfferValue":0,"currentLocation":"String","notVisibleOnlineShowroom":false,"nvosReason":"String","nvosReasonOneAdminExcluded":false,"nvosReasonLinkedToBackOrder":false,"includedAfterDeduplication":false,"unique":false,"duplicate":false,"duplicateGroup":0,"lowestComm":false,"rule":"String","fin":"String","chassisNumber":"String","modelYear":"String","modelYearCode":"String","halfModelYearCode":"String","fullModelYearCode":"String","bodyStyle":"String","engine":"String","cesarIdShipToParty":"String","vehicleUsageCode":"String","acceleration":0,"bootCapacity":0,"topSpeed":0,"driveConcept":"String","combustionPowerHp":0,"electricPowerKw":0,"electricPowerHp":0,"combinedPowerKw":0,"combinedPowerHP":0,"underOffer":false,"isSellable":false,"mbukSecured":false,"isDisplayStock":false,"isSpecialistCar":false,"account":"String","productRange":"String","isAMG":false,"actualPrice":0,"retailPrice_ExVAT":0,"retailPrice_IncVAT":0,"otr":0,"nst":"String","bm7NST":"String","electricRange":0,"electricConsumption":0,"emission":0,"emissionDirective":"String","emissionCombined":"String","emissionExtraUrban":"String","emissionUrban":"String","energyEfficiencyClass":"String","wltpEmissionCombined":"String","wltpCombined":"String","wltpLow":"String","wltpMedium":"String","wltpHigh":"String","wltpExtraHigh":"String","totalMoneyOffersExclDiscretionary":0,"discretionaryMoneyOffer":0,"totalMoneyOffersInclDiscretionary":0,"nonDiscretionaryNMOCount":0,"nonDiscretionaryMOCount":0,"discretionaryNMOCount":0,"discretionaryMOCount":0,"totalOfferVIPAmount":0,"stockLevelIndicator":"String"}]}