iwoca 1.0.1 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -1
- data/README.md +65 -17
- data/bin/console +9 -0
- data/iwoca.gemspec +1 -0
- data/lib/iwoca/application.rb +62 -0
- data/lib/iwoca/application_generator.rb +30 -0
- data/lib/iwoca/connection.rb +8 -3
- data/lib/iwoca/customer.rb +32 -0
- data/lib/iwoca/customer_generator.rb +28 -35
- data/lib/iwoca/schemas/customer_payload.json +542 -0
- data/lib/iwoca/schemas/last_12_months_turnover.json +15 -0
- data/lib/iwoca/schemas/requested_product.json +80 -0
- data/lib/iwoca/version.rb +1 -1
- data/lib/iwoca/webhooks.rb +94 -0
- data/lib/iwoca.rb +16 -1
- metadata +23 -3
- data/lib/iwoca/quote.rb +0 -43
@@ -0,0 +1,542 @@
|
|
1
|
+
{
|
2
|
+
"additionalProperties": false,
|
3
|
+
"description": "The customers endpoint. This holds state information about the customer.",
|
4
|
+
"properties": {
|
5
|
+
"data": {
|
6
|
+
"additionalProperties": false,
|
7
|
+
"properties": {
|
8
|
+
"company": {
|
9
|
+
"$ref": "#/definitions/company"
|
10
|
+
},
|
11
|
+
"correlation_id": {
|
12
|
+
"description": "Provided by partners to identify a customer in the optional quote_data endpoint payload posted to iwoca.",
|
13
|
+
"format": "uuid",
|
14
|
+
"type": "string"
|
15
|
+
},
|
16
|
+
"external_customer_id": {
|
17
|
+
"description": "Only used if you've set up a custom integration that requires iwoca to use your unique customer id.",
|
18
|
+
"type": "string"
|
19
|
+
},
|
20
|
+
"people": {
|
21
|
+
"description": "People associated with the company including the applicant and any other directors, shareholders or loan guarantors you wish to submit. For every customer there should be exactly one person with the role of 'applicant' that is also a 'director' and 'guarantor'.",
|
22
|
+
"items": {
|
23
|
+
"$ref": "#/definitions/person"
|
24
|
+
},
|
25
|
+
"type": "array"
|
26
|
+
}
|
27
|
+
},
|
28
|
+
"type": "object"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"title": "customer_payload",
|
32
|
+
"type": "object",
|
33
|
+
"definitions": {
|
34
|
+
"company": {
|
35
|
+
"additionalProperties": false,
|
36
|
+
"properties": {
|
37
|
+
"company_number": {
|
38
|
+
"description": "Company number as on Companies House.",
|
39
|
+
"maxLength": 50,
|
40
|
+
"type": "string"
|
41
|
+
},
|
42
|
+
"has_card_based_transactions": {
|
43
|
+
"type": "boolean"
|
44
|
+
},
|
45
|
+
"industry": {
|
46
|
+
"description": "Recommended format is one of: Agriculture, Forestry & Fishing / Architecture & Engineering / Business Support Services (e.g. recruitment or security) / Car Dealers, Garages & Mechanics / Cleaning, Landscaping & Gardening / Construction (e.g. builders, civil engineer or electrician) / Education & Training / Finance & Insurance / Health & Care (e.g. day-care, doctors or care homes) / Hotels, Restaurants & Pubs / IT & Communications/ Leisure / Other Services (e.g. hairdressers or travel agents) / Manufacturing, Food Processing & Printing / Professional Services (e.g. accounting or consulting) / Property & Real Estate / Publishing, Film & Media Production / Retail (online or offline) / Transport & Logistics (e.g. taxis, couriers or storage) / Wholesale / Other.",
|
47
|
+
"type": "string"
|
48
|
+
},
|
49
|
+
"last_12_months_profit": {
|
50
|
+
"additionalProperties": false,
|
51
|
+
"description": "Estimated profit over the last 12 months. For a young business without a full year of trading, the profit to date should be given. A negative value denotes a loss.",
|
52
|
+
"properties": {
|
53
|
+
"amount": {
|
54
|
+
"description": "Pre-tax amount submitted by customer in local currency. Note that this differs from monthly_non_business_income which is post-tax.",
|
55
|
+
"type": "number"
|
56
|
+
},
|
57
|
+
"valid_from": {
|
58
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
59
|
+
"format": "date-time",
|
60
|
+
"type": "string"
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"type": "object"
|
64
|
+
},
|
65
|
+
"last_12_months_turnover": {
|
66
|
+
"additionalProperties": false,
|
67
|
+
"description": "Estimated revenue over the last 12 months. For a young business without a full year of revenue, revenue to date should be given.",
|
68
|
+
"properties": {
|
69
|
+
"amount": {
|
70
|
+
"description": "Amount submitted by customer in local currency or other estimate.",
|
71
|
+
"type": "number"
|
72
|
+
},
|
73
|
+
"valid_from": {
|
74
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
75
|
+
"format": "date-time",
|
76
|
+
"type": "string"
|
77
|
+
}
|
78
|
+
},
|
79
|
+
"type": "object"
|
80
|
+
},
|
81
|
+
"number_of_employees": {
|
82
|
+
"type": "integer"
|
83
|
+
},
|
84
|
+
"online_sales_percentage": {
|
85
|
+
"type": "integer"
|
86
|
+
},
|
87
|
+
"overdraft_status": {
|
88
|
+
"additionalProperties": false,
|
89
|
+
"properties": {
|
90
|
+
"has_overdraft": {
|
91
|
+
"description": "Specifies whether the user claims their company has a business overdraft.",
|
92
|
+
"type": "boolean"
|
93
|
+
},
|
94
|
+
"total_overdraft_limit": {
|
95
|
+
"description": "User declaration for total overdraft limit available to the company. If the company has multiple overdrafts, the sum of the limits should be used.",
|
96
|
+
"type": "number"
|
97
|
+
}
|
98
|
+
},
|
99
|
+
"type": "object"
|
100
|
+
},
|
101
|
+
"registered_address": {
|
102
|
+
"$ref": "#/definitions/company_address"
|
103
|
+
},
|
104
|
+
"registered_company_name": {
|
105
|
+
"description": "Registered company name for a registered business such as a limited company, as on Companies House.",
|
106
|
+
"maxLength": 200,
|
107
|
+
"type": "string"
|
108
|
+
},
|
109
|
+
"third_party_providers": {
|
110
|
+
"description": "Details of third-party providers used by the business such as Xero, eBay, PayPal or others.",
|
111
|
+
"items": {
|
112
|
+
"additionalProperties": false,
|
113
|
+
"properties": {
|
114
|
+
"name": {
|
115
|
+
"maxLength": 200,
|
116
|
+
"type": "string"
|
117
|
+
},
|
118
|
+
"type": {
|
119
|
+
"enum": ["ecommerce", "software", "bank"],
|
120
|
+
"type": "string"
|
121
|
+
}
|
122
|
+
},
|
123
|
+
"required": ["name", "type"],
|
124
|
+
"type": "object"
|
125
|
+
},
|
126
|
+
"type": "array"
|
127
|
+
},
|
128
|
+
"trading_address": {
|
129
|
+
"$ref": "#/definitions/company_address"
|
130
|
+
},
|
131
|
+
"trading_from_date": {
|
132
|
+
"description": "Date when company started trading, with expected ISO 8601 format.",
|
133
|
+
"format": "date",
|
134
|
+
"type": "string"
|
135
|
+
},
|
136
|
+
"trading_name": {
|
137
|
+
"description": "Primary company name used for sole traders and ordinary partnerships, otherwise registered name will typically be used.",
|
138
|
+
"maxLength": 200,
|
139
|
+
"type": "string"
|
140
|
+
},
|
141
|
+
"type": {
|
142
|
+
"enum": [
|
143
|
+
"limited_liability_company",
|
144
|
+
"sole_trader",
|
145
|
+
"ordinary_partnership",
|
146
|
+
"limited_liability_partnership",
|
147
|
+
"public_limited_company",
|
148
|
+
"other"
|
149
|
+
],
|
150
|
+
"type": "string"
|
151
|
+
},
|
152
|
+
"vat_status": {
|
153
|
+
"additionalProperties": false,
|
154
|
+
"description": "Information on the company's VAT registration status.",
|
155
|
+
"properties": {
|
156
|
+
"is_vat_registered": {
|
157
|
+
"type": "boolean"
|
158
|
+
},
|
159
|
+
"registered_over_3_months": {
|
160
|
+
"type": "boolean"
|
161
|
+
},
|
162
|
+
"vat_number": {
|
163
|
+
"type": "string"
|
164
|
+
}
|
165
|
+
},
|
166
|
+
"type": "object"
|
167
|
+
},
|
168
|
+
"website": {
|
169
|
+
"description": "Company website.",
|
170
|
+
"format": "uri",
|
171
|
+
"maxLength": 200,
|
172
|
+
"type": "string"
|
173
|
+
}
|
174
|
+
},
|
175
|
+
"title": "company",
|
176
|
+
"type": "object"
|
177
|
+
},
|
178
|
+
"company_address": {
|
179
|
+
"additionalProperties": false,
|
180
|
+
"properties": {
|
181
|
+
"country": {
|
182
|
+
"enum": ["GB", "DE", "OTHER"],
|
183
|
+
"maxLength": 5,
|
184
|
+
"type": "string"
|
185
|
+
},
|
186
|
+
"postcode": {
|
187
|
+
"maxLength": 250,
|
188
|
+
"type": "string"
|
189
|
+
},
|
190
|
+
"street_line_1": {
|
191
|
+
"maxLength": 250,
|
192
|
+
"type": "string"
|
193
|
+
},
|
194
|
+
"street_line_2": {
|
195
|
+
"maxLength": 250,
|
196
|
+
"type": "string"
|
197
|
+
},
|
198
|
+
"town": {
|
199
|
+
"maxLength": 250,
|
200
|
+
"type": "string"
|
201
|
+
}
|
202
|
+
},
|
203
|
+
"title": "company_address",
|
204
|
+
"type": "object"
|
205
|
+
},
|
206
|
+
"person": {
|
207
|
+
"additionalProperties": false,
|
208
|
+
"properties": {
|
209
|
+
"date_of_birth": {
|
210
|
+
"description": "Date with expected ISO 8601 format.",
|
211
|
+
"format": "date",
|
212
|
+
"type": "string"
|
213
|
+
},
|
214
|
+
"emails": {
|
215
|
+
"items": {
|
216
|
+
"additionalProperties": false,
|
217
|
+
"properties": {
|
218
|
+
"email": {
|
219
|
+
"description": "Contact email address with format user@example.com (ideally not a generic address such as info@...).",
|
220
|
+
"format": "email",
|
221
|
+
"maxLength": 254,
|
222
|
+
"type": "string"
|
223
|
+
},
|
224
|
+
"marketing_opt_in": {
|
225
|
+
"$ref": "#/definitions/marketing_opt_in"
|
226
|
+
},
|
227
|
+
"type": {
|
228
|
+
"enum": ["primary", "secondary"],
|
229
|
+
"type": "string"
|
230
|
+
}
|
231
|
+
},
|
232
|
+
"required": ["email"],
|
233
|
+
"type": "object"
|
234
|
+
},
|
235
|
+
"type": "array"
|
236
|
+
},
|
237
|
+
"first_name": {
|
238
|
+
"description": "Middle name is not required.",
|
239
|
+
"maxLength": 100,
|
240
|
+
"type": "string"
|
241
|
+
},
|
242
|
+
"how_did_you_find_us": {
|
243
|
+
"properties": {
|
244
|
+
"answer": {
|
245
|
+
"description": "Enum denoting where the customer heard about us.",
|
246
|
+
"enum": [
|
247
|
+
"letter",
|
248
|
+
"search_engine",
|
249
|
+
"friend_or_press",
|
250
|
+
"advisor",
|
251
|
+
"email",
|
252
|
+
"online_advert",
|
253
|
+
"phone_call",
|
254
|
+
"no_answer",
|
255
|
+
"train_or_bus_ad",
|
256
|
+
"radio"
|
257
|
+
],
|
258
|
+
"type": "string"
|
259
|
+
},
|
260
|
+
"details": {
|
261
|
+
"description": "Additional Details.",
|
262
|
+
"maxLength": 50,
|
263
|
+
"type": "string"
|
264
|
+
}
|
265
|
+
},
|
266
|
+
"type": "object"
|
267
|
+
},
|
268
|
+
"last_name": {
|
269
|
+
"maxLength": 100,
|
270
|
+
"type": "string"
|
271
|
+
},
|
272
|
+
"monthly_business_income": {
|
273
|
+
"additionalProperties": false,
|
274
|
+
"description": "The person's personal income or takings from the business per month.",
|
275
|
+
"properties": {
|
276
|
+
"amount": {
|
277
|
+
"description": "Post-tax amount submitted by customer in local currency.",
|
278
|
+
"type": "number"
|
279
|
+
},
|
280
|
+
"valid_from": {
|
281
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
282
|
+
"format": "date-time",
|
283
|
+
"type": "string"
|
284
|
+
}
|
285
|
+
},
|
286
|
+
"type": "object"
|
287
|
+
},
|
288
|
+
"monthly_non_business_income": {
|
289
|
+
"additionalProperties": false,
|
290
|
+
"description": "All income from other jobs, pension etc. Required for lending to sole traders.",
|
291
|
+
"properties": {
|
292
|
+
"amount": {
|
293
|
+
"description": "Post-tax amount submitted by customer in local currency.",
|
294
|
+
"type": "number"
|
295
|
+
},
|
296
|
+
"valid_from": {
|
297
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
298
|
+
"format": "date-time",
|
299
|
+
"type": "string"
|
300
|
+
}
|
301
|
+
},
|
302
|
+
"type": "object"
|
303
|
+
},
|
304
|
+
"monthly_non_housing_expenses": {
|
305
|
+
"additionalProperties": false,
|
306
|
+
"description": "All essential personal expenses, apart from housing. For example, food, transport and other loan repayments. Required for lending to sole traders.",
|
307
|
+
"properties": {
|
308
|
+
"amount": {
|
309
|
+
"description": "Amount submitted by customer in local currency.",
|
310
|
+
"type": "number"
|
311
|
+
},
|
312
|
+
"valid_from": {
|
313
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
314
|
+
"format": "date-time",
|
315
|
+
"type": "string"
|
316
|
+
}
|
317
|
+
},
|
318
|
+
"type": "object"
|
319
|
+
},
|
320
|
+
"monthly_other_household_income": {
|
321
|
+
"additionalProperties": false,
|
322
|
+
"description": "Total income from other members of the applicant's household such as their wife or husband. Does not include their own income.",
|
323
|
+
"properties": {
|
324
|
+
"amount": {
|
325
|
+
"type": "number"
|
326
|
+
},
|
327
|
+
"valid_from": {
|
328
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
329
|
+
"format": "date-time",
|
330
|
+
"type": "string"
|
331
|
+
}
|
332
|
+
},
|
333
|
+
"type": "object"
|
334
|
+
},
|
335
|
+
"number_of_dependents": {
|
336
|
+
"additionalProperties": false,
|
337
|
+
"description": "Number of people that are financially dependent on the person (such as children or people in their care).",
|
338
|
+
"properties": {
|
339
|
+
"count": {
|
340
|
+
"type": "integer"
|
341
|
+
},
|
342
|
+
"valid_from": {
|
343
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
344
|
+
"format": "date-time",
|
345
|
+
"type": "string"
|
346
|
+
}
|
347
|
+
},
|
348
|
+
"type": "object"
|
349
|
+
},
|
350
|
+
"phones": {
|
351
|
+
"items": {
|
352
|
+
"additionalProperties": false,
|
353
|
+
"description": "Contact phone numbers. It's preferable to have both a primary and secondary phone number for the applicant if available.",
|
354
|
+
"properties": {
|
355
|
+
"number": {
|
356
|
+
"description": "Quite flexible, can handle with/without country code, e.g. +447778473883 / 07778473883.",
|
357
|
+
"maxLength": 20,
|
358
|
+
"type": "string"
|
359
|
+
},
|
360
|
+
"type": {
|
361
|
+
"description": "The applicant must have at least one primary number.",
|
362
|
+
"enum": ["primary", "secondary"]
|
363
|
+
}
|
364
|
+
},
|
365
|
+
"required": ["number"],
|
366
|
+
"type": "object"
|
367
|
+
},
|
368
|
+
"type": "array"
|
369
|
+
},
|
370
|
+
"privacy_policy": {
|
371
|
+
"additionalProperties": false,
|
372
|
+
"description": "Required to retrieve an automated decision. This field denotes both that the customer agrees to the iwoca privacy policy AND that they have received reasonable, visible notice that iwoca will perform a soft credit check.",
|
373
|
+
"properties": {
|
374
|
+
"agreed": {
|
375
|
+
"description": "Specify whether the user has agreed to the iwoca privacy policy.",
|
376
|
+
"type": "boolean"
|
377
|
+
},
|
378
|
+
"valid_from": {
|
379
|
+
"description": "Datetime when they agreed or disagreed with the iwoca privacy policy, with expected ISO 8601 format.",
|
380
|
+
"format": "date-time",
|
381
|
+
"type": "string"
|
382
|
+
}
|
383
|
+
},
|
384
|
+
"type": "object"
|
385
|
+
},
|
386
|
+
"residential_addresses": {
|
387
|
+
"items": {
|
388
|
+
"$ref": "#/definitions/address"
|
389
|
+
},
|
390
|
+
"type": "array"
|
391
|
+
},
|
392
|
+
"roles": {
|
393
|
+
"description": "There should only be one applicant but there may be multiple people with the other roles.",
|
394
|
+
"items": {
|
395
|
+
"enum": [
|
396
|
+
"shareholder",
|
397
|
+
"applicant",
|
398
|
+
"director",
|
399
|
+
"guarantor",
|
400
|
+
"partner",
|
401
|
+
"other",
|
402
|
+
"beneficial_owner"
|
403
|
+
],
|
404
|
+
"type": "string"
|
405
|
+
},
|
406
|
+
"type": "array"
|
407
|
+
},
|
408
|
+
"title": {
|
409
|
+
"enum": [
|
410
|
+
"mr",
|
411
|
+
"ms",
|
412
|
+
"mrs",
|
413
|
+
"miss",
|
414
|
+
"doctor",
|
415
|
+
"professor",
|
416
|
+
"sir",
|
417
|
+
"lord",
|
418
|
+
"lady",
|
419
|
+
"baron",
|
420
|
+
"baroness",
|
421
|
+
"rev",
|
422
|
+
"other"
|
423
|
+
],
|
424
|
+
"type": "string"
|
425
|
+
},
|
426
|
+
"uid": {
|
427
|
+
"description": "Unique identifier created and stored by the partner which will allow you to retrieve/update this data in the future.",
|
428
|
+
"format": "uuid",
|
429
|
+
"type": "string"
|
430
|
+
}
|
431
|
+
},
|
432
|
+
"required": ["uid"],
|
433
|
+
"title": "person",
|
434
|
+
"type": "object"
|
435
|
+
},
|
436
|
+
"marketing_opt_in": {
|
437
|
+
"additionalProperties": false,
|
438
|
+
"properties": {
|
439
|
+
"agreed": {
|
440
|
+
"description": "Specify if user has opted in to receive marketing emails from iwoca.",
|
441
|
+
"type": "boolean"
|
442
|
+
},
|
443
|
+
"valid_from": {
|
444
|
+
"description": "Datetime when they opted in or out of marketing emails, with expected ISO 8601 format.",
|
445
|
+
"format": "date-time",
|
446
|
+
"type": "string"
|
447
|
+
}
|
448
|
+
},
|
449
|
+
"title": "marketing_opt_in",
|
450
|
+
"type": "object"
|
451
|
+
},
|
452
|
+
"address": {
|
453
|
+
"additionalProperties": false,
|
454
|
+
"properties": {
|
455
|
+
"country": {
|
456
|
+
"enum": ["GB", "DE", "OTHER"],
|
457
|
+
"maxLength": 5,
|
458
|
+
"type": "string"
|
459
|
+
},
|
460
|
+
"date_from": {
|
461
|
+
"description": "Date with expected ISO 8601 format, for example, '2016-10-23'. Optionally specify the date when they moved to this address. This date can be an estimate.",
|
462
|
+
"example": "2016-10-23",
|
463
|
+
"format": "date",
|
464
|
+
"type": "string"
|
465
|
+
},
|
466
|
+
"equifax_token": {
|
467
|
+
"description": "Equifax's PTCABS token. If you have access to this, providing it here could help us retrieve credit information more consistently.",
|
468
|
+
"maxLength": 250,
|
469
|
+
"type": "string"
|
470
|
+
},
|
471
|
+
"flat_number": {
|
472
|
+
"maxLength": 250,
|
473
|
+
"type": "string"
|
474
|
+
},
|
475
|
+
"house_name": {
|
476
|
+
"maxLength": 250,
|
477
|
+
"type": "string"
|
478
|
+
},
|
479
|
+
"house_number": {
|
480
|
+
"maxLength": 250,
|
481
|
+
"type": "string"
|
482
|
+
},
|
483
|
+
"monthly_housing_expenses": {
|
484
|
+
"additionalProperties": false,
|
485
|
+
"description": "Monthly cost of rent or mortgage, depending on residential status, at this address. Required for lending to sole traders.",
|
486
|
+
"properties": {
|
487
|
+
"amount": {
|
488
|
+
"type": "number"
|
489
|
+
},
|
490
|
+
"valid_from": {
|
491
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
492
|
+
"format": "date-time",
|
493
|
+
"type": "string"
|
494
|
+
}
|
495
|
+
},
|
496
|
+
"type": "object"
|
497
|
+
},
|
498
|
+
"postcode": {
|
499
|
+
"maxLength": 250,
|
500
|
+
"type": "string"
|
501
|
+
},
|
502
|
+
"property_value": {
|
503
|
+
"additionalProperties": false,
|
504
|
+
"description": "Estimated value of house or flat specified by address.",
|
505
|
+
"properties": {
|
506
|
+
"amount": {
|
507
|
+
"description": "Amount in local currency.",
|
508
|
+
"type": "number"
|
509
|
+
},
|
510
|
+
"valid_from": {
|
511
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
512
|
+
"format": "date-time",
|
513
|
+
"type": "string"
|
514
|
+
}
|
515
|
+
},
|
516
|
+
"type": "object"
|
517
|
+
},
|
518
|
+
"residential_status": {
|
519
|
+
"description": "The rent_free option covers situations where they are living in a property that they don't own but they are not paying rent (e.g. living with parents or family).",
|
520
|
+
"enum": ["tenant", "owner_with_mortgage", "owner_no_mortgage", "rent_free"],
|
521
|
+
"type": "string"
|
522
|
+
},
|
523
|
+
"street_line_1": {
|
524
|
+
"description": "The first line of the customer's address. For best results, this should include their flat or house name or number where possible.",
|
525
|
+
"maxLength": 250,
|
526
|
+
"type": "string"
|
527
|
+
},
|
528
|
+
"street_line_2": {
|
529
|
+
"description": "The second line of the customer's address. For best results, this should include their street number where possible and applicable.",
|
530
|
+
"maxLength": 250,
|
531
|
+
"type": "string"
|
532
|
+
},
|
533
|
+
"town": {
|
534
|
+
"maxLength": 250,
|
535
|
+
"type": "string"
|
536
|
+
}
|
537
|
+
},
|
538
|
+
"title": "address",
|
539
|
+
"type": "object"
|
540
|
+
}
|
541
|
+
}
|
542
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"description": "Estimated revenue over the last 12 months. For a young business without a full year of revenue, revenue to date should be given.",
|
3
|
+
"properties": {
|
4
|
+
"amount": {
|
5
|
+
"description": "Amount submitted by customer in local currency or other estimate.",
|
6
|
+
"type": "number"
|
7
|
+
},
|
8
|
+
"valid_from": {
|
9
|
+
"description": "Datetime when user submitted data, with expected ISO 8601 format.",
|
10
|
+
"format": "date-time",
|
11
|
+
"type": "string"
|
12
|
+
},
|
13
|
+
"type": "object"
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
{
|
2
|
+
"description": "",
|
3
|
+
"properties": {
|
4
|
+
"amount": {
|
5
|
+
"format": "float",
|
6
|
+
"type": "number",
|
7
|
+
"x-nullable": true
|
8
|
+
},
|
9
|
+
"detailed_purpose": {
|
10
|
+
"description": "detailed_purpose is usually submitted if a purpose of other has been set.",
|
11
|
+
"type": "string",
|
12
|
+
"x-nullable": true
|
13
|
+
},
|
14
|
+
"duration": {
|
15
|
+
"properties": {
|
16
|
+
"amount": {
|
17
|
+
"format": "float",
|
18
|
+
"type": "number"
|
19
|
+
},
|
20
|
+
"unit": {
|
21
|
+
"enum": ["days", "months", "years"],
|
22
|
+
"type": "string"
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"required": ["amount", "unit"],
|
26
|
+
"type": "object",
|
27
|
+
"x-nullable": true
|
28
|
+
},
|
29
|
+
"product_type": {
|
30
|
+
"$ref": "#/definitions/product_types"
|
31
|
+
},
|
32
|
+
"purpose": {
|
33
|
+
"$ref": "#/definitions/loan_purposes"
|
34
|
+
},
|
35
|
+
"urgency": {
|
36
|
+
"description": "Describes whether the customer needs the funding immediately (asap), over the next few weeks (weeks) or is simply looking to get approved for future use (future).",
|
37
|
+
"enum": ["asap", "weeks", "future_use", null],
|
38
|
+
"type": "string",
|
39
|
+
"x-nullable": true
|
40
|
+
}
|
41
|
+
},
|
42
|
+
"type": "object",
|
43
|
+
"definitions": {
|
44
|
+
"product_types": {
|
45
|
+
"enum": [
|
46
|
+
"flexi_loan",
|
47
|
+
"business_loan",
|
48
|
+
"iwocapay",
|
49
|
+
"cbils",
|
50
|
+
"flexi24",
|
51
|
+
"recovery_loan",
|
52
|
+
"revenue_based_loan",
|
53
|
+
null
|
54
|
+
],
|
55
|
+
"type": "string",
|
56
|
+
"x-nullable": true
|
57
|
+
},
|
58
|
+
"loan_purposes": {
|
59
|
+
"description": "A purpose may not be submitted if the customer is simply looking to get approved for the future, rather than a specific need.",
|
60
|
+
"enum": [
|
61
|
+
"stock_purchase",
|
62
|
+
"bridging_loan",
|
63
|
+
"marketing",
|
64
|
+
"equipment_purchase",
|
65
|
+
"pay_bill",
|
66
|
+
"pay_staff",
|
67
|
+
"refinancing_debt",
|
68
|
+
"financing_client_order",
|
69
|
+
"pay_tax_bill",
|
70
|
+
"other",
|
71
|
+
null,
|
72
|
+
"recovery_loan_working_capital",
|
73
|
+
"recovery_loan_expansion_or_growth",
|
74
|
+
"recovery_loan_replacing_external_finance"
|
75
|
+
],
|
76
|
+
"type": "string",
|
77
|
+
"x-nullable": true
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
data/lib/iwoca/version.rb
CHANGED