Mercedes.Agency.Orchestration.API

<back to all web services

GetPricingDetailsRequest

Pricing
The following routes are available for this service:
POST/v1/pricingdetailsCreates a detailed pricing of a vehicle
<?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};


enum Source : int
{
    case OnlineShowroom = 1;
    case OneAdmin = 2;
}

class Address implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Property='',
        /** @var string */
        public string $Street='',
        /** @var string */
        public string $Town='',
        /** @var string */
        public string $County='',
        /** @var string */
        public string $Locality='',
        /** @var string */
        public string $Postcode=''
    ) {
    }

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

enum CustomerMode : int
{
    case Private = 1;
    case Business = 2;
    case Motability = 3;
}

class SalesforceCustomer implements ICustomer, JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $CustomerId='',
        /** @var bool|null */
        public ?bool $IsCiam=null,
        /** @var string */
        public string $CompanyName='',
        /** @var string */
        public string $Title='',
        /** @var string */
        public string $Firstname='',
        /** @var string */
        public string $Surname='',
        /** @var string */
        public string $EmailAddress='',
        /** @var string */
        public string $Telephone='',
        /** @var Address|null */
        public ?Address $Address=null,
        /** @var CustomerMode|null */
        public ?CustomerMode $Mode=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
        if (isset($o['IsCiam'])) $this->IsCiam = $o['IsCiam'];
        if (isset($o['CompanyName'])) $this->CompanyName = $o['CompanyName'];
        if (isset($o['Title'])) $this->Title = $o['Title'];
        if (isset($o['Firstname'])) $this->Firstname = $o['Firstname'];
        if (isset($o['Surname'])) $this->Surname = $o['Surname'];
        if (isset($o['EmailAddress'])) $this->EmailAddress = $o['EmailAddress'];
        if (isset($o['Telephone'])) $this->Telephone = $o['Telephone'];
        if (isset($o['Address'])) $this->Address = JsonConverters::from('Address', $o['Address']);
        if (isset($o['Mode'])) $this->Mode = JsonConverters::from('CustomerMode', $o['Mode']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
        if (isset($this->IsCiam)) $o['IsCiam'] = $this->IsCiam;
        if (isset($this->CompanyName)) $o['CompanyName'] = $this->CompanyName;
        if (isset($this->Title)) $o['Title'] = $this->Title;
        if (isset($this->Firstname)) $o['Firstname'] = $this->Firstname;
        if (isset($this->Surname)) $o['Surname'] = $this->Surname;
        if (isset($this->EmailAddress)) $o['EmailAddress'] = $this->EmailAddress;
        if (isset($this->Telephone)) $o['Telephone'] = $this->Telephone;
        if (isset($this->Address)) $o['Address'] = JsonConverters::to('Address', $this->Address);
        if (isset($this->Mode)) $o['Mode'] = JsonConverters::to('CustomerMode', $this->Mode);
        return empty($o) ? new class(){} : $o;
    }
}

class Preferences implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $OptinEmail=null,
        /** @var bool|null */
        public ?bool $OptinPost=null,
        /** @var bool|null */
        public ?bool $OptinSMS=null,
        /** @var bool|null */
        public ?bool $OptinTelephone=null
    ) {
    }

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

class Customer extends SalesforceCustomer implements JsonSerializable
{
    /**
     * @param string $CustomerId
     * @param bool|null $IsCiam
     * @param string $CompanyName
     * @param string $Title
     * @param string $Firstname
     * @param string $Surname
     * @param string $EmailAddress
     * @param string $Telephone
     * @param Address|null $Address
     * @param CustomerMode|null $Mode
     */
    public function __construct(
        string $CustomerId='',
        ?bool $IsCiam=null,
        string $CompanyName='',
        string $Title='',
        string $Firstname='',
        string $Surname='',
        string $EmailAddress='',
        string $Telephone='',
        ?Address $Address=null,
        ?CustomerMode $Mode=null,
        /** @var string|null */
        public ?string $ProfileId=null,
        /** @var Preferences|null */
        public ?Preferences $Preferences=null
    ) {
        parent::__construct($CustomerId,$IsCiam,$CompanyName,$Title,$Firstname,$Surname,$EmailAddress,$Telephone,$Address,$Mode);
    }

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

class Vehicle implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Vin=null
    ) {
    }

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

class Option implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $IsDefault=null,
        /** @var int */
        public int $Value=0
    ) {
    }

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

