From bb312f520f58ceafdcc721293ced455d0f15e2a3 Mon Sep 17 00:00:00 2001 From: "s.radyukov" Date: Fri, 9 Jun 2023 09:42:57 +0300 Subject: [PATCH] quotation units is number --- lib/invest_tinkoff/v2/quotation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/invest_tinkoff/v2/quotation.rb b/lib/invest_tinkoff/v2/quotation.rb index 0b90408..de5d933 100644 --- a/lib/invest_tinkoff/v2/quotation.rb +++ b/lib/invest_tinkoff/v2/quotation.rb @@ -10,7 +10,7 @@ def self.create price units = price.to_i nano = ((price.to_d - units) * 1_000_000_000).to_i new( - "#{price.positive? ? '' : '-'}#{units.abs}", + "#{price.positive? ? '' : '-'}#{units.abs}".to_i, nano ) end