From 2bbfb86f30764e7c469116f4feced25fb4aeb744 Mon Sep 17 00:00:00 2001 From: Charley DAVID Date: Wed, 17 May 2017 13:56:58 -0300 Subject: [PATCH] Fix rounding issue --- lib/eshop.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eshop.rb b/lib/eshop.rb index 306b7df..29caa8a 100644 --- a/lib/eshop.rb +++ b/lib/eshop.rb @@ -135,7 +135,7 @@ def self.list(country: 'US', ids: [], limit: 50) country: country, status: price[:sales_status], currency: price.dig(:regular_price, :currency), - value_in_cents: (price.dig(:regular_price, :raw_value).to_f * 100).to_i, + value_in_cents: (price.dig(:regular_price, :raw_value).to_f * 100).round, } end.compact end