Class: Exchanger::GetItem::Request
- Inherits:
-
Operation::Request
- Object
- Operation::Request
- Exchanger::GetItem::Request
- Defined in:
- lib/exchanger/operations/get_item.rb
Instance Attribute Summary collapse
-
#base_shape ⇒ Object
Returns the value of attribute base_shape.
-
#item_ids ⇒ Object
Returns the value of attribute item_ids.
Attributes inherited from Operation::Request
Instance Method Summary collapse
-
#reset ⇒ Object
Reset request options to defaults.
- #to_xml ⇒ Object
Methods inherited from Operation::Request
#action, #headers, #initialize
Constructor Details
This class inherits a constructor from Exchanger::Operation::Request
Instance Attribute Details
#base_shape ⇒ Object
Returns the value of attribute base_shape.
7 8 9 |
# File 'lib/exchanger/operations/get_item.rb', line 7 def base_shape @base_shape end |
#item_ids ⇒ Object
Returns the value of attribute item_ids.
7 8 9 |
# File 'lib/exchanger/operations/get_item.rb', line 7 def item_ids @item_ids end |
Instance Method Details
#reset ⇒ Object
Reset request options to defaults.
10 11 12 13 |
# File 'lib/exchanger/operations/get_item.rb', line 10 def reset @item_ids = [] @base_shape = :all_properties end |
#to_xml ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/exchanger/operations/get_item.rb', line 15 def to_xml Nokogiri::XML::Builder.new do |xml| xml.send("soap:Envelope", "xmlns:soap" => NS["soap"]) do xml.send("soap:Body") do xml.GetItem("xmlns" => NS["m"], "xmlns:t" => NS["t"]) do xml.ItemShape do xml.send "t:BaseShape", base_shape.to_s.camelize end xml.ItemIds do item_ids.each do |item_id| xml.send("t:ItemId", "Id" => item_id) end end end end end end end |