Class: Money::Bank::Historical::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/money/bank/historical.rb

Overview

Configuration class for Money::Bank::Historical

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



44
45
46
47
48
49
50
51
# File 'lib/money/bank/historical.rb', line 44

def initialize
  @base_currency = Currency.new('EUR')
  @redis_url = 'redis://localhost:6379'
  @redis_namespace = 'currency'
  @oer_app_id = nil
  @timeout = 15
  @oer_account_type = RatesProvider::OpenExchangeRates::AccountType::ENTERPRISE
end

Instance Attribute Details

#base_currencyObject

Money::Currency relative to which all exchange rates will be cached



32
33
34
# File 'lib/money/bank/historical.rb', line 32

def base_currency
  @base_currency
end

#oer_account_typeObject

type of account on OpenExchangeRates, to know which API endpoints are useable



42
43
44
# File 'lib/money/bank/historical.rb', line 42

def 
  @oer_account_type
end

#oer_app_idObject

OpenExchangeRates app ID



38
39
40
# File 'lib/money/bank/historical.rb', line 38

def oer_app_id
  @oer_app_id
end

#redis_namespaceObject

Redis namespace in which the exchange rates will be cached



36
37
38
# File 'lib/money/bank/historical.rb', line 36

def redis_namespace
  @redis_namespace
end

#redis_urlObject

URL of the Redis server



34
35
36
# File 'lib/money/bank/historical.rb', line 34

def redis_url
  @redis_url
end

#timeoutObject

timeout to set in the OpenExchangeRates requests



40
41
42
# File 'lib/money/bank/historical.rb', line 40

def timeout
  @timeout
end