Class: BankValInternational::GetSWIFT

Inherits:
Object
  • Object
show all
Defined in:
lib/BankValInternational.rb

Overview

BankValInternational::GetSWIFT

Class to control calls to getBankDetails2

Synopsis

requires ‘BankValInternational’

Instance Method Summary collapse

Instance Method Details

#bankval_int_getswift(*args) ⇒ Object

Method to control calls to getBankDetails2

Parameters

1.Return Format

must be either ‘json’, ‘xml’ or ‘csv’

2.Swift BIC 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



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/BankValInternational.rb', line 134

def bankval_int_getswift(*args)
  @format = args[0].downcase
  @swiftbic = 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