EflClient
calculateBasicOffer
Calculates a basic leasing offer for the given basket.
calculateBasicOffer() sends a calculation request for a basket of assets and returns a typed EsbCalculateBasicOfferRestReturn model.
Internally it wraps CalculationApiClient::calculateBasicOffer() and decodes the JSON response.
When the API responds with HTTP 200 and an empty body, the SDK returns an EsbCalculateBasicOfferRestReturn instance created via emptyForTransaction(), with the provided transaction id and an empty list of variants.
All methods on EflClient may throw:
ApiException– when the EFL API returns an error response.HttpException– when the HTTP transport fails.
Method signature
public function calculateBasicOffer(
AssetToCalculation $basket,
string $bearerToken
): EsbCalculateBasicOfferRestReturn
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
basket | AssetToCalculation | Yes | Basket of assets for which to calculate an offer. |
bearerToken | string | Yes | Bearer token used for authenticated calculation call. |
Return value
- Type:
EsbCalculateBasicOfferRestReturn– typed result with offer variants and financial details.