Class: GoCardlessPro::Resources::BankAccountDetail

Inherits:
Object
  • Object
show all
Defined in:
lib/gocardless_pro/resources/bank_account_detail.rb

Overview

Retrieve bank account details in JWE encrypted format

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, response = nil) ⇒ BankAccountDetail

Initialize a bank_account_detail resource instance

Parameters:

  • object (Hash)

    an object returned from the API



23
24
25
26
27
28
29
30
31
32
# File 'lib/gocardless_pro/resources/bank_account_detail.rb', line 23

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

  @ciphertext = object['ciphertext']
  @encrypted_key = object['encrypted_key']
  @iv = object['iv']
  @protected = object['protected']
  @tag = object['tag']
  @response = response
end

Instance Attribute Details

#ciphertextObject (readonly)

Returns the value of attribute ciphertext.



15
16
17
# File 'lib/gocardless_pro/resources/bank_account_detail.rb', line 15

def ciphertext
  @ciphertext
end

#encrypted_keyObject (readonly)

Returns the value of attribute encrypted_key.



16
17
18
# File 'lib/gocardless_pro/resources/bank_account_detail.rb', line 16

def encrypted_key
  @encrypted_key
end

#ivObject (readonly)

Returns the value of attribute iv.



17
18
19
# File 'lib/gocardless_pro/resources/bank_account_detail.rb', line 17

def iv
  @iv
end

#protectedObject (readonly)

Returns the value of attribute protected.



18
19
20
# File 'lib/gocardless_pro/resources/bank_account_detail.rb', line 18

def protected
  @protected
end

#tagObject (readonly)

Returns the value of attribute tag.



19
20
21
# File 'lib/gocardless_pro/resources/bank_account_detail.rb', line 19

def tag
  @tag
end

Instance Method Details

#api_responseObject



34
35
36
# File 'lib/gocardless_pro/resources/bank_account_detail.rb', line 34

def api_response
  ApiResponse.new(@response)
end

#to_hObject

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



39
40
41
# File 'lib/gocardless_pro/resources/bank_account_detail.rb', line 39

def to_h
  @object
end