Module: PostcodeAnywhere::BankAccountValidation::Interactive
- Includes:
- Utils
- Included in:
- Client
- Defined in:
- lib/postcode_anywhere/bank_account_validation/interactive.rb
Constant Summary collapse
- API_VERSION =
'1.00'
- RETRIEVE_BY_SORTCODE_ENDPOINT =
"BankAccountValidation/Interactive/RetrieveBySortcode/v#{API_VERSION}/json.ws"
- VALIDATE_ACCOUNT_ENDPOINT =
"BankAccountValidation/Interactive/Validate/v#{API_VERSION}/json.ws"
Instance Method Summary collapse
- #retrieve_by_sortcode(sort_code, options = {}) ⇒ Object
- #validate_account(account_number, sort_code, options = {}) ⇒ Object
Methods included from Utils
#perform_with_object, #perform_with_objects
Instance Method Details
#retrieve_by_sortcode(sort_code, options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/postcode_anywhere/bank_account_validation/interactive.rb', line 18 def retrieve_by_sortcode(sort_code, = {}) .merge!('SortCode' => sort_code) perform_with_object( :get, RETRIEVE_BY_SORTCODE_ENDPOINT, , PostcodeAnywhere::BankAccountValidation::BankBranch ) end |
#validate_account(account_number, sort_code, options = {}) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/postcode_anywhere/bank_account_validation/interactive.rb', line 28 def validate_account(account_number, sort_code, = {}) .merge!('SortCode' => sort_code, 'AccountNumber' => account_number) perform_with_object( :get, VALIDATE_ACCOUNT_ENDPOINT, , PostcodeAnywhere::BankAccountValidation::ValidationResult ) end |