shopify_api 10.1.0 → 11.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +0 -1
  3. data/.rubocop.yml +1 -1
  4. data/BREAKING_CHANGES_FOR_OLDER_VERSIONS.md +110 -0
  5. data/CHANGELOG.md +6 -0
  6. data/Gemfile.lock +23 -20
  7. data/README.md +2 -105
  8. data/RELEASING.md +2 -1
  9. data/lib/shopify_api/admin_versions.rb +2 -3
  10. data/lib/shopify_api/auth/jwt_payload.rb +16 -5
  11. data/lib/shopify_api/context.rb +6 -2
  12. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/abandoned_checkout.rb +0 -0
  13. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/access_scope.rb +0 -0
  14. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/android_pay_key.rb +0 -0
  15. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/apple_pay_certificate.rb +0 -0
  16. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/application_charge.rb +0 -0
  17. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/application_credit.rb +0 -0
  18. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/article.rb +0 -0
  19. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/asset.rb +0 -0
  20. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/assigned_fulfillment_order.rb +0 -0
  21. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/balance.rb +0 -0
  22. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/blog.rb +0 -0
  23. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/cancellation_request.rb +0 -0
  24. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/carrier_service.rb +0 -3
  25. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/checkout.rb +0 -0
  26. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/collect.rb +0 -0
  27. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/collection.rb +0 -0
  28. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/collection_listing.rb +0 -0
  29. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/comment.rb +0 -0
  30. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/country.rb +0 -0
  31. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/currency.rb +0 -0
  32. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/custom_collection.rb +0 -0
  33. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/customer.rb +12 -0
  34. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/customer_address.rb +0 -0
  35. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/customer_saved_search.rb +0 -0
  36. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/deprecated_api_call.rb +0 -0
  37. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/discount_code.rb +0 -0
  38. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/dispute.rb +0 -0
  39. data/lib/shopify_api/rest/resources/2022_07/dispute_evidence.rb +117 -0
  40. data/lib/shopify_api/rest/resources/2022_07/dispute_file_upload.rb +81 -0
  41. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/draft_order.rb +6 -1
  42. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/event.rb +0 -0
  43. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/fulfillment.rb +5 -49
  44. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/fulfillment_event.rb +0 -0
  45. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/fulfillment_order.rb +83 -1
  46. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/fulfillment_request.rb +5 -1
  47. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/fulfillment_service.rb +3 -3
  48. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/gift_card.rb +0 -0
  49. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/gift_card_adjustment.rb +0 -0
  50. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/image.rb +0 -0
  51. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/inventory_item.rb +0 -0
  52. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/inventory_level.rb +0 -0
  53. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/location.rb +0 -0
  54. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/locations_for_move.rb +0 -0
  55. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/marketing_event.rb +0 -0
  56. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/metafield.rb +0 -0
  57. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/mobile_platform_application.rb +0 -0
  58. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/order.rb +3 -0
  59. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/order_risk.rb +0 -0
  60. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/page.rb +0 -0
  61. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/payment.rb +0 -0
  62. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/payment_gateway.rb +0 -0
  63. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/payment_transaction.rb +0 -0
  64. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/payout.rb +0 -0
  65. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/policy.rb +0 -0
  66. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/price_rule.rb +3 -3
  67. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/product.rb +0 -0
  68. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/product_listing.rb +0 -0
  69. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/product_resource_feedback.rb +0 -0
  70. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/province.rb +0 -0
  71. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/recurring_application_charge.rb +0 -0
  72. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/redirect.rb +0 -0
  73. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/refund.rb +0 -0
  74. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/report.rb +0 -0
  75. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/resource_feedback.rb +0 -0
  76. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/script_tag.rb +0 -0
  77. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/shipping_zone.rb +0 -0
  78. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/shop.rb +0 -0
  79. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/smart_collection.rb +0 -0
  80. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/storefront_access_token.rb +0 -0
  81. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/tender_transaction.rb +0 -0
  82. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/theme.rb +0 -0
  83. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/transaction.rb +3 -0
  84. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/usage_charge.rb +0 -0
  85. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/user.rb +0 -0
  86. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/variant.rb +0 -0
  87. data/lib/shopify_api/rest/resources/{2021_07 → 2022_07}/webhook.rb +0 -0
  88. data/lib/shopify_api/version.rb +1 -1
  89. data/lib/shopify_api/webhooks/request.rb +1 -1
  90. data/sorbet/rbi/todo.rbi +0 -1
  91. metadata +80 -77
