DX STF Client API

<back to all web services

AddOrder

Order Requests

Order

Requires Authentication
The following routes are available for this service:
POST/api/orderAdd new 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 TokenDto implements ICommandResponse, JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $token=''
    ) {
    }

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

// @DataContract
class DocumentIdentification implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="identifier")
        /** @var string */
        public string $identifier='',

        // @DataMember(Name="type")
        /** @var string */
        public string $type='',

        // @DataMember(Name="creationDateAndTime")
        /** @var DateTime */
        public DateTime $creationDateAndTime=new DateTime()
    ) {
    }

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

// @DataContract
class Identifier implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="authority")
        /** @var string */
        public string $authority='',

        // @DataMember(Name="text")
        /** @var string */
        public string $text=''
    ) {
    }

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

// @DataContract
class ContactInformation implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class Partner implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="identifier")
        /** @var Identifier|null */
        public ?Identifier $identifier=null,

        // @DataMember(Name="contactInformation")
        /** @var array<ContactInformation>|null */
        public ?array $contactInformation=null
    ) {
    }

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

// @DataContract
class Header implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="documentIdentification")
        /** @var DocumentIdentification|null */
        public ?DocumentIdentification $documentIdentification=null,

        // @DataMember(Name="sender")
        /** @var Partner|null */
        public ?Partner $sender=null,

        // @DataMember(Name="receiver")
        /** @var Partner|null */
        public ?Partner $receiver=null
    ) {
    }

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

enum DocumentAction : string
{
    case ADD = 'ADD';
    case CHANGE_BY_REFRESH = 'CHANGE_BY_REFRESH';
    case DELETE = 'DELETE';
    case REJECTED = 'REJECTED';
}

enum DocumentStatus : string
{
    case ADDITIONAL_TRANSMISSION = 'ADDITIONAL_TRANSMISSION';
    case COPY = 'COPY';
    case ORIGINAL = 'ORIGINAL';
}

class AvpList implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $code='',
        /** @var string */
        public string $value=''
    ) {
    }

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

class BaseDocument implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $currencyCode='',
        /** @var DateTime */
        public DateTime $creationDateTime=new DateTime(),
        /** @var DocumentAction|null */
        public ?DocumentAction $documentActionCode=null,
        /** @var DocumentStatus|null */
        public ?DocumentStatus $documentStatusCode=null,
        /** @var string */
        public string $documentStructureVersion='',
        /** @var DateTime|null */
        public ?DateTime $lastUpdateDateTime=null,
        /** @var int|null */
        public ?int $revisionNumber=null,
        /** @var array<AvpList>|null */
        public ?array $avpList=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['currencyCode'])) $this->currencyCode = $o['currencyCode'];
        if (isset($o['creationDateTime'])) $this->creationDateTime = JsonConverters::from('DateTime', $o['creationDateTime']);
        if (isset($o['documentActionCode'])) $this->documentActionCode = JsonConverters::from('DocumentAction', $o['documentActionCode']);
        if (isset($o['documentStatusCode'])) $this->documentStatusCode = JsonConverters::from('DocumentStatus', $o['documentStatusCode']);
        if (isset($o['documentStructureVersion'])) $this->documentStructureVersion = $o['documentStructureVersion'];
        if (isset($o['lastUpdateDateTime'])) $this->lastUpdateDateTime = JsonConverters::from('DateTime', $o['lastUpdateDateTime']);
        if (isset($o['revisionNumber'])) $this->revisionNumber = $o['revisionNumber'];
        if (isset($o['avpList'])) $this->avpList = JsonConverters::fromArray('AvpList', $o['avpList']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->currencyCode)) $o['currencyCode'] = $this->currencyCode;
        if (isset($this->creationDateTime)) $o['creationDateTime'] = JsonConverters::to('DateTime', $this->creationDateTime);
        if (isset($this->documentActionCode)) $o['documentActionCode'] = JsonConverters::to('DocumentAction', $this->documentActionCode);
        if (isset($this->documentStatusCode)) $o['documentStatusCode'] = JsonConverters::to('DocumentStatus', $this->documentStatusCode);
        if (isset($this->documentStructureVersion)) $o['documentStructureVersion'] = $this->documentStructureVersion;
        if (isset($this->lastUpdateDateTime)) $o['lastUpdateDateTime'] = JsonConverters::to('DateTime', $this->lastUpdateDateTime);
        if (isset($this->revisionNumber)) $o['revisionNumber'] = $this->revisionNumber;
        if (isset($this->avpList)) $o['avpList'] = JsonConverters::toArray('AvpList', $this->avpList);
        return empty($o) ? new class(){} : $o;
    }
}

class Ecom_PartyIdentification implements JsonSerializable
{
    public function __construct(
        /** @var array<AvpList>|null */
        public ?array $additionalPartyIdentification=null,
        /** @var string */
        public string $gln=''
    ) {
    }

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

class Ecom_EntityIdentification implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $entityIdentification='',
        /** @var Ecom_PartyIdentification|null */
        public ?Ecom_PartyIdentification $contentOwner=null
    ) {
    }

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

class Code implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $value='',
        /** @var string */
        public string $codeDescription='',
        /** @var string */
        public string $codeListAgencyCodeListVersion='',
        /** @var string */
        public string $codeListAgencyName='',
        /** @var string */
        public string $codeListName='',
        /** @var string */
        public string $codeListUri=''
    ) {
    }

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

class DateRange implements JsonSerializable
{
    public function __construct(
        /** @var DateTime|null */
        public ?DateTime $beginDate=null,
        /** @var DateTime|null */
        public ?DateTime $beginTime=null,
        /** @var DateTime|null */
        public ?DateTime $endDate=null,
        /** @var DateTime|null */
        public ?DateTime $endTime=null
    ) {
    }

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

class OrderLogisticalDateInformation implements JsonSerializable
{
    public function __construct(
        /** @var DateRange|null */
        public ?DateRange $dateRangeDeliveryDateRange=null,
        /** @var DateRange|null */
        public ?DateRange $dateRangeShipDateRange=null,
        /** @var DateRange|null */
        public ?DateRange $dateRangeDeliveryDateRangeAtUltimateConsignee=null,
        /** @var DateTime|null */
        public ?DateTime $requestedDeliveryDateTime=null,
        /** @var string */
        public string $requestedShipDateTime='',
        /** @var DateTime|null */
        public ?DateTime $requestedPickUpDateTime=null,
        /** @var DateTime|null */
        public ?DateTime $requestedDeliveryDateTimeAtUltimateConsignee=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['dateRangeDeliveryDateRange'])) $this->dateRangeDeliveryDateRange = JsonConverters::from('DateRange', $o['dateRangeDeliveryDateRange']);
        if (isset($o['dateRangeShipDateRange'])) $this->dateRangeShipDateRange = JsonConverters::from('DateRange', $o['dateRangeShipDateRange']);
        if (isset($o['dateRangeDeliveryDateRangeAtUltimateConsignee'])) $this->dateRangeDeliveryDateRangeAtUltimateConsignee = JsonConverters::from('DateRange', $o['dateRangeDeliveryDateRangeAtUltimateConsignee']);
        if (isset($o['requestedDeliveryDateTime'])) $this->requestedDeliveryDateTime = JsonConverters::from('DateTime', $o['requestedDeliveryDateTime']);
        if (isset($o['requestedShipDateTime'])) $this->requestedShipDateTime = $o['requestedShipDateTime'];
        if (isset($o['requestedPickUpDateTime'])) $this->requestedPickUpDateTime = JsonConverters::from('DateTime', $o['requestedPickUpDateTime']);
        if (isset($o['requestedDeliveryDateTimeAtUltimateConsignee'])) $this->requestedDeliveryDateTimeAtUltimateConsignee = JsonConverters::from('DateTime', $o['requestedDeliveryDateTimeAtUltimateConsignee']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->dateRangeDeliveryDateRange)) $o['dateRangeDeliveryDateRange'] = JsonConverters::to('DateRange', $this->dateRangeDeliveryDateRange);
        if (isset($this->dateRangeShipDateRange)) $o['dateRangeShipDateRange'] = JsonConverters::to('DateRange', $this->dateRangeShipDateRange);
        if (isset($this->dateRangeDeliveryDateRangeAtUltimateConsignee)) $o['dateRangeDeliveryDateRangeAtUltimateConsignee'] = JsonConverters::to('DateRange', $this->dateRangeDeliveryDateRangeAtUltimateConsignee);
        if (isset($this->requestedDeliveryDateTime)) $o['requestedDeliveryDateTime'] = JsonConverters::to('DateTime', $this->requestedDeliveryDateTime);
        if (isset($this->requestedShipDateTime)) $o['requestedShipDateTime'] = $this->requestedShipDateTime;
        if (isset($this->requestedPickUpDateTime)) $o['requestedPickUpDateTime'] = JsonConverters::to('DateTime', $this->requestedPickUpDateTime);
        if (isset($this->requestedDeliveryDateTimeAtUltimateConsignee)) $o['requestedDeliveryDateTimeAtUltimateConsignee'] = JsonConverters::to('DateTime', $this->requestedDeliveryDateTimeAtUltimateConsignee);
        return empty($o) ? new class(){} : $o;
    }
}

class Ecom_PartyIdentificationType implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $gln='',
        /** @var string */
        public string $name='',
        /** @var array<AvpList>|null */
        public ?array $additionalPartyIdentification=null
    ) {
    }

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

class CommunicationChannel implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $communicationChannelCode='',
        /** @var string */
        public string $communicationChannelName='',
        /** @var string */
        public string $communicationValue=''
    ) {
    }

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

class Contact implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $contactTypeCode='',
        /** @var string */
        public string $personName='',
        /** @var string */
        public string $departmentName='',
        /** @var string */
        public string $jobTitle='',
        /** @var string */
        public string $responsibility='',
        /** @var array<CommunicationChannel>|null */
        public ?array $communicationChannel=null
    ) {
    }

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

class Address implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $streetAddressOne='',
        /** @var string */
        public string $streetAddressTwo='',
        /** @var string */
        public string $streetAddressThree='',
        /** @var string */
        public string $city='',
        /** @var string */
        public string $postalCode='',
        /** @var string */
        public string $provinceCode='',
        /** @var string */
        public string $countryCode=''
    ) {
    }

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

class FinancialRoutingNumber implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $number='',
        /** @var string */
        public string $numberTypeCode=''
    ) {
    }

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

class FinancialAccount implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $number='',
        /** @var string */
        public string $numberTypeCode='',
        /** @var string */
        public string $name=''
    ) {
    }

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

class FinancialInstitutionInformation implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $financialInstitutionBranchName='',
        /** @var string */
        public string $financialInstitutionName='',
        /** @var FinancialRoutingNumber|null */
        public ?FinancialRoutingNumber $financialRoutingNumber=null,
        /** @var FinancialAccount|null */
        public ?FinancialAccount $financialAccount=null,
        /** @var string */
        public string $swiftCode='',
        /** @var string */
        public string $exportersCode=''
    ) {
    }

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

class TransactionalParty extends Ecom_PartyIdentificationType implements JsonSerializable
{
    /**
     * @param string $gln
     * @param string $name
     * @param array<AvpList>|null $additionalPartyIdentification
     */
    public function __construct(
        string $gln='',
        string $name='',
        ?array $additionalPartyIdentification=null,
        /** @var array<Contact>|null */
        public ?array $contact=null,
        /** @var Address|null */
        public ?Address $address=null,
        /** @var array<AvpList>|null */
        public ?array $communicationChannel=null,
        /** @var FinancialInstitutionInformation|null */
        public ?FinancialInstitutionInformation $financialInstitutionInformation=null,
        /** @var string */
        public string $dutyFeeTaxRegistration='',
        /** @var string */
        public string $entityIdentification=''
    ) {
        parent::__construct($gln,$name,$additionalPartyIdentification);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['contact'])) $this->contact = JsonConverters::fromArray('Contact', $o['contact']);
        if (isset($o['address'])) $this->address = JsonConverters::from('Address', $o['address']);
        if (isset($o['communicationChannel'])) $this->communicationChannel = JsonConverters::fromArray('AvpList', $o['communicationChannel']);
        if (isset($o['financialInstitutionInformation'])) $this->financialInstitutionInformation = JsonConverters::from('FinancialInstitutionInformation', $o['financialInstitutionInformation']);
        if (isset($o['dutyFeeTaxRegistration'])) $this->dutyFeeTaxRegistration = $o['dutyFeeTaxRegistration'];
        if (isset($o['entityIdentification'])) $this->entityIdentification = $o['entityIdentification'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->contact)) $o['contact'] = JsonConverters::toArray('Contact', $this->contact);
        if (isset($this->address)) $o['address'] = JsonConverters::to('Address', $this->address);
        if (isset($this->communicationChannel)) $o['communicationChannel'] = JsonConverters::toArray('AvpList', $this->communicationChannel);
        if (isset($this->financialInstitutionInformation)) $o['financialInstitutionInformation'] = JsonConverters::to('FinancialInstitutionInformation', $this->financialInstitutionInformation);
        if (isset($this->dutyFeeTaxRegistration)) $o['dutyFeeTaxRegistration'] = $this->dutyFeeTaxRegistration;
        if (isset($this->entityIdentification)) $o['entityIdentification'] = $this->entityIdentification;
        return empty($o) ? new class(){} : $o;
    }
}

class ShipmentTransportationInformation implements JsonSerializable
{
    public function __construct(
        /** @var TransactionalParty|null */
        public ?TransactionalParty $carrier=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $freightForwarder=null
    ) {
    }

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

class OrderLogisticalInformation implements JsonSerializable
{
    public function __construct(
        /** @var Code|null */
        public ?Code $commodityTypeCode=null,
        /** @var OrderLogisticalDateInformation|null */
        public ?OrderLogisticalDateInformation $orderLogisticalDateInformation=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $inventoryLocation=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $shipFrom=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $shipTo=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $ultimateConsignee=null,
        /** @var ShipmentTransportationInformation|null */
        public ?ShipmentTransportationInformation $shipmentTransportationInformation=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['commodityTypeCode'])) $this->commodityTypeCode = JsonConverters::from('Code', $o['commodityTypeCode']);
        if (isset($o['orderLogisticalDateInformation'])) $this->orderLogisticalDateInformation = JsonConverters::from('OrderLogisticalDateInformation', $o['orderLogisticalDateInformation']);
        if (isset($o['inventoryLocation'])) $this->inventoryLocation = JsonConverters::from('TransactionalParty', $o['inventoryLocation']);
        if (isset($o['shipFrom'])) $this->shipFrom = JsonConverters::from('TransactionalParty', $o['shipFrom']);
        if (isset($o['shipTo'])) $this->shipTo = JsonConverters::from('TransactionalParty', $o['shipTo']);
        if (isset($o['ultimateConsignee'])) $this->ultimateConsignee = JsonConverters::from('TransactionalParty', $o['ultimateConsignee']);
        if (isset($o['shipmentTransportationInformation'])) $this->shipmentTransportationInformation = JsonConverters::from('ShipmentTransportationInformation', $o['shipmentTransportationInformation']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->commodityTypeCode)) $o['commodityTypeCode'] = JsonConverters::to('Code', $this->commodityTypeCode);
        if (isset($this->orderLogisticalDateInformation)) $o['orderLogisticalDateInformation'] = JsonConverters::to('OrderLogisticalDateInformation', $this->orderLogisticalDateInformation);
        if (isset($this->inventoryLocation)) $o['inventoryLocation'] = JsonConverters::to('TransactionalParty', $this->inventoryLocation);
        if (isset($this->shipFrom)) $o['shipFrom'] = JsonConverters::to('TransactionalParty', $this->shipFrom);
        if (isset($this->shipTo)) $o['shipTo'] = JsonConverters::to('TransactionalParty', $this->shipTo);
        if (isset($this->ultimateConsignee)) $o['ultimateConsignee'] = JsonConverters::to('TransactionalParty', $this->ultimateConsignee);
        if (isset($this->shipmentTransportationInformation)) $o['shipmentTransportationInformation'] = JsonConverters::to('ShipmentTransportationInformation', $this->shipmentTransportationInformation);
        return empty($o) ? new class(){} : $o;
    }
}

class AdministrativeUnit implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $typeCode='',
        /** @var string */
        public string $gln='',
        /** @var string */
        public string $internalIdentification=''
    ) {
    }

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

class DeliveryTermsLocation implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $unLocationCode='',
        /** @var string */
        public string $gln='',
        /** @var array<AvpList>|null */
        public ?array $additionalLocationIdentification=null,
        /** @var string */
        public string $sublocationIdentification='',
        /** @var string */
        public string $locationName='',
        /** @var string */
        public string $locationSpecificInstructions=''
    ) {
    }

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

class DeliveryTerms implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $incotermsCode='',
        /** @var string */
        public string $alternateDeliveryTermsCode='',
        /** @var string */
        public string $deliveryInstructions='',
        /** @var string */
        public string $deliveryCostPayment='',
        /** @var string */
        public string $isSignatureRequired='',
        /** @var DeliveryTermsLocation|null */
        public ?DeliveryTermsLocation $deliveryTermsLocation=null
    ) {
    }

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

class DocumentReference implements JsonSerializable
{
    public function __construct(
        /** @var DateTime|null */
        public ?DateTime $creationDateTime=null,
        /** @var int|null */
        public ?int $revisionNumber=null,
        /** @var int|null */
        public ?int $lineItemNumber=null,
        /** @var string */
        public string $entityIdentification=''
    ) {
    }

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

class ReferencedOrder implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $orderRelationship='',
        /** @var DocumentReference|null */
        public ?DocumentReference $documentReference=null
    ) {
    }

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

class AllowanceCharge implements JsonSerializable
{
    public function __construct(
        /** @var float|null */
        public ?float $allowanceChargeAmount=null,
        /** @var float|null */
        public ?float $allowanceChargePercentage=null,
        /** @var string */
        public string $allowanceChargeType='',
        /** @var string */
        public string $allowanceOrChargeType='',
        /** @var float|null */
        public ?float $amountPerUnit=null,
        /** @var float|null */
        public ?float $baseAmount=null,
        /** @var string */
        public string $baseNumberOfUnits='',
        /** @var string */
        public string $bracketIdentifier='',
        /** @var DateTime|null */
        public ?DateTime $effectiveDateType=null,
        /** @var string */
        public string $sequenceNumber='',
        /** @var string */
        public string $settlementType='',
        /** @var string */
        public string $specialServiceType='',
        /** @var string */
        public string $allowanceChargeDescription=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['allowanceChargeAmount'])) $this->allowanceChargeAmount = $o['allowanceChargeAmount'];
        if (isset($o['allowanceChargePercentage'])) $this->allowanceChargePercentage = $o['allowanceChargePercentage'];
        if (isset($o['allowanceChargeType'])) $this->allowanceChargeType = $o['allowanceChargeType'];
        if (isset($o['allowanceOrChargeType'])) $this->allowanceOrChargeType = $o['allowanceOrChargeType'];
        if (isset($o['amountPerUnit'])) $this->amountPerUnit = $o['amountPerUnit'];
        if (isset($o['baseAmount'])) $this->baseAmount = $o['baseAmount'];
        if (isset($o['baseNumberOfUnits'])) $this->baseNumberOfUnits = $o['baseNumberOfUnits'];
        if (isset($o['bracketIdentifier'])) $this->bracketIdentifier = $o['bracketIdentifier'];
        if (isset($o['effectiveDateType'])) $this->effectiveDateType = JsonConverters::from('DateTime', $o['effectiveDateType']);
        if (isset($o['sequenceNumber'])) $this->sequenceNumber = $o['sequenceNumber'];
        if (isset($o['settlementType'])) $this->settlementType = $o['settlementType'];
        if (isset($o['specialServiceType'])) $this->specialServiceType = $o['specialServiceType'];
        if (isset($o['allowanceChargeDescription'])) $this->allowanceChargeDescription = $o['allowanceChargeDescription'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->allowanceChargeAmount)) $o['allowanceChargeAmount'] = $this->allowanceChargeAmount;
        if (isset($this->allowanceChargePercentage)) $o['allowanceChargePercentage'] = $this->allowanceChargePercentage;
        if (isset($this->allowanceChargeType)) $o['allowanceChargeType'] = $this->allowanceChargeType;
        if (isset($this->allowanceOrChargeType)) $o['allowanceOrChargeType'] = $this->allowanceOrChargeType;
        if (isset($this->amountPerUnit)) $o['amountPerUnit'] = $this->amountPerUnit;
        if (isset($this->baseAmount)) $o['baseAmount'] = $this->baseAmount;
        if (isset($this->baseNumberOfUnits)) $o['baseNumberOfUnits'] = $this->baseNumberOfUnits;
        if (isset($this->bracketIdentifier)) $o['bracketIdentifier'] = $this->bracketIdentifier;
        if (isset($this->effectiveDateType)) $o['effectiveDateType'] = JsonConverters::to('DateTime', $this->effectiveDateType);
        if (isset($this->sequenceNumber)) $o['sequenceNumber'] = $this->sequenceNumber;
        if (isset($this->settlementType)) $o['settlementType'] = $this->settlementType;
        if (isset($this->specialServiceType)) $o['specialServiceType'] = $this->specialServiceType;
        if (isset($this->allowanceChargeDescription)) $o['allowanceChargeDescription'] = $this->allowanceChargeDescription;
        return empty($o) ? new class(){} : $o;
    }
}

class Quantity implements JsonSerializable
{
    public function __construct(
        /** @var float|null */
        public ?float $value=null,
        /** @var string */
        public string $measurementUnitCode='',
        /** @var string */
        public string $codeListVersion=''
    ) {
    }

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

class TransactionalItem implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $measurementUnitCode='',
        /** @var string */
        public string $measurementType='',
        /** @var string */
        public string $measurementValue=''
    ) {
    }

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

class SerialNumberRange implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $maximumValue='',
        /** @var string */
        public string $minimumValue=''
    ) {
    }

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

class TransactionalItemDimension implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $measurementUnitCode='',
        /** @var string */
        public string $depth='',
        /** @var string */
        public string $height='',
        /** @var string */
        public string $width=''
    ) {
    }

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

