huginn_acumen_product_agent 1.2.4 → 1.5.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: 2c8cfbf53d8090dc7bc819eb52788d1a3f4698cb6d68221194f1ffa763a034eb
4
- data.tar.gz: c7284b2bcf2f395bbda017927ffe3807b59cebfc37b049097dcecf5e25704f62
3
+ metadata.gz: 0ad21ecb6e4948cfc5ce3e2ee77e5538a64ba3dfb7335ff393e676cad02a1ca2
4
+ data.tar.gz: 19b6969752c7f30a562cb957aaada0e97c19e616d0e5c2e8cc078d2b79a6101c
5
5
  SHA512:
6
- metadata.gz: 9e2acf80aeaba0312afc6a6827c042a81a3c2efeddd636f67dac22c49783c671472ba84d53d34e1b6938d5e1e8700d6cfade6d520f0d493e5467b8dda3e54c00
7
- data.tar.gz: 3f961d4af521bd3db000ec7c91e315a63021d8d27c7428576eb7e6d4a6f7efa8ea333e40db3b417b67041f4e78e7c950b31b0388a442751d2e08bc169d797cbb
6
+ metadata.gz: 42e77906d862630e4cd5b8eb08de74fdadd904bb6b7955a910e53f985f19639fc04b3fc5f39e4039a5d7a7b473c1a1158176e2b5d0097849182b3e9fcf5abac8
7
+ data.tar.gz: 280c0e72c100b17369b2bf18c578b8b4b50844efa72ea328918bbeebbc2fd2db0e60c3181ea6ea6fe2731d938827730a86507113b0d8f5606f0bd261b709e082
@@ -93,6 +93,8 @@ class AcumenClient
93
93
  <column_name>Inv_Product.Info_Alpha_1</column_name>
94
94
  <column_name>Inv_Product.Info_Boolean_1</column_name>>
95
95
  <column_name>Inv_Product.Category</column_name>
96
+ <column_name>Inv_Product.Next_Release</column_name>
97
+ <column_name>Inv_Product.BO_Reason</column_name>
96
98
  </requested_output>
97
99
  </acusoapRequest>
98
100
  XML
@@ -141,6 +143,7 @@ class AcumenClient
141
143
  <column_name>ProdMkt.Info_Text_01</column_name>
142
144
  <column_name>ProdMkt.Info_Text_02</column_name>
143
145
  <column_name>ProdMkt.Religious_Text_Identifier</column_name>
146
+ <column_name>ProdMkt.Info_Alpha_07</column_name>
144
147
  </requested_output>
145
148
  </acusoapRequest>
146
149
  XML
@@ -106,6 +106,7 @@ module AcumenProductQueryConcern
106
106
  'Inv_Product.SubTitle' => 'disambiguatingDescription',
107
107
  'Inv_Product.ISBN_UPC' => 'isbn',
108
108
  'Inv_Product.Pub_Date' => 'datePublished',
109
+ 'Inv_Product.Next_Release' => 'releaseDate',
109
110
  })
110
111
  variant['@type'] = 'ProductModel'
111
112
  variant['isDefault'] = false
@@ -117,11 +118,13 @@ module AcumenProductQueryConcern
117
118
  variant['offers'] = [{
118
119
  '@type' => 'Offer',
119
120
  'price' => field_value(p, 'Inv_Product.Price_1'),
121
+ 'availability' => field_value(p, 'Inv_Product.BO_Reason')
120
122
  }]
121
123
  if field_value(p, 'Inv_Product.Price_2')
122
124
  variant['offers'].push({
123
125
  '@type' => 'Offer',
124
126
  'price' => field_value(p, 'Inv_Product.Price_2'),
127
+ 'availability' => field_value(p, 'Inv_Product.BO_Reason')
125
128
  })
126
129
  end
127
130
 
@@ -223,6 +226,7 @@ module AcumenProductQueryConcern
223
226
  'ProdMkt.Info_Text_01' => 'info_text_01',
224
227
  'ProdMkt.Info_Text_02' => 'info_text_02',
225
228
  'ProdMkt.Religious_Text_Identifier' => 'religious_text_identifier',
229
+ 'ProdMkt.Info_Alpha_07' => 'info_alpha_07',
226
230
  })
227
231
 
228
232
  results[mapped['product_id']] = mapped
@@ -276,6 +280,7 @@ module AcumenProductQueryConcern
276
280
  product['acumenAttributes']['extent_value'] = marketing['extent_value']
277
281
  product['acumenAttributes']['info_text_01'] = marketing['info_text_01']
278
282
  product['acumenAttributes']['info_text_02'] = marketing['info_text_02']
283
+ product['acumenAttributes']['info_alpha_07'] = marketing['info_alpha_07']
279
284
  product['acumenAttributes']['meta_description'] = marketing['meta_description']
280
285
  product['acumenAttributes']['religious_text_identifier'] = marketing['religious_text_identifier']
281
286
  product['acumenAttributes']['status'] = marketing['status']
@@ -293,9 +298,11 @@ module AcumenProductQueryConcern
293
298
  variant['depth'] = quantitative_value(
294
299
  marketing['thickness'], marketing['dimensions_unit_measure']
295
300
  )
296
- variant['weight'] = quantitative_value(
297
- marketing['weight'], marketing['weight_unit_measure']
298
- )
301
+ if variant['weight']['value'] == '0'
302
+ variant['weight'] = quantitative_value(
303
+ marketing['weight'], marketing['weight_unit_measure']
304
+ )
305
+ end
299
306
  end
300
307
  end
301
308
 
@@ -382,7 +389,7 @@ module AcumenProductQueryConcern
382
389
  next
383
390
  else
384
391
  physical_formats.each do |val|
385
- match = product['model'].select { |v| v[field_value(product, 'Inv_Product.Category')] == val }
392
+ match = product['model'].select { |v| v['acumenAttributes']['category'] == val }
386
393
 
387
394
  if match && match.length > 0
388
395
  match[0]['isDefault'] = true
@@ -391,7 +398,7 @@ module AcumenProductQueryConcern
391
398
  end
392
399
 
393
400
  digital_formats.each do |val|
394
- match = product['model'].select { |v| v[field_value(product, 'Inv_Product.Category')] == val }
401
+ match = product['model'].select { |v| v['acumenAttributes']['category'] == val }
395
402
 
396
403
  if match && match.length > 0
397
404
  match[0]['isDefault'] = true
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.4
4
+ version: 1.5.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-29 00:00:00.000000000 Z
11
+ date: 2020-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler