PHP Class LukePOLO\LaraCart\Coupons\Percentage

Inheritance: implements LukePOLO\LaraCart\Contracts\CouponContract, use trait LukePOLO\LaraCart\Traits\CouponTrait
Show file Open project: lukepolo/laracart

Public Properties

Property Type Description
$code
$value

Public Methods

Method Description
__construct ( $code, $value, array $options = [] ) Percentage constructor.
discount ( $throwErrors = false ) : string Gets the discount amount.
displayValue ( ) : mixed

Method Details

__construct() public method

Percentage constructor.
public __construct ( $code, $value, array $options = [] )
$code
$value
$options array

discount() public method

Gets the discount amount.
public discount ( $throwErrors = false ) : string
$throwErrors boolean this allows us to capture errors in our code if we wish, that way we can spit out why the coupon has failed
return string

displayValue() public method

public displayValue ( ) : mixed
return mixed

Property Details

$code public property

public $code

$value public property

public $value