Skip to content

Commit 2323017

Browse files
committed
## Python SDK Changes Detected:
* `client.webhooks.create()`: `response.profile_id` **Changed** **Breaking** ⚠️
1 parent 1128bc3 commit 2323017

File tree

8 files changed

+62
-18
lines changed

8 files changed

+62
-18
lines changed

.speakeasy/gen.lock

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 3f63a12a-c4cd-4e2e-98dc-9d5c6f5180ec
33
management:
4-
docChecksum: d4c86af0b942215e7a70f30230ce4fd7
4+
docChecksum: 248ec6075df6729e0719102b6630ab61
55
docVersion: 1.0.0
66
speakeasyVersion: 1.636.0
77
generationVersion: 2.723.2
8-
releaseVersion: 0.14.1
9-
configChecksum: 474dbf5b0158701ff2d951e480982a35
8+
releaseVersion: 0.14.2
9+
configChecksum: 3fafd8478ea96ad8f813d1667a4cb2e6
1010
repoURL: https://github.com/mollie/mollie-api-python-beta.git
1111
installationURL: https://github.com/mollie/mollie-api-python-beta.git
1212
published: true
@@ -5342,3 +5342,6 @@ examples:
53425342
application/hal+json: {"status": 404, "title": "Not Found", "detail": "The resource does not exist", "field": "description", "_links": {"documentation": {"href": "https://docs.mollie.com/errors", "type": "text/html"}}}
53435343
examplesVersion: 1.0.2
53445344
generatedTests: {}
5345+
releaseNotes: |
5346+
## Python SDK Changes Detected:
5347+
* `client.webhooks.create()`: `response.profile_id` **Changed** **Breaking** :warning:

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ generation:
2525
generateNewTests: false
2626
skipResponseBodyAssertions: false
2727
python:
28-
version: 0.14.1
28+
version: 0.14.2
2929
additionalDependencies:
3030
dev: {}
3131
main: {}

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ speakeasyVersion: 1.636.0
22
sources:
33
Mollie API:
44
sourceNamespace: mollie-api
5-
sourceRevisionDigest: sha256:2a2766595d3db49ad97a30979f45364e1428de1ad2f932f756ea5db1fe073be9
6-
sourceBlobDigest: sha256:ed2e7cb21c6e24b323f45d50dfe8a3448258448633f1f8a4850aa1a51d2d0eb1
5+
sourceRevisionDigest: sha256:5ea50f722e33bfc8cc37928c710896ae63a9a9fa312d6e2ff2e3169d71299e76
6+
sourceBlobDigest: sha256:e30c0b97379f35c2dd37f7f22e3407197f999753333fd11b251152fa15baa654
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1759883072
9+
- speakeasy-sdk-regen-1759909865
1010
- 1.0.0
1111
targets:
1212
client:
1313
source: Mollie API
1414
sourceNamespace: mollie-api
15-
sourceRevisionDigest: sha256:2a2766595d3db49ad97a30979f45364e1428de1ad2f932f756ea5db1fe073be9
16-
sourceBlobDigest: sha256:ed2e7cb21c6e24b323f45d50dfe8a3448258448633f1f8a4850aa1a51d2d0eb1
15+
sourceRevisionDigest: sha256:5ea50f722e33bfc8cc37928c710896ae63a9a9fa312d6e2ff2e3169d71299e76
16+
sourceBlobDigest: sha256:e30c0b97379f35c2dd37f7f22e3407197f999753333fd11b251152fa15baa654
1717
codeSamplesNamespace: mollie-api-python-code-samples
18-
codeSamplesRevisionDigest: sha256:0d7eed0e7558b35d05fb13eaabb28347c574822eac83c9b86e2217e0c42d6c2e
18+
codeSamplesRevisionDigest: sha256:6ce48d0ec3846af9b7552e7ea179aac1a3950761bec2ade1c5f72bfa725db155
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,4 +598,14 @@ Based on:
598598
### Generated
599599
- [python v0.14.1] .
600600
### Releases
601-
- [PyPI v0.14.1] https://pypi.org/project/mollie/0.14.1 - .
601+
- [PyPI v0.14.1] https://pypi.org/project/mollie/0.14.1 - .
602+
603+
## 2025-10-08 07:50:45
604+
### Changes
605+
Based on:
606+
- OpenAPI Doc
607+
- Speakeasy CLI 1.636.0 (2.723.2) https://github.com/speakeasy-api/speakeasy
608+
### Generated
609+
- [python v0.14.2] .
610+
### Releases
611+
- [PyPI v0.14.2] https://pypi.org/project/mollie/0.14.2 - .

