src/Invoice/Creator.php
protected function getCustomer()
    {
        $customer = array();
        $customerSettings = $this->config->getCustomerSettings();
        $this->addDefault($customer, Tag::Type, $customerSettings['defaultCustomerType']);
        $this->addTokenDefault($customer, Tag::ContactYourId, $customerSettings['contactYourId']);
        $this->addDefaultEmpty($customer, Tag::ContactStatus, $customerSettings['contactStatus']);
        $this->addTokenDefault($customer, Tag::CompanyName1, $customerSettings['companyName1']);
        $this->addTokenDefault($customer, Tag::CompanyName2, $customerSettings['companyName2']);
        $this->addTokenDefault($customer, Tag::VatNumber, $customerSettings['vatNumber']);
        $this->addTokenDefault($customer, Tag::FullName, $customerSettings['fullName']);
        $this->addTokenDefault($customer, Tag::Salutation, $customerSettings['salutation']);
        $this->addTokenDefault($customer, Tag::Address1, $customerSettings['address1']);
        $this->addTokenDefault($customer, Tag::Address2, $customerSettings['address2']);
        $this->addTokenDefault($customer, Tag::PostalCode, $customerSettings['postalCode']);
        $this->addTokenDefault($customer, Tag::City, $customerSettings['city']);
        $customer[Tag::CountryCode] = $this->countries->convertEuCountryCode($this->invoiceSource->getCountryCode());
        // Add 'nl' as default country code. As other methods in the creator may
        // depend on this value being filled, e.g. looking up product vat rates,
        // we cannot wait until the completion phase, so we add it here.
        $this->addDefault($customer, Tag::CountryCode, 'nl');
        $this->addDefault($customer, Tag::Country, $this->countries->getCountryName($customer[Tag::CountryCode]));
        $this->addTokenDefault($customer, Tag::Telephone, $customerSettings['telephone']);
        $this->addTokenDefault($customer, Tag::Fax, $customerSettings['fax']);
        $this->addTokenDefault($customer, Tag::Email, $customerSettings['email']);
        $this->addDefaultEmpty($customer, Tag::OverwriteIfExists, $customerSettings['overwriteIfExists'] ? Api::OverwriteIfExists_Yes : Api::OverwriteIfExists_No);
        $this->addTokenDefault($customer, Tag::Mark, $customerSettings['mark']);
        return $customer;
    }
protected function getCustomer()
    {
        $customer = array();
        $customerSettings = $this->config->getCustomerSettings();
        $this->addDefault($customer, Tag::Type, $customerSettings['defaultCustomerType']);
        $this->addTokenDefault($customer, Tag::ContactYourId, $customerSettings['contactYourId']);
        $this->addDefaultEmpty($customer, Tag::ContactStatus, $customerSettings['contactStatus']);
        $this->addTokenDefault($customer, Tag::CompanyName1, $customerSettings['companyName1']);
        $this->addTokenDefault($customer, Tag::CompanyName2, $customerSettings['companyName2']);
        $this->addTokenDefault($customer, Tag::VatNumber, $customerSettings['vatNumber']);
        $this->addTokenDefault($customer, Tag::FullName, $customerSettings['fullName']);
        $this->addTokenDefault($customer, Tag::Salutation, $customerSettings['salutation']);
        $this->addTokenDefault($customer, Tag::Address1, $customerSettings['address1']);
        $this->addTokenDefault($customer, Tag::Address2, $customerSettings['address2']);
        $this->addTokenDefault($customer, Tag::PostalCode, $customerSettings['postalCode']);
        $this->addTokenDefault($customer, Tag::City, $customerSettings['city']);
        $customer[Tag::CountryCode] = $this->countries->convertEuCountryCode($this->invoiceSource->getCountryCode());
        // Add 'nl' as default country code. As other methods in the creator may
        // depend on this value being filled, e.g. looking up product vat rates,
        // we cannot wait until the completion phase, so we add it here.
        $this->addDefault($customer, Tag::CountryCode, 'nl');
        $this->addDefault($customer, Tag::Country, $this->countries->getCountryName($customer[Tag::CountryCode]));
        $this->addTokenDefault($customer, Tag::Telephone, $customerSettings['telephone']);
        $this->addTokenDefault($customer, Tag::Fax, $customerSettings['fax']);
        $this->addTokenDefault($customer, Tag::Email, $customerSettings['email']);
        $this->addDefaultEmpty($customer, Tag::OverwriteIfExists, $customerSettings['overwriteIfExists'] ? Api::OverwriteIfExists_Yes : Api::OverwriteIfExists_No);
        $this->addTokenDefault($customer, Tag::Mark, $customerSettings['mark']);
        return $customer;
    }
