sage_world 0.1.3 → 0.1.4
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/sage_world/api/product.rb +15 -0
- data/lib/sage_world/version.rb +1 -1
- 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: 6d7a62ce7f9314372f777ec765b3afea57857210e59bdd82c7fdcf92c10f4ecf
|
|
4
|
+
data.tar.gz: 478fe5310052f76b4dc40d08551eb41d172f0f060f138414a5f91ad017918bf2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6ddeb7b66dfeb3f0ae62978f3decb121e1cf7678b8d83a0c79a73bb422aa2f24e305c9dbeed6e73c29edb3b425d139966d1737280b8aa001f599e9ce0c75b79
|
|
7
|
+
data.tar.gz: fb885122165f349d2cefa48641d2a40706cc50294fcf946b7fdd51b3b1fc9a779d1f66517b3840efc1607bec228b2c35ebf3c55e83daad318b22f8273d60b669
|
|
@@ -165,6 +165,11 @@ module SageWorld
|
|
|
165
165
|
SageWorld::ResponseHandler.new(response)
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
+
def self.cached_data(supp_id, params={})
|
|
169
|
+
response = SageWorld::Client.new(cached_product_params(supp_id, params)).send_request
|
|
170
|
+
SageWorld::ResponseHandler.new(response)
|
|
171
|
+
end
|
|
172
|
+
|
|
168
173
|
private def find_product_params(product_id, options)
|
|
169
174
|
{
|
|
170
175
|
product_detail: {
|
|
@@ -179,6 +184,16 @@ module SageWorld
|
|
|
179
184
|
}
|
|
180
185
|
end
|
|
181
186
|
|
|
187
|
+
private_class_method def self.cached_product_params(supp_id, params)
|
|
188
|
+
{
|
|
189
|
+
supplier_product_data_dump: {
|
|
190
|
+
supp_id: supp_id,
|
|
191
|
+
start_rec: params[:start_rec] || 1,
|
|
192
|
+
max_recs_to_return: params[:max_recs_to_return] || 0
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
end
|
|
196
|
+
|
|
182
197
|
end
|
|
183
198
|
end
|
|
184
199
|
end
|
data/lib/sage_world/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sage_world
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Abhishek Kanojia
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2019-02-
|
|
12
|
+
date: 2019-02-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|