@@ -30,18 +30,23 @@ A bank feed is a connection between a source bank account in your application an
3030
3131<!-- Start Table of Contents [toc] -->
3232## Table of Contents
33+ <!-- $toc-max-depth=2 -->
34+ * [ Bank Feeds] ( #bank-feeds )
35+ * [ Endpoints] ( #endpoints )
36+ * [ SDK Installation] ( #sdk-installation )
37+ * [ Example Usage] ( #example-usage )
38+ * [ IDE Support] ( #ide-support )
39+ * [ SDK Example Usage] ( #sdk-example-usage )
40+ * [ Available Resources and Operations] ( #available-resources-and-operations )
41+ * [ File uploads] ( #file-uploads )
42+ * [ Retries] ( #retries )
43+ * [ Error Handling] ( #error-handling )
44+ * [ Server Selection] ( #server-selection )
45+ * [ Custom HTTP Client] ( #custom-http-client )
46+ * [ Authentication] ( #authentication )
47+ * [ Debugging] ( #debugging )
48+ * [ Support] ( #support )
3349
34- * [ SDK Installation] ( #sdk-installation )
35- * [ IDE Support] ( #ide-support )
36- * [ SDK Example Usage] ( #sdk-example-usage )
37- * [ Available Resources and Operations] ( #available-resources-and-operations )
38- * [ File uploads] ( #file-uploads )
39- * [ Retries] ( #retries )
40- * [ Error Handling] ( #error-handling )
41- * [ Server Selection] ( #server-selection )
42- * [ Custom HTTP Client] ( #custom-http-client )
43- * [ Authentication] ( #authentication )
44- * [ Debugging] ( #debugging )
4550<!-- End Table of Contents [toc] -->
4651
4752<!-- Start SDK Installation [installation] -->
@@ -86,20 +91,37 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
8691# Synchronous Example
8792from codat_bankfeeds import CodatBankFeeds
8893from codat_bankfeeds.models import shared
89-
90- with CodatBankFeeds(
91- security = shared.Security(
92- auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
93- ),
94- ) as s:
95- res = s.companies.create(request = {
96- " name" : " Technicalium" ,
97- " description" : " Requested early access to the new financing scheme." ,
94+ from decimal import Decimal
95+
96+ with CodatBankFeeds() as codat_bank_feeds:
97+ codat_bank_feeds.bank_feeds_source_account_connected(request = {
98+ " event_type" : " bankFeeds.sourceAccount.connected" ,
99+ " generated_date" : " 2022-10-23T00:00:00Z" ,
100+ " id" : " ba29118f-5406-4e59-b05c-ba307ca38d01" ,
101+ " payload" : {
102+ " connection_id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
103+ " reference_company" : {
104+ " description" : " Requested early access to the new financing scheme." ,
105+ " id" : " 0498e921-9b53-4396-a412-4f2f5983b0a2" ,
106+ " links" : {
107+ " portal" : " https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary" ,
108+ },
109+ " name" : " Toft stores" ,
110+ },
111+ " source_account" : {
112+ " id" : " acc-002" ,
113+ " account_name" : " account-081" ,
114+ " account_number" : " 12345678" ,
115+ " balance" : Decimal(" 99.99" ),
116+ " currency" : " GBP" ,
117+ " modified_date" : " 2023-01-09T14:14:14.105Z" ,
118+ " sort_code" : " 040004" ,
119+ " status" : shared.Status.PENDING ,
120+ },
121+ },
98122 })
99123
100- if res is not None :
101- # handle response
102- pass
124+ # Use the SDK ...
103125```
104126
105127</br >
@@ -110,21 +132,38 @@ The same SDK client can also be used to make asychronous requests by importing a
110132import asyncio
111133from codat_bankfeeds import CodatBankFeeds
112134from codat_bankfeeds.models import shared
135+ from decimal import Decimal
113136
114137async def main ():
115- async with CodatBankFeeds(
116- security = shared.Security(
117- auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
118- ),
119- ) as s:
120- res = await s.companies.create_async(request = {
121- " name" : " Technicalium" ,
122- " description" : " Requested early access to the new financing scheme." ,
138+ async with CodatBankFeeds() as codat_bank_feeds:
139+ await codat_bank_feeds.bank_feeds_source_account_connected_async(request = {
140+ " event_type" : " bankFeeds.sourceAccount.connected" ,
141+ " generated_date" : " 2022-10-23T00:00:00Z" ,
142+ " id" : " ba29118f-5406-4e59-b05c-ba307ca38d01" ,
143+ " payload" : {
144+ " connection_id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
145+ " reference_company" : {
146+ " description" : " Requested early access to the new financing scheme." ,
147+ " id" : " 0498e921-9b53-4396-a412-4f2f5983b0a2" ,
148+ " links" : {
149+ " portal" : " https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary" ,
150+ },
151+ " name" : " Toft stores" ,
152+ },
153+ " source_account" : {
154+ " id" : " acc-002" ,
155+ " account_name" : " account-081" ,
156+ " account_number" : " 12345678" ,
157+ " balance" : Decimal(" 99.99" ),
158+ " currency" : " GBP" ,
159+ " modified_date" : " 2023-01-09T14:14:14.105Z" ,
160+ " sort_code" : " 040004" ,
161+ " status" : shared.Status.PENDING ,
162+ },
163+ },
123164 })
124165
125- if res is not None :
126- # handle response
127- pass
166+ # Use the SDK ...
128167
129168asyncio.run(main())
130169```
@@ -220,8 +259,8 @@ with CodatBankFeeds(
220259 security = shared.Security(
221260 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
222261 ),
223- ) as s :
224- res = s .source_accounts.generate_credentials(request = {
262+ ) as codat_bank_feeds :
263+ res = codat_bank_feeds .source_accounts.generate_credentials(request = {
225264 " request_body" : open (" example.file" , " rb" ),
226265 " company_id" : " 8a210b68-6988-11ed-a1eb-0242ac120002" ,
227266 " connection_id" : " 2e9d2c44-f675-40ba-8049-353bfcb5e171" ,
@@ -243,14 +282,14 @@ To change the default retry strategy for a single API call, simply provide a `Re
243282``` python
244283from codat_bankfeeds import CodatBankFeeds
245284from codat_bankfeeds.models import shared
246- from codatbankfeeds .utils import BackoffStrategy, RetryConfig
285+ from codat_bankfeeds .utils import BackoffStrategy, RetryConfig
247286
248287with CodatBankFeeds(
249288 security = shared.Security(
250289 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
251290 ),
252- ) as s :
253- res = s .companies.create(request = {
291+ ) as codat_bank_feeds :
292+ res = codat_bank_feeds .companies.create(request = {
254293 " name" : " Technicalium" ,
255294 " description" : " Requested early access to the new financing scheme." ,
256295 },
@@ -266,15 +305,15 @@ If you'd like to override the default retry strategy for all operations that sup
266305``` python
267306from codat_bankfeeds import CodatBankFeeds
268307from codat_bankfeeds.models import shared
269- from codatbankfeeds .utils import BackoffStrategy, RetryConfig
308+ from codat_bankfeeds .utils import BackoffStrategy, RetryConfig
270309
271310with CodatBankFeeds(
272311 retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
273312 security = shared.Security(
274313 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
275314 ),
276- ) as s :
277- res = s .companies.create(request = {
315+ ) as codat_bank_feeds :
316+ res = codat_bank_feeds .companies.create(request = {
278317 " name" : " Technicalium" ,
279318 " description" : " Requested early access to the new financing scheme." ,
280319 })
@@ -319,10 +358,10 @@ with CodatBankFeeds(
319358 security = shared.Security(
320359 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
321360 ),
322- ) as s :
361+ ) as codat_bank_feeds :
323362 res = None
324363 try :
325- res = s .companies.create(request = {
364+ res = codat_bank_feeds .companies.create(request = {
326365 " name" : " Technicalium" ,
327366 " description" : " Requested early access to the new financing scheme." ,
328367 })
@@ -357,8 +396,8 @@ with CodatBankFeeds(
357396 security = shared.Security(
358397 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
359398 ),
360- ) as s :
361- res = s .companies.create(request = {
399+ ) as codat_bank_feeds :
400+ res = codat_bank_feeds .companies.create(request = {
362401 " name" : " Technicalium" ,
363402 " description" : " Requested early access to the new financing scheme." ,
364403 })
@@ -475,8 +514,8 @@ with CodatBankFeeds(
475514 security = shared.Security(
476515 auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
477516 ),
478- ) as s :
479- res = s .companies.create(request = {
517+ ) as codat_bank_feeds :
518+ res = codat_bank_feeds .companies.create(request = {
480519 " name" : " Technicalium" ,
481520 " description" : " Requested early access to the new financing scheme." ,
482521 })
0 commit comments