shop_express 0.0.3 → 0.0.5
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/shop_express/catalog_export.rb +2 -2
- data/lib/shop_express/connection.rb +2 -1
- data/lib/shop_express/import_residues.rb +1 -1
- data/lib/shop_express.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c78960cef1f78e6fe867bd7c921fe76c428785b83bd36c411f3e90f176e64d2
|
4
|
+
data.tar.gz: 2b033578c36bf61870ada068175faf4405da75c9a34182e8bfe62741b5cdaa7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fe33d738c433acba88f598c9f623fda141f483493ba1bb74af965f81cc0ca6c1cf7dea111085b475bedb583a8d7bfd0816129240a81ca3097f990ff28270da9
|
7
|
+
data.tar.gz: b464e86989fd6f4e03e9e5a844fb2fb47c11c7f1d24b7ca8be771263420102877bfcddb70b5b30517aa75a59fa029a0f0cd1ef63860ec3c774e91537c2772603
|
@@ -3,12 +3,12 @@
|
|
3
3
|
module ShopExpress
|
4
4
|
# get list of the products from the shop_express
|
5
5
|
class CatalogExport < ::ShopExpress::Base
|
6
|
-
URL = 'api/catalog/export'
|
6
|
+
URL = '/api/catalog/export'
|
7
7
|
|
8
8
|
# @param limit [Integer]
|
9
9
|
# @param offset [Integer]
|
10
10
|
# @param display_in_show_case [String] possible values (false, true)
|
11
|
-
def call(limit:
|
11
|
+
def call(limit: 500, offset: 0, display_in_show_case: 'false')
|
12
12
|
request_body = {
|
13
13
|
limit: limit,
|
14
14
|
offset: offset,
|
@@ -9,7 +9,8 @@ module ShopExpress
|
|
9
9
|
def post(shop_express:, url:, body:, add_token: false)
|
10
10
|
mixin_token!(shop_express, body) if add_token
|
11
11
|
connection(shop_express).post(url, body).body
|
12
|
-
rescue Faraday::Error
|
12
|
+
rescue Faraday::Error => e
|
13
|
+
Rails.logger.error(e) if defined?(Rails)
|
13
14
|
ERROR
|
14
15
|
end
|
15
16
|
|
data/lib/shop_express.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative 'shop_express/base'
|
|
4
4
|
require_relative 'shop_express/connection'
|
5
5
|
require_relative 'shop_express/authorization'
|
6
6
|
require_relative 'shop_express/import_residues'
|
7
|
+
require_relative 'shop_express/catalog_export'
|
7
8
|
|
8
9
|
module ShopExpress
|
9
10
|
# Base class used to store data about authentication
|
@@ -24,7 +25,7 @@ module ShopExpress
|
|
24
25
|
def token_valid?
|
25
26
|
return false if token.nil?
|
26
27
|
|
27
|
-
expiration_timestamp
|
28
|
+
expiration_timestamp > Time.now
|
28
29
|
end
|
29
30
|
|
30
31
|
def refresh_token!
|