@@ -32,17 +32,22 @@ Not seeing the endpoints you're expecting? We've [reorganized our products](http
3232
3333<!-- Start Table of Contents [toc] -->
3434## Table of Contents
35+ <!-- $toc-max-depth=2 -->
36+ * [ Sync for Commerce] ( #sync-for-commerce )
37+ * [ Endpoints] ( #endpoints )
38+ * [ SDK Installation] ( #sdk-installation )
39+ * [ Example Usage] ( #example-usage )
40+ * [ IDE Support] ( #ide-support )
41+ * [ SDK Example Usage] ( #sdk-example-usage )
42+ * [ Available Resources and Operations] ( #available-resources-and-operations )
43+ * [ Retries] ( #retries )
44+ * [ Error Handling] ( #error-handling )
45+ * [ Server Selection] ( #server-selection )
46+ * [ Custom HTTP Client] ( #custom-http-client )
47+ * [ Authentication] ( #authentication )
48+ * [ Debugging] ( #debugging )
49+ * [ Support] ( #support )
3550
36- * [ SDK Installation] ( #sdk-installation )
37- * [ IDE Support] ( #ide-support )
38- * [ SDK Example Usage] ( #sdk-example-usage )
39- * [ Available Resources and Operations] ( #available-resources-and-operations )
40- * [ Retries] ( #retries )
41- * [ Error Handling] ( #error-handling )
42- * [ Server Selection] ( #server-selection )
43- * [ Custom HTTP Client] ( #custom-http-client )
44- * [ Authentication] ( #authentication )
45- * [ Debugging] ( #debugging )
4651<!-- End Table of Contents [toc] -->
4752
4853<!-- Start SDK Installation [installation] -->
@@ -88,18 +93,33 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
8893from codat_sync_for_commerce import CodatSyncCommerce
8994from codat_sync_for_commerce.models import shared
9095
91- with CodatSyncCommerce(
92- security = shared.Security(
93- auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
94- ),
95- ) as s:
96- res = s.sync_flow_settings.get_config_text_sync_flow(request = {
97- " locale" : shared.Locale.EN_US ,
96+ with CodatSyncCommerce() as codat_sync_commerce:
97+ codat_sync_commerce.connection_deleted(request = {
98+ " event_type" : " connection.created" ,
99+ " generated_date" : " 2022-10-23T00:00:00Z" ,
100+ " id" : " ba29118f-5406-4e59-b05c-ba307ca38d01" ,
101+ " payload" : {
102+ " connection" : {
103+ " created" : " 2022-10-23T00:00:00Z" ,
104+ " id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
105+ " integration_id" : " fd321cb6-7963-4506-b873-e99593a45e30" ,
106+ " integration_key" : " dfxm" ,
107+ " link_url" : " https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start" ,
108+ " platform_name" : " Basiq" ,
109+ " source_id" : " 35b92968-9851-4095-ad60-395c95cbcba4" ,
110+ " source_type" : shared.SourceType.ACCOUNTING ,
111+ " status" : shared.DataConnectionStatus.LINKED ,
112+ " last_sync" : " 2022-10-23T00:00:00Z" ,
113+ },
114+ " reference_company" : {
115+ " description" : " Requested early access to the new financing scheme." ,
116+ " id" : " 8a210b68-6988-11ed-a1eb-0242ac120002" ,
117+ " name" : " Codat Ltd." ,
118+ },
119+ },
98120 })
99121
100- if res is not None :
101- # handle response
102- pass
122+ # Use the SDK ...
103123```
104124
105125</br >
@@ -112,18 +132,33 @@ from codat_sync_for_commerce import CodatSyncCommerce
112132from codat_sync_for_commerce.models import shared
113133
114134async def main ():
115- async with CodatSyncCommerce(
116- security = shared.Security(
117- auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
118- ),
119- ) as s:
120- res = await s.sync_flow_settings.get_config_text_sync_flow_async(request = {
121- " locale" : shared.Locale.EN_US ,
135+ async with CodatSyncCommerce() as codat_sync_commerce:
136+ await codat_sync_commerce.connection_deleted_async(request = {
137+ " event_type" : " connection.created" ,
138+ " generated_date" : " 2022-10-23T00:00:00Z" ,
139+ " id" : " ba29118f-5406-4e59-b05c-ba307ca38d01" ,
140+ " payload" : {
141+ " connection" : {
142+ " created" : " 2022-10-23T00:00:00Z" ,
143+ " id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
144+ " integration_id" : " fd321cb6-7963-4506-b873-e99593a45e30" ,
145+ " integration_key" : " dfxm" ,
146+ " link_url" : " https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start" ,
147+ " platform_name" : " Basiq" ,
148+ " source_id" : " 35b92968-9851-4095-ad60-395c95cbcba4" ,
149+ " source_type" : shared.SourceType.ACCOUNTING ,
150+ " status" : shared.DataConnectionStatus.LINKED ,
151+ " last_sync" : " 2022-10-23T00:00:00Z" ,
152+ },
153+ " reference_company" : {
154+ " description" : " Requested early access to the new financing scheme." ,
155+ " id" : " 8a210b68-6988-11ed-a1eb-0242ac120002" ,
156+ " name" : " Codat Ltd." ,
157+ },
158+ },
122159 })
123160
124- if res is not None :
125- # handle response
126- pass
161+ # Use the SDK ...
127162
128163asyncio.run(main())
129164```
@@ -187,14 +222,14 @@ To change the default retry strategy for a single API call, simply provide a `Re
187222``` python
188223from codat_sync_for_commerce import CodatSyncCommerce
189224from codat_sync_for_commerce.models import shared
190- from codatsynccommerce .utils import BackoffStrategy, RetryConfig
225+ from codat_sync_for_commerce .utils import BackoffStrategy, RetryConfig
191226
192227with CodatSyncCommerce(
193228 security = shared.Security(
194229 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
195230 ),
196- ) as s :
197- res = s .sync_flow_settings.get_config_text_sync_flow(request = {
231+ ) as codat_sync_commerce :
232+ res = codat_sync_commerce .sync_flow_settings.get_config_text_sync_flow(request = {
198233 " locale" : shared.Locale.EN_US ,
199234 },
200235 RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ))
@@ -209,15 +244,15 @@ If you'd like to override the default retry strategy for all operations that sup
209244``` python
210245from codat_sync_for_commerce import CodatSyncCommerce
211246from codat_sync_for_commerce.models import shared
212- from codatsynccommerce .utils import BackoffStrategy, RetryConfig
247+ from codat_sync_for_commerce .utils import BackoffStrategy, RetryConfig
213248
214249with CodatSyncCommerce(
215250 retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
216251 security = shared.Security(
217252 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
218253 ),
219- ) as s :
220- res = s .sync_flow_settings.get_config_text_sync_flow(request = {
254+ ) as codat_sync_commerce :
255+ res = codat_sync_commerce .sync_flow_settings.get_config_text_sync_flow(request = {
221256 " locale" : shared.Locale.EN_US ,
222257 })
223258
@@ -259,10 +294,10 @@ with CodatSyncCommerce(
259294 security = shared.Security(
260295 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
261296 ),
262- ) as s :
297+ ) as codat_sync_commerce :
263298 res = None
264299 try :
265- res = s .sync_flow_settings.get_config_text_sync_flow(request = {
300+ res = codat_sync_commerce .sync_flow_settings.get_config_text_sync_flow(request = {
266301 " locale" : shared.Locale.EN_US ,
267302 })
268303
@@ -294,8 +329,8 @@ with CodatSyncCommerce(
294329 security = shared.Security(
295330 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
296331 ),
297- ) as s :
298- res = s .sync_flow_settings.get_config_text_sync_flow(request = {
332+ ) as codat_sync_commerce :
333+ res = codat_sync_commerce .sync_flow_settings.get_config_text_sync_flow(request = {
299334 " locale" : shared.Locale.EN_US ,
300335 })
301336
@@ -407,8 +442,8 @@ with CodatSyncCommerce(
407442 security = shared.Security(
408443 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
409444 ),
410- ) as s :
411- res = s .sync_flow_settings.get_config_text_sync_flow(request = {
445+ ) as codat_sync_commerce :
446+ res = codat_sync_commerce .sync_flow_settings.get_config_text_sync_flow(request = {
412447 " locale" : shared.Locale.EN_US ,
413448 })
414449
0 commit comments