CoolCMS API

PaymentPriceResult
in package

FinalYes

Result of {@see \App\UI\Api\Eshop\Models\Services\PaymentPriceResolver}: one row of the `payment_method_prices` matrix, i.e. one (tariff × payment method × currency) combination.

The matrix hangs on the tariff and currency (shipperTariffId + currencyId), not on a concrete tariff price row, so a new price generation in shipper_tariff_prices (append-only time series) does not orphan it.

The matrix is a time series: dateFrom (format Y-m-d H:i:s) says which price generation the value comes from. The resolver picks the newest valid record per cell (tariff × method × currency), so two methods of one tariff may legitimately carry different dateFrom; a partially filled generation must not knock out untouched methods.

price is without VAT (like the shipping price); the VAT rate is applied later.

available is not filtered inside the resolver (it is returned in the DTO); the caller (checkout) decides whether to offer an unavailable method.

Table of Contents

Properties

$available  : bool
$currencyId  : int
$dateFrom  : string
$freeFrom  : string|null
$isFree  : bool
$paymentMethodId  : int
$price  : string
$priceAfterFreeFrom  : string
$shipperTariffId  : int
$useFreeFrom  : bool

Methods

__construct()  : mixed
getPriceAfterFreeFromAsFloat()  : float
getPriceAsFloat()  : float
withItemWaiver()  : self
The same result free of charge because an item of the order has "free payment" ({@see \App\UI\Api\Eshop\Models\Services\OrderFreeShippingFlags}).

Properties

Methods

__construct()

public __construct(int $shipperTariffId, int $paymentMethodId, int $currencyId, string $dateFrom, string $price, bool $available, string|null $freeFrom, bool $useFreeFrom, bool $isFree, string $priceAfterFreeFrom) : mixed
Parameters
$shipperTariffId : int
$paymentMethodId : int
$currencyId : int
$dateFrom : string
$price : string
$available : bool
$freeFrom : string|null
$useFreeFrom : bool
$isFree : bool
$priceAfterFreeFrom : string

getPriceAfterFreeFromAsFloat()

public getPriceAfterFreeFromAsFloat() : float
Return values
float

withItemWaiver()

The same result free of charge because an item of the order has "free payment" ({@see \App\UI\Api\Eshop\Models\Services\OrderFreeShippingFlags}).

public withItemWaiver() : self
Return values
self
On this page

Search results