class TransactionalItemLogisticUnitInformation implements JsonSerializable
{
    public function __construct(
        /** @var int|null */
        public ?int $numberOfLayers=null,
        /** @var int|null */
        public ?int $numberOfUnitsPerLayer=null,
        /** @var int|null */
        public ?int $numberOfUnitsPerPallet=null,
        /** @var string */
        public string $packagingTerms='',
        /** @var string */
        public string $packageTypeCode='',
        /** @var int|null */
        public ?int $maximumStackingFactor=null,
        /** @var string */
        public string $returnablePackageTransportCostPayment='',
        /** @var array<TransactionalItemDimension>|null */
        public ?array $dimensionsOfLogisticUnit=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['numberOfLayers'])) $this->numberOfLayers = $o['numberOfLayers'];
        if (isset($o['numberOfUnitsPerLayer'])) $this->numberOfUnitsPerLayer = $o['numberOfUnitsPerLayer'];
        if (isset($o['numberOfUnitsPerPallet'])) $this->numberOfUnitsPerPallet = $o['numberOfUnitsPerPallet'];
        if (isset($o['packagingTerms'])) $this->packagingTerms = $o['packagingTerms'];
        if (isset($o['packageTypeCode'])) $this->packageTypeCode = $o['packageTypeCode'];
        if (isset($o['maximumStackingFactor'])) $this->maximumStackingFactor = $o['maximumStackingFactor'];
        if (isset($o['returnablePackageTransportCostPayment'])) $this->returnablePackageTransportCostPayment = $o['returnablePackageTransportCostPayment'];
        if (isset($o['dimensionsOfLogisticUnit'])) $this->dimensionsOfLogisticUnit = JsonConverters::fromArray('TransactionalItemDimension', $o['dimensionsOfLogisticUnit']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->numberOfLayers)) $o['numberOfLayers'] = $this->numberOfLayers;
        if (isset($this->numberOfUnitsPerLayer)) $o['numberOfUnitsPerLayer'] = $this->numberOfUnitsPerLayer;
        if (isset($this->numberOfUnitsPerPallet)) $o['numberOfUnitsPerPallet'] = $this->numberOfUnitsPerPallet;
        if (isset($this->packagingTerms)) $o['packagingTerms'] = $this->packagingTerms;
        if (isset($this->packageTypeCode)) $o['packageTypeCode'] = $this->packageTypeCode;
        if (isset($this->maximumStackingFactor)) $o['maximumStackingFactor'] = $this->maximumStackingFactor;
        if (isset($this->returnablePackageTransportCostPayment)) $o['returnablePackageTransportCostPayment'] = $this->returnablePackageTransportCostPayment;
        if (isset($this->dimensionsOfLogisticUnit)) $o['dimensionsOfLogisticUnit'] = JsonConverters::toArray('TransactionalItemDimension', $this->dimensionsOfLogisticUnit);
        return empty($o) ? new class(){} : $o;
    }
}

class TransactionalItemDataCarrierAndIdentification implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $gs1TransactionalItemIdentificationKey='',
        /** @var string */
        public string $dataCarrier=''
    ) {
    }

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

class TradeItemWaste implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $wasteIdentification='',
        /** @var array<AvpList>|null */
        public ?array $typeOfWaste=null
    ) {
    }

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

class TransactionalItemOrganicInformation implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $isTradeItemOrganic=null,
        /** @var string */
        public string $organicCertification=''
    ) {
    }

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

class TransactionalItemData implements JsonSerializable
{
    public function __construct(
        /** @var DateTime|null */
        public ?DateTime $availableForSaleDate=null,
        /** @var string */
        public string $batchNumber='',
        /** @var DateTime|null */
        public ?DateTime $bestBeforeDate=null,
        /** @var string */
        public string $countryOfOrigin='',
        /** @var DateTime|null */
        public ?DateTime $itemExpirationDate=null,
        /** @var string */
        public string $lotNumber='',
        /** @var DateTime|null */
        public ?DateTime $packagingDate=null,
        /** @var DateTime|null */
        public ?DateTime $productionDate=null,
        /** @var string */
        public string $productQualityIndication='',
        /** @var DateTime|null */
        public ?DateTime $sellByDate=null,
        /** @var array<string>|null */
        public ?array $serialNumber=null,
        /** @var string */
        public string $shelfLife='',
        /** @var int|null */
        public ?int $tradeItemQuantity=null,
        /** @var bool|null */
        public ?bool $itemInContactWithFoodProduct=null,
        /** @var array<TransactionalItem>|null */
        public ?array $transactionalItemWeight=null,
        /** @var array<TransactionalItem>|null */
        public ?array $transactionalItemVolume=null,
        /** @var array<SerialNumberRange>|null */
        public ?array $serialNumberRange=null,
        /** @var array<TransactionalItemDimension>|null */
        public ?array $transactionalItemDimensions=null,
        /** @var TransactionalItemLogisticUnitInformation|null */
        public ?TransactionalItemLogisticUnitInformation $transactionalItemLogisticUnitInformation=null,
        /** @var TransactionalItemDataCarrierAndIdentification|null */
        public ?TransactionalItemDataCarrierAndIdentification $transactionalItemDataCarrierAndIdentification=null,
        /** @var array<TradeItemWaste>|null */
        public ?array $tradeItemWaste=null,
        /** @var TransactionalItemOrganicInformation|null */
        public ?TransactionalItemOrganicInformation $transactionalItemOrganicInformation=null,
        /** @var array<AvpList>|null */
        public ?array $avpList=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['availableForSaleDate'])) $this->availableForSaleDate = JsonConverters::from('DateTime', $o['availableForSaleDate']);
        if (isset($o['batchNumber'])) $this->batchNumber = $o['batchNumber'];
        if (isset($o['bestBeforeDate'])) $this->bestBeforeDate = JsonConverters::from('DateTime', $o['bestBeforeDate']);
        if (isset($o['countryOfOrigin'])) $this->countryOfOrigin = $o['countryOfOrigin'];
        if (isset($o['itemExpirationDate'])) $this->itemExpirationDate = JsonConverters::from('DateTime', $o['itemExpirationDate']);
        if (isset($o['lotNumber'])) $this->lotNumber = $o['lotNumber'];
        if (isset($o['packagingDate'])) $this->packagingDate = JsonConverters::from('DateTime', $o['packagingDate']);
        if (isset($o['productionDate'])) $this->productionDate = JsonConverters::from('DateTime', $o['productionDate']);
        if (isset($o['productQualityIndication'])) $this->productQualityIndication = $o['productQualityIndication'];
        if (isset($o['sellByDate'])) $this->sellByDate = JsonConverters::from('DateTime', $o['sellByDate']);
        if (isset($o['serialNumber'])) $this->serialNumber = JsonConverters::fromArray('string', $o['serialNumber']);
        if (isset($o['shelfLife'])) $this->shelfLife = $o['shelfLife'];
        if (isset($o['tradeItemQuantity'])) $this->tradeItemQuantity = $o['tradeItemQuantity'];
        if (isset($o['itemInContactWithFoodProduct'])) $this->itemInContactWithFoodProduct = $o['itemInContactWithFoodProduct'];
        if (isset($o['transactionalItemWeight'])) $this->transactionalItemWeight = JsonConverters::fromArray('TransactionalItem', $o['transactionalItemWeight']);
        if (isset($o['transactionalItemVolume'])) $this->transactionalItemVolume = JsonConverters::fromArray('TransactionalItem', $o['transactionalItemVolume']);
        if (isset($o['serialNumberRange'])) $this->serialNumberRange = JsonConverters::fromArray('SerialNumberRange', $o['serialNumberRange']);
        if (isset($o['transactionalItemDimensions'])) $this->transactionalItemDimensions = JsonConverters::fromArray('TransactionalItemDimension', $o['transactionalItemDimensions']);
        if (isset($o['transactionalItemLogisticUnitInformation'])) $this->transactionalItemLogisticUnitInformation = JsonConverters::from('TransactionalItemLogisticUnitInformation', $o['transactionalItemLogisticUnitInformation']);
        if (isset($o['transactionalItemDataCarrierAndIdentification'])) $this->transactionalItemDataCarrierAndIdentification = JsonConverters::from('TransactionalItemDataCarrierAndIdentification', $o['transactionalItemDataCarrierAndIdentification']);
        if (isset($o['tradeItemWaste'])) $this->tradeItemWaste = JsonConverters::fromArray('TradeItemWaste', $o['tradeItemWaste']);
        if (isset($o['transactionalItemOrganicInformation'])) $this->transactionalItemOrganicInformation = JsonConverters::from('TransactionalItemOrganicInformation', $o['transactionalItemOrganicInformation']);
        if (isset($o['avpList'])) $this->avpList = JsonConverters::fromArray('AvpList', $o['avpList']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->availableForSaleDate)) $o['availableForSaleDate'] = JsonConverters::to('DateTime', $this->availableForSaleDate);
        if (isset($this->batchNumber)) $o['batchNumber'] = $this->batchNumber;
        if (isset($this->bestBeforeDate)) $o['bestBeforeDate'] = JsonConverters::to('DateTime', $this->bestBeforeDate);
        if (isset($this->countryOfOrigin)) $o['countryOfOrigin'] = $this->countryOfOrigin;
        if (isset($this->itemExpirationDate)) $o['itemExpirationDate'] = JsonConverters::to('DateTime', $this->itemExpirationDate);
        if (isset($this->lotNumber)) $o['lotNumber'] = $this->lotNumber;
        if (isset($this->packagingDate)) $o['packagingDate'] = JsonConverters::to('DateTime', $this->packagingDate);
        if (isset($this->productionDate)) $o['productionDate'] = JsonConverters::to('DateTime', $this->productionDate);
        if (isset($this->productQualityIndication)) $o['productQualityIndication'] = $this->productQualityIndication;
        if (isset($this->sellByDate)) $o['sellByDate'] = JsonConverters::to('DateTime', $this->sellByDate);
        if (isset($this->serialNumber)) $o['serialNumber'] = JsonConverters::toArray('string', $this->serialNumber);
        if (isset($this->shelfLife)) $o['shelfLife'] = $this->shelfLife;
        if (isset($this->tradeItemQuantity)) $o['tradeItemQuantity'] = $this->tradeItemQuantity;
        if (isset($this->itemInContactWithFoodProduct)) $o['itemInContactWithFoodProduct'] = $this->itemInContactWithFoodProduct;
        if (isset($this->transactionalItemWeight)) $o['transactionalItemWeight'] = JsonConverters::toArray('TransactionalItem', $this->transactionalItemWeight);
        if (isset($this->transactionalItemVolume)) $o['transactionalItemVolume'] = JsonConverters::toArray('TransactionalItem', $this->transactionalItemVolume);
        if (isset($this->serialNumberRange)) $o['serialNumberRange'] = JsonConverters::toArray('SerialNumberRange', $this->serialNumberRange);
        if (isset($this->transactionalItemDimensions)) $o['transactionalItemDimensions'] = JsonConverters::toArray('TransactionalItemDimension', $this->transactionalItemDimensions);
        if (isset($this->transactionalItemLogisticUnitInformation)) $o['transactionalItemLogisticUnitInformation'] = JsonConverters::to('TransactionalItemLogisticUnitInformation', $this->transactionalItemLogisticUnitInformation);
        if (isset($this->transactionalItemDataCarrierAndIdentification)) $o['transactionalItemDataCarrierAndIdentification'] = JsonConverters::to('TransactionalItemDataCarrierAndIdentification', $this->transactionalItemDataCarrierAndIdentification);
        if (isset($this->tradeItemWaste)) $o['tradeItemWaste'] = JsonConverters::toArray('TradeItemWaste', $this->tradeItemWaste);
        if (isset($this->transactionalItemOrganicInformation)) $o['transactionalItemOrganicInformation'] = JsonConverters::to('TransactionalItemOrganicInformation', $this->transactionalItemOrganicInformation);
        if (isset($this->avpList)) $o['avpList'] = JsonConverters::toArray('AvpList', $this->avpList);
        return empty($o) ? new class(){} : $o;
    }
}

class Colour implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $colourCode='',
        /** @var string */
        public string $colourDescription=''
    ) {
    }

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

class Size implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $descriptiveSize='',
        /** @var string */
        public string $sizeCode=''
    ) {
    }

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

class TradeItemClassification implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $gpcCategoryCode='',
        /** @var array<AvpList>|null */
        public ?array $additionalTradeItemClassificationCode=null,
        /** @var string */
        public string $gpcCategoryName='',
        /** @var array<AvpList>|null */
        public ?array $gpcAttribute=null
    ) {
    }

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

