Mercedes.Agency.Orchestration.API

<back to all web services

UpdateCarConfiguratorRequest

BackOrder
Requires Authentication
The following routes are available for this service:
PUT/v1/configuratorRemoves a back order from a car configuratorThis endpoint calls Agency API when a ConfigurationCode is removed from a back order.
<?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 KeyInformation implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $BM7NST=null,
        /** @var string|null */
        public ?string $ConfigurationDate=null,
        /** @var string|null */
        public ?string $ModelYear=null,
        /** @var string|null */
        public ?string $HalfYear=null
    ) {
    }

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

class OrderingOptions implements JsonSerializable
{
    public function __construct(
        /** @var array<string>|null */
        public ?array $Interior=null,
        /** @var array<string>|null */
        public ?array $Exterior=null,
        /** @var array<string>|null */
        public ?array $Other=null
    ) {
    }

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

class CarConfiguratorResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Name=null,
        /** @var KeyInformation|null */
        public ?KeyInformation $KeyInformation=null,
        /** @var OrderingOptions|null */
        public ?OrderingOptions $OrderingOptions=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var string|null */
        public ?string $ConfiguratorCode=null
    ) {
    }

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

class UpdateCarConfiguratorRequest implements IPut, JsonSerializable
{
    public function __construct(
        /** @description Configurator code */
        // @ApiMember(Description="Configurator code", IsRequired=true)
        /** @var string */
        public string $ConfiguratorCode=''
    ) {
    }

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

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

PUT /v1/configurator HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ConfiguratorCode: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Name: String,
	KeyInformation: 
	{
		BM7NST: String,
		ConfigurationDate: String,
		ModelYear: String,
		HalfYear: String
	},
	OrderingOptions: 
	{
		Interior: 
		[
			String
		],
		Exterior: 
		[
			String
		],
		Other: 
		[
			String
		]
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	ConfiguratorCode: String
}