shopify_api 14.0.1 → 14.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +2 -0
  3. data/.rubocop.yml +0 -1
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +11 -0
  6. data/Gemfile +13 -1
  7. data/Gemfile.lock +19 -16
  8. data/dev.yml +1 -1
  9. data/docs/usage/custom_apps.md +3 -3
  10. data/docs/usage/graphql_storefront.md +13 -6
  11. data/docs/usage/rest.md +1 -1
  12. data/lib/shopify_api/admin_versions.rb +2 -1
  13. data/lib/shopify_api/auth/session.rb +14 -3
  14. data/lib/shopify_api/clients/graphql/storefront.rb +26 -4
  15. data/lib/shopify_api/rest/resources/2022_04/fulfillment_event.rb +5 -8
  16. data/lib/shopify_api/rest/resources/2022_04/inventory_item.rb +2 -2
  17. data/lib/shopify_api/rest/resources/2022_04/variant.rb +6 -6
  18. data/lib/shopify_api/rest/resources/2022_07/fulfillment_event.rb +5 -8
  19. data/lib/shopify_api/rest/resources/2022_07/inventory_item.rb +2 -2
  20. data/lib/shopify_api/rest/resources/2022_07/variant.rb +6 -6
  21. data/lib/shopify_api/rest/resources/2022_10/fulfillment_event.rb +5 -8
  22. data/lib/shopify_api/rest/resources/2022_10/inventory_item.rb +2 -2
  23. data/lib/shopify_api/rest/resources/2022_10/variant.rb +4 -4
  24. data/lib/shopify_api/rest/resources/2023_01/fulfillment_event.rb +5 -8
  25. data/lib/shopify_api/rest/resources/2023_01/inventory_item.rb +2 -2
  26. data/lib/shopify_api/rest/resources/2023_01/variant.rb +4 -4
  27. data/lib/shopify_api/rest/resources/2023_04/fulfillment_event.rb +5 -8
  28. data/lib/shopify_api/rest/resources/2023_04/inventory_item.rb +2 -2
  29. data/lib/shopify_api/rest/resources/2023_04/variant.rb +4 -4
  30. data/lib/shopify_api/rest/resources/2023_07/fulfillment_event.rb +5 -8
  31. data/lib/shopify_api/rest/resources/2023_07/inventory_item.rb +2 -2
  32. data/lib/shopify_api/rest/resources/2023_07/variant.rb +4 -4
  33. data/lib/shopify_api/rest/resources/2023_10/fulfillment_event.rb +5 -8
  34. data/lib/shopify_api/rest/resources/2023_10/inventory_item.rb +2 -2
  35. data/lib/shopify_api/rest/resources/2023_10/variant.rb +4 -4
  36. data/lib/shopify_api/rest/resources/2024_01/fulfillment_event.rb +5 -8
  37. data/lib/shopify_api/rest/resources/2024_01/inventory_item.rb +2 -2
  38. data/lib/shopify_api/rest/resources/2024_01/variant.rb +4 -4
  39. data/lib/shopify_api/rest/resources/2024_04/abandoned_checkout.rb +194 -0
  40. data/lib/shopify_api/rest/resources/2024_04/access_scope.rb +62 -0
  41. data/lib/shopify_api/rest/resources/2024_04/apple_pay_certificate.rb +109 -0
  42. data/lib/shopify_api/rest/resources/2024_04/application_charge.rb +113 -0
  43. data/lib/shopify_api/rest/resources/2024_04/application_credit.rb +95 -0
  44. data/lib/shopify_api/rest/resources/2024_04/article.rb +269 -0
  45. data/lib/shopify_api/rest/resources/2024_04/asset.rb +122 -0
  46. data/lib/shopify_api/rest/resources/2024_04/assigned_fulfillment_order.rb +92 -0
  47. data/lib/shopify_api/rest/resources/2024_04/balance.rb +58 -0
  48. data/lib/shopify_api/rest/resources/2024_04/blog.rb +166 -0
  49. data/lib/shopify_api/rest/resources/2024_04/cancellation_request.rb +87 -0
  50. data/lib/shopify_api/rest/resources/2024_04/carrier_service.rb +120 -0
  51. data/lib/shopify_api/rest/resources/2024_04/checkout.rb +213 -0
  52. data/lib/shopify_api/rest/resources/2024_04/collect.rb +146 -0
  53. data/lib/shopify_api/rest/resources/2024_04/collection.rb +114 -0
  54. data/lib/shopify_api/rest/resources/2024_04/collection_listing.rb +159 -0
  55. data/lib/shopify_api/rest/resources/2024_04/comment.rb +287 -0
  56. data/lib/shopify_api/rest/resources/2024_04/country.rb +141 -0
  57. data/lib/shopify_api/rest/resources/2024_04/currency.rb +61 -0
  58. data/lib/shopify_api/rest/resources/2024_04/custom_collection.rb +191 -0
  59. data/lib/shopify_api/rest/resources/2024_04/customer.rb +333 -0
  60. data/lib/shopify_api/rest/resources/2024_04/customer_address.rb +215 -0
  61. data/lib/shopify_api/rest/resources/2024_04/deprecated_api_call.rb +61 -0
  62. data/lib/shopify_api/rest/resources/2024_04/discount_code.rb +226 -0
  63. data/lib/shopify_api/rest/resources/2024_04/dispute.rb +115 -0
  64. data/lib/shopify_api/rest/resources/2024_04/dispute_evidence.rb +121 -0
  65. data/lib/shopify_api/rest/resources/2024_04/dispute_file_upload.rb +85 -0
  66. data/lib/shopify_api/rest/resources/2024_04/draft_order.rb +279 -0
  67. data/lib/shopify_api/rest/resources/2024_04/event.rb +152 -0
  68. data/lib/shopify_api/rest/resources/2024_04/fulfillment.rb +235 -0
  69. data/lib/shopify_api/rest/resources/2024_04/fulfillment_event.rb +167 -0
  70. data/lib/shopify_api/rest/resources/2024_04/fulfillment_order.rb +326 -0
  71. data/lib/shopify_api/rest/resources/2024_04/fulfillment_request.rb +101 -0
  72. data/lib/shopify_api/rest/resources/2024_04/fulfillment_service.rb +134 -0
  73. data/lib/shopify_api/rest/resources/2024_04/gift_card.rb +222 -0
  74. data/lib/shopify_api/rest/resources/2024_04/gift_card_adjustment.rb +122 -0
  75. data/lib/shopify_api/rest/resources/2024_04/image.rb +161 -0
  76. data/lib/shopify_api/rest/resources/2024_04/inventory_item.rb +112 -0
  77. data/lib/shopify_api/rest/resources/2024_04/inventory_level.rb +183 -0
  78. data/lib/shopify_api/rest/resources/2024_04/location.rb +171 -0
  79. data/lib/shopify_api/rest/resources/2024_04/locations_for_move.rb +60 -0
  80. data/lib/shopify_api/rest/resources/2024_04/marketing_event.rb +213 -0
  81. data/lib/shopify_api/rest/resources/2024_04/metafield.rb +348 -0
  82. data/lib/shopify_api/rest/resources/2024_04/mobile_platform_application.rb +114 -0
  83. data/lib/shopify_api/rest/resources/2024_04/order.rb +489 -0
  84. data/lib/shopify_api/rest/resources/2024_04/order_risk.rb +148 -0
  85. data/lib/shopify_api/rest/resources/2024_04/page.rb +198 -0
  86. data/lib/shopify_api/rest/resources/2024_04/payment.rb +144 -0
  87. data/lib/shopify_api/rest/resources/2024_04/payment_gateway.rb +147 -0
  88. data/lib/shopify_api/rest/resources/2024_04/payment_transaction.rb +114 -0
  89. data/lib/shopify_api/rest/resources/2024_04/payout.rb +101 -0
  90. data/lib/shopify_api/rest/resources/2024_04/policy.rb +73 -0
  91. data/lib/shopify_api/rest/resources/2024_04/price_rule.rb +227 -0
  92. data/lib/shopify_api/rest/resources/2024_04/product.rb +227 -0
  93. data/lib/shopify_api/rest/resources/2024_04/product_listing.rb +200 -0
  94. data/lib/shopify_api/rest/resources/2024_04/product_resource_feedback.rb +92 -0
  95. data/lib/shopify_api/rest/resources/2024_04/province.rb +136 -0
  96. data/lib/shopify_api/rest/resources/2024_04/recurring_application_charge.rb +176 -0
  97. data/lib/shopify_api/rest/resources/2024_04/redirect.rb +143 -0
  98. data/lib/shopify_api/rest/resources/2024_04/refund.rb +155 -0
  99. data/lib/shopify_api/rest/resources/2024_04/resource_feedback.rb +77 -0
  100. data/lib/shopify_api/rest/resources/2024_04/script_tag.rb +159 -0
  101. data/lib/shopify_api/rest/resources/2024_04/shipping_zone.rb +87 -0
  102. data/lib/shopify_api/rest/resources/2024_04/shop.rb +222 -0
  103. data/lib/shopify_api/rest/resources/2024_04/smart_collection.rb +220 -0
  104. data/lib/shopify_api/rest/resources/2024_04/storefront_access_token.rb +91 -0
  105. data/lib/shopify_api/rest/resources/2024_04/tender_transaction.rb +97 -0
  106. data/lib/shopify_api/rest/resources/2024_04/theme.rb +127 -0
  107. data/lib/shopify_api/rest/resources/2024_04/transaction.rb +188 -0
  108. data/lib/shopify_api/rest/resources/2024_04/usage_charge.rb +106 -0
  109. data/lib/shopify_api/rest/resources/2024_04/user.rb +142 -0
  110. data/lib/shopify_api/rest/resources/2024_04/variant.rb +212 -0
  111. data/lib/shopify_api/rest/resources/2024_04/webhook.rb +172 -0
  112. data/lib/shopify_api/version.rb +1 -1
  113. data/shopify_api.gemspec +0 -8
  114. metadata +77 -101
@@ -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,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