Class: Bci::Stats

Inherits:
Base
  • Object
show all
Defined in:
lib/bci/stats.rb

Overview

The class for BCI indicadores API

Constant Summary

Constants inherited from Base

Base::BASE_URL

Instance Method Summary collapse

Methods inherited from Base

#connector, #headers, #initialize, #response_checker, #url

Constructor Details

This class inherits a constructor from Bci::Base

Instance Method Details

#atmObject



25
26
27
28
29
30
# File 'lib/bci/stats.rb', line 25

def atm
  local_url = "#{url}/cajeros"
  response_checker(connector.get(local_url, headers))
rescue RestClient::InternalServerError => e
  puts e
end

#branch_officesObject



18
19
20
21
22
23
# File 'lib/bci/stats.rb', line 18

def branch_offices
  local_url = "#{url}/sucursales"
  response_checker(connector.get(local_url, headers))
rescue RestClient::InternalServerError => e
  puts e
end

#indicatorsObject



10
11
12
13
14
15
16
# File 'lib/bci/stats.rb', line 10

def indicators
  local_url = "#{url}/indicadores"
  puts local_url
  response_checker(connector.get(local_url, headers))
rescue RestClient::InternalServerError => e
  puts e
end

#submoduleObject



6
7
8
# File 'lib/bci/stats.rb', line 6

def submodule
  'info-banco'
end