class Money extends Message

Represents an amount of money with its currency type.

Generated from protobuf message google.type.Money

Methods

__construct()

No description

string
getCurrencyCode()

The 3-letter currency code defined in ISO 4217.

$this
setCurrencyCode(string $var)

The 3-letter currency code defined in ISO 4217.

int|string
getUnits()

The whole units of the amount.

$this
setUnits(int|string $var)

The whole units of the amount.

int
getNanos()

Number of nano (10^-9) units of the amount.

$this
setNanos(int $var)

Number of nano (10^-9) units of the amount.

Details

at line 43
__construct()

at line 54
string getCurrencyCode()

The 3-letter currency code defined in ISO 4217.

Generated from protobuf field string currency_code = 1;

Return Value

string

at line 66
$this setCurrencyCode(string $var)

The 3-letter currency code defined in ISO 4217.

Generated from protobuf field string currency_code = 1;

Parameters

string $var

Return Value

$this

at line 81
int|string getUnits()

The whole units of the amount.

For example if currencyCode is "USD", then 1 unit is one US dollar.

Generated from protobuf field int64 units = 2;

Return Value

int|string

at line 94
$this setUnits(int|string $var)

The whole units of the amount.

For example if currencyCode is "USD", then 1 unit is one US dollar.

Generated from protobuf field int64 units = 2;

Parameters

int|string $var

Return Value

$this

at line 113
int getNanos()

Number of nano (10^-9) units of the amount.

The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

Generated from protobuf field int32 nanos = 3;

Return Value

int

at line 130
$this setNanos(int $var)

Number of nano (10^-9) units of the amount.

The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

Generated from protobuf field int32 nanos = 3;

Parameters

int $var

Return Value

$this