Money
A monetary amount and its currency.
A monetary amount and the currency in which it's denominated.
| Property | Type | Required | Description |
|---|---|---|---|
amount | decimalString | Yes | The amount of money. |
currency | string | Yes | The ISO 4217 currency code in which the amount is denominated. |
{ "amount": "-50.50", "currency": "USD"}$schema: https://json-schema.org/draft/2020-12/schema$id: Money.yamltype: objectproperties: amount: $ref: decimalString.yaml description: The amount of money. currency: type: string description: The ISO 4217 currency code in which the amount is denominated.required: - amount - currencyexamples: - amount: "-50.50" currency: USD - amount: "5000" currency: EUR - amount: "10000.50" currency: USDdescription: A monetary amount and the currency in which it's denominated./** A monetary amount and the currency in which it's denominated. */@example(Examples.Money.usdWithCents, #{ title: "US dollars and cents" })@example(Examples.Money.euroWithoutCents, #{ title: "Euros displayed without cents" })@example(Examples.Money.usdNegative, #{ title: "A negative amount of US dollars and cents" })@Versioning.added(Versions.v0_1)model Money { /** The amount of money. */ amount: decimalString;
/** The ISO 4217 currency code in which the amount is denominated. */ currency: string;}