Skip to content

Commit

Permalink
fix model building
Browse files Browse the repository at this point in the history
  • Loading branch information
ericcj committed Feb 16, 2021
1 parent 8c40039 commit a0b3071
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/amz_sp_api_version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module AmzSpApi
VERSION = '0.1.6'
VERSION = '0.1.7'
end
2 changes: 1 addition & 1 deletion lib/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def convert_to_type(data, return_type)
end
else
# models, e.g. Pet
AmzSpApi.constants.map{|c| AmzSpApi.const_get(c)}.select{|sub| sub.kind_of?(Module)}.detect{|sub| sub.const_defined?(return_type)}.const_get(return_type)
AmzSpApi.constants.map{|c| AmzSpApi.const_get(c)}.select{|sub| sub.kind_of?(Module)}.detect{|sub| sub.const_defined?(return_type)}.const_get(return_type).build_from_hash(data)
end
end

Expand Down

0 comments on commit a0b3071

Please sign in to comment.