Skip to content

Commit 659ce65

Browse files
chore: 🐝 Update SDK - Generate SDK 1.9.1
1 parent b1c47e7 commit 659ce65

File tree

11 files changed

+106
-26
lines changed

11 files changed

+106
-26
lines changed

.speakeasy/gen.lock

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 833c6a67-4a4a-4ef1-ba24-165a29264e4a
33
management:
4-
docChecksum: 4096c08d92360bbcae85834b2c93b8f7
4+
docChecksum: 39901f4b6f4aafb32d7beb29e987b3db
55
docVersion: 1.0.0
66
speakeasyVersion: 1.662.0
77
generationVersion: 2.763.3
8-
releaseVersion: 1.9.0
9-
configChecksum: f34984687d511a1554a0f7f515a6f9f7
8+
releaseVersion: 1.9.1
9+
configChecksum: 7097d597249e3e851646f024f60ec6cb
1010
repoURL: https://github.com/gr4vy/gr4vy-python.git
1111
installationURL: https://github.com/gr4vy/gr4vy-python.git
1212
published: true
@@ -335,6 +335,7 @@ generatedFiles:
335335
- docs/models/listreportsresponse.md
336336
- docs/models/listtransactioneventsglobals.md
337337
- docs/models/listtransactioneventsrequest.md
338+
- docs/models/listtransactioneventsresponse.md
338339
- docs/models/listtransactionrefundsglobals.md
339340
- docs/models/listtransactionrefundsrequest.md
340341
- docs/models/listtransactionsettlementsglobals.md
@@ -4450,6 +4451,3 @@ examples:
44504451
application/json: {"type": "error", "code": "gateway_timeout", "status": 504, "message": "Request could not be processed"}
44514452
examplesVersion: 1.0.2
44524453
generatedTests: {}
4453-
releaseNotes: |
4454-
## Python SDK Changes Detected:
4455-
* `gr4vy.transactions.events.list()`: `response.items.[].context` **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: 1.9.0
28+
version: 1.9.1
2929
additionalDependencies:
3030
dev:
3131
freezegun: ^1.5.1

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ speakeasyVersion: 1.662.0
22
sources:
33
openapi:
44
sourceNamespace: openapi
5-
sourceRevisionDigest: sha256:d694ce29f6e0d60d9e0fc26b02de913a17495786564109690b7fb75bf7797d97
6-
sourceBlobDigest: sha256:9f118de13e21413314d085034eab5f44b7849564e8de21a4d5439f7c81f0f8ec
5+
sourceRevisionDigest: sha256:be686f7ff1cd2142f9374d52d807901c4bef071d92f71ad4af3a2649e4eca478
6+
sourceBlobDigest: sha256:0503becc2d5a3989fb2ebd927cd1a191491250a41d232c407a392e57eff8eb60
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1764180440
9+
- speakeasy-sdk-regen-1764182540
1010
- 1.0.0
1111
targets:
1212
python:
1313
source: openapi
1414
sourceNamespace: openapi
15-
sourceRevisionDigest: sha256:d694ce29f6e0d60d9e0fc26b02de913a17495786564109690b7fb75bf7797d97
16-
sourceBlobDigest: sha256:9f118de13e21413314d085034eab5f44b7849564e8de21a4d5439f7c81f0f8ec
15+
sourceRevisionDigest: sha256:be686f7ff1cd2142f9374d52d807901c4bef071d92f71ad4af3a2649e4eca478
16+
sourceBlobDigest: sha256:0503becc2d5a3989fb2ebd927cd1a191491250a41d232c407a392e57eff8eb60
1717
codeSamplesNamespace: openapi-python-code-samples
18-
codeSamplesRevisionDigest: sha256:4ff8e718932b1f6f8ae70edbe02d3b6385d6d04ca4ffcc856042aa3aa280e960
18+
codeSamplesRevisionDigest: sha256:a8782427bff2499f13f24375262c846cb9c274527e2cc654ea1b50dcacf30419
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
@@ -1198,4 +1198,14 @@ Based on:
11981198
### Generated
11991199
- [python v1.9.0] .
12001200
### Releases
1201-
- [PyPI v1.9.0] https://pypi.org/project/gr4vy/1.9.0 - .
1201+
- [PyPI v1.9.0] https://pypi.org/project/gr4vy/1.9.0 - .
1202+
1203+
## 2025-11-26 18:42:02
1204+
### Changes
1205+
Based on:
1206+
- OpenAPI Doc
1207+
- Speakeasy CLI 1.662.0 (2.763.3) https://github.com/speakeasy-api/speakeasy
1208+
### Generated
1209+
- [python v1.9.1] .
1210+
### Releases
1211+
- [PyPI v1.9.1] https://pypi.org/project/gr4vy/1.9.1 - .
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ListTransactionEventsResponse
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
8+
| `result` | [models.TransactionEvents](../models/transactionevents.md) | :heavy_check_mark: | N/A |

