instant_quote 1.7.25 → 1.7.26
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/instant_quote/connection_translators/iwoca.rb +33 -1
- data/lib/instant_quote/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ec6c6b54ad7fcbae1c051dbcbbedcca488e333be4cc43d8e1fa9ae59e922718
|
|
4
|
+
data.tar.gz: 67d0eb7cfe1010ef0453a3432600c9d1fae69c9c2e415883cc3d4a3feeae9d8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53b0606d174db814c57a5807b7dc6dccbf6a2db024b7e13e430eb4d1dea25f02a334b10a4b5b29cbcd23a881453ea73f794d9ff68c1ab558cf417516a96f4743
|
|
7
|
+
data.tar.gz: 4501ff4205734159be5c0007b2b6eb78067f89caabcda9d777c4ca4817e988ea4b9e91c00284676777b64d7616d4f10875f35454a0a8be5af24dbc7cb7d70bfb
|
data/Gemfile.lock
CHANGED
|
@@ -11,7 +11,7 @@ module InstantQuote
|
|
|
11
11
|
requests: [
|
|
12
12
|
amount: application.amount_pennies / 100,
|
|
13
13
|
duration: { amount: 12, unit: 'months' },
|
|
14
|
-
purpose:
|
|
14
|
+
purpose: proceeds_purpose,
|
|
15
15
|
product_type: product_name,
|
|
16
16
|
urgency: 'asap'
|
|
17
17
|
]
|
|
@@ -21,6 +21,38 @@ module InstantQuote
|
|
|
21
21
|
|
|
22
22
|
private
|
|
23
23
|
|
|
24
|
+
# Maps the proceeds purpose to a valid value for iwoca.
|
|
25
|
+
# Possible iwoca values:
|
|
26
|
+
# - stock_purchase
|
|
27
|
+
# - bridging_loan
|
|
28
|
+
# - marketing
|
|
29
|
+
# - equipment_purchase
|
|
30
|
+
# - pay_bill
|
|
31
|
+
# - pay_staff
|
|
32
|
+
# - refinancing_debt
|
|
33
|
+
# - financing_client_order
|
|
34
|
+
# - pay_tax_bill
|
|
35
|
+
# - other
|
|
36
|
+
# - null
|
|
37
|
+
# - recovery_loan_working_capital
|
|
38
|
+
# - recovery_loan_expansion_or_growth
|
|
39
|
+
# - recovery_loan_replacing_external_finance
|
|
40
|
+
#
|
|
41
|
+
# TODO: There are a lot of proceeds purposes that we don't have a mapping for.
|
|
42
|
+
def proceeds_purpose
|
|
43
|
+
purpose = application.proceeds_purpose&.overview&.name
|
|
44
|
+
case purpose
|
|
45
|
+
when 'Invest in equipment or machinery'
|
|
46
|
+
'equipment_purchase'
|
|
47
|
+
when 'Refinance an existing loan'
|
|
48
|
+
'refinancing_debt'
|
|
49
|
+
when 'Buy or refinance vehicle(s)'
|
|
50
|
+
'equipment_purchase'
|
|
51
|
+
else
|
|
52
|
+
'other'
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
24
56
|
def product_name
|
|
25
57
|
case connection.adapter
|
|
26
58
|
when 'iwoca'
|