PaymentPriceResult
in package
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
$available read-only
public
bool
$available
$currencyId read-only
public
int
$currencyId
$dateFrom read-only
public
string
$dateFrom
$freeFrom read-only
public
string|null
$freeFrom
$isFree read-only
public
bool
$isFree
$paymentMethodId read-only
public
int
$paymentMethodId
$price read-only
public
string
$price
$priceAfterFreeFrom read-only
public
string
$priceAfterFreeFrom
$shipperTariffId read-only
public
int
$shipperTariffId
$useFreeFrom read-only
public
bool
$useFreeFrom
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
floatgetPriceAsFloat()
public
getPriceAsFloat() : float
Return values
floatwithItemWaiver()
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