Class: BankValInternational::GetIBAN
- Inherits:
-
Object
- Object
- BankValInternational::GetIBAN
- Defined in:
- lib/BankValInternational.rb
Overview
BankValInternational::GetIban
Class to control calls to IBANValidate
Synopsis
requires ‘BankValInternational’
Instance Method Summary collapse
-
#bankval_int_ibanval(*args) ⇒ Object
Method to control calls to IBANValidate.
Instance Method Details
#bankval_int_ibanval(*args) ⇒ Object
Method to control calls to IBANValidate
Parameters
- 1.Return Format
-
must be either ‘json’, ‘xml’ or ‘csv’
- 2.Iban Number
-
the number for validation
- 3.UserId
-
can obtained from www.unifiedsoftware.co.uk/freetrial/free-trial-home.html
- 4.PIN
-
can obtained from www.unifiedsoftware.co.uk/freetrial/free-trial-home.html
The parameters must be passed in the order shown above
Returns
The response from the webservice is returned as a string in either: *XML format *json format *csv format depending on the Return Format Parameter passed in
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/BankValInternational.rb', line 53 def bankval_int_ibanval(*args) @format = args[0].downcase @iban = args[1] @userid = args[2] @pin = args[3] if args.size !=4 return "ERROR - not enough parameters supplied" end format_validation if @error_string != nil format_error_string return @error_string end build_req_url return "#{BankValInternational::GoValidate.new.validate(@service_url)}" end |