shopify_api 14.6.0 → 14.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/Gemfile.lock +12 -7
  4. data/docs/usage/oauth.md +14 -0
  5. data/docs/usage/rest.md +2 -0
  6. data/docs/usage/webhooks.md +11 -0
  7. data/lib/shopify_api/admin_versions.rb +2 -1
  8. data/lib/shopify_api/clients/rest/admin.rb +5 -0
  9. data/lib/shopify_api/context.rb +12 -3
  10. data/lib/shopify_api/errors/disabled_resource_error.rb +8 -0
  11. data/lib/shopify_api/rest/resources/2024_07/webhook.rb +1 -0
  12. data/lib/shopify_api/rest/resources/2024_10/webhook.rb +1 -0
  13. data/lib/shopify_api/rest/resources/2025_01/abandoned_checkout.rb +194 -0
  14. data/lib/shopify_api/rest/resources/2025_01/access_scope.rb +62 -0
  15. data/lib/shopify_api/rest/resources/2025_01/apple_pay_certificate.rb +109 -0
  16. data/lib/shopify_api/rest/resources/2025_01/application_charge.rb +113 -0
  17. data/lib/shopify_api/rest/resources/2025_01/application_credit.rb +95 -0
  18. data/lib/shopify_api/rest/resources/2025_01/article.rb +269 -0
  19. data/lib/shopify_api/rest/resources/2025_01/asset.rb +122 -0
  20. data/lib/shopify_api/rest/resources/2025_01/assigned_fulfillment_order.rb +92 -0
  21. data/lib/shopify_api/rest/resources/2025_01/balance.rb +58 -0
  22. data/lib/shopify_api/rest/resources/2025_01/blog.rb +166 -0
  23. data/lib/shopify_api/rest/resources/2025_01/cancellation_request.rb +87 -0
  24. data/lib/shopify_api/rest/resources/2025_01/carrier_service.rb +120 -0
  25. data/lib/shopify_api/rest/resources/2025_01/checkout.rb +213 -0
  26. data/lib/shopify_api/rest/resources/2025_01/collect.rb +146 -0
  27. data/lib/shopify_api/rest/resources/2025_01/collection.rb +114 -0
  28. data/lib/shopify_api/rest/resources/2025_01/collection_listing.rb +159 -0
  29. data/lib/shopify_api/rest/resources/2025_01/comment.rb +287 -0
  30. data/lib/shopify_api/rest/resources/2025_01/country.rb +141 -0
  31. data/lib/shopify_api/rest/resources/2025_01/currency.rb +61 -0
  32. data/lib/shopify_api/rest/resources/2025_01/custom_collection.rb +191 -0
  33. data/lib/shopify_api/rest/resources/2025_01/customer.rb +328 -0
  34. data/lib/shopify_api/rest/resources/2025_01/customer_address.rb +215 -0
  35. data/lib/shopify_api/rest/resources/2025_01/deprecated_api_call.rb +61 -0
  36. data/lib/shopify_api/rest/resources/2025_01/discount_code.rb +226 -0
  37. data/lib/shopify_api/rest/resources/2025_01/dispute.rb +115 -0
  38. data/lib/shopify_api/rest/resources/2025_01/dispute_evidence.rb +121 -0
  39. data/lib/shopify_api/rest/resources/2025_01/dispute_file_upload.rb +85 -0
  40. data/lib/shopify_api/rest/resources/2025_01/draft_order.rb +279 -0
  41. data/lib/shopify_api/rest/resources/2025_01/event.rb +152 -0
  42. data/lib/shopify_api/rest/resources/2025_01/fulfillment.rb +235 -0
  43. data/lib/shopify_api/rest/resources/2025_01/fulfillment_event.rb +167 -0
  44. data/lib/shopify_api/rest/resources/2025_01/fulfillment_order.rb +326 -0
  45. data/lib/shopify_api/rest/resources/2025_01/fulfillment_request.rb +116 -0
  46. data/lib/shopify_api/rest/resources/2025_01/fulfillment_service.rb +134 -0
  47. data/lib/shopify_api/rest/resources/2025_01/gift_card.rb +222 -0
  48. data/lib/shopify_api/rest/resources/2025_01/gift_card_adjustment.rb +122 -0
  49. data/lib/shopify_api/rest/resources/2025_01/image.rb +161 -0
  50. data/lib/shopify_api/rest/resources/2025_01/inventory_item.rb +112 -0
  51. data/lib/shopify_api/rest/resources/2025_01/inventory_level.rb +183 -0
  52. data/lib/shopify_api/rest/resources/2025_01/location.rb +171 -0
  53. data/lib/shopify_api/rest/resources/2025_01/locations_for_move.rb +60 -0
  54. data/lib/shopify_api/rest/resources/2025_01/marketing_event.rb +213 -0
  55. data/lib/shopify_api/rest/resources/2025_01/metafield.rb +348 -0
  56. data/lib/shopify_api/rest/resources/2025_01/mobile_platform_application.rb +120 -0
  57. data/lib/shopify_api/rest/resources/2025_01/order.rb +503 -0
  58. data/lib/shopify_api/rest/resources/2025_01/order_risk.rb +148 -0
  59. data/lib/shopify_api/rest/resources/2025_01/page.rb +198 -0
  60. data/lib/shopify_api/rest/resources/2025_01/payment.rb +98 -0
  61. data/lib/shopify_api/rest/resources/2025_01/payment_gateway.rb +147 -0
  62. data/lib/shopify_api/rest/resources/2025_01/payment_transaction.rb +117 -0
  63. data/lib/shopify_api/rest/resources/2025_01/payout.rb +101 -0
  64. data/lib/shopify_api/rest/resources/2025_01/policy.rb +73 -0
  65. data/lib/shopify_api/rest/resources/2025_01/price_rule.rb +227 -0
  66. data/lib/shopify_api/rest/resources/2025_01/product.rb +227 -0
  67. data/lib/shopify_api/rest/resources/2025_01/product_listing.rb +200 -0
  68. data/lib/shopify_api/rest/resources/2025_01/product_resource_feedback.rb +92 -0
  69. data/lib/shopify_api/rest/resources/2025_01/province.rb +136 -0
  70. data/lib/shopify_api/rest/resources/2025_01/recurring_application_charge.rb +184 -0
  71. data/lib/shopify_api/rest/resources/2025_01/redirect.rb +143 -0
  72. data/lib/shopify_api/rest/resources/2025_01/refund.rb +158 -0
  73. data/lib/shopify_api/rest/resources/2025_01/resource_feedback.rb +77 -0
  74. data/lib/shopify_api/rest/resources/2025_01/script_tag.rb +159 -0
  75. data/lib/shopify_api/rest/resources/2025_01/shipping_zone.rb +87 -0
  76. data/lib/shopify_api/rest/resources/2025_01/shop.rb +231 -0
  77. data/lib/shopify_api/rest/resources/2025_01/smart_collection.rb +220 -0
  78. data/lib/shopify_api/rest/resources/2025_01/storefront_access_token.rb +91 -0
  79. data/lib/shopify_api/rest/resources/2025_01/tender_transaction.rb +97 -0
  80. data/lib/shopify_api/rest/resources/2025_01/theme.rb +127 -0
  81. data/lib/shopify_api/rest/resources/2025_01/transaction.rb +194 -0
  82. data/lib/shopify_api/rest/resources/2025_01/usage_charge.rb +106 -0
  83. data/lib/shopify_api/rest/resources/2025_01/user.rb +142 -0
  84. data/lib/shopify_api/rest/resources/2025_01/variant.rb +212 -0
  85. data/lib/shopify_api/rest/resources/2025_01/webhook.rb +173 -0
  86. data/lib/shopify_api/version.rb +1 -1
  87. data/lib/shopify_api/webhooks/registration.rb +17 -3
  88. data/lib/shopify_api/webhooks/registrations/event_bridge.rb +22 -3
  89. data/lib/shopify_api/webhooks/registrations/http.rb +22 -3
  90. data/lib/shopify_api/webhooks/registrations/pub_sub.rb +23 -4
  91. data/lib/shopify_api/webhooks/registry.rb +15 -5
  92. metadata +77 -6
