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
| Name | Type | Required | Description |
|---|---|---|---|
count | int | Yes | Quantity of the item. |
id | string | Yes | Item identifier in your system. |
vatRate | float | Yes | VAT rate applicable to this item. |
itemDetails | ItemDetail[] | Yes | Additional metadata entries. |
supplierId | string|null | No | Optional supplier identifier. |
type | string|null | No | Optional type classification. |
category | string|null | No | Optional category classification. |
totalAmountNet | float|null | No | Total net amount for the item. |
netValue | float|null | No | Net value of the item. |
grossValue | float|null | No | Gross value of the item. |
Methods
| Method | Kind | Return type | Description |
|---|---|---|---|
builder() | static | OfferItemBuilder | Returns a fluent builder for constructing OfferItem instances. |
toRequestPayload() | instance | array<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
- Used inside
AssetToCalculationwhen building calculation requests. - Ultimately sent via
CalculationApiClient::calculateBasicOffer()and consumed byEflClient::calculateBasicOffer.