Class: GOBL::Currency::ExchangeRate

Inherits:
Object show all
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

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 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

#atGOBL::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

#fromGOBL::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

#toGOBL::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