SpecialOfferInformation
in package
implements
SpecialOfferInformationInterface
Class SpecialOfferInformation
Interfaces, Classes and Traits
- SpecialOfferInformationInterface
- Interface SpecialOfferInformationInterface
Table of Contents
- $price : float
- $productId : int
- $quantity : float
- $status : bool
- __construct() : mixed
- SpecialOfferInformation constructor.
- create() : SpecialOfferInformation
- Named constructor of special offer information.
- price() : float
- Returns the special offer's price.
- productId() : int
- Returns the productId the special offer belongs to.
- quantity() : float
- Returns the quantity of the special offer.
- status() : bool
- Returns the special offer status.
Properties
$price
protected
float
$price
$productId
protected
int
$productId
$quantity
protected
float
$quantity
$status
protected
bool
$status
Methods
__construct()
SpecialOfferInformation constructor.
public
__construct(DecimalType $quantity, DecimalType $price, BoolType $status, IdType $productId) : mixed
Parameters
- $quantity : DecimalType
-
Special offer's quantity.
- $price : DecimalType
-
Special offer's price.
- $status : BoolType
-
Special offer's status.
- $productId : IdType
-
Special offer's product ID.
Return values
mixed —create()
Named constructor of special offer information.
public
static create(float $quantity, float $price, bool $status, int $productId) : SpecialOfferInformation
Parameters
- $quantity : float
-
Special offer's quantity.
- $price : float
-
Special offer's price.
- $status : bool
-
Special offer's status.
- $productId : int
-
Special offer's product ID.
Return values
SpecialOfferInformation —New instance.
price()
Returns the special offer's price.
public
price() : float
Return values
float —Price of special offer.
productId()
Returns the productId the special offer belongs to.
public
productId() : int
Return values
int —ID of the offered product.
quantity()
Returns the quantity of the special offer.
public
quantity() : float
Return values
float —Special offer's quantity.
status()
Returns the special offer status.
public
status() : bool
Return values
bool —True if special offer is active.