instant_quote 1.2.0 → 1.5.2
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37edc1ac5cee7a85fb58c677061f8b6aab1fedaf6dbc472cfb92801b25f4fdbc
|
|
4
|
+
data.tar.gz: 35cad5c9bcbb00750364ed51abb3367163b949a7bbe444c76404d37602868a6c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71b11b24f38de7282f55cf63820d9b1091bb0873781070dc2af58747055305cbb3029afb433adc2401e95a812040743649f9b398bc0c6fa338923377bacda8ef
|
|
7
|
+
data.tar.gz: 520a2a85e693db1002e333db97e0b5549ef7632de054d6992e9d36ca0cfb72ed5f9fdab7a580ea6b6ce1b24097880825bd70d433f4cc946997c2187d5502833d
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
instant_quote (1.2
|
|
4
|
+
instant_quote (1.5.2)
|
|
5
5
|
activesupport
|
|
6
6
|
capital_on_tap
|
|
7
7
|
iwoca
|
|
@@ -12,7 +12,7 @@ PATH
|
|
|
12
12
|
GEM
|
|
13
13
|
remote: https://rubygems.org/
|
|
14
14
|
specs:
|
|
15
|
-
activesupport (6.0.3.
|
|
15
|
+
activesupport (6.0.3.4)
|
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
17
17
|
i18n (>= 0.7, < 2)
|
|
18
18
|
minitest (~> 5.1)
|
|
@@ -35,8 +35,9 @@ GEM
|
|
|
35
35
|
diff-lcs (1.3)
|
|
36
36
|
docile (1.3.2)
|
|
37
37
|
dotenv (2.7.5)
|
|
38
|
-
faraday (1.0
|
|
38
|
+
faraday (1.1.0)
|
|
39
39
|
multipart-post (>= 1.2, < 3)
|
|
40
|
+
ruby2_keywords
|
|
40
41
|
faraday_middleware (1.0.0)
|
|
41
42
|
faraday (~> 1.0)
|
|
42
43
|
hashdiff (1.0.1)
|
|
@@ -55,7 +56,7 @@ GEM
|
|
|
55
56
|
i18n (>= 0.6.4, <= 2)
|
|
56
57
|
multi_json (1.15.0)
|
|
57
58
|
multipart-post (2.1.1)
|
|
58
|
-
optimum (1.
|
|
59
|
+
optimum (1.1.0)
|
|
59
60
|
addressable
|
|
60
61
|
faraday
|
|
61
62
|
faraday_middleware
|
|
@@ -64,7 +65,7 @@ GEM
|
|
|
64
65
|
parallel (1.19.1)
|
|
65
66
|
parser (2.7.0.5)
|
|
66
67
|
ast (~> 2.4.0)
|
|
67
|
-
phonelib (0.6.
|
|
68
|
+
phonelib (0.6.46)
|
|
68
69
|
pry (0.13.0)
|
|
69
70
|
coderay (~> 1.1)
|
|
70
71
|
method_source (~> 1.0)
|
|
@@ -97,6 +98,7 @@ GEM
|
|
|
97
98
|
ruby-progressbar (~> 1.7)
|
|
98
99
|
unicode-display_width (>= 1.4.0, < 1.7)
|
|
99
100
|
ruby-progressbar (1.10.1)
|
|
101
|
+
ruby2_keywords (0.0.2)
|
|
100
102
|
safe_yaml (1.0.5)
|
|
101
103
|
simplecov (0.18.5)
|
|
102
104
|
docile (~> 1.1)
|
|
@@ -110,7 +112,7 @@ GEM
|
|
|
110
112
|
addressable (>= 2.3.6)
|
|
111
113
|
crack (>= 0.3.2)
|
|
112
114
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
113
|
-
zeitwerk (2.4.
|
|
115
|
+
zeitwerk (2.4.1)
|
|
114
116
|
|
|
115
117
|
PLATFORMS
|
|
116
118
|
ruby
|
|
@@ -13,11 +13,6 @@ module InstantQuote
|
|
|
13
13
|
type: 'date',
|
|
14
14
|
required: true
|
|
15
15
|
},
|
|
16
|
-
{
|
|
17
|
-
name: 'business_landline',
|
|
18
|
-
label: 'Business landline',
|
|
19
|
-
required: true
|
|
20
|
-
},
|
|
21
16
|
{
|
|
22
17
|
name: 'applicant_phone_number',
|
|
23
18
|
label: 'Applicant mobile phone',
|
|
@@ -37,6 +32,38 @@ module InstantQuote
|
|
|
37
32
|
required: true,
|
|
38
33
|
if: ->(app) { app.borrower_organisation.sole_trader? }
|
|
39
34
|
},
|
|
35
|
+
{
|
|
36
|
+
name: 'turnover_percentage_after_feb_2020',
|
|
37
|
+
label: 'What is your current turnover as a percentage of your turnover prior to February 2020?',
|
|
38
|
+
required: true,
|
|
39
|
+
choices: [
|
|
40
|
+
'My turnover had increased since covid',
|
|
41
|
+
'My turnover is about the same as it was pre-covid (within 20%)',
|
|
42
|
+
'My turnover has fallen materially as a result of covid (20%-60% reduction in turnover)',
|
|
43
|
+
'My turnover has fallen significantly as a result of covid (more than a 60% reduction in turnover)'
|
|
44
|
+
],
|
|
45
|
+
type: 'select'
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'preferred_monthly_repayment_option',
|
|
49
|
+
label: 'How do you want to set up your direct debit for monthly repayment?',
|
|
50
|
+
required: true,
|
|
51
|
+
choices: [
|
|
52
|
+
'Minimum Amount (10% of balance)',
|
|
53
|
+
'Full Balance'
|
|
54
|
+
],
|
|
55
|
+
type: 'select'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'send_cash_from_credit_facility_to_bank',
|
|
59
|
+
label: 'Do you require the ability to send cash from your credit facility to your bank?',
|
|
60
|
+
required: true,
|
|
61
|
+
choices: {
|
|
62
|
+
'Yes' => 'True',
|
|
63
|
+
'No' => 'False'
|
|
64
|
+
},
|
|
65
|
+
type: 'select'
|
|
66
|
+
},
|
|
40
67
|
{
|
|
41
68
|
name: 'applicant_consent',
|
|
42
69
|
label: 'Yes, I give my consent for my data to be shared',
|
|
@@ -57,17 +84,17 @@ module InstantQuote
|
|
|
57
84
|
|
|
58
85
|
# Get the status for a given application ID
|
|
59
86
|
# {:applicationStatus=>
|
|
60
|
-
# {:locatorId=>
|
|
61
|
-
# :applicationStage=>
|
|
87
|
+
# {:locatorId=>'B247T62',
|
|
88
|
+
# :applicationStage=>'AppSubmitted',
|
|
62
89
|
# :creditDecision=>
|
|
63
|
-
# {:status=>
|
|
90
|
+
# {:status=>'Pending',
|
|
64
91
|
# :starRating=>0.0,
|
|
65
92
|
# :approvalAmount=>0.0,
|
|
66
93
|
# :monthlyInterestRate=>0.0,
|
|
67
94
|
# :monthlyCardInterestRate=>0.0,
|
|
68
|
-
# :decisionDate=>
|
|
69
|
-
# :creditDecisionReason=>
|
|
70
|
-
# :links=>{:self=>
|
|
95
|
+
# :decisionDate=>'2020-01-28T01:44:29.241',
|
|
96
|
+
# :creditDecisionReason=>'None'}},
|
|
97
|
+
# :links=>{:self=>'/api/v1/Applications/B247T62', :parent=>nil},
|
|
71
98
|
# :metaData=>{}
|
|
72
99
|
# }
|
|
73
100
|
def get_status(application_id)
|
|
@@ -30,57 +30,57 @@ module InstantQuote
|
|
|
30
30
|
required: true,
|
|
31
31
|
type: 'select',
|
|
32
32
|
choices: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
33
|
+
'Advertising / Marketing',
|
|
34
|
+
'Beer / Wine Merchant',
|
|
35
|
+
'Builders Merchant',
|
|
36
|
+
'Clothing & Fashion',
|
|
37
|
+
'Computer Hardware',
|
|
38
|
+
'Computer Software',
|
|
39
|
+
'Construction',
|
|
40
|
+
'Consultancy',
|
|
41
|
+
'Contract Cleaning',
|
|
42
|
+
'Courier',
|
|
43
|
+
'Distribution',
|
|
44
|
+
'Driving Agency',
|
|
45
|
+
'Electrical Contracting',
|
|
46
|
+
'Electrical Wholesaler',
|
|
47
|
+
'Engineering - Heavy',
|
|
48
|
+
'Engineering - Light',
|
|
49
|
+
'Engineering - Precision',
|
|
50
|
+
'Fabrication',
|
|
51
|
+
'Flooring Contractor',
|
|
52
|
+
'Food Manufacture',
|
|
53
|
+
'Franchise',
|
|
54
|
+
'Free Newspaper',
|
|
55
|
+
'Freight Forwarding',
|
|
56
|
+
'Fruit Importer',
|
|
57
|
+
'Furniture Manufacture',
|
|
58
|
+
'Garden Equipment',
|
|
59
|
+
'Haulage',
|
|
60
|
+
'IT Contracting',
|
|
61
|
+
'Jewellery',
|
|
62
|
+
'Maintenance',
|
|
63
|
+
'Manufacturing',
|
|
64
|
+
'Meat Trade',
|
|
65
|
+
'Other Services',
|
|
66
|
+
'Permanent Recruitment',
|
|
67
|
+
'Plant Hire',
|
|
68
|
+
'Plastic Injection Moulding',
|
|
69
|
+
'Plumbers Merchant',
|
|
70
|
+
'Printing',
|
|
71
|
+
'Publishing',
|
|
72
|
+
'Recycling',
|
|
73
|
+
'Security Guards',
|
|
74
|
+
'Shopfitting',
|
|
75
|
+
'Stationery',
|
|
76
|
+
'Steel Stockholding',
|
|
77
|
+
'Telecoms',
|
|
78
|
+
'Temporary Recruitment',
|
|
79
|
+
'Timber Merchant',
|
|
80
|
+
'Tooling Manufacture',
|
|
81
|
+
'Toys & Fancy Goods',
|
|
82
|
+
'Warehousing & Storage',
|
|
83
|
+
'Wholesale'
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
{
|
|
@@ -88,8 +88,8 @@ module InstantQuote
|
|
|
88
88
|
label: 'Do you require credit control?',
|
|
89
89
|
required: false,
|
|
90
90
|
choices: {
|
|
91
|
-
'
|
|
92
|
-
'
|
|
91
|
+
'Yes' => '1',
|
|
92
|
+
'No' => '0'
|
|
93
93
|
},
|
|
94
94
|
type: 'radio'
|
|
95
95
|
},
|
|
@@ -19,12 +19,13 @@ module InstantQuote
|
|
|
19
19
|
PersonalAddress: translate_address,
|
|
20
20
|
TradingName: app_org.name,
|
|
21
21
|
BusinessLegalName: app_org.name,
|
|
22
|
-
BusinessLandline: format_phone(extra_info['
|
|
22
|
+
BusinessLandline: format_phone(extra_info['applicant_phone_number']),
|
|
23
23
|
YearsTrading: app_org.years_in_business,
|
|
24
24
|
MonthlyTurnOver: translate_turnover,
|
|
25
25
|
BusinessType: translate_business_type,
|
|
26
26
|
BusinessAddress: translate_address,
|
|
27
|
-
RegistrationNumber: app_org.company_number
|
|
27
|
+
RegistrationNumber: app_org.company_number,
|
|
28
|
+
additionalQuestions: additional_questions
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
# If the borrower organisation is Sole Trader we need to merge two additional fields.
|
|
@@ -71,7 +72,7 @@ module InstantQuote
|
|
|
71
72
|
}
|
|
72
73
|
end
|
|
73
74
|
|
|
74
|
-
# Since in Finpoint the user selects an intervel (i.e.
|
|
75
|
+
# Since in Finpoint the user selects an intervel (i.e. '500,000 - 999,999'). We get the avg
|
|
75
76
|
# on this interval and use that number as the monthly turnover.
|
|
76
77
|
def translate_turnover
|
|
77
78
|
turnover = app_org.turnover_range
|
|
@@ -93,6 +94,34 @@ module InstantQuote
|
|
|
93
94
|
'Partnership'
|
|
94
95
|
end
|
|
95
96
|
end
|
|
97
|
+
|
|
98
|
+
def additional_questions
|
|
99
|
+
[
|
|
100
|
+
preferred_monthly_repayment_option_question,
|
|
101
|
+
turnover_percentage_question,
|
|
102
|
+
send_cash_from_credit_facility_to_bank_question
|
|
103
|
+
]
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def preferred_monthly_repayment_option_question
|
|
107
|
+
question_from_extra_info('preferred_monthly_repayment_option', '17')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def turnover_percentage_question
|
|
111
|
+
question_from_extra_info('turnover_percentage_after_feb_2020', '20')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def send_cash_from_credit_facility_to_bank_question
|
|
115
|
+
question_from_extra_info('send_cash_from_credit_facility_to_bank', '23')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def question_from_extra_info(name, question_type)
|
|
119
|
+
field = Adapters::CapitalOnTap.additional_fields.find do |f|
|
|
120
|
+
f[:name] == name
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
{ question: field[:label], answer: extra_info[field[:name]], questionType: question_type }
|
|
124
|
+
end
|
|
96
125
|
end
|
|
97
126
|
end
|
|
98
127
|
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.2
|
|
4
|
+
version: 1.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- rikas
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-11-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -249,7 +249,7 @@ homepage: https://finpoint.co.uk
|
|
|
249
249
|
licenses: []
|
|
250
250
|
metadata:
|
|
251
251
|
homepage_uri: https://finpoint.co.uk
|
|
252
|
-
post_install_message:
|
|
252
|
+
post_install_message:
|
|
253
253
|
rdoc_options: []
|
|
254
254
|
require_paths:
|
|
255
255
|
- lib
|
|
@@ -265,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
265
265
|
version: '0'
|
|
266
266
|
requirements: []
|
|
267
267
|
rubygems_version: 3.0.3
|
|
268
|
-
signing_key:
|
|
268
|
+
signing_key:
|
|
269
269
|
specification_version: 4
|
|
270
270
|
summary: Instant quote providers gem.
|
|
271
271
|
test_files: []
|