BokaMera.API.Host

<back to all web services

EAccountingCustomerQuery

The following routes are available for this service:
GET/eaccounting/customers
<?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};


// @DataContract
class QueryBase implements JsonSerializable
{
    public function __construct(
        // @DataMember(Order=1)
        /** @var int|null */
        public ?int $Skip=null,

        // @DataMember(Order=2)
        /** @var int|null */
        public ?int $Take=null,

        // @DataMember(Order=3)
        /** @var string|null */
        public ?string $OrderBy=null,

        // @DataMember(Order=4)
        /** @var string|null */
        public ?string $OrderByDesc=null,

        // @DataMember(Order=5)
        /** @var string|null */
        public ?string $Include=null,

        // @DataMember(Order=6)
        /** @var string|null */
        public ?string $Fields=null,

        // @DataMember(Order=7)
        /** @var array<string,string>|null */
        public ?array $Meta=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Skip'])) $this->Skip = $o['Skip'];
        if (isset($o['Take'])) $this->Take = $o['Take'];
        if (isset($o['OrderBy'])) $this->OrderBy = $o['OrderBy'];
        if (isset($o['OrderByDesc'])) $this->OrderByDesc = $o['OrderByDesc'];
        if (isset($o['Include'])) $this->Include = $o['Include'];
        if (isset($o['Fields'])) $this->Fields = $o['Fields'];
        if (isset($o['Meta'])) $this->Meta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Meta']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Skip)) $o['Skip'] = $this->Skip;
        if (isset($this->Take)) $o['Take'] = $this->Take;
        if (isset($this->OrderBy)) $o['OrderBy'] = $this->OrderBy;
        if (isset($this->OrderByDesc)) $o['OrderByDesc'] = $this->OrderByDesc;
        if (isset($this->Include)) $o['Include'] = $this->Include;
        if (isset($this->Fields)) $o['Fields'] = $this->Fields;
        if (isset($this->Meta)) $o['Meta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Meta);
        return empty($o) ? new class(){} : $o;
    }
}

/**
 * @template T
 */
class QueryData extends QueryBase implements JsonSerializable
{
    public array $genericArgs = [];
    public static function create(array $genericArgs=[]): QueryData {
        $to = new QueryData();
        $to->genericArgs = $genericArgs;
        return $to;
    }

    /**
     * @param int|null $Skip
     * @param int|null $Take
     * @param string|null $OrderBy
     * @param string|null $OrderByDesc
     * @param string|null $Include
     * @param string|null $Fields
     * @param array<string,string>|null $Meta
     */
    public function __construct(
        mixed $Skip=null,
        mixed $Take=null,
        mixed $OrderBy=null,
        mixed $OrderByDesc=null,
        mixed $Include=null,
        mixed $Fields=null,
        mixed $Meta=null
    ) {
        parent::__construct($Skip,$Take,$OrderBy,$OrderByDesc,$Include,$Fields,$Meta);
    }

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

class EAccountingInvoiceAddress implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $CorporateIdentityNumber='',
        /** @var string */
        public string $InvoiceAddress1='',
        /** @var string */
        public string $InvoiceAddress2='',
        /** @var string */
        public string $InvoiceCity='',
        /** @var string */
        public string $InvoicePostalCode='',
        /** @var string */
        public string $InvoiceCountryCode=''
    ) {
    }

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

class EAccountingTermsOfPaymentQueryResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var string */
        public string $Name='',
        /** @var string */
        public string $NameEnglish='',
        /** @var int */
        public int $NumberOfDays=0,
        /** @var int */
        public int $TermsOfPaymentTypeId=0,
        /** @var string */
        public string $TermsOfPaymentTypeText='',
        /** @var bool|null */
        public ?bool $AvailableForSales=null,
        /** @var bool|null */
        public ?bool $AvailableForPurchase=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['NameEnglish'])) $this->NameEnglish = $o['NameEnglish'];
        if (isset($o['NumberOfDays'])) $this->NumberOfDays = $o['NumberOfDays'];
        if (isset($o['TermsOfPaymentTypeId'])) $this->TermsOfPaymentTypeId = $o['TermsOfPaymentTypeId'];
        if (isset($o['TermsOfPaymentTypeText'])) $this->TermsOfPaymentTypeText = $o['TermsOfPaymentTypeText'];
        if (isset($o['AvailableForSales'])) $this->AvailableForSales = $o['AvailableForSales'];
        if (isset($o['AvailableForPurchase'])) $this->AvailableForPurchase = $o['AvailableForPurchase'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->NameEnglish)) $o['NameEnglish'] = $this->NameEnglish;
        if (isset($this->NumberOfDays)) $o['NumberOfDays'] = $this->NumberOfDays;
        if (isset($this->TermsOfPaymentTypeId)) $o['TermsOfPaymentTypeId'] = $this->TermsOfPaymentTypeId;
        if (isset($this->TermsOfPaymentTypeText)) $o['TermsOfPaymentTypeText'] = $this->TermsOfPaymentTypeText;
        if (isset($this->AvailableForSales)) $o['AvailableForSales'] = $this->AvailableForSales;
        if (isset($this->AvailableForPurchase)) $o['AvailableForPurchase'] = $this->AvailableForPurchase;
        return empty($o) ? new class(){} : $o;
    }
}

class CustomerLabelQueryResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var string */
        public string $Name='',
        /** @var string */
        public string $Description=''
    ) {
    }

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

class DirectDebitCustomerSettingsQueryResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $MandateId='',
        /** @var int */
        public int $MandateType=0,
        /** @var int */
        public int $SequenceType=0,
        /** @var DateTime */
        public DateTime $SigningDate=new DateTime(),
        /** @var DateTime */
        public DateTime $EndDate=new DateTime(),
        /** @var DateTime */
        public DateTime $LatestDirectDebit=new DateTime()
    ) {
    }

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

class EAccountingCustomerQueryResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var string */
        public string $CustomerNumber='',
        /** @var string */
        public string $CorporateIdentityNumber='',
        /** @var string */
        public string $ContactPersonEmail='',
        /** @var string */
        public string $ContactPersonMobile='',
        /** @var string */
        public string $ContactPersonName='',
        /** @var string */
        public string $ContactPersonPhone='',
        /** @var string */
        public string $CurrencyCode='',
        /** @var string */
        public string $GLN='',
        /** @var string */
        public string $InvoiceCity='',
        /** @var string */
        public string $InvoicePostalCode='',
        /** @var string */
        public string $EmailAddress='',
        /** @var string */
        public string $EmailAddressOrder='',
        /** @var string */
        public string $EmailAddressQuote='',
        /** @var EAccountingInvoiceAddress|null */
        public ?EAccountingInvoiceAddress $InvoiceAddress=null,
        /** @var string */
        public string $DeliveryCustomerName='',
        /** @var string */
        public string $DeliveryAddress1='',
        /** @var string */
        public string $DeliveryAddress2='',
        /** @var string */
        public string $DeliveryCity='',
        /** @var string */
        public string $DeliveryCountryCode='',
        /** @var string */
        public string $DeliveryPostalCode='',
        /** @var string */
        public string $DeliveryMethodId='',
        /** @var string */
        public string $DeliveryTermId='',
        /** @var string */
        public string $PayToAccountId='',
        /** @var string */
        public string $Name='',
        /** @var string */
        public string $Note='',
        /** @var bool|null */
        public ?bool $ReverseChargeOnConstructionServices=null,
        /** @var int|null */
        public ?int $WebshopCustomerNumber=null,
        /** @var string */
        public string $MobilePhone='',
        /** @var string */
        public string $Telephone='',
        /** @var string */
        public string $TermsOfPaymentId='',
        /** @var EAccountingTermsOfPaymentQueryResponse|null */
        public ?EAccountingTermsOfPaymentQueryResponse $EAccountingTermsOfPayment=null,
        /** @var string */
        public string $VatNumber='',
        /** @var string */
        public string $WwwAddress='',
        /** @var string */
        public string $LastInvoiceDate='',
        /** @var bool|null */
        public ?bool $IsPrivatePerson=null,
        /** @var bool|null */
        public ?bool $IsNorthernIreland=null,
        /** @var float|null */
        public ?float $DiscountPercentage=null,
        /** @var DateTime|null */
        public ?DateTime $ChangedUtc=null,
        /** @var bool|null */
        public ?bool $IsActive=null,
        /** @var bool|null */
        public ?bool $ForceBookkeepVat=null,
        /** @var string */
        public string $EdiGlnNumber='',
        /** @var string */
        public string $SalesDocumentLanguage='',
        /** @var string */
        public string $ElectronicAddress='',
        /** @var string */
        public string $ElectronicReference='',
        /** @var string */
        public string $EdiServiceDelivererId='',
        /** @var DateTime|null */
        public ?DateTime $AutoInvoiceActivationEmailSentDate=null,
        /** @var DateTime|null */
        public ?DateTime $AutoInvoiceRegistrationRequestSentDate=null,
        /** @var array<string>|null */
        public ?array $EmailAddresses=null,
        /** @var array<CustomerLabelQueryResponse>|null */
        public ?array $CustomerLabels=null,
        /** @var array<string>|null */
        public ?array $MessageThreads=null,
        /** @var array<string>|null */
        public ?array $Notes=null,
        /** @var bool|null */
        public ?bool $IsFutureInvoiceDateAllowed=null,
        /** @var bool|null */
        public ?bool $DeliveryBasedVat=null,
        /** @var string */
        public string $SalesPriceListId='',
        /** @var string */
        public string $Iban='',
        /** @var DirectDebitCustomerSettingsQueryResponse|null */
        public ?DirectDebitCustomerSettingsQueryResponse $DirectDebitCustomerSettings=null,
        /** @var string */
        public string $DiscountAgreementId='',
        /** @var float */
        public float $UnpaidInvoicesAmount=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['CustomerNumber'])) $this->CustomerNumber = $o['CustomerNumber'];
        if (isset($o['CorporateIdentityNumber'])) $this->CorporateIdentityNumber = $o['CorporateIdentityNumber'];
        if (isset($o['ContactPersonEmail'])) $this->ContactPersonEmail = $o['ContactPersonEmail'];
        if (isset($o['ContactPersonMobile'])) $this->ContactPersonMobile = $o['ContactPersonMobile'];
        if (isset($o['ContactPersonName'])) $this->ContactPersonName = $o['ContactPersonName'];
        if (isset($o['ContactPersonPhone'])) $this->ContactPersonPhone = $o['ContactPersonPhone'];
        if (isset($o['CurrencyCode'])) $this->CurrencyCode = $o['CurrencyCode'];
        if (isset($o['GLN'])) $this->GLN = $o['GLN'];
        if (isset($o['InvoiceCity'])) $this->InvoiceCity = $o['InvoiceCity'];
        if (isset($o['InvoicePostalCode'])) $this->InvoicePostalCode = $o['InvoicePostalCode'];
        if (isset($o['EmailAddress'])) $this->EmailAddress = $o['EmailAddress'];
        if (isset($o['EmailAddressOrder'])) $this->EmailAddressOrder = $o['EmailAddressOrder'];
        if (isset($o['EmailAddressQuote'])) $this->EmailAddressQuote = $o['EmailAddressQuote'];
        if (isset($o['InvoiceAddress'])) $this->InvoiceAddress = JsonConverters::from('EAccountingInvoiceAddress', $o['InvoiceAddress']);
        if (isset($o['DeliveryCustomerName'])) $this->DeliveryCustomerName = $o['DeliveryCustomerName'];
        if (isset($o['DeliveryAddress1'])) $this->DeliveryAddress1 = $o['DeliveryAddress1'];
        if (isset($o['DeliveryAddress2'])) $this->DeliveryAddress2 = $o['DeliveryAddress2'];
        if (isset($o['DeliveryCity'])) $this->DeliveryCity = $o['DeliveryCity'];
        if (isset($o['DeliveryCountryCode'])) $this->DeliveryCountryCode = $o['DeliveryCountryCode'];
        if (isset($o['DeliveryPostalCode'])) $this->DeliveryPostalCode = $o['DeliveryPostalCode'];
        if (isset($o['DeliveryMethodId'])) $this->DeliveryMethodId = $o['DeliveryMethodId'];
        if (isset($o['DeliveryTermId'])) $this->DeliveryTermId = $o['DeliveryTermId'];
        if (isset($o['PayToAccountId'])) $this->PayToAccountId = $o['PayToAccountId'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Note'])) $this->Note = $o['Note'];
        if (isset($o['ReverseChargeOnConstructionServices'])) $this->ReverseChargeOnConstructionServices = $o['ReverseChargeOnConstructionServices'];
        if (isset($o['WebshopCustomerNumber'])) $this->WebshopCustomerNumber = $o['WebshopCustomerNumber'];
        if (isset($o['MobilePhone'])) $this->MobilePhone = $o['MobilePhone'];
        if (isset($o['Telephone'])) $this->Telephone = $o['Telephone'];
        if (isset($o['TermsOfPaymentId'])) $this->TermsOfPaymentId = $o['TermsOfPaymentId'];
        if (isset($o['EAccountingTermsOfPayment'])) $this->EAccountingTermsOfPayment = JsonConverters::from('EAccountingTermsOfPaymentQueryResponse', $o['EAccountingTermsOfPayment']);
        if (isset($o['VatNumber'])) $this->VatNumber = $o['VatNumber'];
        if (isset($o['WwwAddress'])) $this->WwwAddress = $o['WwwAddress'];
        if (isset($o['LastInvoiceDate'])) $this->LastInvoiceDate = $o['LastInvoiceDate'];
        if (isset($o['IsPrivatePerson'])) $this->IsPrivatePerson = $o['IsPrivatePerson'];
        if (isset($o['IsNorthernIreland'])) $this->IsNorthernIreland = $o['IsNorthernIreland'];
        if (isset($o['DiscountPercentage'])) $this->DiscountPercentage = $o['DiscountPercentage'];
        if (isset($o['ChangedUtc'])) $this->ChangedUtc = JsonConverters::from('DateTime', $o['ChangedUtc']);
        if (isset($o['IsActive'])) $this->IsActive = $o['IsActive'];
        if (isset($o['ForceBookkeepVat'])) $this->ForceBookkeepVat = $o['ForceBookkeepVat'];
        if (isset($o['EdiGlnNumber'])) $this->EdiGlnNumber = $o['EdiGlnNumber'];
        if (isset($o['SalesDocumentLanguage'])) $this->SalesDocumentLanguage = $o['SalesDocumentLanguage'];
        if (isset($o['ElectronicAddress'])) $this->ElectronicAddress = $o['ElectronicAddress'];
        if (isset($o['ElectronicReference'])) $this->ElectronicReference = $o['ElectronicReference'];
        if (isset($o['EdiServiceDelivererId'])) $this->EdiServiceDelivererId = $o['EdiServiceDelivererId'];
        if (isset($o['AutoInvoiceActivationEmailSentDate'])) $this->AutoInvoiceActivationEmailSentDate = JsonConverters::from('DateTime', $o['AutoInvoiceActivationEmailSentDate']);
        if (isset($o['AutoInvoiceRegistrationRequestSentDate'])) $this->AutoInvoiceRegistrationRequestSentDate = JsonConverters::from('DateTime', $o['AutoInvoiceRegistrationRequestSentDate']);
        if (isset($o['EmailAddresses'])) $this->EmailAddresses = JsonConverters::fromArray('string', $o['EmailAddresses']);
        if (isset($o['CustomerLabels'])) $this->CustomerLabels = JsonConverters::fromArray('CustomerLabelQueryResponse', $o['CustomerLabels']);
        if (isset($o['MessageThreads'])) $this->MessageThreads = JsonConverters::fromArray('string', $o['MessageThreads']);
        if (isset($o['Notes'])) $this->Notes = JsonConverters::fromArray('string', $o['Notes']);
        if (isset($o['IsFutureInvoiceDateAllowed'])) $this->IsFutureInvoiceDateAllowed = $o['IsFutureInvoiceDateAllowed'];
        if (isset($o['DeliveryBasedVat'])) $this->DeliveryBasedVat = $o['DeliveryBasedVat'];
        if (isset($o['SalesPriceListId'])) $this->SalesPriceListId = $o['SalesPriceListId'];
        if (isset($o['Iban'])) $this->Iban = $o['Iban'];
        if (isset($o['DirectDebitCustomerSettings'])) $this->DirectDebitCustomerSettings = JsonConverters::from('DirectDebitCustomerSettingsQueryResponse', $o['DirectDebitCustomerSettings']);
        if (isset($o['DiscountAgreementId'])) $this->DiscountAgreementId = $o['DiscountAgreementId'];
        if (isset($o['UnpaidInvoicesAmount'])) $this->UnpaidInvoicesAmount = $o['UnpaidInvoicesAmount'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->CustomerNumber)) $o['CustomerNumber'] = $this->CustomerNumber;
        if (isset($this->CorporateIdentityNumber)) $o['CorporateIdentityNumber'] = $this->CorporateIdentityNumber;
        if (isset($this->ContactPersonEmail)) $o['ContactPersonEmail'] = $this->ContactPersonEmail;
        if (isset($this->ContactPersonMobile)) $o['ContactPersonMobile'] = $this->ContactPersonMobile;
        if (isset($this->ContactPersonName)) $o['ContactPersonName'] = $this->ContactPersonName;
        if (isset($this->ContactPersonPhone)) $o['ContactPersonPhone'] = $this->ContactPersonPhone;
        if (isset($this->CurrencyCode)) $o['CurrencyCode'] = $this->CurrencyCode;
        if (isset($this->GLN)) $o['GLN'] = $this->GLN;
        if (isset($this->InvoiceCity)) $o['InvoiceCity'] = $this->InvoiceCity;
        if (isset($this->InvoicePostalCode)) $o['InvoicePostalCode'] = $this->InvoicePostalCode;
        if (isset($this->EmailAddress)) $o['EmailAddress'] = $this->EmailAddress;
        if (isset($this->EmailAddressOrder)) $o['EmailAddressOrder'] = $this->EmailAddressOrder;
        if (isset($this->EmailAddressQuote)) $o['EmailAddressQuote'] = $this->EmailAddressQuote;
        if (isset($this->InvoiceAddress)) $o['InvoiceAddress'] = JsonConverters::to('EAccountingInvoiceAddress', $this->InvoiceAddress);
        if (isset($this->DeliveryCustomerName)) $o['DeliveryCustomerName'] = $this->DeliveryCustomerName;
        if (isset($this->DeliveryAddress1)) $o['DeliveryAddress1'] = $this->DeliveryAddress1;
        if (isset($this->DeliveryAddress2)) $o['DeliveryAddress2'] = $this->DeliveryAddress2;
        if (isset($this->DeliveryCity)) $o['DeliveryCity'] = $this->DeliveryCity;
        if (isset($this->DeliveryCountryCode)) $o['DeliveryCountryCode'] = $this->DeliveryCountryCode;
        if (isset($this->DeliveryPostalCode)) $o['DeliveryPostalCode'] = $this->DeliveryPostalCode;
        if (isset($this->DeliveryMethodId)) $o['DeliveryMethodId'] = $this->DeliveryMethodId;
        if (isset($this->DeliveryTermId)) $o['DeliveryTermId'] = $this->DeliveryTermId;
        if (isset($this->PayToAccountId)) $o['PayToAccountId'] = $this->PayToAccountId;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Note)) $o['Note'] = $this->Note;
        if (isset($this->ReverseChargeOnConstructionServices)) $o['ReverseChargeOnConstructionServices'] = $this->ReverseChargeOnConstructionServices;
        if (isset($this->WebshopCustomerNumber)) $o['WebshopCustomerNumber'] = $this->WebshopCustomerNumber;
        if (isset($this->MobilePhone)) $o['MobilePhone'] = $this->MobilePhone;
        if (isset($this->Telephone)) $o['Telephone'] = $this->Telephone;
        if (isset($this->TermsOfPaymentId)) $o['TermsOfPaymentId'] = $this->TermsOfPaymentId;
        if (isset($this->EAccountingTermsOfPayment)) $o['EAccountingTermsOfPayment'] = JsonConverters::to('EAccountingTermsOfPaymentQueryResponse', $this->EAccountingTermsOfPayment);
        if (isset($this->VatNumber)) $o['VatNumber'] = $this->VatNumber;
        if (isset($this->WwwAddress)) $o['WwwAddress'] = $this->WwwAddress;
        if (isset($this->LastInvoiceDate)) $o['LastInvoiceDate'] = $this->LastInvoiceDate;
        if (isset($this->IsPrivatePerson)) $o['IsPrivatePerson'] = $this->IsPrivatePerson;
        if (isset($this->IsNorthernIreland)) $o['IsNorthernIreland'] = $this->IsNorthernIreland;
        if (isset($this->DiscountPercentage)) $o['DiscountPercentage'] = $this->DiscountPercentage;
        if (isset($this->ChangedUtc)) $o['ChangedUtc'] = JsonConverters::to('DateTime', $this->ChangedUtc);
        if (isset($this->IsActive)) $o['IsActive'] = $this->IsActive;
        if (isset($this->ForceBookkeepVat)) $o['ForceBookkeepVat'] = $this->ForceBookkeepVat;
        if (isset($this->EdiGlnNumber)) $o['EdiGlnNumber'] = $this->EdiGlnNumber;
        if (isset($this->SalesDocumentLanguage)) $o['SalesDocumentLanguage'] = $this->SalesDocumentLanguage;
        if (isset($this->ElectronicAddress)) $o['ElectronicAddress'] = $this->ElectronicAddress;
        if (isset($this->ElectronicReference)) $o['ElectronicReference'] = $this->ElectronicReference;
        if (isset($this->EdiServiceDelivererId)) $o['EdiServiceDelivererId'] = $this->EdiServiceDelivererId;
        if (isset($this->AutoInvoiceActivationEmailSentDate)) $o['AutoInvoiceActivationEmailSentDate'] = JsonConverters::to('DateTime', $this->AutoInvoiceActivationEmailSentDate);
        if (isset($this->AutoInvoiceRegistrationRequestSentDate)) $o['AutoInvoiceRegistrationRequestSentDate'] = JsonConverters::to('DateTime', $this->AutoInvoiceRegistrationRequestSentDate);
        if (isset($this->EmailAddresses)) $o['EmailAddresses'] = JsonConverters::toArray('string', $this->EmailAddresses);
        if (isset($this->CustomerLabels)) $o['CustomerLabels'] = JsonConverters::toArray('CustomerLabelQueryResponse', $this->CustomerLabels);
        if (isset($this->MessageThreads)) $o['MessageThreads'] = JsonConverters::toArray('string', $this->MessageThreads);
        if (isset($this->Notes)) $o['Notes'] = JsonConverters::toArray('string', $this->Notes);
        if (isset($this->IsFutureInvoiceDateAllowed)) $o['IsFutureInvoiceDateAllowed'] = $this->IsFutureInvoiceDateAllowed;
        if (isset($this->DeliveryBasedVat)) $o['DeliveryBasedVat'] = $this->DeliveryBasedVat;
        if (isset($this->SalesPriceListId)) $o['SalesPriceListId'] = $this->SalesPriceListId;
        if (isset($this->Iban)) $o['Iban'] = $this->Iban;
        if (isset($this->DirectDebitCustomerSettings)) $o['DirectDebitCustomerSettings'] = JsonConverters::to('DirectDebitCustomerSettingsQueryResponse', $this->DirectDebitCustomerSettings);
        if (isset($this->DiscountAgreementId)) $o['DiscountAgreementId'] = $this->DiscountAgreementId;
        if (isset($this->UnpaidInvoicesAmount)) $o['UnpaidInvoicesAmount'] = $this->UnpaidInvoicesAmount;
        return empty($o) ? new class(){} : $o;
    }
}

/**
 * @template QueryData of EAccountingCustomerQueryResponse
 */
class EAccountingCustomerQuery extends QueryData implements ICompany, JsonSerializable
{
    /**
     * @param int|null $Skip
     * @param int|null $Take
     * @param string|null $OrderBy
     * @param string|null $OrderByDesc
     * @param string|null $Include
     * @param string|null $Fields
     * @param array<string,string>|null $Meta
     */
    public function __construct(
        ?int $Skip=null,
        ?int $Take=null,
        ?string $OrderBy=null,
        ?string $OrderByDesc=null,
        ?string $Include=null,
        ?string $Fields=null,
        ?array $Meta=null,
        /** @var string|null */
        public ?string $CompanyId=null
    ) {
        parent::__construct($Skip,$Take,$OrderBy,$OrderByDesc,$Include,$Fields,$Meta);
    }

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

class AccessKeyTypeResponse implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string */
        public string $KeyType='',
        /** @var string */
        public string $Description=''
    ) {
    }

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

// @DataContract
/**
 * @template T
 */
class QueryResponse implements JsonSerializable
{
    public array $genericArgs = [];
    public static function create(array $genericArgs=[]): QueryResponse {
        $to = new QueryResponse();
        $to->genericArgs = $genericArgs;
        return $to;
    }

