Class: SynapsePayRest::Institutions

Inherits:
Object
  • Object
show all
Defined in:
lib/synapse_pay_rest/api/institutions.rb

Overview

Wrapper class for /institutions endpoints

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Institutions

Returns a new instance of Institutions.

Parameters:



10
11
12
# File 'lib/synapse_pay_rest/api/institutions.rb', line 10

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientSynapsePayRest::HTTPClient



7
8
9
# File 'lib/synapse_pay_rest/api/institutions.rb', line 7

def client
  @client
end

Instance Method Details

#getHash

TODO:

Probably should use CGI or RestClient’s param builder instead of

Sends a GET request to /v3.1/institutions endpoint.

HTTP response from API

rolling our own, probably error-prone and untested version github.com/rest-client/rest-client#usage-raw-url

Returns:

  • (Hash)

    API response

Raises:



25
26
27
28
# File 'lib/synapse_pay_rest/api/institutions.rb', line 25

def get()
  path = '/institutions'
  client.get(path)
end