instant_quote 1.1.7 → 1.1.8
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/.ruby-version +1 -1
- data/Gemfile.lock +10 -10
- data/lib/instant_quote/adapter_finder.rb +11 -8
- data/lib/instant_quote/adapters/iwoca.rb +5 -1
- data/lib/instant_quote/adapters/iwoca_cbils.rb +19 -0
- data/lib/instant_quote/connection_translators/iwoca.rb +5 -1
- data/lib/instant_quote/connection_translators/iwoca_cbils.rb +15 -0
- data/lib/instant_quote/decision_parsers/iwoca_cbils.rb +10 -0
- data/lib/instant_quote/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c7f021aa42714cc517f85e9828e2c34a20ba4044c4f024570338117218e68c3
|
|
4
|
+
data.tar.gz: ba11fe1ed79bd940c613587f85481583885dd8311dd021a5cb83e3c7d9178281
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78426747755312c4618ebc70b42b51f19435b04bbc26d2385881b82a3b9113d26d6fa13af7ad97dcdb83540a20bc0a6113d854a469c501029edbd34a5c4d9c33
|
|
7
|
+
data.tar.gz: 76448f87df25db208b0d5c25d7e68df33f0c6c78ff7fcf58fa5cd041b50d21ae378ba5b328023155c5c95609412d4bfec98b352be79576f735f393b101626b20
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.6.
|
|
1
|
+
2.6.6
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
instant_quote (1.1.
|
|
4
|
+
instant_quote (1.1.8)
|
|
5
5
|
activesupport
|
|
6
6
|
capital_on_tap
|
|
7
7
|
iwoca
|
|
@@ -11,12 +11,12 @@ PATH
|
|
|
11
11
|
GEM
|
|
12
12
|
remote: https://rubygems.org/
|
|
13
13
|
specs:
|
|
14
|
-
activesupport (6.0.
|
|
14
|
+
activesupport (6.0.3.2)
|
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
16
16
|
i18n (>= 0.7, < 2)
|
|
17
17
|
minitest (~> 5.1)
|
|
18
18
|
tzinfo (~> 1.1)
|
|
19
|
-
zeitwerk (~> 2.2)
|
|
19
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
20
20
|
addressable (2.7.0)
|
|
21
21
|
public_suffix (>= 2.0.2, < 5.0)
|
|
22
22
|
ast (2.4.0)
|
|
@@ -39,7 +39,7 @@ GEM
|
|
|
39
39
|
faraday_middleware (1.0.0)
|
|
40
40
|
faraday (~> 1.0)
|
|
41
41
|
hashdiff (1.0.1)
|
|
42
|
-
i18n (1.8.
|
|
42
|
+
i18n (1.8.5)
|
|
43
43
|
concurrent-ruby (~> 1.0)
|
|
44
44
|
iwoca (1.0.0)
|
|
45
45
|
addressable
|
|
@@ -49,15 +49,15 @@ GEM
|
|
|
49
49
|
rainbow
|
|
50
50
|
jaro_winkler (1.5.4)
|
|
51
51
|
method_source (1.0.0)
|
|
52
|
-
minitest (5.14.
|
|
53
|
-
money (6.13.
|
|
52
|
+
minitest (5.14.1)
|
|
53
|
+
money (6.13.8)
|
|
54
54
|
i18n (>= 0.6.4, <= 2)
|
|
55
|
-
multi_json (1.
|
|
55
|
+
multi_json (1.15.0)
|
|
56
56
|
multipart-post (2.1.1)
|
|
57
57
|
parallel (1.19.1)
|
|
58
58
|
parser (2.7.0.5)
|
|
59
59
|
ast (~> 2.4.0)
|
|
60
|
-
phonelib (0.6.
|
|
60
|
+
phonelib (0.6.44)
|
|
61
61
|
pry (0.13.0)
|
|
62
62
|
coderay (~> 1.1)
|
|
63
63
|
method_source (~> 1.0)
|
|
@@ -103,7 +103,7 @@ GEM
|
|
|
103
103
|
addressable (>= 2.3.6)
|
|
104
104
|
crack (>= 0.3.2)
|
|
105
105
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
106
|
-
zeitwerk (2.
|
|
106
|
+
zeitwerk (2.4.0)
|
|
107
107
|
|
|
108
108
|
PLATFORMS
|
|
109
109
|
ruby
|
|
@@ -120,4 +120,4 @@ DEPENDENCIES
|
|
|
120
120
|
webmock
|
|
121
121
|
|
|
122
122
|
BUNDLED WITH
|
|
123
|
-
2.
|
|
123
|
+
2.1.4
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# Require all the connection translators
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Dir.glob('*.rb', base: File.expand_path('connection_translators', __dir__)) do |translator|
|
|
5
|
+
require "instant_quote/connection_translators/#{translator}"
|
|
6
|
+
end
|
|
6
7
|
|
|
7
8
|
# Require all the decision parsers
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
Dir.glob('*.rb', base: File.expand_path('decision_parsers', __dir__)) do |parser|
|
|
10
|
+
require "instant_quote/decision_parsers/#{parser}"
|
|
11
|
+
end
|
|
10
12
|
|
|
11
13
|
# Require all the adapters
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
Dir.glob('*.rb', base: File.expand_path('adapters', __dir__)) do |adapter|
|
|
15
|
+
require "instant_quote/adapters/#{adapter}"
|
|
16
|
+
end
|
|
14
17
|
|
|
15
18
|
module InstantQuote
|
|
16
19
|
class AdapterFinder
|
|
@@ -28,8 +31,8 @@ module InstantQuote
|
|
|
28
31
|
end
|
|
29
32
|
|
|
30
33
|
def self.available_adapters
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
Dir.glob('*.rb', base: File.expand_path('adapters', __dir__))
|
|
35
|
+
.map { |adapter| adapter.sub('.rb', '') }
|
|
33
36
|
end
|
|
34
37
|
|
|
35
38
|
def get_link
|
|
@@ -77,7 +77,7 @@ module InstantQuote
|
|
|
77
77
|
|
|
78
78
|
raise_error(response) unless response.success?
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
decision_parser.new(response.body)
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
# Gets the URL for the given state key.
|
|
@@ -96,6 +96,10 @@ module InstantQuote
|
|
|
96
96
|
|
|
97
97
|
private
|
|
98
98
|
|
|
99
|
+
def decision_parser
|
|
100
|
+
DecisionParsers::Iwoca
|
|
101
|
+
end
|
|
102
|
+
|
|
99
103
|
def raise_error(response)
|
|
100
104
|
raise ApiError.new(
|
|
101
105
|
adapter: 'iwoca',
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'iwoca'
|
|
4
|
+
require 'instant_quote/adapters/iwoca'
|
|
5
|
+
require 'instant_quote/decision_parsers/iwoca_cbils'
|
|
6
|
+
|
|
7
|
+
module InstantQuote
|
|
8
|
+
module Adapters
|
|
9
|
+
class IwocaCbils < Iwoca
|
|
10
|
+
additional_fields Iwoca.additional_fields
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def decision_parser
|
|
15
|
+
DecisionParsers::IwocaCbils
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -10,7 +10,7 @@ module InstantQuote
|
|
|
10
10
|
company: company_information,
|
|
11
11
|
people: [person_information],
|
|
12
12
|
requested_products: {
|
|
13
|
-
|
|
13
|
+
product_name => {
|
|
14
14
|
approval: {
|
|
15
15
|
amount: (application.amount_pennies / 100),
|
|
16
16
|
duration: 12,
|
|
@@ -25,6 +25,10 @@ module InstantQuote
|
|
|
25
25
|
|
|
26
26
|
private
|
|
27
27
|
|
|
28
|
+
def product_name
|
|
29
|
+
:credit_facility
|
|
30
|
+
end
|
|
31
|
+
|
|
28
32
|
# rubocop:disable Metrics/AbcSize
|
|
29
33
|
def company_information
|
|
30
34
|
information = {
|
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.1.
|
|
4
|
+
version: 1.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- rikas
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-07
|
|
11
|
+
date: 2020-08-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -216,13 +216,16 @@ files:
|
|
|
216
216
|
- lib/instant_quote/adapter_finder.rb
|
|
217
217
|
- lib/instant_quote/adapters/capital_on_tap.rb
|
|
218
218
|
- lib/instant_quote/adapters/iwoca.rb
|
|
219
|
+
- lib/instant_quote/adapters/iwoca_cbils.rb
|
|
219
220
|
- lib/instant_quote/api_error.rb
|
|
220
221
|
- lib/instant_quote/connection_translator.rb
|
|
221
222
|
- lib/instant_quote/connection_translators/capital_on_tap.rb
|
|
222
223
|
- lib/instant_quote/connection_translators/iwoca.rb
|
|
224
|
+
- lib/instant_quote/connection_translators/iwoca_cbils.rb
|
|
223
225
|
- lib/instant_quote/decision_parser.rb
|
|
224
226
|
- lib/instant_quote/decision_parsers/capital_on_tap.rb
|
|
225
227
|
- lib/instant_quote/decision_parsers/iwoca.rb
|
|
228
|
+
- lib/instant_quote/decision_parsers/iwoca_cbils.rb
|
|
226
229
|
- lib/instant_quote/version.rb
|
|
227
230
|
- lib/instant_quote/webhooks/iwoca.rb
|
|
228
231
|
homepage: https://finpoint.co.uk
|