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
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 29 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.
24 25 26 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 24 def @authorised_at end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
24 25 26 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 24 def created_at @created_at end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
24 25 26 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 24 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
24 25 26 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 24 def id @id end |
#last_visited_at ⇒ Object (readonly)
Returns the value of attribute last_visited_at.
24 25 26 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 24 def last_visited_at @last_visited_at end |
#qr_code_url ⇒ Object (readonly)
Returns the value of attribute qr_code_url.
24 25 26 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 24 def qr_code_url @qr_code_url end |
#redirect_uri ⇒ Object (readonly)
Returns the value of attribute redirect_uri.
24 25 26 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 24 def redirect_uri @redirect_uri end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
24 25 26 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 24 def url @url end |
Instance Method Details
#api_response ⇒ Object
45 46 47 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 45 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
50 51 52 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 50 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
55 56 57 |
# File 'lib/gocardless_pro/resources/bank_authorisation.rb', line 55 def to_h @object end |