@@ -98,22 +98,23 @@ from codat_platform import CodatPlatform
98
98
from codat_platform.models import shared
99
99
100
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" ,
116
- })
101
+
102
+ codat_platform.company_data_connection_status_changed(request = shared.ConnectionStatusChangedWebhook(
103
+ alert_id = " a9367074-b5c3-42c4-9be4-be129f43577e" ,
104
+ client_id = " bae71d36-ff47-420a-b4a6-f8c9ddf41140" ,
105
+ client_name = " Bank of Dave" ,
106
+ company_id = " 8a210b68-6988-11ed-a1eb-0242ac120002" ,
107
+ data = shared.ConnectionStatusChangedWebhookData(
108
+ data_connection_id = " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
109
+ new_status = shared.DataConnectionStatus.LINKED ,
110
+ old_status = shared.DataConnectionStatus.PENDING_AUTH ,
111
+ platform_key = " gbol" ,
112
+ ),
113
+ data_connection_id = " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
114
+ message = " Data connection for SandBox status changed from PendingAuth to Linked" ,
115
+ rule_id = " 70af3071-65d9-4ec3-b3cb-5283e8d55dac" ,
116
+ rule_type = " DataConnectionStatusChanged" ,
117
+ ))
117
118
118
119
# Use the SDK ...
119
120
```
@@ -129,22 +130,23 @@ from codat_platform.models import shared
129
130
130
131
async def main ():
131
132
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" ,
147
- })
133
+
134
+ await codat_platform.company_data_connection_status_changed_async(request = shared.ConnectionStatusChangedWebhook(
135
+ alert_id = " a9367074-b5c3-42c4-9be4-be129f43577e" ,
136
+ client_id = " bae71d36-ff47-420a-b4a6-f8c9ddf41140" ,
137
+ client_name = " Bank of Dave" ,
138
+ company_id = " 8a210b68-6988-11ed-a1eb-0242ac120002" ,
139
+ data = shared.ConnectionStatusChangedWebhookData(
140
+ data_connection_id = " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
141
+ new_status = shared.DataConnectionStatus.LINKED ,
142
+ old_status = shared.DataConnectionStatus.PENDING_AUTH ,
143
+ platform_key = " gbol" ,
144
+ ),
145
+ data_connection_id = " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
146
+ message = " Data connection for SandBox status changed from PendingAuth to Linked" ,
147
+ rule_id = " 70af3071-65d9-4ec3-b3cb-5283e8d55dac" ,
148
+ rule_type = " DataConnectionStatusChanged" ,
149
+ ))
148
150
149
151
# Use the SDK ...
150
152
@@ -170,14 +172,9 @@ asyncio.run(main())
170
172
* [ remove_product] ( docs/sdks/companies/README.md#remove_product ) - Remove product
171
173
* [ update] ( docs/sdks/companies/README.md#update ) - Update company
172
174
173
- ### [ connection_management] ( docs/sdks/connectionmanagement/README.md )
174
-
175
- * [ get_access_token] ( docs/sdks/connectionmanagement/README.md#get_access_token ) - Get access token
175
+ ### [ ~~ connection_management~~ ] ( docs/sdks/connectionmanagement/README.md )
176
176
177
- #### [ connection_management.cors_settings] ( docs/sdks/corssettings/README.md )
178
-
179
- * [ get] ( docs/sdks/corssettings/README.md#get ) - Get CORS settings
180
- * [ set] ( docs/sdks/corssettings/README.md#set ) - Set CORS settings
177
+ * [ ~~ get~~ ] ( docs/sdks/connectionmanagement/README.md#get ) - Get access token (old) :warning : ** Deprecated** Use [ get_access_token] ( docs/sdks/companies/README.md#get_access_token ) instead.
181
178
182
179
### [ connections] ( docs/sdks/connections/README.md )
183
180
@@ -188,6 +185,11 @@ asyncio.run(main())
188
185
* [ unlink] ( docs/sdks/connections/README.md#unlink ) - Unlink connection
189
186
* [ update_authorization] ( docs/sdks/connections/README.md#update_authorization ) - Update authorization
190
187
188
+ ### [ cors] ( docs/sdks/cors/README.md )
189
+
190
+ * [ get] ( docs/sdks/cors/README.md#get ) - Get CORS settings
191
+ * [ set] ( docs/sdks/cors/README.md#set ) - Set CORS settings
192
+
191
193
### [ custom_data_type] ( docs/sdks/customdatatype/README.md )
192
194
193
195
* [ configure] ( docs/sdks/customdatatype/README.md#configure ) - Configure custom data type
@@ -260,14 +262,16 @@ with CodatPlatform(
260
262
auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
261
263
),
262
264
) as codat_platform:
265
+
263
266
res = codat_platform.settings.create_api_key(request = {
264
267
" name" : " azure-invoice-finance-processor" ,
265
268
},
266
269
RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ))
267
270
268
- if res is not None :
269
- # handle response
270
- pass
271
+ assert res is not None
272
+
273
+ # Handle response
274
+ print (res)
271
275
272
276
```
273
277
@@ -283,13 +287,15 @@ with CodatPlatform(
283
287
auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
284
288
),
285
289
) as codat_platform:
290
+
286
291
res = codat_platform.settings.create_api_key(request = {
287
292
" name" : " azure-invoice-finance-processor" ,
288
293
})
289
294
290
- if res is not None :
291
- # handle response
292
- pass
295
+ assert res is not None
296
+
297
+ # Handle response
298
+ print (res)
293
299
294
300
```
295
301
<!-- End Retries [retries] -->
@@ -328,13 +334,15 @@ with CodatPlatform(
328
334
) as codat_platform:
329
335
res = None
330
336
try :
337
+
331
338
res = codat_platform.settings.create_api_key(request = {
332
339
" name" : " azure-invoice-finance-processor" ,
333
340
})
334
341
335
- if res is not None :
336
- # handle response
337
- pass
342
+ assert res is not None
343
+
344
+ # Handle response
345
+ print (res)
338
346
339
347
except errors.ErrorMessage as e:
340
348
# handle e.data: errors.ErrorMessageData
@@ -361,13 +369,15 @@ with CodatPlatform(
361
369
auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
362
370
),
363
371
) as codat_platform:
372
+
364
373
res = codat_platform.settings.create_api_key(request = {
365
374
" name" : " azure-invoice-finance-processor" ,
366
375
})
367
376
368
- if res is not None :
369
- # handle response
370
- pass
377
+ assert res is not None
378
+
379
+ # Handle response
380
+ print (res)
371
381
372
382
```
373
383
<!-- End Server Selection [server] -->
@@ -474,13 +484,15 @@ with CodatPlatform(
474
484
auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
475
485
),
476
486
) as codat_platform:
487
+
477
488
res = codat_platform.settings.create_api_key(request = {
478
489
" name" : " azure-invoice-finance-processor" ,
479
490
})
480
491
481
- if res is not None :
482
- # handle response
483
- pass
492
+ assert res is not None
493
+
494
+ # Handle response
495
+ print (res)
484
496
485
497
```
486
498
<!-- End Authentication [security] -->
0 commit comments