shopify_api 13.0.0 → 13.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile.lock +7 -7
  4. data/README.md +0 -7
  5. data/docs/getting_started.md +1 -8
  6. data/lib/shopify_api/admin_versions.rb +2 -1
  7. data/lib/shopify_api/context.rb +1 -0
  8. data/lib/shopify_api/rest/base.rb +5 -1
  9. data/lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb +3 -7
  10. data/lib/shopify_api/rest/resources/2022_04/shop.rb +2 -2
  11. data/lib/shopify_api/rest/resources/2022_07/fulfillment_order.rb +3 -7
  12. data/lib/shopify_api/rest/resources/2022_07/shop.rb +2 -2
  13. data/lib/shopify_api/rest/resources/2022_10/fulfillment_order.rb +3 -7
  14. data/lib/shopify_api/rest/resources/2022_10/shop.rb +2 -2
  15. data/lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb +3 -7
  16. data/lib/shopify_api/rest/resources/2023_01/shop.rb +2 -2
  17. data/lib/shopify_api/rest/resources/2023_04/shop.rb +2 -2
  18. data/lib/shopify_api/rest/resources/2023_07/abandoned_checkout.rb +190 -0
  19. data/lib/shopify_api/rest/resources/2023_07/access_scope.rb +58 -0
  20. data/lib/shopify_api/rest/resources/2023_07/apple_pay_certificate.rb +105 -0
  21. data/lib/shopify_api/rest/resources/2023_07/application_charge.rb +109 -0
  22. data/lib/shopify_api/rest/resources/2023_07/application_credit.rb +91 -0
  23. data/lib/shopify_api/rest/resources/2023_07/article.rb +265 -0
  24. data/lib/shopify_api/rest/resources/2023_07/asset.rb +118 -0
  25. data/lib/shopify_api/rest/resources/2023_07/assigned_fulfillment_order.rb +86 -0
  26. data/lib/shopify_api/rest/resources/2023_07/balance.rb +50 -0
  27. data/lib/shopify_api/rest/resources/2023_07/blog.rb +162 -0
  28. data/lib/shopify_api/rest/resources/2023_07/cancellation_request.rb +83 -0
  29. data/lib/shopify_api/rest/resources/2023_07/carrier_service.rb +116 -0
  30. data/lib/shopify_api/rest/resources/2023_07/checkout.rb +209 -0
  31. data/lib/shopify_api/rest/resources/2023_07/collect.rb +142 -0
  32. data/lib/shopify_api/rest/resources/2023_07/collection.rb +110 -0
  33. data/lib/shopify_api/rest/resources/2023_07/collection_listing.rb +155 -0
  34. data/lib/shopify_api/rest/resources/2023_07/comment.rb +283 -0
  35. data/lib/shopify_api/rest/resources/2023_07/country.rb +137 -0
  36. data/lib/shopify_api/rest/resources/2023_07/currency.rb +57 -0
  37. data/lib/shopify_api/rest/resources/2023_07/custom_collection.rb +187 -0
  38. data/lib/shopify_api/rest/resources/2023_07/customer.rb +329 -0
  39. data/lib/shopify_api/rest/resources/2023_07/customer_address.rb +201 -0
  40. data/lib/shopify_api/rest/resources/2023_07/customer_saved_search.rb +169 -0
  41. data/lib/shopify_api/rest/resources/2023_07/deprecated_api_call.rb +57 -0
  42. data/lib/shopify_api/rest/resources/2023_07/discount_code.rb +222 -0
  43. data/lib/shopify_api/rest/resources/2023_07/dispute.rb +111 -0
  44. data/lib/shopify_api/rest/resources/2023_07/dispute_evidence.rb +117 -0
  45. data/lib/shopify_api/rest/resources/2023_07/dispute_file_upload.rb +81 -0
  46. data/lib/shopify_api/rest/resources/2023_07/draft_order.rb +275 -0
  47. data/lib/shopify_api/rest/resources/2023_07/event.rb +148 -0
  48. data/lib/shopify_api/rest/resources/2023_07/fulfillment.rb +231 -0
  49. data/lib/shopify_api/rest/resources/2023_07/fulfillment_event.rb +166 -0
  50. data/lib/shopify_api/rest/resources/2023_07/fulfillment_order.rb +312 -0
  51. data/lib/shopify_api/rest/resources/2023_07/fulfillment_request.rb +87 -0
  52. data/lib/shopify_api/rest/resources/2023_07/fulfillment_service.rb +130 -0
  53. data/lib/shopify_api/rest/resources/2023_07/gift_card.rb +218 -0
  54. data/lib/shopify_api/rest/resources/2023_07/gift_card_adjustment.rb +118 -0
  55. data/lib/shopify_api/rest/resources/2023_07/image.rb +157 -0
  56. data/lib/shopify_api/rest/resources/2023_07/inventory_item.rb +108 -0
  57. data/lib/shopify_api/rest/resources/2023_07/inventory_level.rb +179 -0
  58. data/lib/shopify_api/rest/resources/2023_07/location.rb +167 -0
  59. data/lib/shopify_api/rest/resources/2023_07/locations_for_move.rb +56 -0
  60. data/lib/shopify_api/rest/resources/2023_07/marketing_event.rb +209 -0
  61. data/lib/shopify_api/rest/resources/2023_07/metafield.rb +344 -0
  62. data/lib/shopify_api/rest/resources/2023_07/mobile_platform_application.rb +110 -0
  63. data/lib/shopify_api/rest/resources/2023_07/order.rb +488 -0
  64. data/lib/shopify_api/rest/resources/2023_07/order_risk.rb +142 -0
  65. data/lib/shopify_api/rest/resources/2023_07/page.rb +194 -0
  66. data/lib/shopify_api/rest/resources/2023_07/payment.rb +140 -0
  67. data/lib/shopify_api/rest/resources/2023_07/payment_gateway.rb +143 -0
  68. data/lib/shopify_api/rest/resources/2023_07/payment_transaction.rb +107 -0
  69. data/lib/shopify_api/rest/resources/2023_07/payout.rb +97 -0
  70. data/lib/shopify_api/rest/resources/2023_07/policy.rb +69 -0
  71. data/lib/shopify_api/rest/resources/2023_07/price_rule.rb +223 -0
  72. data/lib/shopify_api/rest/resources/2023_07/product.rb +223 -0
  73. data/lib/shopify_api/rest/resources/2023_07/product_listing.rb +196 -0
  74. data/lib/shopify_api/rest/resources/2023_07/product_resource_feedback.rb +88 -0
  75. data/lib/shopify_api/rest/resources/2023_07/province.rb +132 -0
  76. data/lib/shopify_api/rest/resources/2023_07/recurring_application_charge.rb +172 -0
  77. data/lib/shopify_api/rest/resources/2023_07/redirect.rb +139 -0
  78. data/lib/shopify_api/rest/resources/2023_07/refund.rb +151 -0
  79. data/lib/shopify_api/rest/resources/2023_07/resource_feedback.rb +73 -0
  80. data/lib/shopify_api/rest/resources/2023_07/script_tag.rb +155 -0
  81. data/lib/shopify_api/rest/resources/2023_07/shipping_zone.rb +83 -0
  82. data/lib/shopify_api/rest/resources/2023_07/shop.rb +221 -0
  83. data/lib/shopify_api/rest/resources/2023_07/smart_collection.rb +216 -0
  84. data/lib/shopify_api/rest/resources/2023_07/storefront_access_token.rb +87 -0
  85. data/lib/shopify_api/rest/resources/2023_07/tender_transaction.rb +93 -0
  86. data/lib/shopify_api/rest/resources/2023_07/theme.rb +123 -0
  87. data/lib/shopify_api/rest/resources/2023_07/transaction.rb +184 -0
  88. data/lib/shopify_api/rest/resources/2023_07/usage_charge.rb +102 -0
  89. data/lib/shopify_api/rest/resources/2023_07/user.rb +138 -0
  90. data/lib/shopify_api/rest/resources/2023_07/variant.rb +212 -0
  91. data/lib/shopify_api/rest/resources/2023_07/webhook.rb +168 -0
  92. data/lib/shopify_api/version.rb +1 -1
  93. data/shopify_api.gemspec +1 -1
  94. metadata +77 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d36c6512c91e12fdcc4d3f9ee1049241498e41b0406448d19cafb94d97d7c815
