Class: Exchanger::DeleteItem::Request

Inherits:
Operation::Request show all
Defined in:
lib/exchanger/operations/delete_item.rb

Instance Attribute Summary collapse

Attributes inherited from Operation::Request

#body, #response

Instance Method Summary collapse

Methods inherited from Operation::Request

#action, #headers, #initialize

Constructor Details

This class inherits a constructor from Exchanger::Operation::Request

Instance Attribute Details

#item_idsObject

Returns the value of attribute item_ids.



14
15
16
# File 'lib/exchanger/operations/delete_item.rb', line 14

def item_ids
  @item_ids
end

#send_meeting_cancellationsObject

Returns the value of attribute send_meeting_cancellations.



14
15
16
# File 'lib/exchanger/operations/delete_item.rb', line 14

def send_meeting_cancellations
  @send_meeting_cancellations
end

Instance Method Details

#resetObject

Reset request options to defaults.



17
18
19
# File 'lib/exchanger/operations/delete_item.rb', line 17

def reset
  @item_ids = []
end

#to_xmlObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/exchanger/operations/delete_item.rb', line 21

def to_xml
  Nokogiri::XML::Builder.new do |xml|
    xml.send("soap:Envelope", "xmlns:soap" => NS["soap"], "xmlns:t" => NS["t"], "xmlns:xsi" => NS["xsi"], "xmlns:xsd" => NS["xsd"]) do
      xml.send("soap:Body") do
        xml.DeleteItem(delete_item_attributes) do
          xml.ItemIds do
            item_ids.each do |item_id|
              xml["t"].ItemId("Id" => item_id)
            end
          end
        end
      end
    end
  end
end