Skip to content

Commit

Permalink
Merge pull request #626 from codatio/speakeasy-sdk-regen-1733826174
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate Sync for Expenses library SYNC-FOR-EXPENSES-LIBRARY 7.0.1
  • Loading branch information
dcoplowe authored Dec 10, 2024
2 parents 7e6e8d8 + b85f08a commit 3600a34
Show file tree
Hide file tree
Showing 30 changed files with 332 additions and 271 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ sources:
- "1.1"
sync-for-expenses-source:
sourceNamespace: sync-for-expenses-source
sourceRevisionDigest: sha256:41e2e01d05c1e741182977bc257561fbf22e7d1e144dc86afa13000cc0d713d9
sourceRevisionDigest: sha256:e60ac3b8ca5e89b501cd2ce3274beb969f3ef05c2624ed101bd505c237d8fe82
sourceBlobDigest: sha256:abe56a70fc7e5c5883c7e8a6bef59d69ceb2dc4eddbb3106ae06b6c5acb38408
tags:
- latest
- speakeasy-sdk-regen-1732638431
- speakeasy-sdk-regen-1733826174
- prealpha
sync-for-payables-source:
sourceNamespace: sync-for-payables-source
Expand Down Expand Up @@ -159,10 +159,10 @@ targets:
sync-for-expenses-library:
source: sync-for-expenses-source
sourceNamespace: sync-for-expenses-source
sourceRevisionDigest: sha256:41e2e01d05c1e741182977bc257561fbf22e7d1e144dc86afa13000cc0d713d9
sourceRevisionDigest: sha256:e60ac3b8ca5e89b501cd2ce3274beb969f3ef05c2624ed101bd505c237d8fe82
sourceBlobDigest: sha256:abe56a70fc7e5c5883c7e8a6bef59d69ceb2dc4eddbb3106ae06b6c5acb38408
codeSamplesNamespace: sync-for-expenses-source-code-samples
codeSamplesRevisionDigest: sha256:e6d7dcebdfe01aa1632ae52a84b8845df637387eab47239f688b8c827b10045b
codeSamplesNamespace: sync-for-expenses-source-python-code-samples
codeSamplesRevisionDigest: sha256:6e93c873ec2b973bec09d3aba9c80da9cb80998a324225092e6e1f3737411c96
sync-for-payables-library:
source: sync-for-payables-source
sourceNamespace: sync-for-payables-source
Expand Down
44 changes: 38 additions & 6 deletions sync-for-expenses/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: a2c830ee-4f93-4e8e-8f01-48d0991317f5
management:
docChecksum: c99953b67f6a5e5522a0340e273decdb
docVersion: prealpha
speakeasyVersion: 1.447.0
generationVersion: 2.463.0
releaseVersion: 7.0.0
configChecksum: 6f483801042fce2cb5d58c6bbeaa9ed1
speakeasyVersion: 1.453.8
generationVersion: 2.474.15
releaseVersion: 7.0.1
configChecksum: 748c8b0d651d25e7b0b603920971a83e
repoURL: https://github.com/codatio/client-sdk-python.git
repoSubDirectory: sync-for-expenses
installationURL: https://github.com/codatio/client-sdk-python.git#subdirectory=sync-for-expenses
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 @@ -1381,7 +1381,7 @@ examples:
path:
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
customerId: "7110701885"
customerId: "EILBDVJVNUAGVKRQ"
query: {}
requestBody:
application/json: {"contacts": [{"modifiedDate": "2022-10-23T00:00:00Z", "phone": [{"number": "01224 658 999", "type": "Fax"}], "status": "Active"}, {"modifiedDate": "2022-10-23T00:00:00Z", "phone": [], "status": "Archived"}, {"modifiedDate": "2022-10-23T00:00:00Z", "phone": [{"number": "+44 25691 154789", "type": "Primary"}], "status": "Archived"}], "defaultCurrency": "EUR", "modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "status": "Archived"}
Expand Down Expand Up @@ -2267,4 +2267,36 @@ examples:
responses:
"400":
application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400}
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"}
SyncCompleted:
speakeasy-default-sync-completed:
requestBody:
application/json: {"AlertId": "33a4f8e9-09ae-4334-9b00-7bbe83024672", "ClientId": "30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e", "ClientName": "Expense Sync", "CompanyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "Data": {"syncId": "a9367074-b5c3-42c4-9be4-be129f43577e", "syncType": "Expense"}, "Message": "Sync 321363b4-efa9-4fbc-b71c-0b58d62f3248 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense completed successfully.", "RuleId": "5c27631d-3b63-4b50-8228-ee502fd113eb", "RuleType": "Sync Completed"}
SyncFailed:
speakeasy-default-sync-failed:
requestBody:
application/json: {"AlertId": "72c1103b-7f17-4a3a-8db5-67c2d360a516", "ClientId": "30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e", "ClientName": "Expense Sync", "CompanyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "Data": {"FailureStage": "Pushing", "syncId": "a9367074-b5c3-42c4-9be4-be129f43577e", "syncType": "Expense"}, "Message": "Sync 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense has failed at step Pushing.", "RuleId": "289c80dc-2aee-4b71-afff-9acd8d051080", "RuleType": "Sync Failed"}
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}}
expenses.sync.successful:
Successful:
requestBody:
application/json: {"eventType": "expenses.sync.successful", "generatedDate": "2024-09-01T00:00:00Z", "id": "ba29118f-5406-4e59-b05c-ba307ca38d01", "payload": {"referenceCompany": {"description": "Syncing expenses", "id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "Toft stores"}, "syncId": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "transactions": [{"errorMessage": null, "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "status": "Completed"}, {"errorMessage": null, "id": "e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4", "status": "Completed"}]}}
expenses.sync.unsuccessful:
Unsuccessful:
requestBody:
application/json: {"eventType": "expenses.sync.unsuccessful", "generatedDate": "2024-09-01T00:00:00Z", "id": "ba29118f-5406-4e59-b05c-ba307ca38d01", "payload": {"referenceCompany": {"description": "Syncing expenses", "id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "Toft stores"}, "syncId": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "transactions": [{"errorMessage": null, "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "status": "Completed"}, {"errorMessage": "Insufficient funds", "id": "e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4", "status": "Failed"}]}}
generatedTests: {}
2 changes: 1 addition & 1 deletion sync-for-expenses/.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: 7.0.0
version: 7.0.1
additionalDependencies:
dev: {}
main: {}
Expand Down
99 changes: 52 additions & 47 deletions sync-for-expenses/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,23 @@ Not seeing the endpoints you're expecting? We've [reorganized our products](http

<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [Sync for Expenses](#sync-for-expenses)
* [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 @@ -97,20 +102,20 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
```python
# Synchronous Example
from codat_sync_for_expenses import CodatSyncExpenses
from codat_sync_for_expenses.models import shared

with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
"name": "Technicalium",
with CodatSyncExpenses() as codat_sync_expenses:
codat_sync_expenses.client_rate_limit_reached(request={
"event_type": "client.rateLimit.reached",
"generated_date": "2024-09-01T00:00:00Z",
"id": "743ec94a-8aa4-44bb-8bd4-e1855ee0e74b",
"payload": {
"daily_quota": 12000,
"expiry_date": "2024-09-01T12:14:14Z",
"quota_remaining": 0,
},
})

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

</br>
Expand All @@ -120,21 +125,21 @@ The same SDK client can also be used to make asychronous requests by importing a
# Asynchronous Example
import asyncio
from codat_sync_for_expenses import CodatSyncExpenses
from codat_sync_for_expenses.models import shared

async def main():
async with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = await s.companies.create_async(request={
"name": "Technicalium",
async with CodatSyncExpenses() as codat_sync_expenses:
await codat_sync_expenses.client_rate_limit_reached_async(request={
"event_type": "client.rateLimit.reached",
"generated_date": "2024-09-01T00:00:00Z",
"id": "743ec94a-8aa4-44bb-8bd4-e1855ee0e74b",
"payload": {
"daily_quota": 12000,
"expiry_date": "2024-09-01T12:14:14Z",
"quota_remaining": 0,
},
})

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

asyncio.run(main())
```
Expand Down Expand Up @@ -271,8 +276,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.attachments.upload(request={
) as codat_sync_expenses:
res = codat_sync_expenses.attachments.upload(request={
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"sync_id": "6fb40d5e-b13e-11ed-afa1-0242ac120002",
"transaction_id": "336694d8-2dca-4cb5-a28d-3ccb83e55eee",
Expand All @@ -294,14 +299,14 @@ To change the default retry strategy for a single API call, simply provide a `Re
```python
from codat_sync_for_expenses import CodatSyncExpenses
from codat_sync_for_expenses.models import shared
from codatsyncexpenses.utils import BackoffStrategy, RetryConfig
from codat_sync_for_expenses.utils import BackoffStrategy, RetryConfig

with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
) as codat_sync_expenses:
res = codat_sync_expenses.companies.create(request={
"name": "Technicalium",
},
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
Expand All @@ -316,15 +321,15 @@ If you'd like to override the default retry strategy for all operations that sup
```python
from codat_sync_for_expenses import CodatSyncExpenses
from codat_sync_for_expenses.models import shared
from codatsyncexpenses.utils import BackoffStrategy, RetryConfig
from codat_sync_for_expenses.utils import BackoffStrategy, RetryConfig

with CodatSyncExpenses(
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_sync_expenses:
res = codat_sync_expenses.companies.create(request={
"name": "Technicalium",
})

Expand Down Expand Up @@ -366,10 +371,10 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
) as codat_sync_expenses:
res = None
try:
res = s.companies.create(request={
res = codat_sync_expenses.companies.create(request={
"name": "Technicalium",
})

Expand Down Expand Up @@ -401,8 +406,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
) as codat_sync_expenses:
res = codat_sync_expenses.companies.create(request={
"name": "Technicalium",
})

Expand Down Expand Up @@ -514,8 +519,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
) as codat_sync_expenses:
res = codat_sync_expenses.companies.create(request={
"name": "Technicalium",
})

Expand Down
12 changes: 11 additions & 1 deletion sync-for-expenses/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,4 +736,14 @@ Based on:
### Generated
- [python v7.0.0] sync-for-expenses
### Releases
- [PyPI v7.0.0] https://pypi.org/project/codat-sync-for-expenses/7.0.0 - sync-for-expenses
- [PyPI v7.0.0] https://pypi.org/project/codat-sync-for-expenses/7.0.0 - sync-for-expenses

## 2024-12-10 10:22:45
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.453.8 (2.474.15) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v7.0.1] sync-for-expenses
### Releases
- [PyPI v7.0.1] https://pypi.org/project/codat-sync-for-expenses/7.0.1 - sync-for-expenses
8 changes: 4 additions & 4 deletions sync-for-expenses/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.companies.create(request={
) as codat_sync_expenses:
res = codat_sync_expenses.companies.create(request={
"name": "Technicalium",
})

Expand All @@ -32,8 +32,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_sync_expenses:
res = await codat_sync_expenses.companies.create_async(request={
"name": "Technicalium",
})

Expand Down
8 changes: 4 additions & 4 deletions sync-for-expenses/docs/sdks/accounts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.accounts.create(request={
) as codat_sync_expenses:
res = codat_sync_expenses.accounts.create(request={
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
"account_prototype": {
Expand Down Expand Up @@ -92,8 +92,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.accounts.get_create_model(request={
) as codat_sync_expenses:
res = codat_sync_expenses.accounts.get_create_model(request={
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
})
Expand Down
4 changes: 2 additions & 2 deletions sync-for-expenses/docs/sdks/adjustments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.adjustments.create(request={
) as codat_sync_expenses:
res = codat_sync_expenses.adjustments.create(request={
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"request_body": [
{
Expand Down
4 changes: 2 additions & 2 deletions sync-for-expenses/docs/sdks/attachments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.attachments.upload(request={
) as codat_sync_expenses:
res = codat_sync_expenses.attachments.upload(request={
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"sync_id": "6fb40d5e-b13e-11ed-afa1-0242ac120002",
"transaction_id": "336694d8-2dca-4cb5-a28d-3ccb83e55eee",
Expand Down
8 changes: 4 additions & 4 deletions sync-for-expenses/docs/sdks/bankaccounts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.bank_accounts.create(request={
) as codat_sync_expenses:
res = codat_sync_expenses.bank_accounts.create(request={
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
"bank_account": {
Expand Down Expand Up @@ -88,8 +88,8 @@ with CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
) as s:
res = s.bank_accounts.get_create_model(request={
) as codat_sync_expenses:
res = codat_sync_expenses.bank_accounts.get_create_model(request={
"company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
"connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
})
Expand Down
Loading

0 comments on commit 3600a34

Please sign in to comment.