Skip to content

Commit 4040fa6

Browse files
authored
Merge branch 'main' into v_15_0_0
2 parents c4a5af8 + c107794 commit 4040fa6

File tree

14 files changed

+2842
-3
lines changed

14 files changed

+2842
-3
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Note: For changes to the API, see https://shopify.dev/changelog?filter=api
77

88
- ⚠️ [Breaking] Removed deprecated `ShopifyAPI::Webhooks::Handler` interface. Apps must migrate to `ShopifyAPI::Webhooks::WebhookHandler` which provides `webhook_id` and `api_version` in addition to `topic`, `shop`, and `body`. See [BREAKING_CHANGES_FOR_V15.md](BREAKING_CHANGES_FOR_V15.md) for migration guide.
99
- Add support for 2025-10 API version
10-
- Removed deprecated REST resources: `AccessScope`, `Product`, `ProductImage`, `PriceRule`, `ProductListing`, `ProductResourceFeedback`
1110
- Updated `LATEST_SUPPORTED_ADMIN_VERSION` to `2025-10`
1211
- [#1411](https://github.com/Shopify/shopify-api-ruby/pull/1411) Remove `LATEST_SUPPORTED_ADMIN_VERSION` and `RELEASE_CANDIDATE_ADMIN_VERSION` constants to prevent semver violations. Developers must now explicitly specify API versions. See the [migration guide](BREAKING_CHANGES_FOR_V15.md#removal-of-latest_supported_admin_version-and-release_candidate_admin_version-constants) for details.
1312

lib/shopify_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
require_relative "shopify_api/inflector"
1818
require_relative "shopify_api/admin_versions"
19-
require_relative "shopify_api/webhooks/handler"
19+
require_relative "shopify_api/webhooks/webhook_handler"
2020

2121
loader = Zeitwerk::Loader.for_gem
2222
loader.inflector = ShopifyAPI::Inflector.new(__FILE__)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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 AccessScope < 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+
@handle = T.let(nil, T.nilable(String))
22+
@access_scopes = T.let(nil, T.nilable(T::Array[T.untyped]))
23+
24+
super(session: session, from_hash: from_hash)
25+
end
26+
27+
@has_one = T.let({}, T::Hash[Symbol, Class])
28+
@has_many = T.let({}, T::Hash[Symbol, Class])
29+
@custom_prefix = T.let("/admin/oauth", T.nilable(String))
30+
@paths = T.let([
31+
{http_method: :get, operation: :get, ids: [], path: "access_scopes.json"}
32+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
33+
34+
sig { returns(T.nilable(String)) }
35+
attr_reader :handle
36+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
37+
attr_reader :access_scopes
38+
39+
class << self
40+
sig do
41+
params(
42+
session: Auth::Session,
43+
kwargs: T.untyped
44+
).returns(T::Array[AccessScope])
45+
end
46+
def all(
47+
session: ShopifyAPI::Context.active_session,
48+
**kwargs
49+
)
50+
response = base_find(
51+
session: session,
52+
ids: {},
53+
params: {}.merge(kwargs).compact,
54+
)
55+
56+
T.cast(response, T::Array[AccessScope])
57+
end
58+
59+
end
60+
61+
end
62+
end
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
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 PriceRule < 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+
@allocation_limit = T.let(nil, T.nilable(Integer))
22+
@allocation_method = T.let(nil, T.nilable(String))
23+
@created_at = T.let(nil, T.nilable(String))
24+
@customer_segment_prerequisite_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
25+
@customer_selection = T.let(nil, T.nilable(String))
26+
@ends_at = T.let(nil, T.nilable(String))
27+
@entitled_collection_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
28+
@entitled_country_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
29+
@entitled_product_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
30+
@entitled_variant_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
31+
@id = T.let(nil, T.nilable(Integer))
32+
@once_per_customer = T.let(nil, T.nilable(T::Boolean))
33+
@prerequisite_collection_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
34+
@prerequisite_customer_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
35+
@prerequisite_product_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
36+
@prerequisite_quantity_range = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
37+
@prerequisite_shipping_price_range = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
38+
@prerequisite_subtotal_range = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
39+
@prerequisite_to_entitlement_purchase = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
40+
@prerequisite_to_entitlement_quantity_ratio = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
41+
@prerequisite_variant_ids = T.let(nil, T.nilable(T::Array[T.untyped]))
42+
@starts_at = T.let(nil, T.nilable(String))
43+
@target_selection = T.let(nil, T.nilable(String))
44+
@target_type = T.let(nil, T.nilable(String))
45+
@title = T.let(nil, T.nilable(String))
46+
@updated_at = T.let(nil, T.nilable(String))
47+
@usage_limit = T.let(nil, T.nilable(Integer))
48+
@value = T.let(nil, T.nilable(String))
49+
@value_type = T.let(nil, T.nilable(String))
50+
51+
super(session: session, from_hash: from_hash)
52+
end
53+
54+
@has_one = T.let({}, T::Hash[Symbol, Class])
55+
@has_many = T.let({}, T::Hash[Symbol, Class])
56+
@paths = T.let([
57+
{http_method: :delete, operation: :delete, ids: [:id], path: "price_rules/<id>.json"},
58+
{http_method: :get, operation: :count, ids: [], path: "price_rules/count.json"},
59+
{http_method: :get, operation: :get, ids: [], path: "price_rules.json"},
60+
{http_method: :get, operation: :get, ids: [:id], path: "price_rules/<id>.json"},
61+
{http_method: :post, operation: :post, ids: [], path: "price_rules.json"},
62+
{http_method: :put, operation: :put, ids: [:id], path: "price_rules/<id>.json"}
63+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
64+
65+
sig { returns(T.nilable(Integer)) }
66+
attr_reader :allocation_limit
67+
sig { returns(T.nilable(String)) }
68+
attr_reader :allocation_method
69+
sig { returns(T.nilable(String)) }
70+
attr_reader :created_at
71+
sig { returns(T.nilable(T::Array[Integer])) }
72+
attr_reader :customer_segment_prerequisite_ids
73+
sig { returns(T.nilable(String)) }
74+
attr_reader :customer_selection
75+
sig { returns(T.nilable(String)) }
76+
attr_reader :ends_at
77+
sig { returns(T.nilable(T::Array[Integer])) }
78+
attr_reader :entitled_collection_ids
79+
sig { returns(T.nilable(T::Array[Integer])) }
80+
attr_reader :entitled_country_ids
81+
sig { returns(T.nilable(T::Array[Integer])) }
82+
attr_reader :entitled_product_ids
83+
sig { returns(T.nilable(T::Array[Integer])) }
84+
attr_reader :entitled_variant_ids
85+
sig { returns(T.nilable(Integer)) }
86+
attr_reader :id
87+
sig { returns(T.nilable(T::Boolean)) }
88+
attr_reader :once_per_customer
89+
sig { returns(T.nilable(T::Array[Integer])) }
90+
attr_reader :prerequisite_collection_ids
91+
sig { returns(T.nilable(T::Array[Integer])) }
92+
attr_reader :prerequisite_customer_ids
93+
sig { returns(T.nilable(T::Array[Integer])) }
94+
attr_reader :prerequisite_product_ids
95+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
96+
attr_reader :prerequisite_quantity_range
97+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
98+
attr_reader :prerequisite_shipping_price_range
99+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
100+
attr_reader :prerequisite_subtotal_range
101+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
102+
attr_reader :prerequisite_to_entitlement_purchase
103+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
104+
attr_reader :prerequisite_to_entitlement_quantity_ratio
105+
sig { returns(T.nilable(T::Array[Integer])) }
106+
attr_reader :prerequisite_variant_ids
107+
sig { returns(T.nilable(String)) }
108+
attr_reader :starts_at
109+
sig { returns(T.nilable(String)) }
110+
attr_reader :target_selection
111+
sig { returns(T.nilable(String)) }
112+
attr_reader :target_type
113+
sig { returns(T.nilable(String)) }
114+
attr_reader :title
115+
sig { returns(T.nilable(String)) }
116+
attr_reader :updated_at
117+
sig { returns(T.nilable(Integer)) }
118+
attr_reader :usage_limit
119+
sig { returns(T.nilable(String)) }
120+
attr_reader :value
121+
sig { returns(T.nilable(String)) }
122+
attr_reader :value_type
123+
124+
class << self
125+
sig do
126+
params(
127+
id: T.any(Integer, String),
128+
session: Auth::Session
129+
).returns(T.nilable(PriceRule))
130+
end
131+
def find(
132+
id:,
133+
session: ShopifyAPI::Context.active_session
134+
)
135+
result = base_find(
136+
session: session,
137+
ids: {id: id},
138+
params: {},
139+
)
140+
T.cast(result[0], T.nilable(PriceRule))
141+
end
142+
143+
sig do
144+
params(
145+
id: T.any(Integer, String),
146+
session: Auth::Session
147+
).returns(T.untyped)
148+
end
149+
def delete(
150+
id:,
151+
session: ShopifyAPI::Context.active_session
152+
)
153+
request(
154+
http_method: :delete,
155+
operation: :delete,
156+
session: session,
157+
ids: {id: id},
158+
params: {},
159+
)
160+
end
161+
162+
sig do
163+
params(
164+
limit: T.untyped,
165+
since_id: T.untyped,
166+
created_at_min: T.untyped,
167+
created_at_max: T.untyped,
168+
updated_at_min: T.untyped,
169+
updated_at_max: T.untyped,
170+
starts_at_min: T.untyped,
171+
starts_at_max: T.untyped,
172+
ends_at_min: T.untyped,
173+
ends_at_max: T.untyped,
174+
times_used: T.untyped,
175+
session: Auth::Session,
176+
kwargs: T.untyped
177+
).returns(T::Array[PriceRule])
178+
end
179+
def all(
180+
limit: nil,
181+
since_id: nil,
182+
created_at_min: nil,
183+
created_at_max: nil,
184+
updated_at_min: nil,
185+
updated_at_max: nil,
186+
starts_at_min: nil,
187+
starts_at_max: nil,
188+
ends_at_min: nil,
189+
ends_at_max: nil,
190+
times_used: nil,
191+
session: ShopifyAPI::Context.active_session,
192+
**kwargs
193+
)
194+
response = base_find(
195+
session: session,
196+
ids: {},
197+
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, starts_at_min: starts_at_min, starts_at_max: starts_at_max, ends_at_min: ends_at_min, ends_at_max: ends_at_max, times_used: times_used}.merge(kwargs).compact,
198+
)
199+
200+
T.cast(response, T::Array[PriceRule])
201+
end
202+
203+
sig do
204+
params(
205+
session: Auth::Session,
206+
kwargs: T.untyped
207+
).returns(T.untyped)
208+
end
209+
def count(
210+
session: ShopifyAPI::Context.active_session,
211+
**kwargs
212+
)
213+
request(
214+
http_method: :get,
215+
operation: :count,
216+
session: session,
217+
ids: {},
218+
params: {}.merge(kwargs).compact,
219+
body: {},
220+
entity: nil,
221+
)
222+
end
223+
224+
end
225+
226+
end
227+
end

0 commit comments

Comments
 (0)