shopify_api 14.3.0 → 14.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/BREAKING_CHANGES_FOR_V15.md +42 -0
  3. data/CHANGELOG.md +12 -0
  4. data/Gemfile.lock +2 -2
  5. data/README.md +3 -0
  6. data/docs/usage/oauth.md +88 -16
  7. data/lib/shopify_api/admin_versions.rb +2 -1
  8. data/lib/shopify_api/clients/graphql/client.rb +3 -2
  9. data/lib/shopify_api/clients/graphql/storefront.rb +4 -2
  10. data/lib/shopify_api/rest/resources/2022_04/shop.rb +2 -2
  11. data/lib/shopify_api/rest/resources/2022_07/shop.rb +2 -2
  12. data/lib/shopify_api/rest/resources/2022_10/shop.rb +2 -2
  13. data/lib/shopify_api/rest/resources/2023_01/shop.rb +2 -2
  14. data/lib/shopify_api/rest/resources/2023_04/shop.rb +2 -2
  15. data/lib/shopify_api/rest/resources/2023_07/shop.rb +2 -2
  16. data/lib/shopify_api/rest/resources/2023_10/shop.rb +2 -2
  17. data/lib/shopify_api/rest/resources/2024_01/shop.rb +2 -2
  18. data/lib/shopify_api/rest/resources/2024_04/shop.rb +2 -2
  19. data/lib/shopify_api/rest/resources/2024_07/abandoned_checkout.rb +194 -0
  20. data/lib/shopify_api/rest/resources/2024_07/access_scope.rb +62 -0
  21. data/lib/shopify_api/rest/resources/2024_07/apple_pay_certificate.rb +109 -0
  22. data/lib/shopify_api/rest/resources/2024_07/application_charge.rb +113 -0
  23. data/lib/shopify_api/rest/resources/2024_07/application_credit.rb +95 -0
  24. data/lib/shopify_api/rest/resources/2024_07/article.rb +269 -0
  25. data/lib/shopify_api/rest/resources/2024_07/asset.rb +122 -0
  26. data/lib/shopify_api/rest/resources/2024_07/assigned_fulfillment_order.rb +92 -0
  27. data/lib/shopify_api/rest/resources/2024_07/balance.rb +58 -0
  28. data/lib/shopify_api/rest/resources/2024_07/blog.rb +166 -0
  29. data/lib/shopify_api/rest/resources/2024_07/cancellation_request.rb +87 -0
  30. data/lib/shopify_api/rest/resources/2024_07/carrier_service.rb +120 -0
  31. data/lib/shopify_api/rest/resources/2024_07/checkout.rb +213 -0
  32. data/lib/shopify_api/rest/resources/2024_07/collect.rb +146 -0
  33. data/lib/shopify_api/rest/resources/2024_07/collection.rb +114 -0
  34. data/lib/shopify_api/rest/resources/2024_07/collection_listing.rb +159 -0
  35. data/lib/shopify_api/rest/resources/2024_07/comment.rb +287 -0
  36. data/lib/shopify_api/rest/resources/2024_07/country.rb +141 -0
  37. data/lib/shopify_api/rest/resources/2024_07/currency.rb +61 -0
  38. data/lib/shopify_api/rest/resources/2024_07/custom_collection.rb +191 -0
  39. data/lib/shopify_api/rest/resources/2024_07/customer.rb +333 -0
  40. data/lib/shopify_api/rest/resources/2024_07/customer_address.rb +215 -0
  41. data/lib/shopify_api/rest/resources/2024_07/deprecated_api_call.rb +61 -0
  42. data/lib/shopify_api/rest/resources/2024_07/discount_code.rb +226 -0
  43. data/lib/shopify_api/rest/resources/2024_07/dispute.rb +115 -0
  44. data/lib/shopify_api/rest/resources/2024_07/dispute_evidence.rb +121 -0
  45. data/lib/shopify_api/rest/resources/2024_07/dispute_file_upload.rb +85 -0
  46. data/lib/shopify_api/rest/resources/2024_07/draft_order.rb +279 -0
  47. data/lib/shopify_api/rest/resources/2024_07/event.rb +152 -0
  48. data/lib/shopify_api/rest/resources/2024_07/fulfillment.rb +235 -0
  49. data/lib/shopify_api/rest/resources/2024_07/fulfillment_event.rb +167 -0
  50. data/lib/shopify_api/rest/resources/2024_07/fulfillment_order.rb +326 -0
  51. data/lib/shopify_api/rest/resources/2024_07/fulfillment_request.rb +101 -0
  52. data/lib/shopify_api/rest/resources/2024_07/fulfillment_service.rb +134 -0
  53. data/lib/shopify_api/rest/resources/2024_07/gift_card.rb +222 -0
  54. data/lib/shopify_api/rest/resources/2024_07/gift_card_adjustment.rb +122 -0
  55. data/lib/shopify_api/rest/resources/2024_07/image.rb +161 -0
  56. data/lib/shopify_api/rest/resources/2024_07/inventory_item.rb +112 -0
  57. data/lib/shopify_api/rest/resources/2024_07/inventory_level.rb +183 -0
  58. data/lib/shopify_api/rest/resources/2024_07/location.rb +171 -0
  59. data/lib/shopify_api/rest/resources/2024_07/locations_for_move.rb +60 -0
  60. data/lib/shopify_api/rest/resources/2024_07/marketing_event.rb +213 -0
  61. data/lib/shopify_api/rest/resources/2024_07/metafield.rb +348 -0
  62. data/lib/shopify_api/rest/resources/2024_07/mobile_platform_application.rb +114 -0
  63. data/lib/shopify_api/rest/resources/2024_07/order.rb +489 -0
  64. data/lib/shopify_api/rest/resources/2024_07/order_risk.rb +148 -0
  65. data/lib/shopify_api/rest/resources/2024_07/page.rb +198 -0
  66. data/lib/shopify_api/rest/resources/2024_07/payment.rb +144 -0
  67. data/lib/shopify_api/rest/resources/2024_07/payment_gateway.rb +147 -0
  68. data/lib/shopify_api/rest/resources/2024_07/payment_transaction.rb +114 -0
  69. data/lib/shopify_api/rest/resources/2024_07/payout.rb +101 -0
  70. data/lib/shopify_api/rest/resources/2024_07/policy.rb +73 -0
  71. data/lib/shopify_api/rest/resources/2024_07/price_rule.rb +227 -0
  72. data/lib/shopify_api/rest/resources/2024_07/product.rb +227 -0
  73. data/lib/shopify_api/rest/resources/2024_07/product_listing.rb +200 -0
  74. data/lib/shopify_api/rest/resources/2024_07/product_resource_feedback.rb +92 -0
  75. data/lib/shopify_api/rest/resources/2024_07/province.rb +136 -0
  76. data/lib/shopify_api/rest/resources/2024_07/recurring_application_charge.rb +176 -0
  77. data/lib/shopify_api/rest/resources/2024_07/redirect.rb +143 -0
  78. data/lib/shopify_api/rest/resources/2024_07/refund.rb +155 -0
  79. data/lib/shopify_api/rest/resources/2024_07/resource_feedback.rb +77 -0
  80. data/lib/shopify_api/rest/resources/2024_07/script_tag.rb +159 -0
  81. data/lib/shopify_api/rest/resources/2024_07/shipping_zone.rb +87 -0
  82. data/lib/shopify_api/rest/resources/2024_07/shop.rb +222 -0
  83. data/lib/shopify_api/rest/resources/2024_07/smart_collection.rb +220 -0
  84. data/lib/shopify_api/rest/resources/2024_07/storefront_access_token.rb +91 -0
  85. data/lib/shopify_api/rest/resources/2024_07/tender_transaction.rb +97 -0
  86. data/lib/shopify_api/rest/resources/2024_07/theme.rb +127 -0
  87. data/lib/shopify_api/rest/resources/2024_07/transaction.rb +188 -0
  88. data/lib/shopify_api/rest/resources/2024_07/usage_charge.rb +106 -0
  89. data/lib/shopify_api/rest/resources/2024_07/user.rb +142 -0
  90. data/lib/shopify_api/rest/resources/2024_07/variant.rb +212 -0
  91. data/lib/shopify_api/rest/resources/2024_07/webhook.rb +172 -0
  92. data/lib/shopify_api/version.rb +1 -1
  93. data/lib/shopify_api/webhooks/registry.rb +5 -4
  94. metadata +80 -6
