scrubdeku 0.2.0.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/scrubdeku.rb +8 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d11fca1b4475469bc063760ca9d10f81f896437d
|
4
|
+
data.tar.gz: 06bfef9c74825477295580dcca96bcefa9a1e7ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f67717d585088331d0ed2be082e1193c1dec1878d500537f73ebc1b1ec0445e68790ab0bc6147f44379caa370cc5c0de263f9b008b8bfd0c6fa8f6764ee40e1
|
7
|
+
data.tar.gz: '08620a372403319c3a27aea8947806983ba4bc0694f189324758118b3d0f66dd64e17aaeac2729ac13c9849f2086eeb2253785214bbcd34ba5a34947ef7f334a'
|
data/lib/scrubdeku.rb
CHANGED
@@ -156,11 +156,15 @@ module Scrub
|
|
156
156
|
orderData = @data[:order][:items][:order_item]
|
157
157
|
if orderData.kind_of? Array
|
158
158
|
orderData.each do |item|
|
159
|
-
|
160
|
-
|
161
|
-
|
159
|
+
begin
|
160
|
+
buildout = {}
|
161
|
+
item[:bundle_items][:order_bundle_item].each do |bundleItem|
|
162
|
+
buildout.merge!("#{bundleItem[:product_id]}" => {'qtyEach' => bundleItem[:qty], 'qtyTotal' => bundleItem[:total_qty]})
|
163
|
+
end
|
164
|
+
productTable[item[:product_id]] = {"qty" => item[:qty], "description" => item[:display_name], 'components' => buildout}
|
165
|
+
rescue NoMethodError
|
166
|
+
next
|
162
167
|
end
|
163
|
-
productTable[item[:product_id]] = {"qty" => item[:qty], "description" => item[:display_name], 'components' => buildout}
|
164
168
|
end
|
165
169
|
elsif orderData.kind_of? Hash
|
166
170
|
buildout = {}
|