huginn_acumen_product_agent 1.2.5 → 1.5.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96b074d16608b20299c0c1bd7292bd060c28bef20290938b240cf96b15543d2d
|
4
|
+
data.tar.gz: 1bbaabd459e91d72240568816d9c4df03c7fb6dfee73f2adedaa01dbe2df2c47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04cd9b20490eefafff31faa38afc4500a90f54d9cf53f2acf33181d652657b5fe90ef7a60ed6c21c5f58451aa7a27ec9e7bb606ee7cdfcfe81fe64294ff08e74
|
7
|
+
data.tar.gz: 35688020d94feb470257944770b2bd8b9d22334e1a67a70da12b41e26a962abc8bcd3f594c659901b6068afbd8a8aa05242f4bbce57a105f2d4e83fb028f7e04
|
@@ -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']
|
297
|
-
|
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
|
|
@@ -368,9 +375,11 @@ module AcumenProductQueryConcern
|
|
368
375
|
links.each do |link|
|
369
376
|
from_id = link['from_id']
|
370
377
|
to_id = link['to_id']
|
371
|
-
|
372
|
-
|
373
|
-
|
378
|
+
if variants_map.key?(to_id)
|
379
|
+
variant = variants_map[to_id]
|
380
|
+
variant['isDefault'] = false
|
381
|
+
products_map[from_id]['model'].push(*variant['model'])
|
382
|
+
end
|
374
383
|
end
|
375
384
|
|
376
385
|
result = []
|
@@ -382,7 +391,7 @@ module AcumenProductQueryConcern
|
|
382
391
|
next
|
383
392
|
else
|
384
393
|
physical_formats.each do |val|
|
385
|
-
match = product['model'].select { |v| v[
|
394
|
+
match = product['model'].select { |v| v['acumenAttributes']['category'] == val }
|
386
395
|
|
387
396
|
if match && match.length > 0
|
388
397
|
match[0]['isDefault'] = true
|
@@ -391,7 +400,7 @@ module AcumenProductQueryConcern
|
|
391
400
|
end
|
392
401
|
|
393
402
|
digital_formats.each do |val|
|
394
|
-
match = product['model'].select { |v| v[
|
403
|
+
match = product['model'].select { |v| v['acumenAttributes']['category'] == val }
|
395
404
|
|
396
405
|
if match && match.length > 0
|
397
406
|
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.
|
4
|
+
version: 1.5.1
|
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-
|
11
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|