@@ -0,0 +1,213 @@
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 MarketingEvent < 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
+ @event_type = T.let(nil, T.nilable(String))
22
+ @marketing_channel = T.let(nil, T.nilable(String))
23
+ @paid = T.let(nil, T.nilable(T::Boolean))
24
+ @started_at = T.let(nil, T.nilable(String))
25
+ @UTM_parameters = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
26
+ @budget = T.let(nil, T.nilable(String))
27
+ @budget_type = T.let(nil, T.nilable(String))
28
+ @currency = T.let(nil, T.nilable(String))
29
+ @description = T.let(nil, T.nilable(String))
30
+ @ended_at = T.let(nil, T.nilable(String))
31
+ @id = T.let(nil, T.nilable(Integer))
32
+ @manage_url = T.let(nil, T.nilable(String))
33
+ @marketed_resources = T.let(nil, T.nilable(T::Array[T.untyped]))
34
+ @preview_url = T.let(nil, T.nilable(String))
35
+ @referring_domain = T.let(nil, T.nilable(String))
36
+ @remote_id = T.let(nil, T.nilable(String))
37
+ @scheduled_to_end_at = T.let(nil, T.nilable(String))
38
+
39
+ super(session: session, from_hash: from_hash)
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: [:id], path: "marketing_events/<id>.json"},
46
+ {http_method: :get, operation: :count, ids: [], path: "marketing_events/count.json"},
47
+ {http_method: :get, operation: :get, ids: [], path: "marketing_events.json"},
48
+ {http_method: :get, operation: :get, ids: [:id], path: "marketing_events/<id>.json"},
49
+ {http_method: :post, operation: :engagements, ids: [:id], path: "marketing_events/<id>/engagements.json"},
50
+ {http_method: :post, operation: :post, ids: [], path: "marketing_events.json"},
51
+ {http_method: :put, operation: :put, ids: [:id], path: "marketing_events/<id>.json"}
52
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
53
+
54
+ sig { returns(T.nilable(String)) }
55
+ attr_reader :event_type
56
+ sig { returns(T.nilable(String)) }
57
+ attr_reader :marketing_channel
58
+ sig { returns(T.nilable(T::Boolean)) }
59
+ attr_reader :paid
60
+ sig { returns(T.nilable(String)) }
61
+ attr_reader :started_at
62
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
63
+ attr_reader :UTM_parameters
64
+ sig { returns(T.nilable(String)) }
65
+ attr_reader :budget
66
+ sig { returns(T.nilable(String)) }
67
+ attr_reader :budget_type
68
+ sig { returns(T.nilable(String)) }
69
+ attr_reader :currency
70
+ sig { returns(T.nilable(String)) }
71
+ attr_reader :description
72
+ sig { returns(T.nilable(String)) }
73
+ attr_reader :ended_at
74
+ sig { returns(T.nilable(Integer)) }
75
+ attr_reader :id
76
+ sig { returns(T.nilable(String)) }
77
+ attr_reader :manage_url
78
+ sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
79
+ attr_reader :marketed_resources
80
+ sig { returns(T.nilable(String)) }
81
+ attr_reader :preview_url
82
+ sig { returns(T.nilable(String)) }
83
+ attr_reader :referring_domain
84
+ sig { returns(T.nilable(String)) }
85
+ attr_reader :remote_id
86
+ sig { returns(T.nilable(String)) }
87
+ attr_reader :scheduled_to_end_at
88
+
89
+ class << self
90
+ sig do
91
+ params(
92
+ id: T.any(Integer, String),
93
+ session: Auth::Session
94
+ ).returns(T.nilable(MarketingEvent))
95
+ end
96
+ def find(
97
+ id:,
98
+ session: ShopifyAPI::Context.active_session
99
+ )
100
+ result = base_find(
101
+ session: session,
102
+ ids: {id: id},
103
+ params: {},
104
+ )
105
+ T.cast(result[0], T.nilable(MarketingEvent))
106
+ end
107
+
108
+ sig do
109
+ params(
110
+ id: T.any(Integer, String),
111
+ session: Auth::Session
112
+ ).returns(T.untyped)
113
+ end
114
+ def delete(
115
+ id:,
116
+ session: ShopifyAPI::Context.active_session
117
+ )
118
+ request(
119
+ http_method: :delete,
120
+ operation: :delete,
121
+ session: session,
122
+ ids: {id: id},
123
+ params: {},
124
+ )
125
+ end
126
+
127
+ sig do
128
+ params(
129
+ limit: T.untyped,
130
+ offset: T.untyped,
131
+ session: Auth::Session,
132
+ kwargs: T.untyped
133
+ ).returns(T::Array[MarketingEvent])
134
+ end
135
+ def all(
136
+ limit: nil,
137
+ offset: nil,
138
+ session: ShopifyAPI::Context.active_session,
139
+ **kwargs
140
+ )
141
+ response = base_find(
142
+ session: session,
143
+ ids: {},
144
+ params: {limit: limit, offset: offset}.merge(kwargs).compact,
145
+ )
146
+
147
+ T.cast(response, T::Array[MarketingEvent])
148
+ end
149
+
150
+ sig do
151
+ params(
152
+ session: Auth::Session,
153
+ kwargs: T.untyped
154
+ ).returns(T.untyped)
155
+ end
156
+ def count(
157
+ session: ShopifyAPI::Context.active_session,
158
+ **kwargs
159
+ )
160
+ request(
161
+ http_method: :get,
162
+ operation: :count,
163
+ session: session,
164
+ ids: {},
165
+ params: {}.merge(kwargs).compact,
166
+ body: {},
167
+ entity: nil,
168
+ )
169
+ end
170
+
171
+ end
172
+
173
+ sig do
174
+ params(
175
+ occurred_on: T.untyped,
176
+ impressions_count: T.untyped,
177
+ views_count: T.untyped,
178
+ clicks_count: T.untyped,
179
+ shares_count: T.untyped,
180
+ favorites_count: T.untyped,
181
+ comments_count: T.untyped,
182
+ ad_spend: T.untyped,
183
+ is_cumulative: T.untyped,
184
+ body: T.untyped,
185
+ kwargs: T.untyped
186
+ ).returns(T.untyped)
187
+ end
188
+ def engagements(
189
+ occurred_on: nil,
190
+ impressions_count: nil,
191
+ views_count: nil,
192
+ clicks_count: nil,
193
+ shares_count: nil,
194
+ favorites_count: nil,
195
+ comments_count: nil,
196
+ ad_spend: nil,
197
+ is_cumulative: nil,
198
+ body: nil,
199
+ **kwargs
200
+ )
201
+ self.class.request(
202
+ http_method: :post,
203
+ operation: :engagements,
204
+ session: @session,
205
+ ids: {id: @id},
206
+ params: {occurred_on: occurred_on, impressions_count: impressions_count, views_count: views_count, clicks_count: clicks_count, shares_count: shares_count, favorites_count: favorites_count, comments_count: comments_count, ad_spend: ad_spend, is_cumulative: is_cumulative}.merge(kwargs).compact,
207
+ body: body,
208
+ entity: self,
209
+ )
210
+ end
211
+
212
+ end
213
+ end
@@ -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,120 @@
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
+ @app_clip_application_id = T.let(nil, T.nilable(String))
22
+ @application_id = T.let(nil, T.nilable(String))
23
+ @enabled_app_clips = T.let(nil, T.nilable(T::Boolean))
24
+ @enabled_shared_webcredentials = T.let(nil, T.nilable(T::Boolean))
25
+ @enabled_universal_or_app_links = T.let(nil, T.nilable(T::Boolean))
26
+ @id = T.let(nil, T.nilable(Integer))
27
+ @platform = T.let(nil, T.nilable(String))
28
+ @sha256_cert_fingerprints = T.let(nil, T.nilable(T::Array[T.untyped]))
29
+
30
+ super(session: session, from_hash: from_hash)
31
+ end
32
+
33
+ @has_one = T.let({}, T::Hash[Symbol, Class])
34
+ @has_many = T.let({}, T::Hash[Symbol, Class])
35
+ @paths = T.let([
36
+ {http_method: :delete, operation: :delete, ids: [:id], path: "mobile_platform_applications/<id>.json"},
37
+ {http_method: :get, operation: :get, ids: [], path: "mobile_platform_applications.json"},
38
+ {http_method: :get, operation: :get, ids: [:id], path: "mobile_platform_applications/<id>.json"},
39
+ {http_method: :post, operation: :post, ids: [], path: "mobile_platform_applications.json"},
40
+ {http_method: :put, operation: :put, ids: [:id], path: "mobile_platform_applications/<id>.json"}
41
+ ], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
42
+
43
+ sig { returns(T.nilable(String)) }
44
+ attr_reader :app_clip_application_id
45
+ sig { returns(T.nilable(String)) }
46
+ attr_reader :application_id
47
+ sig { returns(T.nilable(T::Boolean)) }
48
+ attr_reader :enabled_app_clips
49
+ sig { returns(T.nilable(T::Boolean)) }
50
+ attr_reader :enabled_shared_webcredentials
51
+ sig { returns(T.nilable(T::Boolean)) }
52
+ attr_reader :enabled_universal_or_app_links
53
+ sig { returns(T.nilable(Integer)) }
54
+ attr_reader :id
55
+ sig { returns(T.nilable(String)) }
56
+ attr_reader :platform
57
+ sig { returns(T.nilable(T::Array[String])) }
58
+ attr_reader :sha256_cert_fingerprints
59
+
60
+ class << self
61
+ sig do
62
+ params(
63
+ id: T.any(Integer, String),
64
+ session: Auth::Session
65
+ ).returns(T.nilable(MobilePlatformApplication))
66
+ end
67
+ def find(
68
+ id:,
69
+ session: ShopifyAPI::Context.active_session
70
+ )
71
+ result = base_find(
72
+ session: session,
73
+ ids: {id: id},
74
+ params: {},
75
+ )
76
+ T.cast(result[0], T.nilable(MobilePlatformApplication))
77
+ end
78
+
79
+ sig do
80
+ params(
81
+ id: T.any(Integer, String),
82
+ session: Auth::Session
83
+ ).returns(T.untyped)
84
+ end
85
+ def delete(
86
+ id:,
87
+ session: ShopifyAPI::Context.active_session
88
+ )
89
+ request(
90
+ http_method: :delete,
91
+ operation: :delete,
92
+ session: session,
93
+ ids: {id: id},
94
+ params: {},
95
+ )
96
+ end
97
+
98
+ sig do
99
+ params(
100
+ session: Auth::Session,
101
+ kwargs: T.untyped
102
+ ).returns(T::Array[MobilePlatformApplication])
103
+ end
104
+ def all(
105
+ session: ShopifyAPI::Context.active_session,
106
+ **kwargs
107
+ )
108
+ response = base_find(
109
+ session: session,
110
+ ids: {},
111
+ params: {}.merge(kwargs).compact,
112
+ )
113
+
114
+ T.cast(response, T::Array[MobilePlatformApplication])
115
+ end
116
+
117
+ end
118
+
119
+ end
120
+ end