instant_quote 1.6.3 → 1.7.0
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: 8db818dd852db347c9e654ed2b793a4e4b8674f94064c3319698fb71a969027b
|
4
|
+
data.tar.gz: f07a944bffca0e76a445adb2527d1ce74d159cd64c758c0ad8f091525c7724c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2252d3dd9d5be7b52c4866c4fd19cca78d504c54219cd116ad4f35aa642705fe78de677cbfbdfe42a84ee76ed74d3835aea4f41643b81b5b026fad8c35673c68
|
7
|
+
data.tar.gz: ef828f5ac596f3ccd9a8d2da53b4ff0ce078d7a4b46605968c0e8419451e79fd3af4c5371433bab70ff8a32678fbe5da070244b67f5839cfa4aa79bfe2d1fed8
|
data/Gemfile.lock
CHANGED
@@ -23,41 +23,41 @@ module InstantQuote
|
|
23
23
|
new.get_link(connection)
|
24
24
|
end
|
25
25
|
|
26
|
-
def self.get_quote(params, connection
|
26
|
+
def self.get_quote(params, connection)
|
27
27
|
new.get_quote(params, connection)
|
28
28
|
end
|
29
29
|
|
30
|
-
def self.get_status(application_id, connection
|
30
|
+
def self.get_status(application_id, connection)
|
31
31
|
new.get_status(application_id, connection)
|
32
32
|
end
|
33
33
|
|
34
|
-
def self.get_preapproval(params, connection
|
34
|
+
def self.get_preapproval(params, connection)
|
35
35
|
new.get_preapproval(params, connection)
|
36
36
|
end
|
37
37
|
|
38
|
-
def self.get_approval(application_id, connection
|
38
|
+
def self.get_approval(application_id, connection)
|
39
39
|
new.get_approval(application_id, connection)
|
40
40
|
end
|
41
41
|
|
42
|
-
def get_link(_application_id, _connection
|
42
|
+
def get_link(_application_id, _connection)
|
43
43
|
raise NotImplementedError, "You must implement '#{self.class.name}#get_link'"
|
44
44
|
end
|
45
45
|
|
46
|
-
def get_quote(_params, _connection
|
46
|
+
def get_quote(_params, _connection)
|
47
47
|
raise NotImplementedError, "You must implement '#{self.class.name}#get_quote'"
|
48
48
|
end
|
49
49
|
|
50
|
-
def get_status(_application_id, _connection
|
50
|
+
def get_status(_application_id, _connection)
|
51
51
|
raise NotImplementedError, "You must implement '#{self.class.name}#get_status'"
|
52
52
|
end
|
53
53
|
|
54
54
|
# Default for pre approval will be true, override it in the adapter class if needed.
|
55
|
-
def get_preapproval(_params, _connection
|
55
|
+
def get_preapproval(_params, _connection)
|
56
56
|
true
|
57
57
|
end
|
58
58
|
|
59
59
|
# Default for approval will be true, override it in the adapter class if needed.
|
60
|
-
def get_approval(_application_id, _connection
|
60
|
+
def get_approval(_application_id, _connection)
|
61
61
|
true
|
62
62
|
end
|
63
63
|
end
|
@@ -70,7 +70,7 @@ module InstantQuote
|
|
70
70
|
# rubocop:enable Layout/LineLength
|
71
71
|
|
72
72
|
# Creates the quote with the information from instant connection
|
73
|
-
def get_quote(params)
|
73
|
+
def get_quote(params, _connection)
|
74
74
|
response = ::CapitalOnTap::Application.create(params)
|
75
75
|
|
76
76
|
# CoT responses can be 200 OK but still have an error!
|
@@ -94,7 +94,7 @@ module InstantQuote
|
|
94
94
|
# :links=>{:self=>'/api/v1/Applications/B247T62', :parent=>nil},
|
95
95
|
# :metaData=>{}
|
96
96
|
# }
|
97
|
-
def get_status(application_id)
|
97
|
+
def get_status(application_id, _connection)
|
98
98
|
response = ::CapitalOnTap::Application.status(application_id)
|
99
99
|
|
100
100
|
raise_error(response) unless response.success?
|
@@ -58,7 +58,7 @@ module InstantQuote
|
|
58
58
|
]
|
59
59
|
|
60
60
|
# Creates the iwoca customer and returns the state key from the response.
|
61
|
-
def get_quote(params)
|
61
|
+
def get_quote(params, _connection)
|
62
62
|
response = ::Iwoca::Quote.create_customer(params)
|
63
63
|
|
64
64
|
return response.data[:state_key] if response.success?
|
@@ -67,7 +67,7 @@ module InstantQuote
|
|
67
67
|
end
|
68
68
|
|
69
69
|
# Get the current status for the created customer.
|
70
|
-
def get_status(state_key)
|
70
|
+
def get_status(state_key, _connection)
|
71
71
|
response = ::Iwoca::Quote.credit_facility_status(state_key)
|
72
72
|
|
73
73
|
raise_error(response) unless response.success?
|
@@ -86,7 +86,7 @@ module InstantQuote
|
|
86
86
|
raise_error(response)
|
87
87
|
end
|
88
88
|
|
89
|
-
def get_approval(state_key)
|
89
|
+
def get_approval(state_key, _connection)
|
90
90
|
response = ::Iwoca::Quote.approval(state_key)
|
91
91
|
response.success?
|
92
92
|
end
|
@@ -96,7 +96,7 @@ module InstantQuote
|
|
96
96
|
}
|
97
97
|
]
|
98
98
|
|
99
|
-
def get_quote(params)
|
99
|
+
def get_quote(params, _connection)
|
100
100
|
response = ::Optimum::Decision.create(params)
|
101
101
|
|
102
102
|
return response.data[:opportunityId] if response.success?
|
@@ -104,7 +104,7 @@ module InstantQuote
|
|
104
104
|
raise_error(response)
|
105
105
|
end
|
106
106
|
|
107
|
-
def get_status(application_id)
|
107
|
+
def get_status(application_id, _connection)
|
108
108
|
response = ::Optimum::Decision.update(application_id)
|
109
109
|
|
110
110
|
raise_error(response) unless response.success?
|