Class: GoCardlessPro::Resources::BankAuthorisation
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::BankAuthorisation
- Defined in:
- lib/gocardless_pro/resources/bank_authorisation.rb
Overview
Bank Authorisations can be used to authorise Billing Requests. Authorisations are created against a specific bank, usually the bank that provides the payer's account.
Creation of Bank Authorisations is only permitted from GoCardless hosted UIs (see Billing Request Flows) to ensure we meet regulatory requirements for checkout flows.
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#authorisation_type ⇒ Object
readonly
Returns the value of attribute authorisation_type.
-
#authorised_at ⇒ Object
readonly
Returns the value of attribute authorised_at.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_visited_at ⇒ Object
readonly
Returns the value of attribute last_visited_at.
-
#qr_code_url ⇒ Object
readonly
Returns the value of attribute qr_code_url.
-
#redirect_uri ⇒ Object
readonly
Returns the value of attribute redirect_uri.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ BankAuthorisation
constructor
Initialize a bank_authorisation resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the bank_authorisation resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ BankAuthorisation
Initialize a bank_authorisation resource instance
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 36 def initialize(object, response = nil) @object = object @authorisation_type = object['authorisation_type'] @authorised_at = object['authorised_at'] @created_at = object['created_at'] @expires_at = object['expires_at'] @id = object['id'] @last_visited_at = object['last_visited_at'] @links = object['links'] @qr_code_url = object['qr_code_url'] @redirect_uri = object['redirect_uri'] @url = object['url'] @response = response end |
Instance Attribute Details
#authorisation_type ⇒ Object (readonly)
Returns the value of attribute authorisation_type.
24 25 26 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 24 def @authorisation_type end |
#authorised_at ⇒ Object (readonly)
Returns the value of attribute authorised_at.
25 26 27 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 25 def @authorised_at end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
26 27 28 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 26 def created_at @created_at end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
27 28 29 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 27 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
28 29 30 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 28 def id @id end |
#last_visited_at ⇒ Object (readonly)
Returns the value of attribute last_visited_at.
29 30 31 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 29 def last_visited_at @last_visited_at end |
#qr_code_url ⇒ Object (readonly)
Returns the value of attribute qr_code_url.
30 31 32 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 30 def qr_code_url @qr_code_url end |
#redirect_uri ⇒ Object (readonly)
Returns the value of attribute redirect_uri.
31 32 33 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 31 def redirect_uri @redirect_uri end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
32 33 34 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 32 def url @url end |
Instance Method Details
#api_response ⇒ Object
52 53 54 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 52 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
57 58 59 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 57 def links @bank_authorisation_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the bank_authorisation resource as a hash of all its readable attributes
62 63 64 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 62 def to_h @object end |