class TransactionalTradeItem implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $gtin='',
        /** @var array<AvpList>|null */
        public ?array $additionalTradeItemIdentification=null,
        /** @var float|null */
        public ?float $tradeItemQuantity=null,
        /** @var string */
        public string $tradeItemDescription='',
        /** @var string */
        public string $productVariantIdentifier='',
        /** @var string */
        public string $itemTypeCode='',
        /** @var string */
        public string $tradeItemDataOwner='',
        /** @var string */
        public string $butterFatReference='',
        /** @var array<TransactionalItemData>|null */
        public ?array $transactionalItemData=null,
        /** @var array<Colour>|null */
        public ?array $colour=null,
        /** @var Size|null */
        public ?Size $size=null,
        /** @var TradeItemClassification|null */
        public ?TradeItemClassification $tradeItemClassification=null,
        /** @var array<AvpList>|null */
        public ?array $avpList=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['gtin'])) $this->gtin = $o['gtin'];
        if (isset($o['additionalTradeItemIdentification'])) $this->additionalTradeItemIdentification = JsonConverters::fromArray('AvpList', $o['additionalTradeItemIdentification']);
        if (isset($o['tradeItemQuantity'])) $this->tradeItemQuantity = $o['tradeItemQuantity'];
        if (isset($o['tradeItemDescription'])) $this->tradeItemDescription = $o['tradeItemDescription'];
        if (isset($o['productVariantIdentifier'])) $this->productVariantIdentifier = $o['productVariantIdentifier'];
        if (isset($o['itemTypeCode'])) $this->itemTypeCode = $o['itemTypeCode'];
        if (isset($o['tradeItemDataOwner'])) $this->tradeItemDataOwner = $o['tradeItemDataOwner'];
        if (isset($o['butterFatReference'])) $this->butterFatReference = $o['butterFatReference'];
        if (isset($o['transactionalItemData'])) $this->transactionalItemData = JsonConverters::fromArray('TransactionalItemData', $o['transactionalItemData']);
        if (isset($o['colour'])) $this->colour = JsonConverters::fromArray('Colour', $o['colour']);
        if (isset($o['size'])) $this->size = JsonConverters::from('Size', $o['size']);
        if (isset($o['tradeItemClassification'])) $this->tradeItemClassification = JsonConverters::from('TradeItemClassification', $o['tradeItemClassification']);
        if (isset($o['avpList'])) $this->avpList = JsonConverters::fromArray('AvpList', $o['avpList']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->gtin)) $o['gtin'] = $this->gtin;
        if (isset($this->additionalTradeItemIdentification)) $o['additionalTradeItemIdentification'] = JsonConverters::toArray('AvpList', $this->additionalTradeItemIdentification);
        if (isset($this->tradeItemQuantity)) $o['tradeItemQuantity'] = $this->tradeItemQuantity;
        if (isset($this->tradeItemDescription)) $o['tradeItemDescription'] = $this->tradeItemDescription;
        if (isset($this->productVariantIdentifier)) $o['productVariantIdentifier'] = $this->productVariantIdentifier;
        if (isset($this->itemTypeCode)) $o['itemTypeCode'] = $this->itemTypeCode;
        if (isset($this->tradeItemDataOwner)) $o['tradeItemDataOwner'] = $this->tradeItemDataOwner;
        if (isset($this->butterFatReference)) $o['butterFatReference'] = $this->butterFatReference;
        if (isset($this->transactionalItemData)) $o['transactionalItemData'] = JsonConverters::toArray('TransactionalItemData', $this->transactionalItemData);
        if (isset($this->colour)) $o['colour'] = JsonConverters::toArray('Colour', $this->colour);
        if (isset($this->size)) $o['size'] = JsonConverters::to('Size', $this->size);
        if (isset($this->tradeItemClassification)) $o['tradeItemClassification'] = JsonConverters::to('TradeItemClassification', $this->tradeItemClassification);
        if (isset($this->avpList)) $o['avpList'] = JsonConverters::toArray('AvpList', $this->avpList);
        return empty($o) ? new class(){} : $o;
    }
}

class LeviedDutyFeeTax implements JsonSerializable
{
    public function __construct(
        /** @var float|null */
        public ?float $dutyFeeTaxAmount=null,
        /** @var float|null */
        public ?float $dutyFeeTaxBasisAmount=null,
        /** @var string */
        public string $dutyFeeTaxDescription='',
        /** @var float|null */
        public ?float $dutyFeeTaxPercentage=null
    ) {
    }

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

class OrderLineItemDetail implements JsonSerializable
{
    public function __construct(
        /** @var Quantity|null */
        public ?Quantity $requestedQuantity=null,
        /** @var OrderLogisticalInformation|null */
        public ?OrderLogisticalInformation $orderLogisticalInformation=null,
        /** @var array<AvpList>|null */
        public ?array $avpList=null
    ) {
    }

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

class OrderLineItem implements JsonSerializable
{
    public function __construct(
        /** @var Quantity|null */
        public ?Quantity $freeGoodsQuantity=null,
        /** @var Quantity|null */
        public ?Quantity $itemPriceBaseQuantity=null,
        /** @var Quantity|null */
        public ?Quantity $requestedQuantity=null,
        /** @var string */
        public string $lineItemActionCode='',
        /** @var int|null */
        public ?int $lineItemNumber=null,
        /** @var float|null */
        public ?float $listPrice=null,
        /** @var float|null */
        public ?float $monetaryAmountExcludingTaxes=null,
        /** @var float|null */
        public ?float $monetaryAmountIncludingTaxes=null,
        /** @var float|null */
        public ?float $netAmount=null,
        /** @var float|null */
        public ?float $netPrice=null,
        /** @var string */
        public string $note='',
        /** @var string */
        public string $orderLineItemInstructionCode='',
        /** @var float|null */
        public ?float $parentLineItemNumber=null,
        /** @var float|null */
        public ?float $recommendedRetailPrice=null,
        /** @var string */
        public string $orderLineItemPriority='',
        /** @var array<AvpList>|null */
        public ?array $additionalOrderLineInstruction=null,
        /** @var array<AllowanceCharge>|null */
        public ?array $allowanceCharge=null,
        /** @var array<AdministrativeUnit>|null */
        public ?array $administrativeUnit=null,
        /** @var TransactionalTradeItem|null */
        public ?TransactionalTradeItem $transactionalTradeItem=null,
        /** @var LeviedDutyFeeTax|null */
        public ?LeviedDutyFeeTax $leviedDutyFeeTax=null,
        /** @var DocumentReference|null */
        public ?DocumentReference $contract=null,
        /** @var DocumentReference|null */
        public ?DocumentReference $promotionalDeal=null,
        /** @var DocumentReference|null */
        public ?DocumentReference $purchaseConditions=null,
        /** @var array<AvpList>|null */
        public ?array $avpList=null,
        /** @var array<OrderLineItemDetail>|null */
        public ?array $orderLineItemDetail=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['freeGoodsQuantity'])) $this->freeGoodsQuantity = JsonConverters::from('Quantity', $o['freeGoodsQuantity']);
        if (isset($o['itemPriceBaseQuantity'])) $this->itemPriceBaseQuantity = JsonConverters::from('Quantity', $o['itemPriceBaseQuantity']);
        if (isset($o['requestedQuantity'])) $this->requestedQuantity = JsonConverters::from('Quantity', $o['requestedQuantity']);
        if (isset($o['lineItemActionCode'])) $this->lineItemActionCode = $o['lineItemActionCode'];
        if (isset($o['lineItemNumber'])) $this->lineItemNumber = $o['lineItemNumber'];
        if (isset($o['listPrice'])) $this->listPrice = $o['listPrice'];
        if (isset($o['monetaryAmountExcludingTaxes'])) $this->monetaryAmountExcludingTaxes = $o['monetaryAmountExcludingTaxes'];
        if (isset($o['monetaryAmountIncludingTaxes'])) $this->monetaryAmountIncludingTaxes = $o['monetaryAmountIncludingTaxes'];
        if (isset($o['netAmount'])) $this->netAmount = $o['netAmount'];
        if (isset($o['netPrice'])) $this->netPrice = $o['netPrice'];
        if (isset($o['note'])) $this->note = $o['note'];
        if (isset($o['orderLineItemInstructionCode'])) $this->orderLineItemInstructionCode = $o['orderLineItemInstructionCode'];
        if (isset($o['parentLineItemNumber'])) $this->parentLineItemNumber = $o['parentLineItemNumber'];
        if (isset($o['recommendedRetailPrice'])) $this->recommendedRetailPrice = $o['recommendedRetailPrice'];
        if (isset($o['orderLineItemPriority'])) $this->orderLineItemPriority = $o['orderLineItemPriority'];
        if (isset($o['additionalOrderLineInstruction'])) $this->additionalOrderLineInstruction = JsonConverters::fromArray('AvpList', $o['additionalOrderLineInstruction']);
        if (isset($o['allowanceCharge'])) $this->allowanceCharge = JsonConverters::fromArray('AllowanceCharge', $o['allowanceCharge']);
        if (isset($o['administrativeUnit'])) $this->administrativeUnit = JsonConverters::fromArray('AdministrativeUnit', $o['administrativeUnit']);
        if (isset($o['transactionalTradeItem'])) $this->transactionalTradeItem = JsonConverters::from('TransactionalTradeItem', $o['transactionalTradeItem']);
        if (isset($o['leviedDutyFeeTax'])) $this->leviedDutyFeeTax = JsonConverters::from('LeviedDutyFeeTax', $o['leviedDutyFeeTax']);
        if (isset($o['contract'])) $this->contract = JsonConverters::from('DocumentReference', $o['contract']);
        if (isset($o['promotionalDeal'])) $this->promotionalDeal = JsonConverters::from('DocumentReference', $o['promotionalDeal']);
        if (isset($o['purchaseConditions'])) $this->purchaseConditions = JsonConverters::from('DocumentReference', $o['purchaseConditions']);
        if (isset($o['avpList'])) $this->avpList = JsonConverters::fromArray('AvpList', $o['avpList']);
        if (isset($o['orderLineItemDetail'])) $this->orderLineItemDetail = JsonConverters::fromArray('OrderLineItemDetail', $o['orderLineItemDetail']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->freeGoodsQuantity)) $o['freeGoodsQuantity'] = JsonConverters::to('Quantity', $this->freeGoodsQuantity);
        if (isset($this->itemPriceBaseQuantity)) $o['itemPriceBaseQuantity'] = JsonConverters::to('Quantity', $this->itemPriceBaseQuantity);
        if (isset($this->requestedQuantity)) $o['requestedQuantity'] = JsonConverters::to('Quantity', $this->requestedQuantity);
        if (isset($this->lineItemActionCode)) $o['lineItemActionCode'] = $this->lineItemActionCode;
        if (isset($this->lineItemNumber)) $o['lineItemNumber'] = $this->lineItemNumber;
        if (isset($this->listPrice)) $o['listPrice'] = $this->listPrice;
        if (isset($this->monetaryAmountExcludingTaxes)) $o['monetaryAmountExcludingTaxes'] = $this->monetaryAmountExcludingTaxes;
        if (isset($this->monetaryAmountIncludingTaxes)) $o['monetaryAmountIncludingTaxes'] = $this->monetaryAmountIncludingTaxes;
        if (isset($this->netAmount)) $o['netAmount'] = $this->netAmount;
        if (isset($this->netPrice)) $o['netPrice'] = $this->netPrice;
        if (isset($this->note)) $o['note'] = $this->note;
        if (isset($this->orderLineItemInstructionCode)) $o['orderLineItemInstructionCode'] = $this->orderLineItemInstructionCode;
        if (isset($this->parentLineItemNumber)) $o['parentLineItemNumber'] = $this->parentLineItemNumber;
        if (isset($this->recommendedRetailPrice)) $o['recommendedRetailPrice'] = $this->recommendedRetailPrice;
        if (isset($this->orderLineItemPriority)) $o['orderLineItemPriority'] = $this->orderLineItemPriority;
        if (isset($this->additionalOrderLineInstruction)) $o['additionalOrderLineInstruction'] = JsonConverters::toArray('AvpList', $this->additionalOrderLineInstruction);
        if (isset($this->allowanceCharge)) $o['allowanceCharge'] = JsonConverters::toArray('AllowanceCharge', $this->allowanceCharge);
        if (isset($this->administrativeUnit)) $o['administrativeUnit'] = JsonConverters::toArray('AdministrativeUnit', $this->administrativeUnit);
        if (isset($this->transactionalTradeItem)) $o['transactionalTradeItem'] = JsonConverters::to('TransactionalTradeItem', $this->transactionalTradeItem);
        if (isset($this->leviedDutyFeeTax)) $o['leviedDutyFeeTax'] = JsonConverters::to('LeviedDutyFeeTax', $this->leviedDutyFeeTax);
        if (isset($this->contract)) $o['contract'] = JsonConverters::to('DocumentReference', $this->contract);
        if (isset($this->promotionalDeal)) $o['promotionalDeal'] = JsonConverters::to('DocumentReference', $this->promotionalDeal);
        if (isset($this->purchaseConditions)) $o['purchaseConditions'] = JsonConverters::to('DocumentReference', $this->purchaseConditions);
        if (isset($this->avpList)) $o['avpList'] = JsonConverters::toArray('AvpList', $this->avpList);
        if (isset($this->orderLineItemDetail)) $o['orderLineItemDetail'] = JsonConverters::toArray('OrderLineItemDetail', $this->orderLineItemDetail);
        return empty($o) ? new class(){} : $o;
    }
}

