You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lending/README.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,8 @@ s = codatlending.CodatLending(
29
29
)
30
30
31
31
req = shared.CompanyRequestBody(
32
-
description='Requested early access to the new financing scheme.',
33
32
name='Bank of Dave',
33
+
description='Requested early access to the new financing scheme.',
34
34
)
35
35
36
36
res = s.companies.create(req)
@@ -361,9 +361,9 @@ if res.company is not None:
361
361
<!-- Start Retries [retries] -->
362
362
## Retries
363
363
364
-
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
364
+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
365
365
366
-
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
366
+
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
367
367
```python
368
368
import codatlending
369
369
from codatlending.models import shared
@@ -376,8 +376,8 @@ s = codatlending.CodatLending(
376
376
)
377
377
378
378
req = shared.CompanyRequestBody(
379
-
description='Requested early access to the new financing scheme.',
380
379
name='Bank of Dave',
380
+
description='Requested early access to the new financing scheme.',
381
381
)
382
382
383
383
res = s.companies.create(req,
@@ -388,7 +388,7 @@ if res.company is not None:
388
388
pass
389
389
```
390
390
391
-
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
391
+
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
392
392
```python
393
393
import codatlending
394
394
from codatlending.models import shared
@@ -402,8 +402,8 @@ s = codatlending.CodatLending(
402
402
)
403
403
404
404
req = shared.CompanyRequestBody(
405
-
description='Requested early access to the new financing scheme.',
406
405
name='Bank of Dave',
406
+
description='Requested early access to the new financing scheme.',
407
407
)
408
408
409
409
res = s.companies.create(req)
@@ -422,13 +422,13 @@ Handling errors in this SDK should largely match your expectations. All operati
@@ -437,18 +437,18 @@ s = codatlending.CodatLending(
437
437
)
438
438
439
439
req = shared.CompanyRequestBody(
440
-
description='Requested early access to the new financing scheme.',
441
440
name='Bank of Dave',
441
+
description='Requested early access to the new financing scheme.',
442
442
)
443
443
444
444
res =None
445
445
try:
446
446
res = s.companies.create(req)
447
447
except errors.ErrorMessage as e:
448
-
print(e) # handle exception
448
+
# handle exception
449
449
raise(e)
450
450
except errors.SDKError as e:
451
-
print(e) # handle exception
451
+
# handle exception
452
452
raise(e)
453
453
454
454
if res.company isnotNone:
@@ -482,8 +482,8 @@ s = codatlending.CodatLending(
482
482
)
483
483
484
484
req = shared.CompanyRequestBody(
485
-
description='Requested early access to the new financing scheme.',
486
485
name='Bank of Dave',
486
+
description='Requested early access to the new financing scheme.',
487
487
)
488
488
489
489
res = s.companies.create(req)
@@ -509,8 +509,8 @@ s = codatlending.CodatLending(
509
509
)
510
510
511
511
req = shared.CompanyRequestBody(
512
-
description='Requested early access to the new financing scheme.',
513
512
name='Bank of Dave',
513
+
description='Requested early access to the new financing scheme.',
514
514
)
515
515
516
516
res = s.companies.create(req)
@@ -524,7 +524,7 @@ if res.company is not None:
524
524
<!-- Start Custom HTTP Client [http-client] -->
525
525
## Custom HTTP Client
526
526
527
-
The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
527
+
The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
528
528
529
529
For example, you could specify a header for every request that this sdk makes as follows:
530
530
```python
@@ -560,8 +560,8 @@ s = codatlending.CodatLending(
560
560
)
561
561
562
562
req = shared.CompanyRequestBody(
563
-
description='Requested early access to the new financing scheme.',
564
563
name='Bank of Dave',
564
+
description='Requested early access to the new financing scheme.',
|`can_be_retried`|*Optional[str]*|:heavy_minus_sign:|`True` if the error occurred transiently and can be retried. |
11
-
|`correlation_id`|*Optional[str]*|:heavy_minus_sign:| Unique identifier used to propagate to all downstream services and determine the source of the error. |
12
-
|`detailed_error_code`|*Optional[int]*|:heavy_minus_sign:| Machine readable error code used to automate processes based on the code returned. |
13
-
|`error`|*Optional[str]*|:heavy_minus_sign:| A brief description of the error. |
14
-
|`service`|*Optional[str]*|:heavy_minus_sign:| Codat's service the returned the error. |
15
-
|`status_code`|*Optional[int]*|:heavy_minus_sign:| The HTTP status code returned by the error. |
|`can_be_retried`|*Optional[str]*|:heavy_minus_sign:|`True` if the error occurred transiently and can be retried. |
11
+
|`correlation_id`|*Optional[str]*|:heavy_minus_sign:| Unique identifier used to propagate to all downstream services and determine the source of the error. |
12
+
|`detailed_error_code`|*Optional[int]*|:heavy_minus_sign:| Machine readable error code used to automate processes based on the code returned. |
13
+
|`error`|*Optional[str]*|:heavy_minus_sign:| A brief description of the error. |
14
+
|`service`|*Optional[str]*|:heavy_minus_sign:| Codat's service the returned the error. |
15
+
|`status_code`|*Optional[int]*|:heavy_minus_sign:| The HTTP status code returned by the error. |
16
+
|`validation`|[Optional[shared.ErrorValidation]](../../models/shared/errorvalidation.md)|:heavy_minus_sign:| A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. |
0 commit comments