class Term implements JsonSerializable
{
    public function __construct(
        /** @var array<Option>|null */
        public ?array $Options=null
    ) {
    }

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

class Deposit implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Default=''
    ) {
    }

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

class Mileage implements JsonSerializable
{
    public function __construct(
        /** @var array<Option>|null */
        public ?array $Options=null
    ) {
    }

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

class AdvanceRentals implements JsonSerializable
{
    public function __construct(
        /** @var array<Option>|null */
        public ?array $Options=null
    ) {
    }

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

enum VehicleType : string
{
    case UNASSIGNED = 'UNASSIGNED';
    case NEW = 'NEW';
    case USED = 'USED';
}

class FinanceCriteria implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Key='',
        /** @var string */
        public string $Name='',
        /** @var string */
        public string $Type='',
        /** @var bool|null */
        public ?bool $IsDefault=null,
        /** @var Term|null */
        public ?Term $Term=null,
        /** @var Deposit|null */
        public ?Deposit $Deposit=null,
        /** @var Mileage|null */
        public ?Mileage $Mileage=null,
        /** @var AdvanceRentals|null */
        public ?AdvanceRentals $AdvanceRentals=null,
        /** @var bool|null */
        public ?bool $IsPersonalised=null,
        /** @var string */
        public string $RegularPayment='',
        /** @var string */
        public string $PartExchange='',
        /** @var string */
        public string $Settlement='',
        /** @var string */
        public string $CustomerType='',
        /** @var VehicleType|null */
        public ?VehicleType $VehicleType=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Key'])) $this->Key = $o['Key'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Type'])) $this->Type = $o['Type'];
        if (isset($o['IsDefault'])) $this->IsDefault = $o['IsDefault'];
        if (isset($o['Term'])) $this->Term = JsonConverters::from('Term', $o['Term']);
        if (isset($o['Deposit'])) $this->Deposit = JsonConverters::from('Deposit', $o['Deposit']);
        if (isset($o['Mileage'])) $this->Mileage = JsonConverters::from('Mileage', $o['Mileage']);
        if (isset($o['AdvanceRentals'])) $this->AdvanceRentals = JsonConverters::from('AdvanceRentals', $o['AdvanceRentals']);
        if (isset($o['IsPersonalised'])) $this->IsPersonalised = $o['IsPersonalised'];
        if (isset($o['RegularPayment'])) $this->RegularPayment = $o['RegularPayment'];
        if (isset($o['PartExchange'])) $this->PartExchange = $o['PartExchange'];
        if (isset($o['Settlement'])) $this->Settlement = $o['Settlement'];
        if (isset($o['CustomerType'])) $this->CustomerType = $o['CustomerType'];
        if (isset($o['VehicleType'])) $this->VehicleType = JsonConverters::from('VehicleType', $o['VehicleType']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Key)) $o['Key'] = $this->Key;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Type)) $o['Type'] = $this->Type;
        if (isset($this->IsDefault)) $o['IsDefault'] = $this->IsDefault;
        if (isset($this->Term)) $o['Term'] = JsonConverters::to('Term', $this->Term);
        if (isset($this->Deposit)) $o['Deposit'] = JsonConverters::to('Deposit', $this->Deposit);
        if (isset($this->Mileage)) $o['Mileage'] = JsonConverters::to('Mileage', $this->Mileage);
        if (isset($this->AdvanceRentals)) $o['AdvanceRentals'] = JsonConverters::to('AdvanceRentals', $this->AdvanceRentals);
        if (isset($this->IsPersonalised)) $o['IsPersonalised'] = $this->IsPersonalised;
        if (isset($this->RegularPayment)) $o['RegularPayment'] = $this->RegularPayment;
        if (isset($this->PartExchange)) $o['PartExchange'] = $this->PartExchange;
        if (isset($this->Settlement)) $o['Settlement'] = $this->Settlement;
        if (isset($this->CustomerType)) $o['CustomerType'] = $this->CustomerType;
        if (isset($this->VehicleType)) $o['VehicleType'] = JsonConverters::to('VehicleType', $this->VehicleType);
        return empty($o) ? new class(){} : $o;
    }
}

class OutrightPurchase implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $IsOutrightPurchase=null,
        /** @var string */
        public string $Reference='',
        /** @var float */
        public float $DiscountRate=0.0,
        /** @var string */
        public string $Bm7NST='',
        /** @var bool|null */
        public ?bool $IsBackOrder=null,
        /** @var bool|null */
        public ?bool $IsCOPConverter=null
    ) {
    }

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

enum MotabilityType : int
{
    case PIP = 1;
    case WPMS = 2;
    case UNASSIGNED = 3;
}

