Class AbstractCoupon
Abstract class for coupon discounts
- Blesta\Core\Pricing\Modifier\Type\Discount\AbstractCoupon implements Blesta\Core\Pricing\Modifier\Type\Discount\DiscountInterface
Direct known subclasses
Blesta\Core\Pricing\Modifier\Type\Discount\Coupon
Abstract
Namespace: Blesta\Core\Pricing\Modifier\Type\Discount
Package: blesta\core\Pricing\Modifier\Type\Discount
Copyright: Copyright (c) 2019, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at core/Pricing/Modifier/Type/Discount/AbstractCoupon.php
Namespace: Blesta\Core\Pricing\Modifier\Type\Discount
Package: blesta\core\Pricing\Modifier\Type\Discount
Copyright: Copyright (c) 2019, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at core/Pricing/Modifier/Type/Discount/AbstractCoupon.php
public
|
#
__construct( Minphp\Date\Date $date, Blesta\Items\Item\ItemInterface $coupon, integer|string $timeStamp )
Initializes the coupon fields, applying currency, and applicable date |
public
boolean
|
|
public
array
|
#
amount( string $currency )
Retrieves the amount from the discount that applies for the given currency |
public
array
|
|
public
boolean
|
#
applies( array $packageIds, boolean $options = false, boolean $recurs = false )
Determines whether the coupon applies to the given packages, their options, whether added new or recurring |
protected
array
|
$fields
The coupon fields |
|
protected
Minphp\Date\Date
|
$date
An instance of the date |
|
protected
string
|
$timeStamp
The date timestamp the coupon should apply to |