class SterlingApi::PasswordChange
Public Class Methods
new(account, password, new_password, subaccount=nil)
click to toggle source
options:
:account :password :new_password
# File lib/sterling_api/password_change.rb, line 15 def initialize(account, password, new_password, subaccount=nil) @account, @password, @new_password, @subaccount = account, password, new_password, subaccount @xml = create_xml self end
Public Instance Methods
create_xml()
click to toggle source
# File lib/sterling_api/password_change.rb, line 39 def create_xml builder = Nokogiri::XML::Builder.new do |xml| xml.ChoicePointAdminRequest( :xmlns => 'http://www.cpscreen.com/schemas', :userId => 'XCHANGE', :account => "#{@account}#{@subaccount}", :password => @password ){ xml.ChangePassword{ xml.Account "#{@account}#{@subaccount}" xml.UserId 'XCHANGE' xml.Password @password xml.NewPassword @new_password } } end builder.to_xml end
to_xml()
click to toggle source
# File lib/sterling_api/password_change.rb, line 59 def to_xml self.class.soap_wrapper(@xml) end