Skip to content

chore: 🐝 Update SDK - Generate 0.20.0 #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
938 changes: 32 additions & 906 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
python:
version: 0.19.0
version: 0.20.0
additionalDependencies:
dev: {}
main: {}
Expand Down
16 changes: 8 additions & 8 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.570.1
speakeasyVersion: 1.575.5
sources:
Apideck:
sourceNamespace: apideck
sourceRevisionDigest: sha256:92f29919dab3af53e6278cecca2b95c38d5977dcc46fb4d9086360225ea2fd48
sourceBlobDigest: sha256:312c9a0c323d213f0d91e2124e1feb346c5657e76b815a7a9b1bbcf6b5beb357
sourceRevisionDigest: sha256:58d0abd0a05800047f98fd60dcebd853df732791a91a346c8515157f32999372
sourceBlobDigest: sha256:82f9887e82aefa1d47227f638634d6085196d40364023afefff309946a16abb7
tags:
- latest
- speakeasy-sdk-regen-1750931281
- 10.18.0
- speakeasy-sdk-regen-1751018986
- 10.18.1
targets:
apideck:
source: Apideck
sourceNamespace: apideck
sourceRevisionDigest: sha256:92f29919dab3af53e6278cecca2b95c38d5977dcc46fb4d9086360225ea2fd48
sourceBlobDigest: sha256:312c9a0c323d213f0d91e2124e1feb346c5657e76b815a7a9b1bbcf6b5beb357
sourceRevisionDigest: sha256:58d0abd0a05800047f98fd60dcebd853df732791a91a346c8515157f32999372
sourceBlobDigest: sha256:82f9887e82aefa1d47227f638634d6085196d40364023afefff309946a16abb7
codeSamplesNamespace: apideck-python-code-samples
codeSamplesRevisionDigest: sha256:9f78fe93304d35cc64773e1adb027e0a6bb591ee982759f7b19b4deac7e0b490
codeSamplesRevisionDigest: sha256:5b5baea355358a6fad5bccbc190d0377cd5a65aa1c91ba90d0ec104a40552c70
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
91 changes: 52 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -933,31 +933,20 @@ with Apideck(
<!-- Start Error Handling [errors] -->
## Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
[`ApideckError`](./src/apideck_unify/models/apideckerror.py) is the base class for all HTTP error responses. It has the following properties:

By default, an API error will raise a models.APIError exception, which has the following properties:

| Property | Type | Description |
|-----------------|------------------|-----------------------|
| `.status_code` | *int* | The HTTP status code |
| `.message` | *str* | The error message |
| `.raw_response` | *httpx.Response* | The raw HTTP response |
| `.body` | *str* | The response content |

When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list_async` method may raise the following exceptions:

| Error Type | Status Code | Content Type |
| ------------------------------ | ----------- | ---------------- |
| models.BadRequestResponse | 400 | application/json |
| models.UnauthorizedResponse | 401 | application/json |
| models.PaymentRequiredResponse | 402 | application/json |
| models.NotFoundResponse | 404 | application/json |
| models.UnprocessableResponse | 422 | application/json |
| models.APIError | 4XX, 5XX | \*/\* |
| Property | Type | Description |
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
| `err.message` | `str` | Error message |
| `err.status_code` | `int` | HTTP response status code eg `404` |
| `err.headers` | `httpx.Headers` | HTTP response headers |
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |

### Example

```python
import apideck_unify
from apideck_unify import Apideck, models
import os

Expand Down Expand Up @@ -985,25 +974,49 @@ with Apideck(

res = res.next()

except models.BadRequestResponse as e:
# handle e.data: models.BadRequestResponseData
raise(e)
except models.UnauthorizedResponse as e:
# handle e.data: models.UnauthorizedResponseData
raise(e)
except models.PaymentRequiredResponse as e:
# handle e.data: models.PaymentRequiredResponseData
raise(e)
except models.NotFoundResponse as e:
# handle e.data: models.NotFoundResponseData
raise(e)
except models.UnprocessableResponse as e:
# handle e.data: models.UnprocessableResponseData
raise(e)
except models.APIError as e:
# handle exception
raise(e)

except models.ApideckError as e:
# The base class for HTTP error responses
print(e.message)
print(e.status_code)
print(e.body)
print(e.headers)
print(e.raw_response)

# Depending on the method different errors may be thrown
if isinstance(e, models.BadRequestResponse):
print(e.data.status_code) # Optional[float]
print(e.data.error) # Optional[str]
print(e.data.type_name) # Optional[str]
print(e.data.message) # Optional[str]
print(e.data.detail) # Optional[apideck_unify.BadRequestResponseDetail]
```

### Error Classes
**Primary errors:**
* [`ApideckError`](./src/apideck_unify/models/apideckerror.py): The base class for HTTP error responses.
* [`UnauthorizedResponse`](./src/apideck_unify/models/unauthorizedresponse.py): Unauthorized. Status code `401`.
* [`PaymentRequiredResponse`](./src/apideck_unify/models/paymentrequiredresponse.py): Payment Required. Status code `402`.
* [`NotFoundResponse`](./src/apideck_unify/models/notfoundresponse.py): The specified resource was not found. Status code `404`. *
* [`BadRequestResponse`](./src/apideck_unify/models/badrequestresponse.py): Bad Request. Status code `400`. *
* [`UnprocessableResponse`](./src/apideck_unify/models/unprocessableresponse.py): Unprocessable. Status code `422`. *

<details><summary>Less common errors (5)</summary>

<br />

**Network errors:**
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
* [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.


**Inherit from [`ApideckError`](./src/apideck_unify/models/apideckerror.py)**:
* [`ResponseValidationError`](./src/apideck_unify/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.

</details>

\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,14 @@ Based on:
### Generated
- [python v0.19.0] .
### Releases
- [PyPI v0.19.0] https://pypi.org/project/apideck-unify/0.19.0 - .
- [PyPI v0.19.0] https://pypi.org/project/apideck-unify/0.19.0 - .

## 2025-07-05 00:18:33
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.575.5 (2.648.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.20.0] .
### Releases
- [PyPI v0.20.0] https://pypi.org/project/apideck-unify/0.20.0 - .
3 changes: 2 additions & 1 deletion docs/models/bankaccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
| `bsb_number` | *OptionalNullable[str]* | :heavy_minus_sign: | A BSB is a 6 digit numeric code used for identifying the branch of an Australian or New Zealand bank or financial institution. | 062-001 |
| `branch_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | A branch identifier is a unique identifier for a branch of a bank or financial institution. | 001 |
| `bank_code` | *OptionalNullable[str]* | :heavy_minus_sign: | A bank code is a code assigned by a central bank, a bank supervisory body or a Bankers Association in a country to all its licensed member banks or financial institutions. | BNH |
| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD |
| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD |
| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US |
Loading