class CreateOrderBase implements JsonSerializable
{
    public function __construct(
        /** @var Source|null */
        public ?Source $Source=null,
        /** @var string */
        public string $GssnId='',
        /** @var string */
        public string $AdditionalInformation='',
        /** @var bool|null */
        public ?bool $Cash=null,
        /** @var bool|null */
        public ?bool $Finance=null,
        /** @var Customer|null */
        public ?Customer $Customer=null,
        /** @var Vehicle|null */
        public ?Vehicle $Vehicle=null,
        /** @var FinanceCriteria|null */
        public ?FinanceCriteria $FinanceCriteria=null,
        /** @var string|null */
        public ?string $BackOrderGuid=null,
        /** @var string|null */
        public ?string $TagUrl=null,
        /** @var OutrightPurchase|null */
        public ?OutrightPurchase $OutrightPurchase=null,
        /** @var bool|null */
        public ?bool $Motability=null,
        /** @var int|null */
        public ?int $MotabilityPricingId=null,
        /** @var string */
        public string $FinanceApplicationReference='',
        /** @var bool|null */
        public ?bool $Specialist=null,
        /** @var string */
        public string $GasId='',
        /** @var int[]|null */
        public ?array $PersonalisedItemOfferIds=null,
        /** @var string|null */
        public ?string $SuggestedVin=null,
        /** @var string|null */
        public ?string $NonOptimumReason=null,
        /** @var MotabilityType|null */
        public ?MotabilityType $MotabilityType=null,
        /** @var string */
        public string $EstimatedHandoverDate=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Source'])) $this->Source = JsonConverters::from('Source', $o['Source']);
        if (isset($o['GssnId'])) $this->GssnId = $o['GssnId'];
        if (isset($o['AdditionalInformation'])) $this->AdditionalInformation = $o['AdditionalInformation'];
        if (isset($o['Cash'])) $this->Cash = $o['Cash'];
        if (isset($o['Finance'])) $this->Finance = $o['Finance'];
        if (isset($o['Customer'])) $this->Customer = JsonConverters::from('Customer', $o['Customer']);
        if (isset($o['Vehicle'])) $this->Vehicle = JsonConverters::from('Vehicle', $o['Vehicle']);
        if (isset($o['FinanceCriteria'])) $this->FinanceCriteria = JsonConverters::from('FinanceCriteria', $o['FinanceCriteria']);
        if (isset($o['BackOrderGuid'])) $this->BackOrderGuid = $o['BackOrderGuid'];
        if (isset($o['TagUrl'])) $this->TagUrl = $o['TagUrl'];
        if (isset($o['OutrightPurchase'])) $this->OutrightPurchase = JsonConverters::from('OutrightPurchase', $o['OutrightPurchase']);
        if (isset($o['Motability'])) $this->Motability = $o['Motability'];
        if (isset($o['MotabilityPricingId'])) $this->MotabilityPricingId = $o['MotabilityPricingId'];
        if (isset($o['FinanceApplicationReference'])) $this->FinanceApplicationReference = $o['FinanceApplicationReference'];
        if (isset($o['Specialist'])) $this->Specialist = $o['Specialist'];
        if (isset($o['GasId'])) $this->GasId = $o['GasId'];
        if (isset($o['PersonalisedItemOfferIds'])) $this->PersonalisedItemOfferIds = JsonConverters::fromArray('int', $o['PersonalisedItemOfferIds']);
        if (isset($o['SuggestedVin'])) $this->SuggestedVin = $o['SuggestedVin'];
        if (isset($o['NonOptimumReason'])) $this->NonOptimumReason = $o['NonOptimumReason'];
        if (isset($o['MotabilityType'])) $this->MotabilityType = JsonConverters::from('MotabilityType', $o['MotabilityType']);
        if (isset($o['EstimatedHandoverDate'])) $this->EstimatedHandoverDate = $o['EstimatedHandoverDate'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Source)) $o['Source'] = JsonConverters::to('Source', $this->Source);
        if (isset($this->GssnId)) $o['GssnId'] = $this->GssnId;
        if (isset($this->AdditionalInformation)) $o['AdditionalInformation'] = $this->AdditionalInformation;
        if (isset($this->Cash)) $o['Cash'] = $this->Cash;
        if (isset($this->Finance)) $o['Finance'] = $this->Finance;
        if (isset($this->Customer)) $o['Customer'] = JsonConverters::to('Customer', $this->Customer);
        if (isset($this->Vehicle)) $o['Vehicle'] = JsonConverters::to('Vehicle', $this->Vehicle);
        if (isset($this->FinanceCriteria)) $o['FinanceCriteria'] = JsonConverters::to('FinanceCriteria', $this->FinanceCriteria);
        if (isset($this->BackOrderGuid)) $o['BackOrderGuid'] = $this->BackOrderGuid;
        if (isset($this->TagUrl)) $o['TagUrl'] = $this->TagUrl;
        if (isset($this->OutrightPurchase)) $o['OutrightPurchase'] = JsonConverters::to('OutrightPurchase', $this->OutrightPurchase);
        if (isset($this->Motability)) $o['Motability'] = $this->Motability;
        if (isset($this->MotabilityPricingId)) $o['MotabilityPricingId'] = $this->MotabilityPricingId;
        if (isset($this->FinanceApplicationReference)) $o['FinanceApplicationReference'] = $this->FinanceApplicationReference;
        if (isset($this->Specialist)) $o['Specialist'] = $this->Specialist;
        if (isset($this->GasId)) $o['GasId'] = $this->GasId;
        if (isset($this->PersonalisedItemOfferIds)) $o['PersonalisedItemOfferIds'] = JsonConverters::toArray('int', $this->PersonalisedItemOfferIds);
        if (isset($this->SuggestedVin)) $o['SuggestedVin'] = $this->SuggestedVin;
        if (isset($this->NonOptimumReason)) $o['NonOptimumReason'] = $this->NonOptimumReason;
        if (isset($this->MotabilityType)) $o['MotabilityType'] = JsonConverters::to('MotabilityType', $this->MotabilityType);
        if (isset($this->EstimatedHandoverDate)) $o['EstimatedHandoverDate'] = $this->EstimatedHandoverDate;
        return empty($o) ? new class(){} : $o;
    }
}

