shopify_api 12.4.0 → 12.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/.github/api_update_reminder.md +25 -0
  3. data/.github/api_update_reminder_on_release.md +19 -0
  4. data/.github/workflows/api_update_reminder.yml +16 -0
  5. data/.github/workflows/api_update_reminder_on_release.yml +16 -0
  6. data/.github/workflows/stale.yml +20 -10
  7. data/CHANGELOG.md +11 -4
  8. data/CONTRIBUTING.md +2 -2
  9. data/Gemfile.lock +6 -6
  10. data/README.md +10 -10
  11. data/docs/getting_started.md +2 -2
  12. data/docs/usage/graphql.md +6 -0
  13. data/docs/usage/graphql_storefront.md +8 -2
  14. data/docs/usage/oauth.md +1 -1
  15. data/docs/usage/rest.md +9 -2
  16. data/docs/usage/webhooks.md +1 -1
  17. data/lib/shopify_api/admin_versions.rb +2 -1
  18. data/lib/shopify_api/clients/graphql/admin.rb +3 -3
  19. data/lib/shopify_api/clients/graphql/client.rb +13 -3
  20. data/lib/shopify_api/clients/graphql/storefront.rb +3 -3
  21. data/lib/shopify_api/clients/http_client.rb +8 -1
  22. data/lib/shopify_api/clients/rest/admin.rb +14 -3
  23. data/lib/shopify_api/rest/base.rb +3 -1
  24. data/lib/shopify_api/rest/resources/2022_07/application_charge.rb +6 -1
  25. data/lib/shopify_api/rest/resources/2022_07/application_credit.rb +6 -1
  26. data/lib/shopify_api/rest/resources/2022_07/gift_card.rb +4 -4
  27. data/lib/shopify_api/rest/resources/2022_07/metafield.rb +2 -2
  28. data/lib/shopify_api/rest/resources/2022_07/order.rb +2 -2
  29. data/lib/shopify_api/rest/resources/2022_07/recurring_application_charge.rb +6 -1
  30. data/lib/shopify_api/rest/resources/2022_07/shipping_zone.rb +6 -6
  31. data/lib/shopify_api/rest/resources/2022_07/usage_charge.rb +6 -1
  32. data/lib/shopify_api/rest/resources/2022_10/application_charge.rb +6 -1
  33. data/lib/shopify_api/rest/resources/2022_10/application_credit.rb +6 -1
  34. data/lib/shopify_api/rest/resources/2022_10/gift_card.rb +4 -4
  35. data/lib/shopify_api/rest/resources/2022_10/metafield.rb +2 -2
  36. data/lib/shopify_api/rest/resources/2022_10/order.rb +2 -2
  37. data/lib/shopify_api/rest/resources/2022_10/recurring_application_charge.rb +6 -1
  38. data/lib/shopify_api/rest/resources/2022_10/shipping_zone.rb +6 -6
  39. data/lib/shopify_api/rest/resources/2022_10/usage_charge.rb +6 -1
  40. data/lib/shopify_api/rest/resources/2023_01/application_charge.rb +6 -1
  41. data/lib/shopify_api/rest/resources/2023_01/application_credit.rb +6 -1
  42. data/lib/shopify_api/rest/resources/2023_01/dispute_evidence.rb +117 -0
  43. data/lib/shopify_api/rest/resources/{2022_04/storefront_access_token.rb → 2023_01/dispute_file_upload.rb} +27 -33
  44. data/lib/shopify_api/rest/resources/2023_01/gift_card.rb +4 -4
  45. data/lib/shopify_api/rest/resources/2023_01/metafield.rb +2 -2
  46. data/lib/shopify_api/rest/resources/2023_01/order.rb +2 -2
  47. data/lib/shopify_api/rest/resources/2023_01/recurring_application_charge.rb +6 -1
  48. data/lib/shopify_api/rest/resources/2023_01/shipping_zone.rb +6 -6
  49. data/lib/shopify_api/rest/resources/2023_01/usage_charge.rb +6 -1
  50. data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/application_charge.rb +6 -1
  51. data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/application_credit.rb +6 -1
  52. data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/carrier_service.rb +0 -3
  53. data/lib/shopify_api/rest/resources/2023_04/dispute_evidence.rb +117 -0
  54. data/lib/shopify_api/rest/resources/{2022_04/android_pay_key.rb → 2023_04/dispute_file_upload.rb} +29 -25
  55. data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/fulfillment.rb +2 -49
  56. data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/fulfillment_order.rb +36 -8
  57. data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/fulfillment_service.rb +3 -3
  58. data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/gift_card.rb +4 -4
  59. data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/metafield.rb +2 -2
  60. data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/order.rb +14 -2
  61. data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/recurring_application_charge.rb +6 -1
  62. data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/shipping_zone.rb +6 -6
  63. data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/shop.rb +3 -0
  64. data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/transaction.rb +3 -0
  65. data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/usage_charge.rb +6 -1
  66. data/lib/shopify_api/version.rb +1 -1
  67. data/shopify_api.gemspec +1 -1
  68. metadata +85 -152
  69. data/lib/shopify_api/rest/resources/2022_01/android_pay_key.rb +0 -77
  70. data/lib/shopify_api/rest/resources/2022_01/customer.rb +0 -326
  71. data/lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb +0 -281
  72. data/lib/shopify_api/rest/resources/2022_01/fulfillment_service.rb +0 -130
  73. data/lib/shopify_api/rest/resources/2022_01/gift_card.rb +0 -215
  74. data/lib/shopify_api/rest/resources/2022_01/metafield.rb +0 -349
  75. data/lib/shopify_api/rest/resources/2022_01/order.rb +0 -473
  76. data/lib/shopify_api/rest/resources/2022_01/price_rule.rb +0 -223
  77. data/lib/shopify_api/rest/resources/2022_01/usage_charge.rb +0 -97
  78. data/lib/shopify_api/rest/resources/2022_04/abandoned_checkout.rb +0 -190
  79. data/lib/shopify_api/rest/resources/2022_04/access_scope.rb +0 -58
  80. data/lib/shopify_api/rest/resources/2022_04/apple_pay_certificate.rb +0 -105
  81. data/lib/shopify_api/rest/resources/2022_04/application_charge.rb +0 -104
  82. data/lib/shopify_api/rest/resources/2022_04/application_credit.rb +0 -87
  83. data/lib/shopify_api/rest/resources/2022_04/article.rb +0 -265
  84. data/lib/shopify_api/rest/resources/2022_04/asset.rb +0 -118
  85. data/lib/shopify_api/rest/resources/2022_04/assigned_fulfillment_order.rb +0 -86
  86. data/lib/shopify_api/rest/resources/2022_04/balance.rb +0 -50
  87. data/lib/shopify_api/rest/resources/2022_04/blog.rb +0 -162
  88. data/lib/shopify_api/rest/resources/2022_04/cancellation_request.rb +0 -83
  89. data/lib/shopify_api/rest/resources/2022_04/carrier_service.rb +0 -116
  90. data/lib/shopify_api/rest/resources/2022_04/checkout.rb +0 -209
  91. data/lib/shopify_api/rest/resources/2022_04/collect.rb +0 -142
  92. data/lib/shopify_api/rest/resources/2022_04/collection.rb +0 -110
  93. data/lib/shopify_api/rest/resources/2022_04/collection_listing.rb +0 -155
  94. data/lib/shopify_api/rest/resources/2022_04/comment.rb +0 -283
  95. data/lib/shopify_api/rest/resources/2022_04/country.rb +0 -137
  96. data/lib/shopify_api/rest/resources/2022_04/currency.rb +0 -57
  97. data/lib/shopify_api/rest/resources/2022_04/custom_collection.rb +0 -187
  98. data/lib/shopify_api/rest/resources/2022_04/customer_address.rb +0 -201
  99. data/lib/shopify_api/rest/resources/2022_04/customer_saved_search.rb +0 -169
  100. data/lib/shopify_api/rest/resources/2022_04/deprecated_api_call.rb +0 -57
  101. data/lib/shopify_api/rest/resources/2022_04/discount_code.rb +0 -219
  102. data/lib/shopify_api/rest/resources/2022_04/dispute.rb +0 -111
  103. data/lib/shopify_api/rest/resources/2022_04/draft_order.rb +0 -275
  104. data/lib/shopify_api/rest/resources/2022_04/event.rb +0 -148
  105. data/lib/shopify_api/rest/resources/2022_04/fulfillment.rb +0 -272
  106. data/lib/shopify_api/rest/resources/2022_04/fulfillment_event.rb +0 -166
  107. data/lib/shopify_api/rest/resources/2022_04/fulfillment_request.rb +0 -87
  108. data/lib/shopify_api/rest/resources/2022_04/gift_card_adjustment.rb +0 -118
  109. data/lib/shopify_api/rest/resources/2022_04/image.rb +0 -157
  110. data/lib/shopify_api/rest/resources/2022_04/inventory_item.rb +0 -108
  111. data/lib/shopify_api/rest/resources/2022_04/inventory_level.rb +0 -179
  112. data/lib/shopify_api/rest/resources/2022_04/location.rb +0 -167
  113. data/lib/shopify_api/rest/resources/2022_04/locations_for_move.rb +0 -56
  114. data/lib/shopify_api/rest/resources/2022_04/marketing_event.rb +0 -209
  115. data/lib/shopify_api/rest/resources/2022_04/mobile_platform_application.rb +0 -110
  116. data/lib/shopify_api/rest/resources/2022_04/order_risk.rb +0 -135
  117. data/lib/shopify_api/rest/resources/2022_04/page.rb +0 -194
  118. data/lib/shopify_api/rest/resources/2022_04/payment.rb +0 -140
  119. data/lib/shopify_api/rest/resources/2022_04/payment_gateway.rb +0 -143
  120. data/lib/shopify_api/rest/resources/2022_04/payment_transaction.rb +0 -107
  121. data/lib/shopify_api/rest/resources/2022_04/payout.rb +0 -97
  122. data/lib/shopify_api/rest/resources/2022_04/policy.rb +0 -69
  123. data/lib/shopify_api/rest/resources/2022_04/product.rb +0 -223
  124. data/lib/shopify_api/rest/resources/2022_04/product_listing.rb +0 -196
  125. data/lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb +0 -88
  126. data/lib/shopify_api/rest/resources/2022_04/province.rb +0 -132
  127. data/lib/shopify_api/rest/resources/2022_04/recurring_application_charge.rb +0 -167
  128. data/lib/shopify_api/rest/resources/2022_04/redirect.rb +0 -139
  129. data/lib/shopify_api/rest/resources/2022_04/refund.rb +0 -151
  130. data/lib/shopify_api/rest/resources/2022_04/report.rb +0 -121
  131. data/lib/shopify_api/rest/resources/2022_04/resource_feedback.rb +0 -73
  132. data/lib/shopify_api/rest/resources/2022_04/script_tag.rb +0 -155
  133. data/lib/shopify_api/rest/resources/2022_04/shipping_zone.rb +0 -83
  134. data/lib/shopify_api/rest/resources/2022_04/shop.rb +0 -218
  135. data/lib/shopify_api/rest/resources/2022_04/smart_collection.rb +0 -216
  136. data/lib/shopify_api/rest/resources/2022_04/tender_transaction.rb +0 -93
  137. data/lib/shopify_api/rest/resources/2022_04/theme.rb +0 -120
  138. data/lib/shopify_api/rest/resources/2022_04/transaction.rb +0 -181
  139. data/lib/shopify_api/rest/resources/2022_04/user.rb +0 -138
  140. data/lib/shopify_api/rest/resources/2022_04/variant.rb +0 -212
  141. data/lib/shopify_api/rest/resources/2022_04/webhook.rb +0 -168
  142. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/abandoned_checkout.rb +0 -0
  143. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/access_scope.rb +0 -0
  144. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/apple_pay_certificate.rb +0 -0
  145. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/article.rb +0 -0
  146. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/asset.rb +0 -0
  147. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/assigned_fulfillment_order.rb +0 -0
  148. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/balance.rb +0 -0
  149. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/blog.rb +0 -0
  150. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/cancellation_request.rb +0 -0
  151. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/checkout.rb +0 -0
  152. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/collect.rb +0 -0
  153. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/collection.rb +0 -0
  154. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/collection_listing.rb +0 -0
  155. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/comment.rb +0 -0
  156. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/country.rb +0 -0
  157. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/currency.rb +0 -0
  158. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/custom_collection.rb +0 -0
  159. /data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/customer.rb +0 -0
  160. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/customer_address.rb +0 -0
  161. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/customer_saved_search.rb +0 -0
  162. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/deprecated_api_call.rb +0 -0
  163. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/discount_code.rb +0 -0
  164. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/dispute.rb +0 -0
  165. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/draft_order.rb +0 -0
  166. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/event.rb +0 -0
  167. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/fulfillment_event.rb +0 -0
  168. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/fulfillment_request.rb +0 -0
  169. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/gift_card_adjustment.rb +0 -0
  170. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/image.rb +0 -0
  171. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/inventory_item.rb +0 -0
  172. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/inventory_level.rb +0 -0
  173. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/location.rb +0 -0
  174. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/locations_for_move.rb +0 -0
  175. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/marketing_event.rb +0 -0
  176. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/mobile_platform_application.rb +0 -0
  177. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/order_risk.rb +0 -0
  178. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/page.rb +0 -0
  179. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/payment.rb +0 -0
  180. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/payment_gateway.rb +0 -0
  181. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/payment_transaction.rb +0 -0
  182. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/payout.rb +0 -0
  183. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/policy.rb +0 -0
  184. /data/lib/shopify_api/rest/resources/{2022_04 → 2023_04}/price_rule.rb +0 -0
  185. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/product.rb +0 -0
  186. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/product_listing.rb +0 -0
  187. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/product_resource_feedback.rb +0 -0
  188. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/province.rb +0 -0
  189. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/redirect.rb +0 -0
  190. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/refund.rb +0 -0
  191. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/report.rb +0 -0
  192. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/resource_feedback.rb +0 -0
  193. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/script_tag.rb +0 -0
  194. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/smart_collection.rb +0 -0
  195. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/storefront_access_token.rb +0 -0
  196. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/tender_transaction.rb +0 -0
  197. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/theme.rb +0 -0
  198. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/user.rb +0 -0
  199. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/variant.rb +0 -0
  200. /data/lib/shopify_api/rest/resources/{2022_01 → 2023_04}/webhook.rb +0 -0
