AppliedDiscount
extends Element
in package
Uses
ElementNameTrait, ElementDescriptionTrait, EnumResolverTrait, ElementDiscountValueTrait
This is the applied discount container class.
The applied discounts information will be stored in that class and will remain immutable (only get methods are available)
Tags
Table of Contents
$description | : string | |
---|---|---|
$discountId | : int | |
$discountValue | : float | |
$error | : Error|null | |
$name | : string | |
$type | : string | |
$value | : float | |
getDescription() | Returns the element description on the website current language. | : string |
getDiscountId() | Returns the applied discount internal identifier. | : int |
getDiscountValue() | Returns the applied discount value for the amount type. | : float |
getError() | Returns the current element error (if there is error). | : Error|null |
getName() | Returns the element name on the website current language. | : string |
getType() | Returns the applied discount type. | : string |
getValue() | Returns the applied discount value. | : float |
setError() | : void |
Properties
$description
protected
string
$description
= ''
$discountId
protected
int
$discountId
= 0
$discountValue
protected
float
$discountValue
= 0.0
$error
protected
Error|null
$error
= null
$name
protected
string
$name
= ''
$type
protected
string
$type
= ''
$value
protected
float
$value
= 0.0
Methods
getDescription()
Returns the element description on the website current language.
public
getDescription() : string
Return values
string —getDiscountId()
Returns the applied discount internal identifier.
public
getDiscountId() : int
Return values
int —getDiscountValue()
Returns the applied discount value for the amount type.
public
getDiscountValue() : float
Return values
float —getError()
Returns the current element error (if there is error).
public
getError() : Error|null
Return values
Error|null —getName()
Returns the element name on the website current language.
public
getName() : string
Return values
string —getType()
Returns the applied discount type.
public
getType() : string
Return values
string —getValue()
Returns the applied discount value.
public
getValue() : float
Return values
float —setError()
protected
setError(mixed $error) : void
Parameters
- $error : mixed