POST | /v1/AllAvailableVehiclesCsv/{vehicleType}/{includeBackOrderAccounts} | Get all available vehicles |
---|
<?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 BaseAllAvailableVehiclesRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $vehicleType='',
/** @var bool|null */
public ?bool $includeBackOrderAccounts=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['vehicleType'])) $this->vehicleType = $o['vehicleType'];
if (isset($o['includeBackOrderAccounts'])) $this->includeBackOrderAccounts = $o['includeBackOrderAccounts'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->vehicleType)) $o['vehicleType'] = $this->vehicleType;
if (isset($this->includeBackOrderAccounts)) $o['includeBackOrderAccounts'] = $this->includeBackOrderAccounts;
return empty($o) ? new class(){} : $o;
}
}
class CsvVehicle implements JsonSerializable
{
public function __construct(
// @DataMember(Name="Vehicle Type")
/** @var string */
public string $Vehicle_Type='',
/** @var string */
public string $vid='',
/** @var string */
public string $vin='',
/** @var string */
public string $fin='',
// @DataMember(Name="Comm")
/** @var string */
public string $Comm='',
// @DataMember(Name="Chassis Number")
/** @var string */
public string $Chassis_Number='',
// @DataMember(Name="Model Year")
/** @var string */
public string $Model_Year='',
// @DataMember(Name="Model Year Code")
/** @var string */
public string $Model_Year_Code='',
// @DataMember(Name="Half Model Year Code")
/** @var string */
public string $Half_Model_Year_Code='',
// @DataMember(Name="Full Model Year Code")
/** @var string */
public string $Full_Model_Year_Code='',
// @DataMember(Name="Description")
/** @var string */
public string $Description='',
// @DataMember(Name="Vehicle Class")
/** @var string */
public string $Vehicle_Class='',
// @DataMember(Name="Body Style")
/** @var string */
public string $Body_Style='',
/** @var string */
public string $model='',
/** @var string */
public string $colour='',
// @DataMember(Name="Colour Group")
/** @var string */
public string $Colour_Group='',
// @DataMember(Name="Fuel Type")
/** @var string */
public string $Fuel_Type='',
/** @var string */
public string $transmission='',
/** @var string */
public string $packages='',
/** @var string */
public string $lines='',
// @DataMember(Name="Product Range")
/** @var string */
public string $Product_Range='',
/** @var string */
public string $engine='',
/** @var bool|null */
public ?bool $isAMG=null,
/** @var string */
public string $upholstery='',
/** @var string */
public string $nst='',
/** @var string */
public string $baumuster='',
/** @var string */
public string $bm7NST='',
/** @var float|null */
public ?float $acceleration=null,
// @DataMember(Name="Boot Capacity")
/** @var int|null */
public ?int $Boot_Capacity=null,
// @DataMember(Name="Top Speed")
/** @var float|null */
public ?float $Top_Speed=null,
// @DataMember(Name="Drive Concept")
/** @var string */
public string $Drive_Concept='',
// @DataMember(Name="Combustion Power HP")
/** @var float|null */
public ?float $Combustion_Power_HP=null,
// @DataMember(Name="Electric Power KW")
/** @var float|null */
public ?float $Electric_Power_KW=null,
// @DataMember(Name="Electric Power HP")
/** @var float|null */
public ?float $Electric_Power_HP=null,
// @DataMember(Name="Combined Power KW")
/** @var float|null */
public ?float $Combined_Power_KW=null,
// @DataMember(Name="Combined Power HP")
/** @var float|null */
public ?float $Combined_Power_HP=null,
// @DataMember(Name="Electric Range")
/** @var float|null */
public ?float $Electric_Range=null,
// @DataMember(Name="Electric Consumption")
/** @var float|null */
public ?float $Electric_Consumption=null,
// @DataMember(Name="Emission Combined")
/** @var string */
public string $Emission_Combined='',
// @DataMember(Name="Emission Directive")
/** @var string */
public string $Emission_Directive='',
// @DataMember(Name="Emission Extra Urban")
/** @var string */
public string $Emission_Extra_Urban='',
// @DataMember(Name="Emission Urban")
/** @var string */
public string $Emission_Urban='',
/** @var float|null */
public ?float $emission=null,
// @DataMember(Name="Test Standard")
/** @var string */
public string $Test_Standard='',
// @DataMember(Name="Energy Efficiency Class")
/** @var string */
public string $Energy_Efficiency_Class='',
// @DataMember(Name="WLTP Combined")
/** @var string */
public string $WLTP_Combined='',
// @DataMember(Name="WLTP Low")
/** @var string */
public string $WLTP_Low='',
// @DataMember(Name="WLTP Medium")
/** @var string */
public string $WLTP_Medium='',
// @DataMember(Name="WLTP High")
/** @var string */
public string $WLTP_High='',
// @DataMember(Name="WLTP Extra High")
/** @var string */
public string $WLTP_Extra_High='',
// @DataMember(Name="WLTP CO2 Emissions")
/** @var string */
public string $WLTP_CO2_Emissions='',
// @DataMember(Name="Production Date")
/** @var DateTime|null */
public ?DateTime $Production_Date=null,
// @DataMember(Name="Port Arrival Date")
/** @var DateTime|null */
public ?DateTime $Port_Arrival_Date=null,
// @DataMember(Name="Creation Date")
/** @var DateTime */
public DateTime $Creation_Date=new DateTime(),
// @DataMember(Name="Maintenance Date")
/** @var DateTime|null */
public ?DateTime $Maintenance_Date=null,
// @DataMember(Name="Net Price")
/** @var float */
public float $Net_Price=0.0,
// @DataMember(Name="Retail Price")
/** @var float */
public float $Retail_Price=0.0,
// @DataMember(Name="OTR Price")
/** @var float */
public float $OTR_Price=0.0,
// @DataMember(Name="Actual Price")
/** @var float */
public float $Actual_Price=0.0,
// @DataMember(Name="Usage Code")
/** @var string */
public string $Usage_Code='',
/** @var string */
public string $secured='',
/** @var string */
public string $account='',
/** @var string */
public string $isDisplayStock='',
// @DataMember(Name="Display Agent")
/** @var string */
public string $Display_Agent='',
/** @var string */
public string $isSpecialistCar='',
/** @var string */
public string $cesarIdShipToParty='',
/** @var string */
public string $isSellable='',
// @DataMember(Name="Under Offer")
/** @var string */
public string $Under_Offer='',
// @DataMember(Name="Secured Date")
/** @var string|null */
public ?string $Secured_Date=null,
// @DataMember(Name="Secured Reason")
/** @var string|null */
public ?string $Secured_Reason=null,
// @DataMember(Name="Secured By Gas Id")
/** @var string|null */
public ?string $Secured_By_Gas_Id=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Vehicle_Type'])) $this->Vehicle_Type = $o['Vehicle_Type'];
if (isset($o['vid'])) $this->vid = $o['vid'];
if (isset($o['vin'])) $this->vin = $o['vin'];
if (isset($o['fin'])) $this->fin = $o['fin'];
if (isset($o['Comm'])) $this->Comm = $o['Comm'];
if (isset($o['Chassis_Number'])) $this->Chassis_Number = $o['Chassis_Number'];
if (isset($o['Model_Year'])) $this->Model_Year = $o['Model_Year'];
if (isset($o['Model_Year_Code'])) $this->Model_Year_Code = $o['Model_Year_Code'];
if (isset($o['Half_Model_Year_Code'])) $this->Half_Model_Year_Code = $o['Half_Model_Year_Code'];
if (isset($o['Full_Model_Year_Code'])) $this->Full_Model_Year_Code = $o['Full_Model_Year_Code'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Vehicle_Class'])) $this->Vehicle_Class = $o['Vehicle_Class'];
if (isset($o['Body_Style'])) $this->Body_Style = $o['Body_Style'];
if (isset($o['model'])) $this->model = $o['model'];
if (isset($o['colour'])) $this->colour = $o['colour'];
if (isset($o['Colour_Group'])) $this->Colour_Group = $o['Colour_Group'];
if (isset($o['Fuel_Type'])) $this->Fuel_Type = $o['Fuel_Type'];
if (isset($o['transmission'])) $this->transmission = $o['transmission'];
if (isset($o['packages'])) $this->packages = $o['packages'];
if (isset($o['lines'])) $this->lines = $o['lines'];
if (isset($o['Product_Range'])) $this->Product_Range = $o['Product_Range'];
if (isset($o['engine'])) $this->engine = $o['engine'];
if (isset($o['isAMG'])) $this->isAMG = $o['isAMG'];
if (isset($o['upholstery'])) $this->upholstery = $o['upholstery'];
if (isset($o['nst'])) $this->nst = $o['nst'];
if (isset($o['baumuster'])) $this->baumuster = $o['baumuster'];
if (isset($o['bm7NST'])) $this->bm7NST = $o['bm7NST'];
if (isset($o['acceleration'])) $this->acceleration = $o['acceleration'];
if (isset($o['Boot_Capacity'])) $this->Boot_Capacity = $o['Boot_Capacity'];
if (isset($o['Top_Speed'])) $this->Top_Speed = $o['Top_Speed'];
if (isset($o['Drive_Concept'])) $this->Drive_Concept = $o['Drive_Concept'];
if (isset($o['Combustion_Power_HP'])) $this->Combustion_Power_HP = $o['Combustion_Power_HP'];
if (isset($o['Electric_Power_KW'])) $this->Electric_Power_KW = $o['Electric_Power_KW'];
if (isset($o['Electric_Power_HP'])) $this->Electric_Power_HP = $o['Electric_Power_HP'];
if (isset($o['Combined_Power_KW'])) $this->Combined_Power_KW = $o['Combined_Power_KW'];
if (isset($o['Combined_Power_HP'])) $this->Combined_Power_HP = $o['Combined_Power_HP'];
if (isset($o['Electric_Range'])) $this->Electric_Range = $o['Electric_Range'];
if (isset($o['Electric_Consumption'])) $this->Electric_Consumption = $o['Electric_Consumption'];
if (isset($o['Emission_Combined'])) $this->Emission_Combined = $o['Emission_Combined'];
if (isset($o['Emission_Directive'])) $this->Emission_Directive = $o['Emission_Directive'];
if (isset($o['Emission_Extra_Urban'])) $this->Emission_Extra_Urban = $o['Emission_Extra_Urban'];
if (isset($o['Emission_Urban'])) $this->Emission_Urban = $o['Emission_Urban'];
if (isset($o['emission'])) $this->emission = $o['emission'];
if (isset($o['Test_Standard'])) $this->Test_Standard = $o['Test_Standard'];
if (isset($o['Energy_Efficiency_Class'])) $this->Energy_Efficiency_Class = $o['Energy_Efficiency_Class'];
if (isset($o['WLTP_Combined'])) $this->WLTP_Combined = $o['WLTP_Combined'];
if (isset($o['WLTP_Low'])) $this->WLTP_Low = $o['WLTP_Low'];
if (isset($o['WLTP_Medium'])) $this->WLTP_Medium = $o['WLTP_Medium'];
if (isset($o['WLTP_High'])) $this->WLTP_High = $o['WLTP_High'];
if (isset($o['WLTP_Extra_High'])) $this->WLTP_Extra_High = $o['WLTP_Extra_High'];
if (isset($o['WLTP_CO2_Emissions'])) $this->WLTP_CO2_Emissions = $o['WLTP_CO2_Emissions'];
if (isset($o['Production_Date'])) $this->Production_Date = JsonConverters::from('DateTime', $o['Production_Date']);
if (isset($o['Port_Arrival_Date'])) $this->Port_Arrival_Date = JsonConverters::from('DateTime', $o['Port_Arrival_Date']);
if (isset($o['Creation_Date'])) $this->Creation_Date = JsonConverters::from('DateTime', $o['Creation_Date']);
if (isset($o['Maintenance_Date'])) $this->Maintenance_Date = JsonConverters::from('DateTime', $o['Maintenance_Date']);
if (isset($o['Net_Price'])) $this->Net_Price = $o['Net_Price'];
if (isset($o['Retail_Price'])) $this->Retail_Price = $o['Retail_Price'];
if (isset($o['OTR_Price'])) $this->OTR_Price = $o['OTR_Price'];
if (isset($o['Actual_Price'])) $this->Actual_Price = $o['Actual_Price'];
if (isset($o['Usage_Code'])) $this->Usage_Code = $o['Usage_Code'];
if (isset($o['secured'])) $this->secured = $o['secured'];
if (isset($o['account'])) $this->account = $o['account'];
if (isset($o['isDisplayStock'])) $this->isDisplayStock = $o['isDisplayStock'];
if (isset($o['Display_Agent'])) $this->Display_Agent = $o['Display_Agent'];
if (isset($o['isSpecialistCar'])) $this->isSpecialistCar = $o['isSpecialistCar'];
if (isset($o['cesarIdShipToParty'])) $this->cesarIdShipToParty = $o['cesarIdShipToParty'];
if (isset($o['isSellable'])) $this->isSellable = $o['isSellable'];
if (isset($o['Under_Offer'])) $this->Under_Offer = $o['Under_Offer'];
if (isset($o['Secured_Date'])) $this->Secured_Date = $o['Secured_Date'];
if (isset($o['Secured_Reason'])) $this->Secured_Reason = $o['Secured_Reason'];
if (isset($o['Secured_By_Gas_Id'])) $this->Secured_By_Gas_Id = $o['Secured_By_Gas_Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Vehicle_Type)) $o['Vehicle_Type'] = $this->Vehicle_Type;
if (isset($this->vid)) $o['vid'] = $this->vid;
if (isset($this->vin)) $o['vin'] = $this->vin;
if (isset($this->fin)) $o['fin'] = $this->fin;
if (isset($this->Comm)) $o['Comm'] = $this->Comm;
if (isset($this->Chassis_Number)) $o['Chassis_Number'] = $this->Chassis_Number;
if (isset($this->Model_Year)) $o['Model_Year'] = $this->Model_Year;
if (isset($this->Model_Year_Code)) $o['Model_Year_Code'] = $this->Model_Year_Code;
if (isset($this->Half_Model_Year_Code)) $o['Half_Model_Year_Code'] = $this->Half_Model_Year_Code;
if (isset($this->Full_Model_Year_Code)) $o['Full_Model_Year_Code'] = $this->Full_Model_Year_Code;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Vehicle_Class)) $o['Vehicle_Class'] = $this->Vehicle_Class;
if (isset($this->Body_Style)) $o['Body_Style'] = $this->Body_Style;
if (isset($this->model)) $o['model'] = $this->model;
if (isset($this->colour)) $o['colour'] = $this->colour;
if (isset($this->Colour_Group)) $o['Colour_Group'] = $this->Colour_Group;
if (isset($this->Fuel_Type)) $o['Fuel_Type'] = $this->Fuel_Type;
if (isset($this->transmission)) $o['transmission'] = $this->transmission;
if (isset($this->packages)) $o['packages'] = $this->packages;
if (isset($this->lines)) $o['lines'] = $this->lines;
if (isset($this->Product_Range)) $o['Product_Range'] = $this->Product_Range;
if (isset($this->engine)) $o['engine'] = $this->engine;
if (isset($this->isAMG)) $o['isAMG'] = $this->isAMG;
if (isset($this->upholstery)) $o['upholstery'] = $this->upholstery;
if (isset($this->nst)) $o['nst'] = $this->nst;
if (isset($this->baumuster)) $o['baumuster'] = $this->baumuster;
if (isset($this->bm7NST)) $o['bm7NST'] = $this->bm7NST;
if (isset($this->acceleration)) $o['acceleration'] = $this->acceleration;
if (isset($this->Boot_Capacity)) $o['Boot_Capacity'] = $this->Boot_Capacity;
if (isset($this->Top_Speed)) $o['Top_Speed'] = $this->Top_Speed;
if (isset($this->Drive_Concept)) $o['Drive_Concept'] = $this->Drive_Concept;
if (isset($this->Combustion_Power_HP)) $o['Combustion_Power_HP'] = $this->Combustion_Power_HP;
if (isset($this->Electric_Power_KW)) $o['Electric_Power_KW'] = $this->Electric_Power_KW;
if (isset($this->Electric_Power_HP)) $o['Electric_Power_HP'] = $this->Electric_Power_HP;
if (isset($this->Combined_Power_KW)) $o['Combined_Power_KW'] = $this->Combined_Power_KW;
if (isset($this->Combined_Power_HP)) $o['Combined_Power_HP'] = $this->Combined_Power_HP;
if (isset($this->Electric_Range)) $o['Electric_Range'] = $this->Electric_Range;
if (isset($this->Electric_Consumption)) $o['Electric_Consumption'] = $this->Electric_Consumption;
if (isset($this->Emission_Combined)) $o['Emission_Combined'] = $this->Emission_Combined;
if (isset($this->Emission_Directive)) $o['Emission_Directive'] = $this->Emission_Directive;
if (isset($this->Emission_Extra_Urban)) $o['Emission_Extra_Urban'] = $this->Emission_Extra_Urban;
if (isset($this->Emission_Urban)) $o['Emission_Urban'] = $this->Emission_Urban;
if (isset($this->emission)) $o['emission'] = $this->emission;
if (isset($this->Test_Standard)) $o['Test_Standard'] = $this->Test_Standard;
if (isset($this->Energy_Efficiency_Class)) $o['Energy_Efficiency_Class'] = $this->Energy_Efficiency_Class;
if (isset($this->WLTP_Combined)) $o['WLTP_Combined'] = $this->WLTP_Combined;
if (isset($this->WLTP_Low)) $o['WLTP_Low'] = $this->WLTP_Low;
if (isset($this->WLTP_Medium)) $o['WLTP_Medium'] = $this->WLTP_Medium;
if (isset($this->WLTP_High)) $o['WLTP_High'] = $this->WLTP_High;
if (isset($this->WLTP_Extra_High)) $o['WLTP_Extra_High'] = $this->WLTP_Extra_High;
if (isset($this->WLTP_CO2_Emissions)) $o['WLTP_CO2_Emissions'] = $this->WLTP_CO2_Emissions;
if (isset($this->Production_Date)) $o['Production_Date'] = JsonConverters::to('DateTime', $this->Production_Date);
if (isset($this->Port_Arrival_Date)) $o['Port_Arrival_Date'] = JsonConverters::to('DateTime', $this->Port_Arrival_Date);
if (isset($this->Creation_Date)) $o['Creation_Date'] = JsonConverters::to('DateTime', $this->Creation_Date);
if (isset($this->Maintenance_Date)) $o['Maintenance_Date'] = JsonConverters::to('DateTime', $this->Maintenance_Date);
if (isset($this->Net_Price)) $o['Net_Price'] = $this->Net_Price;
if (isset($this->Retail_Price)) $o['Retail_Price'] = $this->Retail_Price;
if (isset($this->OTR_Price)) $o['OTR_Price'] = $this->OTR_Price;
if (isset($this->Actual_Price)) $o['Actual_Price'] = $this->Actual_Price;
if (isset($this->Usage_Code)) $o['Usage_Code'] = $this->Usage_Code;
if (isset($this->secured)) $o['secured'] = $this->secured;
if (isset($this->account)) $o['account'] = $this->account;
if (isset($this->isDisplayStock)) $o['isDisplayStock'] = $this->isDisplayStock;
if (isset($this->Display_Agent)) $o['Display_Agent'] = $this->Display_Agent;
if (isset($this->isSpecialistCar)) $o['isSpecialistCar'] = $this->isSpecialistCar;
if (isset($this->cesarIdShipToParty)) $o['cesarIdShipToParty'] = $this->cesarIdShipToParty;
if (isset($this->isSellable)) $o['isSellable'] = $this->isSellable;
if (isset($this->Under_Offer)) $o['Under_Offer'] = $this->Under_Offer;
if (isset($this->Secured_Date)) $o['Secured_Date'] = $this->Secured_Date;
if (isset($this->Secured_Reason)) $o['Secured_Reason'] = $this->Secured_Reason;
if (isset($this->Secured_By_Gas_Id)) $o['Secured_By_Gas_Id'] = $this->Secured_By_Gas_Id;
return empty($o) ? new class(){} : $o;
}
}
class InternalAvailableStockResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $totalVehicles=0,
/** @var array<CsvVehicle>|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('CsvVehicle', $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('CsvVehicle', $this->vehicles);
return empty($o) ? new class(){} : $o;
}
}
class CampaignExclusion implements JsonSerializable
{
public function __construct(
/** @var string[] */
public array $vin=[],
/** @var string[] */
public array $commissionNumber=[],
/** @var string */
public string $modelYearCode='',
/** @var string */
public string $equipmentCode='',
/** @var string[] */
public array $gssn=[]
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['vin'])) $this->vin = JsonConverters::fromArray('string', $o['vin']);
if (isset($o['commissionNumber'])) $this->commissionNumber = JsonConverters::fromArray('string', $o['commissionNumber']);
if (isset($o['modelYearCode'])) $this->modelYearCode = $o['modelYearCode'];
if (isset($o['equipmentCode'])) $this->equipmentCode = $o['equipmentCode'];
if (isset($o['gssn'])) $this->gssn = JsonConverters::fromArray('string', $o['gssn']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->vin)) $o['vin'] = JsonConverters::toArray('string', $this->vin);
if (isset($this->commissionNumber)) $o['commissionNumber'] = JsonConverters::toArray('string', $this->commissionNumber);
if (isset($this->modelYearCode)) $o['modelYearCode'] = $this->modelYearCode;
if (isset($this->equipmentCode)) $o['equipmentCode'] = $this->equipmentCode;
if (isset($this->gssn)) $o['gssn'] = JsonConverters::toArray('string', $this->gssn);
return empty($o) ? new class(){} : $o;
}
}
class RegistrationDate implements JsonSerializable
{
public function __construct(
/** @var DateTime */
public DateTime $from=new DateTime(),
/** @var DateTime */
public DateTime $to=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['from'])) $this->from = JsonConverters::from('DateTime', $o['from']);
if (isset($o['to'])) $this->to = JsonConverters::from('DateTime', $o['to']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->from)) $o['from'] = JsonConverters::to('DateTime', $this->from);
if (isset($this->to)) $o['to'] = JsonConverters::to('DateTime', $this->to);
return empty($o) ? new class(){} : $o;
}
}
class Age implements JsonSerializable
{
public function __construct(
/** @var DateTime */
public DateTime $date=new DateTime(),
/** @var int */
public int $min=0,
/** @var int */
public int $max=0,
/** @var bool|null */
public ?bool $includePipelineStock=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['date'])) $this->date = JsonConverters::from('DateTime', $o['date']);
if (isset($o['min'])) $this->min = $o['min'];
if (isset($o['max'])) $this->max = $o['max'];
if (isset($o['includePipelineStock'])) $this->includePipelineStock = $o['includePipelineStock'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->date)) $o['date'] = JsonConverters::to('DateTime', $this->date);
if (isset($this->min)) $o['min'] = $this->min;
if (isset($this->max)) $o['max'] = $this->max;
if (isset($this->includePipelineStock)) $o['includePipelineStock'] = $this->includePipelineStock;
return empty($o) ? new class(){} : $o;
}
}
class PortArrivalDate implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $pipelineStock=null,
/** @var DateTime */
public DateTime $from=new DateTime(),
/** @var DateTime */
public DateTime $to=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['pipelineStock'])) $this->pipelineStock = $o['pipelineStock'];
if (isset($o['from'])) $this->from = JsonConverters::from('DateTime', $o['from']);
if (isset($o['to'])) $this->to = JsonConverters::from('DateTime', $o['to']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->pipelineStock)) $o['pipelineStock'] = $this->pipelineStock;
if (isset($this->from)) $o['from'] = JsonConverters::to('DateTime', $this->from);
if (isset($this->to)) $o['to'] = JsonConverters::to('DateTime', $this->to);
return empty($o) ? new class(){} : $o;
}
}
class VehicleSearchV3Criteria implements JsonSerializable
{
public function __construct(
/** @var string[] */
public array $vin=[],
/** @var int[] */
public array $model=[],
/** @var int[] */
public array $fuel=[],
/** @var int[] */
public array $transmission=[],
/** @var int[] */
public array $engine=[],
/** @var string[] */
public array $line=[],
/** @var int[] */
public array $mappedLine=[],
/** @var string[] */
public array $commissionNumber=[],
/** @var string */
public string $vehicleType='',
/** @var CampaignExclusion|null */
public ?CampaignExclusion $exclusion=null,
/** @var string */
public string $regNo='',
/** @var bool|null */
public ?bool $includeOffline=null,
/** @var RegistrationDate|null */
public ?RegistrationDate $registrationDate=null,
/** @var Age|null */
public ?Age $age=null,
/** @var PortArrivalDate|null */
public ?PortArrivalDate $portArrivalDate=null,
/** @var bool|null */
public ?bool $isAvailableOnline=null,
/** @var bool|null */
public ?bool $isBackOrdered=null,
/** @var bool|null */
public ?bool $isSellable=null,
/** @var bool|null */
public ?bool $isUnderOffer=null,
/** @var bool|null */
public ?bool $mbukSecured=null,
/** @var string[] */
public array $account=[],
/** @var string[] */
public array $baumuster=[],
/** @var int[] */
public array $colours=[],
/** @var int[] */
public array $upholstery=[],
/** @var int[] */
public array $package=[],
/** @var string[] */
public array $nst=[],
/** @var string[] */
public array $usageCode=[]
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['vin'])) $this->vin = JsonConverters::fromArray('string', $o['vin']);
if (isset($o['model'])) $this->model = JsonConverters::fromArray('int', $o['model']);
if (isset($o['fuel'])) $this->fuel = JsonConverters::fromArray('int', $o['fuel']);
if (isset($o['transmission'])) $this->transmission = JsonConverters::fromArray('int', $o['transmission']);
if (isset($o['engine'])) $this->engine = JsonConverters::fromArray('int', $o['engine']);
if (isset($o['line'])) $this->line = JsonConverters::fromArray('string', $o['line']);
if (isset($o['mappedLine'])) $this->mappedLine = JsonConverters::fromArray('int', $o['mappedLine']);
if (isset($o['commissionNumber'])) $this->commissionNumber = JsonConverters::fromArray('string', $o['commissionNumber']);
if (isset($o['vehicleType'])) $this->vehicleType = $o['vehicleType'];
if (isset($o['exclusion'])) $this->exclusion = JsonConverters::from('CampaignExclusion', $o['exclusion']);
if (isset($o['regNo'])) $this->regNo = $o['regNo'];
if (isset($o['includeOffline'])) $this->includeOffline = $o['includeOffline'];
if (isset($o['registrationDate'])) $this->registrationDate = JsonConverters::from('RegistrationDate', $o['registrationDate']);
if (isset($o['age'])) $this->age = JsonConverters::from('Age', $o['age']);
if (isset($o['portArrivalDate'])) $this->portArrivalDate = JsonConverters::from('PortArrivalDate', $o['portArrivalDate']);
if (isset($o['isAvailableOnline'])) $this->isAvailableOnline = $o['isAvailableOnline'];
if (isset($o['isBackOrdered'])) $this->isBackOrdered = $o['isBackOrdered'];
if (isset($o['isSellable'])) $this->isSellable = $o['isSellable'];
if (isset($o['isUnderOffer'])) $this->isUnderOffer = $o['isUnderOffer'];
if (isset($o['mbukSecured'])) $this->mbukSecured = $o['mbukSecured'];
if (isset($o['account'])) $this->account = JsonConverters::fromArray('string', $o['account']);
if (isset($o['baumuster'])) $this->baumuster = JsonConverters::fromArray('string', $o['baumuster']);
if (isset($o['colours'])) $this->colours = JsonConverters::fromArray('int', $o['colours']);
if (isset($o['upholstery'])) $this->upholstery = JsonConverters::fromArray('int', $o['upholstery']);
if (isset($o['package'])) $this->package = JsonConverters::fromArray('int', $o['package']);
if (isset($o['nst'])) $this->nst = JsonConverters::fromArray('string', $o['nst']);
if (isset($o['usageCode'])) $this->usageCode = JsonConverters::fromArray('string', $o['usageCode']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->vin)) $o['vin'] = JsonConverters::toArray('string', $this->vin);
if (isset($this->model)) $o['model'] = JsonConverters::toArray('int', $this->model);
if (isset($this->fuel)) $o['fuel'] = JsonConverters::toArray('int', $this->fuel);
if (isset($this->transmission)) $o['transmission'] = JsonConverters::toArray('int', $this->transmission);
if (isset($this->engine)) $o['engine'] = JsonConverters::toArray('int', $this->engine);
if (isset($this->line)) $o['line'] = JsonConverters::toArray('string', $this->line);
if (isset($this->mappedLine)) $o['mappedLine'] = JsonConverters::toArray('int', $this->mappedLine);
if (isset($this->commissionNumber)) $o['commissionNumber'] = JsonConverters::toArray('string', $this->commissionNumber);
if (isset($this->vehicleType)) $o['vehicleType'] = $this->vehicleType;
if (isset($this->exclusion)) $o['exclusion'] = JsonConverters::to('CampaignExclusion', $this->exclusion);
if (isset($this->regNo)) $o['regNo'] = $this->regNo;
if (isset($this->includeOffline)) $o['includeOffline'] = $this->includeOffline;
if (isset($this->registrationDate)) $o['registrationDate'] = JsonConverters::to('RegistrationDate', $this->registrationDate);
if (isset($this->age)) $o['age'] = JsonConverters::to('Age', $this->age);
if (isset($this->portArrivalDate)) $o['portArrivalDate'] = JsonConverters::to('PortArrivalDate', $this->portArrivalDate);
if (isset($this->isAvailableOnline)) $o['isAvailableOnline'] = $this->isAvailableOnline;
if (isset($this->isBackOrdered)) $o['isBackOrdered'] = $this->isBackOrdered;
if (isset($this->isSellable)) $o['isSellable'] = $this->isSellable;
if (isset($this->isUnderOffer)) $o['isUnderOffer'] = $this->isUnderOffer;
if (isset($this->mbukSecured)) $o['mbukSecured'] = $this->mbukSecured;
if (isset($this->account)) $o['account'] = JsonConverters::toArray('string', $this->account);
if (isset($this->baumuster)) $o['baumuster'] = JsonConverters::toArray('string', $this->baumuster);
if (isset($this->colours)) $o['colours'] = JsonConverters::toArray('int', $this->colours);
if (isset($this->upholstery)) $o['upholstery'] = JsonConverters::toArray('int', $this->upholstery);
if (isset($this->package)) $o['package'] = JsonConverters::toArray('int', $this->package);
if (isset($this->nst)) $o['nst'] = JsonConverters::toArray('string', $this->nst);
if (isset($this->usageCode)) $o['usageCode'] = JsonConverters::toArray('string', $this->usageCode);
return empty($o) ? new class(){} : $o;
}
}
class AllAvailableVehiclesByCriteriaCsvRequest extends BaseAllAvailableVehiclesRequest implements IPost, JsonSerializable
{
/**
* @param string $vehicleType
* @param bool|null $includeBackOrderAccounts
*/
public function __construct(
string $vehicleType='',
?bool $includeBackOrderAccounts=null,
/** @var VehicleSearchV3Criteria|null */
public ?VehicleSearchV3Criteria $criteria=null
) {
parent::__construct($vehicleType,$includeBackOrderAccounts);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['criteria'])) $this->criteria = JsonConverters::from('VehicleSearchV3Criteria', $o['criteria']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->criteria)) $o['criteria'] = JsonConverters::to('VehicleSearchV3Criteria', $this->criteria);
return empty($o) ? new class(){} : $o;
}
}
PHP AllAvailableVehiclesByCriteriaCsvRequest 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.
POST /v1/AllAvailableVehiclesCsv/{vehicleType}/{includeBackOrderAccounts} HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<AllAvailableVehiclesByCriteriaCsvRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO.V3">
<IncludeBackOrderAccounts>false</IncludeBackOrderAccounts>
<VehicleType>String</VehicleType>
<Criteria>
<Account xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Account>
<Age>
<Date>0001-01-01T00:00:00</Date>
<IncludePipelineStock>false</IncludePipelineStock>
<Max>0</Max>
<Min>0</Min>
</Age>
<Baumuster xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Baumuster>
<Colours xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</Colours>
<CommissionNumber xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</CommissionNumber>
<Engine xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</Engine>
<Exclusion>
<CommissionNumber xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</CommissionNumber>
<EquipmentCode>String</EquipmentCode>
<Gssn xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Gssn>
<ModelYearCode>String</ModelYearCode>
<Vin xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Vin>
</Exclusion>
<Fuel xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</Fuel>
<IncludeOffline>false</IncludeOffline>
<IsAvailableOnline>false</IsAvailableOnline>
<IsBackOrdered>false</IsBackOrdered>
<IsSellable>false</IsSellable>
<IsUnderOffer>false</IsUnderOffer>
<Line xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Line>
<MBUKSecured>false</MBUKSecured>
<MappedLine xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</MappedLine>
<Model xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</Model>
<NST xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</NST>
<Package xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</Package>
<PortArrivalDate>
<From>0001-01-01T00:00:00</From>
<PipelineStock>false</PipelineStock>
<To>0001-01-01T00:00:00</To>
</PortArrivalDate>
<RegNo>String</RegNo>
<RegistrationDate>
<From>0001-01-01T00:00:00</From>
<To>0001-01-01T00:00:00</To>
</RegistrationDate>
<Transmission xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</Transmission>
<Upholstery xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</Upholstery>
<UsageCode xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</UsageCode>
<VehicleType>String</VehicleType>
<Vin xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Vin>
</Criteria>
</AllAvailableVehiclesByCriteriaCsvRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <InternalAvailableStockResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO.V3"> <TotalVehicles>0</TotalVehicles> <Vehicles i:nil="true" /> </InternalAvailableStockResponse>