huginn_acumen_product_agent 2.2.0 → 2.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 +4 -4
- data/lib/huginn_acumen_product_agent/acumen_client.rb +3 -0
- data/lib/huginn_acumen_product_agent/acumen_product_agent.rb +1 -1
- data/lib/huginn_acumen_product_agent/concerns/alternate_products_query_concern.rb +2 -1
- data/lib/huginn_acumen_product_agent/concerns/inv_product_query_concern.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b32ee15c0e0653023d896ee63a5439bae4c2eb9dfb16598a60dd120418ab8799
|
4
|
+
data.tar.gz: 97cbc6fe17ea97e516bcaa2e284065fef4489ed6710f115acfd009fb1c39af2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14bf6cfa8310b3b0b9ab6ee9d75bc92d64c8c24e2f0f9c83e76b04a8bd864871d0379f9e757b0eee0a71082c8285c586c1d8a8df0ec07de63566f6ed5de173f2
|
7
|
+
data.tar.gz: b8b1947a71b6d54132fafb52c3b492ae56aec4100f4fc7138c6e8728d70acaf61979109de2b07568d0435a77a3517479427ace1bcdee5fd8accf7f953a54eabd
|
@@ -105,6 +105,8 @@ class AcumenClient
|
|
105
105
|
<column_name>Inv_Product.Not_Active</column_name>
|
106
106
|
<column_name>Inv_Product.Disable_Web_Purchase</column_name>
|
107
107
|
<column_name>Inv_Product.No_Backorder_Fill</column_name>
|
108
|
+
<column_name>Inv_Product.Non_Inventory</column_name>
|
109
|
+
<column_name>Inv_Product.Assembly</column_name>
|
108
110
|
</requested_output>
|
109
111
|
</acusoapRequest>
|
110
112
|
XML
|
@@ -237,6 +239,7 @@ class AcumenClient
|
|
237
239
|
<column_name>Product_Link.Link_From_ID</column_name>
|
238
240
|
<column_name>Product_Link.Link_To_ID</column_name>
|
239
241
|
<column_name>Product_Link.Alt_Format</column_name>
|
242
|
+
<column_name>Product_Link.Inactive</column_name>
|
240
243
|
</requested_output>
|
241
244
|
</acusoapRequest>
|
242
245
|
XML
|
@@ -261,7 +261,7 @@ module Agents
|
|
261
261
|
no_backorder_fill = product['noBackorderFill']
|
262
262
|
stock_quantity = stock_quantity.present? ? stock_quantity.to_i : 0
|
263
263
|
|
264
|
-
if (!product['isDigital'] && product['productAvailability'] == 'available')
|
264
|
+
if (!product['isDigital'] && product['productAvailability'] == 'available' && product['trackInventory'])
|
265
265
|
if ((publication_date && publication_date.to_datetime > DateTime.current().end_of_day) || (!no_backorder_fill && stock_quantity < 1))
|
266
266
|
product['productAvailability'] = 'preorder'
|
267
267
|
end
|
@@ -53,9 +53,10 @@ module AlternateProductsQueryConcern
|
|
53
53
|
'Product_Link.Link_From_ID' => 'from_id',
|
54
54
|
'Product_Link.Link_To_ID' => 'to_id',
|
55
55
|
'Product_Link.Alt_Format' => 'alt_format',
|
56
|
+
'Product_Link.Inactive' => 'inactive',
|
56
57
|
})
|
57
58
|
|
58
|
-
if mapped['alt_format'].to_s != '0' && !mapped.in?(results)
|
59
|
+
if mapped['inactive'] == '0' && mapped['alt_format'].to_s != '0' && !mapped.in?(results)
|
59
60
|
results.push(mapped)
|
60
61
|
end
|
61
62
|
|
@@ -46,6 +46,7 @@ module InvProductQueryConcern
|
|
46
46
|
product['isTaxable'] = get_field_value(p, 'Inv_Product.Taxable') == '1'
|
47
47
|
product['productAvailability'] = get_field_value(p, 'Inv_Product.Not_On_Website') == '0'
|
48
48
|
product['noBackorderFill'] = get_field_value(p, 'Inv_Product.No_Backorder_Fill') == '1'
|
49
|
+
product['trackInventory'] = !(get_field_value(p, 'Inv_Product.Non_Inventory') == '1' || get_field_value(p, 'Inv_Product.Assembly') == '1')
|
49
50
|
product['acumenAttributes'] = {
|
50
51
|
'info_alpha_1' => get_field_value(p, 'Inv_Product.Info_Alpha_1'),
|
51
52
|
'info_boolean_1' => get_field_value(p, 'Inv_Product.Info_Boolean_1'), # is_available_on_formed
|
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: 2.
|
4
|
+
version: 2.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: 2021-
|
11
|
+
date: 2021-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|