alfa_insurance 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ae90e5d0edd4ca448251282ed79de6ad02eaf6f
4
- data.tar.gz: 28b049972f42551de3d16cd7997116b5289b1979
3
+ metadata.gz: 7ba7c514e6180b834c46adea1d9cd2639f100341
4
+ data.tar.gz: 95336626b17a7936e3fcd9337c25be33989e952f
5
5
  SHA512:
6
- metadata.gz: ac4835a64ac97a9252bf6d58607e328cf9711ca29ea40fca0c87d00b9065b465447b99275dbc972d3a27e15c942bab9c7ebb0bf385fa84ecbc26d9498131a15f
7
- data.tar.gz: b1eeb3a15f4b2937048c2f0acbf3b9ea177e2c703886f103337060feb72aa8bee4390155b42f1eccb4322f0c84eec357c96a04ee71f646c39373fb0118185d38
6
+ metadata.gz: 1ddc972d9748d7be4c3fbd1008e035e1bc670d0b9d3e285474055a21b37118ae98c3bb23a61c30a712b24c5593eb265ff85892568525b55cd490fa27b61101d7
7
+ data.tar.gz: 97f501d45ee9353c3c6d5786627dde297f4f9ff3f691d244c2672dfa6ff3170b5170e4d80d443fb7b851f6956e47e196673a1eba8a706bd30f55879687289a15
@@ -1,11 +1,11 @@
1
1
  module AlfaInsurance
2
2
  class CalculateResponse < Response
3
3
  def cost
4
- Money.new(body.dig(:calculation_result, :premium), currency)
4
+ Money.from_amount(body.dig(:calculation_result, :premium).to_f, currency)
5
5
  end
6
6
 
7
7
  def risk_value
8
- Money.new(body.dig(:calculation_result, :risk_value_sum), currency)
8
+ Money.from_amount(body.dig(:calculation_result, :risk_value_sum).to_f, currency)
9
9
  end
10
10
 
11
11
  def risk_type
@@ -5,11 +5,11 @@ module AlfaInsurance
5
5
  end
6
6
 
7
7
  def cost
8
- Money.new(body.dig(:calculation_result, :premium), currency)
8
+ Money.from_amount(body.dig(:calculation_result, :premium).to_f, currency)
9
9
  end
10
10
 
11
11
  def risk_value
12
- Money.new(body.dig(:calculation_result, :risk_value_sum), currency)
12
+ Money.from_amount(body.dig(:calculation_result, :risk_value_sum).to_f, currency)
13
13
  end
14
14
 
15
15
  def risk_type
@@ -5,11 +5,11 @@ module AlfaInsurance
5
5
  end
6
6
 
7
7
  def cost
8
- Money.new(body.dig(:policy_information, :rate), currency)
8
+ Money.from_amount(body.dig(:policy_information, :rate).to_f, currency)
9
9
  end
10
10
 
11
11
  def risk_value
12
- Money.new(body.dig(:policy_information, :risk_value, :@value), risk_currency)
12
+ Money.from_amount(body.dig(:policy_information, :risk_value, :@value).to_f, risk_currency)
13
13
  end
14
14
 
15
15
  def risk_type
@@ -1,3 +1,3 @@
1
1
  module AlfaInsurance
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alfa_insurance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Sviridov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-21 00:00:00.000000000 Z
11
+ date: 2018-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon