instant_quote 1.7.6 → 1.7.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96beb49cded7a5171760d6a292781211fbf61b250d7f1d5b272a0d253386bfb9
4
- data.tar.gz: 6a7898c6f6935549623135f789bce38c80f3ffbc5e81c35ab1a86f2c5c8e0d7d
3
+ metadata.gz: c6ca7c25677c925b0b637a2ac22052acf1e0969228fce0a2acd5d3916ea4bcf1
4
+ data.tar.gz: df855495089300f19461a6fdc50784987305a4064d4919b0426a7e330c9bf67b
5
5
  SHA512:
6
- metadata.gz: 2a418819d1720e7601349dab5a14e23fb09631f8a23dc427a6b7ac69c5ab9aaf2741acfecfb4c96767fc309d891b9a76e8a7dc43e661ec96757437ea7e2adb43
7
- data.tar.gz: a1d6f7680f96dffe4f403ca116a153d46169d314b2d9ac490b8b65f796594ffbc0c4976f84066f81e3c4d60023f467b8e9cdf7f490087f5983ab9da9c2f15938
6
+ metadata.gz: 0b4449520408ce3c7ea5ecadda96213fee6ae6ffde6476f1ad3cd13f46fa296612e29001ed9cd66e1f836fc32c29f3ed882bd4de88e386855adc511503a4edc0
7
+ data.tar.gz: dda46d5ba775f70e21319df87dd9e69033188f37f6ffffa59b0e85736179ade50b9ab1b34b0e906e18b5952fcdb814b4627ac0108c99c3b42afc24b0a8be6d5b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- instant_quote (1.7.6)
4
+ instant_quote (1.7.7)
5
5
  activesupport
6
6
  capital_on_tap
7
7
  iwoca
@@ -13,7 +13,7 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activesupport (6.1.3)
16
+ activesupport (6.1.3.1)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
@@ -44,7 +44,7 @@ GEM
44
44
  faraday_middleware (1.0.0)
45
45
  faraday (~> 1.0)
46
46
  hashdiff (1.0.1)
47
- i18n (1.8.9)
47
+ i18n (1.8.10)
48
48
  concurrent-ruby (~> 1.0)
49
49
  iwoca (1.0.0)
50
50
  addressable
@@ -28,18 +28,6 @@ module InstantQuote
28
28
  required: true,
29
29
  if: ->(app) { app.borrower_organisation.sole_trader? }
30
30
  },
31
- {
32
- name: 'turnover_percentage_after_feb_2020',
33
- label: 'What is your current turnover as a percentage of your turnover prior to February 2020?',
34
- required: true,
35
- choices: [
36
- 'My turnover had increased since covid',
37
- 'My turnover is about the same as it was pre-covid (within 20%)',
38
- 'My turnover has fallen materially as a result of covid (20%-60% reduction in turnover)',
39
- 'My turnover has fallen significantly as a result of covid (more than a 60% reduction in turnover)'
40
- ],
41
- type: 'select'
42
- },
43
31
  {
44
32
  name: 'preferred_monthly_repayment_option',
45
33
  label: 'How do you want to set up your direct debit for monthly repayment?',
@@ -72,9 +72,12 @@ module InstantQuote
72
72
  }
73
73
  end
74
74
 
75
+ # TODO: this is no longer true, but we are still keeping the range for legacy reasons.
75
76
  # Since in Finpoint the user selects an intervel (i.e. '500,000 - 999,999'). We get the avg
76
77
  # on this interval and use that number as the monthly turnover.
77
78
  def translate_turnover
79
+ return app_org.turnover_pennies.to_i if app_org.turnover_pennies
80
+
78
81
  turnover = app_org.turnover_range
79
82
 
80
83
  ((turnover.from + turnover.to) / 2 / 100).ceil
@@ -98,7 +101,6 @@ module InstantQuote
98
101
  def additional_questions
99
102
  [
100
103
  preferred_monthly_repayment_option_question,
101
- turnover_percentage_question,
102
104
  send_cash_from_credit_facility_to_bank_question
103
105
  ]
104
106
  end
@@ -107,10 +109,6 @@ module InstantQuote
107
109
  question_from_extra_info('preferred_monthly_repayment_option', '17')
108
110
  end
109
111
 
110
- def turnover_percentage_question
111
- question_from_extra_info('turnover_percentage_after_feb_2020', '20')
112
- end
113
-
114
112
  def send_cash_from_credit_facility_to_bank_question
115
113
  question_from_extra_info('send_cash_from_credit_facility_to_bank', '23')
116
114
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InstantQuote
4
- VERSION = '1.7.6'
4
+ VERSION = '1.7.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instant_quote
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.6
4
+ version: 1.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - rikas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-23 00:00:00.000000000 Z
11
+ date: 2021-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler