ZaimCurrency class

A currency from Zaim's public currency master, GET /v2/currency.

point is the number of decimal places the currency uses. It is 0 for JPY, which is why every amount in this package is an int with no decimal point: for currencies with point > 0 the amount is expressed in the currency's minor units.

Parameters

Required

Optional

  • unit: The symbol, e.g. ¥ (default: '').
  • point: Decimal places (default: 0).
Annotations
  • @immutable

Constructors

ZaimCurrency({required String currencyCode, required String name, String unit = '', int point = 0})
Creates a currency.
const
ZaimCurrency.fromJson(Map<String, dynamic> json)
Parses one element of the currencies array.
factory

Properties

currencyCode → String
The ISO currency code, for example JPY or AUD.
final
hashCode → int
The hash code for this object.
no setteroverride
name → String
The English currency name, for example Japanese YEN.
final
point → int
The number of decimal places this currency uses. 0 for JPY.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unit → String
The currency symbol, for example ¥ or $.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serialises back to Zaim's wire format.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override