ShippingPriceResult
in package
Result of {@see \App\UI\Api\Eshop\Models\Services\ShippingPriceResolver}: the concrete tariff price row (weight interval) that covers the given weight at the given date. Decimal columns stay numeric strings (bcmath, no float rounding).
isFree / priceAfterFreeFrom reflect the free_from threshold (an order above it ships free); the
resolver applies it only when the caller passes cartTotal. Without it isFree stays false and
priceAfterFreeFrom === price (the threshold could not be evaluated).
weightTo is nullable: null means an open upper band without limit (a generation may have at most
one, and it must have the highest weightFrom). A caller that displays weightTo must handle null
("and more"), not cast it to 0 or ''.
Table of Contents
Properties
- $currencyId : int
- $dateFrom : string
- $freeFrom : string|null
- $isFree : bool
- $price : string
- $priceAfterFreeFrom : string
- $shipperTariffPriceId : int
- $tariffId : int
- $vatId : int|null
- $weightFrom : string
- $weightTo : string|null
Methods
- __construct() : mixed
- getPriceAfterFreeFromAsFloat() : float
- getPriceAsFloat() : float
- withItemWaiver() : self
- The same result shipping free because an item of the order has "free delivery" ({@see \App\UI\Api\Eshop\Models\Services\OrderFreeShippingFlags}).
Properties
$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
$price read-only
public
string
$price
$priceAfterFreeFrom read-only
public
string
$priceAfterFreeFrom
$shipperTariffPriceId read-only
public
int
$shipperTariffPriceId
$tariffId read-only
public
int
$tariffId
$vatId read-only
public
int|null
$vatId
$weightFrom read-only
public
string
$weightFrom
$weightTo read-only
public
string|null
$weightTo
Methods
__construct()
public
__construct(int $shipperTariffPriceId, int $tariffId, int $currencyId, int|null $vatId, string $dateFrom, string $weightFrom, string|null $weightTo, string $price, string|null $freeFrom, bool $isFree, string $priceAfterFreeFrom) : mixed
Parameters
- $shipperTariffPriceId : int
- $tariffId : int
- $currencyId : int
- $vatId : int|null
- $dateFrom : string
- $weightFrom : string
- $weightTo : string|null
- $price : string
- $freeFrom : string|null
- $isFree : bool
- $priceAfterFreeFrom : string
getPriceAfterFreeFromAsFloat()
public
getPriceAfterFreeFromAsFloat() : float
Return values
floatgetPriceAsFloat()
public
getPriceAsFloat() : float
Return values
floatwithItemWaiver()
The same result shipping free because an item of the order has "free delivery" ({@see \App\UI\Api\Eshop\Models\Services\OrderFreeShippingFlags}).
public
withItemWaiver() : self