Class: RubyOmx::ItemUpdateRequest
- Defined in:
- lib/ruby_omx/request/item_update_request.rb
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ ItemUpdateRequest
constructor
A new instance of ItemUpdateRequest.
Methods inherited from Response
Methods inherited from Node
Constructor Details
#initialize(attrs = {}) ⇒ ItemUpdateRequest
Returns a new instance of ItemUpdateRequest.
29 30 31 32 33 34 35 36 |
# File 'lib/ruby_omx/request/item_update_request.rb', line 29 def initialize(attrs={}) return super unless attrs.any? required_fields = [:items] #:item_code, :product_status, :product_name, :product_group, :tax_code, :file_sub_code, :inventory_product_flag, :launch_date raise MissingRequestOptions if required_fields.any? { |option| attrs[option].nil? } super self.version = attrs[:version] ||= '2.00' self.items = attrs[:items].collect { |h| ItemUpdateItem.new(h) } end |