class Amount implements CouponTypeInterface

An amount object requires the amount off, and the currency.

Properties

protected $amount
protected $currency

Methods

__construct(int $amount, string $currency = 'usd')

Create an amount object with currency.

array
toArray()

Return an associative array with the protected properties.

Details

at line 21
__construct(int $amount, string $currency = 'usd')

Create an amount object with currency.

Parameters

int $amount Amount in pennies
string $currency Three letter currency code

at line 32
array toArray()

Return an associative array with the protected properties.

Return Value

array