Mercedes.VehicleManagement.API

<back to all web services

DisplayStockOverviewRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/DisplayStockOverviewFilter Display Stock vehicle data with usedCode and MBUKSecured
<?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 VehicleDisplayStock implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $vin=null,
        /** @var string */
        public string $vehicleDescription='',
        /** @var string */
        public string $commissionNumber='',
        /** @var string */
        public string $retailer='',
        /** @var string */
        public string $model='',
        /** @var string */
        public string $fuelType='',
        /** @var string */
        public string $transmission='',
        /** @var string */
        public string $colour='',
        /** @var string */
        public string $actualPrice='',
        /** @var DateTime|null */
        public ?DateTime $gbDestDate=null,
        /** @var string */
        public string $vehicleUsage='',
        /** @var bool|null */
        public ?bool $underOffer=null,
        /** @var bool|null */
        public ?bool $isSellable=null,
        /** @var string */
        public string $vehicleType='',
        /** @var string */
        public string $vid='',
        /** @var string */
        public string $fin='',
        /** @var string */
        public string $chassisNumber='',
        /** @var string */
        public string $line='',
        /** @var string */
        public string $modelYear='',
        /** @var string */
        public string $modelYearCode='',
        /** @var string */
        public string $vehicleClass='',
        /** @var string */
        public string $retailPrice_ExVAT='',
        /** @var string */
        public string $retailPrice_IncVAT='',
        /** @var string */
        public string $otr='',
        /** @var string */
        public string $bodyStyle='',
        /** @var string */
        public string $productRange='',
        /** @var string */
        public string $engine='',
        /** @var bool|null */
        public ?bool $isAMG=null,
        /** @var string */
        public string $colourGroup='',
        /** @var string */
        public string $upholstery='',
        /** @var string */
        public string $packages='',
        /** @var string */
        public string $nst='',
        /** @var string */
        public string $bM7NST='',
        /** @var string */
        public string $acceleration='',
        /** @var string */
        public string $bootCapacity='',
        /** @var string */
        public string $topSpeed='',
        /** @var string */
        public string $driveConcept='',
        /** @var string */
        public string $combustionPowerHp='',
        /** @var string */
        public string $electricPowerKw='',
        /** @var string */
        public string $electricPowerHp='',
        /** @var string */
        public string $combinedPowerKw='',
        /** @var string */
        public string $combinedPowerHP='',
        /** @var string */
        public string $electricRange='',
        /** @var string */
        public string $electricConsumption='',
        /** @var string */
        public string $emissionCombined='',
        /** @var string */
        public string $emissionExtraUrban='',
        /** @var string */
        public string $emissionUrban='',
        /** @var string */
        public string $emission='',
        /** @var string */
        public string $emissionDirective='',
        /** @var string */
        public string $energyEfficiencyClass='',
        /** @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 string */
        public string $wltpEmissionCombined='',
        /** @var DateTime|null */
        public ?DateTime $portArrivalDate=null,
        /** @var DateTime|null */
        public ?DateTime $creationDate=null,
        /** @var DateTime|null */
        public ?DateTime $lastUpdated=null,
        /** @var bool|null */
        public ?bool $isDisplayStock=null,
        /** @var string */
        public string $displayStockAgent='',
        /** @var bool|null */
        public ?bool $isSpecialistCar=null,
        /** @var string */
        public string $account='',
        /** @var string */
        public string $location='',
        /** @var string */
        public string $cesarIdShipToParty='',
        /** @var string */
        public string $vehicleUsageCode='',
        /** @var bool|null */
        public ?bool $mbukSecured=null,
        /** @var bool|null */
        public ?bool $isAllocatedToBackOrder=null,
        /** @var string|null */
        public ?string $backOrderReference=null,
        /** @var string|null */
        public ?string $marketAreaName=null,
        /** @var int|null */
        public ?int $marketAreaId=null,
        /** @var string|null */
        public ?string $daysAtSite=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['vin'])) $this->vin = $o['vin'];
        if (isset($o['vehicleDescription'])) $this->vehicleDescription = $o['vehicleDescription'];
        if (isset($o['commissionNumber'])) $this->commissionNumber = $o['commissionNumber'];
        if (isset($o['retailer'])) $this->retailer = $o['retailer'];
        if (isset($o['model'])) $this->model = $o['model'];
        if (isset($o['fuelType'])) $this->fuelType = $o['fuelType'];
        if (isset($o['transmission'])) $this->transmission = $o['transmission'];
        if (isset($o['colour'])) $this->colour = $o['colour'];
        if (isset($o['actualPrice'])) $this->actualPrice = $o['actualPrice'];
        if (isset($o['gbDestDate'])) $this->gbDestDate = JsonConverters::from('DateTime', $o['gbDestDate']);
        if (isset($o['vehicleUsage'])) $this->vehicleUsage = $o['vehicleUsage'];
        if (isset($o['underOffer'])) $this->underOffer = $o['underOffer'];
        if (isset($o['isSellable'])) $this->isSellable = $o['isSellable'];
        if (isset($o['vehicleType'])) $this->vehicleType = $o['vehicleType'];
        if (isset($o['vid'])) $this->vid = $o['vid'];
        if (isset($o['fin'])) $this->fin = $o['fin'];
        if (isset($o['chassisNumber'])) $this->chassisNumber = $o['chassisNumber'];
        if (isset($o['line'])) $this->line = $o['line'];
        if (isset($o['modelYear'])) $this->modelYear = $o['modelYear'];
        if (isset($o['modelYearCode'])) $this->modelYearCode = $o['modelYearCode'];
        if (isset($o['vehicleClass'])) $this->vehicleClass = $o['vehicleClass'];
        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['bodyStyle'])) $this->bodyStyle = $o['bodyStyle'];
        if (isset($o['productRange'])) $this->productRange = $o['productRange'];
        if (isset($o['engine'])) $this->engine = $o['engine'];
        if (isset($o['isAMG'])) $this->isAMG = $o['isAMG'];
        if (isset($o['colourGroup'])) $this->colourGroup = $o['colourGroup'];
        if (isset($o['upholstery'])) $this->upholstery = $o['upholstery'];
        if (isset($o['packages'])) $this->packages = $o['packages'];
        if (isset($o['nst'])) $this->nst = $o['nst'];
        if (isset($o['bM7NST'])) $this->bM7NST = $o['bM7NST'];
        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['electricRange'])) $this->electricRange = $o['electricRange'];
        if (isset($o['electricConsumption'])) $this->electricConsumption = $o['electricConsumption'];
        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['emission'])) $this->emission = $o['emission'];
        if (isset($o['emissionDirective'])) $this->emissionDirective = $o['emissionDirective'];
        if (isset($o['energyEfficiencyClass'])) $this->energyEfficiencyClass = $o['energyEfficiencyClass'];
        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['wltpEmissionCombined'])) $this->wltpEmissionCombined = $o['wltpEmissionCombined'];
        if (isset($o['portArrivalDate'])) $this->portArrivalDate = JsonConverters::from('DateTime', $o['portArrivalDate']);
        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['isDisplayStock'])) $this->isDisplayStock = $o['isDisplayStock'];
        if (isset($o['displayStockAgent'])) $this->displayStockAgent = $o['displayStockAgent'];
        if (isset($o['isSpecialistCar'])) $this->isSpecialistCar = $o['isSpecialistCar'];
        if (isset($o['account'])) $this->account = $o['account'];
        if (isset($o['location'])) $this->location = $o['location'];
        if (isset($o['cesarIdShipToParty'])) $this->cesarIdShipToParty = $o['cesarIdShipToParty'];
        if (isset($o['vehicleUsageCode'])) $this->vehicleUsageCode = $o['vehicleUsageCode'];
        if (isset($o['mbukSecured'])) $this->mbukSecured = $o['mbukSecured'];
        if (isset($o['isAllocatedToBackOrder'])) $this->isAllocatedToBackOrder = $o['isAllocatedToBackOrder'];
        if (isset($o['backOrderReference'])) $this->backOrderReference = $o['backOrderReference'];
        if (isset($o['marketAreaName'])) $this->marketAreaName = $o['marketAreaName'];
        if (isset($o['marketAreaId'])) $this->marketAreaId = $o['marketAreaId'];
        if (isset($o['daysAtSite'])) $this->daysAtSite = $o['daysAtSite'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->vin)) $o['vin'] = $this->vin;
        if (isset($this->vehicleDescription)) $o['vehicleDescription'] = $this->vehicleDescription;
        if (isset($this->commissionNumber)) $o['commissionNumber'] = $this->commissionNumber;
        if (isset($this->retailer)) $o['retailer'] = $this->retailer;
        if (isset($this->model)) $o['model'] = $this->model;
        if (isset($this->fuelType)) $o['fuelType'] = $this->fuelType;
        if (isset($this->transmission)) $o['transmission'] = $this->transmission;
        if (isset($this->colour)) $o['colour'] = $this->colour;
        if (isset($this->actualPrice)) $o['actualPrice'] = $this->actualPrice;
        if (isset($this->gbDestDate)) $o['gbDestDate'] = JsonConverters::to('DateTime', $this->gbDestDate);
        if (isset($this->vehicleUsage)) $o['vehicleUsage'] = $this->vehicleUsage;
        if (isset($this->underOffer)) $o['underOffer'] = $this->underOffer;
        if (isset($this->isSellable)) $o['isSellable'] = $this->isSellable;
        if (isset($this->vehicleType)) $o['vehicleType'] = $this->vehicleType;
        if (isset($this->vid)) $o['vid'] = $this->vid;
        if (isset($this->fin)) $o['fin'] = $this->fin;
        if (isset($this->chassisNumber)) $o['chassisNumber'] = $this->chassisNumber;
        if (isset($this->line)) $o['line'] = $this->line;
        if (isset($this->modelYear)) $o['modelYear'] = $this->modelYear;
        if (isset($this->modelYearCode)) $o['modelYearCode'] = $this->modelYearCode;
        if (isset($this->vehicleClass)) $o['vehicleClass'] = $this->vehicleClass;
        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->bodyStyle)) $o['bodyStyle'] = $this->bodyStyle;
        if (isset($this->productRange)) $o['productRange'] = $this->productRange;
        if (isset($this->engine)) $o['engine'] = $this->engine;
        if (isset($this->isAMG)) $o['isAMG'] = $this->isAMG;
        if (isset($this->colourGroup)) $o['colourGroup'] = $this->colourGroup;
        if (isset($this->upholstery)) $o['upholstery'] = $this->upholstery;
        if (isset($this->packages)) $o['packages'] = $this->packages;
        if (isset($this->nst)) $o['nst'] = $this->nst;
        if (isset($this->bM7NST)) $o['bM7NST'] = $this->bM7NST;
        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->electricRange)) $o['electricRange'] = $this->electricRange;
        if (isset($this->electricConsumption)) $o['electricConsumption'] = $this->electricConsumption;
        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->emission)) $o['emission'] = $this->emission;
        if (isset($this->emissionDirective)) $o['emissionDirective'] = $this->emissionDirective;
        if (isset($this->energyEfficiencyClass)) $o['energyEfficiencyClass'] = $this->energyEfficiencyClass;
        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->wltpEmissionCombined)) $o['wltpEmissionCombined'] = $this->wltpEmissionCombined;
        if (isset($this->portArrivalDate)) $o['portArrivalDate'] = JsonConverters::to('DateTime', $this->portArrivalDate);
        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->isDisplayStock)) $o['isDisplayStock'] = $this->isDisplayStock;
        if (isset($this->displayStockAgent)) $o['displayStockAgent'] = $this->displayStockAgent;
        if (isset($this->isSpecialistCar)) $o['isSpecialistCar'] = $this->isSpecialistCar;
        if (isset($this->account)) $o['account'] = $this->account;
        if (isset($this->location)) $o['location'] = $this->location;
        if (isset($this->cesarIdShipToParty)) $o['cesarIdShipToParty'] = $this->cesarIdShipToParty;
        if (isset($this->vehicleUsageCode)) $o['vehicleUsageCode'] = $this->vehicleUsageCode;
        if (isset($this->mbukSecured)) $o['mbukSecured'] = $this->mbukSecured;
        if (isset($this->isAllocatedToBackOrder)) $o['isAllocatedToBackOrder'] = $this->isAllocatedToBackOrder;
        if (isset($this->backOrderReference)) $o['backOrderReference'] = $this->backOrderReference;
        if (isset($this->marketAreaName)) $o['marketAreaName'] = $this->marketAreaName;
        if (isset($this->marketAreaId)) $o['marketAreaId'] = $this->marketAreaId;
        if (isset($this->daysAtSite)) $o['daysAtSite'] = $this->daysAtSite;
        return empty($o) ? new class(){} : $o;
    }
}

class DisplayStockOverviewResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<VehicleDisplayStock>|null */
        public ?array $vehicles=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['vehicles'])) $this->vehicles = JsonConverters::fromArray('VehicleDisplayStock', $o['vehicles']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->vehicles)) $o['vehicles'] = JsonConverters::toArray('VehicleDisplayStock', $this->vehicles);
        return empty($o) ? new class(){} : $o;
    }
}

class DisplayStockOverviewRequest implements IPost, JsonSerializable
{
    public function __construct(
        /** @description Is vehicle secured */
        // @ApiMember(Description="Is vehicle secured", IsRequired=true)
        /** @var bool|null */
        public ?bool $isSecured=null,

        /** @description Usage codes */
        // @ApiMember(Description="Usage codes", IsRequired=true)
        /** @var array<string>|null */
        public ?array $usageCode=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['isSecured'])) $this->isSecured = $o['isSecured'];
        if (isset($o['usageCode'])) $this->usageCode = JsonConverters::fromArray('string', $o['usageCode']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->isSecured)) $o['isSecured'] = $this->isSecured;
        if (isset($this->usageCode)) $o['usageCode'] = JsonConverters::toArray('string', $this->usageCode);
        return empty($o) ? new class(){} : $o;
    }
}

PHP DisplayStockOverviewRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/DisplayStockOverview HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	isSecured: False,
	usageCode: 
	[
		String
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	vehicles: 
	[
		{
			vin: String,
			vehicleDescription: String,
			commissionNumber: String,
			retailer: String,
			model: String,
			fuelType: String,
			transmission: String,
			colour: String,
			actualPrice: String,
			gbDestDate: 0001-01-01,
			vehicleUsage: String,
			underOffer: False,
			isSellable: False,
			vehicleType: String,
			vid: String,
			fin: String,
			chassisNumber: String,
			line: String,
			modelYear: String,
			modelYearCode: String,
			vehicleClass: String,
			retailPrice_ExVAT: String,
			retailPrice_IncVAT: String,
			otr: String,
			bodyStyle: String,
			productRange: String,
			engine: String,
			isAMG: False,
			colourGroup: String,
			upholstery: String,
			packages: String,
			nst: String,
			bM7NST: String,
			acceleration: String,
			bootCapacity: String,
			topSpeed: String,
			driveConcept: String,
			combustionPowerHp: String,
			electricPowerKw: String,
			electricPowerHp: String,
			combinedPowerKw: String,
			combinedPowerHP: String,
			electricRange: String,
			electricConsumption: String,
			emissionCombined: String,
			emissionExtraUrban: String,
			emissionUrban: String,
			emission: String,
			emissionDirective: String,
			energyEfficiencyClass: String,
			wltpCombined: String,
			wltpLow: String,
			wltpMedium: String,
			wltpHigh: String,
			wltpExtraHigh: String,
			wltpEmissionCombined: String,
			portArrivalDate: 0001-01-01,
			creationDate: 0001-01-01,
			lastUpdated: 0001-01-01,
			isDisplayStock: False,
			displayStockAgent: String,
			isSpecialistCar: False,
			account: String,
			location: String,
			cesarIdShipToParty: String,
			vehicleUsageCode: String,
			mbukSecured: False,
			isAllocatedToBackOrder: False,
			backOrderReference: String,
			marketAreaName: String,
			marketAreaId: 0,
			daysAtSite: String
		}
	]
}