Class: PostcodeAnywhere::BankAccountValidationResponse
- Inherits:
-
Object
- Object
- PostcodeAnywhere::BankAccountValidationResponse
- Defined in:
- lib/postcodeanywhere_banking.rb
Instance Attribute Summary collapse
-
#bank ⇒ Object
readonly
Returns the value of attribute bank.
-
#bank_bic ⇒ Object
readonly
Returns the value of attribute bank_bic.
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#branch_bic ⇒ Object
readonly
Returns the value of attribute branch_bic.
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#chaps_supported ⇒ Object
readonly
Returns the value of attribute chaps_supported.
-
#contact_address_line1 ⇒ Object
readonly
Returns the value of attribute contact_address_line1.
-
#contact_address_line2 ⇒ Object
readonly
Returns the value of attribute contact_address_line2.
-
#contact_fax ⇒ Object
readonly
Returns the value of attribute contact_fax.
-
#contact_phone ⇒ Object
readonly
Returns the value of attribute contact_phone.
-
#contact_post_town ⇒ Object
readonly
Returns the value of attribute contact_post_town.
-
#contact_postcode ⇒ Object
readonly
Returns the value of attribute contact_postcode.
-
#corrected_account_number ⇒ Object
readonly
Returns the value of attribute corrected_account_number.
-
#corrected_sort_code ⇒ Object
readonly
Returns the value of attribute corrected_sort_code.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#faster_payments_supported ⇒ Object
readonly
Returns the value of attribute faster_payments_supported.
-
#iban ⇒ Object
readonly
Returns the value of attribute iban.
-
#is_correct ⇒ Object
readonly
Returns the value of attribute is_correct.
-
#is_direct_debit_capable ⇒ Object
readonly
Returns the value of attribute is_direct_debit_capable.
-
#resolution ⇒ Object
readonly
Returns the value of attribute resolution.
-
#status_information ⇒ Object
readonly
Returns the value of attribute status_information.
Instance Method Summary collapse
-
#initialize(res = {}) ⇒ BankAccountValidationResponse
constructor
A new instance of BankAccountValidationResponse.
Constructor Details
#initialize(res = {}) ⇒ BankAccountValidationResponse
Returns a new instance of BankAccountValidationResponse.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/postcodeanywhere_banking.rb', line 40 def initialize(res = {}) res.keys.each do |att| instance_variable_set "@#{underscore(att)}".to_sym, res[att] end @error = res["Error"] ? true : false if @error @error_code = res["Error"] @error_message = "#{@description}: #{@cause} #{@resolution}" else ["@is_correct", "@is_direct_debit_capable", "@faster_payments_supported", "@chaps_supported"].each do |att| instance_variable_set att.to_sym, (instance_variable_get(att) == "True" ? true : false) end end end |
Instance Attribute Details
#bank ⇒ Object (readonly)
Returns the value of attribute bank.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def bank @bank end |
#bank_bic ⇒ Object (readonly)
Returns the value of attribute bank_bic.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def bank_bic @bank_bic end |
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def branch @branch end |
#branch_bic ⇒ Object (readonly)
Returns the value of attribute branch_bic.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def branch_bic @branch_bic end |
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
38 39 40 |
# File 'lib/postcodeanywhere_banking.rb', line 38 def cause @cause end |
#chaps_supported ⇒ Object (readonly)
Returns the value of attribute chaps_supported.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def chaps_supported @chaps_supported end |
#contact_address_line1 ⇒ Object (readonly)
Returns the value of attribute contact_address_line1.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def contact_address_line1 @contact_address_line1 end |
#contact_address_line2 ⇒ Object (readonly)
Returns the value of attribute contact_address_line2.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def contact_address_line2 @contact_address_line2 end |
#contact_fax ⇒ Object (readonly)
Returns the value of attribute contact_fax.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def contact_fax @contact_fax end |
#contact_phone ⇒ Object (readonly)
Returns the value of attribute contact_phone.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def contact_phone @contact_phone end |
#contact_post_town ⇒ Object (readonly)
Returns the value of attribute contact_post_town.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def contact_post_town @contact_post_town end |
#contact_postcode ⇒ Object (readonly)
Returns the value of attribute contact_postcode.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def contact_postcode @contact_postcode end |
#corrected_account_number ⇒ Object (readonly)
Returns the value of attribute corrected_account_number.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def corrected_account_number @corrected_account_number end |
#corrected_sort_code ⇒ Object (readonly)
Returns the value of attribute corrected_sort_code.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def corrected_sort_code @corrected_sort_code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
38 39 40 |
# File 'lib/postcodeanywhere_banking.rb', line 38 def description @description end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
38 39 40 |
# File 'lib/postcodeanywhere_banking.rb', line 38 def error @error end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
38 39 40 |
# File 'lib/postcodeanywhere_banking.rb', line 38 def error_code @error_code end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
38 39 40 |
# File 'lib/postcodeanywhere_banking.rb', line 38 def @error_message end |
#faster_payments_supported ⇒ Object (readonly)
Returns the value of attribute faster_payments_supported.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def faster_payments_supported @faster_payments_supported end |
#iban ⇒ Object (readonly)
Returns the value of attribute iban.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def iban @iban end |
#is_correct ⇒ Object (readonly)
Returns the value of attribute is_correct.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def is_correct @is_correct end |
#is_direct_debit_capable ⇒ Object (readonly)
Returns the value of attribute is_direct_debit_capable.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def is_direct_debit_capable @is_direct_debit_capable end |
#resolution ⇒ Object (readonly)
Returns the value of attribute resolution.
38 39 40 |
# File 'lib/postcodeanywhere_banking.rb', line 38 def resolution @resolution end |
#status_information ⇒ Object (readonly)
Returns the value of attribute status_information.
35 36 37 |
# File 'lib/postcodeanywhere_banking.rb', line 35 def status_information @status_information end |