EFL
Models

IdentityDocument

Identity document (e.g. ID card, passport) required by the EFL API.

Namespace and purpose

Imoli\EflLeasingSdk\Model\Customer\IdentityDocument models an identity document for a person, such as an ID card or passport. It is nested inside Person in customer data.

Class definition

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

    public function __construct(
        string $guid,
        string $number,
        string $issuer,
        string $issuedOn,
        string $typeId,
        ?string $validTo = null
    );

    public function toRequestPayload(): array;
}

Properties

NameTypeRequiredDescription
guidstringYesIdentifier of the identity document.
numberstringYesDocument number.
issuerstringYesIssuing authority.
issuedOnstringYesIssue date.
typeIdstringYesDocument type identifier (e.g. ID card, passport).
validTostring|nullNoOptional expiry date.

Methods

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

toRequestPayload() returns an array with the following shape:

  • guid, number, issuer, issuedOn – maps to the respective properties,
  • type – nested object with ['id' => typeId],
  • validTo – included only if not null.

Usage in the SDK