4
- data.tar.gz: 9633547697ee1493db17837b28ea7e0b1e539d6d062e5066bd3f983fdaf4090f
3
+ metadata.gz: 330b033c35e9b3b421a89e937cd50f80cd9439cdfc344c9809ef16746971a6e0
4
+ data.tar.gz: 522ce45ee19bc4208b3ee29eb95f620cfc473757507075da9fcb679ba63946a8
5
5
  SHA512:
6
- metadata.gz: 8964e99218d49f9e0a9bd5e277ead941ad8252d59c59e97a2eba9234f7a7396d92a52628ac7268599f454c2c60cbb8f696d0501ea1e75c5c531b74d4708a28c0
7
- data.tar.gz: 1d38649055c009278cabec33441525df0086a5fc078e2974da48d845d6f98014409d12068791cefa99c3ef5bc4a79f2012d60a514aeeba5db1a87e8ed1739070
6
+ metadata.gz: 884e25968587509d4c7643e128939832613dfc3c335936b517c574b5d4ad2f83e0a7ddb19af55214a04b27a72a4eb9fa1e23e7bf992031120e5c4bb96e67f934
7
+ data.tar.gz: b163f2f6290fdf41ca6a5f10c3b4732f1e9f9404d56d560a83db657f70b55f39edc2916660ce0ddf4e24bb8faf4049b6ce55b93dc651ef7fe6f2842483482c2a
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ Note: For changes to the API, see https://shopify.dev/changelog?filter=api
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 13.1.0
8
+
9
+ - [#1183](https://github.com/Shopify/shopify-api-ruby/pull/1183) Added support for API version 2023-07
10
+ - [#1157](https://github.com/Shopify/shopify-api-ruby/pull/1157) Fix an issue where read-only attributes are included when saving REST resources
11
+ - [#1169](https://github.com/Shopify/shopify-api-ruby/pull/1169) Unpin zeitwerk version from 2.6.5
12
+
7
13
  ## 13.0.0
8
14
 
9
15
  - [#1140](https://github.com/Shopify/shopify-api-ruby/pull/1140) ⚠️ [Breaking] Reformat Http error messages to be JSON parsable.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify_api (13.0.0)
4
+ shopify_api (13.1.0)
5
5
  activesupport
6
6
  concurrent-ruby
7
7
  hash_diff
@@ -11,12 +11,12 @@ PATH
11
11
  openssl
12
12
  securerandom
13
13
  sorbet-runtime
14
- zeitwerk (~> 2.5, < 2.6.5)
14
+ zeitwerk (~> 2.5)
15
15
 
16
16
  GEM
17
17
  remote: https://rubygems.org/
18
18
  specs:
19
- activesupport (7.0.4.3)
19
+ activesupport (7.0.6)
20
20
  concurrent-ruby (~> 1.0, >= 1.0.2)
21
21
  i18n (>= 1.6, < 2)
22
22
  minitest (>= 5.1)
@@ -36,10 +36,10 @@ GEM
36
36
  httparty (0.21.0)
37
37
  mini_mime (>= 1.0.0)
38
38
  multi_xml (>= 0.5.2)
39
- i18n (1.13.0)
39
+ i18n (1.14.1)
40
40
  concurrent-ruby (~> 1.0)
41
41
  json (2.6.2)
42
- jwt (2.7.0)
42
+ jwt (2.7.1)
43
43
  language_server-protocol (3.17.0.1)
44
44
  method_source (1.0.0)
45
45
  mini_mime (1.1.2)
@@ -47,7 +47,7 @@ GEM
47
47
  mocha (1.13.0)
48
48
  multi_xml (0.6.0)
49
49
  netrc (0.11.0)
50
- oj (3.14.3)
50
+ oj (3.15.0)
51
51
  openssl (3.1.0)
52
52
  parallel (1.22.1)
53
53
  parser (3.1.2.1)
@@ -133,7 +133,7 @@ GEM
133
133
  yard-sorbet (0.7.0)
134
134
  sorbet-runtime (>= 0.5)
135
135
  yard (>= 0.9)
136
- zeitwerk (2.6.4)
136
+ zeitwerk (2.6.8)
137
137
 
138
138
  PLATFORMS
139
139
  arm64-darwin-21
data/README.md CHANGED
@@ -52,19 +52,12 @@ ShopifyAPI::Context.setup(
52
52
  api_secret_key: "<api-secret-key>",
53
53
  host: "<https://application-host-name.com>",
54
54
  scope: "read_orders,read_products,etc",
55
- session_storage: ShopifyAPI::Auth::FileSessionStorage.new, # See more details below
56
55
  is_embedded: true, # Set to true if you are building an embedded app
57
56
  api_version: "2022-01", # The version of the API you would like to use
58
57
  is_private: false, # Set to true if you have an existing private app
59
58
  )
60
59
  ```
61
60
 
62
- ### Setup a Session Store
63
-
64
- In order for the Shopify API gem to properly store sessions it needs an implementation of `ShopifyAPI::Auth::SessionStorage`. We provide one implementation in the gem, `ShopifyAPI::Auth::FileSessionStorage`, which is suitable for testing/development, but isn't intended for production apps. See the [Session Storage doc](docs/usage/session_storage.md) for instructions on how to create a custom session store for a production application.
65
-
66
- Session information would is typically stored in cookies on the browser. However, due to restrictions with modern browsers we highly discourage using cookies for embedded apps. For this reason, an app needs to define a storage implementation that the library can use to store and retrieve a session given its ID. In a non-embedded app this ID will come from a cookie, whereas in an embedded app this ID will come from [App Bridge](https://shopify.dev/docs/apps/tools/app-bridge).
67
-
68
61
  ### Performing OAuth
69
62
 
70
63
  You need to go through OAuth as described [here](https://shopify.dev/docs/apps/auth/oauth) to create sessions for shops using your app.
@@ -26,19 +26,12 @@ ShopifyAPI::Context.setup(
26
26
  api_secret_key: "<api-secret-key>",
27
27
  host_name: "<application-host-name>",
28
28
  scope: "read_orders,read_products,etc",
29
- session_storage: ShopifyAPI::Auth::FileSessionStorage.new, # This is only to be used for testing, more information in session docs
30
29
  is_embedded: true, # Set to true if you are building an embedded app
31
30
  is_private: false, # Set to true if you are building a private app
32
- api_version: "2021-01" # The vesion of the API you would like to use
31
+ api_version: "2021-01" # The version of the API you would like to use
33
32
  )
34
33
  ```
35
34
 
36
- ### Setup a Session Store
37
-
38
- In order for the Shopify API gem to properly store sessions it needs an implementation of `ShopifyAPI::Auth::SessionStorage`. There is one provided in the gem, `ShopifyAPI::Auth::FileSessionStorage`, this is suitable for testing, however it is not intended for production apps. See the [Session Storage doc](usage/session_storage.md) for instructions on how to create a custom session store for a production application.
39
-
40
- Normally session information would be stored in cookies on the browser. However, due to restrictions with modern browsers we highly discourage using cookies for embedded apps. For this reason, an app needs to define a storage implementation that can be used to store and retrieve a session given an ID. In a non embedded app this ID will come from a cookie however, in an embedded app this ID will come from [App Bridge](https://shopify.dev/docs/apps/tools/app-bridge)
41
-
42
35
  ### Performing OAuth
43
36
 
44
37
  Next, unless you are making a private app, you need to go through OAuth as described [here](https://shopify.dev/docs/apps/auth/oauth) to create sessions for shops using your app.
@@ -5,6 +5,7 @@ module ShopifyAPI
5
5
  module AdminVersions
6
6
  SUPPORTED_ADMIN_VERSIONS = T.let([
7
7
  "unstable",
8
+ "2023-07",
8
9
  "2023-04",
9
10
  "2023-01",
10
11
  "2022-10",
@@ -13,7 +14,7 @@ module ShopifyAPI
13
14
  "2022-01",
14
15
  ], T::Array[String])
15
16
 
16
- LATEST_SUPPORTED_ADMIN_VERSION = T.let("2023-04", String)
17
+ LATEST_SUPPORTED_ADMIN_VERSION = T.let("2023-07", String)
17
18
  end
18
19
 
19
20
  SUPPORTED_ADMIN_VERSIONS = ShopifyAPI::AdminVersions::SUPPORTED_ADMIN_VERSIONS
@@ -84,6 +84,7 @@ module ShopifyAPI
84
84
  sig { params(api_version: String).void }
85
85
  def load_rest_resources(api_version:)
86
86
  # Unload any previous instances - mostly useful for tests where we need to reset the version
87
+ @rest_resource_loader&.setup
87
88
  @rest_resource_loader&.unload
88
89
 
89
90
  # No resources for the unstable version
@@ -361,8 +361,12 @@ module ShopifyAPI
361
361
 
362
362
  sig { returns(T::Hash[String, String]) }
363
363
  def attributes_to_update
364
+ original_state_for_update = original_state.reject do |attribute, _|
365
+ self.class.read_only_attributes&.include?("@#{attribute}".to_sym)
366
+ end
367
+
364
368
  HashDiff::Comparison.new(
365
- deep_stringify_keys(original_state),
369
+ deep_stringify_keys(original_state_for_update),
366
370
  deep_stringify_keys(to_hash(true)),
367
371
  ).left_diff
368
372
  end
@@ -169,17 +169,13 @@ module ShopifyAPI
169
169
 
170
170
  sig do
171
171
  params(
172
- reason: T.untyped,
173
- reason_notes: T.untyped,
174
- notify_merchant: T.untyped,
172
+ fulfillment_hold: T.untyped,
175
173
  body: T.untyped,
176
174
  kwargs: T.untyped
177
175
  ).returns(T.untyped)
178
176
  end
179
177
  def hold(
180
- reason: nil,
181
- reason_notes: nil,
182
- notify_merchant: nil,
178
+ fulfillment_hold: nil,
183
179
  body: nil,
184
180
  **kwargs
185
181
  )
@@ -188,7 +184,7 @@ module ShopifyAPI
188
184
  operation: :hold,
189
185
  session: @session,
190
186
  ids: {id: @id},
191
- params: {reason: reason, reason_notes: reason_notes, notify_merchant: notify_merchant}.merge(kwargs).compact,
187
+ params: {fulfillment_hold: fulfillment_hold}.merge(kwargs).compact,
192
188
  body: body,
193
189
  entity: self,
194
190
  )
@@ -65,7 +65,7 @@ module ShopifyAPI
65
65
  @shop_owner = T.let(nil, T.nilable(String))
66
66
  @source = T.let(nil, T.nilable(String))
67
67
  @tax_shipping = T.let(nil, T.nilable(String))
68
- @taxes_included = T.let(nil, T.nilable(String))
68
+ @taxes_included = T.let(nil, T.nilable(T::Boolean))
69
69
  @timezone = T.let(nil, T.nilable(String))
70
70
  @transactional_sms_disabled = T.let(nil, T.nilable(T::Boolean))
71
71
  @updated_at = T.let(nil, T.nilable(String))
@@ -177,7 +177,7 @@ module ShopifyAPI
177
177
  attr_reader :source
178
178
  sig { returns(T.nilable(String)) }
179
179
  attr_reader :tax_shipping
180
- sig { returns(T.nilable(String)) }
180
+ sig { returns(T.nilable(T::Boolean)) }
181
181
  attr_reader :taxes_included
182
182
  sig { returns(T.nilable(String)) }
183
183
  attr_reader :timezone
@@ -170,17 +170,13 @@ module ShopifyAPI
170
170
 
171
171
  sig do
172
172
  params(
173
- reason: T.untyped,
174
- reason_notes: T.untyped,
175
- notify_merchant: T.untyped,
173
+ fulfillment_hold: T.untyped,
176
174
  body: T.untyped,
177
175
  kwargs: T.untyped
178
176
  ).returns(T.untyped)
179
177
  end
180
178
  def hold(
181
- reason: nil,
182
- reason_notes: nil,
183
- notify_merchant: nil,
179
+ fulfillment_hold: nil,
184
180
  body: nil,
185
181
  **kwargs
186
182
  )
@@ -189,7 +185,7 @@ module ShopifyAPI
189
185
  operation: :hold,
190
186
  session: @session,
191
187
  ids: {id: @id},
192
- params: {reason: reason, reason_notes: reason_notes, notify_merchant: notify_merchant}.merge(kwargs).compact,
188
+ params: {fulfillment_hold: fulfillment_hold}.merge(kwargs).compact,
193
189
  body: body,
194
190
  entity: self,
195
191
  )
@@ -65,7 +65,7 @@ module ShopifyAPI
65
65
  @shop_owner = T.let(nil, T.nilable(String))
66
66
  @source = T.let(nil, T.nilable(String))
67
67
  @tax_shipping = T.let(nil, T.nilable(String))
68
- @taxes_included = T.let(nil, T.nilable(String))
68
+ @taxes_included = T.let(nil, T.nilable(T::Boolean))
69
69
  @timezone = T.let(nil, T.nilable(String))
70
70
  @transactional_sms_disabled = T.let(nil, T.nilable(T::Boolean))
71
71
  @updated_at = T.let(nil, T.nilable(String))
@@ -177,7 +177,7 @@ module ShopifyAPI
177
177
  attr_reader :source
178
178
  sig { returns(T.nilable(String)) }
179
179
  attr_reader :tax_shipping
180
- sig { returns(T.nilable(String)) }
180
+ sig { returns(T.nilable(T::Boolean)) }
181
181
  attr_reader :taxes_included
182
182
  sig { returns(T.nilable(String)) }
183
183
  attr_reader :timezone
@@ -170,17 +170,13 @@ module ShopifyAPI
170
170
 
171
171
  sig do
172
172
  params(
173
- reason: T.untyped,
174
- reason_notes: T.untyped,
175
- notify_merchant: T.untyped,
173
+ fulfillment_hold: T.untyped,
176
174
  body: T.untyped,
177
175
  kwargs: T.untyped
178
176
  ).returns(T.untyped)
179
177
  end
180
178
  def hold(
181
- reason: nil,
182
- reason_notes: nil,
183
- notify_merchant: nil,
179
+ fulfillment_hold: nil,
184
180
  body: nil,
185
181
  **kwargs
186
182
  )
@@ -189,7 +185,7 @@ module ShopifyAPI
189
185
  operation: :hold,
190
186
  session: @session,
191
187
  ids: {id: @id},
192
- params: {reason: reason, reason_notes: reason_notes, notify_merchant: notify_merchant}.merge(kwargs).compact,
188
+ params: {fulfillment_hold: fulfillment_hold}.merge(kwargs).compact,
193
189
  body: body,
194
190
  entity: self,
195
191
  )
@@ -66,7 +66,7 @@ module ShopifyAPI
66
66
  @shop_owner = T.let(nil, T.nilable(String))
67
67
  @source = T.let(nil, T.nilable(String))
68
68
  @tax_shipping = T.let(nil, T.nilable(String))
69
- @taxes_included = T.let(nil, T.nilable(String))
69
+ @taxes_included = T.let(nil, T.nilable(T::Boolean))
70
70
  @timezone = T.let(nil, T.nilable(String))
71
71
  @transactional_sms_disabled = T.let(nil, T.nilable(T::Boolean))
72
72
  @updated_at = T.let(nil, T.nilable(String))
@@ -180,7 +180,7 @@ module ShopifyAPI
180
180
  attr_reader :source
181
181
  sig { returns(T.nilable(String)) }
182
182
  attr_reader :tax_shipping
183
- sig { returns(T.nilable(String)) }
183
+ sig { returns(T.nilable(T::Boolean)) }
184
184
  attr_reader :taxes_included
185
185
  sig { returns(T.nilable(String)) }
186
186
  attr_reader :timezone
@@ -176,17 +176,13 @@ module ShopifyAPI
176
176
 
177
177
  sig do
178
178
  params(
179
- reason: T.untyped,
180
- reason_notes: T.untyped,
181
- notify_merchant: T.untyped,
179
+ fulfillment_hold: T.untyped,
182
180
  body: T.untyped,
183
181
  kwargs: T.untyped
184
182
  ).returns(T.untyped)
185
183
  end
186
184
  def hold(
187
- reason: nil,
188
- reason_notes: nil,
189
- notify_merchant: nil,
185
+ fulfillment_hold: nil,
190
186
  body: nil,
191
187
  **kwargs
192
188
  )
@@ -195,7 +191,7 @@ module ShopifyAPI
195
191
  operation: :hold,
196
192
  session: @session,
197
193
  ids: {id: @id},
198
- params: {reason: reason, reason_notes: reason_notes, notify_merchant: notify_merchant}.merge(kwargs).compact,
194
+ params: {fulfillment_hold: fulfillment_hold}.merge(kwargs).compact,
199
195
  body: body,
200
196
  entity: self,
201
197
  )
@@ -66,7 +66,7 @@ module ShopifyAPI
66
66
  @shop_owner = T.let(nil, T.nilable(String))
67
67
  @source = T.let(nil, T.nilable(String))
68
68
  @tax_shipping = T.let(nil, T.nilable(String))
69
- @taxes_included = T.let(nil, T.nilable(String))
69
+ @taxes_included = T.let(nil, T.nilable(T::Boolean))
70
70
  @timezone = T.let(nil, T.nilable(String))
71
71
  @transactional_sms_disabled = T.let(nil, T.nilable(T::Boolean))
72
72
  @updated_at = T.let(nil, T.nilable(String))
@@ -180,7 +180,7 @@ module ShopifyAPI
180
180
  attr_reader :source
181
181
  sig { returns(T.nilable(String)) }
182
182
  attr_reader :tax_shipping
183
- sig { returns(T.nilable(String)) }
183
+ sig { returns(T.nilable(T::Boolean)) }
184
184
  attr_reader :taxes_included
185
185
  sig { returns(T.nilable(String)) }
186
186
  attr_reader :timezone
@@ -66,7 +66,7 @@ module ShopifyAPI
66
66
  @shop_owner = T.let(nil, T.nilable(String))
67
67
  @source = T.let(nil, T.nilable(String))
68
68
  @tax_shipping = T.let(nil, T.nilable(String))
69
- @taxes_included = T.let(nil, T.nilable(String))
69
+ @taxes_included = T.let(nil, T.nilable(T::Boolean))
70
70
  @timezone = T.let(nil, T.nilable(String))
71
71
  @transactional_sms_disabled = T.let(nil, T.nilable(T::Boolean))
72
72
  @updated_at = T.let(nil, T.nilable(String))
@@ -180,7 +180,7 @@ module ShopifyAPI
180
180
  attr_reader :source
181
181
  sig { returns(T.nilable(String)) }
182
182
  attr_reader :tax_shipping
183
- sig { returns(T.nilable(String)) }
183
+ sig { returns(T.nilable(T::Boolean)) }
184
184
  attr_reader :taxes_included
185
185
  sig { returns(T.nilable(String)) }
186
186
  attr_reader :timezone
@@ -0,0 +1,190 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+ ########################################################################################################################
5
+ # This file is auto-generated. If you have an issue, please create a GitHub issue. #
6
+ ########################################################################################################################
7
+
8
+ module ShopifyAPI
9
+ class AbandonedCheckout < ShopifyAPI::Rest::Base
10
+ extend T::Sig
11
+
12
+ @prev_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
13
+ @next_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
14
+
15
+ sig { params(session: T.nilable(ShopifyAPI::Auth::Session)).void }
16
+ def initialize(session: ShopifyAPI::Context.active_session)
17
+ super(session: session)
18
+
19
+ @abandoned_checkout_url = T.let(nil, T.nilable(String))
20
+ @billing_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
21
+ @buyer_accepts_marketing = T.let(nil, T.nilable(T::Boolean))
22
+ @buyer_accepts_sms_marketing = T.let(nil, T.nilable(T::Boolean))
23
+ @cart_token = T.let(nil, T.nilable(String))
24
+ @closed_at = T.let(nil, T.nilable(String))
25
+ @completed_at = T.let(nil, T.nilable(String))
26
+ @created_at = T.let(nil, T.nilable(String))
27
+ @currency = T.let(nil, T.nilable(Currency))
28
+ @customer = T.let(nil, T.nilable(Customer))
29
+ @customer_locale = T.let(nil, T.nilable(String))
30
+ @device_id = T.let(nil, T.nilable(Integer))
31
+ @discount_codes = T.let(nil, T.nilable(T::Array[T.untyped]))
32
+ @email = T.let(nil, T.nilable(String))
33
+ @gateway = T.let(nil, T.nilable(String))
34
+ @id = T.let(nil, T.nilable(Integer))
35
+ @landing_site = T.let(nil, T.nilable(String))
36
+ @line_items = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
37
+ @location_id = T.let(nil, T.nilable(Integer))
38
+ @note = T.let(nil, T.nilable(String))
39
+ @phone = T.let(nil, T.nilable(String))
40
+ @presentment_currency = T.let(nil, T.nilable(String))
41
+ @referring_site = T.let(nil, T.nilable(String))
42
+ @shipping_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
43
+ @shipping_lines = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
44
+ @sms_marketing_phone = T.let(nil, T.nilable(String))
45
+ @source_name = T.let(nil, T.nilable(String))
46
+ @subtotal_price = T.let(nil, T.nilable(String))
47
+ @tax_lines = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
48
+ @taxes_included = T.let(nil, T.nilable(T::Boolean))
49
+ @token = T.let(nil, T.nilable(String))
50
+ @total_discounts = T.let(nil, T.nilable(String))
51
+ @total_duties = T.let(nil, T.nilable(String))
52
+ @total_line_items_price = T.let(nil, T.nilable(String))
53
+ @total_price = T.let(nil, T.nilable(String))
54
+ @total_tax = T.let(nil, T.nilable(String))
55
+ @total_weight = T.let(nil, T.nilable(Integer))
56
+ @updated_at = T.let(nil, T.nilable(String))
57
+ @user_id = T.let(nil, T.nilable(Integer))
58
+ end
59
+
60
+ @has_one = T.let({
61
+ currency: Currency,
62
+ customer: Customer
63
+ }, T::Hash[Symbol, Class])
64
+ @has_many = T.let({
65
+ discount_codes: DiscountCode
66
+ }, T::Hash[Symbol, Class])
67
+ @paths = T.let([
68
+ {http_method: :get, operation: :checkouts, ids: [], path: "checkouts.json"},
69
+ {http_method: :get, operation: :checkouts, ids: [], path: "checkouts.json"}
70
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
71
+
72
+ sig { returns(T.nilable(String)) }
73
+ attr_reader :abandoned_checkout_url
74
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
75
+ attr_reader :billing_address
76
+ sig { returns(T.nilable(T::Boolean)) }
77
+ attr_reader :buyer_accepts_marketing
78
+ sig { returns(T.nilable(T::Boolean)) }
79
+ attr_reader :buyer_accepts_sms_marketing
80
+ sig { returns(T.nilable(String)) }
81
+ attr_reader :cart_token
82
+ sig { returns(T.nilable(String)) }
83
+ attr_reader :closed_at
84
+ sig { returns(T.nilable(String)) }
85
+ attr_reader :completed_at
86
+ sig { returns(T.nilable(String)) }
87
+ attr_reader :created_at
88
+ sig { returns(T.nilable(Currency)) }
89
+ attr_reader :currency
90
+ sig { returns(T.nilable(Customer)) }
91
+ attr_reader :customer
92
+ sig { returns(T.nilable(String)) }
93
+ attr_reader :customer_locale
94
+ sig { returns(T.nilable(Integer)) }
95
+ attr_reader :device_id
96
+ sig { returns(T.nilable(T::Array[DiscountCode])) }
97
+ attr_reader :discount_codes
98
+ sig { returns(T.nilable(String)) }
99
+ attr_reader :email
100
+ sig { returns(T.nilable(String)) }
101
+ attr_reader :gateway
102
+ sig { returns(T.nilable(Integer)) }
103
+ attr_reader :id
104
+ sig { returns(T.nilable(String)) }
105
+ attr_reader :landing_site
106
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
107
+ attr_reader :line_items
108
+ sig { returns(T.nilable(Integer)) }
109
+ attr_reader :location_id
110
+ sig { returns(T.nilable(String)) }
111
+ attr_reader :note
112
+ sig { returns(T.nilable(String)) }
113
+ attr_reader :phone
114
+ sig { returns(T.nilable(String)) }
115
+ attr_reader :presentment_currency
116
+ sig { returns(T.nilable(String)) }
117
+ attr_reader :referring_site
118
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
119
+ attr_reader :shipping_address
120
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
121
+ attr_reader :shipping_lines
122
+ sig { returns(T.nilable(String)) }
123
+ attr_reader :sms_marketing_phone
124
+ sig { returns(T.nilable(String)) }
125
+ attr_reader :source_name
126
+ sig { returns(T.nilable(String)) }
127
+ attr_reader :subtotal_price
128
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
129
+ attr_reader :tax_lines
130
+ sig { returns(T.nilable(T::Boolean)) }
131
+ attr_reader :taxes_included
132
+ sig { returns(T.nilable(String)) }
133
+ attr_reader :token
134
+ sig { returns(T.nilable(String)) }
135
+ attr_reader :total_discounts
136
+ sig { returns(T.nilable(String)) }
137
+ attr_reader :total_duties
138
+ sig { returns(T.nilable(String)) }
139
+ attr_reader :total_line_items_price
140
+ sig { returns(T.nilable(String)) }
141
+ attr_reader :total_price
142
+ sig { returns(T.nilable(String)) }
143
+ attr_reader :total_tax
144
+ sig { returns(T.nilable(Integer)) }
145
+ attr_reader :total_weight
146
+ sig { returns(T.nilable(String)) }
147
+ attr_reader :updated_at
148
+ sig { returns(T.nilable(Integer)) }
149
+ attr_reader :user_id
150
+
151
+ class << self
152
+ sig do
153
+ params(
154
+ since_id: T.untyped,
155
+ created_at_min: T.untyped,
156
+ created_at_max: T.untyped,
157
+ updated_at_min: T.untyped,
158
+ updated_at_max: T.untyped,
159
+ status: T.untyped,
160
+ limit: T.untyped,
161
+ session: Auth::Session,
162
+ kwargs: T.untyped
163
+ ).returns(T.untyped)
164
+ end
165
+ def checkouts(
166
+ since_id: nil,
167
+ created_at_min: nil,
168
+ created_at_max: nil,
169
+ updated_at_min: nil,
170
+ updated_at_max: nil,
171
+ status: nil,
172
+ limit: nil,
173
+ session: ShopifyAPI::Context.active_session,
174
+ **kwargs
175
+ )
176
+ request(
177
+ http_method: :get,
178
+ operation: :checkouts,
179
+ session: session,
180
+ ids: {},
181
+ params: {since_id: since_id, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, status: status, limit: limit}.merge(kwargs).compact,
182
+ body: {},
183
+ entity: nil,
184
+ )
185
+ end
186
+
187
+ end
188
+
189
+ end
190
+ end
@@ -0,0 +1,58 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+ ########################################################################################################################
5
+ # This file is auto-generated. If you have an issue, please create a GitHub issue. #
6
+ ########################################################################################################################
7
+
8
+ module ShopifyAPI
9
+ class AccessScope < ShopifyAPI::Rest::Base
10
+ extend T::Sig
11
+
12
+ @prev_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
13
+ @next_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
14
+
15
+ sig { params(session: T.nilable(ShopifyAPI::Auth::Session)).void }
16
+ def initialize(session: ShopifyAPI::Context.active_session)
17
+ super(session: session)
18
+
19
+ @handle = T.let(nil, T.nilable(String))
20
+ @access_scopes = T.let(nil, T.nilable(T::Array[T.untyped]))
21
+ end
22
+
23
+ @has_one = T.let({}, T::Hash[Symbol, Class])
24
+ @has_many = T.let({}, T::Hash[Symbol, Class])
25
+ @custom_prefix = T.let("/admin/oauth", T.nilable(String))
26
+ @paths = T.let([
27
+ {http_method: :get, operation: :get, ids: [], path: "access_scopes.json"}
28
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ attr_reader :handle
32
+ sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
33
+ attr_reader :access_scopes
34
+
35
+ class << self
36
+ sig do
37
+ params(
38
+ session: Auth::Session,
39
+ kwargs: T.untyped
40
+ ).returns(T::Array[AccessScope])
41
+ end
42
+ def all(
43
+ session: ShopifyAPI::Context.active_session,
44
+ **kwargs
45
+ )
46
+ response = base_find(
47
+ session: session,
48
+ ids: {},
49
+ params: {}.merge(kwargs).compact,
50
+ )
51
+
52
+ T.cast(response, T::Array[AccessScope])
53
+ end
54
+
55
+ end
56
+
57
+ end
58
+ end