Class: Cb::Criteria::User::ChangePassword

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/criteria/user/change_password.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ ChangePassword

Returns a new instance of ChangePassword.



8
9
10
11
12
13
# File 'lib/cb/criteria/user/change_password.rb', line 8

def initialize(args = {})
  @external_id                  = args[:external_id]   || ''
  @old_password                 = args[:old_password]  || ''
  @new_password                 = args[:new_password]  || ''
  @test                         = args[:test]          || 'false'
end

Instance Attribute Details

#external_idObject

Returns the value of attribute external_id.



7
8
9
# File 'lib/cb/criteria/user/change_password.rb', line 7

def external_id
  @external_id
end

#new_passwordObject

Returns the value of attribute new_password.



7
8
9
# File 'lib/cb/criteria/user/change_password.rb', line 7

def new_password
  @new_password
end

#old_passwordObject

Returns the value of attribute old_password.



7
8
9
# File 'lib/cb/criteria/user/change_password.rb', line 7

def old_password
  @old_password
end

#testObject

Returns the value of attribute test.



7
8
9
# File 'lib/cb/criteria/user/change_password.rb', line 7

def test
  @test
end

Instance Method Details

#to_xmlObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/cb/criteria/user/change_password.rb', line 15

def to_xml
  Nokogiri::XML::Builder.new do |xml|
    xml.Request {
      xml.DeveloperKey Cb.configuration.dev_key
      xml.ExternalID    external_id
      xml.OldPassword   old_password
      xml.NewPassword   new_password
      xml.Test          test
    }
  end.to_xml
end