Module: ProveUru

Defined in:
lib/prove_uru.rb,
lib/prove_uru/version.rb

Defined Under Namespace

Classes: Authenticate, AuthenticationResult, FreeAddress, PersonalData, Profile, ProfileList, UkAddress, UkData

Constant Summary collapse

XML_NAMESPACE =
"https://www.prove-uru.co.uk/"
TEST_BASE_URL =
"https://pilot.prove-uru.co.uk:8443/"
LIVE_BASE_URL =
"https://www.prove-uru.co.uk:8443/"
PROVE_SERVICE_ROOT =
"URUWS"
VERSION =
"0.0.1"
@@current_version =
"10a"
@@test_mode =
false
@@account_name =
nil
@@password =
nil

Class Method Summary collapse

Class Method Details

.create_clientObject



49
50
51
52
53
54
# File 'lib/prove_uru.rb', line 49

def self.create_client
  ::Savon::Client.new do
    wsdl.document = self.get_service_wsdl
    wsdl.namespace = XML_NAMESPACE
  end
end

.get_service_wsdlObject



44
45
46
47
# File 'lib/prove_uru.rb', line 44

def self.get_service_wsdl
  root = @@test_mode ?  TEST_BASE_URL : LIVE_BASE_URL
  "#{root}#{PROVE_SERVICE_ROOT}/URU#{@@current_version}.asmx?wsdl"
end

.merge_prove_password_hash(options = {}) ⇒ Object



56
57
58
59
60
61
62
63
64
65
# File 'lib/prove_uru.rb', line 56

def self.merge_prove_password_hash(options = {})
  raise "ProveURU Account Name and/or Password Have Not Been Set" if @@account_name.nil? || @@password.nil?
  
  password_hash = {
    "AccountName" => @@account_name,
    "Password" => @@password
  }
  
  options.merge!(password_hash)
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (ProveUru)

    the object that the method was called on



40
41
42
# File 'lib/prove_uru.rb', line 40

def self.setup
  yield self
end