DX STF Client API

<back to all web services

GetCustomerMasterByIdentification

Customer Master Requests

Customer Master

Requires Authentication
The following routes are available for this service:
GET/api/customerMaster/{OwnerGln}/{CustomerMasterIdentification}Get specific customer by customerMasterIdentification Id
<?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 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 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 CustomerMasterAddress extends Address implements JsonSerializable
{
    /**
     * @param string $streetAddressOne
     * @param string $streetAddressTwo
     * @param string $streetAddressThree
     * @param string $city
     * @param string $postalCode
     * @param string $provinceCode
     * @param string $countryCode
     */
    public function __construct(
        string $streetAddressOne='',
        string $streetAddressTwo='',
        string $streetAddressThree='',
        string $city='',
        string $postalCode='',
        string $provinceCode='',
        string $countryCode='',
        /** @var string */
        public string $addressType=''
    ) {
        parent::__construct($streetAddressOne,$streetAddressTwo,$streetAddressThree,$city,$postalCode,$provinceCode,$countryCode);
    }

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

class CustomerRecord implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $gln='',
        /** @var string */
        public string $code='',
        /** @var string */
        public string $name='',
        /** @var string */
        public string $buyerAssignedVendorNo='',
        /** @var string */
        public string $supplierAssignedVendorNo='',
        /** @var string */
        public string $dutyFeeTaxRegistration='',
        /** @var string */
        public string $entityIdentification='',
        /** @var array<Contact>|null */
        public ?array $contact=null,
        /** @var CustomerMasterAddress|null */
        public ?CustomerMasterAddress $address=null,
        /** @var array<AvpList>|null */
        public ?array $avpList=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['gln'])) $this->gln = $o['gln'];
        if (isset($o['code'])) $this->code = $o['code'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['buyerAssignedVendorNo'])) $this->buyerAssignedVendorNo = $o['buyerAssignedVendorNo'];
        if (isset($o['supplierAssignedVendorNo'])) $this->supplierAssignedVendorNo = $o['supplierAssignedVendorNo'];
        if (isset($o['dutyFeeTaxRegistration'])) $this->dutyFeeTaxRegistration = $o['dutyFeeTaxRegistration'];
        if (isset($o['entityIdentification'])) $this->entityIdentification = $o['entityIdentification'];
        if (isset($o['contact'])) $this->contact = JsonConverters::fromArray('Contact', $o['contact']);
        if (isset($o['address'])) $this->address = JsonConverters::from('CustomerMasterAddress', $o['address']);
        if (isset($o['avpList'])) $this->avpList = JsonConverters::fromArray('AvpList', $o['avpList']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->gln)) $o['gln'] = $this->gln;
        if (isset($this->code)) $o['code'] = $this->code;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->buyerAssignedVendorNo)) $o['buyerAssignedVendorNo'] = $this->buyerAssignedVendorNo;
        if (isset($this->supplierAssignedVendorNo)) $o['supplierAssignedVendorNo'] = $this->supplierAssignedVendorNo;
        if (isset($this->dutyFeeTaxRegistration)) $o['dutyFeeTaxRegistration'] = $this->dutyFeeTaxRegistration;
        if (isset($this->entityIdentification)) $o['entityIdentification'] = $this->entityIdentification;
        if (isset($this->contact)) $o['contact'] = JsonConverters::toArray('Contact', $this->contact);
        if (isset($this->address)) $o['address'] = JsonConverters::to('CustomerMasterAddress', $this->address);
        if (isset($this->avpList)) $o['avpList'] = JsonConverters::toArray('AvpList', $this->avpList);
        return empty($o) ? new class(){} : $o;
    }
}

class CreditLimit implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $limit=0.0,
        /** @var float */
        public float $balance=0.0,
        /** @var float */
        public float $available=0.0,
        /** @var DateTime|null */
        public ?DateTime $effectiveDateTime=null
    ) {
    }

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

