TariffPrice
extends TariffPrice
in package
Tariff price for one payment region x payment gate x currency combination.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_discussion_message_tariff_prices'
- #[TableAlias]
- 'TariffPrice'
Table of Contents
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
Attributes
- #[EntityOf]
- \App\UI\Api\System\Models\Entities\Currency::class
- #[Id]
- #[Identity]
- #[JoinColumn]
- $name: 'cms_system_currencies_currency_id'
- $referencedColumnName: 'currency_id'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\System\Models\Entities\Currency::class
$paymentGate
protected
TPaymentGate|null
$paymentGate
= null
Attributes
- #[EntityOf]
- \App\UI\Api\System\Models\Entities\PaymentGate::class
- #[Id]
- #[Identity]
- #[JoinColumn]
- $name: 'cms_system_payment_gates_payment_gate_id'
- $referencedColumnName: 'payment_gate_id'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\System\Models\Entities\PaymentGate::class
$paymentRegion
protected
TPaymentRegion|null
$paymentRegion
= null
Attributes
- #[EntityOf]
- \App\UI\Api\System\Models\Entities\PaymentRegion::class
- #[Id]
- #[Identity]
- #[JoinColumn]
- $name: 'cms_system_payment_regions_payment_region_id'
- $referencedColumnName: 'payment_region_id'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\System\Models\Entities\PaymentRegion::class
$price
protected
string
$price
= '0.000'
Attributes
- #[Column]
- $name: 'price'
- $type: 'decimal'
- $precision: 10
- $scale: 3
$tariff
protected
TTariff|null
$tariff
= null
Attributes
- #[EntityOf]
- \App\UI\Api\Discussion\Models\Entities\Tariff::class
- #[Id]
- #[Identity]
- #[JoinColumn]
- $name: 'cms_mod_discussion_message_tariffs_message_tariff_id'
- $referencedColumnName: 'message_tariff_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Discussion\Models\Entities\Tariff::class
- $inversedBy: 'prices'
$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>