enum OfferPriceProductType : string
{
    case LIST_PRICE = 'LIST_PRICE';
    case NUMBER_PLATE_FEE = 'NUMBER_PLATE_FEE';
    case DELIVERY_CHARGE = 'DELIVERY_CHARGE';
    case FUEL_CHARGE = 'FUEL_CHARGE';
    case MANUFACTURER_OFFER = 'MANUFACTURER_OFFER';
    case PERSONALISED_MONEYOFFER = 'PERSONALISED_MONEYOFFER';
    case PERSONALISED_NONMONEYOFFER = 'PERSONALISED_NONMONEYOFFER';
    case PERSONALISED_NONMONEYOFFER_NEG = 'PERSONALISED_NONMONEYOFFER_NEG';
    case SERVICE = 'SERVICE';
    case SERVICE_NEG = 'SERVICE_NEG';
    case GOVERNMENT_GRANT = 'GOVERNMENT_GRANT';
    case OUTRIGHT_PURCHASE_DISCOUNT = 'OUTRIGHT_PURCHASE_DISCOUNT';
    case VIP_OFFER = 'VIP_OFFER';
    case WALLBOX_OFFER = 'WALLBOX_OFFER';
    case WALLBOX_OFFER_NEG = 'WALLBOX_OFFER_NEG';
    case ROAD_FUND_LICENCE = 'ROAD_FUND_LICENCE';
    case FIRST_REGISTRATION_FEE = 'FIRST_REGISTRATION_FEE';
    case NOT_FOUND = 'NOT_FOUND';
    case ACCESSORY_OFFER = 'ACCESSORY_OFFER';
    case ACCESSORY_OFFER_NEG = 'ACCESSORY_OFFER_NEG';
    case MOTABILITY_DISCOUNT = 'MOTABILITY_DISCOUNT';
}

class Price implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var string */
        public string $Description='',
        /** @var float */
        public float $Net=0.0,
        /** @var float */
        public float $VAT=0.0,
        /** @var float */
        public float $Gross=0.0,
        /** @var OfferPriceProductType|null */
        public ?OfferPriceProductType $Product=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['Net'])) $this->Net = $o['Net'];
        if (isset($o['VAT'])) $this->VAT = $o['VAT'];
        if (isset($o['Gross'])) $this->Gross = $o['Gross'];
        if (isset($o['Product'])) $this->Product = JsonConverters::from('OfferPriceProductType', $o['Product']);
    }
    
    /** @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->Net)) $o['Net'] = $this->Net;
        if (isset($this->VAT)) $o['VAT'] = $this->VAT;
        if (isset($this->Gross)) $o['Gross'] = $this->Gross;
        if (isset($this->Product)) $o['Product'] = JsonConverters::to('OfferPriceProductType', $this->Product);
        return empty($o) ? new class(){} : $o;
    }
}

class GetPricingDetailsResponse implements JsonSerializable
{
    public function __construct(
        /** @var Price|null */
        public ?Price $Price=null
    ) {
    }

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

