instant_quote 1.7.11 → 1.7.12
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: 88caccebb747d80f197829c25840cce9b4054997d369f40ab65289ed9a0c3087
|
|
4
|
+
data.tar.gz: fd170005234dee4fe283b54d11fda513266aa3e72fb887fbb1ff6abb01f162ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05db08e6e683a3a72a4a2956a39b6a12cc6b1da15fab7bf4b9e75af8ff40683790cee177139f30270b1eb51563a24f6c7ea3492e4c3484491285625a4823acf6
|
|
7
|
+
data.tar.gz: f2882bcbea35d55f7ebaf2523ec42f26d275c762e344ccb6adda3ac7410966acad8bc65f4333c62ecf3e0cf4b978a8ff35469364035666e7742247d8e8961930
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
instant_quote (1.7.
|
|
4
|
+
instant_quote (1.7.12)
|
|
5
5
|
activesupport
|
|
6
6
|
capital_on_tap
|
|
7
7
|
iwoca
|
|
@@ -30,18 +30,22 @@ GEM
|
|
|
30
30
|
multi_json
|
|
31
31
|
rainbow
|
|
32
32
|
coderay (1.1.3)
|
|
33
|
-
concurrent-ruby (1.1.
|
|
33
|
+
concurrent-ruby (1.1.9)
|
|
34
34
|
crack (0.4.5)
|
|
35
35
|
rexml
|
|
36
36
|
diff-lcs (1.4.4)
|
|
37
37
|
docile (1.3.5)
|
|
38
38
|
dotenv (2.7.6)
|
|
39
|
-
faraday (1.4.
|
|
39
|
+
faraday (1.4.2)
|
|
40
|
+
faraday-em_http (~> 1.0)
|
|
41
|
+
faraday-em_synchrony (~> 1.0)
|
|
40
42
|
faraday-excon (~> 1.1)
|
|
41
43
|
faraday-net_http (~> 1.0)
|
|
42
44
|
faraday-net_http_persistent (~> 1.1)
|
|
43
45
|
multipart-post (>= 1.2, < 3)
|
|
44
46
|
ruby2_keywords (>= 0.0.4)
|
|
47
|
+
faraday-em_http (1.0.0)
|
|
48
|
+
faraday-em_synchrony (1.0.0)
|
|
45
49
|
faraday-excon (1.1.0)
|
|
46
50
|
faraday-net_http (1.0.1)
|
|
47
51
|
faraday-net_http_persistent (1.1.0)
|
|
@@ -6,7 +6,6 @@ require 'instant_quote/decision_parsers/capital_on_tap'
|
|
|
6
6
|
module InstantQuote
|
|
7
7
|
module Adapters
|
|
8
8
|
class CapitalOnTap < Adapter
|
|
9
|
-
# rubocop:disable Layout/LineLength
|
|
10
9
|
additional_fields [
|
|
11
10
|
{
|
|
12
11
|
name: 'date_of_birth',
|
|
@@ -55,7 +54,6 @@ module InstantQuote
|
|
|
55
54
|
type: 'checkbox'
|
|
56
55
|
}
|
|
57
56
|
]
|
|
58
|
-
# rubocop:enable Layout/LineLength
|
|
59
57
|
|
|
60
58
|
# Creates the quote with the information from instant connection
|
|
61
59
|
def get_quote(params, _connection)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'active_support/core_ext/hash/indifferent_access'
|
|
4
|
+
|
|
3
5
|
module InstantQuote
|
|
4
6
|
module DecisionParsers
|
|
5
7
|
# Example response:
|
|
@@ -18,8 +20,6 @@ module InstantQuote
|
|
|
18
20
|
# }
|
|
19
21
|
class Youlend < DecisionParser
|
|
20
22
|
def approved?
|
|
21
|
-
return false unless status_hash[:loanOptions]
|
|
22
|
-
|
|
23
23
|
status_hash[:loanOptions].any? && !funded_option.empty?
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -28,6 +28,8 @@ module InstantQuote
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def sweep
|
|
31
|
+
return '-' unless approved?
|
|
32
|
+
|
|
31
33
|
funded_option[:sweep]
|
|
32
34
|
end
|
|
33
35
|
|
|
@@ -36,19 +38,19 @@ module InstantQuote
|
|
|
36
38
|
end
|
|
37
39
|
|
|
38
40
|
def fee
|
|
39
|
-
fee = funded_option[:fee].to_f
|
|
41
|
+
fee = funded_option[:fee].to_f || 0
|
|
40
42
|
|
|
41
43
|
Money.new(fee * 100).format
|
|
42
44
|
end
|
|
43
45
|
|
|
44
46
|
def loan_amount
|
|
45
|
-
amount = funded_option[:loanAmount].to_f
|
|
47
|
+
amount = funded_option[:loanAmount].to_f || 0
|
|
46
48
|
|
|
47
49
|
Money.new(amount * 100).format
|
|
48
50
|
end
|
|
49
51
|
|
|
50
52
|
def funded_amount
|
|
51
|
-
amount = funded_option[:fundedAmount].to_f
|
|
53
|
+
amount = funded_option[:fundedAmount].to_f || 0
|
|
52
54
|
|
|
53
55
|
Money.new(amount * 100).format
|
|
54
56
|
end
|
|
@@ -64,11 +66,11 @@ module InstantQuote
|
|
|
64
66
|
end
|
|
65
67
|
|
|
66
68
|
def status_hash
|
|
67
|
-
default = { loanOptions: [] }
|
|
69
|
+
default = ActiveSupport::HashWithIndifferentAccess.new({ loanOptions: [] })
|
|
68
70
|
|
|
69
71
|
return default unless data && !data.empty? && !data[:error]
|
|
70
72
|
|
|
71
|
-
data
|
|
73
|
+
default.merge(data)
|
|
72
74
|
end
|
|
73
75
|
end
|
|
74
76
|
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.7.
|
|
4
|
+
version: 1.7.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- rikas
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|