Class: BankExchangeApi::Request::Bank

Inherits:
Base
  • Object
show all
Defined in:
lib/bank_exchange_api/request/bank.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

Constructor Details

This class inherits a constructor from BankExchangeApi::Request::Base

Instance Method Details

#endpointObject



20
21
22
# File 'lib/bank_exchange_api/request/bank.rb', line 20

def endpoint
  "/banks/#{swift!}"
end

#jsonObject



8
9
10
# File 'lib/bank_exchange_api/request/bank.rb', line 8

def json
  super(root: :rates)
end

#paramsObject



12
13
14
15
16
17
18
# File 'lib/bank_exchange_api/request/bank.rb', line 12

def params
  {
      iso_to: iso_to.join(','),
      date: date,
      fallback_days: fallback_days,
  }
end