freshbooks-php-sdk

Money extends DataTransferObject

Monetary amount represented by a decimal value and a currency code.

Table of Contents

Properties

$amount  : Decimal
$code  : string

Methods

__construct()  : void
__construct Create a money object
parseArray()  : array<string|int, mixed>

Properties

$amount

public Decimal $amount

Monetary amount with decimal places appropriate to the currency.

$code

public string $code

The three-letter currency code

Eg. USD, CAD, EUR, GBP

Methods

__construct()

__construct Create a money object

public __construct(mixed $amount, mixed $code) : void
Parameters
$amount : mixed

The amount of money. to be converted into a Decimal type. Eg. 19.99, '19.99'

$code : mixed

The three-letter currency code. Eg. USD, CAD, EUR, GBP

parseArray()

protected parseArray(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results