lucid_shopify 0.32.2 → 0.33.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29a0dd707c4402958de18f3a0adf75baf8e94163d69fbdab3e4550b58acb1cda
4
- data.tar.gz: c77c717043f40e654442470ca118db7c667594ffa23b1f8561ea0884938fd67e
3
+ metadata.gz: 32f3e18f9edac9e33a395b65a5510ede833049b63dc75d93c24983e3ea8251b6
4
+ data.tar.gz: 3eaffa38d7950865dc74aed1ed00def87f704a82362043b0b8528e5870c6e517
5
5
  SHA512:
6
- metadata.gz: fec990f612217fb1f82cbbfbd0df91d1259ec70f04d670820b1a8ee874de7f7d673c654b694921b59f9fcc215b728b5a206be2aff26c5ebbd1e8561f30a3737e
7
- data.tar.gz: 51a947c3edb1b64b02c51b42e70d3866f61bdd5c54a03594b475ee62d193c3d80f9e6a4e522cd97046c2e4c094770b7909317c6e5acd94477a6c1e5e262adf60
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucidShopify
4
- VERSION = '0.32.2'
4
+ VERSION = '0.33.0'
5
5
  end
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.32.2
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-09-28 00:00:00.000000000 Z
11
+ date: 2019-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv