EFL
Models

EmailAddress

Company or person email address with type information.

Namespace and purpose

Imoli\EflLeasingSdk\Model\Customer\EmailAddress represents an e‑mail address associated with a company or person. It is used inside Company and may also be used for individual persons, depending on builder usage.

Class definition

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

    public function __construct(
        string $guid,
        string $email,
        string $typeId
    );

    public function toRequestPayload(): array;
}

Properties

NameTypeRequiredDescription
guidstringYesIdentifier of the email entry.
emailstringYesEmail address.
typeIdstringYesEmail type identifier (e.g. work, billing), mapped to type.id in payload.

Methods

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

toRequestPayload() returns an array with the following shape:

  • guid, email – maps to the respective properties,
  • type – nested object with ['id' => typeId].

Usage in the SDK

  • Used in the emails array of Company.
  • Included indirectly in CustomerData and sent to /Customer/PostCustomerDataForLon.