class CustomerMasterType extends CustomerRecord implements JsonSerializable
{
    /**
     * @param string $gln
     * @param string $code
     * @param string $name
     * @param string $buyerAssignedVendorNo
     * @param string $supplierAssignedVendorNo
     * @param string $dutyFeeTaxRegistration
     * @param string $entityIdentification
     * @param array<Contact>|null $contact
     * @param CustomerMasterAddress|null $address
     * @param array<AvpList>|null $avpList
     */
    public function __construct(
        string $gln='',
        string $code='',
        string $name='',
        string $buyerAssignedVendorNo='',
        string $supplierAssignedVendorNo='',
        string $dutyFeeTaxRegistration='',
        string $entityIdentification='',
        ?array $contact=null,
        ?CustomerMasterAddress $address=null,
        ?array $avpList=null,
        /** @var CustomerRecord|null */
        public ?CustomerRecord $payByCustomer=null,
        /** @var CustomerRecord|null */
        public ?CustomerRecord $billToCustomer=null,
        /** @var string */
        public string $routingCode='',
        /** @var string */
        public string $storeType='',
        /** @var string */
        public string $currencyCode='',
        /** @var string */
        public string $type='',
        /** @var string */
        public string $group='',
        /** @var string */
        public string $region='',
        /** @var string */
        public string $zoneRate='',
        /** @var string */
        public string $taxRule='',
        /** @var string */
        public string $paymentTerm='',
        /** @var string */
        public string $shipmentSite='',
        /** @var string */
        public string $shipmentSiteName='',
        /** @var string */
        public string $shipmentSiteGln='',
        /** @var string */
        public string $accountingCode='',
        /** @var string */
        public string $commercialRepresentative='',
        /** @var string */
        public string $commercialTerritory='',
        /** @var CreditLimit|null */
        public ?CreditLimit $credit=null,
        /** @var array<string>|null */
        public ?array $nod=null,
        /** @var array<string>|null */
        public ?array $ndd=null
    ) {
        parent::__construct($gln,$code,$name,$buyerAssignedVendorNo,$supplierAssignedVendorNo,$dutyFeeTaxRegistration,$entityIdentification,$contact,$address,$avpList);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['payByCustomer'])) $this->payByCustomer = JsonConverters::from('CustomerRecord', $o['payByCustomer']);
        if (isset($o['billToCustomer'])) $this->billToCustomer = JsonConverters::from('CustomerRecord', $o['billToCustomer']);
        if (isset($o['routingCode'])) $this->routingCode = $o['routingCode'];
        if (isset($o['storeType'])) $this->storeType = $o['storeType'];
        if (isset($o['currencyCode'])) $this->currencyCode = $o['currencyCode'];
        if (isset($o['type'])) $this->type = $o['type'];
        if (isset($o['group'])) $this->group = $o['group'];
        if (isset($o['region'])) $this->region = $o['region'];
        if (isset($o['zoneRate'])) $this->zoneRate = $o['zoneRate'];
        if (isset($o['taxRule'])) $this->taxRule = $o['taxRule'];
        if (isset($o['paymentTerm'])) $this->paymentTerm = $o['paymentTerm'];
        if (isset($o['shipmentSite'])) $this->shipmentSite = $o['shipmentSite'];
        if (isset($o['shipmentSiteName'])) $this->shipmentSiteName = $o['shipmentSiteName'];
        if (isset($o['shipmentSiteGln'])) $this->shipmentSiteGln = $o['shipmentSiteGln'];
        if (isset($o['accountingCode'])) $this->accountingCode = $o['accountingCode'];
        if (isset($o['commercialRepresentative'])) $this->commercialRepresentative = $o['commercialRepresentative'];
        if (isset($o['commercialTerritory'])) $this->commercialTerritory = $o['commercialTerritory'];
        if (isset($o['credit'])) $this->credit = JsonConverters::from('CreditLimit', $o['credit']);
        if (isset($o['nod'])) $this->nod = JsonConverters::fromArray('string', $o['nod']);
        if (isset($o['ndd'])) $this->ndd = JsonConverters::fromArray('string', $o['ndd']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->payByCustomer)) $o['payByCustomer'] = JsonConverters::to('CustomerRecord', $this->payByCustomer);
        if (isset($this->billToCustomer)) $o['billToCustomer'] = JsonConverters::to('CustomerRecord', $this->billToCustomer);
        if (isset($this->routingCode)) $o['routingCode'] = $this->routingCode;
        if (isset($this->storeType)) $o['storeType'] = $this->storeType;
        if (isset($this->currencyCode)) $o['currencyCode'] = $this->currencyCode;
        if (isset($this->type)) $o['type'] = $this->type;
        if (isset($this->group)) $o['group'] = $this->group;
        if (isset($this->region)) $o['region'] = $this->region;
        if (isset($this->zoneRate)) $o['zoneRate'] = $this->zoneRate;
        if (isset($this->taxRule)) $o['taxRule'] = $this->taxRule;
        if (isset($this->paymentTerm)) $o['paymentTerm'] = $this->paymentTerm;
        if (isset($this->shipmentSite)) $o['shipmentSite'] = $this->shipmentSite;
        if (isset($this->shipmentSiteName)) $o['shipmentSiteName'] = $this->shipmentSiteName;
        if (isset($this->shipmentSiteGln)) $o['shipmentSiteGln'] = $this->shipmentSiteGln;
        if (isset($this->accountingCode)) $o['accountingCode'] = $this->accountingCode;
        if (isset($this->commercialRepresentative)) $o['commercialRepresentative'] = $this->commercialRepresentative;
        if (isset($this->commercialTerritory)) $o['commercialTerritory'] = $this->commercialTerritory;
        if (isset($this->credit)) $o['credit'] = JsonConverters::to('CreditLimit', $this->credit);
        if (isset($this->nod)) $o['nod'] = JsonConverters::toArray('string', $this->nod);
        if (isset($this->ndd)) $o['ndd'] = JsonConverters::toArray('string', $this->ndd);
        return empty($o) ? new class(){} : $o;
    }
}

