instant_quote 1.1.0 → 1.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcc46ad5c55f3fcd548e18ae0ba8a853ce640c77a043762fec33a298cd2a9a2a
|
4
|
+
data.tar.gz: c17b2fbc98a6637395a757122b0a2d1367bb3b6a0abbce1b2f87416d36b39ff4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf272f35c66fd55538f199d0220abe1a02d715d852bfd5f0f8bd8013a9eb112f71921745070351ea80658cd4951af6ab7b300865bf9ef4e77ebbb1f42eaf32b4
|
7
|
+
data.tar.gz: e120faaad9ae5b884d37c1993ae6e79e1b912d4e622c5b2eb83c0b8d15cdd46c0f9b72b90c92806f72bb2aad9d6ea3bdda9bbc861711ee5da1db8aae8a542568
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
instant_quote (1.1.
|
4
|
+
instant_quote (1.1.1)
|
5
5
|
activesupport
|
6
6
|
capital_on_tap
|
7
7
|
iwoca
|
@@ -31,10 +31,10 @@ GEM
|
|
31
31
|
diff-lcs (1.3)
|
32
32
|
docile (1.3.2)
|
33
33
|
dotenv (2.7.5)
|
34
|
-
faraday (0.
|
34
|
+
faraday (1.0.0)
|
35
35
|
multipart-post (>= 1.2, < 3)
|
36
|
-
faraday_middleware (0.
|
37
|
-
faraday (
|
36
|
+
faraday_middleware (1.0.0.rc1)
|
37
|
+
faraday (~> 1.0)
|
38
38
|
i18n (1.8.2)
|
39
39
|
concurrent-ruby (~> 1.0)
|
40
40
|
iwoca (1.0.0)
|
@@ -91,7 +91,7 @@ GEM
|
|
91
91
|
tzinfo (1.2.6)
|
92
92
|
thread_safe (~> 0.1)
|
93
93
|
unicode-display_width (1.6.1)
|
94
|
-
zeitwerk (2.
|
94
|
+
zeitwerk (2.3.0)
|
95
95
|
|
96
96
|
PLATFORMS
|
97
97
|
ruby
|
@@ -23,6 +23,20 @@ module InstantQuote
|
|
23
23
|
label: 'Applicant mobile phone',
|
24
24
|
required: true
|
25
25
|
},
|
26
|
+
{
|
27
|
+
name: 'monthly_income',
|
28
|
+
label: 'Applicat monthly income',
|
29
|
+
type: 'number',
|
30
|
+
required: true,
|
31
|
+
if: ->(app) { app.borrower_organisation.sole_trader? }
|
32
|
+
},
|
33
|
+
{
|
34
|
+
name: 'monthly_expenditure',
|
35
|
+
label: 'Applicant monthly expenditure',
|
36
|
+
type: 'number',
|
37
|
+
required: true,
|
38
|
+
if: ->(app) { app.borrower_organisation.sole_trader? }
|
39
|
+
},
|
26
40
|
{
|
27
41
|
name: 'applicant_consent',
|
28
42
|
label: 'Yes, I give my consent for my data to be shared',
|
@@ -7,7 +7,7 @@ module InstantQuote
|
|
7
7
|
|
8
8
|
# rubocop:disable Metrics/AbcSize
|
9
9
|
def translate
|
10
|
-
{
|
10
|
+
fields = {
|
11
11
|
Salutation: app_user.salutation || DEFAULT_SALUTATION,
|
12
12
|
FirstName: app_user.first_name,
|
13
13
|
LastName: app_user.last_name,
|
@@ -22,8 +22,16 @@ module InstantQuote
|
|
22
22
|
MonthlyTurnOver: translate_turnover,
|
23
23
|
BusinessType: translate_business_type,
|
24
24
|
BusinessAddress: translate_address,
|
25
|
-
RegistrationNumber: app_org.company_number
|
25
|
+
RegistrationNumber: app_org.company_number,
|
26
26
|
}
|
27
|
+
|
28
|
+
# If the borrower organisation is Sole Trader we need to merge two additional fields.
|
29
|
+
fields.merge!(
|
30
|
+
MonthlyIncome: extra_info['monthly_income'],
|
31
|
+
MonthlyExpenditure: extra_info['monthly_expenditure']
|
32
|
+
) if app_org.sole_trader?
|
33
|
+
|
34
|
+
fields
|
27
35
|
end
|
28
36
|
# rubocop:enable Metrics/AbcSize
|
29
37
|
|
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.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rikas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|