@@ -0,0 +1,348 @@
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
+ @api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
16
+ @retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
17
+
18
+ sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
19
+ def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
20
+
21
+ @key = T.let(nil, T.nilable(String))
22
+ @namespace = T.let(nil, T.nilable(String))
23
+ @value = T.let(nil, T.nilable(T.any(String, Integer, Float, T::Boolean, String)))
24
+ @article_id = T.let(nil, T.nilable(Integer))
25
+ @blog_id = T.let(nil, T.nilable(Integer))
26
+ @collection_id = T.let(nil, T.nilable(Integer))
27
+ @created_at = T.let(nil, T.nilable(String))
28
+ @customer_id = T.let(nil, T.nilable(Integer))
29
+ @description = T.let(nil, T.nilable(String))
30
+ @draft_order_id = T.let(nil, T.nilable(Integer))
31
+ @id = T.let(nil, T.nilable(Integer))
32
+ @order_id = T.let(nil, T.nilable(Integer))
33
+ @owner_id = T.let(nil, T.nilable(Integer))
34
+ @owner_resource = T.let(nil, T.nilable(String))
35
+ @page_id = T.let(nil, T.nilable(Integer))
36
+ @product_id = T.let(nil, T.nilable(Integer))
37
+ @product_image_id = T.let(nil, T.nilable(Integer))
38
+ @type = T.let(nil, T.nilable(String))
39
+ @updated_at = T.let(nil, T.nilable(String))
40
+ @variant_id = T.let(nil, T.nilable(Integer))
41
+
42
+ super(session: session, from_hash: from_hash)
43
+ end
44
+
45
+ @has_one = T.let({}, T::Hash[Symbol, Class])
46
+ @has_many = T.let({}, T::Hash[Symbol, Class])
47
+ @paths = T.let([
48
+ {http_method: :delete, operation: :delete, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
49
+ {http_method: :delete, operation: :delete, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
50
+ {http_method: :delete, operation: :delete, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
51
+ {http_method: :delete, operation: :delete, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
52
+ {http_method: :delete, operation: :delete, ids: [:customer_id, :id], path: "customers/<customer_id>/metafields/<id>.json"},
53
+ {http_method: :delete, operation: :delete, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
54
+ {http_method: :delete, operation: :delete, ids: [:id], path: "metafields/<id>.json"},
55
+ {http_method: :delete, operation: :delete, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
56
+ {http_method: :delete, operation: :delete, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
57
+ {http_method: :delete, operation: :delete, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
58
+ {http_method: :delete, operation: :delete, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
59
+ {http_method: :delete, operation: :delete, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"},
60
+ {http_method: :get, operation: :count, ids: [:article_id], path: "articles/<article_id>/metafields/count.json"},
61
+ {http_method: :get, operation: :count, ids: [:blog_id], path: "blogs/<blog_id>/metafields/count.json"},
62
+ {http_method: :get, operation: :count, ids: [:blog_id], path: "blogs/<blog_id>/metafields/count.json"},
63
+ {http_method: :get, operation: :count, ids: [:collection_id], path: "collections/<collection_id>/metafields/count.json"},
64
+ {http_method: :get, operation: :count, ids: [:customer_id], path: "customers/<customer_id>/metafields/count.json"},
65
+ {http_method: :get, operation: :count, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields/count.json"},
66
+ {http_method: :get, operation: :count, ids: [], path: "metafields/count.json"},
67
+ {http_method: :get, operation: :count, ids: [:order_id], path: "orders/<order_id>/metafields/count.json"},
68
+ {http_method: :get, operation: :count, ids: [:page_id], path: "pages/<page_id>/metafields/count.json"},
69
+ {http_method: :get, operation: :count, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields/count.json"},
70
+ {http_method: :get, operation: :count, ids: [:product_id], path: "products/<product_id>/metafields/count.json"},
71
+ {http_method: :get, operation: :count, ids: [:variant_id], path: "variants/<variant_id>/metafields/count.json"},
72
+ {http_method: :get, operation: :get, ids: [:article_id], path: "articles/<article_id>/metafields.json"},
73
+ {http_method: :get, operation: :get, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
74
+ {http_method: :get, operation: :get, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
75
+ {http_method: :get, operation: :get, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
76
+ {http_method: :get, operation: :get, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
77
+ {http_method: :get, operation: :get, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
78
+ {http_method: :get, operation: :get, ids: [:collection_id], path: "collections/<collection_id>/metafields.json"},
79
+ {http_method: :get, operation: :get, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
80
+ {http_method: :get, operation: :get, ids: [:customer_id], path: "customers/<customer_id>/metafields.json"},
81
+ {http_method: :get, operation: :get, ids: [:customer_id, :id], path: "customers/<customer_id>/metafields/<id>.json"},
82
+ {http_method: :get, operation: :get, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields.json"},
83
+ {http_method: :get, operation: :get, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
84
+ {http_method: :get, operation: :get, ids: [], path: "metafields.json"},
85
+ {http_method: :get, operation: :get, ids: [:id], path: "metafields/<id>.json"},
86
+ {http_method: :get, operation: :get, ids: [:order_id], path: "orders/<order_id>/metafields.json"},
87
+ {http_method: :get, operation: :get, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
88
+ {http_method: :get, operation: :get, ids: [:page_id], path: "pages/<page_id>/metafields.json"},
89
+ {http_method: :get, operation: :get, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
90
+ {http_method: :get, operation: :get, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields.json"},
91
+ {http_method: :get, operation: :get, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
92
+ {http_method: :get, operation: :get, ids: [:product_id], path: "products/<product_id>/metafields.json"},
93
+ {http_method: :get, operation: :get, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
94
+ {http_method: :get, operation: :get, ids: [:variant_id], path: "variants/<variant_id>/metafields.json"},
95
+ {http_method: :get, operation: :get, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"},
96
+ {http_method: :post, operation: :post, ids: [:article_id], path: "articles/<article_id>/metafields.json"},
97
+ {http_method: :post, operation: :post, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
98
+ {http_method: :post, operation: :post, ids: [:blog_id], path: "blogs/<blog_id>/metafields.json"},
99
+ {http_method: :post, operation: :post, ids: [:collection_id], path: "collections/<collection_id>/metafields.json"},
100
+ {http_method: :post, operation: :post, ids: [:customer_id], path: "customers/<customer_id>/metafields.json"},
101
+ {http_method: :post, operation: :post, ids: [:draft_order_id], path: "draft_orders/<draft_order_id>/metafields.json"},
102
+ {http_method: :post, operation: :post, ids: [], path: "metafields.json"},
103
+ {http_method: :post, operation: :post, ids: [:order_id], path: "orders/<order_id>/metafields.json"},
104
+ {http_method: :post, operation: :post, ids: [:page_id], path: "pages/<page_id>/metafields.json"},
105
+ {http_method: :post, operation: :post, ids: [:product_image_id], path: "product_images/<product_image_id>/metafields.json"},
106
+ {http_method: :post, operation: :post, ids: [:product_id], path: "products/<product_id>/metafields.json"},
107
+ {http_method: :post, operation: :post, ids: [:variant_id], path: "variants/<variant_id>/metafields.json"},
108
+ {http_method: :put, operation: :put, ids: [:article_id, :id], path: "articles/<article_id>/metafields/<id>.json"},
109
+ {http_method: :put, operation: :put, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
110
+ {http_method: :put, operation: :put, ids: [:blog_id, :id], path: "blogs/<blog_id>/metafields/<id>.json"},
111
+ {http_method: :put, operation: :put, ids: [:collection_id, :id], path: "collections/<collection_id>/metafields/<id>.json"},
112
+ {http_method: :put, operation: :put, ids: [:customer_id, :id], path: "customers/<customer_id>/metafields/<id>.json"},
113
+ {http_method: :put, operation: :put, ids: [:draft_order_id, :id], path: "draft_orders/<draft_order_id>/metafields/<id>.json"},
114
+ {http_method: :put, operation: :put, ids: [:id], path: "metafields/<id>.json"},
115
+ {http_method: :put, operation: :put, ids: [:order_id, :id], path: "orders/<order_id>/metafields/<id>.json"},
116
+ {http_method: :put, operation: :put, ids: [:page_id, :id], path: "pages/<page_id>/metafields/<id>.json"},
117
+ {http_method: :put, operation: :put, ids: [:product_image_id, :id], path: "product_images/<product_image_id>/metafields/<id>.json"},
118
+ {http_method: :put, operation: :put, ids: [:product_id, :id], path: "products/<product_id>/metafields/<id>.json"},
119
+ {http_method: :put, operation: :put, ids: [:variant_id, :id], path: "variants/<variant_id>/metafields/<id>.json"}
120
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
121
+
122
+ sig { returns(T.nilable(String)) }
123
+ attr_reader :key
124
+ sig { returns(T.nilable(String)) }
125
+ attr_reader :namespace
126
+ sig { returns(T.nilable(T.any(String, Integer, Float, T::Boolean, String))) }
127
+ attr_reader :value
128
+ sig { returns(T.nilable(Integer)) }
129
+ attr_reader :article_id
130
+ sig { returns(T.nilable(Integer)) }
131
+ attr_reader :blog_id
132
+ sig { returns(T.nilable(Integer)) }
133
+ attr_reader :collection_id
134
+ sig { returns(T.nilable(String)) }
135
+ attr_reader :created_at
136
+ sig { returns(T.nilable(Integer)) }
137
+ attr_reader :customer_id
138
+ sig { returns(T.nilable(String)) }
139
+ attr_reader :description
140
+ sig { returns(T.nilable(Integer)) }
141
+ attr_reader :draft_order_id
142
+ sig { returns(T.nilable(Integer)) }
143
+ attr_reader :id
144
+ sig { returns(T.nilable(Integer)) }
145
+ attr_reader :order_id
146
+ sig { returns(T.nilable(Integer)) }
147
+ attr_reader :owner_id
148
+ sig { returns(T.nilable(String)) }
149
+ attr_reader :owner_resource
150
+ sig { returns(T.nilable(Integer)) }
151
+ attr_reader :page_id
152
+ sig { returns(T.nilable(Integer)) }
153
+ attr_reader :product_id
154
+ sig { returns(T.nilable(Integer)) }
155
+ attr_reader :product_image_id
156
+ sig { returns(T.nilable(String)) }
157
+ attr_reader :type
158
+ sig { returns(T.nilable(String)) }
159
+ attr_reader :updated_at
160
+ sig { returns(T.nilable(Integer)) }
161
+ attr_reader :variant_id
162
+
163
+ class << self
164
+ sig do
165
+ params(
166
+ id: T.any(Integer, String),
167
+ article_id: T.nilable(T.any(Integer, String)),
168
+ blog_id: T.nilable(T.any(Integer, String)),
169
+ collection_id: T.nilable(T.any(Integer, String)),
170
+ customer_id: T.nilable(T.any(Integer, String)),
171
+ draft_order_id: T.nilable(T.any(Integer, String)),
172
+ order_id: T.nilable(T.any(Integer, String)),
173
+ page_id: T.nilable(T.any(Integer, String)),
174
+ product_image_id: T.nilable(T.any(Integer, String)),
175
+ product_id: T.nilable(T.any(Integer, String)),
176
+ variant_id: T.nilable(T.any(Integer, String)),
177
+ fields: T.untyped,
178
+ session: Auth::Session
179
+ ).returns(T.nilable(Metafield))
180
+ end
181
+ def find(
182
+ id:,
183
+ article_id: nil,
184
+ blog_id: nil,
185
+ collection_id: nil,
186
+ customer_id: nil,
187
+ draft_order_id: nil,
188
+ order_id: nil,
189
+ page_id: nil,
190
+ product_image_id: nil,
191
+ product_id: nil,
192
+ variant_id: nil,
193
+ fields: nil,
194
+ session: ShopifyAPI::Context.active_session
195
+ )
196
+ result = base_find(
197
+ session: session,
198
+ 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},
199
+ params: {fields: fields},
200
+ )
201
+ T.cast(result[0], T.nilable(Metafield))
202
+ end
203
+
204
+ sig do
205
+ params(
206
+ id: T.any(Integer, String),
207
+ article_id: T.nilable(T.any(Integer, String)),
208
+ blog_id: T.nilable(T.any(Integer, String)),
209
+ collection_id: T.nilable(T.any(Integer, String)),
210
+ customer_id: T.nilable(T.any(Integer, String)),
211
+ draft_order_id: T.nilable(T.any(Integer, String)),
212
+ order_id: T.nilable(T.any(Integer, String)),
213
+ page_id: T.nilable(T.any(Integer, String)),
214
+ product_image_id: T.nilable(T.any(Integer, String)),
215
+ product_id: T.nilable(T.any(Integer, String)),
216
+ variant_id: T.nilable(T.any(Integer, String)),
217
+ session: Auth::Session
218
+ ).returns(T.untyped)
219
+ end
220
+ def delete(
221
+ id:,
222
+ article_id: nil,
223
+ blog_id: nil,
224
+ collection_id: nil,
225
+ customer_id: nil,
226
+ draft_order_id: nil,
227
+ order_id: nil,
228
+ page_id: nil,
229
+ product_image_id: nil,
230
+ product_id: nil,
231
+ variant_id: nil,
232
+ session: ShopifyAPI::Context.active_session
233
+ )
234
+ request(
235
+ http_method: :delete,
236
+ operation: :delete,
237
+ session: session,
238
+ 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},
239
+ params: {},
240
+ )
241
+ end
242
+
243
+ sig do
244
+ params(
245
+ article_id: T.nilable(T.any(Integer, String)),
246
+ blog_id: T.nilable(T.any(Integer, String)),
247
+ collection_id: T.nilable(T.any(Integer, String)),
248
+ customer_id: T.nilable(T.any(Integer, String)),
249
+ draft_order_id: T.nilable(T.any(Integer, String)),
250
+ order_id: T.nilable(T.any(Integer, String)),
251
+ page_id: T.nilable(T.any(Integer, String)),
252
+ product_image_id: T.nilable(T.any(Integer, String)),
253
+ product_id: T.nilable(T.any(Integer, String)),
254
+ variant_id: T.nilable(T.any(Integer, String)),
255
+ limit: T.untyped,
256
+ since_id: T.untyped,
257
+ created_at_min: T.untyped,
258
+ created_at_max: T.untyped,
259
+ updated_at_min: T.untyped,
260
+ updated_at_max: T.untyped,
261
+ namespace: T.untyped,
262
+ key: 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
+ type: nil,
290
+ fields: nil,
291
+ metafield: nil,
292
+ session: ShopifyAPI::Context.active_session,
293
+ **kwargs
294
+ )
295
+ response = base_find(
296
+ session: session,
297
+ 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},
298
+ 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, type: type, fields: fields, metafield: metafield}.merge(kwargs).compact,
299
+ )
300
+
301
+ T.cast(response, T::Array[Metafield])
302
+ end
303
+
304
+ sig do
305
+ params(
306
+ article_id: T.nilable(T.any(Integer, String)),
307
+ blog_id: T.nilable(T.any(Integer, String)),
308
+ collection_id: T.nilable(T.any(Integer, String)),
309
+ customer_id: T.nilable(T.any(Integer, String)),
310
+ draft_order_id: T.nilable(T.any(Integer, String)),
311
+ order_id: T.nilable(T.any(Integer, String)),
312
+ page_id: T.nilable(T.any(Integer, String)),
313
+ product_image_id: T.nilable(T.any(Integer, String)),
314
+ product_id: T.nilable(T.any(Integer, String)),
315
+ variant_id: T.nilable(T.any(Integer, String)),
316
+ session: Auth::Session,
317
+ kwargs: T.untyped
318
+ ).returns(T.untyped)
319
+ end
320
+ def count(
321
+ article_id: nil,
322
+ blog_id: nil,
323
+ collection_id: nil,
324
+ customer_id: nil,
325
+ draft_order_id: nil,
326
+ order_id: nil,
327
+ page_id: nil,
328
+ product_image_id: nil,
329
+ product_id: nil,
330
+ variant_id: nil,
331
+ session: ShopifyAPI::Context.active_session,
332
+ **kwargs
333
+ )
334
+ request(
335
+ http_method: :get,
336
+ operation: :count,
337
+ session: session,
338
+ 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},
339
+ params: {}.merge(kwargs).compact,
340
+ body: {},
341
+ entity: nil,
342
+ )
343
+ end
344
+
345
+ end
346
+
347
+ end
348
+ end
@@ -0,0 +1,114 @@
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 MobilePlatformApplication < 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
+ @api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
16
+ @retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
17
+
18
+ sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
19
+ def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
20
+
21
+ @application_id = T.let(nil, T.nilable(String))
22
+ @enabled_shared_webcredentials = T.let(nil, T.nilable(T::Boolean))
23
+ @enabled_universal_or_app_links = T.let(nil, T.nilable(T::Boolean))
24
+ @id = T.let(nil, T.nilable(Integer))
25
+ @platform = T.let(nil, T.nilable(String))
26
+ @sha256_cert_fingerprints = T.let(nil, T.nilable(T::Array[T.untyped]))
27
+
28
+ super(session: session, from_hash: from_hash)
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: :delete, operation: :delete, ids: [:id], path: "mobile_platform_applications/<id>.json"},
35
+ {http_method: :get, operation: :get, ids: [], path: "mobile_platform_applications.json"},
36
+ {http_method: :get, operation: :get, ids: [:id], path: "mobile_platform_applications/<id>.json"},
37
+ {http_method: :post, operation: :post, ids: [], path: "mobile_platform_applications.json"},
38
+ {http_method: :put, operation: :put, ids: [:id], path: "mobile_platform_applications/<id>.json"}
39
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
40
+
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :application_id
43
+ sig { returns(T.nilable(T::Boolean)) }
44
+ attr_reader :enabled_shared_webcredentials
45
+ sig { returns(T.nilable(T::Boolean)) }
46
+ attr_reader :enabled_universal_or_app_links
47
+ sig { returns(T.nilable(Integer)) }
48
+ attr_reader :id
49
+ sig { returns(T.nilable(String)) }
50
+ attr_reader :platform
51
+ sig { returns(T.nilable(T::Array[String])) }
52
+ attr_reader :sha256_cert_fingerprints
53
+
54
+ class << self
55
+ sig do
56
+ params(
57
+ id: T.any(Integer, String),
58
+ session: Auth::Session
59
+ ).returns(T.nilable(MobilePlatformApplication))
60
+ end
61
+ def find(
62
+ id:,
63
+ session: ShopifyAPI::Context.active_session
64
+ )
65
+ result = base_find(
66
+ session: session,
67
+ ids: {id: id},
68
+ params: {},
69
+ )
70
+ T.cast(result[0], T.nilable(MobilePlatformApplication))
71
+ end
72
+
73
+ sig do
74
+ params(
75
+ id: T.any(Integer, String),
76
+ session: Auth::Session
77
+ ).returns(T.untyped)
78
+ end
79
+ def delete(
80
+ id:,
81
+ session: ShopifyAPI::Context.active_session
82
+ )
83
+ request(
84
+ http_method: :delete,
85
+ operation: :delete,
86
+ session: session,
87
+ ids: {id: id},
88
+ params: {},
89
+ )
90
+ end
91
+
92
+ sig do
93
+ params(
94
+ session: Auth::Session,
95
+ kwargs: T.untyped
96
+ ).returns(T::Array[MobilePlatformApplication])
97
+ end
98
+ def all(
99
+ session: ShopifyAPI::Context.active_session,
100
+ **kwargs
101
+ )
102
+ response = base_find(
103
+ session: session,
104
+ ids: {},
105
+ params: {}.merge(kwargs).compact,
106
+ )
107
+
108
+ T.cast(response, T::Array[MobilePlatformApplication])
109
+ end
110
+
111
+ end
112
+
113
+ end
114
+ end