EFL
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

NameTypeRequiredDescription
idstringYesIdentifier of the detail (e.g. code defined by EFL or your system).
valuestringYesTextual representation of the detail value.

Methods

MethodKindReturn typeDescription
builder()staticItemDetailBuilderReturns a fluent builder for constructing ItemDetail instances.
toRequestPayload()instancearray{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 the itemDetails array.
  • Indirectly used by EflClient::calculateBasicOffer when building calculation requests.