class GetPricingDetailsRequest extends CreateOrderBase implements IPost, JsonSerializable
{
    /**
     * @param Source|null $Source
     * @param string $GssnId
     * @param string $AdditionalInformation
     * @param bool|null $Cash
     * @param bool|null $Finance
     * @param Customer|null $Customer
     * @param Vehicle|null $Vehicle
     * @param FinanceCriteria|null $FinanceCriteria
     * @param string|null $BackOrderGuid
     * @param string|null $TagUrl
     * @param OutrightPurchase|null $OutrightPurchase
     * @param bool|null $Motability
     * @param int|null $MotabilityPricingId
     * @param string $FinanceApplicationReference
     * @param bool|null $Specialist
     * @param string $GasId
     * @param int[]|null $PersonalisedItemOfferIds
     * @param string|null $SuggestedVin
     * @param string|null $NonOptimumReason
     * @param MotabilityType|null $MotabilityType
     * @param string $EstimatedHandoverDate
     */
    public function __construct(
        ?Source $Source=null,
        string $GssnId='',
        string $AdditionalInformation='',
        ?bool $Cash=null,
        ?bool $Finance=null,
        ?Customer $Customer=null,
        ?Vehicle $Vehicle=null,
        ?FinanceCriteria $FinanceCriteria=null,
        ?string $BackOrderGuid=null,
        ?string $TagUrl=null,
        ?OutrightPurchase $OutrightPurchase=null,
        ?bool $Motability=null,
        ?int $MotabilityPricingId=null,
        string $FinanceApplicationReference='',
        ?bool $Specialist=null,
        string $GasId='',
        ?array $PersonalisedItemOfferIds=null,
        ?string $SuggestedVin=null,
        ?string $NonOptimumReason=null,
        ?MotabilityType $MotabilityType=null,
        string $EstimatedHandoverDate=''
    ) {
        parent::__construct($Source,$GssnId,$AdditionalInformation,$Cash,$Finance,$Customer,$Vehicle,$FinanceCriteria,$BackOrderGuid,$TagUrl,$OutrightPurchase,$Motability,$MotabilityPricingId,$FinanceApplicationReference,$Specialist,$GasId,$PersonalisedItemOfferIds,$SuggestedVin,$NonOptimumReason,$MotabilityType,$EstimatedHandoverDate);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetPricingDetailsRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /v1/pricingdetails HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Source":"OnlineShowroom","GssnId":"String","AdditionalInformation":"String","Cash":false,"Finance":false,"Customer":{"ProfileId":"00000000000000000000000000000000","Preferences":{"OptinEmail":false,"OptinPost":false,"OptinSMS":false,"OptinTelephone":false},"CustomerId":"String","IsCiam":false,"CompanyName":"String","Title":"String","Firstname":"String","Surname":"String","EmailAddress":"String","Telephone":"String","Address":{"Property":"String","Street":"String","Town":"String","County":"String","Locality":"String","Postcode":"String"},"Mode":"Private"},"Vehicle":{"Vin":"String"},"FinanceCriteria":{"Key":"String","Name":"String","Type":"String","IsDefault":false,"Term":{"Options":[{"IsDefault":false,"Value":0}]},"Deposit":{"Default":"String"},"Mileage":{"Options":[{"IsDefault":false,"Value":0}]},"AdvanceRentals":{"Options":[{"IsDefault":false,"Value":0}]},"IsPersonalised":false,"RegularPayment":"String","PartExchange":"String","Settlement":"String","CustomerType":"String","VehicleType":"UNASSIGNED"},"BackOrderGuid":"00000000000000000000000000000000","TagUrl":"String","OutrightPurchase":{"IsOutrightPurchase":false,"Reference":"String","DiscountRate":0,"Bm7NST":"String","IsBackOrder":false,"IsCOPConverter":false},"Motability":false,"MotabilityPricingId":0,"FinanceApplicationReference":"String","Specialist":false,"GasId":"String","PersonalisedItemOfferIds":[0],"SuggestedVin":"String","NonOptimumReason":"String","MotabilityType":"PIP","EstimatedHandoverDate":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Price":{"Id":"String","Description":"String","Net":0,"VAT":0,"Gross":0,"Product":"LIST_PRICE"}}