class CustomerMasterMessage implements JsonSerializable
{
    public function __construct(
        /** @var TransactionalParty|null */
        public ?TransactionalParty $dataSource=null,
        /** @var TransactionalParty|null */
        public ?TransactionalParty $dataRecipient=null,
        /** @var string */
        public string $customerMasterIdentification='',
        /** @var array<CustomerMasterType>|null */
        public ?array $customer=null,
        /** @var string */
        public string $documentStatusCode='',
        /** @var string */
        public string $documentActionCode='',
        /** @var DateTime */
        public DateTime $creationDateTime=new DateTime(),
        /** @var DateTime */
        public DateTime $lastUpdateDateTime=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['dataSource'])) $this->dataSource = JsonConverters::from('TransactionalParty', $o['dataSource']);
        if (isset($o['dataRecipient'])) $this->dataRecipient = JsonConverters::from('TransactionalParty', $o['dataRecipient']);
        if (isset($o['customerMasterIdentification'])) $this->customerMasterIdentification = $o['customerMasterIdentification'];
        if (isset($o['customer'])) $this->customer = JsonConverters::fromArray('CustomerMasterType', $o['customer']);
        if (isset($o['documentStatusCode'])) $this->documentStatusCode = $o['documentStatusCode'];
        if (isset($o['documentActionCode'])) $this->documentActionCode = $o['documentActionCode'];
        if (isset($o['creationDateTime'])) $this->creationDateTime = JsonConverters::from('DateTime', $o['creationDateTime']);
        if (isset($o['lastUpdateDateTime'])) $this->lastUpdateDateTime = JsonConverters::from('DateTime', $o['lastUpdateDateTime']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->dataSource)) $o['dataSource'] = JsonConverters::to('TransactionalParty', $this->dataSource);
        if (isset($this->dataRecipient)) $o['dataRecipient'] = JsonConverters::to('TransactionalParty', $this->dataRecipient);
        if (isset($this->customerMasterIdentification)) $o['customerMasterIdentification'] = $this->customerMasterIdentification;
        if (isset($this->customer)) $o['customer'] = JsonConverters::toArray('CustomerMasterType', $this->customer);
        if (isset($this->documentStatusCode)) $o['documentStatusCode'] = $this->documentStatusCode;
        if (isset($this->documentActionCode)) $o['documentActionCode'] = $this->documentActionCode;
        if (isset($this->creationDateTime)) $o['creationDateTime'] = JsonConverters::to('DateTime', $this->creationDateTime);
        if (isset($this->lastUpdateDateTime)) $o['lastUpdateDateTime'] = JsonConverters::to('DateTime', $this->lastUpdateDateTime);
        return empty($o) ? new class(){} : $o;
    }
}

