Class: GOBL::Currency::ExchangeRate

Inherits:
Object show all
Defined in:
lib/gobl/currency/exchange_rate.rb

Overview

ExchangeRate contains data on the rate to be used when converting amounts from the document’s base currency to whatever is defined.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL ExchangeRate structure

'https://gobl.org/draft-0/currency/exchange-rate'

Constants included from Hashme

Hashme::Boolean

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#amountGOBL::Num::Amount (readonly)

How much is 1.00 of this currency worth in the documents currency.

Returns:



25
# File 'lib/gobl/currency/exchange_rate.rb', line 25

property :amount, GOBL::Num::Amount

#currencyGOBL::Currency::Code (readonly)

ISO currency code this rate represents.



19
# File 'lib/gobl/currency/exchange_rate.rb', line 19

property :currency, GOBL::Currency::Code