shoptet 0.0.52 → 0.0.53
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shoptet.rb +4 -5
- 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: 42b4c432df5a8cfab2fd74136176b36850144aac3a4d58b218b35ed0991b5d9d
|
4
|
+
data.tar.gz: b3de00e1daa9c3559092ee0245e646bf6023de7a1b09e4cf42834949f578a41f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 842b328f703ac1b57597933aa98609fcae19343ae1572889f68e15c6b8438e4a904a7176ed88c65aa4934f331672addf19150e4ee12dd2ce118771ec3c9811d0
|
7
|
+
data.tar.gz: 5030c94e9b3a8487bcdbc07c1fc62e06e8cd1b6fd3a764e5b40269556de93f4a50bf6ace829f3cdec849da3084073def60f40d172e8f90c466863ae7857ac8fc
|
data/lib/shoptet.rb
CHANGED
@@ -18,6 +18,7 @@ class Shoptet
|
|
18
18
|
class NonJSONResponse < StandardError; end
|
19
19
|
class ProjectNotFound < StandardError; end
|
20
20
|
class TooManyRequests < StandardError; end
|
21
|
+
class UrlLocked < StandardError; end
|
21
22
|
|
22
23
|
EXPIRED_TOKEN_CODE = 'expired-token'
|
23
24
|
INVALID_TOKEN_CODE = 'invalid-token'
|
@@ -28,7 +29,7 @@ class Shoptet
|
|
28
29
|
end
|
29
30
|
|
30
31
|
def self.version
|
31
|
-
'0.0.
|
32
|
+
'0.0.53'
|
32
33
|
end
|
33
34
|
|
34
35
|
def self.ar_on_token_error(model)
|
@@ -234,10 +235,6 @@ class Shoptet
|
|
234
235
|
enumerize("https://api.myshoptet.com/api/webhooks", api_params)
|
235
236
|
end
|
236
237
|
|
237
|
-
def endpoints(api_params={})
|
238
|
-
enumerize("https://api.myshoptet.com/api/system/endpoints", api_params)
|
239
|
-
end
|
240
|
-
|
241
238
|
def new_api_token
|
242
239
|
headers = { 'Authorization' => "Bearer #{@oauth_token}" }
|
243
240
|
|
@@ -389,6 +386,8 @@ class Shoptet
|
|
389
386
|
raise MaxPageReached.new(result)
|
390
387
|
elsif errors.any? { |err| err["errorCode"] == 'too-many-requests' }
|
391
388
|
raise TooManyRequests.new(result)
|
389
|
+
elsif errors.any? { |err| err["errorCode"] == 'locked' }
|
390
|
+
raise UrlLocked.new(result)
|
392
391
|
else
|
393
392
|
raise Error.new(result)
|
394
393
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoptet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.53
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Premysl Donat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: irb
|