docs/sdks/events/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ with Gr4vy(
2626

2727
res = g_client.transactions.events.list(transaction_id="7099948d-7286-47e4-aad8-b68f7eb44591", cursor="ZXhhbXBsZTE", limit=100)
2828

29-
# Handle response
30-
print(res)
29+
while res is not None:
30+
# Handle items
31+
32+
res = res.next()
3133

3234
```
3335

@@ -43,7 +45,7 @@ with Gr4vy(
4345

4446
### Response
4547

46-
**[models.TransactionEvents](../../models/transactionevents.md)**
48+
**[models.ListTransactionEventsResponse](../../models/listtransactioneventsresponse.md)**
4749

4850
### Errors
4951

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[project]
33
name = "gr4vy"
4-
version = "1.9.0"
4+
version = "1.9.1"
55
description = "Python Client SDK Generated by Speakeasy."
66
authors = [{ name = "Gr4vy" },]
77
readme = "README-PYPI.md"

src/gr4vy/_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 = "gr4vy"
6-
__version__: str = "1.9.0"
6+
__version__: str = "1.9.1"
77
__openapi_doc_version__: str = "1.0.0"
88
__gen_version__: str = "2.763.3"
9-
__user_agent__: str = "speakeasy-sdk/python 1.9.0 2.763.3 1.0.0 gr4vy"
9+
__user_agent__: str = "speakeasy-sdk/python 1.9.1 2.763.3 1.0.0 gr4vy"
1010

1111
try:
1212
if __package__ is not None:

src/gr4vy/events.py

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from gr4vy.types import OptionalNullable, UNSET
77
from gr4vy.utils import get_security_from_env
88
from gr4vy.utils.unmarshal_json_response import unmarshal_json_response
9-
from typing import Any, Mapping, Optional
9+
from jsonpath import JSONPath
10+
from typing import Any, Dict, List, Mapping, Optional, Union
1011

1112

1213
class Events(BaseSDK):
@@ -21,7 +22,7 @@ def list(
2122
server_url: Optional[str] = None,
2223
timeout_ms: Optional[int] = None,
2324
http_headers: Optional[Mapping[str, str]] = None,
24-
) -> models.TransactionEvents:
25+
) -> Optional[models.ListTransactionEventsResponse]:
2526
r"""List transaction events
2627
2728
Retrieve a paginated list of events related to processing a transaction, including status changes, API requests, and webhook delivery attempts. Events are listed in chronological order, with the most recent events first.
@@ -113,9 +114,31 @@ def list(
113114
retry_config=retry_config,
114115
)
115116

117+
def next_func() -> Optional[models.ListTransactionEventsResponse]:
118+
body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
119+
next_cursor = JSONPath("$.next_cursor").parse(body)
120+
121+
if len(next_cursor) == 0:
122+
return None
123+
124+
next_cursor = next_cursor[0]
125+
if next_cursor is None or str(next_cursor).strip() == "":
126+
return None
127+
128+
return self.list(
129+
transaction_id=transaction_id,
130+
cursor=next_cursor,
131+
limit=limit,
132+
merchant_account_id=merchant_account_id,
133+
retries=retries,
134+
)
135+
116136
response_data: Any = None
117137
if utils.match_response(http_res, "200", "application/json"):
118-
return unmarshal_json_response(models.TransactionEvents, http_res)
138+
return models.ListTransactionEventsResponse(
139+
result=unmarshal_json_response(models.TransactionEvents, http_res),
140+
next=next_func,
141+
)
119142
if utils.match_response(http_res, "400", "application/json"):
120143
response_data = unmarshal_json_response(errors.Error400Data, http_res)
121144
raise errors.Error400(response_data, http_res)
@@ -174,7 +197,7 @@ async def list_async(
174197
server_url: Optional[str] = None,
175198
timeout_ms: Optional[int] = None,
176199
http_headers: Optional[Mapping[str, str]] = None,
177-
) -> models.TransactionEvents:
200+
) -> Optional[models.ListTransactionEventsResponse]:
178201
r"""List transaction events
179202
180203
Retrieve a paginated list of events related to processing a transaction, including status changes, API requests, and webhook delivery attempts. Events are listed in chronological order, with the most recent events first.
@@ -266,9 +289,31 @@ async def list_async(
266289
retry_config=retry_config,
267290
)
268291

292+
def next_func() -> Optional[models.ListTransactionEventsResponse]:
293+
body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
294+
next_cursor = JSONPath("$.next_cursor").parse(body)
295+
296+
if len(next_cursor) == 0:
297+
return None
298+
299+
next_cursor = next_cursor[0]
300+
if next_cursor is None or str(next_cursor).strip() == "":
301+
return None
302+
303+
return self.list(
304+
transaction_id=transaction_id,
305+
cursor=next_cursor,
306+
limit=limit,
307+
merchant_account_id=merchant_account_id,
308+
retries=retries,
309+
)
310+
269311
response_data: Any = None
270312
if utils.match_response(http_res, "200", "application/json"):
271-
return unmarshal_json_response(models.TransactionEvents, http_res)
313+
return models.ListTransactionEventsResponse(
314+
result=unmarshal_json_response(models.TransactionEvents, http_res),
315+
next=next_func,
316+
)
272317
if utils.match_response(http_res, "400", "application/json"):
273318
response_data = unmarshal_json_response(errors.Error400Data, http_res)
274319
raise errors.Error400(response_data, http_res)

src/gr4vy/models/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,8 @@
731731
ListTransactionEventsGlobalsTypedDict,
732732
ListTransactionEventsRequest,
733733
ListTransactionEventsRequestTypedDict,
734+
ListTransactionEventsResponse,
735+
ListTransactionEventsResponseTypedDict,
734736
)
735737
from .list_transaction_refundsop import (
736738
ListTransactionRefundsGlobals,
@@ -1713,6 +1715,8 @@
17131715
"ListTransactionEventsGlobalsTypedDict",
17141716
"ListTransactionEventsRequest",
17151717
"ListTransactionEventsRequestTypedDict",
1718+
"ListTransactionEventsResponse",
1719+
"ListTransactionEventsResponseTypedDict",
17161720
"ListTransactionRefundsGlobals",
17171721
"ListTransactionRefundsGlobalsTypedDict",
17181722
"ListTransactionRefundsRequest",
@@ -2629,6 +2633,8 @@
26292633
"ListTransactionEventsGlobalsTypedDict": ".list_transaction_eventsop",
26302634
"ListTransactionEventsRequest": ".list_transaction_eventsop",
26312635
"ListTransactionEventsRequestTypedDict": ".list_transaction_eventsop",
2636+
"ListTransactionEventsResponse": ".list_transaction_eventsop",
2637+
"ListTransactionEventsResponseTypedDict": ".list_transaction_eventsop",
26322638
"ListTransactionRefundsGlobals": ".list_transaction_refundsop",
26332639
"ListTransactionRefundsGlobalsTypedDict": ".list_transaction_refundsop",
26342640
"ListTransactionRefundsRequest": ".list_transaction_refundsop",

0 commit comments

Comments
 (0)