Class: RubyOmx::InventoryInfoRequest

Inherits:
Request show all
Defined in:
lib/ruby_omx/request/inventory_info_request.rb

Instance Attribute Summary

Attributes inherited from Request

#raw_xml

Instance Method Summary collapse

Methods inherited from Response

format, parse_xml

Methods inherited from Node

#accessors, #as_hash

Constructor Details

#initialize(attrs = {}) ⇒ InventoryInfoRequest

Returns a new instance of InventoryInfoRequest.



5
6
7
8
9
10
11
12
# File 'lib/ruby_omx/request/inventory_info_request.rb', line 5

def initialize(attrs={})
  return super unless attrs.any?
 raise MissingRequestOptions if attrs[:items].nil?
  super
  self.version = attrs[:version] ||= '1.00'
  self.udi_parameters << UDIParameter.new({:key=>'RealNonInventoryItemAvailability', :value=>attrs[:real_non_inventory_item_availability] || 'True' })      
  self.items = attrs[:items].collect { |h| Item.new(h) }
end