Class: GOBL::Currency::ExchangeRate
- Defined in:
- lib/generated/gobl/currency/exchange_rate.rb
Overview
ExchangeRate contains data on the rate to be used when converting amounts from one currency into another.
Constant Summary collapse
- SCHEMA_ID =
The Schema ID of the GOBL ExchangeRate structure
'https://gobl.org/draft-0/currency/exchange-rate'
Instance Attribute Summary collapse
-
#amount ⇒ GOBL::Num::Amount
readonly
How much is 1 of the “from” currency worth in the “to” currency.
-
#at ⇒ GOBL::Cal::DateTime
readonly
At represents the date and time (which may be 00:00:00) when the currency rate amount was determined.
-
#from ⇒ GOBL::Currency::Code
readonly
Currency code this will be converted from.
-
#to ⇒ GOBL::Currency::Code
readonly
Currency code this exchange rate will convert into.
Method Summary
Methods inherited from Object
Methods inherited from Struct
#as_json, from_data, from_json!, #to_json
Instance Attribute Details
#amount ⇒ GOBL::Num::Amount (readonly)
How much is 1 of the “from” currency worth in the “to” currency.
30 |
# File 'lib/generated/gobl/currency/exchange_rate.rb', line 30 property :amount, GOBL::Num::Amount |
#at ⇒ GOBL::Cal::DateTime (readonly)
At represents the date and time (which may be 00:00:00) when the currency rate amount was determined.
36 |
# File 'lib/generated/gobl/currency/exchange_rate.rb', line 36 property :at, GOBL::Cal::DateTime |
#from ⇒ GOBL::Currency::Code (readonly)
Currency code this will be converted from.
18 |
# File 'lib/generated/gobl/currency/exchange_rate.rb', line 18 property :from, GOBL::Currency::Code |
#to ⇒ GOBL::Currency::Code (readonly)
Currency code this exchange rate will convert into.
24 |
# File 'lib/generated/gobl/currency/exchange_rate.rb', line 24 property :to, GOBL::Currency::Code |