@@ -0,0 +1,117 @@
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 DisputeEvidence < 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
+ @access_activity_log = T.let(nil, T.nilable(String))
20
+ @billing_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
21
+ @cancellation_policy_disclosure = T.let(nil, T.nilable(String))
22
+ @cancellation_rebuttal = T.let(nil, T.nilable(String))
23
+ @created_at = T.let(nil, T.nilable(String))
24
+ @customer_email_address = T.let(nil, T.nilable(String))
25
+ @customer_first_name = T.let(nil, T.nilable(String))
26
+ @customer_last_name = T.let(nil, T.nilable(String))
27
+ @dispute_evidence_files = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
28
+ @fulfillments = T.let(nil, T.nilable(T::Array[T.untyped]))
29
+ @id = T.let(nil, T.nilable(Integer))
30
+ @payments_dispute_id = T.let(nil, T.nilable(Integer))
31
+ @product_description = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
32
+ @refund_policy_disclosure = T.let(nil, T.nilable(String))
33
+ @refund_refusal_explanation = T.let(nil, T.nilable(String))
34
+ @shipping_address_attributes = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
35
+ @submitted = T.let(nil, T.nilable(T::Boolean))
36
+ @uncategorized_text = T.let(nil, T.nilable(String))
37
+ @updated_on = T.let(nil, T.nilable(String))
38
+ end
39
+
40
+ @has_one = T.let({}, T::Hash[Symbol, Class])
41
+ @has_many = T.let({
42
+ fulfillments: Fulfillment
43
+ }, T::Hash[Symbol, Class])
44
+ @paths = T.let([
45
+ {http_method: :get, operation: :get, ids: [:dispute_id], path: "shopify_payments/disputes/<dispute_id>/dispute_evidences.json"},
46
+ {http_method: :put, operation: :put, ids: [:dispute_id], path: "shopify_payments/disputes/<dispute_id>/dispute_evidences.json"}
47
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
48
+
49
+ sig { returns(T.nilable(String)) }
50
+ attr_reader :access_activity_log
51
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
52
+ attr_reader :billing_address
53
+ sig { returns(T.nilable(String)) }
54
+ attr_reader :cancellation_policy_disclosure
55
+ sig { returns(T.nilable(String)) }
56
+ attr_reader :cancellation_rebuttal
57
+ sig { returns(T.nilable(String)) }
58
+ attr_reader :created_at
59
+ sig { returns(T.nilable(String)) }
60
+ attr_reader :customer_email_address
61
+ sig { returns(T.nilable(String)) }
62
+ attr_reader :customer_first_name
63
+ sig { returns(T.nilable(String)) }
64
+ attr_reader :customer_last_name
65
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
66
+ attr_reader :dispute_evidence_files
67
+ sig { returns(T.nilable(T::Array[Fulfillment])) }
68
+ attr_reader :fulfillments
69
+ sig { returns(T.nilable(Integer)) }
70
+ attr_reader :id
71
+ sig { returns(T.nilable(Integer)) }
72
+ attr_reader :payments_dispute_id
73
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
74
+ attr_reader :product_description
75
+ sig { returns(T.nilable(String)) }
76
+ attr_reader :refund_policy_disclosure
77
+ sig { returns(T.nilable(String)) }
78
+ attr_reader :refund_refusal_explanation
79
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
80
+ attr_reader :shipping_address_attributes
81
+ sig { returns(T.nilable(T::Boolean)) }
82
+ attr_reader :submitted
83
+ sig { returns(T.nilable(String)) }
84
+ attr_reader :uncategorized_text
85
+ sig { returns(T.nilable(String)) }
86
+ attr_reader :updated_on
87
+
88
+ class << self
89
+ sig do
90
+ returns(String)
91
+ end
92
+ def primary_key()
93
+ "dispute_id"
94
+ end
95
+
96
+ sig do
97
+ params(
98
+ dispute_id: T.any(Integer, String),
99
+ session: Auth::Session
100
+ ).returns(T.nilable(DisputeEvidence))
101
+ end
102
+ def find(
103
+ dispute_id:,
104
+ session: ShopifyAPI::Context.active_session
105
+ )
106
+ result = base_find(
107
+ session: session,
108
+ ids: {dispute_id: dispute_id},
109
+ params: {},
110
+ )
111
+ T.cast(result[0], T.nilable(DisputeEvidence))
112
+ end
113
+
114
+ end
115
+
116
+ end
117
+ end
@@ -0,0 +1,81 @@
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 DisputeFileUpload < 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
+ @dispute_evidence_id = T.let(nil, T.nilable(Integer))
20
+ @dispute_evidence_type = T.let(nil, T.nilable(String))
21
+ @file_size = T.let(nil, T.nilable(Integer))
22
+ @file_type = T.let(nil, T.nilable(String))
23
+ @filename = T.let(nil, T.nilable(String))
24
+ @id = T.let(nil, T.nilable(Integer))
25
+ @original_filename = T.let(nil, T.nilable(String))
26
+ @shop_id = T.let(nil, T.nilable(Integer))
27
+ @url = T.let(nil, T.nilable(String))
28
+ end
29
+
30
+ @has_one = T.let({}, T::Hash[Symbol, Class])
31
+ @has_many = T.let({}, T::Hash[Symbol, Class])
32
+ @paths = T.let([
33
+ {http_method: :delete, operation: :delete, ids: [:dispute_id, :id], path: "shopify_payments/disputes/<dispute_id>/dispute_file_uploads/<id>.json"},
34
+ {http_method: :post, operation: :post, ids: [:dispute_id], path: "shopify_payments/disputes/<dispute_id>/dispute_file_uploads.json"}
35
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
36
+
37
+ sig { returns(T.nilable(Integer)) }
38
+ attr_reader :dispute_evidence_id
39
+ sig { returns(T.nilable(String)) }
40
+ attr_reader :dispute_evidence_type
41
+ sig { returns(T.nilable(Integer)) }
42
+ attr_reader :file_size
43
+ sig { returns(T.nilable(String)) }
44
+ attr_reader :file_type
45
+ sig { returns(T.nilable(String)) }
46
+ attr_reader :filename
47
+ sig { returns(T.nilable(Integer)) }
48
+ attr_reader :id
49
+ sig { returns(T.nilable(String)) }
50
+ attr_reader :original_filename
51
+ sig { returns(T.nilable(Integer)) }
52
+ attr_reader :shop_id
53
+ sig { returns(T.nilable(String)) }
54
+ attr_reader :url
55
+
56
+ class << self
57
+ sig do
58
+ params(
59
+ id: T.any(Integer, String),
60
+ dispute_id: T.nilable(T.any(Integer, String)),
61
+ session: Auth::Session
62
+ ).returns(T.untyped)
63
+ end
64
+ def delete(
65
+ id:,
66
+ dispute_id: nil,
67
+ session: ShopifyAPI::Context.active_session
68
+ )
69
+ request(
70
+ http_method: :delete,
71
+ operation: :delete,
72
+ session: session,
73
+ ids: {id: id, dispute_id: dispute_id},
74
+ params: {},
75
+ )
76
+ end
77
+
78
+ end
79
+
80
+ end
81
+ end
@@ -31,6 +31,7 @@ module ShopifyAPI
31
31
  @note = T.let(nil, T.nilable(String))
32
32
  @note_attributes = T.let(nil, T.nilable(T::Array[T.untyped]))
33
33
  @order_id = T.let(nil, T.nilable(Integer))
34
+ @payment_terms = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
34
35
  @shipping_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
35
36
  @shipping_line = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
36
37
  @source_name = T.let(nil, T.nilable(String))
@@ -92,6 +93,8 @@ module ShopifyAPI
92
93
  sig { returns(T.nilable(Integer)) }
93
94
  attr_reader :order_id
94
95
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
96
+ attr_reader :payment_terms
97
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
95
98
  attr_reader :shipping_address
96
99
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
97
100
  attr_reader :shipping_line
@@ -245,12 +248,14 @@ module ShopifyAPI
245
248
 
246
249
  sig do
247
250
  params(
251
+ payment_gateway_id: T.untyped,
248
252
  payment_pending: T.untyped,
249
253
  body: T.untyped,
250
254
  kwargs: T.untyped
251
255
  ).returns(T.untyped)
252
256
  end
253
257
  def complete(
258
+ payment_gateway_id: nil,
254
259
  payment_pending: nil,
255
260
  body: nil,
256
261
  **kwargs
@@ -260,7 +265,7 @@ module ShopifyAPI
260
265
  operation: :complete,
261
266
  session: @session,
262
267
  ids: {id: @id},
263
- params: {payment_pending: payment_pending}.merge(kwargs).compact,
268
+ params: {payment_gateway_id: payment_gateway_id, payment_pending: payment_pending}.merge(kwargs).compact,
264
269
  body: body,
265
270
  entity: self,
266
271
  )
@@ -23,6 +23,7 @@ module ShopifyAPI
23
23
  @name = T.let(nil, T.nilable(String))
24
24
  @notify_customer = T.let(nil, T.nilable(T::Boolean))
25
25
  @order_id = T.let(nil, T.nilable(Integer))
26
+ @origin_address = T.let(nil, T.nilable(T::Array[T.untyped]))
26
27
  @receipt = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
27
28
  @service = T.let(nil, T.nilable(String))
28
29
  @shipment_status = T.let(nil, T.nilable(String))
@@ -42,13 +43,8 @@ module ShopifyAPI
42
43
  {http_method: :get, operation: :get, ids: [:order_id], path: "orders/<order_id>/fulfillments.json"},
43
44
  {http_method: :get, operation: :get, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>.json"},
44
45
  {http_method: :post, operation: :cancel, ids: [:id], path: "fulfillments/<id>/cancel.json"},
45
- {http_method: :post, operation: :cancel, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>/cancel.json"},
46
- {http_method: :post, operation: :complete, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>/complete.json"},
47
- {http_method: :post, operation: :open, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>/open.json"},
48
46
  {http_method: :post, operation: :post, ids: [], path: "fulfillments.json"},
49
- {http_method: :post, operation: :post, ids: [:order_id], path: "orders/<order_id>/fulfillments.json"},
50
- {http_method: :post, operation: :update_tracking, ids: [:id], path: "fulfillments/<id>/update_tracking.json"},
51
- {http_method: :put, operation: :put, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>.json"}
47
+ {http_method: :post, operation: :update_tracking, ids: [:id], path: "fulfillments/<id>/update_tracking.json"}
52
48
  ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
53
49
 
54
50
  sig { returns(T.nilable(String)) }
@@ -65,6 +61,8 @@ module ShopifyAPI
65
61
  attr_reader :notify_customer
66
62
  sig { returns(T.nilable(Integer)) }
67
63
  attr_reader :order_id
64
+ sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
65
+ attr_reader :origin_address
68
66
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
69
67
  attr_reader :receipt
70
68
  sig { returns(T.nilable(String)) }
@@ -191,49 +189,7 @@ module ShopifyAPI
191
189
  http_method: :post,
192
190
  operation: :cancel,
193
191
  session: @session,
194
- ids: {id: @id, order_id: @order_id},
195
- params: {}.merge(kwargs).compact,
196
- body: body,
197
- entity: self,
198
- )
199
- end
200
-
201
- sig do
202
- params(
203
- body: T.untyped,
204
- kwargs: T.untyped
205
- ).returns(T.untyped)
206
- end
207
- def complete(
208
- body: nil,
209
- **kwargs
210
- )
211
- self.class.request(
212
- http_method: :post,
213
- operation: :complete,
214
- session: @session,
215
- ids: {id: @id, order_id: @order_id},
216
- params: {}.merge(kwargs).compact,
217
- body: body,
218
- entity: self,
219
- )
220
- end
221
-
222
- sig do
223
- params(
224
- body: T.untyped,
225
- kwargs: T.untyped
226
- ).returns(T.untyped)
227
- end
228
- def open(
229
- body: nil,
230
- **kwargs
231
- )
232
- self.class.request(
233
- http_method: :post,
234
- operation: :open,
235
- session: @session,
236
- ids: {id: @id, order_id: @order_id},
192
+ ids: {id: @id},
237
193
  params: {}.merge(kwargs).compact,
238
194
  body: body,
239
195
  entity: self,
@@ -21,6 +21,8 @@ module ShopifyAPI
21
21
  @delivery_method = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
22
22
  @destination = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
23
23
  @fulfill_at = T.let(nil, T.nilable(String))
24
+ @fulfill_by = T.let(nil, T.nilable(String))
25
+ @fulfillment_holds = T.let(nil, T.nilable(T::Array[T.untyped]))
24
26
  @id = T.let(nil, T.nilable(Integer))
25
27
  @international_duties = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
26
28
  @line_items = T.let(nil, T.nilable(T::Array[T.untyped]))
@@ -39,9 +41,12 @@ module ShopifyAPI
39
41
  {http_method: :get, operation: :get, ids: [:order_id], path: "orders/<order_id>/fulfillment_orders.json"},
40
42
  {http_method: :post, operation: :cancel, ids: [:id], path: "fulfillment_orders/<id>/cancel.json"},
41
43
  {http_method: :post, operation: :close, ids: [:id], path: "fulfillment_orders/<id>/close.json"},
44
+ {http_method: :post, operation: :hold, ids: [:id], path: "fulfillment_orders/<id>/hold.json"},
42
45
  {http_method: :post, operation: :move, ids: [:id], path: "fulfillment_orders/<id>/move.json"},
43
46
  {http_method: :post, operation: :open, ids: [:id], path: "fulfillment_orders/<id>/open.json"},
44
- {http_method: :post, operation: :reschedule, ids: [:id], path: "fulfillment_orders/<id>/reschedule.json"}
47
+ {http_method: :post, operation: :release_hold, ids: [:id], path: "fulfillment_orders/<id>/release_hold.json"},
48
+ {http_method: :post, operation: :reschedule, ids: [:id], path: "fulfillment_orders/<id>/reschedule.json"},
49
+ {http_method: :post, operation: :set_fulfillment_orders_deadline, ids: [], path: "fulfillment_orders/set_fulfillment_orders_deadline.json"}
45
50
  ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
46
51
 
47
52
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
@@ -54,6 +59,10 @@ module ShopifyAPI
54
59
  attr_reader :destination
55
60
  sig { returns(T.nilable(String)) }
56
61
  attr_reader :fulfill_at
62
+ sig { returns(T.nilable(String)) }
63
+ attr_reader :fulfill_by
64
+ sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
65
+ attr_reader :fulfillment_holds
57
66
  sig { returns(T.nilable(Integer)) }
58
67
  attr_reader :id
59
68
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
@@ -159,6 +168,33 @@ module ShopifyAPI
159
168
  )
160
169
  end
161
170
 
171
+ sig do
172
+ params(
173
+ reason: T.untyped,
174
+ reason_notes: T.untyped,
175
+ notify_merchant: T.untyped,
176
+ body: T.untyped,
177
+ kwargs: T.untyped
178
+ ).returns(T.untyped)
179
+ end
180
+ def hold(
181
+ reason: nil,
182
+ reason_notes: nil,
183
+ notify_merchant: nil,
184
+ body: nil,
185
+ **kwargs
186
+ )
187
+ self.class.request(
188
+ http_method: :post,
189
+ operation: :hold,
190
+ session: @session,
191
+ ids: {id: @id},
192
+ params: {reason: reason, reason_notes: reason_notes, notify_merchant: notify_merchant}.merge(kwargs).compact,
193
+ body: body,
194
+ entity: self,
195
+ )
196
+ end
197
+
162
198
  sig do
163
199
  params(
164
200
  new_location_id: T.untyped,
@@ -203,6 +239,27 @@ module ShopifyAPI
203
239
  )
204
240
  end
205
241
 
242
+ sig do
243
+ params(
244
+ body: T.untyped,
245
+ kwargs: T.untyped
246
+ ).returns(T.untyped)
247
+ end
248
+ def release_hold(
249
+ body: nil,
250
+ **kwargs
251
+ )
252
+ self.class.request(
253
+ http_method: :post,
254
+ operation: :release_hold,
255
+ session: @session,
256
+ ids: {id: @id},
257
+ params: {}.merge(kwargs).compact,
258
+ body: body,
259
+ entity: self,
260
+ )
261
+ end
262
+
206
263
  sig do
207
264
  params(
208
265
  body: T.untyped,
@@ -224,5 +281,30 @@ module ShopifyAPI
224
281
  )
225
282
  end
226
283
 
284
+ sig do
285
+ params(
286
+ fulfillment_order_ids: T.untyped,
287
+ fulfillment_deadline: T.untyped,
288
+ body: T.untyped,
289
+ kwargs: T.untyped
290
+ ).returns(T.untyped)
291
+ end
292
+ def set_fulfillment_orders_deadline(
293
+ fulfillment_order_ids: nil,
294
+ fulfillment_deadline: nil,
295
+ body: nil,
296
+ **kwargs
297
+ )
298
+ self.class.request(
299
+ http_method: :post,
300
+ operation: :set_fulfillment_orders_deadline,
301
+ session: @session,
302
+ ids: {},
303
+ params: {fulfillment_order_ids: fulfillment_order_ids, fulfillment_deadline: fulfillment_deadline}.merge(kwargs).compact,
304
+ body: body,
305
+ entity: self,
306
+ )
307
+ end
308
+
227
309
  end
228
310
  end
@@ -59,12 +59,16 @@ module ShopifyAPI
59
59
  sig do
60
60
  params(
61
61
  message: T.untyped,
62
+ reason: T.untyped,
63
+ line_items: T.untyped,
62
64
  body: T.untyped,
63
65
  kwargs: T.untyped
64
66
  ).returns(T.untyped)
65
67
  end
66
68
  def reject(
67
69
  message: nil,
70
+ reason: nil,
71
+ line_items: nil,
68
72
  body: nil,
69
73
  **kwargs
70
74
  )
@@ -73,7 +77,7 @@ module ShopifyAPI
73
77
  operation: :reject,
74
78
  session: @session,
75
79
  ids: {fulfillment_order_id: @fulfillment_order_id},
76
- params: {message: message}.merge(kwargs).compact,
80
+ params: {message: message, reason: reason, line_items: line_items}.merge(kwargs).compact,
77
81
  body: body,
78
82
  entity: self,
79
83
  )
@@ -18,13 +18,13 @@ module ShopifyAPI
18
18
 
19
19
  @admin_graphql_api_id = T.let(nil, T.nilable(String))
20
20
  @callback_url = T.let(nil, T.nilable(String))
21
- @format = T.let(nil, T.nilable(String))
22
21
  @fulfillment_orders_opt_in = T.let(nil, T.nilable(T::Boolean))
23
22
  @handle = T.let(nil, T.nilable(String))
24
23
  @id = T.let(nil, T.nilable(Integer))
25
24
  @inventory_management = T.let(nil, T.nilable(T::Boolean))
26
25
  @location_id = T.let(nil, T.nilable(Integer))
27
26
  @name = T.let(nil, T.nilable(String))
27
+ @permits_sku_sharing = T.let(nil, T.nilable(T::Boolean))
28
28
  @provider_id = T.let(nil, T.nilable(String))
29
29
  @requires_shipping_method = T.let(nil, T.nilable(T::Boolean))
30
30
  @tracking_support = T.let(nil, T.nilable(T::Boolean))
@@ -44,8 +44,6 @@ module ShopifyAPI
44
44
  attr_reader :admin_graphql_api_id
45
45
  sig { returns(T.nilable(String)) }
46
46
  attr_reader :callback_url
47
- sig { returns(T.nilable(String)) }
48
- attr_reader :format
49
47
  sig { returns(T.nilable(T::Boolean)) }
50
48
  attr_reader :fulfillment_orders_opt_in
51
49
  sig { returns(T.nilable(String)) }
@@ -58,6 +56,8 @@ module ShopifyAPI
58
56
  attr_reader :location_id
59
57
  sig { returns(T.nilable(String)) }
60
58
  attr_reader :name
59
+ sig { returns(T.nilable(T::Boolean)) }
60
+ attr_reader :permits_sku_sharing
61
61
  sig { returns(T.nilable(String)) }
62
62
  attr_reader :provider_id
63
63
  sig { returns(T.nilable(T::Boolean)) }
@@ -60,6 +60,7 @@ module ShopifyAPI
60
60
  @original_total_duties_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
61
61
  @payment_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
62
62
  @payment_gateway_names = T.let(nil, T.nilable(T::Array[T.untyped]))
63
+ @payment_terms = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
63
64
  @phone = T.let(nil, T.nilable(String))
64
65
  @presentment_currency = T.let(nil, T.nilable(String))
65
66
  @processed_at = T.let(nil, T.nilable(String))
@@ -202,6 +203,8 @@ module ShopifyAPI
202
203
  attr_reader :payment_details
203
204
  sig { returns(T.nilable(T::Array[String])) }
204
205
  attr_reader :payment_gateway_names
206
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
207
+ attr_reader :payment_terms
205
208
  sig { returns(T.nilable(String)) }
206
209
  attr_reader :phone
207
210
  sig { returns(T.nilable(String)) }
@@ -19,6 +19,7 @@ module ShopifyAPI
19
19
  @allocation_limit = T.let(nil, T.nilable(Integer))
20
20
  @allocation_method = T.let(nil, T.nilable(String))
21
21
  @created_at = T.let(nil, T.nilable(String))
22
+ @customer_segment_prerequisite_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
22
23
  @customer_selection = T.let(nil, T.nilable(String))
23
24
  @ends_at = T.let(nil, T.nilable(String))
24
25
  @entitled_collection_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
@@ -31,7 +32,6 @@ module ShopifyAPI
31
32
  @prerequisite_customer_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
32
33
  @prerequisite_product_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
33
34
  @prerequisite_quantity_range = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
34
- @prerequisite_saved_search_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
35
35
  @prerequisite_shipping_price_range = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
36
36
  @prerequisite_subtotal_range = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
37
37
  @prerequisite_to_entitlement_purchase = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@@ -64,6 +64,8 @@ module ShopifyAPI
64
64
  attr_reader :allocation_method
65
65
  sig { returns(T.nilable(String)) }
66
66
  attr_reader :created_at
67
+ sig { returns(T.nilable(T::Array[Integer])) }
68
+ attr_reader :customer_segment_prerequisite_ids
67
69
  sig { returns(T.nilable(String)) }
68
70
  attr_reader :customer_selection
69
71
  sig { returns(T.nilable(String)) }
@@ -88,8 +90,6 @@ module ShopifyAPI
88
90
  attr_reader :prerequisite_product_ids
89
91
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
90
92
  attr_reader :prerequisite_quantity_range
91
- sig { returns(T.nilable(T::Array[Integer])) }
92
- attr_reader :prerequisite_saved_search_ids
93
93
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
94
94
  attr_reader :prerequisite_shipping_price_range
95
95
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
@@ -33,6 +33,7 @@ module ShopifyAPI
33
33
  @order_id = T.let(nil, T.nilable(Integer))
34
34
  @parent_id = T.let(nil, T.nilable(Integer))
35
35
  @payment_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
36
+ @payments_refund_attributes = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
36
37
  @processed_at = T.let(nil, T.nilable(String))
37
38
  @receipt = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
38
39
  @source_name = T.let(nil, T.nilable(String))
@@ -84,6 +85,8 @@ module ShopifyAPI
84
85
  attr_reader :parent_id
85
86
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
86
87
  attr_reader :payment_details
88
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
89
+ attr_reader :payments_refund_attributes
87
90
  sig { returns(T.nilable(String)) }
88
91
  attr_reader :processed_at
89
92
  sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }