TariffPrice
extends BaseEntity
in package
implements
TariffPriceInterface
AbstractYes
Tariff price for one payment region x payment gate x currency combination.
The composite identity consists solely of the object associations (tariff,
paymentRegion, paymentGate, currency); the UI variant supplies #[ORM\Id],
#[Identity] and #[EntityOf] (see MessageAssetRel). The scalar *Id getters
are derived only, kept for readers such as the Front PaymentPresenter and the
price collection traits. Scalar FK columns are not mapped; the associations carry them.
Tags
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'TariffPrice'
Table of Contents
Interfaces
- TariffPriceInterface
- Tariff price for a payment region × gateway × currency combination; looked up by {@see \App\Core\Traits\Shared\Models\Entities\Collections\TariffPriceCollectionTrait::getPrice()}.
Properties
- $active : bool
- $currency : TCurrency|null
- $paymentGate : TPaymentGate|null
- $paymentRegion : TPaymentRegion|null
- $price : string
- $tariff : TTariff|null
- $vatPercents : numeric-string|null
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getActive() : bool
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getCurrency() : TCurrency|null
- getCurrencyId() : int|null
- getPaymentGate() : TPaymentGate|null
- getPaymentGateId() : int|null
- getPaymentRegion() : TPaymentRegion|null
- getPaymentRegionId() : int|null
- getPrice() : string
- getTariff() : TTariff|null
- getTariffId() : int|null
- getVatPercents() : numeric-string|null
- isActive() : bool
- setActive() : $this
- setCurrency() : $this
- setPaymentGate() : $this
- setPaymentRegion() : $this
- setPrice() : $this
- setTariff() : $this
- setVatPercents() : TCurrency>
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$active
protected
bool
$active
= false
Attributes
- #[Column]
- $name: 'active'
- $type: 'boolean'
$currency
protected
TCurrency|null
$currency
= null
$paymentGate
protected
TPaymentGate|null
$paymentGate
= null
$paymentRegion
protected
TPaymentRegion|null
$paymentRegion
= null
$price
protected
string
$price
= '0.000'
Attributes
- #[Column]
- $name: 'price'
- $type: 'decimal'
- $precision: 10
- $scale: 3
$tariff
protected
TTariff|null
$tariff
= null
$vatPercents
protected
numeric-string|null
$vatPercents
= null
Attributes
- #[Column]
- $name: 'vat_percents'
- $type: 'decimal'
- $precision: 5
- $scale: 2
- $nullable: true
Methods
__construct()
public
__construct([mixed $tariff = null ][, mixed $paymentRegion = null ][, mixed $paymentGate = null ][, mixed $currency = null ][, string $price = '0.000' ][, string|null $vatPercents = null ][, bool $active = false ]) : mixed
Parameters
- $tariff : mixed = null
- $paymentRegion : mixed = null
- $paymentGate : mixed = null
- $currency : mixed = null
- $price : string = '0.000'
- $vatPercents : string|null = null
- $active : bool = false
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActive()
public
getActive() : bool
Return values
boolgetAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getCurrency()
public
getCurrency() : TCurrency|null
Return values
TCurrency|nullgetCurrencyId()
public
getCurrencyId() : int|null
Return values
int|nullgetPaymentGate()
public
getPaymentGate() : TPaymentGate|null
Return values
TPaymentGate|nullgetPaymentGateId()
public
getPaymentGateId() : int|null
Return values
int|nullgetPaymentRegion()
public
getPaymentRegion() : TPaymentRegion|null
Return values
TPaymentRegion|nullgetPaymentRegionId()
public
getPaymentRegionId() : int|null
Return values
int|nullgetPrice()
public
getPrice() : string
Return values
stringgetTariff()
public
getTariff() : TTariff|null
Return values
TTariff|nullgetTariffId()
public
getTariffId() : int|null
Return values
int|nullgetVatPercents()
public
getVatPercents() : numeric-string|null
Return values
numeric-string|nullisActive()
public
isActive() : bool
Return values
boolsetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetCurrency()
public
setCurrency(TCurrency|null $currency) : $this
Parameters
- $currency : TCurrency|null
Return values
$thissetPaymentGate()
public
setPaymentGate(TPaymentGate|null $paymentGate) : $this
Parameters
- $paymentGate : TPaymentGate|null
Return values
$thissetPaymentRegion()
public
setPaymentRegion(TPaymentRegion|null $paymentRegion) : $this
Parameters
- $paymentRegion : TPaymentRegion|null
Return values
$thissetPrice()
public
setPrice(string $price) : $this
Parameters
- $price : string
Return values
$thissetTariff()
public
setTariff(TTariff|null $tariff) : $this
Parameters
- $tariff : TTariff|null
Return values
$thissetVatPercents()
public
setVatPercents(int|float|string|null $vatPercents) : TCurrency>
Parameters
- $vatPercents : int|float|string|null
Return values
TCurrency>getTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>