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.
- checksums.yaml +4 -4
- data/BREAKING_CHANGES_FOR_V15.md +42 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +2 -2
- data/README.md +3 -0
- data/docs/usage/oauth.md +88 -16
- data/lib/shopify_api/admin_versions.rb +2 -1
- data/lib/shopify_api/clients/graphql/client.rb +3 -2
- data/lib/shopify_api/clients/graphql/storefront.rb +4 -2
- data/lib/shopify_api/rest/resources/2022_04/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_07/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2022_10/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_01/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_04/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_07/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2023_10/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_01/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_04/shop.rb +2 -2
- data/lib/shopify_api/rest/resources/2024_07/abandoned_checkout.rb +194 -0
- data/lib/shopify_api/rest/resources/2024_07/access_scope.rb +62 -0
- data/lib/shopify_api/rest/resources/2024_07/apple_pay_certificate.rb +109 -0
- data/lib/shopify_api/rest/resources/2024_07/application_charge.rb +113 -0
- data/lib/shopify_api/rest/resources/2024_07/application_credit.rb +95 -0
- data/lib/shopify_api/rest/resources/2024_07/article.rb +269 -0
- data/lib/shopify_api/rest/resources/2024_07/asset.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_07/assigned_fulfillment_order.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_07/balance.rb +58 -0
- data/lib/shopify_api/rest/resources/2024_07/blog.rb +166 -0
- data/lib/shopify_api/rest/resources/2024_07/cancellation_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_07/carrier_service.rb +120 -0
- data/lib/shopify_api/rest/resources/2024_07/checkout.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_07/collect.rb +146 -0
- data/lib/shopify_api/rest/resources/2024_07/collection.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_07/collection_listing.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_07/comment.rb +287 -0
- data/lib/shopify_api/rest/resources/2024_07/country.rb +141 -0
- data/lib/shopify_api/rest/resources/2024_07/currency.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_07/custom_collection.rb +191 -0
- data/lib/shopify_api/rest/resources/2024_07/customer.rb +333 -0
- data/lib/shopify_api/rest/resources/2024_07/customer_address.rb +215 -0
- data/lib/shopify_api/rest/resources/2024_07/deprecated_api_call.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_07/discount_code.rb +226 -0
- data/lib/shopify_api/rest/resources/2024_07/dispute.rb +115 -0
- data/lib/shopify_api/rest/resources/2024_07/dispute_evidence.rb +121 -0
- data/lib/shopify_api/rest/resources/2024_07/dispute_file_upload.rb +85 -0
- data/lib/shopify_api/rest/resources/2024_07/draft_order.rb +279 -0
- data/lib/shopify_api/rest/resources/2024_07/event.rb +152 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment.rb +235 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment_event.rb +167 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment_order.rb +326 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment_request.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_07/fulfillment_service.rb +134 -0
- data/lib/shopify_api/rest/resources/2024_07/gift_card.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_07/gift_card_adjustment.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_07/image.rb +161 -0
- data/lib/shopify_api/rest/resources/2024_07/inventory_item.rb +112 -0
- data/lib/shopify_api/rest/resources/2024_07/inventory_level.rb +183 -0
- data/lib/shopify_api/rest/resources/2024_07/location.rb +171 -0
- data/lib/shopify_api/rest/resources/2024_07/locations_for_move.rb +60 -0
- data/lib/shopify_api/rest/resources/2024_07/marketing_event.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_07/metafield.rb +348 -0
- data/lib/shopify_api/rest/resources/2024_07/mobile_platform_application.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_07/order.rb +489 -0
- data/lib/shopify_api/rest/resources/2024_07/order_risk.rb +148 -0
- data/lib/shopify_api/rest/resources/2024_07/page.rb +198 -0
- data/lib/shopify_api/rest/resources/2024_07/payment.rb +144 -0
- data/lib/shopify_api/rest/resources/2024_07/payment_gateway.rb +147 -0
- data/lib/shopify_api/rest/resources/2024_07/payment_transaction.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_07/payout.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_07/policy.rb +73 -0
- data/lib/shopify_api/rest/resources/2024_07/price_rule.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_07/product.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_07/product_listing.rb +200 -0
- data/lib/shopify_api/rest/resources/2024_07/product_resource_feedback.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_07/province.rb +136 -0
- data/lib/shopify_api/rest/resources/2024_07/recurring_application_charge.rb +176 -0
- data/lib/shopify_api/rest/resources/2024_07/redirect.rb +143 -0
- data/lib/shopify_api/rest/resources/2024_07/refund.rb +155 -0
- data/lib/shopify_api/rest/resources/2024_07/resource_feedback.rb +77 -0
- data/lib/shopify_api/rest/resources/2024_07/script_tag.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_07/shipping_zone.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_07/shop.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_07/smart_collection.rb +220 -0
- data/lib/shopify_api/rest/resources/2024_07/storefront_access_token.rb +91 -0
- data/lib/shopify_api/rest/resources/2024_07/tender_transaction.rb +97 -0
- data/lib/shopify_api/rest/resources/2024_07/theme.rb +127 -0
- data/lib/shopify_api/rest/resources/2024_07/transaction.rb +188 -0
- data/lib/shopify_api/rest/resources/2024_07/usage_charge.rb +106 -0
- data/lib/shopify_api/rest/resources/2024_07/user.rb +142 -0
- data/lib/shopify_api/rest/resources/2024_07/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2024_07/webhook.rb +172 -0
- data/lib/shopify_api/version.rb +1 -1
- data/lib/shopify_api/webhooks/registry.rb +5 -4
- metadata +80 -6
@@ -0,0 +1,269 @@
|
|
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 Article < 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
|
+
@author = T.let(nil, T.nilable(String))
|
22
|
+
@blog_id = T.let(nil, T.nilable(Integer))
|
23
|
+
@body_html = T.let(nil, T.nilable(String))
|
24
|
+
@created_at = T.let(nil, T.nilable(String))
|
25
|
+
@handle = T.let(nil, T.nilable(String))
|
26
|
+
@id = T.let(nil, T.nilable(Integer))
|
27
|
+
@image = T.let(nil, T.nilable(T.any(String, T::Hash[T.untyped, T.untyped])))
|
28
|
+
@metafields = T.let(nil, T.nilable(T::Array[T.untyped]))
|
29
|
+
@published = T.let(nil, T.nilable(T::Boolean))
|
30
|
+
@published_at = T.let(nil, T.nilable(String))
|
31
|
+
@summary_html = T.let(nil, T.nilable(String))
|
32
|
+
@tags = T.let(nil, T.nilable(String))
|
33
|
+
@template_suffix = T.let(nil, T.nilable(String))
|
34
|
+
@title = T.let(nil, T.nilable(String))
|
35
|
+
@updated_at = T.let(nil, T.nilable(String))
|
36
|
+
@user_id = T.let(nil, T.nilable(Integer))
|
37
|
+
|
38
|
+
super(session: session, from_hash: from_hash)
|
39
|
+
end
|
40
|
+
|
41
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
42
|
+
@has_many = T.let({
|
43
|
+
metafields: Metafield
|
44
|
+
}, T::Hash[Symbol, Class])
|
45
|
+
@paths = T.let([
|
46
|
+
{http_method: :delete, operation: :delete, ids: [:blog_id, :id], path: "blogs/<blog_id>/articles/<id>.json"},
|
47
|
+
{http_method: :get, operation: :authors, ids: [], path: "articles/authors.json"},
|
48
|
+
{http_method: :get, operation: :count, ids: [:blog_id], path: "blogs/<blog_id>/articles/count.json"},
|
49
|
+
{http_method: :get, operation: :get, ids: [:blog_id], path: "blogs/<blog_id>/articles.json"},
|
50
|
+
{http_method: :get, operation: :get, ids: [:blog_id, :id], path: "blogs/<blog_id>/articles/<id>.json"},
|
51
|
+
{http_method: :get, operation: :tags, ids: [], path: "articles/tags.json"},
|
52
|
+
{http_method: :get, operation: :tags, ids: [:blog_id], path: "blogs/<blog_id>/articles/tags.json"},
|
53
|
+
{http_method: :post, operation: :post, ids: [:blog_id], path: "blogs/<blog_id>/articles.json"},
|
54
|
+
{http_method: :put, operation: :put, ids: [:blog_id, :id], path: "blogs/<blog_id>/articles/<id>.json"}
|
55
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
56
|
+
|
57
|
+
sig { returns(T.nilable(String)) }
|
58
|
+
attr_reader :author
|
59
|
+
sig { returns(T.nilable(Integer)) }
|
60
|
+
attr_reader :blog_id
|
61
|
+
sig { returns(T.nilable(String)) }
|
62
|
+
attr_reader :body_html
|
63
|
+
sig { returns(T.nilable(String)) }
|
64
|
+
attr_reader :created_at
|
65
|
+
sig { returns(T.nilable(String)) }
|
66
|
+
attr_reader :handle
|
67
|
+
sig { returns(T.nilable(Integer)) }
|
68
|
+
attr_reader :id
|
69
|
+
sig { returns(T.nilable(T.any(String, T::Hash[T.untyped, T.untyped]))) }
|
70
|
+
attr_reader :image
|
71
|
+
sig { returns(T.nilable(T::Array[Metafield])) }
|
72
|
+
attr_reader :metafields
|
73
|
+
sig { returns(T.nilable(T::Boolean)) }
|
74
|
+
attr_reader :published
|
75
|
+
sig { returns(T.nilable(String)) }
|
76
|
+
attr_reader :published_at
|
77
|
+
sig { returns(T.nilable(String)) }
|
78
|
+
attr_reader :summary_html
|
79
|
+
sig { returns(T.nilable(String)) }
|
80
|
+
attr_reader :tags
|
81
|
+
sig { returns(T.nilable(String)) }
|
82
|
+
attr_reader :template_suffix
|
83
|
+
sig { returns(T.nilable(String)) }
|
84
|
+
attr_reader :title
|
85
|
+
sig { returns(T.nilable(String)) }
|
86
|
+
attr_reader :updated_at
|
87
|
+
sig { returns(T.nilable(Integer)) }
|
88
|
+
attr_reader :user_id
|
89
|
+
|
90
|
+
class << self
|
91
|
+
sig do
|
92
|
+
params(
|
93
|
+
id: T.any(Integer, String),
|
94
|
+
blog_id: T.nilable(T.any(Integer, String)),
|
95
|
+
fields: T.untyped,
|
96
|
+
session: Auth::Session
|
97
|
+
).returns(T.nilable(Article))
|
98
|
+
end
|
99
|
+
def find(
|
100
|
+
id:,
|
101
|
+
blog_id: nil,
|
102
|
+
fields: nil,
|
103
|
+
session: ShopifyAPI::Context.active_session
|
104
|
+
)
|
105
|
+
result = base_find(
|
106
|
+
session: session,
|
107
|
+
ids: {id: id, blog_id: blog_id},
|
108
|
+
params: {fields: fields},
|
109
|
+
)
|
110
|
+
T.cast(result[0], T.nilable(Article))
|
111
|
+
end
|
112
|
+
|
113
|
+
sig do
|
114
|
+
params(
|
115
|
+
id: T.any(Integer, String),
|
116
|
+
blog_id: T.nilable(T.any(Integer, String)),
|
117
|
+
session: Auth::Session
|
118
|
+
).returns(T.untyped)
|
119
|
+
end
|
120
|
+
def delete(
|
121
|
+
id:,
|
122
|
+
blog_id: nil,
|
123
|
+
session: ShopifyAPI::Context.active_session
|
124
|
+
)
|
125
|
+
request(
|
126
|
+
http_method: :delete,
|
127
|
+
operation: :delete,
|
128
|
+
session: session,
|
129
|
+
ids: {id: id, blog_id: blog_id},
|
130
|
+
params: {},
|
131
|
+
)
|
132
|
+
end
|
133
|
+
|
134
|
+
sig do
|
135
|
+
params(
|
136
|
+
blog_id: T.nilable(T.any(Integer, String)),
|
137
|
+
limit: T.untyped,
|
138
|
+
since_id: T.untyped,
|
139
|
+
created_at_min: T.untyped,
|
140
|
+
created_at_max: T.untyped,
|
141
|
+
updated_at_min: T.untyped,
|
142
|
+
updated_at_max: T.untyped,
|
143
|
+
published_at_min: T.untyped,
|
144
|
+
published_at_max: T.untyped,
|
145
|
+
published_status: T.untyped,
|
146
|
+
handle: T.untyped,
|
147
|
+
tag: T.untyped,
|
148
|
+
author: T.untyped,
|
149
|
+
fields: T.untyped,
|
150
|
+
session: Auth::Session,
|
151
|
+
kwargs: T.untyped
|
152
|
+
).returns(T::Array[Article])
|
153
|
+
end
|
154
|
+
def all(
|
155
|
+
blog_id: nil,
|
156
|
+
limit: nil,
|
157
|
+
since_id: nil,
|
158
|
+
created_at_min: nil,
|
159
|
+
created_at_max: nil,
|
160
|
+
updated_at_min: nil,
|
161
|
+
updated_at_max: nil,
|
162
|
+
published_at_min: nil,
|
163
|
+
published_at_max: nil,
|
164
|
+
published_status: nil,
|
165
|
+
handle: nil,
|
166
|
+
tag: nil,
|
167
|
+
author: nil,
|
168
|
+
fields: nil,
|
169
|
+
session: ShopifyAPI::Context.active_session,
|
170
|
+
**kwargs
|
171
|
+
)
|
172
|
+
response = base_find(
|
173
|
+
session: session,
|
174
|
+
ids: {blog_id: blog_id},
|
175
|
+
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, published_at_min: published_at_min, published_at_max: published_at_max, published_status: published_status, handle: handle, tag: tag, author: author, fields: fields}.merge(kwargs).compact,
|
176
|
+
)
|
177
|
+
|
178
|
+
T.cast(response, T::Array[Article])
|
179
|
+
end
|
180
|
+
|
181
|
+
sig do
|
182
|
+
params(
|
183
|
+
session: Auth::Session,
|
184
|
+
kwargs: T.untyped
|
185
|
+
).returns(T.untyped)
|
186
|
+
end
|
187
|
+
def authors(
|
188
|
+
session: ShopifyAPI::Context.active_session,
|
189
|
+
**kwargs
|
190
|
+
)
|
191
|
+
request(
|
192
|
+
http_method: :get,
|
193
|
+
operation: :authors,
|
194
|
+
session: session,
|
195
|
+
ids: {},
|
196
|
+
params: {}.merge(kwargs).compact,
|
197
|
+
body: {},
|
198
|
+
entity: nil,
|
199
|
+
)
|
200
|
+
end
|
201
|
+
|
202
|
+
sig do
|
203
|
+
params(
|
204
|
+
blog_id: T.nilable(T.any(Integer, String)),
|
205
|
+
created_at_min: T.untyped,
|
206
|
+
created_at_max: T.untyped,
|
207
|
+
updated_at_min: T.untyped,
|
208
|
+
updated_at_max: T.untyped,
|
209
|
+
published_at_min: T.untyped,
|
210
|
+
published_at_max: T.untyped,
|
211
|
+
published_status: T.untyped,
|
212
|
+
session: Auth::Session,
|
213
|
+
kwargs: T.untyped
|
214
|
+
).returns(T.untyped)
|
215
|
+
end
|
216
|
+
def count(
|
217
|
+
blog_id: nil,
|
218
|
+
created_at_min: nil,
|
219
|
+
created_at_max: nil,
|
220
|
+
updated_at_min: nil,
|
221
|
+
updated_at_max: nil,
|
222
|
+
published_at_min: nil,
|
223
|
+
published_at_max: nil,
|
224
|
+
published_status: nil,
|
225
|
+
session: ShopifyAPI::Context.active_session,
|
226
|
+
**kwargs
|
227
|
+
)
|
228
|
+
request(
|
229
|
+
http_method: :get,
|
230
|
+
operation: :count,
|
231
|
+
session: session,
|
232
|
+
ids: {blog_id: blog_id},
|
233
|
+
params: {created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, published_status: published_status}.merge(kwargs).compact,
|
234
|
+
body: {},
|
235
|
+
entity: nil,
|
236
|
+
)
|
237
|
+
end
|
238
|
+
|
239
|
+
sig do
|
240
|
+
params(
|
241
|
+
blog_id: T.nilable(T.any(Integer, String)),
|
242
|
+
limit: T.untyped,
|
243
|
+
popular: T.untyped,
|
244
|
+
session: Auth::Session,
|
245
|
+
kwargs: T.untyped
|
246
|
+
).returns(T.untyped)
|
247
|
+
end
|
248
|
+
def tags(
|
249
|
+
blog_id: nil,
|
250
|
+
limit: nil,
|
251
|
+
popular: nil,
|
252
|
+
session: ShopifyAPI::Context.active_session,
|
253
|
+
**kwargs
|
254
|
+
)
|
255
|
+
request(
|
256
|
+
http_method: :get,
|
257
|
+
operation: :tags,
|
258
|
+
session: session,
|
259
|
+
ids: {blog_id: blog_id},
|
260
|
+
params: {limit: limit, popular: popular}.merge(kwargs).compact,
|
261
|
+
body: {},
|
262
|
+
entity: nil,
|
263
|
+
)
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
|
268
|
+
end
|
269
|
+
end
|
@@ -0,0 +1,122 @@
|
|
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 Asset < 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
|
+
@attachment = T.let(nil, T.nilable(String))
|
22
|
+
@checksum = T.let(nil, T.nilable(String))
|
23
|
+
@content_type = T.let(nil, T.nilable(String))
|
24
|
+
@created_at = T.let(nil, T.nilable(String))
|
25
|
+
@key = T.let(nil, T.nilable(String))
|
26
|
+
@public_url = T.let(nil, T.nilable(String))
|
27
|
+
@size = T.let(nil, T.nilable(Integer))
|
28
|
+
@theme_id = T.let(nil, T.nilable(Integer))
|
29
|
+
@updated_at = T.let(nil, T.nilable(String))
|
30
|
+
@value = T.let(nil, T.nilable(String))
|
31
|
+
|
32
|
+
super(session: session, from_hash: from_hash)
|
33
|
+
end
|
34
|
+
|
35
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
36
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
37
|
+
@paths = T.let([
|
38
|
+
{http_method: :delete, operation: :delete, ids: [:theme_id], path: "themes/<theme_id>/assets.json"},
|
39
|
+
{http_method: :get, operation: :get, ids: [:theme_id], path: "themes/<theme_id>/assets.json"},
|
40
|
+
{http_method: :get, operation: :get, ids: [:theme_id], path: "themes/<theme_id>/assets.json"},
|
41
|
+
{http_method: :put, operation: :put, ids: [:theme_id], path: "themes/<theme_id>/assets.json"}
|
42
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
43
|
+
|
44
|
+
sig { returns(T.nilable(String)) }
|
45
|
+
attr_reader :attachment
|
46
|
+
sig { returns(T.nilable(String)) }
|
47
|
+
attr_reader :checksum
|
48
|
+
sig { returns(T.nilable(String)) }
|
49
|
+
attr_reader :content_type
|
50
|
+
sig { returns(T.nilable(String)) }
|
51
|
+
attr_reader :created_at
|
52
|
+
sig { returns(T.nilable(String)) }
|
53
|
+
attr_reader :key
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :public_url
|
56
|
+
sig { returns(T.nilable(Integer)) }
|
57
|
+
attr_reader :size
|
58
|
+
sig { returns(T.nilable(Integer)) }
|
59
|
+
attr_reader :theme_id
|
60
|
+
sig { returns(T.nilable(String)) }
|
61
|
+
attr_reader :updated_at
|
62
|
+
sig { returns(T.nilable(String)) }
|
63
|
+
attr_reader :value
|
64
|
+
|
65
|
+
class << self
|
66
|
+
sig do
|
67
|
+
returns(String)
|
68
|
+
end
|
69
|
+
def primary_key()
|
70
|
+
"key"
|
71
|
+
end
|
72
|
+
|
73
|
+
sig do
|
74
|
+
params(
|
75
|
+
theme_id: T.nilable(T.any(Integer, String)),
|
76
|
+
asset: T.nilable(T::Hash[T.untyped, T.untyped]),
|
77
|
+
session: Auth::Session
|
78
|
+
).returns(T.untyped)
|
79
|
+
end
|
80
|
+
def delete(
|
81
|
+
theme_id: nil,
|
82
|
+
asset: nil,
|
83
|
+
session: ShopifyAPI::Context.active_session
|
84
|
+
)
|
85
|
+
request(
|
86
|
+
http_method: :delete,
|
87
|
+
operation: :delete,
|
88
|
+
session: session,
|
89
|
+
ids: {theme_id: theme_id},
|
90
|
+
params: {asset: asset},
|
91
|
+
)
|
92
|
+
end
|
93
|
+
|
94
|
+
sig do
|
95
|
+
params(
|
96
|
+
theme_id: T.nilable(T.any(Integer, String)),
|
97
|
+
fields: T.untyped,
|
98
|
+
asset: T.nilable(T::Hash[T.untyped, T.untyped]),
|
99
|
+
session: Auth::Session,
|
100
|
+
kwargs: T.untyped
|
101
|
+
).returns(T::Array[Asset])
|
102
|
+
end
|
103
|
+
def all(
|
104
|
+
theme_id: nil,
|
105
|
+
fields: nil,
|
106
|
+
asset: nil,
|
107
|
+
session: ShopifyAPI::Context.active_session,
|
108
|
+
**kwargs
|
109
|
+
)
|
110
|
+
response = base_find(
|
111
|
+
session: session,
|
112
|
+
ids: {theme_id: theme_id},
|
113
|
+
params: {fields: fields, asset: asset}.merge(kwargs).compact,
|
114
|
+
)
|
115
|
+
|
116
|
+
T.cast(response, T::Array[Asset])
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,92 @@
|
|
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 AssignedFulfillmentOrder < 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
|
+
@assigned_location_id = T.let(nil, T.nilable(Integer))
|
22
|
+
@destination = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
23
|
+
@id = T.let(nil, T.nilable(Integer))
|
24
|
+
@line_items = T.let(nil, T.nilable(T::Array[T.untyped]))
|
25
|
+
@order_id = T.let(nil, T.nilable(Integer))
|
26
|
+
@request_status = T.let(nil, T.nilable(String))
|
27
|
+
@shop_id = T.let(nil, T.nilable(Integer))
|
28
|
+
@status = T.let(nil, T.nilable(String))
|
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: :get, operation: :get, ids: [], path: "assigned_fulfillment_orders.json"}
|
37
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
38
|
+
|
39
|
+
sig { returns(T.nilable(Integer)) }
|
40
|
+
attr_reader :assigned_location_id
|
41
|
+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
42
|
+
attr_reader :destination
|
43
|
+
sig { returns(T.nilable(Integer)) }
|
44
|
+
attr_reader :id
|
45
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
46
|
+
attr_reader :line_items
|
47
|
+
sig { returns(T.nilable(Integer)) }
|
48
|
+
attr_reader :order_id
|
49
|
+
sig { returns(T.nilable(String)) }
|
50
|
+
attr_reader :request_status
|
51
|
+
sig { returns(T.nilable(Integer)) }
|
52
|
+
attr_reader :shop_id
|
53
|
+
sig { returns(T.nilable(String)) }
|
54
|
+
attr_reader :status
|
55
|
+
|
56
|
+
class << self
|
57
|
+
sig do
|
58
|
+
returns(T::Array[String])
|
59
|
+
end
|
60
|
+
def json_response_body_names()
|
61
|
+
[
|
62
|
+
"fulfillment_order"
|
63
|
+
]
|
64
|
+
end
|
65
|
+
|
66
|
+
sig do
|
67
|
+
params(
|
68
|
+
assignment_status: T.untyped,
|
69
|
+
location_ids: T.nilable(T.any(T::Array[T.untyped], Integer, String)),
|
70
|
+
session: Auth::Session,
|
71
|
+
kwargs: T.untyped
|
72
|
+
).returns(T::Array[AssignedFulfillmentOrder])
|
73
|
+
end
|
74
|
+
def all(
|
75
|
+
assignment_status: nil,
|
76
|
+
location_ids: nil,
|
77
|
+
session: ShopifyAPI::Context.active_session,
|
78
|
+
**kwargs
|
79
|
+
)
|
80
|
+
response = base_find(
|
81
|
+
session: session,
|
82
|
+
ids: {},
|
83
|
+
params: {assignment_status: assignment_status, location_ids: location_ids}.merge(kwargs).compact,
|
84
|
+
)
|
85
|
+
|
86
|
+
T.cast(response, T::Array[AssignedFulfillmentOrder])
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,58 @@
|
|
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 Balance < 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
|
+
@balance = T.let(nil, T.nilable(T::Array[T.untyped]))
|
22
|
+
|
23
|
+
super(session: session, from_hash: from_hash)
|
24
|
+
end
|
25
|
+
|
26
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
27
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
28
|
+
@paths = T.let([
|
29
|
+
{http_method: :get, operation: :get, ids: [], path: "shopify_payments/balance.json"}
|
30
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
31
|
+
|
32
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
33
|
+
attr_reader :balance
|
34
|
+
|
35
|
+
class << self
|
36
|
+
sig do
|
37
|
+
params(
|
38
|
+
session: Auth::Session,
|
39
|
+
kwargs: T.untyped
|
40
|
+
).returns(T::Array[Balance])
|
41
|
+
end
|
42
|
+
def all(
|
43
|
+
session: ShopifyAPI::Context.active_session,
|
44
|
+
**kwargs
|
45
|
+
)
|
46
|
+
response = base_find(
|
47
|
+
session: session,
|
48
|
+
ids: {},
|
49
|
+
params: {}.merge(kwargs).compact,
|
50
|
+
)
|
51
|
+
|
52
|
+
T.cast(response, T::Array[Balance])
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,166 @@
|
|
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 Blog < 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
|
+
@admin_graphql_api_id = T.let(nil, T.nilable(String))
|
22
|
+
@commentable = T.let(nil, T.nilable(String))
|
23
|
+
@created_at = T.let(nil, T.nilable(String))
|
24
|
+
@feedburner = T.let(nil, T.nilable(String))
|
25
|
+
@feedburner_location = T.let(nil, T.nilable(String))
|
26
|
+
@handle = T.let(nil, T.nilable(String))
|
27
|
+
@id = T.let(nil, T.nilable(Integer))
|
28
|
+
@metafields = T.let(nil, T.nilable(T::Array[T.untyped]))
|
29
|
+
@tags = T.let(nil, T.nilable(String))
|
30
|
+
@template_suffix = T.let(nil, T.nilable(String))
|
31
|
+
@title = T.let(nil, T.nilable(String))
|
32
|
+
@updated_at = T.let(nil, T.nilable(String))
|
33
|
+
|
34
|
+
super(session: session, from_hash: from_hash)
|
35
|
+
end
|
36
|
+
|
37
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
38
|
+
@has_many = T.let({
|
39
|
+
metafields: Metafield
|
40
|
+
}, T::Hash[Symbol, Class])
|
41
|
+
@paths = T.let([
|
42
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "blogs/<id>.json"},
|
43
|
+
{http_method: :get, operation: :count, ids: [], path: "blogs/count.json"},
|
44
|
+
{http_method: :get, operation: :get, ids: [], path: "blogs.json"},
|
45
|
+
{http_method: :get, operation: :get, ids: [:id], path: "blogs/<id>.json"},
|
46
|
+
{http_method: :post, operation: :post, ids: [], path: "blogs.json"},
|
47
|
+
{http_method: :put, operation: :put, ids: [:id], path: "blogs/<id>.json"}
|
48
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
49
|
+
|
50
|
+
sig { returns(T.nilable(String)) }
|
51
|
+
attr_reader :admin_graphql_api_id
|
52
|
+
sig { returns(T.nilable(String)) }
|
53
|
+
attr_reader :commentable
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :created_at
|
56
|
+
sig { returns(T.nilable(String)) }
|
57
|
+
attr_reader :feedburner
|
58
|
+
sig { returns(T.nilable(String)) }
|
59
|
+
attr_reader :feedburner_location
|
60
|
+
sig { returns(T.nilable(String)) }
|
61
|
+
attr_reader :handle
|
62
|
+
sig { returns(T.nilable(Integer)) }
|
63
|
+
attr_reader :id
|
64
|
+
sig { returns(T.nilable(T::Array[Metafield])) }
|
65
|
+
attr_reader :metafields
|
66
|
+
sig { returns(T.nilable(String)) }
|
67
|
+
attr_reader :tags
|
68
|
+
sig { returns(T.nilable(String)) }
|
69
|
+
attr_reader :template_suffix
|
70
|
+
sig { returns(T.nilable(String)) }
|
71
|
+
attr_reader :title
|
72
|
+
sig { returns(T.nilable(String)) }
|
73
|
+
attr_reader :updated_at
|
74
|
+
|
75
|
+
class << self
|
76
|
+
sig do
|
77
|
+
params(
|
78
|
+
id: T.any(Integer, String),
|
79
|
+
fields: T.untyped,
|
80
|
+
session: Auth::Session
|
81
|
+
).returns(T.nilable(Blog))
|
82
|
+
end
|
83
|
+
def find(
|
84
|
+
id:,
|
85
|
+
fields: nil,
|
86
|
+
session: ShopifyAPI::Context.active_session
|
87
|
+
)
|
88
|
+
result = base_find(
|
89
|
+
session: session,
|
90
|
+
ids: {id: id},
|
91
|
+
params: {fields: fields},
|
92
|
+
)
|
93
|
+
T.cast(result[0], T.nilable(Blog))
|
94
|
+
end
|
95
|
+
|
96
|
+
sig do
|
97
|
+
params(
|
98
|
+
id: T.any(Integer, String),
|
99
|
+
session: Auth::Session
|
100
|
+
).returns(T.untyped)
|
101
|
+
end
|
102
|
+
def delete(
|
103
|
+
id:,
|
104
|
+
session: ShopifyAPI::Context.active_session
|
105
|
+
)
|
106
|
+
request(
|
107
|
+
http_method: :delete,
|
108
|
+
operation: :delete,
|
109
|
+
session: session,
|
110
|
+
ids: {id: id},
|
111
|
+
params: {},
|
112
|
+
)
|
113
|
+
end
|
114
|
+
|
115
|
+
sig do
|
116
|
+
params(
|
117
|
+
limit: T.untyped,
|
118
|
+
since_id: T.untyped,
|
119
|
+
handle: T.untyped,
|
120
|
+
fields: T.untyped,
|
121
|
+
session: Auth::Session,
|
122
|
+
kwargs: T.untyped
|
123
|
+
).returns(T::Array[Blog])
|
124
|
+
end
|
125
|
+
def all(
|
126
|
+
limit: nil,
|
127
|
+
since_id: nil,
|
128
|
+
handle: nil,
|
129
|
+
fields: nil,
|
130
|
+
session: ShopifyAPI::Context.active_session,
|
131
|
+
**kwargs
|
132
|
+
)
|
133
|
+
response = base_find(
|
134
|
+
session: session,
|
135
|
+
ids: {},
|
136
|
+
params: {limit: limit, since_id: since_id, handle: handle, fields: fields}.merge(kwargs).compact,
|
137
|
+
)
|
138
|
+
|
139
|
+
T.cast(response, T::Array[Blog])
|
140
|
+
end
|
141
|
+
|
142
|
+
sig do
|
143
|
+
params(
|
144
|
+
session: Auth::Session,
|
145
|
+
kwargs: T.untyped
|
146
|
+
).returns(T.untyped)
|
147
|
+
end
|
148
|
+
def count(
|
149
|
+
session: ShopifyAPI::Context.active_session,
|
150
|
+
**kwargs
|
151
|
+
)
|
152
|
+
request(
|
153
|
+
http_method: :get,
|
154
|
+
operation: :count,
|
155
|
+
session: session,
|
156
|
+
ids: {},
|
157
|
+
params: {}.merge(kwargs).compact,
|
158
|
+
body: {},
|
159
|
+
entity: nil,
|
160
|
+
)
|
161
|
+
end
|
162
|
+
|
163
|
+
end
|
164
|
+
|
165
|
+
end
|
166
|
+
end
|