class GoCardlessPro::Resources::BankAuthorisation

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.

Attributes

authorisation_type[R]
authorised_at[R]
created_at[R]
expires_at[R]
id[R]
last_visited_at[R]
redirect_uri[R]
url[R]

Public Class Methods

new(object, response = nil) click to toggle source

Initialize a bank_authorisation resource instance @param object [Hash] an object returned from the API

# File lib/gocardless_pro/resources/bank_authorisation.rb, line 37
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']
  @redirect_uri = object['redirect_uri']
  @url = object['url']
  @response = response
end

Public Instance Methods

api_response() click to toggle source
# File lib/gocardless_pro/resources/bank_authorisation.rb, line 52
def api_response
  ApiResponse.new(@response)
end
to_h() click to toggle source

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

# File lib/gocardless_pro/resources/bank_authorisation.rb, line 62
def to_h
  @object
end