13 14 15 16 17 18 19 20
# File 'lib/squake/model/product.rb', line 13 def self.from_api_response(response_body) product = response_body.fetch(:product, {}) Squake::Model::Product.new( id: product.fetch(:id), title: product.fetch(:title), ) end