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
| Name | Type | Required | Description |
|---|---|---|---|
guid | string | Yes | Unique identifier of the address entry. |
name | string | Yes | Human-readable name/label of the address (e.g. "Headquarters"). |
typeId | string | Yes | Address type identifier (e.g. registered office, correspondence). |
city | string | Yes | City name. |
street | string | Yes | Street name. |
houseNumber | string | Yes | House/building number. |
postalCode | string | Yes | Postal code. |
countryCode | string | Yes | ISO-like country code. |
flatNumber | string|null | No | Optional flat/apartment number. |
Methods
| Method | Kind | Return type | Description |
|---|---|---|---|
builder() | static | AddressBuilder | Returns a fluent builder for constructing Address instances. |
toRequestPayload() | instance | array<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
- Used in the
addressesarray ofCompany. - Used as the
addressproperty ofPerson. - Indirectly used when calling
EflClient::submitCustomerData.