youlend 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.rspec +4 -0
- data/.rubocop.yml +52 -0
- data/.ruby-version +1 -0
- data/.travis.yml +0 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +107 -0
- data/README.md +2 -0
- data/Rakefile +8 -0
- data/bin/console +27 -0
- data/lib/youlend.rb +24 -0
- data/lib/youlend/auth.rb +59 -0
- data/lib/youlend/configuration.rb +28 -0
- data/lib/youlend/connection.rb +69 -0
- data/lib/youlend/lead.rb +23 -0
- data/lib/youlend/lead_generator.rb +63 -0
- data/lib/youlend/merchant.rb +0 -0
- data/lib/youlend/merchant_generator.rb +82 -0
- data/lib/youlend/path_sanitizer.rb +13 -0
- data/lib/youlend/quote.rb +30 -0
- data/lib/youlend/response.rb +28 -0
- data/lib/youlend/version.rb +5 -0
- data/vcr_cassettes/auth_incorrect.yml +84 -0
- data/vcr_cassettes/auth_onboarding_correct.yml +86 -0
- data/vcr_cassettes/auth_prequalification_correct.yml +86 -0
- data/vcr_cassettes/lead_create_correct.yml +170 -0
- data/vcr_cassettes/lead_create_incorrect.yml +169 -0
- data/vcr_cassettes/pre_qualification_incomplete.yml +121 -0
- data/vcr_cassettes/prequalification_correct.yml +169 -0
- data/vcr_cassettes/prequalification_incorrect.yml +167 -0
- data/vcr_cassettes/prequalification_rejection.yml +164 -0
- data/youlend.gemspec +46 -0
- metadata +299 -0
@@ -0,0 +1,170 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://staging.youlendapi.com/onboarding/Leads/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"companyName":"HOKO LTD","companyType":"ltd","monthsTrading":6,"countryISOCode":"GBR","keyContactName":"Reta
|
9
|
+
Senger V","thirdPartyLeadId":"9d2da035-c4d3-43e9-8a95-f40a59f43b00","registeredAddress":{"line1":"95792
|
10
|
+
Jimmy Plain","line2":"Suite 201","city":"London","region":"London","areaCode":"Z6
|
11
|
+
1LG","country":"UK"},"contactPhoneNumber":"0800 613 2789","monthlyCardRevenue":10000,"contactEmailAddress":"rosalie@walter.co","loanCurrencyISOCode":"GBP","thirdPartyCustomerId":"de3014f5-5e42-46f0-b7c4-a0af7a18769b","companyNumber":"09525857","notificationURL":"http://bashirian.org/lavern_baumbach","thirdPartyMerchantId":"ac916aac-0ee6-4df6-9a92-79bb5c583ee2"}'
|
12
|
+
headers:
|
13
|
+
Content-Type:
|
14
|
+
- application/json
|
15
|
+
User-Agent:
|
16
|
+
- ruby-youlend-1.0.0
|
17
|
+
Accept-Encoding:
|
18
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
19
|
+
Accept:
|
20
|
+
- "*/*"
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 401
|
24
|
+
message: Unauthorized
|
25
|
+
headers:
|
26
|
+
Date:
|
27
|
+
- Tue, 02 Feb 2021 13:41:59 GMT
|
28
|
+
Server:
|
29
|
+
- Microsoft-IIS/10.0
|
30
|
+
Www-Authenticate:
|
31
|
+
- Bearer
|
32
|
+
X-Powered-By:
|
33
|
+
- ASP.NET
|
34
|
+
Transfer-Encoding:
|
35
|
+
- chunked
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
body:
|
39
|
+
encoding: UTF-8
|
40
|
+
string: ''
|
41
|
+
http_version:
|
42
|
+
recorded_at: Tue, 02 Feb 2021 13:41:59 GMT
|
43
|
+
- request:
|
44
|
+
method: post
|
45
|
+
uri: https://youlend-stag.eu.auth0.com/oauth/token
|
46
|
+
body:
|
47
|
+
encoding: UTF-8
|
48
|
+
string: '{"grant_type":"client_credentials","client_id":"<CLIENT_ID>","client_secret":"<CLIENT_SECRET>","audience":"https://staging.youlendapi.com/onboarding"}'
|
49
|
+
headers:
|
50
|
+
Content-Type:
|
51
|
+
- application/json
|
52
|
+
User-Agent:
|
53
|
+
- ruby-youlend-1.0.0
|
54
|
+
Accept-Encoding:
|
55
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
56
|
+
Accept:
|
57
|
+
- "*/*"
|
58
|
+
response:
|
59
|
+
status:
|
60
|
+
code: 200
|
61
|
+
message: OK
|
62
|
+
headers:
|
63
|
+
Date:
|
64
|
+
- Tue, 02 Feb 2021 13:41:59 GMT
|
65
|
+
Content-Type:
|
66
|
+
- application/json
|
67
|
+
Transfer-Encoding:
|
68
|
+
- chunked
|
69
|
+
Connection:
|
70
|
+
- keep-alive
|
71
|
+
Set-Cookie:
|
72
|
+
- __cf_bm=80325795f5e4284c1d439cbe042a090dae2ecdcf-1612273319-1800-AR+78jnMe7/dhxc4GM4bOVuGZFdvTd3j6+pcgsxH8Kfncad9qAr64i4IGS3pv+MAva9uXMtj9QLQyzVXz3PXDSw=;
|
73
|
+
path=/; expires=Tue, 02-Feb-21 14:11:59 GMT; domain=.eu.auth0.com; HttpOnly;
|
74
|
+
Secure; SameSite=None
|
75
|
+
- __cfduid=d92e2fea4eea4a2e84701600eb3ec3c611612273319; expires=Thu, 04-Mar-21
|
76
|
+
13:41:59 GMT; path=/; domain=.eu.auth0.com; HttpOnly; SameSite=Lax; Secure
|
77
|
+
- did=s%3Av0%3A6c84a100-655c-11eb-8d10-33d3d6fc6471.Kdh3t06XUDZxEOxdk9OFK%2Bv0J17CVFQkPJ8Yf0jed7E;
|
78
|
+
Max-Age=31557600; Path=/; Expires=Wed, 02 Feb 2022 19:41:59 GMT; HttpOnly;
|
79
|
+
Secure; SameSite=None
|
80
|
+
- did_compat=s%3Av0%3A6c84a100-655c-11eb-8d10-33d3d6fc6471.Kdh3t06XUDZxEOxdk9OFK%2Bv0J17CVFQkPJ8Yf0jed7E;
|
81
|
+
Max-Age=31557600; Path=/; Expires=Wed, 02 Feb 2022 19:41:59 GMT; HttpOnly;
|
82
|
+
Secure
|
83
|
+
Cf-Ray:
|
84
|
+
- 61b45537ce32da72-LIS
|
85
|
+
Cache-Control:
|
86
|
+
- no-store
|
87
|
+
Strict-Transport-Security:
|
88
|
+
- max-age=31536000
|
89
|
+
Vary:
|
90
|
+
- Accept-Encoding
|
91
|
+
Cf-Cache-Status:
|
92
|
+
- DYNAMIC
|
93
|
+
Cf-Request-Id:
|
94
|
+
- '08049396da0000da7280b5d000000001'
|
95
|
+
Expect-Ct:
|
96
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
97
|
+
Ot-Baggage-Auth0-Request-Id:
|
98
|
+
- 61b45537ce32da72
|
99
|
+
Ot-Tracer-Sampled:
|
100
|
+
- 'true'
|
101
|
+
Ot-Tracer-Spanid:
|
102
|
+
- 3becbfdc5aa6fe2b
|
103
|
+
Ot-Tracer-Traceid:
|
104
|
+
- 5cdc59c075a04b64
|
105
|
+
Pragma:
|
106
|
+
- no-cache
|
107
|
+
X-Auth0-Requestid:
|
108
|
+
- b75baa9043a1e5e998a0
|
109
|
+
X-Content-Type-Options:
|
110
|
+
- nosniff
|
111
|
+
X-Ratelimit-Limit:
|
112
|
+
- '30'
|
113
|
+
X-Ratelimit-Remaining:
|
114
|
+
- '29'
|
115
|
+
X-Ratelimit-Reset:
|
116
|
+
- '1612273320'
|
117
|
+
Server:
|
118
|
+
- cloudflare
|
119
|
+
Alt-Svc:
|
120
|
+
- h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
|
121
|
+
body:
|
122
|
+
encoding: ASCII-8BIT
|
123
|
+
string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik0wUXdOMEl5TnpRMVJrRXhNa1pGTlVWRU5UQTJRalV6UWtRMVJUY3dORE0xUVVVM05rTkVRZyJ9.eyJodHRwOi8veW91bGVuZC5jb20vY2xhaW1zL2xlbmRpbmdQYXJ0bmVySWQiOiJkOGJmZTcwMy1lODBlLTRlMzUtYmFhYS1mZDk2MWU3ZGZlZTkiLCJpc3MiOiJodHRwczovL3lvdWxlbmQtc3RhZy5ldS5hdXRoMC5jb20vIiwic3ViIjoidXpLVEcyQ0NBZkFZQ0pGU0I3N3ZXRlVOelVOOHZxdlhAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vc3RhZ2luZy55b3VsZW5kYXBpLmNvbS9vbmJvYXJkaW5nIiwiaWF0IjoxNjEyMjczMzE5LCJleHAiOjE2MTIzNTk3MTksImF6cCI6InV6S1RHMkNDQWZBWUNKRlNCNzd2V0ZVTnpVTjh2cXZYIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.srrjdfyFGNh9XULhEvSKOFP7aQPCPN7miNj1XPEGW0tu74LZU6wPpi0zd_2hFvovrYlDl_DgX5yAr3kjx4FgnLYRA5EJlWV8v_eWwuKF7Tl0dRFnZWSnsBWIbKiXgaEGww_DPj3FP3iBtPPIG5fd7oCdnrJzz8BxBsXzr6s2EGGU99I_hV2jZECv27GeCGqi8D2KRaSnGTVrZ63IYNXYOtPqTeUgc1DYu8CyvHDgQE6hF1HGKD_lsNzXPBXurX6Xl1QDy8Sl_Qjcj2_1Y-4nMbpim9J1tz5ZnsZvPz9wwn3TbheLdILznn0huWR46pZJVmWLHmeHr8kr0gih2msywg","expires_in":86400,"token_type":"Bearer"}'
|
124
|
+
http_version:
|
125
|
+
recorded_at: Tue, 02 Feb 2021 13:41:59 GMT
|
126
|
+
- request:
|
127
|
+
method: post
|
128
|
+
uri: https://staging.youlendapi.com/onboarding/Leads/
|
129
|
+
body:
|
130
|
+
encoding: UTF-8
|
131
|
+
string: '{"companyName":"HOKO LTD","companyType":"ltd","monthsTrading":6,"countryISOCode":"GBR","keyContactName":"Reta
|
132
|
+
Senger V","thirdPartyLeadId":"9d2da035-c4d3-43e9-8a95-f40a59f43b00","registeredAddress":{"line1":"95792
|
133
|
+
Jimmy Plain","line2":"Suite 201","city":"London","region":"London","areaCode":"Z6
|
134
|
+
1LG","country":"UK"},"contactPhoneNumber":"0800 613 2789","monthlyCardRevenue":10000,"contactEmailAddress":"rosalie@walter.co","loanCurrencyISOCode":"GBP","thirdPartyCustomerId":"de3014f5-5e42-46f0-b7c4-a0af7a18769b","companyNumber":"09525857","notificationURL":"http://bashirian.org/lavern_baumbach","thirdPartyMerchantId":"ac916aac-0ee6-4df6-9a92-79bb5c583ee2"}'
|
135
|
+
headers:
|
136
|
+
Authorization:
|
137
|
+
- Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik0wUXdOMEl5TnpRMVJrRXhNa1pGTlVWRU5UQTJRalV6UWtRMVJUY3dORE0xUVVVM05rTkVRZyJ9.eyJodHRwOi8veW91bGVuZC5jb20vY2xhaW1zL2xlbmRpbmdQYXJ0bmVySWQiOiJkOGJmZTcwMy1lODBlLTRlMzUtYmFhYS1mZDk2MWU3ZGZlZTkiLCJpc3MiOiJodHRwczovL3lvdWxlbmQtc3RhZy5ldS5hdXRoMC5jb20vIiwic3ViIjoidXpLVEcyQ0NBZkFZQ0pGU0I3N3ZXRlVOelVOOHZxdlhAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vc3RhZ2luZy55b3VsZW5kYXBpLmNvbS9vbmJvYXJkaW5nIiwiaWF0IjoxNjEyMjczMzE5LCJleHAiOjE2MTIzNTk3MTksImF6cCI6InV6S1RHMkNDQWZBWUNKRlNCNzd2V0ZVTnpVTjh2cXZYIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.srrjdfyFGNh9XULhEvSKOFP7aQPCPN7miNj1XPEGW0tu74LZU6wPpi0zd_2hFvovrYlDl_DgX5yAr3kjx4FgnLYRA5EJlWV8v_eWwuKF7Tl0dRFnZWSnsBWIbKiXgaEGww_DPj3FP3iBtPPIG5fd7oCdnrJzz8BxBsXzr6s2EGGU99I_hV2jZECv27GeCGqi8D2KRaSnGTVrZ63IYNXYOtPqTeUgc1DYu8CyvHDgQE6hF1HGKD_lsNzXPBXurX6Xl1QDy8Sl_Qjcj2_1Y-4nMbpim9J1tz5ZnsZvPz9wwn3TbheLdILznn0huWR46pZJVmWLHmeHr8kr0gih2msywg
|
138
|
+
Content-Type:
|
139
|
+
- application/json
|
140
|
+
User-Agent:
|
141
|
+
- ruby-youlend-1.0.0
|
142
|
+
Accept-Encoding:
|
143
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
144
|
+
Accept:
|
145
|
+
- "*/*"
|
146
|
+
response:
|
147
|
+
status:
|
148
|
+
code: 200
|
149
|
+
message: OK
|
150
|
+
headers:
|
151
|
+
Api-Supported-Versions:
|
152
|
+
- '1.0'
|
153
|
+
Content-Type:
|
154
|
+
- application/json; charset=utf-8
|
155
|
+
Date:
|
156
|
+
- Tue, 02 Feb 2021 13:42:00 GMT
|
157
|
+
Server:
|
158
|
+
- Microsoft-IIS/10.0
|
159
|
+
X-Powered-By:
|
160
|
+
- ASP.NET
|
161
|
+
Transfer-Encoding:
|
162
|
+
- chunked
|
163
|
+
Connection:
|
164
|
+
- keep-alive
|
165
|
+
body:
|
166
|
+
encoding: UTF-8
|
167
|
+
string: '{"leadId":"99687dc3-f7be-44e0-8808-a2828b15fc41","leadURL":"https://staging.youlend.com/dashboard/youraccount/99687dc3-f7be-44e0-8808-a2828b15fc41/companydetails","signUpURL":"https://staging.youlend.com/dashboard/youlendapisignup?emailAddress=rosalie%40walter.co&leadId=99687dc3-f7be-44e0-8808-a2828b15fc41"}'
|
168
|
+
http_version:
|
169
|
+
recorded_at: Tue, 02 Feb 2021 13:42:00 GMT
|
170
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,169 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://staging.youlendapi.com/onboarding/Leads/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"companyName":"HOKO LTD","companyType":"incorrect","monthsTrading":6,"countryISOCode":"GBR","keyContactName":"Johnny
|
9
|
+
Cassin","thirdPartyLeadId":"f70537d0-f63b-4f1e-83e8-f7872ce84088","registeredAddress":{"line1":"3044
|
10
|
+
Shin Views","line2":"Suite 473","city":"London","region":"London","areaCode":"Z0
|
11
|
+
1WB","country":"UK"},"contactPhoneNumber":"0151 172 3243","monthlyCardRevenue":10000,"contactEmailAddress":"lynnette@cole.org","loanCurrencyISOCode":"GBP","thirdPartyCustomerId":"460b08a0-2453-41d0-8fe9-da7533613613","companyNumber":"09525857","notificationURL":"http://langosh.info/illa","thirdPartyMerchantId":"6abf56a8-3abe-4f4b-b0f6-6b42b73c7380"}'
|
12
|
+
headers:
|
13
|
+
Content-Type:
|
14
|
+
- application/json
|
15
|
+
User-Agent:
|
16
|
+
- ruby-youlend-1.0.0
|
17
|
+
Accept-Encoding:
|
18
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
19
|
+
Accept:
|
20
|
+
- "*/*"
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 401
|
24
|
+
message: Unauthorized
|
25
|
+
headers:
|
26
|
+
Date:
|
27
|
+
- Tue, 02 Feb 2021 13:39:40 GMT
|
28
|
+
Server:
|
29
|
+
- Microsoft-IIS/10.0
|
30
|
+
Www-Authenticate:
|
31
|
+
- Bearer
|
32
|
+
X-Powered-By:
|
33
|
+
- ASP.NET
|
34
|
+
Transfer-Encoding:
|
35
|
+
- chunked
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
body:
|
39
|
+
encoding: UTF-8
|
40
|
+
string: ''
|
41
|
+
http_version:
|
42
|
+
recorded_at: Tue, 02 Feb 2021 13:39:40 GMT
|
43
|
+
- request:
|
44
|
+
method: post
|
45
|
+
uri: https://youlend-stag.eu.auth0.com/oauth/token
|
46
|
+
body:
|
47
|
+
encoding: UTF-8
|
48
|
+
string: '{"grant_type":"client_credentials","client_id":"<CLIENT_ID>","client_secret":"<CLIENT_SECRET>","audience":"https://staging.youlendapi.com/onboarding"}'
|
49
|
+
headers:
|
50
|
+
Content-Type:
|
51
|
+
- application/json
|
52
|
+
User-Agent:
|
53
|
+
- ruby-youlend-1.0.0
|
54
|
+
Accept-Encoding:
|
55
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
56
|
+
Accept:
|
57
|
+
- "*/*"
|
58
|
+
response:
|
59
|
+
status:
|
60
|
+
code: 200
|
61
|
+
message: OK
|
62
|
+
headers:
|
63
|
+
Date:
|
64
|
+
- Tue, 02 Feb 2021 13:39:40 GMT
|
65
|
+
Content-Type:
|
66
|
+
- application/json
|
67
|
+
Transfer-Encoding:
|
68
|
+
- chunked
|
69
|
+
Connection:
|
70
|
+
- keep-alive
|
71
|
+
Set-Cookie:
|
72
|
+
- __cf_bm=0848890c640d9d8984cac264c1e778c46f766e98-1612273180-1800-AWNkwDLuYuhBtnxjoEIRLqbVylsGjadzpuwyks+MBYYMXTbtcU+rgRskvYr/CZaUtu2pWbjGHyIxQdnTRsmicc8=;
|
73
|
+
path=/; expires=Tue, 02-Feb-21 14:09:40 GMT; domain=.eu.auth0.com; HttpOnly;
|
74
|
+
Secure; SameSite=None
|
75
|
+
- __cfduid=dd5bf97a6931aa603f944d5f9e64dbc181612273180; expires=Thu, 04-Mar-21
|
76
|
+
13:39:40 GMT; path=/; domain=.eu.auth0.com; HttpOnly; SameSite=Lax; Secure
|
77
|
+
- did=s%3Av0%3A19bd3900-655c-11eb-9ed5-b11f12c4b7f2.s6jwFBJzjs3TtEf6iVp23KBWUHWlEz6k97HegCVNm7o;
|
78
|
+
Max-Age=31557600; Path=/; Expires=Wed, 02 Feb 2022 19:39:40 GMT; HttpOnly;
|
79
|
+
Secure; SameSite=None
|
80
|
+
- did_compat=s%3Av0%3A19bd3900-655c-11eb-9ed5-b11f12c4b7f2.s6jwFBJzjs3TtEf6iVp23KBWUHWlEz6k97HegCVNm7o;
|
81
|
+
Max-Age=31557600; Path=/; Expires=Wed, 02 Feb 2022 19:39:40 GMT; HttpOnly;
|
82
|
+
Secure
|
83
|
+
Cf-Ray:
|
84
|
+
- 61b451d3ac3fda76-LIS
|
85
|
+
Cache-Control:
|
86
|
+
- no-store
|
87
|
+
Strict-Transport-Security:
|
88
|
+
- max-age=31536000
|
89
|
+
Vary:
|
90
|
+
- Accept-Encoding
|
91
|
+
Cf-Cache-Status:
|
92
|
+
- DYNAMIC
|
93
|
+
Cf-Request-Id:
|
94
|
+
- '08049178460000da765810e000000001'
|
95
|
+
Expect-Ct:
|
96
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
97
|
+
Ot-Baggage-Auth0-Request-Id:
|
98
|
+
- 61b451d3ac3fda76
|
99
|
+
Ot-Tracer-Sampled:
|
100
|
+
- 'true'
|
101
|
+
Ot-Tracer-Spanid:
|
102
|
+
- 5893701a5ec0e405
|
103
|
+
Ot-Tracer-Traceid:
|
104
|
+
- 50ef9c2005419094
|
105
|
+
Pragma:
|
106
|
+
- no-cache
|
107
|
+
X-Auth0-Requestid:
|
108
|
+
- 2508a5f482c912b8e82c
|
109
|
+
X-Content-Type-Options:
|
110
|
+
- nosniff
|
111
|
+
X-Ratelimit-Limit:
|
112
|
+
- '30'
|
113
|
+
X-Ratelimit-Remaining:
|
114
|
+
- '29'
|
115
|
+
X-Ratelimit-Reset:
|
116
|
+
- '1612273181'
|
117
|
+
Server:
|
118
|
+
- cloudflare
|
119
|
+
Alt-Svc:
|
120
|
+
- h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
|
121
|
+
body:
|
122
|
+
encoding: ASCII-8BIT
|
123
|
+
string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik0wUXdOMEl5TnpRMVJrRXhNa1pGTlVWRU5UQTJRalV6UWtRMVJUY3dORE0xUVVVM05rTkVRZyJ9.eyJodHRwOi8veW91bGVuZC5jb20vY2xhaW1zL2xlbmRpbmdQYXJ0bmVySWQiOiJkOGJmZTcwMy1lODBlLTRlMzUtYmFhYS1mZDk2MWU3ZGZlZTkiLCJpc3MiOiJodHRwczovL3lvdWxlbmQtc3RhZy5ldS5hdXRoMC5jb20vIiwic3ViIjoidXpLVEcyQ0NBZkFZQ0pGU0I3N3ZXRlVOelVOOHZxdlhAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vc3RhZ2luZy55b3VsZW5kYXBpLmNvbS9vbmJvYXJkaW5nIiwiaWF0IjoxNjEyMjczMTgwLCJleHAiOjE2MTIzNTk1ODAsImF6cCI6InV6S1RHMkNDQWZBWUNKRlNCNzd2V0ZVTnpVTjh2cXZYIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.tbDpCfvp_Drgl_nh13-AM_LXw9HB8IPBaptrzDifhpb7HUh7MES6YRDoa6HQ4nltSKQ9d45BNOs1XntTZfGYSm-0Zs0Jn45iLkqrClP4uAfF9UQ57mf2pcqB60_EI4K3ZoWhD3n8ZyZR4zkcErwir_cDlm-uGh-KgG66AMJF8kPZX9IJrKoUeFHrTrarF3bjIuXbZWcbkR1YhM0ZMQKRVFJfj7KfWIkQt4nKpf37qZoLyxQMBOoY3xqDf83-wOPREKDSDDiVAnIqbCSTTMdcdTzO02jai5bTxWvgHBNYBtVK-CGOG69guW0wn6JgG1I9v_tjKilHBwlGjUjT_r-QVA","expires_in":86400,"token_type":"Bearer"}'
|
124
|
+
http_version:
|
125
|
+
recorded_at: Tue, 02 Feb 2021 13:39:40 GMT
|
126
|
+
- request:
|
127
|
+
method: post
|
128
|
+
uri: https://staging.youlendapi.com/onboarding/Leads/
|
129
|
+
body:
|
130
|
+
encoding: UTF-8
|
131
|
+
string: '{"companyName":"HOKO LTD","companyType":"incorrect","monthsTrading":6,"countryISOCode":"GBR","keyContactName":"Johnny
|
132
|
+
Cassin","thirdPartyLeadId":"f70537d0-f63b-4f1e-83e8-f7872ce84088","registeredAddress":{"line1":"3044
|
133
|
+
Shin Views","line2":"Suite 473","city":"London","region":"London","areaCode":"Z0
|
134
|
+
1WB","country":"UK"},"contactPhoneNumber":"0151 172 3243","monthlyCardRevenue":10000,"contactEmailAddress":"lynnette@cole.org","loanCurrencyISOCode":"GBP","thirdPartyCustomerId":"460b08a0-2453-41d0-8fe9-da7533613613","companyNumber":"09525857","notificationURL":"http://langosh.info/illa","thirdPartyMerchantId":"6abf56a8-3abe-4f4b-b0f6-6b42b73c7380"}'
|
135
|
+
headers:
|
136
|
+
Authorization:
|
137
|
+
- Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik0wUXdOMEl5TnpRMVJrRXhNa1pGTlVWRU5UQTJRalV6UWtRMVJUY3dORE0xUVVVM05rTkVRZyJ9.eyJodHRwOi8veW91bGVuZC5jb20vY2xhaW1zL2xlbmRpbmdQYXJ0bmVySWQiOiJkOGJmZTcwMy1lODBlLTRlMzUtYmFhYS1mZDk2MWU3ZGZlZTkiLCJpc3MiOiJodHRwczovL3lvdWxlbmQtc3RhZy5ldS5hdXRoMC5jb20vIiwic3ViIjoidXpLVEcyQ0NBZkFZQ0pGU0I3N3ZXRlVOelVOOHZxdlhAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vc3RhZ2luZy55b3VsZW5kYXBpLmNvbS9vbmJvYXJkaW5nIiwiaWF0IjoxNjEyMjczMTgwLCJleHAiOjE2MTIzNTk1ODAsImF6cCI6InV6S1RHMkNDQWZBWUNKRlNCNzd2V0ZVTnpVTjh2cXZYIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.tbDpCfvp_Drgl_nh13-AM_LXw9HB8IPBaptrzDifhpb7HUh7MES6YRDoa6HQ4nltSKQ9d45BNOs1XntTZfGYSm-0Zs0Jn45iLkqrClP4uAfF9UQ57mf2pcqB60_EI4K3ZoWhD3n8ZyZR4zkcErwir_cDlm-uGh-KgG66AMJF8kPZX9IJrKoUeFHrTrarF3bjIuXbZWcbkR1YhM0ZMQKRVFJfj7KfWIkQt4nKpf37qZoLyxQMBOoY3xqDf83-wOPREKDSDDiVAnIqbCSTTMdcdTzO02jai5bTxWvgHBNYBtVK-CGOG69guW0wn6JgG1I9v_tjKilHBwlGjUjT_r-QVA
|
138
|
+
Content-Type:
|
139
|
+
- application/json
|
140
|
+
User-Agent:
|
141
|
+
- ruby-youlend-1.0.0
|
142
|
+
Accept-Encoding:
|
143
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
144
|
+
Accept:
|
145
|
+
- "*/*"
|
146
|
+
response:
|
147
|
+
status:
|
148
|
+
code: 422
|
149
|
+
message: Unprocessable Entity
|
150
|
+
headers:
|
151
|
+
Content-Type:
|
152
|
+
- application/json; charset=utf-8
|
153
|
+
Date:
|
154
|
+
- Tue, 02 Feb 2021 13:39:42 GMT
|
155
|
+
Server:
|
156
|
+
- Microsoft-IIS/10.0
|
157
|
+
X-Powered-By:
|
158
|
+
- ASP.NET
|
159
|
+
Content-Length:
|
160
|
+
- '151'
|
161
|
+
Connection:
|
162
|
+
- keep-alive
|
163
|
+
body:
|
164
|
+
encoding: UTF-8
|
165
|
+
string: '{"CompanyType":["The company type is invalid. Valid company types are
|
166
|
+
ltd, plc, llp, dac, soleTrader, aps, as, ks, ivs, is and enkeltmandsvirksomhed"]}'
|
167
|
+
http_version:
|
168
|
+
recorded_at: Tue, 02 Feb 2021 13:39:42 GMT
|
169
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1,121 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://staging.youlendapi.com/prequalification/Requests/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{}"
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- ruby-youlend-1.0.0
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 401
|
21
|
+
message: Unauthorized
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Tue, 02 Feb 2021 13:42:59 GMT
|
25
|
+
Server:
|
26
|
+
- Microsoft-IIS/10.0
|
27
|
+
Www-Authenticate:
|
28
|
+
- Bearer
|
29
|
+
X-Powered-By:
|
30
|
+
- ASP.NET
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: ''
|
38
|
+
http_version:
|
39
|
+
recorded_at: Tue, 02 Feb 2021 13:42:59 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://youlend-stag.eu.auth0.com/oauth/token
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"grant_type":"client_credentials","client_id":"NOT VALID","client_secret":"<CLIENT_SECRET>","audience":"https://staging.youlendapi.com/prequalification"}'
|
46
|
+
headers:
|
47
|
+
Content-Type:
|
48
|
+
- application/json
|
49
|
+
User-Agent:
|
50
|
+
- ruby-youlend-1.0.0
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
Accept:
|
54
|
+
- "*/*"
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 401
|
58
|
+
message: Unauthorized
|
59
|
+
headers:
|
60
|
+
Date:
|
61
|
+
- Tue, 02 Feb 2021 13:42:59 GMT
|
62
|
+
Content-Type:
|
63
|
+
- application/json
|
64
|
+
Content-Length:
|
65
|
+
- '60'
|
66
|
+
Connection:
|
67
|
+
- keep-alive
|
68
|
+
Set-Cookie:
|
69
|
+
- __cf_bm=03c4298e59d9391aea14b4bd6ddd8aac23bebfb6-1612273379-1800-Abk0HdmU+fKT5KnrwO6o6ktlquySImdM5MDik1DB0dkFH8ZOl2eH7RkXz6JtoxCWQR39Gz1/nrEk9DDC3fsX1F4=;
|
70
|
+
path=/; expires=Tue, 02-Feb-21 14:12:59 GMT; domain=.eu.auth0.com; HttpOnly;
|
71
|
+
Secure; SameSite=None
|
72
|
+
- __cfduid=d07bd971ced88af67f0b26776a0ad5bab1612273379; expires=Thu, 04-Mar-21
|
73
|
+
13:42:59 GMT; path=/; domain=.eu.auth0.com; HttpOnly; SameSite=Lax; Secure
|
74
|
+
- did=s%3Av0%3A8ffd4970-655c-11eb-8bf6-01f5e9e14de1.9GGg0e8ohyq3wArMLRMh%2FlDxj8XGPDDf3JLcdwx8qr4;
|
75
|
+
Max-Age=31557600; Path=/; Expires=Wed, 02 Feb 2022 19:42:59 GMT; HttpOnly;
|
76
|
+
Secure; SameSite=None
|
77
|
+
- did_compat=s%3Av0%3A8ffd4970-655c-11eb-8bf6-01f5e9e14de1.9GGg0e8ohyq3wArMLRMh%2FlDxj8XGPDDf3JLcdwx8qr4;
|
78
|
+
Max-Age=31557600; Path=/; Expires=Wed, 02 Feb 2022 19:42:59 GMT; HttpOnly;
|
79
|
+
Secure
|
80
|
+
Cf-Ray:
|
81
|
+
- 61b456abbbb65d33-LIS
|
82
|
+
Cache-Control:
|
83
|
+
- private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-transform
|
84
|
+
Strict-Transport-Security:
|
85
|
+
- max-age=31536000
|
86
|
+
Cf-Cache-Status:
|
87
|
+
- DYNAMIC
|
88
|
+
Cf-Request-Id:
|
89
|
+
- '0804947f5300005d333a397000000001'
|
90
|
+
Expect-Ct:
|
91
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
92
|
+
Ot-Baggage-Auth0-Request-Id:
|
93
|
+
- 61b456abbbb65d33
|
94
|
+
Ot-Tracer-Sampled:
|
95
|
+
- 'true'
|
96
|
+
Ot-Tracer-Spanid:
|
97
|
+
- 3d8bd36c0ffb7723
|
98
|
+
Ot-Tracer-Traceid:
|
99
|
+
- 29a5a41a5d581deb
|
100
|
+
X-Auth0-Requestid:
|
101
|
+
- 2588bde4228a33b45e6c
|
102
|
+
X-Content-Type-Options:
|
103
|
+
- nosniff
|
104
|
+
X-Ratelimit-Limit:
|
105
|
+
- '30'
|
106
|
+
X-Ratelimit-Remaining:
|
107
|
+
- '29'
|
108
|
+
X-Ratelimit-Reset:
|
109
|
+
- '1612273380'
|
110
|
+
Vary:
|
111
|
+
- Accept-Encoding
|
112
|
+
Server:
|
113
|
+
- cloudflare
|
114
|
+
Alt-Svc:
|
115
|
+
- h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
|
116
|
+
body:
|
117
|
+
encoding: UTF-8
|
118
|
+
string: '{"error":"access_denied","error_description":"Unauthorized"}'
|
119
|
+
http_version:
|
120
|
+
recorded_at: Tue, 02 Feb 2021 13:42:59 GMT
|
121
|
+
recorded_with: VCR 5.0.0
|