Class: RubyOmx::ItemInfoRequest

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

Instance Attribute Summary collapse

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 = {}) ⇒ ItemInfoRequest

Returns a new instance of ItemInfoRequest.



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

def initialize(attrs={})
  return super unless attrs.any?
 raise MissingRequestOptions if attrs[:item_code].nil?
  super
  self.version = attrs[:version] ||= '1.00'
  self.udi_parameters << UDIParameter.new({:key=>'ItemCode', :value=>attrs[:item_code]})      
end

Instance Attribute Details

#item_codeObject

Returns the value of attribute item_code.



13
14
15
# File 'lib/ruby_omx/request/item_info_request.rb', line 13

def item_code
  @item_code
end