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
# File 'lib/gocardless_pro/resources/institution.rb', line 24

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']
  @logo_url = object['logo_url']
  @name = object['name']
  @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.



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

#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

Instance Method Details

#api_responseObject



36
37
38
# File 'lib/gocardless_pro/resources/institution.rb', line 36

def api_response
  ApiResponse.new(@response)
end

#to_hObject

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



41
42
43
# File 'lib/gocardless_pro/resources/institution.rb', line 41

def to_h
  @object
end