second_amendment_wholesale 1.0.3 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '068e6a9358e35613a2b4cfd752990ccd36a9e54a2f886a081862ea858a4cab0d'
|
4
|
+
data.tar.gz: fc38b1cbd2b0f669b945df91eb9bd1d2e48c0201630c48b1b555ef07f3ce96f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 393f6c17baaa50ef639a1592ef6fdbe6b26d5f76ad4e098aaa5f1f20cffcf3ca272e73c6f2b8320ae1e4a51a66ca873cc1cd1c2b458c5919cede8937ffb1ff5b
|
7
|
+
data.tar.gz: 3267cadd1166a63c085d7d03d994f6bb8fdd0212108b7a91db833b5daaa9c77803b676df77380ccb0414eb1cbc2e6efc53a486a123513a950410c141e3604e97
|
@@ -28,7 +28,7 @@ module SecondAmendmentWholesale
|
|
28
28
|
response = get_request("feed/productV2", @headers)
|
29
29
|
|
30
30
|
response.body.each do |item|
|
31
|
-
products << map_product(item)
|
31
|
+
products << map_product(item)
|
32
32
|
end
|
33
33
|
|
34
34
|
products
|
@@ -52,7 +52,7 @@ module SecondAmendmentWholesale
|
|
52
52
|
item_identifier: item[:stock_number],
|
53
53
|
brand: item[:manufacturer_name],
|
54
54
|
mfg_number: item[:mpn],
|
55
|
-
features: get_features(item
|
55
|
+
features: get_features(item.slice(:stock_number, :ap_spend, :moqpts)),
|
56
56
|
}
|
57
57
|
end
|
58
58
|
|
@@ -66,12 +66,14 @@ module SecondAmendmentWholesale
|
|
66
66
|
categories.compact.pluck(:name).join(" ")
|
67
67
|
end
|
68
68
|
|
69
|
-
def get_features(
|
70
|
-
attributes = @attributes.find { |attribute| attribute[:sku] ==
|
69
|
+
def get_features(item)
|
70
|
+
attributes = @attributes.find { |attribute| attribute[:sku] == item[:stock_number] }
|
71
71
|
|
72
72
|
return {} unless attributes.present?
|
73
73
|
|
74
74
|
{
|
75
|
+
purchase_limit: item[:moqpts],
|
76
|
+
allocation_points: item[:ap_spend],
|
75
77
|
caliber: attributes[:caliber1],
|
76
78
|
action: attributes[:action_type],
|
77
79
|
barrel_type: attributes[:barrel_type],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: second_amendment_wholesale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Brown
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|