Skip to content

Commit b88fdfd

Browse files
generate resources for 2023_04 release (#1137)
* generate resources for 2023_04 release * rubocop'd * changelog
1 parent f665705 commit b88fdfd

File tree

529 files changed

+7082
-33843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

529 files changed

+7082
-33843
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Note: For changes to the API, see https://shopify.dev/changelog?filter=api
77
- [#1113](https://github.com/Shopify/shopify-api-ruby/pull/1113) Handle JSON::ParserError when http response is HTML and raise ShopifyAPI::Errors::HttpResponseError
88
- [#1098](https://github.com/Shopify/shopify-api-ruby/pull/1098) Gracefully handle HTTP 204 repsonse bodies
99
- [#1104](https://github.com/Shopify/shopify-api-ruby/pull/1104) Allow api version overrides.
10+
- [#1137](https://github.com/Shopify/shopify-api-ruby/pull/1137) Support for 2023_04 API version. Fix reported typing bugs.
1011

1112
## Version 12.4.0
1213

lib/shopify_api/admin_versions.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ module ShopifyAPI
55
module AdminVersions
66
SUPPORTED_ADMIN_VERSIONS = T.let([
77
"unstable",
8+
"2023-04",
89
"2023-01",
910
"2022-10",
1011
"2022-07",
1112
"2022-04",
1213
"2022-01",
1314
], T::Array[String])
1415

15-
LATEST_SUPPORTED_ADMIN_VERSION = T.let("2023-01", String)
16+
LATEST_SUPPORTED_ADMIN_VERSION = T.let("2023-04", String)
1617
end
1718

1819
SUPPORTED_ADMIN_VERSIONS = ShopifyAPI::AdminVersions::SUPPORTED_ADMIN_VERSIONS

lib/shopify_api/rest/base.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,10 @@ def create_instance(data:, session:, instance: nil)
240240
end
241241
instance.public_send("#{attribute}=", attr_list)
242242
elsif has_one?(attr_sym) && value
243+
# force a hash if core returns values that instantiate objects like "USD"
244+
data_hash = value.is_a?(Hash) ? value : { attribute.to_s => value }
243245
instance.public_send("#{attribute}=",
244-
T.unsafe(@has_one[attr_sym]).create_instance(data: value, session: session))
246+
T.unsafe(@has_one[attr_sym]).create_instance(data: data_hash, session: session))
245247
else
246248
instance.public_send("#{attribute}=", value)
247249
instance.original_state[attr_sym] = value

lib/shopify_api/rest/resources/2022_01/application_charge.rb

-104
This file was deleted.

lib/shopify_api/rest/resources/2022_01/carrier_service.rb

-116
This file was deleted.

0 commit comments

Comments
 (0)