EFL
Models

OfferItem

Represents a single item in the leasing offer basket.

Namespace and purpose

Imoli\EflLeasingSdk\Model\Calculation\OfferItem represents a single asset or asset group in the leasing basket. It is part of the AssetToCalculation payload and holds quantity, pricing and classification information, together with ItemDetail metadata.

Class definition

  • Namespace: Imoli\EflLeasingSdk\Model\Calculation
  • Class: final OfferItem
final class OfferItem
{
    public static function builder(): OfferItemBuilder;

    public function __construct(
        int $count,
        string $id,
        float $vatRate,
        array $itemDetails,
        ?string $supplierId = null,
        ?string $type = null,
        ?string $category = null,
        ?float $totalAmountNet = null,
        ?float $netValue = null,
        ?float $grossValue = null
    );

    public function toRequestPayload(): array;
}

Properties

NameTypeRequiredDescription
countintYesQuantity of the item.
idstringYesItem identifier in your system.
vatRatefloatYesVAT rate applicable to this item.
itemDetailsItemDetail[]YesAdditional metadata entries.
supplierIdstring|nullNoOptional supplier identifier.
typestring|nullNoOptional type classification.
categorystring|nullNoOptional category classification.
totalAmountNetfloat|nullNoTotal net amount for the item.
netValuefloat|nullNoNet value of the item.
grossValuefloat|nullNoGross value of the item.

Methods

MethodKindReturn typeDescription
builder()staticOfferItemBuilderReturns a fluent builder for constructing OfferItem instances.
toRequestPayload()instancearray<string,mixed>Serialises the offer item into the structure expected by EFL.

toRequestPayload() returns an associative array including count, id, vatRate, itemDetails (each ItemDetail converted via toRequestPayload()), and optionally supplierId, type, category, totalAmountNet, netValue, grossValue when they are not null.

Usage in the SDK