Money
class Money extends Message
Represents an amount of money with its currency type.
Protobuf type Google\Type\Money
Methods
No description
The 3-letter currency code defined in ISO 4217.
The 3-letter currency code defined in ISO 4217.
The whole units of the amount.
The whole units of the amount.
Number of nano (10^-9) units of the amount.
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;
at line 65
setCurrencyCode(string $var)
The 3-letter currency code defined in ISO 4217.
Generated from protobuf field string currency_code = 1;
at line 78
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;
at line 90
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;
at line 107
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;
at line 123
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;