EFL
Models

Phone

Phone number associated with a company or person.

Namespace and purpose

Imoli\EflLeasingSdk\Model\Customer\Phone represents a phone number with prefix and type/kind information. It is used inside Company when building customer data.

Class definition

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

    public function __construct(
        string $guid,
        string $prefix,
        string $number,
        string $typeId,
        string $kindId,
    );

    public function toRequestPayload(): array;
}
  • Constructor:
    • public function __construct(string $guid, string $prefix, string $number, string $typeId, string $kindId)
  • Static factories / builders:
    • public static function builder(): PhoneBuilder

The class uses private properties with a single toRequestPayload() method to expose them as an array for HTTP requests.

Properties

NameTypeRequiredDescription
guidstringYesIdentifier of the phone entry.
prefixstringYesCountry or area prefix (e.g. +48).
numberstringYesPhone number.
typeIdstringYesPhone type id (type.id in payload, e.g. mobile).
kindIdstringYesKind/category id (kind.id in payload, e.g. work).

All properties are required by the constructor and must be provided when creating a Phone instance.

Methods

MethodKindReturn typeDescription
builder()staticPhoneBuilderReturns a fluent builder for constructing Phone instances.
toRequestPayload()instancearray<string,mixed>Serialises the phone data into the array structure expected by EFL.

toRequestPayload() returns an array with the following shape:

  • guid – maps to the guid property,
  • prefix – maps to the prefix property,
  • number – maps to the number property,
  • type – nested object with ['id' => typeId],
  • kind – nested object with ['id' => kindId].

Usage in the SDK

  • Used in the phones array of Company.
  • Included indirectly in CustomerData for /Customer/PostCustomerDataForLon.