class SterlingApi::Api
Public Class Methods
new(mode)
click to toggle source
mode: prod or test
# File lib/sterling_api.rb, line 91 def initialize(mode) @mode = mode # test system password is 'Password2' until changed self end
Public Instance Methods
mode()
click to toggle source
# File lib/sterling_api.rb, line 97 def mode @mode.to_s =~ /prod/i ? :prod : :test end
order(background_check)
click to toggle source
# File lib/sterling_api.rb, line 101 def order(background_check) req = SterlingApi::RemoteActions::Request.new( :url => url(:order_one_step), :body => background_check.to_xml ) req.send_request end
password_change_request(password_change)
click to toggle source
# File lib/sterling_api.rb, line 109 def password_change_request(password_change) req = SterlingApi::RemoteActions::Request.new( :url => url(:password_change), :body => password_change.to_xml ) req.send_request end
url(type)
click to toggle source
# File lib/sterling_api.rb, line 117 def url(type) SterlingApi::URLS[mode][type][:url] end