class Order extends BaseDocument implements JsonSerializable
{
    /**
     * @param string $currencyCode
     * @param DateTime $creationDateTime
     * @param DocumentAction|null $documentActionCode
     * @param DocumentStatus|null $documentStatusCode
     * @param string $documentStructureVersion
     * @param DateTime|null $lastUpdateDateTime
     * @param int|null $revisionNumber
     * @param array<AvpList>|null $avpList
     */
    public function __construct(
        string $currencyCode='',
        DateTime $creationDateTime=new DateTime(),
        ?DocumentAction $documentActionCode=null,
        ?DocumentStatus $documentStatusCode=null,
        string $documentStructureVersion='',
        ?DateTime $lastUpdateDateTime=null,
        ?int $revisionNumber=null,
        ?array $avpList=null,
        /** @var DateTime|null */
        public ?DateTime $documentEffectiveDate=null,
        /** @var string */
        public string $additionalOrderInstruction='',
        /** @var bool|null */
        public ?bool $isApplicationReceiptAcknowledgementRequired=null,
        /** @var bool|null */
        public ?bool $isOrderFreeOfExciseTaxDuty=null,
        /** @var string */
        public string $note='',
        /** @var string */
        public string $orderEntryType='',
        /** @var string */
        public string $orderInstructionCode='',
        /** @var string */
        public string $orderPriority='',
        /** @var string */
        public string $orderTypeCode='',
        /** @var float|null */
        public ?float $totalMonetaryAmountExcludingTaxes=null,
        /** @var float|null */
        public ?float $totalMonetaryAmountIncludingTaxes=null,
        /** @var float|null */
        public ?float $totalTaxAmount=null,
        /** @var string */
        public string $paymentTerms='',
        /** @var Ecom_EntityIdentification|null */
        public ?Ecom_EntityIdentification $orderIdentification=null,
        /** @var OrderLogisticalInformation|null */
        public ?OrderLogisticalInformation $orderLogisticalInformation=null,
        /** @var array<AdministrativeUnit>|null */
        public ?array $administrativeUnit=null,
        /** @var DeliveryTerms|null */
        public ?DeliveryTerms $deliveryTerms=null,
        /** @var array<AvpList>|null */
        public ?array $transactionalGenericReference=null,
        /** @var array<ReferencedOrder>|null */
        public ?array $referencedOrder=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $billTo=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $buyer=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $pickupFrom=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $seller=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $ultimateConsignee=null,
        /** @var DocumentReference|null */
        public ?DocumentReference $contract=null,
        /** @var DocumentReference|null */
        public ?DocumentReference $quoteNumber=null,
        /** @var DocumentReference|null */
        public ?DocumentReference $promotionalDeal=null,
        /** @var DocumentReference|null */
        public ?DocumentReference $tradeAgreement=null,
        /** @var DateTime|null */
        public ?DateTime $deliveryDateAccordingToSchedule=null,
        /** @var DateTime|null */
        public ?DateTime $latestDeliveryDate=null,
        /** @var array<AllowanceCharge>|null */
        public ?array $allowanceCharge=null,
        /** @var array<OrderLineItem>|null */
        public ?array $orderLineItem=null
    ) {
        parent::__construct($currencyCode,$creationDateTime,$documentActionCode,$documentStatusCode,$documentStructureVersion,$lastUpdateDateTime,$revisionNumber,$avpList);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['documentEffectiveDate'])) $this->documentEffectiveDate = JsonConverters::from('DateTime', $o['documentEffectiveDate']);
        if (isset($o['additionalOrderInstruction'])) $this->additionalOrderInstruction = $o['additionalOrderInstruction'];
        if (isset($o['isApplicationReceiptAcknowledgementRequired'])) $this->isApplicationReceiptAcknowledgementRequired = $o['isApplicationReceiptAcknowledgementRequired'];
        if (isset($o['isOrderFreeOfExciseTaxDuty'])) $this->isOrderFreeOfExciseTaxDuty = $o['isOrderFreeOfExciseTaxDuty'];
        if (isset($o['note'])) $this->note = $o['note'];
        if (isset($o['orderEntryType'])) $this->orderEntryType = $o['orderEntryType'];
        if (isset($o['orderInstructionCode'])) $this->orderInstructionCode = $o['orderInstructionCode'];
        if (isset($o['orderPriority'])) $this->orderPriority = $o['orderPriority'];
        if (isset($o['orderTypeCode'])) $this->orderTypeCode = $o['orderTypeCode'];
        if (isset($o['totalMonetaryAmountExcludingTaxes'])) $this->totalMonetaryAmountExcludingTaxes = $o['totalMonetaryAmountExcludingTaxes'];
        if (isset($o['totalMonetaryAmountIncludingTaxes'])) $this->totalMonetaryAmountIncludingTaxes = $o['totalMonetaryAmountIncludingTaxes'];
        if (isset($o['totalTaxAmount'])) $this->totalTaxAmount = $o['totalTaxAmount'];
        if (isset($o['paymentTerms'])) $this->paymentTerms = $o['paymentTerms'];
        if (isset($o['orderIdentification'])) $this->orderIdentification = JsonConverters::from('Ecom_EntityIdentification', $o['orderIdentification']);
        if (isset($o['orderLogisticalInformation'])) $this->orderLogisticalInformation = JsonConverters::from('OrderLogisticalInformation', $o['orderLogisticalInformation']);
        if (isset($o['administrativeUnit'])) $this->administrativeUnit = JsonConverters::fromArray('AdministrativeUnit', $o['administrativeUnit']);
        if (isset($o['deliveryTerms'])) $this->deliveryTerms = JsonConverters::from('DeliveryTerms', $o['deliveryTerms']);
        if (isset($o['transactionalGenericReference'])) $this->transactionalGenericReference = JsonConverters::fromArray('AvpList', $o['transactionalGenericReference']);
        if (isset($o['referencedOrder'])) $this->referencedOrder = JsonConverters::fromArray('ReferencedOrder', $o['referencedOrder']);
        if (isset($o['billTo'])) $this->billTo = JsonConverters::from('TransactionalParty', $o['billTo']);
        if (isset($o['buyer'])) $this->buyer = JsonConverters::from('TransactionalParty', $o['buyer']);
        if (isset($o['pickupFrom'])) $this->pickupFrom = JsonConverters::from('TransactionalParty', $o['pickupFrom']);
        if (isset($o['seller'])) $this->seller = JsonConverters::from('TransactionalParty', $o['seller']);
        if (isset($o['ultimateConsignee'])) $this->ultimateConsignee = JsonConverters::from('TransactionalParty', $o['ultimateConsignee']);
        if (isset($o['contract'])) $this->contract = JsonConverters::from('DocumentReference', $o['contract']);
        if (isset($o['quoteNumber'])) $this->quoteNumber = JsonConverters::from('DocumentReference', $o['quoteNumber']);
        if (isset($o['promotionalDeal'])) $this->promotionalDeal = JsonConverters::from('DocumentReference', $o['promotionalDeal']);
        if (isset($o['tradeAgreement'])) $this->tradeAgreement = JsonConverters::from('DocumentReference', $o['tradeAgreement']);
        if (isset($o['deliveryDateAccordingToSchedule'])) $this->deliveryDateAccordingToSchedule = JsonConverters::from('DateTime', $o['deliveryDateAccordingToSchedule']);
        if (isset($o['latestDeliveryDate'])) $this->latestDeliveryDate = JsonConverters::from('DateTime', $o['latestDeliveryDate']);
        if (isset($o['allowanceCharge'])) $this->allowanceCharge = JsonConverters::fromArray('AllowanceCharge', $o['allowanceCharge']);
        if (isset($o['orderLineItem'])) $this->orderLineItem = JsonConverters::fromArray('OrderLineItem', $o['orderLineItem']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->documentEffectiveDate)) $o['documentEffectiveDate'] = JsonConverters::to('DateTime', $this->documentEffectiveDate);
        if (isset($this->additionalOrderInstruction)) $o['additionalOrderInstruction'] = $this->additionalOrderInstruction;
        if (isset($this->isApplicationReceiptAcknowledgementRequired)) $o['isApplicationReceiptAcknowledgementRequired'] = $this->isApplicationReceiptAcknowledgementRequired;
        if (isset($this->isOrderFreeOfExciseTaxDuty)) $o['isOrderFreeOfExciseTaxDuty'] = $this->isOrderFreeOfExciseTaxDuty;
        if (isset($this->note)) $o['note'] = $this->note;
        if (isset($this->orderEntryType)) $o['orderEntryType'] = $this->orderEntryType;
        if (isset($this->orderInstructionCode)) $o['orderInstructionCode'] = $this->orderInstructionCode;
        if (isset($this->orderPriority)) $o['orderPriority'] = $this->orderPriority;
        if (isset($this->orderTypeCode)) $o['orderTypeCode'] = $this->orderTypeCode;
        if (isset($this->totalMonetaryAmountExcludingTaxes)) $o['totalMonetaryAmountExcludingTaxes'] = $this->totalMonetaryAmountExcludingTaxes;
        if (isset($this->totalMonetaryAmountIncludingTaxes)) $o['totalMonetaryAmountIncludingTaxes'] = $this->totalMonetaryAmountIncludingTaxes;
        if (isset($this->totalTaxAmount)) $o['totalTaxAmount'] = $this->totalTaxAmount;
        if (isset($this->paymentTerms)) $o['paymentTerms'] = $this->paymentTerms;
        if (isset($this->orderIdentification)) $o['orderIdentification'] = JsonConverters::to('Ecom_EntityIdentification', $this->orderIdentification);
        if (isset($this->orderLogisticalInformation)) $o['orderLogisticalInformation'] = JsonConverters::to('OrderLogisticalInformation', $this->orderLogisticalInformation);
        if (isset($this->administrativeUnit)) $o['administrativeUnit'] = JsonConverters::toArray('AdministrativeUnit', $this->administrativeUnit);
        if (isset($this->deliveryTerms)) $o['deliveryTerms'] = JsonConverters::to('DeliveryTerms', $this->deliveryTerms);
        if (isset($this->transactionalGenericReference)) $o['transactionalGenericReference'] = JsonConverters::toArray('AvpList', $this->transactionalGenericReference);
        if (isset($this->referencedOrder)) $o['referencedOrder'] = JsonConverters::toArray('ReferencedOrder', $this->referencedOrder);
        if (isset($this->billTo)) $o['billTo'] = JsonConverters::to('TransactionalParty', $this->billTo);
        if (isset($this->buyer)) $o['buyer'] = JsonConverters::to('TransactionalParty', $this->buyer);
        if (isset($this->pickupFrom)) $o['pickupFrom'] = JsonConverters::to('TransactionalParty', $this->pickupFrom);
        if (isset($this->seller)) $o['seller'] = JsonConverters::to('TransactionalParty', $this->seller);
        if (isset($this->ultimateConsignee)) $o['ultimateConsignee'] = JsonConverters::to('TransactionalParty', $this->ultimateConsignee);
        if (isset($this->contract)) $o['contract'] = JsonConverters::to('DocumentReference', $this->contract);
        if (isset($this->quoteNumber)) $o['quoteNumber'] = JsonConverters::to('DocumentReference', $this->quoteNumber);
        if (isset($this->promotionalDeal)) $o['promotionalDeal'] = JsonConverters::to('DocumentReference', $this->promotionalDeal);
        if (isset($this->tradeAgreement)) $o['tradeAgreement'] = JsonConverters::to('DocumentReference', $this->tradeAgreement);
        if (isset($this->deliveryDateAccordingToSchedule)) $o['deliveryDateAccordingToSchedule'] = JsonConverters::to('DateTime', $this->deliveryDateAccordingToSchedule);
        if (isset($this->latestDeliveryDate)) $o['latestDeliveryDate'] = JsonConverters::to('DateTime', $this->latestDeliveryDate);
        if (isset($this->allowanceCharge)) $o['allowanceCharge'] = JsonConverters::toArray('AllowanceCharge', $this->allowanceCharge);
        if (isset($this->orderLineItem)) $o['orderLineItem'] = JsonConverters::toArray('OrderLineItem', $this->orderLineItem);
        return empty($o) ? new class(){} : $o;
    }
}

