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](#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



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/gocardless_pro/resources/institution.rb', line 24

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

   = 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 
  
end

#country_codeObject (readonly)

Returns the value of attribute country_code.



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

def country_code
  @country_code
end

#icon_urlObject (readonly)

Returns the value of attribute icon_url.



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

def icon_url
  @icon_url
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#limitsObject (readonly)

Returns the value of attribute limits.



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

def limits
  @limits
end

#logo_urlObject (readonly)

Returns the value of attribute logo_url.



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

def logo_url
  @logo_url
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

Instance Method Details

#api_responseObject



38
39
40
# File 'lib/gocardless_pro/resources/institution.rb', line 38

def api_response
  ApiResponse.new(@response)
end

#to_hObject

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



43
44
45
# File 'lib/gocardless_pro/resources/institution.rb', line 43

def to_h
  @object
end