class Branch

Public Class Methods

apiKey() click to toggle source
# File lib/capital_one/branch.rb, line 11
def self.apiKey
        return Config.apiKey
end
getAll() click to toggle source

getAll

Gets all branches
Returns an array of Hashes with the branch data
# File lib/capital_one/branch.rb, line 21
def self.getAll
        url = "#{self.urlWithEntity}?key=#{self.apiKey}"
        resp = Net::HTTP.get_response(URI.parse(url))
        data = JSON.parse(resp.body)
end
getOne(id) click to toggle source

getOne

Gets one branch for a given ID

Parameters: AtmId

Returns a hash with the ATM data
# File lib/capital_one/branch.rb, line 32
def self.getOne(id)
        url = "#{self.urlWithEntity}/#{id}?key=#{self.apiKey}"
        resp = Net::HTTP.get_response(URI.parse(url))
        data = JSON.parse(resp.body)  
end
url() click to toggle source
# File lib/capital_one/branch.rb, line 3
def self.url
        return Config.baseUrl
end
urlWithEntity() click to toggle source
# File lib/capital_one/branch.rb, line 7
def self.urlWithEntity
        return Config.baseUrl + "/branches"
end