huginn_acumen_product_agent 1.2.2 → 1.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a99adb8ef72e51a149b349a6acf70a67e5508d54288d5d06e560e1cc686748a
4
- data.tar.gz: ff73fc37c85d3a181348b0494d4844e5b30fa96db548c554c1d2a46c59e1fc21
3
+ metadata.gz: 66d5a4f9cc1e03ceb98d0ade524482571770bc455f303b35a10ae8d6f64611d5
4
+ data.tar.gz: ece29b484441dacd6a51b891dfbb4ab25a9fde1a28b0b1864302563e9e084703
5
5
  SHA512:
6
- metadata.gz: cae798dcb83e98878a4537ae76727233faac0d6ee375172fcbb0ba23a639e489d7035546220da5136ccdac3adbf56f222f0f4451632991e04528de3198e5fbb7
7
- data.tar.gz: 5d7177a669c4ab7f990f0d19cd5e6ffa9f35bd837a2d044f8bd8bc6cd8e92061261405e006d2285d3679549ac2e1de7f156e9c2d0894b048be909a16c968c734
6
+ metadata.gz: fc8a70be138bf5ab4fe2be007ed2280bd2599784f2170b071d6933987dc348e323fc9c14529c96d5dc0f11bc3c66977c518e64576b15bf89c2f17bab730ddc82
7
+ data.tar.gz: 707344746b37b2fe801d639a1489d29d56ea8bbf69f8ce50ee5b31545163864d9872045f191c99b158233de63715d3d4d35c19d5418581cb51f59a53afd4201f
@@ -293,9 +293,11 @@ module AcumenProductQueryConcern
293
293
  variant['depth'] = quantitative_value(
294
294
  marketing['thickness'], marketing['dimensions_unit_measure']
295
295
  )
296
- variant['weight'] = quantitative_value(
297
- marketing['weight'], marketing['weight_unit_measure']
298
- )
296
+ if variant['weight']['value'] == '0'
297
+ variant['weight'] = quantitative_value(
298
+ marketing['weight'], marketing['weight_unit_measure']
299
+ )
300
+ end
299
301
  end
300
302
  end
301
303
 
@@ -382,19 +384,19 @@ module AcumenProductQueryConcern
382
384
  next
383
385
  else
384
386
  physical_formats.each do |val|
385
- match = product['model'].select { |v| v[field_value(product, 'Inv_Product.Category')] == val }
387
+ match = product['model'].select { |v| v['acumenAttributes']['category'] == val }
386
388
 
387
- if match
388
- match['isDefault'] = true
389
+ if match && match.length > 0
390
+ match[0]['isDefault'] = true
389
391
  break
390
392
  end
391
393
  end
392
394
 
393
395
  digital_formats.each do |val|
394
- match = product['model'].select { |v| v[field_value(product, 'Inv_Product.Category')] == val }
396
+ match = product['model'].select { |v| v['acumenAttributes']['category'] == val }
395
397
 
396
- if match
397
- match['isDefault'] = true
398
+ if match && match.length > 0
399
+ match[0]['isDefault'] = true
398
400
  break
399
401
  end
400
402
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huginn_acumen_product_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Spizziri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-27 00:00:00.000000000 Z
11
+ date: 2020-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler