@@ -36,17 +36,22 @@ These end points cover creating and managing your companies, data connections, a
36
36
37
37
<!-- Start Table of Contents [toc] -->
38
38
## Table of Contents
39
+ <!-- $toc-max-depth=2 -->
40
+ * [ Platform] ( #platform )
41
+ * [ Endpoints] ( #endpoints )
42
+ * [ SDK Installation] ( #sdk-installation )
43
+ * [ Example Usage] ( #example-usage )
44
+ * [ IDE Support] ( #ide-support )
45
+ * [ SDK Example Usage] ( #sdk-example-usage )
46
+ * [ Available Resources and Operations] ( #available-resources-and-operations )
47
+ * [ Retries] ( #retries )
48
+ * [ Error Handling] ( #error-handling )
49
+ * [ Server Selection] ( #server-selection )
50
+ * [ Custom HTTP Client] ( #custom-http-client )
51
+ * [ Authentication] ( #authentication )
52
+ * [ Debugging] ( #debugging )
53
+ * [ Support] ( #support )
39
54
40
- * [ SDK Installation] ( #sdk-installation )
41
- * [ IDE Support] ( #ide-support )
42
- * [ SDK Example Usage] ( #sdk-example-usage )
43
- * [ Available Resources and Operations] ( #available-resources-and-operations )
44
- * [ Retries] ( #retries )
45
- * [ Error Handling] ( #error-handling )
46
- * [ Server Selection] ( #server-selection )
47
- * [ Custom HTTP Client] ( #custom-http-client )
48
- * [ Authentication] ( #authentication )
49
- * [ Debugging] ( #debugging )
50
55
<!-- End Table of Contents [toc] -->
51
56
52
57
<!-- Start SDK Installation [installation] -->
@@ -92,18 +97,25 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
92
97
from codat_platform import CodatPlatform
93
98
from codat_platform.models import shared
94
99
95
- with CodatPlatform(
96
- security = shared.Security(
97
- auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
98
- ),
99
- ) as s:
100
- res = s.settings.create_api_key(request = {
101
- " name" : " azure-invoice-finance-processor" ,
100
+ with CodatPlatform() as codat_platform:
101
+ codat_platform.company_data_connection_status_changed(request = {
102
+ " alert_id" : " a9367074-b5c3-42c4-9be4-be129f43577e" ,
103
+ " client_id" : " bae71d36-ff47-420a-b4a6-f8c9ddf41140" ,
104
+ " client_name" : " Bank of Dave" ,
105
+ " company_id" : " 8a210b68-6988-11ed-a1eb-0242ac120002" ,
106
+ " data" : {
107
+ " data_connection_id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
108
+ " new_status" : shared.DataConnectionStatus.LINKED ,
109
+ " old_status" : shared.DataConnectionStatus.PENDING_AUTH ,
110
+ " platform_key" : " gbol" ,
111
+ },
112
+ " data_connection_id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
113
+ " message" : " Data connection for SandBox status changed from PendingAuth to Linked" ,
114
+ " rule_id" : " 70af3071-65d9-4ec3-b3cb-5283e8d55dac" ,
115
+ " rule_type" : " DataConnectionStatusChanged" ,
102
116
})
103
117
104
- if res is not None :
105
- # handle response
106
- pass
118
+ # Use the SDK ...
107
119
```
108
120
109
121
</br >
@@ -116,18 +128,25 @@ from codat_platform import CodatPlatform
116
128
from codat_platform.models import shared
117
129
118
130
async def main ():
119
- async with CodatPlatform(
120
- security = shared.Security(
121
- auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
122
- ),
123
- ) as s:
124
- res = await s.settings.create_api_key_async(request = {
125
- " name" : " azure-invoice-finance-processor" ,
131
+ async with CodatPlatform() as codat_platform:
132
+ await codat_platform.company_data_connection_status_changed_async(request = {
133
+ " alert_id" : " a9367074-b5c3-42c4-9be4-be129f43577e" ,
134
+ " client_id" : " bae71d36-ff47-420a-b4a6-f8c9ddf41140" ,
135
+ " client_name" : " Bank of Dave" ,
136
+ " company_id" : " 8a210b68-6988-11ed-a1eb-0242ac120002" ,
137
+ " data" : {
138
+ " data_connection_id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
139
+ " new_status" : shared.DataConnectionStatus.LINKED ,
140
+ " old_status" : shared.DataConnectionStatus.PENDING_AUTH ,
141
+ " platform_key" : " gbol" ,
142
+ },
143
+ " data_connection_id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
144
+ " message" : " Data connection for SandBox status changed from PendingAuth to Linked" ,
145
+ " rule_id" : " 70af3071-65d9-4ec3-b3cb-5283e8d55dac" ,
146
+ " rule_type" : " DataConnectionStatusChanged" ,
126
147
})
127
148
128
- if res is not None :
129
- # handle response
130
- pass
149
+ # Use the SDK ...
131
150
132
151
asyncio.run(main())
133
152
```
@@ -234,14 +253,14 @@ To change the default retry strategy for a single API call, simply provide a `Re
234
253
``` python
235
254
from codat_platform import CodatPlatform
236
255
from codat_platform.models import shared
237
- from codatplatform .utils import BackoffStrategy, RetryConfig
256
+ from codat_platform .utils import BackoffStrategy, RetryConfig
238
257
239
258
with CodatPlatform(
240
259
security = shared.Security(
241
260
auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
242
261
),
243
- ) as s :
244
- res = s .settings.create_api_key(request = {
262
+ ) as codat_platform :
263
+ res = codat_platform .settings.create_api_key(request = {
245
264
" name" : " azure-invoice-finance-processor" ,
246
265
},
247
266
RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ))
@@ -256,15 +275,15 @@ If you'd like to override the default retry strategy for all operations that sup
256
275
``` python
257
276
from codat_platform import CodatPlatform
258
277
from codat_platform.models import shared
259
- from codatplatform .utils import BackoffStrategy, RetryConfig
278
+ from codat_platform .utils import BackoffStrategy, RetryConfig
260
279
261
280
with CodatPlatform(
262
281
retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
263
282
security = shared.Security(
264
283
auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
265
284
),
266
- ) as s :
267
- res = s .settings.create_api_key(request = {
285
+ ) as codat_platform :
286
+ res = codat_platform .settings.create_api_key(request = {
268
287
" name" : " azure-invoice-finance-processor" ,
269
288
})
270
289
@@ -306,10 +325,10 @@ with CodatPlatform(
306
325
security = shared.Security(
307
326
auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
308
327
),
309
- ) as s :
328
+ ) as codat_platform :
310
329
res = None
311
330
try :
312
- res = s .settings.create_api_key(request = {
331
+ res = codat_platform .settings.create_api_key(request = {
313
332
" name" : " azure-invoice-finance-processor" ,
314
333
})
315
334
@@ -341,8 +360,8 @@ with CodatPlatform(
341
360
security = shared.Security(
342
361
auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
343
362
),
344
- ) as s :
345
- res = s .settings.create_api_key(request = {
363
+ ) as codat_platform :
364
+ res = codat_platform .settings.create_api_key(request = {
346
365
" name" : " azure-invoice-finance-processor" ,
347
366
})
348
367
@@ -454,8 +473,8 @@ with CodatPlatform(
454
473
security = shared.Security(
455
474
auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
456
475
),
457
- ) as s :
458
- res = s .settings.create_api_key(request = {
476
+ ) as codat_platform :
477
+ res = codat_platform .settings.create_api_key(request = {
459
478
" name" : " azure-invoice-finance-processor" ,
460
479
})
461
480
0 commit comments