@@ -98,22 +98,23 @@ from codat_platform import CodatPlatform
9898from codat_platform.models import shared
9999
100100with 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+ ))
117118
118119 # Use the SDK ...
119120```
@@ -129,22 +130,23 @@ from codat_platform.models import shared
129130
130131async def main ():
131132 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+ ))
148150
149151 # Use the SDK ...
150152
@@ -170,14 +172,9 @@ asyncio.run(main())
170172* [ remove_product] ( docs/sdks/companies/README.md#remove_product ) - Remove product
171173* [ update] ( docs/sdks/companies/README.md#update ) - Update company
172174
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 )
176176
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.
181178
182179### [ connections] ( docs/sdks/connections/README.md )
183180
@@ -188,6 +185,11 @@ asyncio.run(main())
188185* [ unlink] ( docs/sdks/connections/README.md#unlink ) - Unlink connection
189186* [ update_authorization] ( docs/sdks/connections/README.md#update_authorization ) - Update authorization
190187
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+
191193### [ custom_data_type] ( docs/sdks/customdatatype/README.md )
192194
193195* [ configure] ( docs/sdks/customdatatype/README.md#configure ) - Configure custom data type
@@ -260,14 +262,16 @@ with CodatPlatform(
260262 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
261263 ),
262264) as codat_platform:
265+
263266 res = codat_platform.settings.create_api_key(request = {
264267 " name" : " azure-invoice-finance-processor" ,
265268 },
266269 RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ))
267270
268- if res is not None :
269- # handle response
270- pass
271+ assert res is not None
272+
273+ # Handle response
274+ print (res)
271275
272276```
273277
@@ -283,13 +287,15 @@ with CodatPlatform(
283287 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
284288 ),
285289) as codat_platform:
290+
286291 res = codat_platform.settings.create_api_key(request = {
287292 " name" : " azure-invoice-finance-processor" ,
288293 })
289294
290- if res is not None :
291- # handle response
292- pass
295+ assert res is not None
296+
297+ # Handle response
298+ print (res)
293299
294300```
295301<!-- End Retries [retries] -->
@@ -328,13 +334,15 @@ with CodatPlatform(
328334) as codat_platform:
329335 res = None
330336 try :
337+
331338 res = codat_platform.settings.create_api_key(request = {
332339 " name" : " azure-invoice-finance-processor" ,
333340 })
334341
335- if res is not None :
336- # handle response
337- pass
342+ assert res is not None
343+
344+ # Handle response
345+ print (res)
338346
339347 except errors.ErrorMessage as e:
340348 # handle e.data: errors.ErrorMessageData
@@ -361,13 +369,15 @@ with CodatPlatform(
361369 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
362370 ),
363371) as codat_platform:
372+
364373 res = codat_platform.settings.create_api_key(request = {
365374 " name" : " azure-invoice-finance-processor" ,
366375 })
367376
368- if res is not None :
369- # handle response
370- pass
377+ assert res is not None
378+
379+ # Handle response
380+ print (res)
371381
372382```
373383<!-- End Server Selection [server] -->
@@ -474,13 +484,15 @@ with CodatPlatform(
474484 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
475485 ),
476486) as codat_platform:
487+
477488 res = codat_platform.settings.create_api_key(request = {
478489 " name" : " azure-invoice-finance-processor" ,
479490 })
480491
481- if res is not None :
482- # handle response
483- pass
492+ assert res is not None
493+
494+ # Handle response
495+ print (res)
484496
485497```
486498<!-- End Authentication [security] -->
0 commit comments