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
| Name | Type | Required | Description |
|---|---|---|---|
guid | string | Yes | Identifier of the phone entry. |
prefix | string | Yes | Country or area prefix (e.g. +48). |
number | string | Yes | Phone number. |
typeId | string | Yes | Phone type id (type.id in payload, e.g. mobile). |
kindId | string | Yes | Kind/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
| Method | Kind | Return type | Description |
|---|---|---|---|
builder() | static | PhoneBuilder | Returns a fluent builder for constructing Phone instances. |
toRequestPayload() | instance | array<string,mixed> | Serialises the phone data into the array structure expected by EFL. |
toRequestPayload() returns an array with the following shape:
guid– maps to theguidproperty,prefix– maps to theprefixproperty,number– maps to thenumberproperty,type– nested object with['id' => typeId],kind– nested object with['id' => kindId].
Usage in the SDK
- Used in the
phonesarray ofCompany. - Included indirectly in
CustomerDatafor/Customer/PostCustomerDataForLon.