GET | /v1/order/customer/{CustomerId} | Get Order by Customer |
---|
<?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 Order implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Guid='',
/** @var string */
public string $Reference='',
/** @var int */
public int $Status=0,
/** @var string */
public string $CustomerId='',
/** @var string */
public string $MulesoftReference='',
/** @var string */
public string $GasId='',
/** @var string */
public string $OrderDate='',
/** @var string */
public string $OfferSnapShot=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['Reference'])) $this->Reference = $o['Reference'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
if (isset($o['MulesoftReference'])) $this->MulesoftReference = $o['MulesoftReference'];
if (isset($o['GasId'])) $this->GasId = $o['GasId'];
if (isset($o['OrderDate'])) $this->OrderDate = $o['OrderDate'];
if (isset($o['OfferSnapShot'])) $this->OfferSnapShot = $o['OfferSnapShot'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->Reference)) $o['Reference'] = $this->Reference;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
if (isset($this->MulesoftReference)) $o['MulesoftReference'] = $this->MulesoftReference;
if (isset($this->GasId)) $o['GasId'] = $this->GasId;
if (isset($this->OrderDate)) $o['OrderDate'] = $this->OrderDate;
if (isset($this->OfferSnapShot)) $o['OfferSnapShot'] = $this->OfferSnapShot;
return empty($o) ? new class(){} : $o;
}
}
class OrderStatus implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $Description=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
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->Description)) $o['Description'] = $this->Description;
return empty($o) ? new class(){} : $o;
}
}
class OnlineShowroomStatus implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $Description='',
/** @var string */
public string $Slug='',
/** @var bool|null */
public ?bool $Current=null,
/** @var bool|null */
public ?bool $Completed=null,
/** @var array<OrderStatus>|null */
public ?array $OrderStatuses=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Slug'])) $this->Slug = $o['Slug'];
if (isset($o['Current'])) $this->Current = $o['Current'];
if (isset($o['Completed'])) $this->Completed = $o['Completed'];
if (isset($o['OrderStatuses'])) $this->OrderStatuses = JsonConverters::fromArray('OrderStatus', $o['OrderStatuses']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Slug)) $o['Slug'] = $this->Slug;
if (isset($this->Current)) $o['Current'] = $this->Current;
if (isset($this->Completed)) $o['Completed'] = $this->Completed;
if (isset($this->OrderStatuses)) $o['OrderStatuses'] = JsonConverters::toArray('OrderStatus', $this->OrderStatuses);
return empty($o) ? new class(){} : $o;
}
}
class RetailerOpeningTime implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Day='',
/** @var string */
public string $OpenFrom='',
/** @var string */
public string $OpenTo='',
/** @var string */
public string $Special=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Day'])) $this->Day = $o['Day'];
if (isset($o['OpenFrom'])) $this->OpenFrom = $o['OpenFrom'];
if (isset($o['OpenTo'])) $this->OpenTo = $o['OpenTo'];
if (isset($o['Special'])) $this->Special = $o['Special'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Day)) $o['Day'] = $this->Day;
if (isset($this->OpenFrom)) $o['OpenFrom'] = $this->OpenFrom;
if (isset($this->OpenTo)) $o['OpenTo'] = $this->OpenTo;
if (isset($this->Special)) $o['Special'] = $this->Special;
return empty($o) ? new class(){} : $o;
}
}
class RetailerOpeningTimes implements JsonSerializable
{
public function __construct(
/** @var array<RetailerOpeningTime>|null */
public ?array $New=null,
/** @var array<RetailerOpeningTime>|null */
public ?array $Used=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['New'])) $this->New = JsonConverters::fromArray('RetailerOpeningTime', $o['New']);
if (isset($o['Used'])) $this->Used = JsonConverters::fromArray('RetailerOpeningTime', $o['Used']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->New)) $o['New'] = JsonConverters::toArray('RetailerOpeningTime', $this->New);
if (isset($this->Used)) $o['Used'] = JsonConverters::toArray('RetailerOpeningTime', $this->Used);
return empty($o) ? new class(){} : $o;
}
}
class Retailer implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $GssnId='',
/** @var string */
public string $Description='',
/** @var string */
public string $Street='',
/** @var string */
public string $City='',
/** @var string */
public string $Postcode='',
/** @var string */
public string $GoogleMapPostcode='',
/** @var string */
public string $Phone='',
/** @var string */
public string $Fax='',
/** @var string */
public string $Email='',
/** @var string */
public string $Website='',
/** @var string */
public string $RetailerGroupId='',
/** @var string */
public string $RetailerGroupName='',
/** @var bool|null */
public ?bool $IsOnline=null,
/** @var bool|null */
public ?bool $IsNewCarRetailer=null,
/** @var bool|null */
public ?bool $IsUsedCarRetailer=null,
/** @var bool|null */
public ?bool $IsCentralRetailer=null,
/** @var bool|null */
public ?bool $ChatEnabled=null,
/** @var bool|null */
public ?bool $TradeInEnabled=null,
/** @var bool|null */
public ?bool $smart=null,
/** @var string */
public string $DisplayPhoneNumberNew='',
/** @var string */
public string $DisplayPhoneNumberUsed='',
/** @var float */
public float $Latitude=0.0,
/** @var float */
public float $Longitude=0.0,
/** @var string */
public string $smartDescription='',
/** @var string */
public string $smartWebsite='',
/** @var string */
public string $smartPhone='',
/** @var string */
public string $LegacyId='',
/** @var bool|null */
public ?bool $Agent=null,
/** @var int */
public int $MarketAreaId=0,
/** @var string|null */
public ?string $DigitalLoungeParentGssnId=null,
/** @var bool|null */
public ?bool $SendLeadsToDigitalLoungeParent=null,
/** @var RetailerOpeningTimes|null */
public ?RetailerOpeningTimes $OpeningTimes=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['GssnId'])) $this->GssnId = $o['GssnId'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Street'])) $this->Street = $o['Street'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['Postcode'])) $this->Postcode = $o['Postcode'];
if (isset($o['GoogleMapPostcode'])) $this->GoogleMapPostcode = $o['GoogleMapPostcode'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['Fax'])) $this->Fax = $o['Fax'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['Website'])) $this->Website = $o['Website'];
if (isset($o['RetailerGroupId'])) $this->RetailerGroupId = $o['RetailerGroupId'];
if (isset($o['RetailerGroupName'])) $this->RetailerGroupName = $o['RetailerGroupName'];
if (isset($o['IsOnline'])) $this->IsOnline = $o['IsOnline'];
if (isset($o['IsNewCarRetailer'])) $this->IsNewCarRetailer = $o['IsNewCarRetailer'];
if (isset($o['IsUsedCarRetailer'])) $this->IsUsedCarRetailer = $o['IsUsedCarRetailer'];
if (isset($o['IsCentralRetailer'])) $this->IsCentralRetailer = $o['IsCentralRetailer'];
if (isset($o['ChatEnabled'])) $this->ChatEnabled = $o['ChatEnabled'];
if (isset($o['TradeInEnabled'])) $this->TradeInEnabled = $o['TradeInEnabled'];
if (isset($o['smart'])) $this->smart = $o['smart'];
if (isset($o['DisplayPhoneNumberNew'])) $this->DisplayPhoneNumberNew = $o['DisplayPhoneNumberNew'];
if (isset($o['DisplayPhoneNumberUsed'])) $this->DisplayPhoneNumberUsed = $o['DisplayPhoneNumberUsed'];
if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
if (isset($o['smartDescription'])) $this->smartDescription = $o['smartDescription'];
if (isset($o['smartWebsite'])) $this->smartWebsite = $o['smartWebsite'];
if (isset($o['smartPhone'])) $this->smartPhone = $o['smartPhone'];
if (isset($o['LegacyId'])) $this->LegacyId = $o['LegacyId'];
if (isset($o['Agent'])) $this->Agent = $o['Agent'];
if (isset($o['MarketAreaId'])) $this->MarketAreaId = $o['MarketAreaId'];
if (isset($o['DigitalLoungeParentGssnId'])) $this->DigitalLoungeParentGssnId = $o['DigitalLoungeParentGssnId'];
if (isset($o['SendLeadsToDigitalLoungeParent'])) $this->SendLeadsToDigitalLoungeParent = $o['SendLeadsToDigitalLoungeParent'];
if (isset($o['OpeningTimes'])) $this->OpeningTimes = JsonConverters::from('RetailerOpeningTimes', $o['OpeningTimes']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->GssnId)) $o['GssnId'] = $this->GssnId;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Street)) $o['Street'] = $this->Street;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->Postcode)) $o['Postcode'] = $this->Postcode;
if (isset($this->GoogleMapPostcode)) $o['GoogleMapPostcode'] = $this->GoogleMapPostcode;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->Fax)) $o['Fax'] = $this->Fax;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->Website)) $o['Website'] = $this->Website;
if (isset($this->RetailerGroupId)) $o['RetailerGroupId'] = $this->RetailerGroupId;
if (isset($this->RetailerGroupName)) $o['RetailerGroupName'] = $this->RetailerGroupName;
if (isset($this->IsOnline)) $o['IsOnline'] = $this->IsOnline;
if (isset($this->IsNewCarRetailer)) $o['IsNewCarRetailer'] = $this->IsNewCarRetailer;
if (isset($this->IsUsedCarRetailer)) $o['IsUsedCarRetailer'] = $this->IsUsedCarRetailer;
if (isset($this->IsCentralRetailer)) $o['IsCentralRetailer'] = $this->IsCentralRetailer;
if (isset($this->ChatEnabled)) $o['ChatEnabled'] = $this->ChatEnabled;
if (isset($this->TradeInEnabled)) $o['TradeInEnabled'] = $this->TradeInEnabled;
if (isset($this->smart)) $o['smart'] = $this->smart;
if (isset($this->DisplayPhoneNumberNew)) $o['DisplayPhoneNumberNew'] = $this->DisplayPhoneNumberNew;
if (isset($this->DisplayPhoneNumberUsed)) $o['DisplayPhoneNumberUsed'] = $this->DisplayPhoneNumberUsed;
if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
if (isset($this->smartDescription)) $o['smartDescription'] = $this->smartDescription;
if (isset($this->smartWebsite)) $o['smartWebsite'] = $this->smartWebsite;
if (isset($this->smartPhone)) $o['smartPhone'] = $this->smartPhone;
if (isset($this->LegacyId)) $o['LegacyId'] = $this->LegacyId;
if (isset($this->Agent)) $o['Agent'] = $this->Agent;
if (isset($this->MarketAreaId)) $o['MarketAreaId'] = $this->MarketAreaId;
if (isset($this->DigitalLoungeParentGssnId)) $o['DigitalLoungeParentGssnId'] = $this->DigitalLoungeParentGssnId;
if (isset($this->SendLeadsToDigitalLoungeParent)) $o['SendLeadsToDigitalLoungeParent'] = $this->SendLeadsToDigitalLoungeParent;
if (isset($this->OpeningTimes)) $o['OpeningTimes'] = JsonConverters::to('RetailerOpeningTimes', $this->OpeningTimes);
return empty($o) ? new class(){} : $o;
}
}
class OnlineShowroomVehicle implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Vin='',
/** @var string */
public string $VehicleClass='',
/** @var string */
public string $TransmissionType='',
/** @var string */
public string $FuelType='',
/** @var string */
public string $ImageUrl='',
/** @var string */
public string $Colour='',
/** @var string */
public string $Description='',
/** @var string */
public string $BodyStyle='',
/** @var string */
public string $UpholsteryType='',
/** @var Retailer|null */
public ?Retailer $Retailer=null,
/** @var float */
public float $OTR=0.0,
/** @var float */
public float $ActualPrice=0.0,
/** @var float */
public float $TotalOfferValue=0.0,
/** @var float */
public float $NetPrice=0.0,
/** @var string */
public string $VehicleType='',
/** @var string|null */
public ?string $OfferExpiryDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Vin'])) $this->Vin = $o['Vin'];
if (isset($o['VehicleClass'])) $this->VehicleClass = $o['VehicleClass'];
if (isset($o['TransmissionType'])) $this->TransmissionType = $o['TransmissionType'];
if (isset($o['FuelType'])) $this->FuelType = $o['FuelType'];
if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
if (isset($o['Colour'])) $this->Colour = $o['Colour'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['BodyStyle'])) $this->BodyStyle = $o['BodyStyle'];
if (isset($o['UpholsteryType'])) $this->UpholsteryType = $o['UpholsteryType'];
if (isset($o['Retailer'])) $this->Retailer = JsonConverters::from('Retailer', $o['Retailer']);
if (isset($o['OTR'])) $this->OTR = $o['OTR'];
if (isset($o['ActualPrice'])) $this->ActualPrice = $o['ActualPrice'];
if (isset($o['TotalOfferValue'])) $this->TotalOfferValue = $o['TotalOfferValue'];
if (isset($o['NetPrice'])) $this->NetPrice = $o['NetPrice'];
if (isset($o['VehicleType'])) $this->VehicleType = $o['VehicleType'];
if (isset($o['OfferExpiryDate'])) $this->OfferExpiryDate = $o['OfferExpiryDate'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Vin)) $o['Vin'] = $this->Vin;
if (isset($this->VehicleClass)) $o['VehicleClass'] = $this->VehicleClass;
if (isset($this->TransmissionType)) $o['TransmissionType'] = $this->TransmissionType;
if (isset($this->FuelType)) $o['FuelType'] = $this->FuelType;
if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
if (isset($this->Colour)) $o['Colour'] = $this->Colour;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->BodyStyle)) $o['BodyStyle'] = $this->BodyStyle;
if (isset($this->UpholsteryType)) $o['UpholsteryType'] = $this->UpholsteryType;
if (isset($this->Retailer)) $o['Retailer'] = JsonConverters::to('Retailer', $this->Retailer);
if (isset($this->OTR)) $o['OTR'] = $this->OTR;
if (isset($this->ActualPrice)) $o['ActualPrice'] = $this->ActualPrice;
if (isset($this->TotalOfferValue)) $o['TotalOfferValue'] = $this->TotalOfferValue;
if (isset($this->NetPrice)) $o['NetPrice'] = $this->NetPrice;
if (isset($this->VehicleType)) $o['VehicleType'] = $this->VehicleType;
if (isset($this->OfferExpiryDate)) $o['OfferExpiryDate'] = $this->OfferExpiryDate;
return empty($o) ? new class(){} : $o;
}
}
class PaymentDetail implements JsonSerializable
{
public function __construct(
/** @var string */
public string $PaymentType='',
/** @var string */
public string $PaymentLink=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PaymentType'])) $this->PaymentType = $o['PaymentType'];
if (isset($o['PaymentLink'])) $this->PaymentLink = $o['PaymentLink'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PaymentType)) $o['PaymentType'] = $this->PaymentType;
if (isset($this->PaymentLink)) $o['PaymentLink'] = $this->PaymentLink;
return empty($o) ? new class(){} : $o;
}
}
class OnlineShowroomOrder implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Guid='',
/** @var string */
public string $Reference='',
/** @var array<OnlineShowroomStatus>|null */
public ?array $Status=null,
/** @var OnlineShowroomVehicle|null */
public ?OnlineShowroomVehicle $Vehicle=null,
/** @var string */
public string $ClosedDate='',
/** @var string */
public string $CustomerId='',
/** @var string */
public string $HandoverDate='',
/** @var string */
public string $ClosedReason='',
/** @var string */
public string $OrderDate='',
/** @var array<PaymentDetail>|null */
public ?array $PaymentLinks=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Guid'])) $this->Guid = $o['Guid'];
if (isset($o['Reference'])) $this->Reference = $o['Reference'];
if (isset($o['Status'])) $this->Status = JsonConverters::fromArray('OnlineShowroomStatus', $o['Status']);
if (isset($o['Vehicle'])) $this->Vehicle = JsonConverters::from('OnlineShowroomVehicle', $o['Vehicle']);
if (isset($o['ClosedDate'])) $this->ClosedDate = $o['ClosedDate'];
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
if (isset($o['HandoverDate'])) $this->HandoverDate = $o['HandoverDate'];
if (isset($o['ClosedReason'])) $this->ClosedReason = $o['ClosedReason'];
if (isset($o['OrderDate'])) $this->OrderDate = $o['OrderDate'];
if (isset($o['PaymentLinks'])) $this->PaymentLinks = JsonConverters::fromArray('PaymentDetail', $o['PaymentLinks']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Guid)) $o['Guid'] = $this->Guid;
if (isset($this->Reference)) $o['Reference'] = $this->Reference;
if (isset($this->Status)) $o['Status'] = JsonConverters::toArray('OnlineShowroomStatus', $this->Status);
if (isset($this->Vehicle)) $o['Vehicle'] = JsonConverters::to('OnlineShowroomVehicle', $this->Vehicle);
if (isset($this->ClosedDate)) $o['ClosedDate'] = $this->ClosedDate;
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
if (isset($this->HandoverDate)) $o['HandoverDate'] = $this->HandoverDate;
if (isset($this->ClosedReason)) $o['ClosedReason'] = $this->ClosedReason;
if (isset($this->OrderDate)) $o['OrderDate'] = $this->OrderDate;
if (isset($this->PaymentLinks)) $o['PaymentLinks'] = JsonConverters::toArray('PaymentDetail', $this->PaymentLinks);
return empty($o) ? new class(){} : $o;
}
}
class GetOrderCustomerResponse implements JsonSerializable
{
public function __construct(
/** @var array<Order>|null */
public ?array $Orders=null,
/** @var array<OnlineShowroomOrder>|null */
public ?array $Completed=null,
/** @var array<OnlineShowroomOrder>|null */
public ?array $Cancelled=null,
/** @var array<OnlineShowroomOrder>|null */
public ?array $InProgress=null,
/** @var array<OnlineShowroomOrder>|null */
public ?array $Archived=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Orders'])) $this->Orders = JsonConverters::fromArray('Order', $o['Orders']);
if (isset($o['Completed'])) $this->Completed = JsonConverters::fromArray('OnlineShowroomOrder', $o['Completed']);
if (isset($o['Cancelled'])) $this->Cancelled = JsonConverters::fromArray('OnlineShowroomOrder', $o['Cancelled']);
if (isset($o['InProgress'])) $this->InProgress = JsonConverters::fromArray('OnlineShowroomOrder', $o['InProgress']);
if (isset($o['Archived'])) $this->Archived = JsonConverters::fromArray('OnlineShowroomOrder', $o['Archived']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Orders)) $o['Orders'] = JsonConverters::toArray('Order', $this->Orders);
if (isset($this->Completed)) $o['Completed'] = JsonConverters::toArray('OnlineShowroomOrder', $this->Completed);
if (isset($this->Cancelled)) $o['Cancelled'] = JsonConverters::toArray('OnlineShowroomOrder', $this->Cancelled);
if (isset($this->InProgress)) $o['InProgress'] = JsonConverters::toArray('OnlineShowroomOrder', $this->InProgress);
if (isset($this->Archived)) $o['Archived'] = JsonConverters::toArray('OnlineShowroomOrder', $this->Archived);
return empty($o) ? new class(){} : $o;
}
}
class GetOrderCustomerRequest implements IGet, JsonSerializable
{
public function __construct(
/** @var string */
public string $CustomerId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
return empty($o) ? new class(){} : $o;
}
}
PHP GetOrderCustomerRequest 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.
GET /v1/order/customer/{CustomerId} HTTP/1.1 Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Orders":[{"Guid":"00000000000000000000000000000000","Reference":"String","Status":0,"CustomerId":"String","MulesoftReference":"String","GasId":"String","OrderDate":"String","OfferSnapShot":"String"}],"Completed":[{"Guid":"00000000000000000000000000000000","Reference":"String","Status":[{"Id":0,"Description":"String","Slug":"String","Current":false,"Completed":false,"OrderStatuses":[{"Id":0,"Description":"String"}]}],"Vehicle":{"Vin":"String","VehicleClass":"String","TransmissionType":"String","FuelType":"String","ImageUrl":"String","Colour":"String","Description":"String","BodyStyle":"String","UpholsteryType":"String","Retailer":{"Id":0,"GssnId":"String","Description":"String","Street":"String","City":"String","Postcode":"String","GoogleMapPostcode":"String","Phone":"String","Fax":"String","Email":"String","Website":"String","RetailerGroupId":"String","RetailerGroupName":"String","IsOnline":false,"IsNewCarRetailer":false,"IsUsedCarRetailer":false,"IsCentralRetailer":false,"ChatEnabled":false,"TradeInEnabled":false,"smart":false,"DisplayPhoneNumberNew":"String","DisplayPhoneNumberUsed":"String","Latitude":0,"Longitude":0,"smartDescription":"String","smartWebsite":"String","smartPhone":"String","LegacyId":"String","Agent":false,"MarketAreaId":0,"DigitalLoungeParentGssnId":"String","SendLeadsToDigitalLoungeParent":false,"OpeningTimes":{"New":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}],"Used":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}]}},"OTR":0,"ActualPrice":0,"TotalOfferValue":0,"NetPrice":0,"VehicleType":"String","OfferExpiryDate":"String"},"ClosedDate":"String","CustomerId":"String","HandoverDate":"String","ClosedReason":"String","OrderDate":"String","PaymentLinks":[{"PaymentType":"String","PaymentLink":"String"}]}],"Cancelled":[{"Guid":"00000000000000000000000000000000","Reference":"String","Status":[{"Id":0,"Description":"String","Slug":"String","Current":false,"Completed":false,"OrderStatuses":[{"Id":0,"Description":"String"}]}],"Vehicle":{"Vin":"String","VehicleClass":"String","TransmissionType":"String","FuelType":"String","ImageUrl":"String","Colour":"String","Description":"String","BodyStyle":"String","UpholsteryType":"String","Retailer":{"Id":0,"GssnId":"String","Description":"String","Street":"String","City":"String","Postcode":"String","GoogleMapPostcode":"String","Phone":"String","Fax":"String","Email":"String","Website":"String","RetailerGroupId":"String","RetailerGroupName":"String","IsOnline":false,"IsNewCarRetailer":false,"IsUsedCarRetailer":false,"IsCentralRetailer":false,"ChatEnabled":false,"TradeInEnabled":false,"smart":false,"DisplayPhoneNumberNew":"String","DisplayPhoneNumberUsed":"String","Latitude":0,"Longitude":0,"smartDescription":"String","smartWebsite":"String","smartPhone":"String","LegacyId":"String","Agent":false,"MarketAreaId":0,"DigitalLoungeParentGssnId":"String","SendLeadsToDigitalLoungeParent":false,"OpeningTimes":{"New":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}],"Used":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}]}},"OTR":0,"ActualPrice":0,"TotalOfferValue":0,"NetPrice":0,"VehicleType":"String","OfferExpiryDate":"String"},"ClosedDate":"String","CustomerId":"String","HandoverDate":"String","ClosedReason":"String","OrderDate":"String","PaymentLinks":[{"PaymentType":"String","PaymentLink":"String"}]}],"InProgress":[{"Guid":"00000000000000000000000000000000","Reference":"String","Status":[{"Id":0,"Description":"String","Slug":"String","Current":false,"Completed":false,"OrderStatuses":[{"Id":0,"Description":"String"}]}],"Vehicle":{"Vin":"String","VehicleClass":"String","TransmissionType":"String","FuelType":"String","ImageUrl":"String","Colour":"String","Description":"String","BodyStyle":"String","UpholsteryType":"String","Retailer":{"Id":0,"GssnId":"String","Description":"String","Street":"String","City":"String","Postcode":"String","GoogleMapPostcode":"String","Phone":"String","Fax":"String","Email":"String","Website":"String","RetailerGroupId":"String","RetailerGroupName":"String","IsOnline":false,"IsNewCarRetailer":false,"IsUsedCarRetailer":false,"IsCentralRetailer":false,"ChatEnabled":false,"TradeInEnabled":false,"smart":false,"DisplayPhoneNumberNew":"String","DisplayPhoneNumberUsed":"String","Latitude":0,"Longitude":0,"smartDescription":"String","smartWebsite":"String","smartPhone":"String","LegacyId":"String","Agent":false,"MarketAreaId":0,"DigitalLoungeParentGssnId":"String","SendLeadsToDigitalLoungeParent":false,"OpeningTimes":{"New":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}],"Used":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}]}},"OTR":0,"ActualPrice":0,"TotalOfferValue":0,"NetPrice":0,"VehicleType":"String","OfferExpiryDate":"String"},"ClosedDate":"String","CustomerId":"String","HandoverDate":"String","ClosedReason":"String","OrderDate":"String","PaymentLinks":[{"PaymentType":"String","PaymentLink":"String"}]}],"Archived":[{"Guid":"00000000000000000000000000000000","Reference":"String","Status":[{"Id":0,"Description":"String","Slug":"String","Current":false,"Completed":false,"OrderStatuses":[{"Id":0,"Description":"String"}]}],"Vehicle":{"Vin":"String","VehicleClass":"String","TransmissionType":"String","FuelType":"String","ImageUrl":"String","Colour":"String","Description":"String","BodyStyle":"String","UpholsteryType":"String","Retailer":{"Id":0,"GssnId":"String","Description":"String","Street":"String","City":"String","Postcode":"String","GoogleMapPostcode":"String","Phone":"String","Fax":"String","Email":"String","Website":"String","RetailerGroupId":"String","RetailerGroupName":"String","IsOnline":false,"IsNewCarRetailer":false,"IsUsedCarRetailer":false,"IsCentralRetailer":false,"ChatEnabled":false,"TradeInEnabled":false,"smart":false,"DisplayPhoneNumberNew":"String","DisplayPhoneNumberUsed":"String","Latitude":0,"Longitude":0,"smartDescription":"String","smartWebsite":"String","smartPhone":"String","LegacyId":"String","Agent":false,"MarketAreaId":0,"DigitalLoungeParentGssnId":"String","SendLeadsToDigitalLoungeParent":false,"OpeningTimes":{"New":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}],"Used":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}]}},"OTR":0,"ActualPrice":0,"TotalOfferValue":0,"NetPrice":0,"VehicleType":"String","OfferExpiryDate":"String"},"ClosedDate":"String","CustomerId":"String","HandoverDate":"String","ClosedReason":"String","OrderDate":"String","PaymentLinks":[{"PaymentType":"String","PaymentLink":"String"}]}]}