Class: RubyOmx::CustomItemInfoRequest

Inherits:
Request show all
Defined in:
lib/ruby_omx/request/custom_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 = {}) ⇒ CustomItemInfoRequest

Returns a new instance of CustomItemInfoRequest.



5
6
7
8
9
10
11
12
13
# File 'lib/ruby_omx/request/custom_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] ||= '2.00'
  self.udi_parameters << UDIParameter.new({:key=>'ItemCode', :value=>attrs[:item_code]})
  self.udi_parameters << UDIParameter.new({:key=>'AttributeGroupID', :value=>(attrs[:attribute_group_id]||='All')})
  
end

Instance Attribute Details

#attribute_group_idObject

Returns the value of attribute attribute_group_id.



14
15
16
# File 'lib/ruby_omx/request/custom_item_info_request.rb', line 14

def attribute_group_id
  @attribute_group_id
end

#item_codeObject

Returns the value of attribute item_code.



14
15
16
# File 'lib/ruby_omx/request/custom_item_info_request.rb', line 14

def item_code
  @item_code
end