@@ -1,148 +0,0 @@
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 Event < 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
- @arguments = T.let(nil, T.nilable(String))
20
- @body = T.let(nil, T.nilable(String))
21
- @created_at = T.let(nil, T.nilable(String))
22
- @description = T.let(nil, T.nilable(String))
23
- @id = T.let(nil, T.nilable(Integer))
24
- @message = T.let(nil, T.nilable(String))
25
- @path = T.let(nil, T.nilable(String))
26
- @subject_id = T.let(nil, T.nilable(Integer))
27
- @subject_type = T.let(nil, T.nilable(String))
28
- @verb = T.let(nil, T.nilable(String))
29
- end
30
-
31
- @has_one = T.let({}, T::Hash[Symbol, Class])
32
- @has_many = T.let({}, T::Hash[Symbol, Class])
33
- @paths = T.let([
34
- {http_method: :get, operation: :count, ids: [], path: "events/count.json"},
35
- {http_method: :get, operation: :get, ids: [], path: "events.json"},
36
- {http_method: :get, operation: :get, ids: [:id], path: "events/<id>.json"},
37
- {http_method: :get, operation: :get, ids: [:order_id], path: "orders/<order_id>/events.json"},
38
- {http_method: :get, operation: :get, ids: [:product_id], path: "products/<product_id>/events.json"}
39
- ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
40
-
41
- sig { returns(T.nilable(String)) }
42
- attr_reader :arguments
43
- sig { returns(T.nilable(String)) }
44
- attr_reader :body
45
- sig { returns(T.nilable(String)) }
46
- attr_reader :created_at
47
- sig { returns(T.nilable(String)) }
48
- attr_reader :description
49
- sig { returns(T.nilable(Integer)) }
50
- attr_reader :id
51
- sig { returns(T.nilable(String)) }
52
- attr_reader :message
53
- sig { returns(T.nilable(String)) }
54
- attr_reader :path
55
- sig { returns(T.nilable(Integer)) }
56
- attr_reader :subject_id
57
- sig { returns(T.nilable(String)) }
58
- attr_reader :subject_type
59
- sig { returns(T.nilable(String)) }
60
- attr_reader :verb
61
-
62
- class << self
63
- sig do
64
- params(
65
- id: T.any(Integer, String),
66
- fields: T.untyped,
67
- session: Auth::Session
68
- ).returns(T.nilable(Event))
69
- end
70
- def find(
71
- id:,
72
- fields: nil,
73
- session: ShopifyAPI::Context.active_session
74
- )
75
- result = base_find(
76
- session: session,
77
- ids: {id: id},
78
- params: {fields: fields},
79
- )
80
- T.cast(result[0], T.nilable(Event))
81
- end
82
-
83
- sig do
84
- params(
85
- order_id: T.nilable(T.any(Integer, String)),
86
- product_id: T.nilable(T.any(Integer, String)),
87
- limit: T.untyped,
88
- since_id: T.untyped,
89
- created_at_min: T.untyped,
90
- created_at_max: T.untyped,
91
- filter: T.untyped,
92
- verb: T.untyped,
93
- fields: T.untyped,
94
- session: Auth::Session,
95
- kwargs: T.untyped
96
- ).returns(T::Array[Event])
97
- end
98
- def all(
99
- order_id: nil,
100
- product_id: nil,
101
- limit: nil,
102
- since_id: nil,
103
- created_at_min: nil,
104
- created_at_max: nil,
105
- filter: nil,
106
- verb: nil,
107
- fields: nil,
108
- session: ShopifyAPI::Context.active_session,
109
- **kwargs
110
- )
111
- response = base_find(
112
- session: session,
113
- ids: {order_id: order_id, product_id: product_id},
114
- params: {limit: limit, since_id: since_id, created_at_min: created_at_min, created_at_max: created_at_max, filter: filter, verb: verb, fields: fields}.merge(kwargs).compact,
115
- )
116
-
117
- T.cast(response, T::Array[Event])
118
- end
119
-
120
- sig do
121
- params(
122
- created_at_min: T.untyped,
123
- created_at_max: T.untyped,
124
- session: Auth::Session,
125
- kwargs: T.untyped
126
- ).returns(T.untyped)
127
- end
128
- def count(
129
- created_at_min: nil,
130
- created_at_max: nil,
131
- session: ShopifyAPI::Context.active_session,
132
- **kwargs
133
- )
134
- request(
135
- http_method: :get,
136
- operation: :count,
137
- session: session,
138
- ids: {},
139
- params: {created_at_min: created_at_min, created_at_max: created_at_max}.merge(kwargs).compact,
140
- body: {},
141
- entity: nil,
142
- )
143
- end
144
-
145
- end
146
-
147
- end
148
- end
@@ -1,272 +0,0 @@
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 Fulfillment < 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
- @created_at = T.let(nil, T.nilable(String))
20
- @id = T.let(nil, T.nilable(Integer))
21
- @line_items = T.let(nil, T.nilable(T::Array[T.untyped]))
22
- @location_id = T.let(nil, T.nilable(Integer))
23
- @name = T.let(nil, T.nilable(String))
24
- @notify_customer = T.let(nil, T.nilable(T::Boolean))
25
- @order_id = T.let(nil, T.nilable(Integer))
26
- @origin_address = T.let(nil, T.nilable(T::Array[T.untyped]))
27
- @receipt = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
28
- @service = T.let(nil, T.nilable(String))
29
- @shipment_status = T.let(nil, T.nilable(String))
30
- @status = T.let(nil, T.nilable(String))
31
- @tracking_company = T.let(nil, T.nilable(String))
32
- @tracking_numbers = T.let(nil, T.nilable(T::Array[T.untyped]))
33
- @tracking_urls = T.let(nil, T.nilable(T::Array[T.untyped]))
34
- @updated_at = T.let(nil, T.nilable(String))
35
- @variant_inventory_management = T.let(nil, T.nilable(String))
36
- end
37
-
38
- @has_one = T.let({}, T::Hash[Symbol, Class])
39
- @has_many = T.let({}, T::Hash[Symbol, Class])
40
- @paths = T.let([
41
- {http_method: :get, operation: :count, ids: [:order_id], path: "orders/<order_id>/fulfillments/count.json"},
42
- {http_method: :get, operation: :get, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/fulfillments.json"},
43
- {http_method: :get, operation: :get, ids: [:order_id], path: "orders/<order_id>/fulfillments.json"},
44
- {http_method: :get, operation: :get, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>.json"},
45
- {http_method: :post, operation: :cancel, ids: [:id], path: "fulfillments/<id>/cancel.json"},
46
- {http_method: :post, operation: :cancel, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>/cancel.json"},
47
- {http_method: :post, operation: :complete, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>/complete.json"},
48
- {http_method: :post, operation: :open, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>/open.json"},
49
- {http_method: :post, operation: :post, ids: [], path: "fulfillments.json"},
50
- {http_method: :post, operation: :post, ids: [:order_id], path: "orders/<order_id>/fulfillments.json"},
51
- {http_method: :post, operation: :update_tracking, ids: [:id], path: "fulfillments/<id>/update_tracking.json"},
52
- {http_method: :put, operation: :put, ids: [:order_id, :id], path: "orders/<order_id>/fulfillments/<id>.json"}
53
- ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
54
-
55
- sig { returns(T.nilable(String)) }
56
- attr_reader :created_at
57
- sig { returns(T.nilable(Integer)) }
58
- attr_reader :id
59
- sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
60
- attr_reader :line_items
61
- sig { returns(T.nilable(Integer)) }
62
- attr_reader :location_id
63
- sig { returns(T.nilable(String)) }
64
- attr_reader :name
65
- sig { returns(T.nilable(T::Boolean)) }
66
- attr_reader :notify_customer
67
- sig { returns(T.nilable(Integer)) }
68
- attr_reader :order_id
69
- sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
70
- attr_reader :origin_address
71
- sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
72
- attr_reader :receipt
73
- sig { returns(T.nilable(String)) }
74
- attr_reader :service
75
- sig { returns(T.nilable(String)) }
76
- attr_reader :shipment_status
77
- sig { returns(T.nilable(String)) }
78
- attr_reader :status
79
- sig { returns(T.nilable(String)) }
80
- attr_reader :tracking_company
81
- sig { returns(T.nilable(T::Array[String])) }
82
- attr_reader :tracking_numbers
83
- sig { returns(T.nilable(T::Array[String])) }
84
- attr_reader :tracking_urls
85
- sig { returns(T.nilable(String)) }
86
- attr_reader :updated_at
87
- sig { returns(T.nilable(String)) }
88
- attr_reader :variant_inventory_management
89
-
90
- class << self
91
- sig do
92
- params(
93
- id: T.any(Integer, String),
94
- order_id: T.nilable(T.any(Integer, String)),
95
- fields: T.untyped,
96
- session: Auth::Session
97
- ).returns(T.nilable(Fulfillment))
98
- end
99
- def find(
100
- id:,
101
- order_id: nil,
102
- fields: nil,
103
- session: ShopifyAPI::Context.active_session
104
- )
105
- result = base_find(
106
- session: session,
107
- ids: {id: id, order_id: order_id},
108
- params: {fields: fields},
109
- )
110
- T.cast(result[0], T.nilable(Fulfillment))
111
- end
112
-
113
- sig do
114
- params(
115
- fulfillment_order_id: T.nilable(T.any(Integer, String)),
116
- order_id: T.nilable(T.any(Integer, String)),
117
- created_at_max: T.untyped,
118
- created_at_min: T.untyped,
119
- fields: T.untyped,
120
- limit: T.untyped,
121
- since_id: T.untyped,
122
- updated_at_max: T.untyped,
123
- updated_at_min: T.untyped,
124
- session: Auth::Session,
125
- kwargs: T.untyped
126
- ).returns(T::Array[Fulfillment])
127
- end
128
- def all(
129
- fulfillment_order_id: nil,
130
- order_id: nil,
131
- created_at_max: nil,
132
- created_at_min: nil,
133
- fields: nil,
134
- limit: nil,
135
- since_id: nil,
136
- updated_at_max: nil,
137
- updated_at_min: nil,
138
- session: ShopifyAPI::Context.active_session,
139
- **kwargs
140
- )
141
- response = base_find(
142
- session: session,
143
- ids: {fulfillment_order_id: fulfillment_order_id, order_id: order_id},
144
- params: {created_at_max: created_at_max, created_at_min: created_at_min, fields: fields, limit: limit, since_id: since_id, updated_at_max: updated_at_max, updated_at_min: updated_at_min}.merge(kwargs).compact,
145
- )
146
-
147
- T.cast(response, T::Array[Fulfillment])
148
- end
149
-
150
- sig do
151
- params(
152
- order_id: T.nilable(T.any(Integer, String)),
153
- created_at_min: T.untyped,
154
- created_at_max: T.untyped,
155
- updated_at_min: T.untyped,
156
- updated_at_max: T.untyped,
157
- session: Auth::Session,
158
- kwargs: T.untyped
159
- ).returns(T.untyped)
160
- end
161
- def count(
162
- order_id: nil,
163
- created_at_min: nil,
164
- created_at_max: nil,
165
- updated_at_min: nil,
166
- updated_at_max: nil,
167
- session: ShopifyAPI::Context.active_session,
168
- **kwargs
169
- )
170
- request(
171
- http_method: :get,
172
- operation: :count,
173
- session: session,
174
- ids: {order_id: order_id},
175
- params: {created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max}.merge(kwargs).compact,
176
- body: {},
177
- entity: nil,
178
- )
179
- end
180
-
181
- end
182
-
183
- sig do
184
- params(
185
- body: T.untyped,
186
- kwargs: T.untyped
187
- ).returns(T.untyped)
188
- end
189
- def cancel(
190
- body: nil,
191
- **kwargs
192
- )
193
- self.class.request(
194
- http_method: :post,
195
- operation: :cancel,
196
- session: @session,
197
- ids: {id: @id, order_id: @order_id},
198
- params: {}.merge(kwargs).compact,
199
- body: body,
200
- entity: self,
201
- )
202
- end
203
-
204
- sig do
205
- params(
206
- body: T.untyped,
207
- kwargs: T.untyped
208
- ).returns(T.untyped)
209
- end
210
- def complete(
211
- body: nil,
212
- **kwargs
213
- )
214
- self.class.request(
215
- http_method: :post,
216
- operation: :complete,
217
- session: @session,
218
- ids: {id: @id, order_id: @order_id},
219
- params: {}.merge(kwargs).compact,
220
- body: body,
221
- entity: self,
222
- )
223
- end
224
-
225
- sig do
226
- params(
227
- body: T.untyped,
228
- kwargs: T.untyped
229
- ).returns(T.untyped)
230
- end
231
- def open(
232
- body: nil,
233
- **kwargs
234
- )
235
- self.class.request(
236
- http_method: :post,
237
- operation: :open,
238
- session: @session,
239
- ids: {id: @id, order_id: @order_id},
240
- params: {}.merge(kwargs).compact,
241
- body: body,
242
- entity: self,
243
- )
244
- end
245
-
246
- sig do
247
- params(
248
- notify_customer: T.untyped,
249
- tracking_info: T.untyped,
250
- body: T.untyped,
251
- kwargs: T.untyped
252
- ).returns(T.untyped)
253
- end
254
- def update_tracking(
255
- notify_customer: nil,
256
- tracking_info: nil,
257
- body: nil,
258
- **kwargs
259
- )
260
- self.class.request(
261
- http_method: :post,
262
- operation: :update_tracking,
263
- session: @session,
264
- ids: {id: @id},
265
- params: {notify_customer: notify_customer, tracking_info: tracking_info}.merge(kwargs).compact,
266
- body: body,
267
- entity: self,
268
- )
269
- end
270
-
271
- end
272
- end
@@ -1,166 +0,0 @@
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 FulfillmentEvent < 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
- @address1 = T.let(nil, T.nilable(String))
20
- @city = T.let(nil, T.nilable(String))
21
- @country = T.let(nil, T.nilable(Country))
22
- @created_at = T.let(nil, T.nilable(String))
23
- @estimated_delivery_at = T.let(nil, T.nilable(String))
24
- @fulfillment_id = T.let(nil, T.nilable(Integer))
25
- @happened_at = T.let(nil, T.nilable(String))
26
- @id = T.let(nil, T.nilable(Integer))
27
- @latitude = T.let(nil, T.nilable(Float))
28
- @longitude = T.let(nil, T.nilable(Float))
29
- @message = T.let(nil, T.nilable(String))
30
- @order_id = T.let(nil, T.nilable(Integer))
31
- @province = T.let(nil, T.nilable(Province))
32
- @shop_id = T.let(nil, T.nilable(Integer))
33
- @status = T.let(nil, T.nilable(String))
34
- @updated_at = T.let(nil, T.nilable(String))
35
- @zip = T.let(nil, T.nilable(String))
36
- end
37
-
38
- @has_one = T.let({
39
- country: Country,
40
- province: Province
41
- }, T::Hash[Symbol, Class])
42
- @has_many = T.let({}, T::Hash[Symbol, Class])
43
- @paths = T.let([
44
- {http_method: :delete, operation: :delete, ids: [:order_id, :fulfillment_id, :id], path: "orders/<order_id>/fulfillments/<fulfillment_id>/events/<id>.json"},
45
- {http_method: :get, operation: :get, ids: [:order_id, :fulfillment_id], path: "orders/<order_id>/fulfillments/<fulfillment_id>/events.json"},
46
- {http_method: :get, operation: :get, ids: [:order_id, :fulfillment_id, :id], path: "orders/<order_id>/fulfillments/<fulfillment_id>/events/<id>.json"},
47
- {http_method: :post, operation: :post, ids: [:order_id, :fulfillment_id], path: "orders/<order_id>/fulfillments/<fulfillment_id>/events.json"}
48
- ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
49
-
50
- sig { returns(T.nilable(String)) }
51
- attr_reader :address1
52
- sig { returns(T.nilable(String)) }
53
- attr_reader :city
54
- sig { returns(T.nilable(Country)) }
55
- attr_reader :country
56
- sig { returns(T.nilable(String)) }
57
- attr_reader :created_at
58
- sig { returns(T.nilable(String)) }
59
- attr_reader :estimated_delivery_at
60
- sig { returns(T.nilable(Integer)) }
61
- attr_reader :fulfillment_id
62
- sig { returns(T.nilable(String)) }
63
- attr_reader :happened_at
64
- sig { returns(T.nilable(Integer)) }
65
- attr_reader :id
66
- sig { returns(T.nilable(Float)) }
67
- attr_reader :latitude
68
- sig { returns(T.nilable(Float)) }
69
- attr_reader :longitude
70
- sig { returns(T.nilable(String)) }
71
- attr_reader :message
72
- sig { returns(T.nilable(Integer)) }
73
- attr_reader :order_id
74
- sig { returns(T.nilable(Province)) }
75
- attr_reader :province
76
- sig { returns(T.nilable(Integer)) }
77
- attr_reader :shop_id
78
- sig { returns(T.nilable(String)) }
79
- attr_reader :status
80
- sig { returns(T.nilable(String)) }
81
- attr_reader :updated_at
82
- sig { returns(T.nilable(String)) }
83
- attr_reader :zip
84
-
85
- class << self
86
- sig do
87
- returns(String)
88
- end
89
- def json_body_name()
90
- "event"
91
- end
92
-
93
- sig do
94
- params(
95
- id: T.any(Integer, String),
96
- order_id: T.nilable(T.any(Integer, String)),
97
- fulfillment_id: T.nilable(T.any(Integer, String)),
98
- event_id: T.untyped,
99
- session: Auth::Session
100
- ).returns(T.nilable(FulfillmentEvent))
101
- end
102
- def find(
103
- id:,
104
- order_id: nil,
105
- fulfillment_id: nil,
106
- event_id: nil,
107
- session: ShopifyAPI::Context.active_session
108
- )
109
- result = base_find(
110
- session: session,
111
- ids: {id: id, order_id: order_id, fulfillment_id: fulfillment_id},
112
- params: {event_id: event_id},
113
- )
114
- T.cast(result[0], T.nilable(FulfillmentEvent))
115
- end
116
-
117
- sig do
118
- params(
119
- id: T.any(Integer, String),
120
- order_id: T.nilable(T.any(Integer, String)),
121
- fulfillment_id: T.nilable(T.any(Integer, String)),
122
- session: Auth::Session
123
- ).returns(T.untyped)
124
- end
125
- def delete(
126
- id:,
127
- order_id: nil,
128
- fulfillment_id: nil,
129
- session: ShopifyAPI::Context.active_session
130
- )
131
- request(
132
- http_method: :delete,
133
- operation: :delete,
134
- session: session,
135
- ids: {id: id, order_id: order_id, fulfillment_id: fulfillment_id},
136
- params: {},
137
- )
138
- end
139
-
140
- sig do
141
- params(
142
- order_id: T.nilable(T.any(Integer, String)),
143
- fulfillment_id: T.nilable(T.any(Integer, String)),
144
- session: Auth::Session,
145
- kwargs: T.untyped
146
- ).returns(T::Array[FulfillmentEvent])
147
- end
148
- def all(
149
- order_id: nil,
150
- fulfillment_id: nil,
151
- session: ShopifyAPI::Context.active_session,
152
- **kwargs
153
- )
154
- response = base_find(
155
- session: session,
156
- ids: {order_id: order_id, fulfillment_id: fulfillment_id},
157
- params: {}.merge(kwargs).compact,
158
- )
159
-
160
- T.cast(response, T::Array[FulfillmentEvent])
161
- end
162
-
163
- end
164
-
165
- end
166
- end
@@ -1,87 +0,0 @@
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 FulfillmentRequest < 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
- @fulfillment_order_id = T.let(nil, T.nilable(Integer))
20
- end
21
-
22
- @has_one = T.let({}, T::Hash[Symbol, Class])
23
- @has_many = T.let({}, T::Hash[Symbol, Class])
24
- @paths = T.let([
25
- {http_method: :post, operation: :accept, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/fulfillment_request/accept.json"},
26
- {http_method: :post, operation: :post, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/fulfillment_request.json"},
27
- {http_method: :post, operation: :reject, ids: [:fulfillment_order_id], path: "fulfillment_orders/<fulfillment_order_id>/fulfillment_request/reject.json"}
28
- ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
29
-
30
- sig { returns(T.nilable(Integer)) }
31
- attr_reader :fulfillment_order_id
32
-
33
- class << self
34
- end
35
-
36
- sig do
37
- params(
38
- message: T.untyped,
39
- body: T.untyped,
40
- kwargs: T.untyped
41
- ).returns(T.untyped)
42
- end
43
- def accept(
44
- message: nil,
45
- body: nil,
46
- **kwargs
47
- )
48
- self.class.request(
49
- http_method: :post,
50
- operation: :accept,
51
- session: @session,
52
- ids: {fulfillment_order_id: @fulfillment_order_id},
53
- params: {message: message}.merge(kwargs).compact,
54
- body: body,
55
- entity: self,
56
- )
57
- end
58
-
59
- sig do
60
- params(
61
- message: T.untyped,
62
- reason: T.untyped,
63
- line_items: T.untyped,
64
- body: T.untyped,
65
- kwargs: T.untyped
66
- ).returns(T.untyped)
67
- end
68
- def reject(
69
- message: nil,
70
- reason: nil,
71
- line_items: nil,
72
- body: nil,
73
- **kwargs
74
- )
75
- self.class.request(
76
- http_method: :post,
77
- operation: :reject,
78
- session: @session,
79
- ids: {fulfillment_order_id: @fulfillment_order_id},
80
- params: {message: message, reason: reason, line_items: line_items}.merge(kwargs).compact,
81
- body: body,
82
- entity: self,
83
- )
84
- end
85
-
86
- end
87
- end