docs/models/createwebhook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| `resource` | *str* | :heavy_check_mark: | Indicates the response contains a webhook subscription object. Will always contain the string `webhook` for this endpoint. | webhook |
99
| `id` | *str* | :heavy_check_mark: | The identifier uniquely referring to this subscription. | hook_tNP6fpF9fLJpFWziRcgiH |
1010
| `url` | *str* | :heavy_check_mark: | The subscription's events destination. | https://example.com/webhook-endpoint |
11-
| `profile_id` | *str* | :heavy_check_mark: | The identifier uniquely referring to the profile that created the subscription. | pfl_YyoaNFjtHc |
11+
| `profile_id` | *Nullable[str]* | :heavy_check_mark: | The identifier uniquely referring to the profile that created the subscription. | pfl_YyoaNFjtHc |
1212
| `created_at` | *str* | :heavy_check_mark: | The subscription's date time of creation. | 2023-01-01T12:00:00Z |
1313
| `name` | *str* | :heavy_check_mark: | The subscription's name. | Profile Updates Webhook |
1414
| `event_types` | List[[models.WebhookEventTypes](../models/webhookeventtypes.md)] | :heavy_check_mark: | The events types that are subscribed. | [<br/>"sales-invoice.paid, sales-invoice.canceled"<br/>] |

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mollie-api-python-beta"
3-
version = "0.14.1"
3+
version = "0.14.2"
44
description = "Python Client SDK Generated by Speakeasy."
55
authors = [{ name = "Speakeasy" },]
66
readme = "README-PYPI.md"

src/mollie/_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import importlib.metadata
44

55
__title__: str = "mollie"
6-
__version__: str = "0.14.1"
6+
__version__: str = "0.14.2"
77
__openapi_doc_version__: str = "1.0.0"
88
__gen_version__: str = "2.723.2"
9-
__user_agent__: str = "speakeasy-sdk/python 0.14.1 2.723.2 1.0.0 mollie"
9+
__user_agent__: str = "speakeasy-sdk/python 0.14.2 2.723.2 1.0.0 mollie"
1010

1111
try:
1212
if __package__ is not None:

src/mollie/models/create_webhook.py

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
from .url import URL, URLTypedDict
66
from .webhook_event_types import WebhookEventTypes
77
from .webhook_status import WebhookStatus
8-
from mollie.types import BaseModel
8+
from mollie.types import BaseModel, Nullable, UNSET_SENTINEL
99
from mollie.utils import validate_open_enum
1010
import pydantic
11+
from pydantic import model_serializer
1112
from pydantic.functional_validators import PlainValidator
1213
from typing import List
1314
from typing_extensions import Annotated, TypedDict
@@ -39,7 +40,7 @@ class CreateWebhookTypedDict(TypedDict):
3940
r"""The identifier uniquely referring to this subscription."""
4041
url: str
4142
r"""The subscription's events destination."""
42-
profile_id: str
43+
profile_id: Nullable[str]
4344
r"""The identifier uniquely referring to the profile that created the subscription."""
4445
created_at: str
4546
r"""The subscription's date time of creation."""
@@ -67,7 +68,7 @@ class CreateWebhook(BaseModel):
6768
url: str
6869
r"""The subscription's events destination."""
6970

70-
profile_id: Annotated[str, pydantic.Field(alias="profileId")]
71+
profile_id: Annotated[Nullable[str], pydantic.Field(alias="profileId")]
7172
r"""The identifier uniquely referring to the profile that created the subscription."""
7273

7374
created_at: Annotated[str, pydantic.Field(alias="createdAt")]
@@ -90,3 +91,33 @@ class CreateWebhook(BaseModel):
9091

9192
links: Annotated[CreateWebhookLinks, pydantic.Field(alias="_links")]
9293
r"""An object with several relevant URLs. Every URL object will contain an `href` and a `type` field."""
94+
95+
@model_serializer(mode="wrap")
96+
def serialize_model(self, handler):
97+
optional_fields = []
98+
nullable_fields = ["profileId"]
99+
null_default_fields = []
100+
101+
serialized = handler(self)
102+
103+
m = {}
104+
105+
for n, f in type(self).model_fields.items():
106+
k = f.alias or n
107+
val = serialized.get(k)
108+
serialized.pop(k, None)
109+
110+
optional_nullable = k in optional_fields and k in nullable_fields
111+
is_set = (
112+
self.__pydantic_fields_set__.intersection({n})
113+
or k in null_default_fields
114+
) # pylint: disable=no-member
115+
116+
if val is not None and val != UNSET_SENTINEL:
117+
m[k] = val
118+
elif val != UNSET_SENTINEL and (
119+
not k in optional_fields or (optional_nullable and is_set)
120+
):
121+
m[k] = val
122+
123+
return m

0 commit comments

Comments
 (0)