/** @description Customer Master */
// @Api(Description="Customer Master")
// @ApiResponse(Description="Customer Master data", IsDefaultResponse=true, StatusCode=200)
// @ApiResponse(Description="No Content", ResponseType="typeof(ServiceStack.IReturnVoid)", StatusCode=204)
// @ApiResponse(Description="Specified argument was out of the range of valid values.", ResponseType="typeof(System.ArgumentOutOfRangeException)", StatusCode=400)
class GetCustomerMasterByIdentification implements JsonSerializable
{
    public function __construct(
        /** @description Owner GLN */
        // @ApiMember(Description="Owner GLN", ExcludeInSchema=true, ParameterType="path")
        /** @var string */
        public string $ownerGln='',

        /** @description Customer Master Identification */
        // @ApiMember(Description="Customer Master Identification", ExcludeInSchema=true, ParameterType="path")
        /** @var string */
        public string $customerMasterIdentification=''
    ) {
    }

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

PHP GetCustomerMasterByIdentification DTOs

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

HTTP + XML

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

GET /api/customerMaster/{OwnerGln}/{CustomerMasterIdentification} HTTP/1.1 
Host: stf-api-uat.data-xchange.co.za 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CustomerMasterMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.MasterData">
  <CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
  <Customer>
    <CustomerMasterType>
      <Address>
        <City xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</City>
        <CountryCode xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</CountryCode>
        <PostalCode xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</PostalCode>
        <ProvinceCode xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</ProvinceCode>
        <StreetAddressOne xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</StreetAddressOne>
        <StreetAddressThree xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</StreetAddressThree>
        <StreetAddressTwo xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</StreetAddressTwo>
        <AddressType>String</AddressType>
      </Address>
      <AvpList xmlns:d4p1="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
        <d4p1:AvpList>
          <d4p1:Code>String</d4p1:Code>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:AvpList>
      </AvpList>
      <BuyerAssignedVendorNo>String</BuyerAssignedVendorNo>
      <Code>String</Code>
      <Contact xmlns:d4p1="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
        <d4p1:Contact>
          <d4p1:CommunicationChannel>
            <d4p1:CommunicationChannel>
              <d4p1:CommunicationChannelCode>String</d4p1:CommunicationChannelCode>
              <d4p1:CommunicationChannelName>String</d4p1:CommunicationChannelName>
              <d4p1:CommunicationValue>String</d4p1:CommunicationValue>
            </d4p1:CommunicationChannel>
          </d4p1:CommunicationChannel>
          <d4p1:ContactTypeCode>String</d4p1:ContactTypeCode>
          <d4p1:DepartmentName>String</d4p1:DepartmentName>
          <d4p1:JobTitle>String</d4p1:JobTitle>
          <d4p1:PersonName>String</d4p1:PersonName>
          <d4p1:Responsibility>String</d4p1:Responsibility>
        </d4p1:Contact>
      </Contact>
      <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
      <EntityIdentification>String</EntityIdentification>
      <Gln>String</Gln>
      <Name>String</Name>
      <SupplierAssignedVendorNo>String</SupplierAssignedVendorNo>
      <AccountingCode>String</AccountingCode>
      <BillToCustomer>
        <Address>
          <City xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</City>
          <CountryCode xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</CountryCode>
          <PostalCode xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</PostalCode>
          <ProvinceCode xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</ProvinceCode>
          <StreetAddressOne xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</StreetAddressOne>
          <StreetAddressThree xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</StreetAddressThree>
          <StreetAddressTwo xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</StreetAddressTwo>
          <AddressType>String</AddressType>
        </Address>
        <AvpList xmlns:d5p1="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
          <d5p1:AvpList>
            <d5p1:Code>String</d5p1:Code>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:AvpList>
        </AvpList>
        <BuyerAssignedVendorNo>String</BuyerAssignedVendorNo>
        <Code>String</Code>
        <Contact xmlns:d5p1="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
          <d5p1:Contact>
            <d5p1:CommunicationChannel>
              <d5p1:CommunicationChannel>
                <d5p1:CommunicationChannelCode>String</d5p1:CommunicationChannelCode>
                <d5p1:CommunicationChannelName>String</d5p1:CommunicationChannelName>
                <d5p1:CommunicationValue>String</d5p1:CommunicationValue>
              </d5p1:CommunicationChannel>
            </d5p1:CommunicationChannel>
            <d5p1:ContactTypeCode>String</d5p1:ContactTypeCode>
            <d5p1:DepartmentName>String</d5p1:DepartmentName>
            <d5p1:JobTitle>String</d5p1:JobTitle>
            <d5p1:PersonName>String</d5p1:PersonName>
            <d5p1:Responsibility>String</d5p1:Responsibility>
          </d5p1:Contact>
        </Contact>
        <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
        <EntityIdentification>String</EntityIdentification>
        <Gln>String</Gln>
        <Name>String</Name>
        <SupplierAssignedVendorNo>String</SupplierAssignedVendorNo>
      </BillToCustomer>
      <CommercialRepresentative>String</CommercialRepresentative>
      <CommercialTerritory>String</CommercialTerritory>
      <Credit>
        <Available>0</Available>
        <Balance>0</Balance>
        <EffectiveDateTime>0001-01-01T00:00:00</EffectiveDateTime>
        <Limit>0</Limit>
      </Credit>
      <CurrencyCode>String</CurrencyCode>
      <Group>String</Group>
      <NDD xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </NDD>
      <NOD xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </NOD>
      <PayByCustomer>
        <Address>
          <City xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</City>
          <CountryCode xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</CountryCode>
          <PostalCode xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</PostalCode>
          <ProvinceCode xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</ProvinceCode>
          <StreetAddressOne xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</StreetAddressOne>
          <StreetAddressThree xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</StreetAddressThree>
          <StreetAddressTwo xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">String</StreetAddressTwo>
          <AddressType>String</AddressType>
        </Address>
        <AvpList xmlns:d5p1="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
          <d5p1:AvpList>
            <d5p1:Code>String</d5p1:Code>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:AvpList>
        </AvpList>
        <BuyerAssignedVendorNo>String</BuyerAssignedVendorNo>
        <Code>String</Code>
        <Contact xmlns:d5p1="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
          <d5p1:Contact>
            <d5p1:CommunicationChannel>
              <d5p1:CommunicationChannel>
                <d5p1:CommunicationChannelCode>String</d5p1:CommunicationChannelCode>
                <d5p1:CommunicationChannelName>String</d5p1:CommunicationChannelName>
                <d5p1:CommunicationValue>String</d5p1:CommunicationValue>
              </d5p1:CommunicationChannel>
            </d5p1:CommunicationChannel>
            <d5p1:ContactTypeCode>String</d5p1:ContactTypeCode>
            <d5p1:DepartmentName>String</d5p1:DepartmentName>
            <d5p1:JobTitle>String</d5p1:JobTitle>
            <d5p1:PersonName>String</d5p1:PersonName>
            <d5p1:Responsibility>String</d5p1:Responsibility>
          </d5p1:Contact>
        </Contact>
        <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
        <EntityIdentification>String</EntityIdentification>
        <Gln>String</Gln>
        <Name>String</Name>
        <SupplierAssignedVendorNo>String</SupplierAssignedVendorNo>
      </PayByCustomer>
      <PaymentTerm>String</PaymentTerm>
      <Region>String</Region>
      <RoutingCode>String</RoutingCode>
      <ShipmentSite>String</ShipmentSite>
      <ShipmentSiteGln>String</ShipmentSiteGln>
      <ShipmentSiteName>String</ShipmentSiteName>
      <StoreType>String</StoreType>
      <TaxRule>String</TaxRule>
      <Type>String</Type>
      <ZoneRate>String</ZoneRate>
    </CustomerMasterType>
  </Customer>
  <CustomerMasterIdentification>String</CustomerMasterIdentification>
  <DataRecipient xmlns:d2p1="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
    <d2p1:AdditionalPartyIdentification>
      <d2p1:AvpList>
        <d2p1:Code>String</d2p1:Code>
        <d2p1:Value>String</d2p1:Value>
      </d2p1:AvpList>
    </d2p1:AdditionalPartyIdentification>
    <d2p1:Gln>String</d2p1:Gln>
    <d2p1:Name>String</d2p1:Name>
    <d2p1:Address>
      <d2p1:City>String</d2p1:City>
      <d2p1:CountryCode>String</d2p1:CountryCode>
      <d2p1:PostalCode>String</d2p1:PostalCode>
      <d2p1:ProvinceCode>String</d2p1:ProvinceCode>
      <d2p1:StreetAddressOne>String</d2p1:StreetAddressOne>
      <d2p1:StreetAddressThree>String</d2p1:StreetAddressThree>
      <d2p1:StreetAddressTwo>String</d2p1:StreetAddressTwo>
    </d2p1:Address>
    <d2p1:CommunicationChannel>
      <d2p1:AvpList>
        <d2p1:Code>String</d2p1:Code>
        <d2p1:Value>String</d2p1:Value>
      </d2p1:AvpList>
    </d2p1:CommunicationChannel>
    <d2p1:Contact>
      <d2p1:Contact>
        <d2p1:CommunicationChannel>
          <d2p1:CommunicationChannel>
            <d2p1:CommunicationChannelCode>String</d2p1:CommunicationChannelCode>
            <d2p1:CommunicationChannelName>String</d2p1:CommunicationChannelName>
            <d2p1:CommunicationValue>String</d2p1:CommunicationValue>
          </d2p1:CommunicationChannel>
        </d2p1:CommunicationChannel>
        <d2p1:ContactTypeCode>String</d2p1:ContactTypeCode>
        <d2p1:DepartmentName>String</d2p1:DepartmentName>
        <d2p1:JobTitle>String</d2p1:JobTitle>
        <d2p1:PersonName>String</d2p1:PersonName>
        <d2p1:Responsibility>String</d2p1:Responsibility>
      </d2p1:Contact>
    </d2p1:Contact>
    <d2p1:DutyFeeTaxRegistration>String</d2p1:DutyFeeTaxRegistration>
    <d2p1:EntityIdentification>String</d2p1:EntityIdentification>
    <d2p1:FinancialInstitutionInformation>
      <d2p1:ExportersCode>String</d2p1:ExportersCode>
      <d2p1:FinancialAccount>
        <d2p1:Name>String</d2p1:Name>
        <d2p1:Number>String</d2p1:Number>
        <d2p1:NumberTypeCode>String</d2p1:NumberTypeCode>
      </d2p1:FinancialAccount>
      <d2p1:FinancialInstitutionBranchName>String</d2p1:FinancialInstitutionBranchName>
      <d2p1:FinancialInstitutionName>String</d2p1:FinancialInstitutionName>
      <d2p1:FinancialRoutingNumber>
        <d2p1:Number>String</d2p1:Number>
        <d2p1:NumberTypeCode>String</d2p1:NumberTypeCode>
      </d2p1:FinancialRoutingNumber>
      <d2p1:SwiftCode>String</d2p1:SwiftCode>
    </d2p1:FinancialInstitutionInformation>
  </DataRecipient>
  <DataSource xmlns:d2p1="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
    <d2p1:AdditionalPartyIdentification>
      <d2p1:AvpList>
        <d2p1:Code>String</d2p1:Code>
        <d2p1:Value>String</d2p1:Value>
      </d2p1:AvpList>
    </d2p1:AdditionalPartyIdentification>
    <d2p1:Gln>String</d2p1:Gln>
    <d2p1:Name>String</d2p1:Name>
    <d2p1:Address>
      <d2p1:City>String</d2p1:City>
      <d2p1:CountryCode>String</d2p1:CountryCode>
      <d2p1:PostalCode>String</d2p1:PostalCode>
      <d2p1:ProvinceCode>String</d2p1:ProvinceCode>
      <d2p1:StreetAddressOne>String</d2p1:StreetAddressOne>
      <d2p1:StreetAddressThree>String</d2p1:StreetAddressThree>
      <d2p1:StreetAddressTwo>String</d2p1:StreetAddressTwo>
    </d2p1:Address>
    <d2p1:CommunicationChannel>
      <d2p1:AvpList>
        <d2p1:Code>String</d2p1:Code>
        <d2p1:Value>String</d2p1:Value>
      </d2p1:AvpList>
    </d2p1:CommunicationChannel>
    <d2p1:Contact>
      <d2p1:Contact>
        <d2p1:CommunicationChannel>
          <d2p1:CommunicationChannel>
            <d2p1:CommunicationChannelCode>String</d2p1:CommunicationChannelCode>
            <d2p1:CommunicationChannelName>String</d2p1:CommunicationChannelName>
            <d2p1:CommunicationValue>String</d2p1:CommunicationValue>
          </d2p1:CommunicationChannel>
        </d2p1:CommunicationChannel>
        <d2p1:ContactTypeCode>String</d2p1:ContactTypeCode>
        <d2p1:DepartmentName>String</d2p1:DepartmentName>
        <d2p1:JobTitle>String</d2p1:JobTitle>
        <d2p1:PersonName>String</d2p1:PersonName>
        <d2p1:Responsibility>String</d2p1:Responsibility>
      </d2p1:Contact>
    </d2p1:Contact>
    <d2p1:DutyFeeTaxRegistration>String</d2p1:DutyFeeTaxRegistration>
    <d2p1:EntityIdentification>String</d2p1:EntityIdentification>
    <d2p1:FinancialInstitutionInformation>
      <d2p1:ExportersCode>String</d2p1:ExportersCode>
      <d2p1:FinancialAccount>
        <d2p1:Name>String</d2p1:Name>
        <d2p1:Number>String</d2p1:Number>
        <d2p1:NumberTypeCode>String</d2p1:NumberTypeCode>
      </d2p1:FinancialAccount>
      <d2p1:FinancialInstitutionBranchName>String</d2p1:FinancialInstitutionBranchName>
      <d2p1:FinancialInstitutionName>String</d2p1:FinancialInstitutionName>
      <d2p1:FinancialRoutingNumber>
        <d2p1:Number>String</d2p1:Number>
        <d2p1:NumberTypeCode>String</d2p1:NumberTypeCode>
      </d2p1:FinancialRoutingNumber>
      <d2p1:SwiftCode>String</d2p1:SwiftCode>
    </d2p1:FinancialInstitutionInformation>
  </DataSource>
  <DocumentActionCode>String</DocumentActionCode>
  <DocumentStatusCode>String</DocumentStatusCode>
  <LastUpdateDateTime>0001-01-01T00:00:00</LastUpdateDateTime>
</CustomerMasterMessage>