EFL
Models

Address

Postal address used in customer and company data.

Namespace and purpose

Imoli\EflLeasingSdk\Model\Customer\Address represents a structured postal address used in customer and company data. It is used inside Company and Person when constructing CustomerData.

Class definition

  • Namespace: Imoli\EflLeasingSdk\Model\Customer
  • Class: final Address
final class Address
{
    public static function builder(): AddressBuilder;

    public function __construct(
        string $guid,
        string $name,
        string $typeId,
        string $city,
        string $street,
        string $houseNumber,
        string $postalCode,
        string $countryCode,
        ?string $flatNumber = null
    );

    public function toRequestPayload(): array;
}

Properties

NameTypeRequiredDescription
guidstringYesUnique identifier of the address entry.
namestringYesHuman-readable name/label of the address (e.g. "Headquarters").
typeIdstringYesAddress type identifier (e.g. registered office, correspondence).
citystringYesCity name.
streetstringYesStreet name.
houseNumberstringYesHouse/building number.
postalCodestringYesPostal code.
countryCodestringYesISO-like country code.
flatNumberstring|nullNoOptional flat/apartment number.

Methods

MethodKindReturn typeDescription
builder()staticAddressBuilderReturns a fluent builder for constructing Address instances.
toRequestPayload()instancearray<string,mixed>Serialises the address into the structure expected by the API.

toRequestPayload() returns an array with the following shape:

  • guid, name – maps to the respective properties,
  • type – nested object with ['id' => typeId],
  • city, street, houseNumber – maps to the respective properties,
  • postal – nested object with ['id' => postalCode],
  • country – nested object with ['id' => countryCode],
  • flatNumber – included only if not null.

Usage in the SDK