Class: PostcodeAnywhere::BankAccountValidation::ValidationResult

Inherits:
ModelBase
  • Object
show all
Defined in:
lib/postcode_anywhere/bank_account_validation/validation_result.rb

Instance Attribute Summary collapse

Attributes inherited from ModelBase

#attrs

Method Summary

Methods inherited from ModelBase

attr_reader, define_attribute_method, define_predicate_method, #initialize, object_attr_reader, predicate_attr_reader

Constructor Details

This class inherits a constructor from PostcodeAnywhere::ModelBase

Instance Attribute Details

#bankObject (readonly)

The name of the banking institution.



43
44
45
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 43

def bank
  @bank
end

#bank_bicObject (readonly)

The banking institution’s BIC, also know as the SWIFT BIC.



46
47
48
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 46

def bank_bic
  @bank_bic
end

#branchObject (readonly)

The name of the account holding branch.



49
50
51
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 49

def branch
  @branch
end

#branch_bicObject (readonly)

The branch’s BIC.



52
53
54
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 52

def branch_bic
  @branch_bic
end

#chaps_supportedObject (readonly)

Indicates that the account supports the CHAPS service.



77
78
79
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 77

def chaps_supported
  @chaps_supported
end

#contact_address_line1Object (readonly)

Line 1 of the branch’s contact address. NB: This is the address to be used for BACs enquiries and may be a contact centre rather than the branch’s address.



56
57
58
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 56

def contact_address_line1
  @contact_address_line1
end

#contact_address_line2Object (readonly)

Line 2 of the branch’s contact address.



59
60
61
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 59

def contact_address_line2
  @contact_address_line2
end

#contact_faxObject (readonly)

The branch’s contact fax number.



71
72
73
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 71

def contact_fax
  @contact_fax
end

#contact_phoneObject (readonly)

The branch’s contact phone number.



68
69
70
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 68

def contact_phone
  @contact_phone
end

#contact_post_townObject (readonly)

The branch’s contact post town.



62
63
64
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 62

def contact_post_town
  @contact_post_town
end

#contact_postcodeObject (readonly)

The branch’s contact postcode.



65
66
67
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 65

def contact_postcode
  @contact_postcode
end

#corrected_account_numberObject (readonly)

The correct version of the AccountNumber. This will be 8 digits long and in the form expected for BACs submission.



37
38
39
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 37

def 
  @corrected_account_number
end

#corrected_sort_codeObject (readonly)

The correct version of the SortCode. This will be 6 digits long with no hyphens. It may differ from the original sortcode.



33
34
35
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 33

def corrected_sort_code
  @corrected_sort_code
end

#faster_payments_supportedObject (readonly)

Indicates that the account supports the faster payments service.



74
75
76
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 74

def faster_payments_supported
  @faster_payments_supported
end

#ibanObject (readonly)

The correctly formatted IBAN for the account.



40
41
42
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 40

def iban
  @iban
end

#is_correctObject (readonly)

Indicates whether the account number a sortcode are valid. Example: false



8
9
10
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 8

def is_correct
  @is_correct
end

#is_direct_debit_capableObject (readonly)

Indicates whether the account can accept direct debits. Certain accounts (e.g. savings) will not accept direct debits. Example: false



13
14
15
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 13

def is_direct_debit_capable
  @is_direct_debit_capable
end

#status_informationObject (readonly)

More detail about the outcome of the validation process. Describes reasons validation failed or changes made to pass validation. DetailsChanged indicates that the account and sortcode should be changed for BACs submission (check CorrectedAccountNumber and CorrectedSortCode). CautiousOK is set where the sortcode exists but no validation rules are set for the bank (very rare).

Values:

- None
- UnknownSortCode
- InvalidAccountNumber
- OK
- CautiousOK
- DetailsChanged


29
30
31
# File 'lib/postcode_anywhere/bank_account_validation/validation_result.rb', line 29

def status_information
  @status_information
end