Skip to content

Commit

Permalink
Tackling issue Shopify#1296 Added indifferent access to create_instan…
Browse files Browse the repository at this point in the history
…ces_from_response in the ShopifyAPI::Rest::Base class.
  • Loading branch information
elizasorber committed Apr 5, 2024
1 parent b5d3446 commit 437594c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/shopify_api/rest/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# frozen_string_literal: true

require "active_support/inflector"
require 'active_support/all'

module ShopifyAPI
module Rest
Expand Down Expand Up @@ -248,7 +249,7 @@ def request(http_method:, operation:, session:, ids: {}, params: {}, body: nil,
def create_instances_from_response(response:, session:)
objects = []

body = T.cast(response.body, T::Hash[String, T.untyped])
body = T.cast(response.body, T::Hash[String, T.untyped]).with_indifferent_access

response_names = json_response_body_names

Expand Down

0 comments on commit 437594c

Please sign in to comment.