shoptet 0.0.52 → 0.0.53

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shoptet.rb +4 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15fcbfedaa4b4ea58a0d7445279327a24b68fa15d72769f6f4db309a3825c2cd
4
- data.tar.gz: 8f1e5a6ff4c35e1646353e8dca4bbe9d2cb5a658454aca05744f2a0f553c7605
3
+ metadata.gz: 42b4c432df5a8cfab2fd74136176b36850144aac3a4d58b218b35ed0991b5d9d
4
+ data.tar.gz: b3de00e1daa9c3559092ee0245e646bf6023de7a1b09e4cf42834949f578a41f
5
5
  SHA512:
6
- metadata.gz: da18bc74211075d1647a3d40577c189ec51f7e1ff08a3916b1f7a1de93b15665251d9d4b6769f5ac607efd6dc6063214da2e3b590ac04f4b03e7e17775f4fd4e
7
- data.tar.gz: e774443131ad00a503f6fb77705f9b3e47ac6422e5773e6a83b24d4d0a33ac9ef0b437a0650b98d542dab74e2dd493217f60971064d36f7db16fa2321de8cc88
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.52'
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.52
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-02 00:00:00.000000000 Z
11
+ date: 2023-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: irb