instant_quote 1.7.7 → 1.7.12
Sign up to get free protection for your applications and to get access to all the features.
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
|
@@ -13,7 +13,7 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activesupport (6.1.3.
|
16
|
+
activesupport (6.1.3.2)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (>= 1.6, < 2)
|
19
19
|
minitest (>= 5.1)
|
@@ -30,17 +30,25 @@ 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.
|
39
|
+
faraday (1.4.2)
|
40
|
+
faraday-em_http (~> 1.0)
|
41
|
+
faraday-em_synchrony (~> 1.0)
|
42
|
+
faraday-excon (~> 1.1)
|
40
43
|
faraday-net_http (~> 1.0)
|
44
|
+
faraday-net_http_persistent (~> 1.1)
|
41
45
|
multipart-post (>= 1.2, < 3)
|
42
|
-
ruby2_keywords
|
46
|
+
ruby2_keywords (>= 0.0.4)
|
47
|
+
faraday-em_http (1.0.0)
|
48
|
+
faraday-em_synchrony (1.0.0)
|
49
|
+
faraday-excon (1.1.0)
|
43
50
|
faraday-net_http (1.0.1)
|
51
|
+
faraday-net_http_persistent (1.1.0)
|
44
52
|
faraday_middleware (1.0.0)
|
45
53
|
faraday (~> 1.0)
|
46
54
|
hashdiff (1.0.1)
|
@@ -54,7 +62,7 @@ GEM
|
|
54
62
|
rainbow
|
55
63
|
method_source (1.0.0)
|
56
64
|
minitest (5.14.4)
|
57
|
-
money (6.
|
65
|
+
money (6.16.0)
|
58
66
|
i18n (>= 0.6.4, <= 2)
|
59
67
|
multi_json (1.15.0)
|
60
68
|
multipart-post (2.1.1)
|
@@ -67,7 +75,7 @@ GEM
|
|
67
75
|
parallel (1.20.1)
|
68
76
|
parser (3.0.0.0)
|
69
77
|
ast (~> 2.4.1)
|
70
|
-
phonelib (0.6.
|
78
|
+
phonelib (0.6.50)
|
71
79
|
pry (0.13.1)
|
72
80
|
coderay (~> 1.1)
|
73
81
|
method_source (~> 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)
|
@@ -11,7 +11,8 @@ module InstantQuote
|
|
11
11
|
name: 'monthly_card_revenue',
|
12
12
|
label: 'Avg. monthly card revenue',
|
13
13
|
required: true,
|
14
|
-
type: 'money'
|
14
|
+
type: 'money',
|
15
|
+
minimum: 1_000
|
15
16
|
},
|
16
17
|
{
|
17
18
|
name: 'monthly_revenue_from_invoices',
|
@@ -75,7 +76,7 @@ module InstantQuote
|
|
75
76
|
raise ApiError.new(
|
76
77
|
adapter: 'youlend',
|
77
78
|
data: response.body,
|
78
|
-
error: response.
|
79
|
+
error: response.errors.first || '[Youlend] API error'
|
79
80
|
)
|
80
81
|
end
|
81
82
|
end
|
@@ -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:
|
@@ -26,6 +28,8 @@ module InstantQuote
|
|
26
28
|
end
|
27
29
|
|
28
30
|
def sweep
|
31
|
+
return '-' unless approved?
|
32
|
+
|
29
33
|
funded_option[:sweep]
|
30
34
|
end
|
31
35
|
|
@@ -34,19 +38,19 @@ module InstantQuote
|
|
34
38
|
end
|
35
39
|
|
36
40
|
def fee
|
37
|
-
fee = funded_option[:fee].to_f
|
41
|
+
fee = funded_option[:fee].to_f || 0
|
38
42
|
|
39
43
|
Money.new(fee * 100).format
|
40
44
|
end
|
41
45
|
|
42
46
|
def loan_amount
|
43
|
-
amount = funded_option[:loanAmount].to_f
|
47
|
+
amount = funded_option[:loanAmount].to_f || 0
|
44
48
|
|
45
49
|
Money.new(amount * 100).format
|
46
50
|
end
|
47
51
|
|
48
52
|
def funded_amount
|
49
|
-
amount = funded_option[:fundedAmount].to_f
|
53
|
+
amount = funded_option[:fundedAmount].to_f || 0
|
50
54
|
|
51
55
|
Money.new(amount * 100).format
|
52
56
|
end
|
@@ -62,11 +66,11 @@ module InstantQuote
|
|
62
66
|
end
|
63
67
|
|
64
68
|
def status_hash
|
65
|
-
default = { loanOptions: [] }
|
69
|
+
default = ActiveSupport::HashWithIndifferentAccess.new({ loanOptions: [] })
|
66
70
|
|
67
|
-
return default unless data && !data.empty?
|
71
|
+
return default unless data && !data.empty? && !data[:error]
|
68
72
|
|
69
|
-
data
|
73
|
+
default.merge(data)
|
70
74
|
end
|
71
75
|
end
|
72
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
|