Skip to content

Commit

Permalink
Merge pull request #622 from codatio/speakeasy-sdk-regen-1733825306
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate Bank Feeds library BANK-FEEDS-LIBRARY 9.0.1
  • Loading branch information
dcoplowe authored Dec 10, 2024
2 parents b183dc6 + 2e6e4ce commit 0aa533b
Show file tree
Hide file tree
Showing 21 changed files with 326 additions and 239 deletions.
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
speakeasyVersion: 1.448.0
speakeasyVersion: 1.453.8
sources:
accounting-source:
sourceNamespace: accounting-source
Expand All @@ -16,11 +16,11 @@ sources:
- main
bank-feeds-source:
sourceNamespace: bank-feeds-source
sourceRevisionDigest: sha256:6ad044c90156a66bca28da8235c9ef07939d07cabbc86575e47259fec2af1409
sourceRevisionDigest: sha256:9133167d1473dc045331f1cfa81fb00aa3234e2b2b438f6808f576b259a76be8
sourceBlobDigest: sha256:b5233f0bab180b8aae271a0d5ab149316931ec9e84a140e1c073a2025305eb7d
tags:
- latest
- speakeasy-sdk-regen-1732634399
- speakeasy-sdk-regen-1733825306
- 3.0.0
banking-source:
sourceNamespace: banking-source
Expand Down Expand Up @@ -111,10 +111,10 @@ targets:
bank-feeds-library:
source: bank-feeds-source
sourceNamespace: bank-feeds-source
sourceRevisionDigest: sha256:6ad044c90156a66bca28da8235c9ef07939d07cabbc86575e47259fec2af1409
sourceRevisionDigest: sha256:9133167d1473dc045331f1cfa81fb00aa3234e2b2b438f6808f576b259a76be8
sourceBlobDigest: sha256:b5233f0bab180b8aae271a0d5ab149316931ec9e84a140e1c073a2025305eb7d
codeSamplesNamespace: bank-feeds-source-code-samples
codeSamplesRevisionDigest: sha256:474e77328fc049baa81c1fba73c58e0160d01cb3594417261e980046e4f00dfa
codeSamplesNamespace: bank-feeds-source-python-code-samples
codeSamplesRevisionDigest: sha256:213db3e6e8d49d181aa23b48af0e4b8fc917552e39fb8ef2a69edab2eaa52e67
banking-library:
source: banking-source
sourceNamespace: banking-source
Expand Down
34 changes: 29 additions & 5 deletions bank-feeds/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: 07093ad1-99d8-4bbd-a29c-a624e1b0e25a
management:
docChecksum: af010093774a298b2b6a17e641f9cd1b
docVersion: 3.0.0
speakeasyVersion: 1.446.1
generationVersion: 2.462.1
releaseVersion: 9.0.0
configChecksum: a1263ee2debf9d8e8034a743cd18f050
speakeasyVersion: 1.453.8
generationVersion: 2.474.15
releaseVersion: 9.0.1
configChecksum: 8ec4388e5997c479ecac5ec505c82d48
repoURL: https://github.com/codatio/client-sdk-python.git
repoSubDirectory: bank-feeds
installationURL: https://github.com/codatio/client-sdk-python.git#subdirectory=bank-feeds
Expand All @@ -15,7 +15,7 @@ features:
python:
additionalDependencies: 1.0.0
constsAndDefaults: 1.0.5
core: 5.6.8
core: 5.6.11
decimal: 1.0.0
defaultEnabledRetries: 0.2.0
deprecations: 3.0.0
Expand Down Expand Up @@ -1172,4 +1172,28 @@ examples:
responses:
"401":
application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
Client rate limit reached:
speakeasy-default-client-rate-limit-reached:
requestBody:
application/json: {"AlertId": "a9367074-b5c3-42c4-9be4-be129f43577e", "ClientId": "bae71d36-ff47-420a-b4a6-f8c9ddf41140", "ClientName": "Bank of Dave", "Data": {"DailyQuota": 1000, "ExpiresUtc": "2022-10-23T00:00:00Z"}, "Message": "The current daily rate limit quota of 1000 requests for bae71d36-ff47-420a-b4a6-f8c9ddf41140 has been reached.", "RuleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac", "RuleType": "Rate Limit Reached"}
Client rate limit reset:
speakeasy-default-client-rate-limit-reset:
requestBody:
application/json: {"AlertId": "a9367074-b5c3-42c4-9be4-be129f43577e", "ClientId": "bae71d36-ff47-420a-b4a6-f8c9ddf41140", "ClientName": "Bank of Dave", "Data": {"DailyQuota": 1000, "ExpiresUtc": "2022-10-23T00:00:00Z", "QuotaRemaining": 1000, "ResetReason": "The quota was reset because it is a new day."}, "Message": "The current daily rate limit quota for client 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e has been reset to 1000 requests.", "RuleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac", "RuleType": "Rate Limit Reset"}
bankFeeds.sourceAccount.connected:
Connected:
requestBody:
application/json: {"eventType": "bankFeeds.sourceAccount.connected", "generatedDate": "2022-10-23T00:00:00Z", "id": "ba29118f-5406-4e59-b05c-ba307ca38d01", "payload": {"connectionId": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "referenceCompany": {"description": "Requested early access to the new financing scheme.", "id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "links": {"portal": "https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary"}, "name": "Toft stores"}, "sourceAccount": {"accountName": "account-081", "accountNumber": "12345678", "balance": 99.99, "currency": "GBP", "id": "acc-002", "modifiedDate": "2023-01-09T14:14:14.105Z", "sortCode": "040004", "status": "pending"}}}
bankFeeds.sourceAccount.disconnected:
Disconnected:
requestBody:
application/json: {"eventType": "bankFeeds.sourceAccount.disconnected", "generatedDate": "2022-10-23T00:00:00Z", "id": "ba29118f-5406-4e59-b05c-ba307ca38d01", "payload": {"connectionId": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "referenceCompany": {"description": "Requested early access to the new financing scheme.", "id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "links": {"portal": "https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary"}, "name": "Toft stores"}, "sourceAccount": {"accountName": "account-081", "accountNumber": "12345678", "balance": 99.99, "currency": "GBP", "id": "acc-002", "modifiedDate": "2023-01-09T14:14:14.105Z", "sortCode": "040004", "status": "pending"}}}
client.rateLimit.reached:
Reached:
requestBody:
application/json: {"eventType": "client.rateLimit.reached", "generatedDate": "2024-09-01T00:00:00Z", "id": "743ec94a-8aa4-44bb-8bd4-e1855ee0e74b", "payload": {"dailyQuota": 12000, "expiryDate": "2024-09-01T12:14:14Z", "quotaRemaining": 0}}
client.rateLimit.reset:
Reset:
requestBody:
application/json: {"eventType": "client.rateLimit.reset", "generatedDate": "2024-09-01T00:00:00Z", "id": "743ec94a-8aa4-44bb-8bd4-e1855ee0e74b", "payload": {"dailyQuota": 12000, "expiryDate": "2024-09-01T23:59:99Z", "quotaRemaining": 11993}}
generatedTests: {}
2 changes: 1 addition & 1 deletion bank-feeds/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
oAuth2PasswordEnabled: false
telemetryEnabled: true
python:
version: 9.0.0
version: 9.0.1
additionalDependencies:
dev: {}
main: {}
Expand Down
135 changes: 87 additions & 48 deletions bank-feeds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,23 @@ A bank feed is a connection between a source bank account in your application an

<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [Bank Feeds](#bank-feeds)
* [Endpoints](#endpoints)
* [SDK Installation](#sdk-installation)
* [Example Usage](#example-usage)
* [IDE Support](#ide-support)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [File uploads](#file-uploads)
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Authentication](#authentication)
* [Debugging](#debugging)
* [Support](#support)

* [SDK Installation](#sdk-installation)
* [IDE Support](#ide-support)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [File uploads](#file-uploads)
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Authentication](#authentication)
* [Debugging](#debugging)
<!-- End Table of Contents [toc] -->

<!-- Start SDK Installation [installation] -->
Expand Down Expand Up @@ -86,20 +91,37 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
# Synchronous Example
from codat_bankfeeds import CodatBankFeeds
from codat_bankfeeds.models import shared

with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
"name": "Technicalium",
"description": "Requested early access to the new financing scheme.",
from decimal import Decimal

with CodatBankFeeds() as codat_bank_feeds:
codat_bank_feeds.bank_feeds_source_account_connected(request={
"event_type": "bankFeeds.sourceAccount.connected",
"generated_date": "2022-10-23T00:00:00Z",
"id": "ba29118f-5406-4e59-b05c-ba307ca38d01",
"payload": {
"connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
"reference_company": {
"description": "Requested early access to the new financing scheme.",
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"links": {
"portal": "https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary",
},
"name": "Toft stores",
},
"source_account": {
"id": "acc-002",
"account_name": "account-081",
"account_number": "12345678",
"balance": Decimal("99.99"),
"currency": "GBP",
"modified_date": "2023-01-09T14:14:14.105Z",
"sort_code": "040004",
"status": shared.Status.PENDING,
},
},
})

if res is not None:
# handle response
pass
# Use the SDK ...
```

</br>
Expand All @@ -110,21 +132,38 @@ The same SDK client can also be used to make asychronous requests by importing a
import asyncio
from codat_bankfeeds import CodatBankFeeds
from codat_bankfeeds.models import shared
from decimal import Decimal

async def main():
async with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = await s.companies.create_async(request={
"name": "Technicalium",
"description": "Requested early access to the new financing scheme.",
async with CodatBankFeeds() as codat_bank_feeds:
await codat_bank_feeds.bank_feeds_source_account_connected_async(request={
"event_type": "bankFeeds.sourceAccount.connected",
"generated_date": "2022-10-23T00:00:00Z",
"id": "ba29118f-5406-4e59-b05c-ba307ca38d01",
"payload": {
"connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
"reference_company": {
"description": "Requested early access to the new financing scheme.",
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"links": {
"portal": "https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary",
},
"name": "Toft stores",
},
"source_account": {
"id": "acc-002",
"account_name": "account-081",
"account_number": "12345678",
"balance": Decimal("99.99"),
"currency": "GBP",
"modified_date": "2023-01-09T14:14:14.105Z",
"sort_code": "040004",
"status": shared.Status.PENDING,
},
},
})

if res is not None:
# handle response
pass
# Use the SDK ...

asyncio.run(main())
```
Expand Down Expand Up @@ -220,8 +259,8 @@ with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.source_accounts.generate_credentials(request={
) as codat_bank_feeds:
res = codat_bank_feeds.source_accounts.generate_credentials(request={
"request_body": open("example.file", "rb"),
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
Expand All @@ -243,14 +282,14 @@ To change the default retry strategy for a single API call, simply provide a `Re
```python
from codat_bankfeeds import CodatBankFeeds
from codat_bankfeeds.models import shared
from codatbankfeeds.utils import BackoffStrategy, RetryConfig
from codat_bankfeeds.utils import BackoffStrategy, RetryConfig

with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
) as codat_bank_feeds:
res = codat_bank_feeds.companies.create(request={
"name": "Technicalium",
"description": "Requested early access to the new financing scheme.",
},
Expand All @@ -266,15 +305,15 @@ If you'd like to override the default retry strategy for all operations that sup
```python
from codat_bankfeeds import CodatBankFeeds
from codat_bankfeeds.models import shared
from codatbankfeeds.utils import BackoffStrategy, RetryConfig
from codat_bankfeeds.utils import BackoffStrategy, RetryConfig

with CodatBankFeeds(
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
) as codat_bank_feeds:
res = codat_bank_feeds.companies.create(request={
"name": "Technicalium",
"description": "Requested early access to the new financing scheme.",
})
Expand Down Expand Up @@ -319,10 +358,10 @@ with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
) as codat_bank_feeds:
res = None
try:
res = s.companies.create(request={
res = codat_bank_feeds.companies.create(request={
"name": "Technicalium",
"description": "Requested early access to the new financing scheme.",
})
Expand Down Expand Up @@ -357,8 +396,8 @@ with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
) as codat_bank_feeds:
res = codat_bank_feeds.companies.create(request={
"name": "Technicalium",
"description": "Requested early access to the new financing scheme.",
})
Expand Down Expand Up @@ -475,8 +514,8 @@ with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
) as codat_bank_feeds:
res = codat_bank_feeds.companies.create(request={
"name": "Technicalium",
"description": "Requested early access to the new financing scheme.",
})
Expand Down
12 changes: 11 additions & 1 deletion bank-feeds/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -818,4 +818,14 @@ Based on:
### Generated
- [python v9.0.0] bank-feeds
### Releases
- [PyPI v9.0.0] https://pypi.org/project/codat-bankfeeds/9.0.0 - bank-feeds
- [PyPI v9.0.0] https://pypi.org/project/codat-bankfeeds/9.0.0 - bank-feeds

## 2024-12-10 10:08:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.453.8 (2.474.15) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v9.0.1] bank-feeds
### Releases
- [PyPI v9.0.1] https://pypi.org/project/codat-bankfeeds/9.0.1 - bank-feeds
8 changes: 4 additions & 4 deletions bank-feeds/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
) as codat_bank_feeds:
res = codat_bank_feeds.companies.create(request={
"name": "Technicalium",
"description": "Requested early access to the new financing scheme.",
})
Expand All @@ -33,8 +33,8 @@ async def main():
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = await s.companies.create_async(request={
) as codat_bank_feeds:
res = await codat_bank_feeds.companies.create_async(request={
"name": "Technicalium",
"description": "Requested early access to the new financing scheme.",
})
Expand Down
8 changes: 4 additions & 4 deletions bank-feeds/docs/sdks/accountmapping/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.account_mapping.create(request={
) as codat_bank_feeds:
res = codat_bank_feeds.account_mapping.create(request={
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
"bank_feed_account_mapping": {
Expand Down Expand Up @@ -107,8 +107,8 @@ with CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.account_mapping.get(request={
) as codat_bank_feeds:
res = codat_bank_feeds.account_mapping.get(request={
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
})
Expand Down
Loading

0 comments on commit 0aa533b

Please sign in to comment.