| POST | /api/settlement | Add new Settlement |
|---|
<?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 PaymentMethod implements JsonSerializable
{
public function __construct(
/** @var string */
public string $automatedClearingHousePaymentFormat='',
/** @var string */
public string $paymentMethodCode='',
/** @var string */
public string $paymentMethodIdentification=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['automatedClearingHousePaymentFormat'])) $this->automatedClearingHousePaymentFormat = $o['automatedClearingHousePaymentFormat'];
if (isset($o['paymentMethodCode'])) $this->paymentMethodCode = $o['paymentMethodCode'];
if (isset($o['paymentMethodIdentification'])) $this->paymentMethodIdentification = $o['paymentMethodIdentification'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->automatedClearingHousePaymentFormat)) $o['automatedClearingHousePaymentFormat'] = $this->automatedClearingHousePaymentFormat;
if (isset($this->paymentMethodCode)) $o['paymentMethodCode'] = $this->paymentMethodCode;
if (isset($this->paymentMethodIdentification)) $o['paymentMethodIdentification'] = $this->paymentMethodIdentification;
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 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 TransactionalReference extends DocumentReference implements JsonSerializable
{
/**
* @param DateTime|null $creationDateTime
* @param int|null $revisionNumber
* @param int|null $lineItemNumber
* @param string $entityIdentification
*/
public function __construct(
?DateTime $creationDateTime=null,
?int $revisionNumber=null,
?int $lineItemNumber=null,
string $entityIdentification='',
/** @var string */
public string $transactionalReferenceTypeCode=''
) {
parent::__construct($creationDateTime,$revisionNumber,$lineItemNumber,$entityIdentification);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['transactionalReferenceTypeCode'])) $this->transactionalReferenceTypeCode = $o['transactionalReferenceTypeCode'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->transactionalReferenceTypeCode)) $o['transactionalReferenceTypeCode'] = $this->transactionalReferenceTypeCode;
return empty($o) ? new class(){} : $o;
}
}
class SettlementAdjustment implements JsonSerializable
{
public function __construct(
/** @var float|null */
public ?float $adjustmentAmount=null,
/** @var string */
public string $financialAdjusmentReasonPartyRoleCode='',
/** @var string */
public string $financialAdjustmentReasonCode='',
/** @var TransactionalReference|null */
public ?TransactionalReference $transactionalReference=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['adjustmentAmount'])) $this->adjustmentAmount = $o['adjustmentAmount'];
if (isset($o['financialAdjusmentReasonPartyRoleCode'])) $this->financialAdjusmentReasonPartyRoleCode = $o['financialAdjusmentReasonPartyRoleCode'];
if (isset($o['financialAdjustmentReasonCode'])) $this->financialAdjustmentReasonCode = $o['financialAdjustmentReasonCode'];
if (isset($o['transactionalReference'])) $this->transactionalReference = JsonConverters::from('TransactionalReference', $o['transactionalReference']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->adjustmentAmount)) $o['adjustmentAmount'] = $this->adjustmentAmount;
if (isset($this->financialAdjusmentReasonPartyRoleCode)) $o['financialAdjusmentReasonPartyRoleCode'] = $this->financialAdjusmentReasonPartyRoleCode;
if (isset($this->financialAdjustmentReasonCode)) $o['financialAdjustmentReasonCode'] = $this->financialAdjustmentReasonCode;
if (isset($this->transactionalReference)) $o['transactionalReference'] = JsonConverters::to('TransactionalReference', $this->transactionalReference);
return empty($o) ? new class(){} : $o;
}
}
class ContentOwner implements JsonSerializable
{
public function __construct(
/** @var string */
public string $gln='',
/** @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['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->additionalPartyIdentification)) $o['additionalPartyIdentification'] = JsonConverters::toArray('AvpList', $this->additionalPartyIdentification);
return empty($o) ? new class(){} : $o;
}
}
class InvoiceDocumentReference extends DocumentReference implements JsonSerializable
{
/**
* @param DateTime|null $creationDateTime
* @param int|null $revisionNumber
* @param int|null $lineItemNumber
* @param string $entityIdentification
*/
public function __construct(
?DateTime $creationDateTime=null,
?int $revisionNumber=null,
?int $lineItemNumber=null,
string $entityIdentification='',
/** @var string */
public string $invoiceTypeCode='',
/** @var ContentOwner|null */
public ?ContentOwner $contentOwner=null
) {
parent::__construct($creationDateTime,$revisionNumber,$lineItemNumber,$entityIdentification);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['invoiceTypeCode'])) $this->invoiceTypeCode = $o['invoiceTypeCode'];
if (isset($o['contentOwner'])) $this->contentOwner = JsonConverters::from('ContentOwner', $o['contentOwner']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->invoiceTypeCode)) $o['invoiceTypeCode'] = $this->invoiceTypeCode;
if (isset($this->contentOwner)) $o['contentOwner'] = JsonConverters::to('ContentOwner', $this->contentOwner);
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 SettlementParty extends Ecom_PartyIdentification implements JsonSerializable
{
/**
* @param array<AvpList>|null $additionalPartyIdentification
* @param string $gln
*/
public function __construct(
?array $additionalPartyIdentification=null,
string $gln='',
/** @var string */
public string $partyRoleCode=''
) {
parent::__construct($additionalPartyIdentification,$gln);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['partyRoleCode'])) $this->partyRoleCode = $o['partyRoleCode'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->partyRoleCode)) $o['partyRoleCode'] = $this->partyRoleCode;
return empty($o) ? new class(){} : $o;
}
}
class SettlementLineItem implements JsonSerializable
{
public function __construct(
/** @var float|null */
public ?float $amountPaid=null,
/** @var int */
public int $lineItemNumber=0,
/** @var float|null */
public ?float $originalAmount=null,
/** @var array<SettlementAdjustment>|null */
public ?array $settlementAdjustment=null,
/** @var AvpList|null */
public ?AvpList $avpList=null,
/** @var DocumentReference|null */
public ?DocumentReference $debitCreditAdvice=null,
/** @var InvoiceDocumentReference|null */
public ?InvoiceDocumentReference $invoice=null,
/** @var DocumentReference|null */
public ?DocumentReference $requestForPayment=null,
/** @var array<SettlementParty>|null */
public ?array $settlementParty=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['amountPaid'])) $this->amountPaid = $o['amountPaid'];
if (isset($o['lineItemNumber'])) $this->lineItemNumber = $o['lineItemNumber'];
if (isset($o['originalAmount'])) $this->originalAmount = $o['originalAmount'];
if (isset($o['settlementAdjustment'])) $this->settlementAdjustment = JsonConverters::fromArray('SettlementAdjustment', $o['settlementAdjustment']);
if (isset($o['avpList'])) $this->avpList = JsonConverters::from('AvpList', $o['avpList']);
if (isset($o['debitCreditAdvice'])) $this->debitCreditAdvice = JsonConverters::from('DocumentReference', $o['debitCreditAdvice']);
if (isset($o['invoice'])) $this->invoice = JsonConverters::from('InvoiceDocumentReference', $o['invoice']);
if (isset($o['requestForPayment'])) $this->requestForPayment = JsonConverters::from('DocumentReference', $o['requestForPayment']);
if (isset($o['settlementParty'])) $this->settlementParty = JsonConverters::fromArray('SettlementParty', $o['settlementParty']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->amountPaid)) $o['amountPaid'] = $this->amountPaid;
if (isset($this->lineItemNumber)) $o['lineItemNumber'] = $this->lineItemNumber;
if (isset($this->originalAmount)) $o['originalAmount'] = $this->originalAmount;
if (isset($this->settlementAdjustment)) $o['settlementAdjustment'] = JsonConverters::toArray('SettlementAdjustment', $this->settlementAdjustment);
if (isset($this->avpList)) $o['avpList'] = JsonConverters::to('AvpList', $this->avpList);
if (isset($this->debitCreditAdvice)) $o['debitCreditAdvice'] = JsonConverters::to('DocumentReference', $this->debitCreditAdvice);
if (isset($this->invoice)) $o['invoice'] = JsonConverters::to('InvoiceDocumentReference', $this->invoice);
if (isset($this->requestForPayment)) $o['requestForPayment'] = JsonConverters::to('DocumentReference', $this->requestForPayment);
if (isset($this->settlementParty)) $o['settlementParty'] = JsonConverters::toArray('SettlementParty', $this->settlementParty);
return empty($o) ? new class(){} : $o;
}
}
class SettlementExtensionLineItem implements JsonSerializable
{
public function __construct(
/** @var int */
public int $number=0,
/** @var string */
public string $documentType='',
/** @var string */
public string $documentNumber='',
/** @var string */
public string $itemText=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['number'])) $this->number = $o['number'];
if (isset($o['documentType'])) $this->documentType = $o['documentType'];
if (isset($o['documentNumber'])) $this->documentNumber = $o['documentNumber'];
if (isset($o['itemText'])) $this->itemText = $o['itemText'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->number)) $o['number'] = $this->number;
if (isset($this->documentType)) $o['documentType'] = $this->documentType;
if (isset($this->documentNumber)) $o['documentNumber'] = $this->documentNumber;
if (isset($this->itemText)) $o['itemText'] = $this->itemText;
return empty($o) ? new class(){} : $o;
}
}
class AdjustmentAndDiscountSummary implements JsonSerializable
{
public function __construct(
/** @var float */
public float $amountTotal=0.0,
/** @var float */
public float $amountNett=0.0,
/** @var float */
public float $amountVat=0.0,
/** @var string */
public string $reasonMessage=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['amountTotal'])) $this->amountTotal = $o['amountTotal'];
if (isset($o['amountNett'])) $this->amountNett = $o['amountNett'];
if (isset($o['amountVat'])) $this->amountVat = $o['amountVat'];
if (isset($o['reasonMessage'])) $this->reasonMessage = $o['reasonMessage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->amountTotal)) $o['amountTotal'] = $this->amountTotal;
if (isset($this->amountNett)) $o['amountNett'] = $this->amountNett;
if (isset($this->amountVat)) $o['amountVat'] = $this->amountVat;
if (isset($this->reasonMessage)) $o['reasonMessage'] = $this->reasonMessage;
return empty($o) ? new class(){} : $o;
}
}
class TotalAmountSplit implements JsonSerializable
{
public function __construct(
/** @var float */
public float $amountTotal=0.0,
/** @var float */
public float $amountNett=0.0,
/** @var float */
public float $amountVat=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['amountTotal'])) $this->amountTotal = $o['amountTotal'];
if (isset($o['amountNett'])) $this->amountNett = $o['amountNett'];
if (isset($o['amountVat'])) $this->amountVat = $o['amountVat'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->amountTotal)) $o['amountTotal'] = $this->amountTotal;
if (isset($this->amountNett)) $o['amountNett'] = $this->amountNett;
if (isset($this->amountVat)) $o['amountVat'] = $this->amountVat;
return empty($o) ? new class(){} : $o;
}
}
class SettlementExtension implements JsonSerializable
{
public function __construct(
/** @var array<SettlementExtensionLineItem>|null */
public ?array $settlementExtensionLineItem=null,
/** @var array<AdjustmentAndDiscountSummary>|null */
public ?array $adjustmentAndDiscountSummary=null,
/** @var TotalAmountSplit|null */
public ?TotalAmountSplit $totalAmountSplit=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['settlementExtensionLineItem'])) $this->settlementExtensionLineItem = JsonConverters::fromArray('SettlementExtensionLineItem', $o['settlementExtensionLineItem']);
if (isset($o['adjustmentAndDiscountSummary'])) $this->adjustmentAndDiscountSummary = JsonConverters::fromArray('AdjustmentAndDiscountSummary', $o['adjustmentAndDiscountSummary']);
if (isset($o['totalAmountSplit'])) $this->totalAmountSplit = JsonConverters::from('TotalAmountSplit', $o['totalAmountSplit']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->settlementExtensionLineItem)) $o['settlementExtensionLineItem'] = JsonConverters::toArray('SettlementExtensionLineItem', $this->settlementExtensionLineItem);
if (isset($this->adjustmentAndDiscountSummary)) $o['adjustmentAndDiscountSummary'] = JsonConverters::toArray('AdjustmentAndDiscountSummary', $this->adjustmentAndDiscountSummary);
if (isset($this->totalAmountSplit)) $o['totalAmountSplit'] = JsonConverters::to('TotalAmountSplit', $this->totalAmountSplit);
return empty($o) ? new class(){} : $o;
}
}
class Settlement 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 string */
public string $batchIdentification='',
/** @var DateTime */
public DateTime $paymentEffectiveDate=new DateTime(),
/** @var string */
public string $settlementCurrency='',
/** @var string */
public string $settlementHandlingTypeCode='',
/** @var float|null */
public ?float $totalAmount=null,
/** @var PaymentMethod|null */
public ?PaymentMethod $paymentMethod=null,
/** @var TransactionalParty|null */
public ?TransactionalParty $payee=null,
/** @var TransactionalParty|null */
public ?TransactionalParty $payer=null,
/** @var TransactionalParty|null */
public ?TransactionalParty $remitTo=null,
/** @var string */
public string $settlementIdentification='',
/** @var array<SettlementLineItem>|null */
public ?array $settlementLineItem=null,
/** @var SettlementExtension|null */
public ?SettlementExtension $extension=null
) {
parent::__construct($currencyCode,$creationDateTime,$documentActionCode,$documentStatusCode,$documentStructureVersion,$lastUpdateDateTime,$revisionNumber,$avpList);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['batchIdentification'])) $this->batchIdentification = $o['batchIdentification'];
if (isset($o['paymentEffectiveDate'])) $this->paymentEffectiveDate = JsonConverters::from('DateTime', $o['paymentEffectiveDate']);
if (isset($o['settlementCurrency'])) $this->settlementCurrency = $o['settlementCurrency'];
if (isset($o['settlementHandlingTypeCode'])) $this->settlementHandlingTypeCode = $o['settlementHandlingTypeCode'];
if (isset($o['totalAmount'])) $this->totalAmount = $o['totalAmount'];
if (isset($o['paymentMethod'])) $this->paymentMethod = JsonConverters::from('PaymentMethod', $o['paymentMethod']);
if (isset($o['payee'])) $this->payee = JsonConverters::from('TransactionalParty', $o['payee']);
if (isset($o['payer'])) $this->payer = JsonConverters::from('TransactionalParty', $o['payer']);
if (isset($o['remitTo'])) $this->remitTo = JsonConverters::from('TransactionalParty', $o['remitTo']);
if (isset($o['settlementIdentification'])) $this->settlementIdentification = $o['settlementIdentification'];
if (isset($o['settlementLineItem'])) $this->settlementLineItem = JsonConverters::fromArray('SettlementLineItem', $o['settlementLineItem']);
if (isset($o['extension'])) $this->extension = JsonConverters::from('SettlementExtension', $o['extension']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->batchIdentification)) $o['batchIdentification'] = $this->batchIdentification;
if (isset($this->paymentEffectiveDate)) $o['paymentEffectiveDate'] = JsonConverters::to('DateTime', $this->paymentEffectiveDate);
if (isset($this->settlementCurrency)) $o['settlementCurrency'] = $this->settlementCurrency;
if (isset($this->settlementHandlingTypeCode)) $o['settlementHandlingTypeCode'] = $this->settlementHandlingTypeCode;
if (isset($this->totalAmount)) $o['totalAmount'] = $this->totalAmount;
if (isset($this->paymentMethod)) $o['paymentMethod'] = JsonConverters::to('PaymentMethod', $this->paymentMethod);
if (isset($this->payee)) $o['payee'] = JsonConverters::to('TransactionalParty', $this->payee);
if (isset($this->payer)) $o['payer'] = JsonConverters::to('TransactionalParty', $this->payer);
if (isset($this->remitTo)) $o['remitTo'] = JsonConverters::to('TransactionalParty', $this->remitTo);
if (isset($this->settlementIdentification)) $o['settlementIdentification'] = $this->settlementIdentification;
if (isset($this->settlementLineItem)) $o['settlementLineItem'] = JsonConverters::toArray('SettlementLineItem', $this->settlementLineItem);
if (isset($this->extension)) $o['extension'] = JsonConverters::to('SettlementExtension', $this->extension);
return empty($o) ? new class(){} : $o;
}
}
class SettlementMessage implements JsonSerializable
{
public function __construct(
/** @var Header|null */
public ?Header $header=null,
/** @var Settlement|null */
public ?Settlement $settlement=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['header'])) $this->header = JsonConverters::from('Header', $o['header']);
if (isset($o['settlement'])) $this->settlement = JsonConverters::from('Settlement', $o['settlement']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->header)) $o['header'] = JsonConverters::to('Header', $this->header);
if (isset($this->settlement)) $o['settlement'] = JsonConverters::to('Settlement', $this->settlement);
return empty($o) ? new class(){} : $o;
}
}
/** @description Settlement */
// @Api(Description="Settlement")
// @ApiResponse(Description="Add Settlement request received", IsDefaultResponse=true, StatusCode=200)
// @ApiResponse(Description="Settlement not accepted, Confirm Sender GLN", ResponseType="typeof(System.UnauthorizedAccessException)", StatusCode=403)
class AddSettlement implements IPost, JsonSerializable
{
public function __construct(
/** @description Settlement model containing all of the Settlement data */
// @ApiMember(Description="Settlement model containing all of the Settlement data", ParameterType="model")
/** @var SettlementMessage|null */
public ?SettlementMessage $settlement=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['settlement'])) $this->settlement = JsonConverters::from('SettlementMessage', $o['settlement']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->settlement)) $o['settlement'] = JsonConverters::to('SettlementMessage', $this->settlement);
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/settlement HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
settlement:
{
header:
{
documentIdentification:
{
identifier: String,
type: String
},
sender:
{
identifier:
{
authority: String,
text: String
},
contactInformation:
[
{
}
]
},
receiver:
{
identifier:
{
authority: String,
text: String
},
contactInformation:
[
{
}
]
}
},
settlement:
{
batchIdentification: String,
settlementCurrency: String,
settlementHandlingTypeCode: String,
totalAmount: 0,
paymentMethod:
{
automatedClearingHousePaymentFormat: String,
paymentMethodCode: String,
paymentMethodIdentification: String
},
payee:
{
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
}
]
},
payer:
{
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
}
]
},
remitTo:
{
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
}
]
},
settlementIdentification: String,
settlementLineItem:
[
{
amountPaid: 0,
lineItemNumber: 0,
originalAmount: 0,
settlementAdjustment:
[
{
adjustmentAmount: 0,
financialAdjusmentReasonPartyRoleCode: String,
financialAdjustmentReasonCode: String,
transactionalReference:
{
transactionalReferenceTypeCode: String,
creationDateTime: 0001-01-01,
revisionNumber: 0,
lineItemNumber: 0,
entityIdentification: String
}
}
],
avpList:
{
code: String,
value: String
},
debitCreditAdvice:
{
creationDateTime: 0001-01-01,
revisionNumber: 0,
lineItemNumber: 0,
entityIdentification: String
},
invoice:
{
invoiceTypeCode: String,
contentOwner:
{
gln: String,
additionalPartyIdentification:
[
{
code: String,
value: String
}
]
},
creationDateTime: 0001-01-01,
revisionNumber: 0,
lineItemNumber: 0,
entityIdentification: String
},
requestForPayment:
{
creationDateTime: 0001-01-01,
revisionNumber: 0,
lineItemNumber: 0,
entityIdentification: String
},
settlementParty:
[
{
partyRoleCode: String,
additionalPartyIdentification:
[
{
code: String,
value: String
}
],
gln: String
}
]
}
],
extension:
{
settlementExtensionLineItem:
[
{
number: 0,
documentType: String,
documentNumber: String,
itemText: String
}
],
adjustmentAndDiscountSummary:
[
{
amountTotal: 0,
amountNett: 0,
amountVat: 0,
reasonMessage: String
}
],
totalAmountSplit:
{
amountTotal: 0,
amountNett: 0,
amountVat: 0
}
},
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
{
}