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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a56a1c55fc81c28c3c4a17e333b4662940c56d6db904b658598f53ad540262b9
4
- data.tar.gz: b15ad899162e1f23ed30b9dcd014e5c423ad1c2134623417ef2e33e463fb2cfb
3
+ metadata.gz: 6d7a62ce7f9314372f777ec765b3afea57857210e59bdd82c7fdcf92c10f4ecf
4
+ data.tar.gz: 478fe5310052f76b4dc40d08551eb41d172f0f060f138414a5f91ad017918bf2
5
5
  SHA512:
6
- metadata.gz: b2765c6536ccd7c20c116ff9f9fcae9a3890f2535ae0335cbd5b302e317947b9f59911c658a52de4792feb3328a894ec513c85aa0062546cb2178c9c9f8338d7
7
- data.tar.gz: 3eae6e4dda1cae3dbd06d9a9b002066e311822391bcc9c58e69a0191b2f4bdcec278f70dcecc216b53f0d1a26858a47016418a92bf67cc190091e0ac62f71bc0
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
@@ -1,3 +1,3 @@
1
1
  module SageWorld
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-21 00:00:00.000000000 Z
12
+ date: 2019-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler