Class: Cb::Criteria::User::Delete

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Delete

Returns a new instance of Delete.



19
20
21
22
23
# File 'lib/cb/criteria/user/delete.rb', line 19

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

Instance Attribute Details

#external_idObject

Returns the value of attribute external_id.



17
18
19
# File 'lib/cb/criteria/user/delete.rb', line 17

def external_id
  @external_id
end

#passwordObject

Returns the value of attribute password.



17
18
19
# File 'lib/cb/criteria/user/delete.rb', line 17

def password
  @password
end

#testObject

Returns the value of attribute test.



17
18
19
# File 'lib/cb/criteria/user/delete.rb', line 17

def test
  @test
end

Instance Method Details

#to_xmlObject



25
26
27
28
29
30
31
32
33
34
# File 'lib/cb/criteria/user/delete.rb', line 25

def to_xml
  Nokogiri::XML::Builder.new do |xml|
    xml.Request do
      xml.DeveloperKey Cb.configuration.dev_key
      xml.Password password
      xml.ExternalID external_id
      xml.Test test # ruby has a builtin called test, confusion occurs :(
    end
  end.to_xml
end