Class: BankExchangeApi::Request::Rate
- Inherits:
-
Base
- Object
- Base
- BankExchangeApi::Request::Rate
show all
- Defined in:
- lib/bank_exchange_api/request/rate.rb
Instance Attribute Summary
Attributes inherited from Base
#cli
Instance Method Summary
collapse
Methods inherited from Base
#get, #initialize, #query
Methods included from Param
#param
Instance Method Details
#endpoint ⇒ Object
21
22
23
|
# File 'lib/bank_exchange_api/request/rate.rb', line 21
def endpoint
"/rates/#{iso_code!}"
end
|
#json ⇒ Object
8
9
10
|
# File 'lib/bank_exchange_api/request/rate.rb', line 8
def json
super(root: :rates)
end
|
#params ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'lib/bank_exchange_api/request/rate.rb', line 12
def params
{
date: date,
iso_from: iso_from.join(','),
iso_to: iso_to.join(','),
fallback_days: fallback_days
}
end
|