class OrderMessage implements JsonSerializable
{
    public function __construct(
        /** @var Header|null */
        public ?Header $header=null,
        /** @var Order|null */
        public ?Order $order=null
    ) {
    }

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

/** @description Order */
// @Api(Description="Order")
// @ApiResponse(Description="Add order request received", IsDefaultResponse=true, StatusCode=200)
// @ApiResponse(Description="Order not accepted, Confirm Sender GLN", ResponseType="typeof(System.UnauthorizedAccessException)", StatusCode=403)
class AddOrder implements JsonSerializable
{
    public function __construct(
        /** @description Order model containing all of the order data */
        // @ApiMember(DataType="OrderMessage", Description="Order model containing all of the order data", Name="order", ParameterType="model")
        /** @var OrderMessage|null */
        public ?OrderMessage $order=null
    ) {
    }

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

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

POST /api/order HTTP/1.1 
Host: stf-api-uat.data-xchange.co.za 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	order: 
	{
		header: 
		{
			documentIdentification: 
			{
				identifier: String,
				type: String
			},
			sender: 
			{
				identifier: 
				{
					authority: String,
					text: String
				},
				contactInformation: 
				[
					{
						
					}
				]
			},
			receiver: 
			{
				identifier: 
				{
					authority: String,
					text: String
				},
				contactInformation: 
				[
					{
						
					}
				]
			}
		},
		order: 
		{
			documentEffectiveDate: 0001-01-01,
			additionalOrderInstruction: String,
			isApplicationReceiptAcknowledgementRequired: False,
			isOrderFreeOfExciseTaxDuty: False,
			note: String,
			orderEntryType: String,
			orderInstructionCode: String,
			orderPriority: String,
			orderTypeCode: String,
			totalMonetaryAmountExcludingTaxes: 0,
			totalMonetaryAmountIncludingTaxes: 0,
			totalTaxAmount: 0,
			paymentTerms: String,
			orderIdentification: 
			{
				entityIdentification: String,
				contentOwner: 
				{
					additionalPartyIdentification: 
					[
						{
							code: String,
							value: String
						}
					],
					gln: String
				}
			},
			orderLogisticalInformation: 
			{
				commodityTypeCode: 
				{
					value: String,
					codeDescription: String,
					codeListAgencyCodeListVersion: String,
					codeListAgencyName: String,
					codeListName: String,
					codeListUri: String
				},
				orderLogisticalDateInformation: 
				{
					dateRangeDeliveryDateRange: 
					{
						beginDate: 0001-01-01,
						beginTime: 0001-01-01,
						endDate: 0001-01-01,
						endTime: 0001-01-01
					},
					dateRangeShipDateRange: 
					{
						beginDate: 0001-01-01,
						beginTime: 0001-01-01,
						endDate: 0001-01-01,
						endTime: 0001-01-01
					},
					dateRangeDeliveryDateRangeAtUltimateConsignee: 
					{
						beginDate: 0001-01-01,
						beginTime: 0001-01-01,
						endDate: 0001-01-01,
						endTime: 0001-01-01
					},
					requestedDeliveryDateTime: 0001-01-01,
					requestedShipDateTime: String,
					requestedPickUpDateTime: 0001-01-01,
					requestedDeliveryDateTimeAtUltimateConsignee: 0001-01-01
				},
				inventoryLocation: 
				{
					contact: 
					[
						{
							contactTypeCode: String,
							personName: String,
							departmentName: String,
							jobTitle: String,
							responsibility: String,
							communicationChannel: 
							[
								{
									communicationChannelCode: String,
									communicationChannelName: String,
									communicationValue: String
								}
							]
						}
					],
					address: 
					{
						streetAddressOne: String,
						streetAddressTwo: String,
						streetAddressThree: String,
						city: String,
						postalCode: String,
						provinceCode: String,
						countryCode: String
					},
					communicationChannel: 
					[
						{
							code: String,
							value: String
						}
					],
					financialInstitutionInformation: 
					{
						financialInstitutionBranchName: String,
						financialInstitutionName: String,
						financialRoutingNumber: 
						{
							number: String,
							numberTypeCode: String
						},
						financialAccount: 
						{
							number: String,
							numberTypeCode: String,
							name: String
						},
						swiftCode: String,
						exportersCode: String
					},
					dutyFeeTaxRegistration: String,
					entityIdentification: String,
					gln: String,
					name: String,
					additionalPartyIdentification: 
					[
						{
							code: String,
							value: String
						}
					]
				},
				shipFrom: 
				{
					contact: 
					[
						{
							contactTypeCode: String,
							personName: String,
							departmentName: String,
							jobTitle: String,
							responsibility: String,
							communicationChannel: 
							[
								{
									communicationChannelCode: String,
									communicationChannelName: String,
									communicationValue: String
								}
							]
						}
					],
					address: 
					{
						streetAddressOne: String,
						streetAddressTwo: String,
						streetAddressThree: String,
						city: String,
						postalCode: String,
						provinceCode: String,
						countryCode: String
					},
					communicationChannel: 
					[
						{
							code: String,
							value: String
						}
					],
					financialInstitutionInformation: 
					{
						financialInstitutionBranchName: String,
						financialInstitutionName: String,
						financialRoutingNumber: 
						{
							number: String,
							numberTypeCode: String
						},
						financialAccount: 
						{
							number: String,
							numberTypeCode: String,
							name: String
						},
						swiftCode: String,
						exportersCode: String
					},
					dutyFeeTaxRegistration: String,
					entityIdentification: String,
					gln: String,
					name: String,
					additionalPartyIdentification: 
					[
						{
							code: String,
							value: String
						}
					]
				},
				shipTo: 
				{
					contact: 
					[
						{
							contactTypeCode: String,
							personName: String,
							departmentName: String,
							jobTitle: String,
							responsibility: String,
							communicationChannel: 
							[
								{
									communicationChannelCode: String,
									communicationChannelName: String,
									communicationValue: String
								}
							]
						}
					],
					address: 
					{
						streetAddressOne: String,
						streetAddressTwo: String,
						streetAddressThree: String,
						city: String,
						postalCode: String,
						provinceCode: String,
						countryCode: String
					},
					communicationChannel: 
					[
						{
							code: String,
							value: String
						}
					],
					financialInstitutionInformation: 
					{
						financialInstitutionBranchName: String,
						financialInstitutionName: String,
						financialRoutingNumber: 
						{
							number: String,
							numberTypeCode: String
						},
						financialAccount: 
						{
							number: String,
							numberTypeCode: String,
							name: String
						},
						swiftCode: String,
						exportersCode: String
					},
					dutyFeeTaxRegistration: String,
					entityIdentification: String,
					gln: String,
					name: String,
					additionalPartyIdentification: 
					[
						{
							code: String,
							value: String
						}
					]
				},
				ultimateConsignee: 
				{
					contact: 
					[
						{
							contactTypeCode: String,
							personName: String,
							departmentName: String,
							jobTitle: String,
							responsibility: String,
							communicationChannel: 
							[
								{
									communicationChannelCode: String,
									communicationChannelName: String,
									communicationValue: String
								}
							]
						}
					],
					address: 
					{
						streetAddressOne: String,
						streetAddressTwo: String,
						streetAddressThree: String,
						city: String,
						postalCode: String,
						provinceCode: String,
						countryCode: String
					},
					communicationChannel: 
					[
						{
							code: String,
							value: String
						}
					],
					financialInstitutionInformation: 
					{
						financialInstitutionBranchName: String,
						financialInstitutionName: String,
						financialRoutingNumber: 
						{
							number: String,
							numberTypeCode: String
						},
						financialAccount: 
						{
							number: String,
							numberTypeCode: String,
							name: String
						},
						swiftCode: String,
						exportersCode: String
					},
					dutyFeeTaxRegistration: String,
					entityIdentification: String,
					gln: String,
					name: String,
					additionalPartyIdentification: 
					[
						{
							code: String,
							value: String
						}
					]
				},
				shipmentTransportationInformation: 
				{
					carrier: 
					{
						contact: 
						[
							{
								contactTypeCode: String,
								personName: String,
								departmentName: String,
								jobTitle: String,
								responsibility: String,
								communicationChannel: 
								[
									{
										communicationChannelCode: String,
										communicationChannelName: String,
										communicationValue: String
									}
								]
							}
						],
						address: 
						{
							streetAddressOne: String,
							streetAddressTwo: String,
							streetAddressThree: String,
							city: String,
							postalCode: String,
							provinceCode: String,
							countryCode: String
						},
						communicationChannel: 
						[
							{
								code: String,
								value: String
							}
						],
						financialInstitutionInformation: 
						{
							financialInstitutionBranchName: String,
							financialInstitutionName: String,
							financialRoutingNumber: 
							{
								number: String,
								numberTypeCode: String
							},
							financialAccount: 
							{
								number: String,
								numberTypeCode: String,
								name: String
							},
							swiftCode: String,
							exportersCode: String
						},
						dutyFeeTaxRegistration: String,
						entityIdentification: String,
						gln: String,
						name: String,
						additionalPartyIdentification: 
						[
							{
								code: String,
								value: String
							}
						]
					},
					freightForwarder: 
					{
						contact: 
						[
							{
								contactTypeCode: String,
								personName: String,
								departmentName: String,
								jobTitle: String,
								responsibility: String,
								communicationChannel: 
								[
									{
										communicationChannelCode: String,
										communicationChannelName: String,
										communicationValue: String
									}
								]
							}
						],
						address: 
						{
							streetAddressOne: String,
							streetAddressTwo: String,
							streetAddressThree: String,
							city: String,
							postalCode: String,
							provinceCode: String,
							countryCode: String
						},
						communicationChannel: 
						[
							{
								code: String,
								value: String
							}
						],
						financialInstitutionInformation: 
						{
							financialInstitutionBranchName: String,
							financialInstitutionName: String,
							financialRoutingNumber: 
							{
								number: String,
								numberTypeCode: String
							},
							financialAccount: 
							{
								number: String,
								numberTypeCode: String,
								name: String
							},
							swiftCode: String,
							exportersCode: String
						},
						dutyFeeTaxRegistration: String,
						entityIdentification: String,
						gln: String,
						name: String,
						additionalPartyIdentification: 
						[
							{
								code: String,
								value: String
							}
						]
					}
				}
			},
			administrativeUnit: 
			[
				{
					typeCode: String,
					gln: String,
					internalIdentification: String
				}
			],
			deliveryTerms: 
			{
				incotermsCode: String,
				alternateDeliveryTermsCode: String,
				deliveryInstructions: String,
				deliveryCostPayment: String,
				isSignatureRequired: String,
				deliveryTermsLocation: 
				{
					unLocationCode: String,
					gln: String,
					additionalLocationIdentification: 
					[
						{
							code: String,
							value: String
						}
					],
					sublocationIdentification: String,
					locationName: String,
					locationSpecificInstructions: String
				}
			},
			transactionalGenericReference: 
			[
				{
					code: String,
					value: String
				}
			],
			referencedOrder: 
			[
				{
					orderRelationship: String,
					documentReference: 
					{
						creationDateTime: 0001-01-01,
						revisionNumber: 0,
						lineItemNumber: 0,
						entityIdentification: String
					}
				}
			],
			billTo: 
			{
				contact: 
				[
					{
						contactTypeCode: String,
						personName: String,
						departmentName: String,
						jobTitle: String,
						responsibility: String,
						communicationChannel: 
						[
							{
								communicationChannelCode: String,
								communicationChannelName: String,
								communicationValue: String
							}
						]
					}
				],
				address: 
				{
					streetAddressOne: String,
					streetAddressTwo: String,
					streetAddressThree: String,
					city: String,
					postalCode: String,
					provinceCode: String,
					countryCode: String
				},
				communicationChannel: 
				[
					{
						code: String,
						value: String
					}
				],
				financialInstitutionInformation: 
				{
					financialInstitutionBranchName: String,
					financialInstitutionName: String,
					financialRoutingNumber: 
					{
						number: String,
						numberTypeCode: String
					},
					financialAccount: 
					{
						number: String,
						numberTypeCode: String,
						name: String
					},
					swiftCode: String,
					exportersCode: String
				},
				dutyFeeTaxRegistration: String,
				entityIdentification: String,
				gln: String,
				name: String,
				additionalPartyIdentification: 
				[
					{
						code: String,
						value: String
					}
				]
			},
			buyer: 
			{
				contact: 
				[
					{
						contactTypeCode: String,
						personName: String,
						departmentName: String,
						jobTitle: String,
						responsibility: String,
						communicationChannel: 
						[
							{
								communicationChannelCode: String,
								communicationChannelName: String,
								communicationValue: String
							}
						]
					}
				],
				address: 
				{
					streetAddressOne: String,
					streetAddressTwo: String,
					streetAddressThree: String,
					city: String,
					postalCode: String,
					provinceCode: String,
					countryCode: String
				},
				communicationChannel: 
				[
					{
						code: String,
						value: String
					}
				],
				financialInstitutionInformation: 
				{
					financialInstitutionBranchName: String,
					financialInstitutionName: String,
					financialRoutingNumber: 
					{
						number: String,
						numberTypeCode: String
					},
					financialAccount: 
					{
						number: String,
						numberTypeCode: String,
						name: String
					},
					swiftCode: String,
					exportersCode: String
				},
				dutyFeeTaxRegistration: String,
				entityIdentification: String,
				gln: String,
				name: String,
				additionalPartyIdentification: 
				[
					{
						code: String,
						value: String
					}
				]
			},
			pickupFrom: 
			{
				contact: 
				[
					{
						contactTypeCode: String,
						personName: String,
						departmentName: String,
						jobTitle: String,
						responsibility: String,
						communicationChannel: 
						[
							{
								communicationChannelCode: String,
								communicationChannelName: String,
								communicationValue: String
							}
						]
					}
				],
				address: 
				{
					streetAddressOne: String,
					streetAddressTwo: String,
					streetAddressThree: String,
					city: String,
					postalCode: String,
					provinceCode: String,
					countryCode: String
				},
				communicationChannel: 
				[
					{
						code: String,
						value: String
					}
				],
				financialInstitutionInformation: 
				{
					financialInstitutionBranchName: String,
					financialInstitutionName: String,
					financialRoutingNumber: 
					{
						number: String,
						numberTypeCode: String
					},
					financialAccount: 
					{
						number: String,
						numberTypeCode: String,
						name: String
					},
					swiftCode: String,
					exportersCode: String
				},
				dutyFeeTaxRegistration: String,
				entityIdentification: String,
				gln: String,
				name: String,
				additionalPartyIdentification: 
				[
					{
						code: String,
						value: String
					}
				]
			},
			seller: 
			{
				contact: 
				[
					{
						contactTypeCode: String,
						personName: String,
						departmentName: String,
						jobTitle: String,
						responsibility: String,
						communicationChannel: 
						[
							{
								communicationChannelCode: String,
								communicationChannelName: String,
								communicationValue: String
							}
						]
					}
				],
				address: 
				{
					streetAddressOne: String,
					streetAddressTwo: String,
					streetAddressThree: String,
					city: String,
					postalCode: String,
					provinceCode: String,
					countryCode: String
				},
				communicationChannel: 
				[
					{
						code: String,
						value: String
					}
				],
				financialInstitutionInformation: 
				{
					financialInstitutionBranchName: String,
					financialInstitutionName: String,
					financialRoutingNumber: 
					{
						number: String,
						numberTypeCode: String
					},
					financialAccount: 
					{
						number: String,
						numberTypeCode: String,
						name: String
					},
					swiftCode: String,
					exportersCode: String
				},
				dutyFeeTaxRegistration: String,
				entityIdentification: String,
				gln: String,
				name: String,
				additionalPartyIdentification: 
				[
					{
						code: String,
						value: String
					}
				]
			},
			ultimateConsignee: 
			{
				contact: 
				[
					{
						contactTypeCode: String,
						personName: String,
						departmentName: String,
						jobTitle: String,
						responsibility: String,
						communicationChannel: 
						[
							{
								communicationChannelCode: String,
								communicationChannelName: String,
								communicationValue: String
							}
						]
					}
				],
				address: 
				{
					streetAddressOne: String,
					streetAddressTwo: String,
					streetAddressThree: String,
					city: String,
					postalCode: String,
					provinceCode: String,
					countryCode: String
				},
				communicationChannel: 
				[
					{
						code: String,
						value: String
					}
				],
				financialInstitutionInformation: 
				{
					financialInstitutionBranchName: String,
					financialInstitutionName: String,
					financialRoutingNumber: 
					{
						number: String,
						numberTypeCode: String
					},
					financialAccount: 
					{
						number: String,
						numberTypeCode: String,
						name: String
					},
					swiftCode: String,
					exportersCode: String
				},
				dutyFeeTaxRegistration: String,
				entityIdentification: String,
				gln: String,
				name: String,
				additionalPartyIdentification: 
				[
					{
						code: String,
						value: String
					}
				]
			},
			contract: 
			{
				creationDateTime: 0001-01-01,
				revisionNumber: 0,
				lineItemNumber: 0,
				entityIdentification: String
			},
			quoteNumber: 
			{
				creationDateTime: 0001-01-01,
				revisionNumber: 0,
				lineItemNumber: 0,
				entityIdentification: String
			},
			promotionalDeal: 
			{
				creationDateTime: 0001-01-01,
				revisionNumber: 0,
				lineItemNumber: 0,
				entityIdentification: String
			},
			tradeAgreement: 
			{
				creationDateTime: 0001-01-01,
				revisionNumber: 0,
				lineItemNumber: 0,
				entityIdentification: String
			},
			deliveryDateAccordingToSchedule: 0001-01-01,
			latestDeliveryDate: 0001-01-01,
			allowanceCharge: 
			[
				{
					allowanceChargeAmount: 0,
					allowanceChargePercentage: 0,
					allowanceChargeType: String,
					allowanceOrChargeType: String,
					amountPerUnit: 0,
					baseAmount: 0,
					baseNumberOfUnits: String,
					bracketIdentifier: String,
					effectiveDateType: 0001-01-01,
					sequenceNumber: String,
					settlementType: String,
					specialServiceType: String,
					allowanceChargeDescription: String
				}
			],
			orderLineItem: 
			[
				{
					freeGoodsQuantity: 
					{
						value: 0,
						measurementUnitCode: String,
						codeListVersion: String
					},
					itemPriceBaseQuantity: 
					{
						value: 0,
						measurementUnitCode: String,
						codeListVersion: String
					},
					requestedQuantity: 
					{
						value: 0,
						measurementUnitCode: String,
						codeListVersion: String
					},
					lineItemActionCode: String,
					lineItemNumber: 0,
					listPrice: 0,
					monetaryAmountExcludingTaxes: 0,
					monetaryAmountIncludingTaxes: 0,
					netAmount: 0,
					netPrice: 0,
					note: String,
					orderLineItemInstructionCode: String,
					parentLineItemNumber: 0,
					recommendedRetailPrice: 0,
					orderLineItemPriority: String,
					additionalOrderLineInstruction: 
					[
						{
							code: String,
							value: String
						}
					],
					allowanceCharge: 
					[
						{
							allowanceChargeAmount: 0,
							allowanceChargePercentage: 0,
							allowanceChargeType: String,
							allowanceOrChargeType: String,
							amountPerUnit: 0,
							baseAmount: 0,
							baseNumberOfUnits: String,
							bracketIdentifier: String,
							effectiveDateType: 0001-01-01,
							sequenceNumber: String,
							settlementType: String,
							specialServiceType: String,
							allowanceChargeDescription: String
						}
					],
					administrativeUnit: 
					[
						{
							typeCode: String,
							gln: String,
							internalIdentification: String
						}
					],
					transactionalTradeItem: 
					{
						gtin: String,
						additionalTradeItemIdentification: 
						[
							{
								code: String,
								value: String
							}
						],
						tradeItemQuantity: 0,
						tradeItemDescription: String,
						productVariantIdentifier: String,
						itemTypeCode: String,
						tradeItemDataOwner: String,
						butterFatReference: String,
						transactionalItemData: 
						[
							{
								availableForSaleDate: 0001-01-01,
								batchNumber: String,
								bestBeforeDate: 0001-01-01,
								countryOfOrigin: String,
								itemExpirationDate: 0001-01-01,
								lotNumber: String,
								packagingDate: 0001-01-01,
								productionDate: 0001-01-01,
								productQualityIndication: String,
								sellByDate: 0001-01-01,
								serialNumber: 
								[
									String
								],
								shelfLife: String,
								tradeItemQuantity: 0,
								itemInContactWithFoodProduct: False,
								transactionalItemWeight: 
								[
									{
										measurementUnitCode: String,
										measurementType: String,
										measurementValue: String
									}
								],
								transactionalItemVolume: 
								[
									{
										measurementUnitCode: String,
										measurementType: String,
										measurementValue: String
									}
								],
								serialNumberRange: 
								[
									{
										maximumValue: String,
										minimumValue: String
									}
								],
								transactionalItemDimensions: 
								[
									{
										measurementUnitCode: String,
										depth: String,
										height: String,
										width: String
									}
								],
								transactionalItemLogisticUnitInformation: 
								{
									numberOfLayers: 0,
									numberOfUnitsPerLayer: 0,
									numberOfUnitsPerPallet: 0,
									packagingTerms: String,
									packageTypeCode: String,
									maximumStackingFactor: 0,
									returnablePackageTransportCostPayment: String,
									dimensionsOfLogisticUnit: 
									[
										{
											measurementUnitCode: String,
											depth: String,
											height: String,
											width: String
										}
									]
								},
								transactionalItemDataCarrierAndIdentification: 
								{
									gs1TransactionalItemIdentificationKey: String,
									dataCarrier: String
								},
								tradeItemWaste: 
								[
									{
										wasteIdentification: String,
										typeOfWaste: 
										[
											{
												code: String,
												value: String
											}
										]
									}
								],
								transactionalItemOrganicInformation: 
								{
									isTradeItemOrganic: False,
									organicCertification: String
								},
								avpList: 
								[
									{
										code: String,
										value: String
									}
								]
							}
						],
						colour: 
						[
							{
								colourCode: String,
								colourDescription: String
							}
						],
						size: 
						{
							descriptiveSize: String,
							sizeCode: String
						},
						tradeItemClassification: 
						{
							gpcCategoryCode: String,
							additionalTradeItemClassificationCode: 
							[
								{
									code: String,
									value: String
								}
							],
							gpcCategoryName: String,
							gpcAttribute: 
							[
								{
									code: String,
									value: String
								}
							]
						},
						avpList: 
						[
							{
								code: String,
								value: String
							}
						]
					},
					leviedDutyFeeTax: 
					{
						dutyFeeTaxAmount: 0,
						dutyFeeTaxBasisAmount: 0,
						dutyFeeTaxDescription: String,
						dutyFeeTaxPercentage: 0
					},
					contract: 
					{
						creationDateTime: 0001-01-01,
						revisionNumber: 0,
						lineItemNumber: 0,
						entityIdentification: String
					},
					promotionalDeal: 
					{
						creationDateTime: 0001-01-01,
						revisionNumber: 0,
						lineItemNumber: 0,
						entityIdentification: String
					},
					purchaseConditions: 
					{
						creationDateTime: 0001-01-01,
						revisionNumber: 0,
						lineItemNumber: 0,
						entityIdentification: String
					},
					avpList: 
					[
						{
							code: String,
							value: String
						}
					],
					orderLineItemDetail: 
					[
						{
							requestedQuantity: 
							{
								value: 0,
								measurementUnitCode: String,
								codeListVersion: String
							},
							orderLogisticalInformation: 
							{
								commodityTypeCode: 
								{
									value: String,
									codeDescription: String,
									codeListAgencyCodeListVersion: String,
									codeListAgencyName: String,
									codeListName: String,
									codeListUri: String
								},
								orderLogisticalDateInformation: 
								{
									dateRangeDeliveryDateRange: 
									{
										beginDate: 0001-01-01,
										beginTime: 0001-01-01,
										endDate: 0001-01-01,
										endTime: 0001-01-01
									},
									dateRangeShipDateRange: 
									{
										beginDate: 0001-01-01,
										beginTime: 0001-01-01,
										endDate: 0001-01-01,
										endTime: 0001-01-01
									},
									dateRangeDeliveryDateRangeAtUltimateConsignee: 
									{
										beginDate: 0001-01-01,
										beginTime: 0001-01-01,
										endDate: 0001-01-01,
										endTime: 0001-01-01
									},
									requestedDeliveryDateTime: 0001-01-01,
									requestedShipDateTime: String,
									requestedPickUpDateTime: 0001-01-01,
									requestedDeliveryDateTimeAtUltimateConsignee: 0001-01-01
								},
								inventoryLocation: 
								{
									contact: 
									[
										{
											contactTypeCode: String,
											personName: String,
											departmentName: String,
											jobTitle: String,
											responsibility: String,
											communicationChannel: 
											[
												{
													communicationChannelCode: String,
													communicationChannelName: String,
													communicationValue: String
												}
											]
										}
									],
									address: 
									{
										streetAddressOne: String,
										streetAddressTwo: String,
										streetAddressThree: String,
										city: String,
										postalCode: String,
										provinceCode: String,
										countryCode: String
									},
									communicationChannel: 
									[
										{
											code: String,
											value: String
										}
									],
									financialInstitutionInformation: 
									{
										financialInstitutionBranchName: String,
										financialInstitutionName: String,
										financialRoutingNumber: 
										{
											number: String,
											numberTypeCode: String
										},
										financialAccount: 
										{
											number: String,
											numberTypeCode: String,
											name: String
										},
										swiftCode: String,
										exportersCode: String
									},
									dutyFeeTaxRegistration: String,
									entityIdentification: String,
									gln: String,
									name: String,
									additionalPartyIdentification: 
									[
										{
											code: String,
											value: String
										}
									]
								},
								shipFrom: 
								{
									contact: 
									[
										{
											contactTypeCode: String,
											personName: String,
											departmentName: String,
											jobTitle: String,
											responsibility: String,
											communicationChannel: 
											[
												{
													communicationChannelCode: String,
													communicationChannelName: String,
													communicationValue: String
												}
											]
										}
									],
									address: 
									{
										streetAddressOne: String,
										streetAddressTwo: String,
										streetAddressThree: String,
										city: String,
										postalCode: String,
										provinceCode: String,
										countryCode: String
									},
									communicationChannel: 
									[
										{
											code: String,
											value: String
										}
									],
									financialInstitutionInformation: 
									{
										financialInstitutionBranchName: String,
										financialInstitutionName: String,
										financialRoutingNumber: 
										{
											number: String,
											numberTypeCode: String
										},
										financialAccount: 
										{
											number: String,
											numberTypeCode: String,
											name: String
										},
										swiftCode: String,
										exportersCode: String
									},
									dutyFeeTaxRegistration: String,
									entityIdentification: String,
									gln: String,
									name: String,
									additionalPartyIdentification: 
									[
										{
											code: String,
											value: String
										}
									]
								},
								shipTo: 
								{
									contact: 
									[
										{
											contactTypeCode: String,
											personName: String,
											departmentName: String,
											jobTitle: String,
											responsibility: String,
											communicationChannel: 
											[
												{
													communicationChannelCode: String,
													communicationChannelName: String,
													communicationValue: String
												}
											]
										}
									],
									address: 
									{
										streetAddressOne: String,
										streetAddressTwo: String,
										streetAddressThree: String,
										city: String,
										postalCode: String,
										provinceCode: String,
										countryCode: String
									},
									communicationChannel: 
									[
										{
											code: String,
											value: String
										}
									],
									financialInstitutionInformation: 
									{
										financialInstitutionBranchName: String,
										financialInstitutionName: String,
										financialRoutingNumber: 
										{
											number: String,
											numberTypeCode: String
										},
										financialAccount: 
										{
											number: String,
											numberTypeCode: String,
											name: String
										},
										swiftCode: String,
										exportersCode: String
									},
									dutyFeeTaxRegistration: String,
									entityIdentification: String,
									gln: String,
									name: String,
									additionalPartyIdentification: 
									[
										{
											code: String,
											value: String
										}
									]
								},
								ultimateConsignee: 
								{
									contact: 
									[
										{
											contactTypeCode: String,
											personName: String,
											departmentName: String,
											jobTitle: String,
											responsibility: String,
											communicationChannel: 
											[
												{
													communicationChannelCode: String,
													communicationChannelName: String,
													communicationValue: String
												}
											]
										}
									],
									address: 
									{
										streetAddressOne: String,
										streetAddressTwo: String,
										streetAddressThree: String,
										city: String,
										postalCode: String,
										provinceCode: String,
										countryCode: String
									},
									communicationChannel: 
									[
										{
											code: String,
											value: String
										}
									],
									financialInstitutionInformation: 
									{
										financialInstitutionBranchName: String,
										financialInstitutionName: String,
										financialRoutingNumber: 
										{
											number: String,
											numberTypeCode: String
										},
										financialAccount: 
										{
											number: String,
											numberTypeCode: String,
											name: String
										},
										swiftCode: String,
										exportersCode: String
									},
									dutyFeeTaxRegistration: String,
									entityIdentification: String,
									gln: String,
									name: String,
									additionalPartyIdentification: 
									[
										{
											code: String,
											value: String
										}
									]
								},
								shipmentTransportationInformation: 
								{
									carrier: 
									{
										contact: 
										[
											{
												contactTypeCode: String,
												personName: String,
												departmentName: String,
												jobTitle: String,
												responsibility: String,
												communicationChannel: 
												[
													{
														communicationChannelCode: String,
														communicationChannelName: String,
														communicationValue: String
													}
												]
											}
										],
										address: 
										{
											streetAddressOne: String,
											streetAddressTwo: String,
											streetAddressThree: String,
											city: String,
											postalCode: String,
											provinceCode: String,
											countryCode: String
										},
										communicationChannel: 
										[
											{
												code: String,
												value: String
											}
										],
										financialInstitutionInformation: 
										{
											financialInstitutionBranchName: String,
											financialInstitutionName: String,
											financialRoutingNumber: 
											{
												number: String,
												numberTypeCode: String
											},
											financialAccount: 
											{
												number: String,
												numberTypeCode: String,
												name: String
											},
											swiftCode: String,
											exportersCode: String
										},
										dutyFeeTaxRegistration: String,
										entityIdentification: String,
										gln: String,
										name: String,
										additionalPartyIdentification: 
										[
											{
												code: String,
												value: String
											}
										]
									},
									freightForwarder: 
									{
										contact: 
										[
											{
												contactTypeCode: String,
												personName: String,
												departmentName: String,
												jobTitle: String,
												responsibility: String,
												communicationChannel: 
												[
													{
														communicationChannelCode: String,
														communicationChannelName: String,
														communicationValue: String
													}
												]
											}
										],
										address: 
										{
											streetAddressOne: String,
											streetAddressTwo: String,
											streetAddressThree: String,
											city: String,
											postalCode: String,
											provinceCode: String,
											countryCode: String
										},
										communicationChannel: 
										[
											{
												code: String,
												value: String
											}
										],
										financialInstitutionInformation: 
										{
											financialInstitutionBranchName: String,
											financialInstitutionName: String,
											financialRoutingNumber: 
											{
												number: String,
												numberTypeCode: String
											},
											financialAccount: 
											{
												number: String,
												numberTypeCode: String,
												name: String
											},
											swiftCode: String,
											exportersCode: String
										},
										dutyFeeTaxRegistration: String,
										entityIdentification: String,
										gln: String,
										name: String,
										additionalPartyIdentification: 
										[
											{
												code: String,
												value: String
											}
										]
									}
								}
							},
							avpList: 
							[
								{
									code: String,
									value: String
								}
							]
						}
					]
				}
			],
			currencyCode: String,
			documentActionCode: ADD,
			documentStatusCode: ADDITIONAL_TRANSMISSION,
			documentStructureVersion: String,
			lastUpdateDateTime: 0001-01-01,
			revisionNumber: 0,
			avpList: 
			[
				{
					code: String,
					value: String
				}
			]
		}
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	
}