lucid_shopify 0.32.2 → 0.33.0
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/lucid_shopify/response.rb +7 -0
- data/lib/lucid_shopify/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: 32f3e18f9edac9e33a395b65a5510ede833049b63dc75d93c24983e3ea8251b6
|
4
|
+
data.tar.gz: 3eaffa38d7950865dc74aed1ed00def87f704a82362043b0b8528e5870c6e517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c35190f8aaf76eb531c69d6ec9e99e5f20309b8aab62b2883ee6ca3fa319e662189496a7cccca030ffa8a087b39f2370384cb0344e50dfab2a0eef0525b8d9a0
|
7
|
+
data.tar.gz: d095caeecbfca2cbeb6f558125f81de53b7f65e9733b4f5e693763f7a802b81f7a0cce06a29c53170b9322aa215e1fe0b303107732deac427665b5aed3d0bc91
|
@@ -27,6 +27,7 @@ module LucidShopify
|
|
27
27
|
|
28
28
|
ClientError = Class.new(Error)
|
29
29
|
ServerError = Class.new(Error)
|
30
|
+
ShopError = Class.new(Error)
|
30
31
|
|
31
32
|
extend Dry::Initializer
|
32
33
|
|
@@ -65,8 +66,14 @@ module LucidShopify
|
|
65
66
|
# @raise [ClientError] for status 4xx
|
66
67
|
# @raise [ServerError] for status 5xx
|
67
68
|
#
|
69
|
+
# @note https://help.shopify.com/en/api/getting-started/response-status-codes
|
70
|
+
#
|
68
71
|
def assert!
|
69
72
|
case status_code
|
73
|
+
when 402
|
74
|
+
raise ShopError.new(request, self), 'Shop is frozen, awaiting payment'
|
75
|
+
when 423
|
76
|
+
raise ShopError.new(request, self), 'Shop is locked'
|
70
77
|
when 400..499
|
71
78
|
raise ClientError.new(request, self)
|
72
79
|
when 500..599
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucid_shopify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelsey Judson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|