@@ -35,23 +35,20 @@ poetry add codat-sync-for-payables
3535``` python
3636# Synchronous Example
3737from codat_sync_for_payables import CodatSyncPayables
38- from codat_sync_for_payables.models import shared
3938
40- with CodatSyncPayables(
41- security = shared.Security(
42- auth_header = " Basic BASE_64_ENCODED(API_KEY) " ,
43- ) ,
44- ) as s:
45- res = s.companies.list( request = {
46- " page " : 1 ,
47- " page_size " : 100 ,
48- " query " : " id=e3334455-1aed-4e71-ab43-6bccf12092ee " ,
49- " order_by " : " -modifiedDate " ,
39+ with CodatSyncPayables() as codat_sync_payables:
40+ codat_sync_payables.client_rate_limit_reached( request = {
41+ " id " : " 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b " ,
42+ " event_type " : " client.rateLimit.reached " ,
43+ " generated_date " : " 2024-09-01T00:00:00Z " ,
44+ " payload " : {
45+ " daily_quota " : 12000 ,
46+ " quota_remaining " : 0 ,
47+ " expiry_date " : " 2024-09-01T12:14:14Z " ,
48+ } ,
5049 })
5150
52- if res is not None :
53- # handle response
54- pass
51+ # Use the SDK ...
5552```
5653
5754</br >
@@ -61,24 +58,21 @@ The same SDK client can also be used to make asychronous requests by importing a
6158# Asynchronous Example
6259import asyncio
6360from codat_sync_for_payables import CodatSyncPayables
64- from codat_sync_for_payables.models import shared
6561
6662async def main ():
67- async with CodatSyncPayables(
68- security = shared.Security(
69- auth_header = " Basic BASE_64_ENCODED(API_KEY) " ,
70- ) ,
71- ) as s:
72- res = await s.companies.list_async( request = {
73- " page " : 1 ,
74- " page_size " : 100 ,
75- " query " : " id=e3334455-1aed-4e71-ab43-6bccf12092ee " ,
76- " order_by " : " -modifiedDate " ,
63+ async with CodatSyncPayables() as codat_sync_payables:
64+ await codat_sync_payables.client_rate_limit_reached_async( request = {
65+ " id " : " 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b " ,
66+ " event_type " : " client.rateLimit.reached " ,
67+ " generated_date " : " 2024-09-01T00:00:00Z " ,
68+ " payload " : {
69+ " daily_quota " : 12000 ,
70+ " quota_remaining " : 0 ,
71+ " expiry_date " : " 2024-09-01T12:14:14Z " ,
72+ } ,
7773 })
7874
79- if res is not None :
80- # handle response
81- pass
75+ # Use the SDK ...
8276
8377asyncio.run(main())
8478```
@@ -174,18 +168,23 @@ The bill pay kit is an API and a set of supporting tools designed to integrate a
174168
175169<!-- Start Table of Contents [toc] -->
176170## Table of Contents
171+ <!-- $toc-max-depth=2 -->
172+ * [ SDK Installation] ( #sdk-installation )
173+ * [ Example Usage] ( #example-usage )
174+ * [ SDK Example Usage] ( #sdk-example-usage )
175+ * [ Available Resources and Operations] ( #available-resources-and-operations )
176+ * [ Supported Integrations] ( #supported-integrations )
177+ * [ Endpoints] ( #endpoints )
178+ * [ IDE Support] ( #ide-support )
179+ * [ File uploads] ( #file-uploads )
180+ * [ Retries] ( #retries )
181+ * [ Error Handling] ( #error-handling )
182+ * [ Server Selection] ( #server-selection )
183+ * [ Custom HTTP Client] ( #custom-http-client )
184+ * [ Authentication] ( #authentication )
185+ * [ Debugging] ( #debugging )
186+ * [ Support] ( #support )
177187
178- * [ SDK Installation] ( #sdk-installation )
179- * [ IDE Support] ( #ide-support )
180- * [ SDK Example Usage] ( #sdk-example-usage )
181- * [ Available Resources and Operations] ( #available-resources-and-operations )
182- * [ File uploads] ( #file-uploads )
183- * [ Retries] ( #retries )
184- * [ Error Handling] ( #error-handling )
185- * [ Server Selection] ( #server-selection )
186- * [ Custom HTTP Client] ( #custom-http-client )
187- * [ Authentication] ( #authentication )
188- * [ Debugging] ( #debugging )
189188<!-- End Table of Contents [toc] -->
190189
191190<!-- Start IDE Support [idesupport] -->
@@ -216,8 +215,8 @@ with CodatSyncPayables(
216215 security = shared.Security(
217216 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
218217 ),
219- ) as s :
220- res = s .bills.upload_attachment(request = {
218+ ) as codat_sync_payables :
219+ res = codat_sync_payables .bills.upload_attachment(request = {
221220 " company_id" : " 8a210b68-6988-11ed-a1eb-0242ac120002" ,
222221 " connection_id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
223222 " bill_id" : " EILBDVJVNUAGVKRQ" ,
@@ -239,14 +238,14 @@ To change the default retry strategy for a single API call, simply provide a `Re
239238``` python
240239from codat_sync_for_payables import CodatSyncPayables
241240from codat_sync_for_payables.models import shared
242- from codatsyncpayables .utils import BackoffStrategy, RetryConfig
241+ from codat_sync_for_payables .utils import BackoffStrategy, RetryConfig
243242
244243with CodatSyncPayables(
245244 security = shared.Security(
246245 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
247246 ),
248- ) as s :
249- res = s .companies.list(request = {
247+ ) as codat_sync_payables :
248+ res = codat_sync_payables .companies.list(request = {
250249 " page" : 1 ,
251250 " page_size" : 100 ,
252251 " query" : " id=e3334455-1aed-4e71-ab43-6bccf12092ee" ,
@@ -264,15 +263,15 @@ If you'd like to override the default retry strategy for all operations that sup
264263``` python
265264from codat_sync_for_payables import CodatSyncPayables
266265from codat_sync_for_payables.models import shared
267- from codatsyncpayables .utils import BackoffStrategy, RetryConfig
266+ from codat_sync_for_payables .utils import BackoffStrategy, RetryConfig
268267
269268with CodatSyncPayables(
270269 retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
271270 security = shared.Security(
272271 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
273272 ),
274- ) as s :
275- res = s .companies.list(request = {
273+ ) as codat_sync_payables :
274+ res = codat_sync_payables .companies.list(request = {
276275 " page" : 1 ,
277276 " page_size" : 100 ,
278277 " query" : " id=e3334455-1aed-4e71-ab43-6bccf12092ee" ,
@@ -317,10 +316,10 @@ with CodatSyncPayables(
317316 security = shared.Security(
318317 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
319318 ),
320- ) as s :
319+ ) as codat_sync_payables :
321320 res = None
322321 try :
323- res = s .companies.list(request = {
322+ res = codat_sync_payables .companies.list(request = {
324323 " page" : 1 ,
325324 " page_size" : 100 ,
326325 " query" : " id=e3334455-1aed-4e71-ab43-6bccf12092ee" ,
@@ -355,8 +354,8 @@ with CodatSyncPayables(
355354 security = shared.Security(
356355 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
357356 ),
358- ) as s :
359- res = s .companies.list(request = {
357+ ) as codat_sync_payables :
358+ res = codat_sync_payables .companies.list(request = {
360359 " page" : 1 ,
361360 " page_size" : 100 ,
362361 " query" : " id=e3334455-1aed-4e71-ab43-6bccf12092ee" ,
@@ -471,8 +470,8 @@ with CodatSyncPayables(
471470 security = shared.Security(
472471 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
473472 ),
474- ) as s :
475- res = s .companies.list(request = {
473+ ) as codat_sync_payables :
474+ res = codat_sync_payables .companies.list(request = {
476475 " page" : 1 ,
477476 " page_size" : 100 ,
478477 " query" : " id=e3334455-1aed-4e71-ab43-6bccf12092ee" ,
0 commit comments