iwoca 0.1.1 → 1.0.0
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/README.md +34 -2
- data/lib/iwoca/customer_generator.rb +1 -1
- data/lib/iwoca/version.rb +1 -1
- data/vcr_cassettes/credit_facility_status_approved.yml +76 -0
- data/vcr_cassettes/credit_facility_status_declined.yml +73 -0
- data/vcr_cassettes/credit_facility_status_no_decision_possible.yml +73 -0
- 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: dc06c9b15b3cf293d246f1cce76c9dada20bb1b0b5185fa3375e6b12a1e096fc
|
4
|
+
data.tar.gz: e5de537071c70452a658693a671f8335fb983e8a908a27433f935b9ec5306242
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc29294dd0453a1785c521e276fafc7de7fc91f8d53a7fe43bbe776f576094a8f0fa283f232938a7f986dcc404e598d6c98ebae2e57180a1eebab0adf3665643
|
7
|
+
data.tar.gz: a77cf2fb8cd03df9977d62831f9ce1766fd6d3d9342aba8343873a20911f1a27cae2772643742df0f14abee09d8a03f88e0818ba7cfa4d63de4d98455a04e3d2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -67,6 +67,38 @@ response.data #=> { login_link: 'http://login_link' }
|
|
67
67
|
|
68
68
|
## Development
|
69
69
|
|
70
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run
|
70
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run
|
71
|
+
the tests. You can also run `bin/console` for an interactive prompt that will allow you to
|
72
|
+
experiment.
|
71
73
|
|
72
|
-
|
74
|
+
Please refer to iwoca's documentation on how to test different states (we do have recorded VCR
|
75
|
+
responses, but if something changes on their side we need to update). The documentation is here:
|
76
|
+
https://developer.iwoca.co.uk/lending-api-v1/testing-your-integration/core-test-data.
|
77
|
+
|
78
|
+
In `spec/data` we have the stored customer data that will return a 'approved' state. Use this to
|
79
|
+
generate valid state keys and follow their instructions to generate the other states.
|
80
|
+
|
81
|
+
### Webhook
|
82
|
+
|
83
|
+
Iwoca webhook will target this address:
|
84
|
+
https://dev-finpointdev.pagekite.me/fast_lender_webhooks/iwoca_event
|
85
|
+
|
86
|
+
How to install:
|
87
|
+
|
88
|
+
$ curl -O https://pagekite.net/pk/pagekite.py
|
89
|
+
$ chmod +x pagekite.py
|
90
|
+
$ sudo mv -f pagekite.py /usr/local/bin (replace with the name of your directory)
|
91
|
+
|
92
|
+
How to run:
|
93
|
+
|
94
|
+
./pagekite.py 3000 dev-finpointdev.pagekite.me
|
95
|
+
|
96
|
+
pagekite.net details:
|
97
|
+
|
98
|
+
* u: hello@finpoint.co.uk
|
99
|
+
* p: fckx7989
|
100
|
+
|
101
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new
|
102
|
+
version, update the version number in `version.rb`, and then run `bundle exec rake release`, which
|
103
|
+
will create a git tag for the version, push git commits and tags, and push the `.gem` file
|
104
|
+
to [rubygems.org](https://rubygems.org).
|
@@ -13,7 +13,7 @@ module Iwoca
|
|
13
13
|
first_name: Faker::Name.first_name,
|
14
14
|
last_name: Faker::Name.last_name,
|
15
15
|
email: Faker::Internet.email,
|
16
|
-
phone: Faker::PhoneNumber.
|
16
|
+
phone: Faker::PhoneNumber.phone_number,
|
17
17
|
address: Faker::Address.street_address,
|
18
18
|
date_of_birth: Faker::Date.birthday(min_age: 23, max_age: 65),
|
19
19
|
city: Faker::Address.city,
|
data/lib/iwoca/version.rb
CHANGED
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://stage.iwoca-dev.co.uk/api/lending/v1/credit_facility_status/a16011ce-16c2-4581-b3d6-8b48e8db118b/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Token <TOKEN>
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
User-Agent:
|
15
|
+
- ruby-iwoca-0.1.1
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 30 Jan 2020 10:52:51 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Server:
|
34
|
+
- nginx/1.15.12
|
35
|
+
Vary:
|
36
|
+
- Accept-Encoding
|
37
|
+
- Cookie
|
38
|
+
X-State-Key:
|
39
|
+
- a16011ce-16c2-4581-b3d6-8b48e8db118b
|
40
|
+
Expires:
|
41
|
+
- Thu, 30 Jan 2020 10:52:51 GMT
|
42
|
+
Cache-Control:
|
43
|
+
- max-age=0, no-cache, no-store, must-revalidate
|
44
|
+
- public, max-age=0, must-revalidate
|
45
|
+
X-Partner:
|
46
|
+
- finpoint-dev
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Xss-Protection:
|
50
|
+
- 1; mode=block
|
51
|
+
X-Frame-Options:
|
52
|
+
- SAMEORIGIN
|
53
|
+
Set-Cookie:
|
54
|
+
- isLoggedIn=True; Path=/
|
55
|
+
- sessionid_access=f6b3893f-33ef-4f94-90b4-e30d6b294b4f; expires=Fri, 29-Jan-2021
|
56
|
+
10:52:51 GMT; HttpOnly; Max-Age=31536000; Path=/
|
57
|
+
- uid=rBEABF4ytYMZzAAlA/ekAg==; expires=Thu, 31-Dec-37 23:55:55 GMT; domain=.iwoca-dev.co.uk;
|
58
|
+
path=/
|
59
|
+
Strict-Transport-Security:
|
60
|
+
- max-age=31536000; includeSubDomains
|
61
|
+
body:
|
62
|
+
encoding: ASCII-8BIT
|
63
|
+
string: '{"data": {"balance": {"principal": 0.0, "interest": 0.0, "product_fees":
|
64
|
+
0.0, "other_fees": 0.0, "total": 0.0}, "latest_approval_request": {"status":
|
65
|
+
"decision_made"}, "approval_status": {"status": "approved", "approved": {"min_credit":
|
66
|
+
1.0, "max_credit": 10000.0, "interval": "1m", "duration": 12, "rate_structures":
|
67
|
+
[{"effective_on_day": 0, "rates": [{"max_principal": 10000.0, "rate": 0.0535}]}],
|
68
|
+
"time_out": "2019-11-10T00:00:00Z", "top_up_allowed": false}}, "approval_requirements":
|
69
|
+
[{"type": "cc", "status": "required"}, {"type": "bus_cc", "status": "required"},
|
70
|
+
{"type": "dir_guarantor", "status": "required"}, {"type": "enhanced_security_check",
|
71
|
+
"status": "pending"}], "funding_requirements": [{"status": "required", "type":
|
72
|
+
"fraud"}, {"type": "docs", "status": "required"}, {"type": "enhanced_security_check",
|
73
|
+
"status": "pending"}], "available_credit": 10000.0}}'
|
74
|
+
http_version:
|
75
|
+
recorded_at: Thu, 30 Jan 2020 10:52:51 GMT
|
76
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://stage.iwoca-dev.co.uk/api/lending/v1/credit_facility_status/12369240-4803-49e3-89cd-526aa0dbf8a9/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Token <TOKEN>
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
User-Agent:
|
15
|
+
- ruby-iwoca-0.1.1
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 30 Jan 2020 10:54:28 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Server:
|
34
|
+
- nginx/1.15.12
|
35
|
+
Vary:
|
36
|
+
- Accept-Encoding
|
37
|
+
- Cookie
|
38
|
+
X-State-Key:
|
39
|
+
- 12369240-4803-49e3-89cd-526aa0dbf8a9
|
40
|
+
Expires:
|
41
|
+
- Thu, 30 Jan 2020 10:54:28 GMT
|
42
|
+
Cache-Control:
|
43
|
+
- max-age=0, no-cache, no-store, must-revalidate
|
44
|
+
- public, max-age=0, must-revalidate
|
45
|
+
X-Partner:
|
46
|
+
- finpoint-dev
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Xss-Protection:
|
50
|
+
- 1; mode=block
|
51
|
+
X-Frame-Options:
|
52
|
+
- SAMEORIGIN
|
53
|
+
Set-Cookie:
|
54
|
+
- isLoggedIn=True; Path=/
|
55
|
+
- sessionid_access=691ed440-8ca7-47d4-90e9-1b38e9fc58c0; expires=Fri, 29-Jan-2021
|
56
|
+
10:54:28 GMT; HttpOnly; Max-Age=31536000; Path=/
|
57
|
+
- uid=rBEABF4yteQZzAAlA/ewAg==; expires=Thu, 31-Dec-37 23:55:55 GMT; domain=.iwoca-dev.co.uk;
|
58
|
+
path=/
|
59
|
+
Strict-Transport-Security:
|
60
|
+
- max-age=31536000; includeSubDomains
|
61
|
+
body:
|
62
|
+
encoding: ASCII-8BIT
|
63
|
+
string: '{"data": {"balance": {"principal": 0.0, "interest": 0.0, "product_fees":
|
64
|
+
0.0, "other_fees": 0.0, "total": 0.0}, "latest_approval_request": {"status":
|
65
|
+
"decision_made"}, "approval_status": {"status": "declined"}, "approval_requirements":
|
66
|
+
[{"type": "cc", "status": "required"}, {"type": "bus_cc", "status": "required"},
|
67
|
+
{"type": "dir_guarantor", "status": "required"}, {"type": "enhanced_security_check",
|
68
|
+
"status": "pending"}], "funding_requirements": [{"status": "required", "type":
|
69
|
+
"fraud"}, {"type": "docs", "status": "required"}, {"type": "enhanced_security_check",
|
70
|
+
"status": "pending"}]}}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Thu, 30 Jan 2020 10:54:28 GMT
|
73
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://stage.iwoca-dev.co.uk/api/lending/v1/credit_facility_status/1acd6198-df68-421a-8108-f7cec4902c00/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Token <TOKEN>
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
User-Agent:
|
15
|
+
- ruby-iwoca-0.1.1
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 30 Jan 2020 10:38:13 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Server:
|
34
|
+
- nginx/1.15.12
|
35
|
+
Vary:
|
36
|
+
- Accept-Encoding
|
37
|
+
- Cookie
|
38
|
+
X-State-Key:
|
39
|
+
- 1acd6198-df68-421a-8108-f7cec4902c00
|
40
|
+
Expires:
|
41
|
+
- Thu, 30 Jan 2020 10:38:13 GMT
|
42
|
+
Cache-Control:
|
43
|
+
- max-age=0, no-cache, no-store, must-revalidate
|
44
|
+
- public, max-age=0, must-revalidate
|
45
|
+
X-Partner:
|
46
|
+
- finpoint-dev
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Xss-Protection:
|
50
|
+
- 1; mode=block
|
51
|
+
X-Frame-Options:
|
52
|
+
- SAMEORIGIN
|
53
|
+
Set-Cookie:
|
54
|
+
- isLoggedIn=True; Path=/
|
55
|
+
- sessionid_access=831256d8-1bda-4969-ab4f-3188a4bd07c9; expires=Fri, 29-Jan-2021
|
56
|
+
10:38:13 GMT; HttpOnly; Max-Age=31536000; Path=/
|
57
|
+
- uid=rBEABF4yshUZzAAlA/cRAg==; expires=Thu, 31-Dec-37 23:55:55 GMT; domain=.iwoca-dev.co.uk;
|
58
|
+
path=/
|
59
|
+
Strict-Transport-Security:
|
60
|
+
- max-age=31536000; includeSubDomains
|
61
|
+
body:
|
62
|
+
encoding: ASCII-8BIT
|
63
|
+
string: '{"data": {"balance": {"principal": 0.0, "interest": 0.0, "product_fees":
|
64
|
+
0.0, "other_fees": 0.0, "total": 0.0}, "latest_approval_request": {"status":
|
65
|
+
"no_decision_possible"}, "approval_requirements": [{"type": "cc", "status":
|
66
|
+
"required"}, {"type": "bus_cc", "status": "required"}, {"type": "dir_guarantor",
|
67
|
+
"status": "required"}, {"type": "enhanced_security_check", "status": "pending"}],
|
68
|
+
"funding_requirements": [{"status": "required", "type": "fraud"}, {"type":
|
69
|
+
"docs", "status": "required"}, {"type": "enhanced_security_check", "status":
|
70
|
+
"pending"}]}}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Thu, 30 Jan 2020 10:38:13 GMT
|
73
|
+
recorded_with: VCR 5.0.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iwoca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rikas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -266,7 +266,10 @@ files:
|
|
266
266
|
- vcr_cassettes/create_customer_invalid.yml
|
267
267
|
- vcr_cassettes/create_customer_no_auth.yml
|
268
268
|
- vcr_cassettes/create_customer_valid.yml
|
269
|
+
- vcr_cassettes/credit_facility_status_approved.yml
|
270
|
+
- vcr_cassettes/credit_facility_status_declined.yml
|
269
271
|
- vcr_cassettes/credit_facility_status_invalid.yml
|
272
|
+
- vcr_cassettes/credit_facility_status_no_decision_possible.yml
|
270
273
|
- vcr_cassettes/credit_facility_status_valid.yml
|
271
274
|
- vcr_cassettes/login_link_invalid.yml
|
272
275
|
- vcr_cassettes/login_link_valid.yml
|