Models
CalculationData
Aggregated calculation result and related data for a transaction.
Namespace and purpose
Imoli\EflLeasingSdk\Model\Calculation\CalculationData represents the response body of /Calculation/GetBaseData.
It combines process status, raw basket data, calculation result, partner configuration and redirect URLs.
Class definition
- Namespace:
Imoli\EflLeasingSdk\Model\Calculation - Class: final
CalculationData
final class CalculationData
{
public EsbProcessStatus $status;
/** @var array<string, mixed>|null */
public ?array $basket;
public ?EsbCalculateBasicOfferRestReturn $calculation;
public ?int $calculationVariantId;
public ?PartnerData $partnerData;
public ?string $returnToBasketUrl;
public ?string $signProcessRedirectUrl;
public static function fromArray(array $data): self;
}
Properties
| Name | Type | Required | Description |
|---|---|---|---|
status | EsbProcessStatus | Yes | Current process status. |
basket | array<string,mixed>|null | No | Raw basket structure returned by the API. |
calculation | EsbCalculateBasicOfferRestReturn|null | No | Detailed calculation result, if present. |
calculationVariantId | int|null | No | Selected variant identifier, if any. |
partnerData | PartnerData|null | No | Partner-specific configuration (e.g. return URL, button label). |
returnToBasketUrl | string|null | No | URL to return to the basket view. |
signProcessRedirectUrl | string|null | No | URL to proceed to the signing process. |
Methods
| Method | Kind | Return type | Description |
|---|---|---|---|
fromArray() | static | CalculationData | Creates calculation data from raw API response, mapping status to enum and nested structures. |
fromArray() maps status to an EsbProcessStatus enum, optionally maps calculation to EsbCalculateBasicOfferRestReturn, optionally maps partnerData to PartnerData, and extracts ID and URL fields.
Usage in the SDK
- Returned by
EflClient::getBaseData. - Can be used to display calculation variants, partner UI hints and redirect URLs in your application.