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,349 +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 Metafield < 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
- @key = T.let(nil, T.nilable(String))
20
- @namespace = T.let(nil, T.nilable(String))
21
- @value = T.let(nil, T.nilable(T.any(String, Integer, Float)))
22
- @article_id = T.let(nil, T.nilable(Integer))
23
- @blog_id = T.let(nil, T.nilable(Integer))
24
- @collection_id = T.let(nil, T.nilable(Integer))
25
- @created_at = T.let(nil, T.nilable(String))
26
- @customer_id = T.let(nil, T.nilable(Integer))
27
- @description = T.let(nil, T.nilable(String))
28
- @draft_order_id = T.let(nil, T.nilable(Integer))
29
- @id = T.let(nil, T.nilable(Integer))
30
- @order_id = T.let(nil, T.nilable(Integer))
31
- @owner_id = T.let(nil, T.nilable(Integer))
32
- @owner_resource = T.let(nil, T.nilable(String))
33
- @page_id = T.let(nil, T.nilable(Integer))
34
- @product_id = T.let(nil, T.nilable(Integer))
35
- @product_image_id = T.let(nil, T.nilable(Integer))
36
- @type = T.let(nil, T.nilable(String))
37
- @updated_at = T.let(nil, T.nilable(String))
38
- @value_type = T.let(nil, T.nilable(String))
39
- @variant_id = T.let(nil, T.nilable(Integer))
40
- end
41
-
42
- @has_one = T.let({}, T::Hash[Symbol, Class])
43
- @has_many = T.let({}, T::Hash[Symbol, Class])
44
- @paths = T.let([
45
- {http_method: :delete, operation: :delete, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
46
- {http_method: :delete, operation: :delete, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
47
- {http_method: :delete, operation: :delete, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
48
- {http_method: :delete, operation: :delete, ids: [:customer_id, :id], path: "customers/<customer_id>/metafields/<id>.json"},
49
- {http_method: :delete, operation: :delete, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
50
- {http_method: :delete, operation: :delete, ids: [:id], path: "metafields/<id>.json"},
51
- {http_method: :delete, operation: :delete, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
52
- {http_method: :delete, operation: :delete, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
53
- {http_method: :delete, operation: :delete, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
54
- {http_method: :delete, operation: :delete, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
55
- {http_method: :delete, operation: :delete, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
56
- {http_method: :delete, operation: :delete, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"},
57
- {http_method: :get, operation: :count, ids: [:article_id], path: "articles/<article_id>/metafields/count.json"},
58
- {http_method: :get, operation: :count, ids: [:blog_id], path: "blogs/<blog_id>/metafields/count.json"},
59
- {http_method: :get, operation: :count, ids: [:collection_id], path: "collections/<collection_id>/metafields/count.json"},
60
- {http_method: :get, operation: :count, ids: [:customer_id], path: "customers/<customer_id>/metafields/count.json"},
61
- {http_method: :get, operation: :count, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields/count.json"},
62
- {http_method: :get, operation: :count, ids: [], path: "metafields/count.json"},
63
- {http_method: :get, operation: :count, ids: [:order_id], path: "orders/<order_id>/metafields/count.json"},
64
- {http_method: :get, operation: :count, ids: [:page_id], path: "pages/<page_id>/metafields/count.json"},
65
- {http_method: :get, operation: :count, ids: [:page_id], path: "pages/<page_id>/metafields/count.json"},
66
- {http_method: :get, operation: :count, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields/count.json"},
67
- {http_method: :get, operation: :count, ids: [:product_id], path: "products/<product_id>/metafields/count.json"},
68
- {http_method: :get, operation: :count, ids: [:variant_id], path: "variants/<variant_id>/metafields/count.json"},
69
- {http_method: :get, operation: :get, ids: [:article_id], path: "articles/<article_id>/metafields.json"},
70
- {http_method: :get, operation: :get, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
71
- {http_method: :get, operation: :get, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
72
- {http_method: :get, operation: :get, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
73
- {http_method: :get, operation: :get, ids: [:collection_id], path: "collections/<collection_id>/metafields.json"},
74
- {http_method: :get, operation: :get, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
75
- {http_method: :get, operation: :get, ids: [:customer_id], path: "customers/<customer_id>/metafields.json"},
76
- {http_method: :get, operation: :get, ids: [:customer_id, :id], path: "customers/<customer_id>/metafields/<id>.json"},
77
- {http_method: :get, operation: :get, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields.json"},
78
- {http_method: :get, operation: :get, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields.json"},
79
- {http_method: :get, operation: :get, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
80
- {http_method: :get, operation: :get, ids: [], path: "metafields.json"},
81
- {http_method: :get, operation: :get, ids: [:id], path: "metafields/<id>.json"},
82
- {http_method: :get, operation: :get, ids: [:order_id], path: "orders/<order_id>/metafields.json"},
83
- {http_method: :get, operation: :get, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
84
- {http_method: :get, operation: :get, ids: [:page_id], path: "pages/<page_id>/metafields.json"},
85
- {http_method: :get, operation: :get, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
86
- {http_method: :get, operation: :get, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields.json"},
87
- {http_method: :get, operation: :get, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
88
- {http_method: :get, operation: :get, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
89
- {http_method: :get, operation: :get, ids: [:product_id], path: "products/<product_id>/metafields.json"},
90
- {http_method: :get, operation: :get, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
91
- {http_method: :get, operation: :get, ids: [:variant_id], path: "variants/<variant_id>/metafields.json"},
92
- {http_method: :get, operation: :get, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"},
93
- {http_method: :post, operation: :post, ids: [:article_id], path: "articles/<article_id>/metafields.json"},
94
- {http_method: :post, operation: :post, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
95
- {http_method: :post, operation: :post, ids: [:collection_id], path: "collections/<collection_id>/metafields.json"},
96
- {http_method: :post, operation: :post, ids: [:customer_id], path: "customers/<customer_id>/metafields.json"},
97
- {http_method: :post, operation: :post, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields.json"},
98
- {http_method: :post, operation: :post, ids: [], path: "metafields.json"},
99
- {http_method: :post, operation: :post, ids: [:order_id], path: "orders/<order_id>/metafields.json"},
100
- {http_method: :post, operation: :post, ids: [:order_id], path: "orders/<order_id>/metafields.json"},
101
- {http_method: :post, operation: :post, ids: [:page_id], path: "pages/<page_id>/metafields.json"},
102
- {http_method: :post, operation: :post, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields.json"},
103
- {http_method: :post, operation: :post, ids: [:product_id], path: "products/<product_id>/metafields.json"},
104
- {http_method: :post, operation: :post, ids: [:variant_id], path: "variants/<variant_id>/metafields.json"},
105
- {http_method: :put, operation: :put, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
106
- {http_method: :put, operation: :put, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
107
- {http_method: :put, operation: :put, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
108
- {http_method: :put, operation: :put, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
109
- {http_method: :put, operation: :put, ids: [:customer_id, :id], path: "customers/<customer_id>/metafields/<id>.json"},
110
- {http_method: :put, operation: :put, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
111
- {http_method: :put, operation: :put, ids: [:id], path: "metafields/<id>.json"},
112
- {http_method: :put, operation: :put, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
113
- {http_method: :put, operation: :put, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
114
- {http_method: :put, operation: :put, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
115
- {http_method: :put, operation: :put, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
116
- {http_method: :put, operation: :put, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"}
117
- ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
118
-
119
- sig { returns(T.nilable(String)) }
120
- attr_reader :key
121
- sig { returns(T.nilable(String)) }
122
- attr_reader :namespace
123
- sig { returns(T.nilable(T.any(String, Integer, Float))) }
124
- attr_reader :value
125
- sig { returns(T.nilable(Integer)) }
126
- attr_reader :article_id
127
- sig { returns(T.nilable(Integer)) }
128
- attr_reader :blog_id
129
- sig { returns(T.nilable(Integer)) }
130
- attr_reader :collection_id
131
- sig { returns(T.nilable(String)) }
132
- attr_reader :created_at
133
- sig { returns(T.nilable(Integer)) }
134
- attr_reader :customer_id
135
- sig { returns(T.nilable(String)) }
136
- attr_reader :description
137
- sig { returns(T.nilable(Integer)) }
138
- attr_reader :draft_order_id
139
- sig { returns(T.nilable(Integer)) }
140
- attr_reader :id
141
- sig { returns(T.nilable(Integer)) }
142
- attr_reader :order_id
143
- sig { returns(T.nilable(Integer)) }
144
- attr_reader :owner_id
145
- sig { returns(T.nilable(String)) }
146
- attr_reader :owner_resource
147
- sig { returns(T.nilable(Integer)) }
148
- attr_reader :page_id
149
- sig { returns(T.nilable(Integer)) }
150
- attr_reader :product_id
151
- sig { returns(T.nilable(Integer)) }
152
- attr_reader :product_image_id
153
- sig { returns(T.nilable(String)) }
154
- attr_reader :type
155
- sig { returns(T.nilable(String)) }
156
- attr_reader :updated_at
157
- sig { returns(T.nilable(String)) }
158
- attr_reader :value_type
159
- sig { returns(T.nilable(Integer)) }
160
- attr_reader :variant_id
161
-
162
- class << self
163
- sig do
164
- params(
165
- id: T.any(Integer, String),
166
- article_id: T.nilable(T.any(Integer, String)),
167
- blog_id: T.nilable(T.any(Integer, String)),
168
- collection_id: T.nilable(T.any(Integer, String)),
169
- customer_id: T.nilable(T.any(Integer, String)),
170
- draft_order_id: T.nilable(T.any(Integer, String)),
171
- order_id: T.nilable(T.any(Integer, String)),
172
- page_id: T.nilable(T.any(Integer, String)),
173
- product_image_id: T.nilable(T.any(Integer, String)),
174
- product_id: T.nilable(T.any(Integer, String)),
175
- variant_id: T.nilable(T.any(Integer, String)),
176
- fields: T.untyped,
177
- session: Auth::Session
178
- ).returns(T.nilable(Metafield))
179
- end
180
- def find(
181
- id:,
182
- article_id: nil,
183
- blog_id: nil,
184
- collection_id: nil,
185
- customer_id: nil,
186
- draft_order_id: nil,
187
- order_id: nil,
188
- page_id: nil,
189
- product_image_id: nil,
190
- product_id: nil,
191
- variant_id: nil,
192
- fields: nil,
193
- session: ShopifyAPI::Context.active_session
194
- )
195
- result = base_find(
196
- session: session,
197
- ids: {id: id, article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
198
- params: {fields: fields},
199
- )
200
- T.cast(result[0], T.nilable(Metafield))
201
- end
202
-
203
- sig do
204
- params(
205
- id: T.any(Integer, String),
206
- article_id: T.nilable(T.any(Integer, String)),
207
- blog_id: T.nilable(T.any(Integer, String)),
208
- collection_id: T.nilable(T.any(Integer, String)),
209
- customer_id: T.nilable(T.any(Integer, String)),
210
- draft_order_id: T.nilable(T.any(Integer, String)),
211
- order_id: T.nilable(T.any(Integer, String)),
212
- page_id: T.nilable(T.any(Integer, String)),
213
- product_image_id: T.nilable(T.any(Integer, String)),
214
- product_id: T.nilable(T.any(Integer, String)),
215
- variant_id: T.nilable(T.any(Integer, String)),
216
- session: Auth::Session
217
- ).returns(T.untyped)
218
- end
219
- def delete(
220
- id:,
221
- article_id: nil,
222
- blog_id: nil,
223
- collection_id: nil,
224
- customer_id: nil,
225
- draft_order_id: nil,
226
- order_id: nil,
227
- page_id: nil,
228
- product_image_id: nil,
229
- product_id: nil,
230
- variant_id: nil,
231
- session: ShopifyAPI::Context.active_session
232
- )
233
- request(
234
- http_method: :delete,
235
- operation: :delete,
236
- session: session,
237
- ids: {id: id, article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
238
- params: {},
239
- )
240
- end
241
-
242
- sig do
243
- params(
244
- article_id: T.nilable(T.any(Integer, String)),
245
- blog_id: T.nilable(T.any(Integer, String)),
246
- collection_id: T.nilable(T.any(Integer, String)),
247
- customer_id: T.nilable(T.any(Integer, String)),
248
- draft_order_id: T.nilable(T.any(Integer, String)),
249
- order_id: T.nilable(T.any(Integer, String)),
250
- page_id: T.nilable(T.any(Integer, String)),
251
- product_image_id: T.nilable(T.any(Integer, String)),
252
- product_id: T.nilable(T.any(Integer, String)),
253
- variant_id: T.nilable(T.any(Integer, String)),
254
- limit: T.untyped,
255
- since_id: T.untyped,
256
- created_at_min: T.untyped,
257
- created_at_max: T.untyped,
258
- updated_at_min: T.untyped,
259
- updated_at_max: T.untyped,
260
- namespace: T.untyped,
261
- key: T.untyped,
262
- value_type: T.untyped,
263
- type: T.untyped,
264
- fields: T.untyped,
265
- metafield: T.nilable(T::Hash[T.untyped, T.untyped]),
266
- session: Auth::Session,
267
- kwargs: T.untyped
268
- ).returns(T::Array[Metafield])
269
- end
270
- def all(
271
- article_id: nil,
272
- blog_id: nil,
273
- collection_id: nil,
274
- customer_id: nil,
275
- draft_order_id: nil,
276
- order_id: nil,
277
- page_id: nil,
278
- product_image_id: nil,
279
- product_id: nil,
280
- variant_id: nil,
281
- limit: nil,
282
- since_id: nil,
283
- created_at_min: nil,
284
- created_at_max: nil,
285
- updated_at_min: nil,
286
- updated_at_max: nil,
287
- namespace: nil,
288
- key: nil,
289
- value_type: nil,
290
- type: nil,
291
- fields: nil,
292
- metafield: nil,
293
- session: ShopifyAPI::Context.active_session,
294
- **kwargs
295
- )
296
- response = base_find(
297
- session: session,
298
- ids: {article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
299
- params: {limit: limit, 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, namespace: namespace, key: key, value_type: value_type, type: type, fields: fields, metafield: metafield}.merge(kwargs).compact,
300
- )
301
-
302
- T.cast(response, T::Array[Metafield])
303
- end
304
-
305
- sig do
306
- params(
307
- article_id: T.nilable(T.any(Integer, String)),
308
- blog_id: T.nilable(T.any(Integer, String)),
309
- collection_id: T.nilable(T.any(Integer, String)),
310
- customer_id: T.nilable(T.any(Integer, String)),
311
- draft_order_id: T.nilable(T.any(Integer, String)),
312
- order_id: T.nilable(T.any(Integer, String)),
313
- page_id: T.nilable(T.any(Integer, String)),
314
- product_image_id: T.nilable(T.any(Integer, String)),
315
- product_id: T.nilable(T.any(Integer, String)),
316
- variant_id: T.nilable(T.any(Integer, String)),
317
- session: Auth::Session,
318
- kwargs: T.untyped
319
- ).returns(T.untyped)
320
- end
321
- def count(
322
- article_id: nil,
323
- blog_id: nil,
324
- collection_id: nil,
325
- customer_id: nil,
326
- draft_order_id: nil,
327
- order_id: nil,
328
- page_id: nil,
329
- product_image_id: nil,
330
- product_id: nil,
331
- variant_id: nil,
332
- session: ShopifyAPI::Context.active_session,
333
- **kwargs
334
- )
335
- request(
336
- http_method: :get,
337
- operation: :count,
338
- session: session,
339
- ids: {article_id: article_id, blog_id: blog_id, collection_id: collection_id, customer_id: customer_id, draft_order_id: draft_order_id, order_id: order_id, page_id: page_id, product_image_id: product_image_id, product_id: product_id, variant_id: variant_id},
340
- params: {}.merge(kwargs).compact,
341
- body: {},
342
- entity: nil,
343
- )
344
- end
345
-
346
- end
347
-
348
- end
349
- end