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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f92df5343f7bddce53b734d7e08b20163fc02b159da82accf2b774cb5eb4d095
4
- data.tar.gz: 9ce26767383ff1b75aa168cc70291b98def9028bac9e41f827e2ffa2bc9155dd
3
+ metadata.gz: b32ee15c0e0653023d896ee63a5439bae4c2eb9dfb16598a60dd120418ab8799
4
+ data.tar.gz: 97cbc6fe17ea97e516bcaa2e284065fef4489ed6710f115acfd009fb1c39af2d
5
5
  SHA512:
6
- metadata.gz: 13f0a7b2b285fb4399026bbf68724557b0da9735a7e5cf055d928b402b3050d8e5137e8acd799dc9b7f26c9e5b836e4a5c636fe7dd079c4d7b5956973d8aa645
7
- data.tar.gz: 83fc6b6c51dab7825ba6eda45ac7f1aafaa44153274acc57b907ee48542067e7b654f8c74f1bfa5865a16ddeffd20c9d7d5e6b5fa113b98868ef6152198bee68
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.2.0
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-05-25 00:00:00.000000000 Z
11
+ date: 2021-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler