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};


class EAccountingPagination implements JsonSerializable
{
    public function __construct(
        /** @description Page number that will be fetched to e-accounting client; Default 1 */
        // @DataMember(Order=1)
        // @ApiMember(Description="Page number that will be fetched to e-accounting client; Default 1")
        /** @var int|null */
        public ?int $PageNumber=null,

        /** @description Page size that will be fetched to e-accounting client; Default 75~ */
        // @DataMember(Order=2)
        // @ApiMember(Description="Page size that will be fetched to e-accounting client; Default 75~")
        /** @var int|null */
        public ?int $PageSize=null
    ) {
    }

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

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

    /** @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 EAccountingTermsOfPayment implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Id=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $NameEnglish=null,
        /** @var int */
        public int $NumberOfDays=0,
        /** @var int */
        public int $TermsOfPaymentTypeId=0,
        /** @var string|null */
        public ?string $TermsOfPaymentTypeText=null,
        /** @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 CustomerLabel implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Id=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Description=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['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 DirectDebitCustomerSettings implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $MandateId=null,
        /** @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 CreateEAccountingCustomer extends InvoiceAddress implements JsonSerializable
{
    /**
     * @param string|null $CorporateIdentityNumber
     * @param string|null $InvoiceAddress1
     * @param string|null $InvoiceAddress2
     * @param string|null $InvoiceCity
     * @param string|null $InvoicePostalCode
     * @param string|null $InvoiceCountryCode
     */
    public function __construct(
        ?string $CorporateIdentityNumber=null,
        ?string $InvoiceAddress1=null,
        ?string $InvoiceAddress2=null,
        ?string $InvoiceCity=null,
        ?string $InvoicePostalCode=null,
        ?string $InvoiceCountryCode=null,
        /** @var string|null */
        public ?string $CustomerNumber=null,
        /** @var string|null */
        public ?string $ContactPersonEmail=null,
        /** @var string|null */
        public ?string $ContactPersonMobile=null,
        /** @var string|null */
        public ?string $ContactPersonName=null,
        /** @var string|null */
        public ?string $ContactPersonPhone=null,
        /** @var string|null */
        public ?string $CurrencyCode=null,
        /** @var string|null */
        public ?string $GLN=null,
        /** @var string|null */
        public ?string $EmailAddress=null,
        /** @var string|null */
        public ?string $EmailAddressOrder=null,
        /** @var string|null */
        public ?string $EmailAddressQuote=null,
        /** @var string|null */
        public ?string $DeliveryCustomerName=null,
        /** @var string|null */
        public ?string $DeliveryAddress1=null,
        /** @var string|null */
        public ?string $DeliveryAddress2=null,
        /** @var string|null */
        public ?string $DeliveryCity=null,
        /** @var string|null */
        public ?string $DeliveryCountryCode=null,
        /** @var string|null */
        public ?string $DeliveryPostalCode=null,
        /** @var string|null */
        public ?string $DeliveryMethodId=null,
        /** @var string|null */
        public ?string $DeliveryTermId=null,
        /** @var string|null */
        public ?string $PayToAccountId=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Note=null,
        /** @var bool|null */
        public ?bool $ReverseChargeOnConstructionServices=null,
        /** @var int|null */
        public ?int $WebshopCustomerNumber=null,
        /** @var string|null */
        public ?string $MobilePhone=null,
        /** @var string|null */
        public ?string $Telephone=null,
        /** @var string|null */
        public ?string $TermsOfPaymentId=null,
        /** @var EAccountingTermsOfPayment|null */
        public ?EAccountingTermsOfPayment $EAccountingTermsOfPayment=null,
        /** @var string|null */
        public ?string $VatNumber=null,
        /** @var string|null */
        public ?string $WwwAddress=null,
        /** @var string|null */
        public ?string $LastInvoiceDate=null,
        /** @var bool|null */
        public ?bool $IsPrivatePerson=null,
        /** @var bool|null */
        public ?bool $IsNorthernIreland=null,
        /** @var float */
        public float $DiscountPercentage=0.0,
        /** @var DateTime|null */
        public ?DateTime $ChangedUtc=null,
        /** @var bool|null */
        public ?bool $IsActive=null,
        /** @var bool|null */
        public ?bool $ForceBookkeepVat=null,
        /** @var string|null */
        public ?string $EdiGlnNumber=null,
        /** @var string|null */
        public ?string $SalesDocumentLanguage=null,
        /** @var string|null */
        public ?string $ElectronicAddress=null,
        /** @var string|null */
        public ?string $ElectronicReference=null,
        /** @var string|null */
        public ?string $EdiServiceDelivererId=null,
        /** @var DateTime|null */
        public ?DateTime $AutoInvoiceActivationEmailSentDate=null,
        /** @var DateTime|null */
        public ?DateTime $AutoInvoiceRegistrationRequestSentDate=null,
        /** @var array<string>|null */
        public ?array $EmailAddresses=null,
        /** @var array<CustomerLabel>|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|null */
        public ?string $SalesPriceListId=null,
        /** @var string|null */
        public ?string $Iban=null,
        /** @var DirectDebitCustomerSettings|null */
        public ?DirectDebitCustomerSettings $DirectDebitCustomerSettings=null,
        /** @var string|null */
        public ?string $DiscountAgreementId=null,
        /** @var float */
        public float $UnpaidInvoicesAmount=0.0
    ) {
        parent::__construct($CorporateIdentityNumber,$InvoiceAddress1,$InvoiceAddress2,$InvoiceCity,$InvoicePostalCode,$InvoiceCountryCode);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CustomerNumber'])) $this->CustomerNumber = $o['CustomerNumber'];
        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['EmailAddress'])) $this->EmailAddress = $o['EmailAddress'];
        if (isset($o['EmailAddressOrder'])) $this->EmailAddressOrder = $o['EmailAddressOrder'];
        if (isset($o['EmailAddressQuote'])) $this->EmailAddressQuote = $o['EmailAddressQuote'];
        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('EAccountingTermsOfPayment', $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('CustomerLabel', $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('DirectDebitCustomerSettings', $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 = parent::jsonSerialize();
        if (isset($this->CustomerNumber)) $o['CustomerNumber'] = $this->CustomerNumber;
        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->EmailAddress)) $o['EmailAddress'] = $this->EmailAddress;
        if (isset($this->EmailAddressOrder)) $o['EmailAddressOrder'] = $this->EmailAddressOrder;
        if (isset($this->EmailAddressQuote)) $o['EmailAddressQuote'] = $this->EmailAddressQuote;
        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('EAccountingTermsOfPayment', $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('CustomerLabel', $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('DirectDebitCustomerSettings', $this->DirectDebitCustomerSettings);
        if (isset($this->DiscountAgreementId)) $o['DiscountAgreementId'] = $this->DiscountAgreementId;
        if (isset($this->UnpaidInvoicesAmount)) $o['UnpaidInvoicesAmount'] = $this->UnpaidInvoicesAmount;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

class EAccountingCustomerQuery extends EAccountingPagination implements ICompany, JsonSerializable
{
    /**
     * @param int|null $PageNumber
     * @param int|null $PageSize
     */
    public function __construct(
        ?int $PageNumber=null,
        ?int $PageSize=null,
        /** @var string|null */
        public ?string $CompanyId=null
    ) {
        parent::__construct($PageNumber,$PageSize);
    }

    /** @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;
    }
}

PHP EAccountingCustomerQuery DTOs

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

HTTP + CSV

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: testapi.bokamera.se 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Id":"String","CustomerNumber":"String","ContactPersonEmail":"String","ContactPersonMobile":"String","ContactPersonName":"String","ContactPersonPhone":"String","CurrencyCode":"String","GLN":"String","EmailAddress":"String","EmailAddressOrder":"String","EmailAddressQuote":"String","DeliveryCustomerName":"String","DeliveryAddress1":"String","DeliveryAddress2":"String","DeliveryCity":"String","DeliveryCountryCode":"String","DeliveryPostalCode":"String","DeliveryMethodId":"String","DeliveryTermId":"String","PayToAccountId":"String","Name":"String","Note":"String","ReverseChargeOnConstructionServices":false,"WebshopCustomerNumber":0,"MobilePhone":"String","Telephone":"String","TermsOfPaymentId":"String","EAccountingTermsOfPayment":{"Id":"String","Name":"String","NameEnglish":"String","NumberOfDays":0,"TermsOfPaymentTypeId":0,"TermsOfPaymentTypeText":"String","AvailableForSales":false,"AvailableForPurchase":false},"VatNumber":"String","WwwAddress":"String","LastInvoiceDate":"String","IsPrivatePerson":false,"IsNorthernIreland":false,"DiscountPercentage":0,"ChangedUtc":"0001-01-01T00:00:00","IsActive":false,"ForceBookkeepVat":false,"EdiGlnNumber":"String","SalesDocumentLanguage":"String","ElectronicAddress":"String","ElectronicReference":"String","EdiServiceDelivererId":"String","AutoInvoiceActivationEmailSentDate":"0001-01-01T00:00:00","AutoInvoiceRegistrationRequestSentDate":"0001-01-01T00:00:00","EmailAddresses":["String"],"CustomerLabels":[{"Id":"String","Name":"String","Description":"String"}],"MessageThreads":["String"],"Notes":["String"],"IsFutureInvoiceDateAllowed":false,"DeliveryBasedVat":false,"SalesPriceListId":"String","Iban":"String","DirectDebitCustomerSettings":{"MandateId":"String","MandateType":0,"SequenceType":0},"DiscountAgreementId":"String","UnpaidInvoicesAmount":0,"CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String"}