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: bank-feeds/README.md
+13-48Lines changed: 13 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,13 +29,8 @@ s = codatbankfeeds.CodatBankFeeds(
29
29
)
30
30
31
31
req = shared.CompanyRequestBody(
32
-
description='Requested early access to the new financing scheme.',
33
-
groups=[
34
-
shared.Items(
35
-
id='60d2fa12-8a04-11ee-b9d1-0242ac120002',
36
-
),
37
-
],
38
32
name='Bank of Dave',
33
+
description='Requested early access to the new financing scheme.',
39
34
)
40
35
41
36
res = s.companies.create(req)
@@ -104,9 +99,9 @@ if res.company is not None:
104
99
<!-- Start Retries [retries] -->
105
100
## Retries
106
101
107
-
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.
102
+
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.
108
103
109
-
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
104
+
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
110
105
```python
111
106
import codatbankfeeds
112
107
from codatbankfeeds.models import shared
@@ -119,13 +114,8 @@ s = codatbankfeeds.CodatBankFeeds(
119
114
)
120
115
121
116
req = shared.CompanyRequestBody(
122
-
description='Requested early access to the new financing scheme.',
123
-
groups=[
124
-
shared.Items(
125
-
id='60d2fa12-8a04-11ee-b9d1-0242ac120002',
126
-
),
127
-
],
128
117
name='Bank of Dave',
118
+
description='Requested early access to the new financing scheme.',
129
119
)
130
120
131
121
res = s.companies.create(req,
@@ -136,7 +126,7 @@ if res.company is not None:
136
126
pass
137
127
```
138
128
139
-
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
129
+
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:
140
130
```python
141
131
import codatbankfeeds
142
132
from codatbankfeeds.models import shared
@@ -150,13 +140,8 @@ s = codatbankfeeds.CodatBankFeeds(
150
140
)
151
141
152
142
req = shared.CompanyRequestBody(
153
-
description='Requested early access to the new financing scheme.',
154
-
groups=[
155
-
shared.Items(
156
-
id='60d2fa12-8a04-11ee-b9d1-0242ac120002',
157
-
),
158
-
],
159
143
name='Bank of Dave',
144
+
description='Requested early access to the new financing scheme.',
160
145
)
161
146
162
147
res = s.companies.create(req)
@@ -183,7 +168,7 @@ Handling errors in this SDK should largely match your expectations. All operati
183
168
184
169
```python
185
170
import codatbankfeeds
186
-
from codatbankfeeds.models import shared
171
+
from codatbankfeeds.models importerrors, shared
187
172
188
173
s = codatbankfeeds.CodatBankFeeds(
189
174
security=shared.Security(
@@ -192,23 +177,18 @@ s = codatbankfeeds.CodatBankFeeds(
192
177
)
193
178
194
179
req = shared.CompanyRequestBody(
195
-
description='Requested early access to the new financing scheme.',
196
-
groups=[
197
-
shared.Items(
198
-
id='60d2fa12-8a04-11ee-b9d1-0242ac120002',
199
-
),
200
-
],
201
180
name='Bank of Dave',
181
+
description='Requested early access to the new financing scheme.',
202
182
)
203
183
204
184
res =None
205
185
try:
206
186
res = s.companies.create(req)
207
187
except errors.ErrorMessage as e:
208
-
print(e) # handle exception
188
+
# handle exception
209
189
raise(e)
210
190
except errors.SDKError as e:
211
-
print(e) # handle exception
191
+
# handle exception
212
192
raise(e)
213
193
214
194
if res.company isnotNone:
@@ -244,13 +224,8 @@ s = codatbankfeeds.CodatBankFeeds(
244
224
)
245
225
246
226
req = shared.CompanyRequestBody(
247
-
description='Requested early access to the new financing scheme.',
248
-
groups=[
249
-
shared.Items(
250
-
id='60d2fa12-8a04-11ee-b9d1-0242ac120002',
251
-
),
252
-
],
253
227
name='Bank of Dave',
228
+
description='Requested early access to the new financing scheme.',
254
229
)
255
230
256
231
res = s.companies.create(req)
@@ -276,13 +251,8 @@ s = codatbankfeeds.CodatBankFeeds(
276
251
)
277
252
278
253
req = shared.CompanyRequestBody(
279
-
description='Requested early access to the new financing scheme.',
280
-
groups=[
281
-
shared.Items(
282
-
id='60d2fa12-8a04-11ee-b9d1-0242ac120002',
283
-
),
284
-
],
285
254
name='Bank of Dave',
255
+
description='Requested early access to the new financing scheme.',
286
256
)
287
257
288
258
res = s.companies.create(req)
@@ -336,13 +306,8 @@ s = codatbankfeeds.CodatBankFeeds(
336
306
)
337
307
338
308
req = shared.CompanyRequestBody(
339
-
description='Requested early access to the new financing scheme.',
340
-
groups=[
341
-
shared.Items(
342
-
id='60d2fa12-8a04-11ee-b9d1-0242ac120002',
343
-
),
344
-
],
345
309
name='Bank of Dave',
310
+
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