Models
ItemDetail
Additional metadata for an offer item.
Namespace and purpose
Imoli\EflLeasingSdk\Model\Calculation\ItemDetail holds a single key–value pair of metadata for an OfferItem.
It is used to enrich calculation requests with structured attributes required by the EFL API.
Class definition
- Namespace:
Imoli\EflLeasingSdk\Model\Calculation - Class: final
ItemDetail
final class ItemDetail
{
public static function builder(): ItemDetailBuilder;
public function __construct(
string $id,
string $value
);
public function toRequestPayload(): array;
}
Properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Identifier of the detail (e.g. code defined by EFL or your system). |
value | string | Yes | Textual representation of the detail value. |
Methods
| Method | Kind | Return type | Description |
|---|---|---|---|
builder() | static | ItemDetailBuilder | Returns a fluent builder for constructing ItemDetail instances. |
toRequestPayload() | instance | array{id:string,value:string} | Serialises the detail into the structure expected by EFL. |
toRequestPayload() returns an array with id and value mapped directly to their property names.
Usage in the SDK
- Used in
OfferItem(OfferItem::toRequestPayload()) as part of theitemDetailsarray. - Indirectly used by
EflClient::calculateBasicOfferwhen building calculation requests.