instant_quote 1.7.2 → 1.7.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/instant_quote/decision_parsers/youlend.rb +15 -3
- 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: f9a1202f635271c79343dd62421fb3b5e25c070fb6c9946e4a6b576a7924edc3
|
|
4
|
+
data.tar.gz: 39d9952984651ed93a4fed738be8bafbebe0529a3c271eaa349a8c744eae30de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a637cffbc3e704ea920c76bc8ef4a0beccfde26dee3380537f4e19aee9df8c385e90db683d950f1e82751622a13e6bb98eb742614299e9a6e6f8ae079b694aae
|
|
7
|
+
data.tar.gz: 6db6c7751b03f95e2ff1045e5cf8c309490d9d169fd472cb665b6a549659b19e4f59e1981f8ff1be2469b67108698ec240ff1241db977cd02ed8c59daa15063d
|
data/Gemfile.lock
CHANGED
|
@@ -18,18 +18,24 @@ module InstantQuote
|
|
|
18
18
|
# }
|
|
19
19
|
class Youlend < DecisionParser
|
|
20
20
|
def approved?
|
|
21
|
-
status_hash[:loanOptions].any?
|
|
21
|
+
status_hash[:loanOptions].any? && first_option
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def declined?
|
|
25
|
-
|
|
25
|
+
!approved?
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def sweep
|
|
29
29
|
first_option[:sweep]
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
def status
|
|
33
|
+
approved? ? 'approved' : 'declined'
|
|
34
|
+
end
|
|
35
|
+
|
|
32
36
|
def fee
|
|
37
|
+
return 0.0 unless first_option
|
|
38
|
+
|
|
33
39
|
fee = first_option[:fee].to_f
|
|
34
40
|
|
|
35
41
|
Money.new(fee * 100).format
|
|
@@ -47,6 +53,8 @@ module InstantQuote
|
|
|
47
53
|
Money.new(amount * 100).format
|
|
48
54
|
end
|
|
49
55
|
|
|
56
|
+
alias amount funded_amount
|
|
57
|
+
|
|
50
58
|
private
|
|
51
59
|
|
|
52
60
|
def first_option
|
|
@@ -54,7 +62,11 @@ module InstantQuote
|
|
|
54
62
|
end
|
|
55
63
|
|
|
56
64
|
def status_hash
|
|
57
|
-
|
|
65
|
+
default = { loanOptions: [] }
|
|
66
|
+
|
|
67
|
+
return default unless data && !data.empty?
|
|
68
|
+
|
|
69
|
+
data
|
|
58
70
|
end
|
|
59
71
|
end
|
|
60
72
|
end
|