instant_quote 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/instant_quote/decision_parsers/youlend.rb +22 -4
- 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: c8a949bc8d63fd2ad95636f7a72ff7e8a9f801927eea13634681a20321abf0e5
|
4
|
+
data.tar.gz: 25822b27eabbe49c12a40dfd97b614c6d80d17c69ee83f48e0f20149264d4be8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c42945fc752a43165f1c010974b1489095be672cacf42580d0ce7693e7fd27d147060d376e343f40ddc6399771e84824edf206fef853dba168433053a21611a4
|
7
|
+
data.tar.gz: cb94c2781c903afe2ae45e61dd1180ffa739752a2c604f42c01dd81fe6bb111b3ccd43168f21e0968c8b0f803c6f078ade80fffa524d1aaed2365dfd6fcb3095
|
data/Gemfile.lock
CHANGED
@@ -25,16 +25,34 @@ module InstantQuote
|
|
25
25
|
status_hash[:loanOptions].empty?
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
|
28
|
+
def sweep
|
29
|
+
first_option[:fee]
|
30
|
+
end
|
30
31
|
|
31
|
-
|
32
|
+
def fee
|
33
|
+
fee = first_option[:fee].to_f
|
32
34
|
|
33
|
-
Money.new(
|
35
|
+
Money.new(fee * 100).format
|
36
|
+
end
|
37
|
+
|
38
|
+
def loan_amount
|
39
|
+
amount = first_option[:loanAmount].to_f
|
40
|
+
|
41
|
+
Money.new(amount * 100).format
|
42
|
+
end
|
43
|
+
|
44
|
+
def funded_amount
|
45
|
+
amount = first_option[:fundedAmount].to_f
|
46
|
+
|
47
|
+
Money.new(amount * 100).format
|
34
48
|
end
|
35
49
|
|
36
50
|
private
|
37
51
|
|
52
|
+
def first_option
|
53
|
+
@first_option ||= status_hash[:loanOptions].find { |opt| opt[:fundedAmount].positive? }
|
54
|
+
end
|
55
|
+
|
38
56
|
def status_hash
|
39
57
|
data.presence || { loanOptions: [] }
|
40
58
|
end
|