Mercedes.Agency.Orchestration.API

<back to all web services

GetBackOrderDetailRequest

BackOrder
Requires Authentication
The following routes are available for this service:
GET/v1/backorder/detail/{BackOrderGuid}Get Back Order detail by Guid
<?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 GetBackOrderDetailRequest implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $BackOrderGuid=''
    ) {
    }

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

class BackOrderResolveDetail implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Guid='',
        /** @var string */
        public string $Reference='',
        /** @var string */
        public string $Agent='',
        /** @var string|null */
        public ?string $Vin=null,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $ImageUrl=null,
        /** @var string|null */
        public ?string $OutrightPurchaseCorporation=null,
        /** @var string|null */
        public ?string $NetPrice=null,
        /** @var string|null */
        public ?string $OtrPrice=null,
        /** @var string|null */
        public ?string $ActualPrice=null,
        /** @var string|null */
        public ?string $CommissionNumber=null,
        /** @var string|null */
        public ?string $BodyStyle=null,
        /** @var string|null */
        public ?string $Line=null,
        /** @var string|null */
        public ?string $Engine=null,
        /** @var string|null */
        public ?string $Transmission=null,
        /** @var string|null */
        public ?string $Fuel=null,
        /** @var string|null */
        public ?string $Colour=null,
        /** @var string|null */
        public ?string $Upholstery=null,
        /** @var string|null */
        public ?string $Package=null,
        /** @var string|null */
        public ?string $FullModelYearCode=null,
        /** @var string|null */
        public ?string $PortArrivalDate=null,
        /** @var string|null */
        public ?string $ProductionDate=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['Agent'])) $this->Agent = $o['Agent'];
        if (isset($o['Vin'])) $this->Vin = $o['Vin'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
        if (isset($o['OutrightPurchaseCorporation'])) $this->OutrightPurchaseCorporation = $o['OutrightPurchaseCorporation'];
        if (isset($o['NetPrice'])) $this->NetPrice = $o['NetPrice'];
        if (isset($o['OtrPrice'])) $this->OtrPrice = $o['OtrPrice'];
        if (isset($o['ActualPrice'])) $this->ActualPrice = $o['ActualPrice'];
        if (isset($o['CommissionNumber'])) $this->CommissionNumber = $o['CommissionNumber'];
        if (isset($o['BodyStyle'])) $this->BodyStyle = $o['BodyStyle'];
        if (isset($o['Line'])) $this->Line = $o['Line'];
        if (isset($o['Engine'])) $this->Engine = $o['Engine'];
        if (isset($o['Transmission'])) $this->Transmission = $o['Transmission'];
        if (isset($o['Fuel'])) $this->Fuel = $o['Fuel'];
        if (isset($o['Colour'])) $this->Colour = $o['Colour'];
        if (isset($o['Upholstery'])) $this->Upholstery = $o['Upholstery'];
        if (isset($o['Package'])) $this->Package = $o['Package'];
        if (isset($o['FullModelYearCode'])) $this->FullModelYearCode = $o['FullModelYearCode'];
        if (isset($o['PortArrivalDate'])) $this->PortArrivalDate = $o['PortArrivalDate'];
        if (isset($o['ProductionDate'])) $this->ProductionDate = $o['ProductionDate'];
    }
    
    /** @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->Agent)) $o['Agent'] = $this->Agent;
        if (isset($this->Vin)) $o['Vin'] = $this->Vin;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
        if (isset($this->OutrightPurchaseCorporation)) $o['OutrightPurchaseCorporation'] = $this->OutrightPurchaseCorporation;
        if (isset($this->NetPrice)) $o['NetPrice'] = $this->NetPrice;
        if (isset($this->OtrPrice)) $o['OtrPrice'] = $this->OtrPrice;
        if (isset($this->ActualPrice)) $o['ActualPrice'] = $this->ActualPrice;
        if (isset($this->CommissionNumber)) $o['CommissionNumber'] = $this->CommissionNumber;
        if (isset($this->BodyStyle)) $o['BodyStyle'] = $this->BodyStyle;
        if (isset($this->Line)) $o['Line'] = $this->Line;
        if (isset($this->Engine)) $o['Engine'] = $this->Engine;
        if (isset($this->Transmission)) $o['Transmission'] = $this->Transmission;
        if (isset($this->Fuel)) $o['Fuel'] = $this->Fuel;
        if (isset($this->Colour)) $o['Colour'] = $this->Colour;
        if (isset($this->Upholstery)) $o['Upholstery'] = $this->Upholstery;
        if (isset($this->Package)) $o['Package'] = $this->Package;
        if (isset($this->FullModelYearCode)) $o['FullModelYearCode'] = $this->FullModelYearCode;
        if (isset($this->PortArrivalDate)) $o['PortArrivalDate'] = $this->PortArrivalDate;
        if (isset($this->ProductionDate)) $o['ProductionDate'] = $this->ProductionDate;
        return empty($o) ? new class(){} : $o;
    }
}

class GetBackOrderDetailResponse implements JsonSerializable
{
    public function __construct(
        /** @var BackOrderResolveDetail|null */
        public ?BackOrderResolveDetail $BackOrder=null
    ) {
    }

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

PHP GetBackOrderDetailRequest 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.

GET /v1/backorder/detail/{BackOrderGuid} HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	BackOrder: 
	{
		Guid: String,
		Reference: String,
		Agent: String,
		Vin: String,
		Description: String,
		ImageUrl: String,
		OutrightPurchaseCorporation: String,
		NetPrice: String,
		OtrPrice: String,
		ActualPrice: String,
		CommissionNumber: String,
		BodyStyle: String,
		Line: String,
		Engine: String,
		Transmission: String,
		Fuel: String,
		Colour: String,
		Upholstery: String,
		Package: String,
		FullModelYearCode: String,
		PortArrivalDate: String,
		ProductionDate: String
	}
}