    public function __construct(
        // @DataMember(Order=1)
        /** @var int */
        public mixed $Offset=0,

        // @DataMember(Order=2)
        /** @var int */
        public mixed $Total=0,

        // @DataMember(Order=3)
        /** @var array<AccessKeyTypeResponse>|null */
        public mixed $Results=null,

        // @DataMember(Order=4)
        /** @var array<string,string>|null */
        public mixed $Meta=null,

        // @DataMember(Order=5)
        /** @var ResponseStatus|null */
        public mixed $ResponseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Offset'])) $this->Offset = $o['Offset'];
        if (isset($o['Total'])) $this->Total = $o['Total'];
        if (isset($o['Results'])) $this->Results = JsonConverters::fromArray('AccessKeyTypeResponse', $o['Results']);
        if (isset($o['Meta'])) $this->Meta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Meta']);
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Offset)) $o['Offset'] = $this->Offset;
        if (isset($this->Total)) $o['Total'] = $this->Total;
        if (isset($this->Results)) $o['Results'] = JsonConverters::toArray('AccessKeyTypeResponse', $this->Results);
        if (isset($this->Meta)) $o['Meta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Meta);
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

PHP EAccountingCustomerQuery 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 /eaccounting/customers HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<QueryResponseOfEAccountingDtos.EAccountingCustomerQueryResponseWg5EthtI xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Offset>0</Offset>
  <Total>0</Total>
  <Results xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
    <d2p1:EAccountingDtos.EAccountingCustomerQueryResponse>
      <d2p1:AutoInvoiceActivationEmailSentDate>0001-01-01T00:00:00</d2p1:AutoInvoiceActivationEmailSentDate>
      <d2p1:AutoInvoiceRegistrationRequestSentDate>0001-01-01T00:00:00</d2p1:AutoInvoiceRegistrationRequestSentDate>
      <d2p1:ChangedUtc>0001-01-01T00:00:00</d2p1:ChangedUtc>
      <d2p1:ContactPersonEmail>String</d2p1:ContactPersonEmail>
      <d2p1:ContactPersonMobile>String</d2p1:ContactPersonMobile>
      <d2p1:ContactPersonName>String</d2p1:ContactPersonName>
      <d2p1:ContactPersonPhone>String</d2p1:ContactPersonPhone>
      <d2p1:CorporateIdentityNumber>String</d2p1:CorporateIdentityNumber>
      <d2p1:CurrencyCode>String</d2p1:CurrencyCode>
      <d2p1:CustomerLabels>
        <d2p1:EAccountingDtos.CustomerLabelQueryResponse>
          <d2p1:Description>String</d2p1:Description>
          <d2p1:Id>String</d2p1:Id>
          <d2p1:Name>String</d2p1:Name>
        </d2p1:EAccountingDtos.CustomerLabelQueryResponse>
      </d2p1:CustomerLabels>
      <d2p1:CustomerNumber>String</d2p1:CustomerNumber>
      <d2p1:DeliveryAddress1>String</d2p1:DeliveryAddress1>
      <d2p1:DeliveryAddress2>String</d2p1:DeliveryAddress2>
      <d2p1:DeliveryBasedVat>false</d2p1:DeliveryBasedVat>
      <d2p1:DeliveryCity>String</d2p1:DeliveryCity>
      <d2p1:DeliveryCountryCode>String</d2p1:DeliveryCountryCode>
      <d2p1:DeliveryCustomerName>String</d2p1:DeliveryCustomerName>
      <d2p1:DeliveryMethodId>String</d2p1:DeliveryMethodId>
      <d2p1:DeliveryPostalCode>String</d2p1:DeliveryPostalCode>
      <d2p1:DeliveryTermId>String</d2p1:DeliveryTermId>
      <d2p1:DirectDebitCustomerSettings>
        <d2p1:EndDate>0001-01-01T00:00:00</d2p1:EndDate>
        <d2p1:LatestDirectDebit>0001-01-01T00:00:00</d2p1:LatestDirectDebit>
        <d2p1:MandateId>String</d2p1:MandateId>
        <d2p1:MandateType>0</d2p1:MandateType>
        <d2p1:SequenceType>0</d2p1:SequenceType>
        <d2p1:SigningDate>0001-01-01T00:00:00</d2p1:SigningDate>
      </d2p1:DirectDebitCustomerSettings>
      <d2p1:DiscountAgreementId>String</d2p1:DiscountAgreementId>
      <d2p1:DiscountPercentage>0</d2p1:DiscountPercentage>
      <d2p1:EAccountingTermsOfPayment>
        <d2p1:AvailableForPurchase>false</d2p1:AvailableForPurchase>
        <d2p1:AvailableForSales>false</d2p1:AvailableForSales>
        <d2p1:Id>String</d2p1:Id>
        <d2p1:Name>String</d2p1:Name>
        <d2p1:NameEnglish>String</d2p1:NameEnglish>
        <d2p1:NumberOfDays>0</d2p1:NumberOfDays>
        <d2p1:TermsOfPaymentTypeId>0</d2p1:TermsOfPaymentTypeId>
        <d2p1:TermsOfPaymentTypeText>String</d2p1:TermsOfPaymentTypeText>
      </d2p1:EAccountingTermsOfPayment>
      <d2p1:EdiGlnNumber>String</d2p1:EdiGlnNumber>
      <d2p1:EdiServiceDelivererId>String</d2p1:EdiServiceDelivererId>
      <d2p1:ElectronicAddress>String</d2p1:ElectronicAddress>
      <d2p1:ElectronicReference>String</d2p1:ElectronicReference>
      <d2p1:EmailAddress>String</d2p1:EmailAddress>
      <d2p1:EmailAddressOrder>String</d2p1:EmailAddressOrder>
      <d2p1:EmailAddressQuote>String</d2p1:EmailAddressQuote>
      <d2p1:EmailAddresses xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:EmailAddresses>
      <d2p1:ForceBookkeepVat>false</d2p1:ForceBookkeepVat>
      <d2p1:GLN>String</d2p1:GLN>
      <d2p1:Iban>String</d2p1:Iban>
      <d2p1:Id>String</d2p1:Id>
      <d2p1:InvoiceAddress>
        <d2p1:CorporateIdentityNumber>String</d2p1:CorporateIdentityNumber>
        <d2p1:InvoiceAddress1>String</d2p1:InvoiceAddress1>
        <d2p1:InvoiceAddress2>String</d2p1:InvoiceAddress2>
        <d2p1:InvoiceCity>String</d2p1:InvoiceCity>
        <d2p1:InvoiceCountryCode>String</d2p1:InvoiceCountryCode>
        <d2p1:InvoicePostalCode>String</d2p1:InvoicePostalCode>
      </d2p1:InvoiceAddress>
      <d2p1:InvoiceCity>String</d2p1:InvoiceCity>
      <d2p1:InvoicePostalCode>String</d2p1:InvoicePostalCode>
      <d2p1:IsActive>false</d2p1:IsActive>
      <d2p1:IsFutureInvoiceDateAllowed>false</d2p1:IsFutureInvoiceDateAllowed>
      <d2p1:IsNorthernIreland>false</d2p1:IsNorthernIreland>
      <d2p1:IsPrivatePerson>false</d2p1:IsPrivatePerson>
      <d2p1:LastInvoiceDate>String</d2p1:LastInvoiceDate>
      <d2p1:MessageThreads xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:MessageThreads>
      <d2p1:MobilePhone>String</d2p1:MobilePhone>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:Note>String</d2p1:Note>
      <d2p1:Notes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:Notes>
      <d2p1:PayToAccountId>String</d2p1:PayToAccountId>
      <d2p1:ReverseChargeOnConstructionServices>false</d2p1:ReverseChargeOnConstructionServices>
      <d2p1:SalesDocumentLanguage>String</d2p1:SalesDocumentLanguage>
      <d2p1:SalesPriceListId>String</d2p1:SalesPriceListId>
      <d2p1:Telephone>String</d2p1:Telephone>
      <d2p1:TermsOfPaymentId>String</d2p1:TermsOfPaymentId>
      <d2p1:UnpaidInvoicesAmount>0</d2p1:UnpaidInvoicesAmount>
      <d2p1:VatNumber>String</d2p1:VatNumber>
      <d2p1:WebshopCustomerNumber>0</d2p1:WebshopCustomerNumber>
      <d2p1:WwwAddress>String</d2p1:WwwAddress>
    </d2p1:EAccountingDtos.EAccountingCustomerQueryResponse>
  </Results>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
  <ResponseStatus>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StackTrace>String</StackTrace>
    <Errors>
      <ResponseError>
        <ErrorCode>String</ErrorCode>
        <FieldName>String</FieldName>
        <Message>String</Message>
        <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Meta>
      </ResponseError>
    </Errors>
    <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Meta>
  </ResponseStatus>
</QueryResponseOfEAccountingDtos.EAccountingCustomerQueryResponseWg5EthtI>