Class: GoCardlessPro::Resources::Institution

Inherits:
Object
  • Object
show all
Defined in:
lib/gocardless_pro/resources/institution.rb

Overview

Institutions that are supported when creating Bank Authorisations (https://developer.gocardless.com/api-reference/#billing-requests-bank-authorisations) for a particular country or purpose.

Not all institutions support both Payment Initiation (PIS) and Account Information (AIS) services.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, response = nil) ⇒ Institution

Initialize a institution resource instance

Parameters:

  • object (Hash)

    an object returned from the API



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/gocardless_pro/resources/institution.rb', line 31

def initialize(object, response = nil)
  @object = object

  @autocompletes_collect_bank_account = object['autocompletes_collect_bank_account']
  @country_code = object['country_code']
  @icon_url = object['icon_url']
  @id = object['id']
  @limits = object['limits']
  @logo_url = object['logo_url']
  @name = object['name']
  @status = object['status']
  @response = response
end

Instance Attribute Details

#autocompletes_collect_bank_accountObject (readonly)

Returns the value of attribute autocompletes_collect_bank_account.



20
21
22
# File 'lib/gocardless_pro/resources/institution.rb', line 20

def 
  @autocompletes_collect_bank_account
end

#country_codeObject (readonly)

Returns the value of attribute country_code.



21
22
23
# File 'lib/gocardless_pro/resources/institution.rb', line 21

def country_code
  @country_code
end

#icon_urlObject (readonly)

Returns the value of attribute icon_url.



22
23
24
# File 'lib/gocardless_pro/resources/institution.rb', line 22

def icon_url
  @icon_url
end

#idObject (readonly)

Returns the value of attribute id.



23
24
25
# File 'lib/gocardless_pro/resources/institution.rb', line 23

def id
  @id
end

#limitsObject (readonly)

Returns the value of attribute limits.



24
25
26
# File 'lib/gocardless_pro/resources/institution.rb', line 24

def limits
  @limits
end

#logo_urlObject (readonly)

Returns the value of attribute logo_url.



25
26
27
# File 'lib/gocardless_pro/resources/institution.rb', line 25

def logo_url
  @logo_url
end

#nameObject (readonly)

Returns the value of attribute name.



26
27
28
# File 'lib/gocardless_pro/resources/institution.rb', line 26

def name
  @name
end

#statusObject (readonly)

Returns the value of attribute status.



27
28
29
# File 'lib/gocardless_pro/resources/institution.rb', line 27

def status
  @status
end

Instance Method Details

#api_responseObject



45
46
47
# File 'lib/gocardless_pro/resources/institution.rb', line 45

def api_response
  ApiResponse.new(@response)
end

#to_hObject

Provides the institution resource as a hash of all its readable attributes



50
51
52
# File 'lib/gocardless_pro/resources/institution.rb', line 50

def to_h
  @object
end