| 1 | <?php |
||
| 12 | class Fixed implements CouponContract |
||
| 13 | { |
||
| 14 | use CouponTrait; |
||
| 15 | |||
| 16 | public $code; |
||
| 17 | public $value; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Fixed constructor. |
||
| 21 | * |
||
| 22 | * @param $code |
||
| 23 | * @param $value |
||
| 24 | * @param array $options |
||
| 25 | */ |
||
| 26 | public function __construct($code, $value, $options = []) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Gets the discount amount. |
||
| 36 | * |
||
| 37 | * @param $throwErrors boolean this allows us to capture errors in our code if we wish, |
||
| 38 | * that way we can spit out why the coupon has failed |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function discount($throwErrors = false) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Displays the value in a money format. |
||
| 55 | * |
||
| 56 | * @param null $locale |
||
| 57 | * @param null $internationalFormat |
||
| 58 | * |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function displayValue($locale = null, $internationalFormat = null) |
||
| 69 | } |
||
| 70 |