Module: Nbrb::Api
- Extended by:
- Currencies
- Defined in:
- lib/nbrb-api.rb,
lib/nbrb-api/version.rb,
lib/nbrb-api/currencies.rb,
lib/nbrb-api/exceptions.rb
Defined Under Namespace
Modules: Currencies
Classes: GeneralError, OperationNotFound
Constant Summary
collapse
- WSDL =
"http://www.nbrb.by/Services/ExRates.asmx?WSDL".freeze
- VERSION =
"0.0.2"
Class Method Summary
collapse
Methods included from Currencies
cleanup_rate_row, daily_rates
Class Method Details
.call(operation, params = {}) ⇒ Object
11
12
13
14
15
|
# File 'lib/nbrb-api.rb', line 11
def self.call(operation, params = {})
client.call(operation, params)
rescue Savon::UnknownOperationError => e
raise Nbrb::Api::OperationNotFound, "NBRB operation #{operation} was not found"
end
|
.client ⇒ Object
17
18
19
|
# File 'lib/nbrb-api.rb', line 17
def self.client
@client ||= Savon.client(wsdl: WSDL, log: false)
end
|