protected function getCustomer ( ) { $ customer = array ( ) ; $ customerSettings = $ this -> config -> getCustomerSettings ( ) ; $ this -> addDefault ( $ customer , Tag :: Type , $ customerSettings [ 'defaultCustomerType' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: ContactYourId , $ customerSettings [ 'contactYourId' ] ) ; $ this -> addDefaultEmpty ( $ customer , Tag :: ContactStatus , $ customerSettings [ 'contactStatus' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: CompanyName1 , $ customerSettings [ 'companyName1' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: CompanyName2 , $ customerSettings [ 'companyName2' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: VatNumber , $ customerSettings [ 'vatNumber' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: FullName , $ customerSettings [ 'fullName' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: Salutation , $ customerSettings [ 'salutation' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: Address1 , $ customerSettings [ 'address1' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: Address2 , $ customerSettings [ 'address2' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: PostalCode , $ customerSettings [ 'postalCode' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: City , $ customerSettings [ 'city' ] ) ; $ customer [ Tag :: CountryCode ] = $ this -> countries -> convertEuCountryCode ( $ this -> invoiceSource -> getCountryCode ( ) ) ; // Add 'nl' as default country code. As other methods in the creator may // depend on this value being filled, e.g. looking up product vat rates, // we cannot wait until the completion phase, so we add it here. $ this -> addDefault ( $ customer , Tag :: CountryCode , 'nl' ) ; $ this -> addDefault ( $ customer , Tag :: Country , $ this -> countries -> getCountryName ( $ customer [ Tag :: CountryCode ] ) ) ; $ this -> addTokenDefault ( $ customer , Tag :: Telephone , $ customerSettings [ 'telephone' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: Fax , $ customerSettings [ 'fax' ] ) ; $ this -> addTokenDefault ( $ customer , Tag :: Email , $ customerSettings [ 'email' ] ) ; $ this -> addDefaultEmpty ( $ customer , Tag :: OverwriteIfExists , $ customerSettings [ 'overwriteIfExists' ] ? Api :: OverwriteIfExists_Yes : Api :: OverwriteIfExists_No ) ; $ this -> addTokenDefault ( $ customer , Tag :: Mark , $ customerSettings [ 'mark' ] ) ; return $ customer ; }
Returns the 'customer' part of the invoice add structure.

The following keys are allowed/expected by the API:
- type
- contactid: will not be set. Acumulus id for this customer, in the
absence of this value, the API uses the email address as identifying
value.
- contactyourid: webshop customer id.
- contactstatus
- companyname1
- companyname2
- vatnumber
- fullname
- salutation
- address1
- address2
- postalcode
- city
- countrycode
- country
- telephone
- fax
- email: used to identify clients.
- overwriteifexists
- bankaccountnumber: will not be set: no webshop software provides this.
- mark
- disableduplicates: not (yet) supported.

At the customer level no meta tags are defined.

Extending classes should normally not have to override this method as all
values are fetched via configurable settings that may contain tokens
(veldverwijzingen (Dutch)) that refer to properties of objects in the
webshop (property sources). The exception is the (ISO) country code which
may not be easy to fetch via a property source as this might include a
database lookup to a "Countries" table. This is fetched via
Source::getCountryCode().

@return array
A keyed array with the customer data.
Returns the customer part of the invoice add structure .