ruby_omx 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,13 +12,13 @@ module RubyOmx
12
12
 
13
13
  def initialize(attrs={})
14
14
  return super unless attrs.any?
15
- required_fields = [:item_code, :keycode, :type] #:item_code, :product_status, :product_name, :product_group, :tax_code, :file_sub_code, :inventory_product_flag, :launch_date
15
+ required_fields = [:item_code] #:item_code, :product_status, :product_name, :product_group, :tax_code, :file_sub_code, :inventory_product_flag, :launch_date
16
16
  raise MissingRequestOptions if required_fields.any? { |option| attrs[option].nil? }
17
17
  super
18
18
  self.version = attrs[:version] ||= '2.00'
19
19
  self.udi_parameters << RubyOmx::UDIParameter.new({:key=>'ItemCode', :value=>attrs[:item_code]})
20
- self.udi_parameters << RubyOmx::UDIParameter.new({:key=>'Keycode', :value=>attrs[:keycode]})
21
- self.udi_parameters << RubyOmx::UDIParameter.new({:key=>'Type', :value=>attrs[:type]})
20
+ self.udi_parameters << RubyOmx::UDIParameter.new({:key=>'Keycode', :value=>attrs[:keycode]}) if attrs[:keycode]
21
+ self.udi_parameters << RubyOmx::UDIParameter.new({:key=>'Type', :value=>attrs[:type]}) if attrs[:type]
22
22
  self.price_points = attrs[:price_points].collect { |h| PricePoint.new(h) }
23
23
  end
24
24
 
@@ -1,3 +1,3 @@
1
1
  module RubyOmx
2
- VERSION = "0.0.21"
2
+ VERSION = "0.0.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_omx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-13 00:00:00.000000000 Z
12
+ date: 2012-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: roxml