Skip to content

Commit 3486f01

Browse files
chore: 🐝 Update SDK - Generate SDK 1.0.0-beta.16
1 parent c8ee81f commit 3486f01

File tree

9 files changed

+94
-19
lines changed

9 files changed

+94
-19
lines changed

.speakeasy/gen.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 16ed6937-9038-4c34-a8b6-e4732948f250
33
management:
4-
docChecksum: 118b2ea82d4469acf68936b2716bd368
4+
docChecksum: 74d25726f866a24fd6cc1cf60df38b28
55
docVersion: 1.0.0
66
speakeasyVersion: 1.555.2
77
generationVersion: 2.620.2
8-
releaseVersion: 1.0.0-beta.15
9-
configChecksum: 0456acc4696e0d53c45f1e7d5b8210e3
8+
releaseVersion: 1.0.0-beta.16
9+
configChecksum: 59a0856127f336432473ffd19e54ba3e
1010
repoURL: https://github.com/gr4vy/gr4vy-php.git
1111
installationURL: https://github.com/gr4vy/gr4vy-php
1212
published: true

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ generation:
1818
oAuth2PasswordEnabled: false
1919
sdkHooksConfigAccess: true
2020
php:
21-
version: 1.0.0-beta.15
21+
version: 1.0.0-beta.16
2222
additionalDependencies:
2323
autoload: {}
2424
autoload-dev: {}

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ speakeasyVersion: 1.555.2
22
sources:
33
openapi:
44
sourceNamespace: openapi
5-
sourceRevisionDigest: sha256:43949ab5079e74554ebf2f5e201be82540a4ab4e4bffc7720564c1d5387d1e9c
6-
sourceBlobDigest: sha256:75089f5d945d0ba633b7d3312e8682a1130c27f72bd7a2ededd91d74f78ae597
5+
sourceRevisionDigest: sha256:11d69a8cb78e98e395086c798eda78784f7d5369fe9b0c140b2514fcb00343fc
6+
sourceBlobDigest: sha256:023a9fcd0bed9d90cc47134e2a48579f3649ec163ef692d470e9af6ca6793d1f
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1749027921
9+
- speakeasy-sdk-regen-1749045089
1010
- 1.0.0
1111
targets:
1212
php:
1313
source: openapi
1414
sourceNamespace: openapi
15-
sourceRevisionDigest: sha256:43949ab5079e74554ebf2f5e201be82540a4ab4e4bffc7720564c1d5387d1e9c
16-
sourceBlobDigest: sha256:75089f5d945d0ba633b7d3312e8682a1130c27f72bd7a2ededd91d74f78ae597
15+
sourceRevisionDigest: sha256:11d69a8cb78e98e395086c798eda78784f7d5369fe9b0c140b2514fcb00343fc
16+
sourceBlobDigest: sha256:023a9fcd0bed9d90cc47134e2a48579f3649ec163ef692d470e9af6ca6793d1f
1717
codeSamplesNamespace: openapi-php-code-samples
18-
codeSamplesRevisionDigest: sha256:f9db504d8b5de9f999de39e8ea30d2a3b926e3895526fcf5b04d8eebf010dc60
18+
codeSamplesRevisionDigest: sha256:919755aec71554c306763e9702d4fd4f861d3612f0aeb13e665c2dba152e6bfc
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
@@ -108,4 +108,14 @@ Based on:
108108
### Generated
109109
- [php v1.0.0-beta.15] .
110110
### Releases
111-
- [Composer v1.0.0-beta.15] https://packagist.org/packages/gr4vy/gr4vy-php#v1.0.0-beta.15 - .
111+
- [Composer v1.0.0-beta.15] https://packagist.org/packages/gr4vy/gr4vy-php#v1.0.0-beta.15 - .
112+
113+
## 2025-06-04 13:51:12
114+
### Changes
115+
Based on:
116+
- OpenAPI Doc
117+
- Speakeasy CLI 1.555.2 (2.620.2) https://github.com/speakeasy-api/speakeasy
118+
### Generated
119+
- [php v1.0.0-beta.16] .
120+
### Releases
121+
- [Composer v1.0.0-beta.16] https://packagist.org/packages/gr4vy/gr4vy-php#v1.0.0-beta.16 - .

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"brick/date-time": "^0.7.0",
1616
"phpdocumentor/type-resolver": "^1.8",
1717
"brick/math": "^0.12.1",
18+
"ramsey/uuid": "^4.7.6",
1819
"lcobucci/jwt": "^5.5.0",
19-
"paragonie/sodium_compat_ext_sodium": ">= 1",
20-
"ramsey/uuid": "^4.7.6"
20+
"paragonie/sodium_compat_ext_sodium": ">= 1"
2121
},
2222
"require-dev": {
2323
"laravel/pint": "^1.21.2",

docs/sdks/reportsexecutions/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@ $sdk = Gr4vy\SDK::builder()
3030

3131
$request = new Gr4vy\ListAllReportExecutionsRequest();
3232

33-
$response = $sdk->reportsExecutions->list(
33+
$responses = $sdk->reportsExecutions->list(
3434
request: $request
3535
);
3636

37-
if ($response->reportExecutions !== null) {
38-
// handle response
37+
38+
foreach ($responses as $response) {
39+
if ($response->statusCode === 200) {
40+
// handle response
41+
}
3942
}
4043
```
4144

src/ListAllReportExecutionsResponse.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class ListAllReportExecutionsResponse
3939
*/
4040
public ?ReportExecutions $reportExecutions = null;
4141

42+
/**
43+
* @var \Closure(string): ?ListAllReportExecutionsResponse $next
44+
*/
45+
public \Closure $next;
4246
/**
4347
* @param string $contentType
4448
* @param int $statusCode
@@ -53,4 +57,17 @@ public function __construct(string $contentType, int $statusCode, \Psr\Http\Mess
5357
$this->rawResponse = $rawResponse;
5458
$this->reportExecutions = $reportExecutions;
5559
}
60+
/**
61+
* @param string $name
62+
* @param array<mixed> $args
63+
* @return ?ListAllReportExecutionsResponse
64+
*/
65+
public function __call($name, $args): ?ListAllReportExecutionsResponse
66+
{
67+
if ($name === 'next') {
68+
return call_user_func_array($this->next, $args);
69+
}
70+
71+
return null;
72+
}
5673
}

src/ReportsExecutions.php

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public function get(string $reportExecutionId, ?string $merchantAccountId = null
280280
* @return ListAllReportExecutionsResponse
281281
* @throws \Gr4vy\errors\APIException
282282
*/
283-
public function list(?ListAllReportExecutionsRequest $request = null, ?Options $options = null): ListAllReportExecutionsResponse
283+
private function listIndividual(?ListAllReportExecutionsRequest $request = null, ?Options $options = null): ListAllReportExecutionsResponse
284284
{
285285
$retryConfig = null;
286286
if ($options) {
@@ -349,6 +349,34 @@ public function list(?ListAllReportExecutionsRequest $request = null, ?Options $
349349
contentType: $contentType,
350350
rawResponse: $httpResponse,
351351
reportExecutions: $obj);
352+
$sdk = $this;
353+
354+
$response->next = function () use ($sdk, $responseData, $request): ?ListAllReportExecutionsResponse {
355+
$jsonObject = new \JsonPath\JsonObject($responseData);
356+
$nextCursor = $jsonObject->get('$.next_cursor');
357+
if ($nextCursor == null) {
358+
return null;
359+
} else {
360+
$nextCursor = $nextCursor[0];
361+
if ($nextCursor == null) {
362+
return null;
363+
}
364+
}
365+
366+
return $sdk->listIndividual(
367+
request: new ListAllReportExecutionsRequest(
368+
cursor: $nextCursor,
369+
limit: $request != null ? $request->limit : null,
370+
reportName: $request != null ? $request->reportName : null,
371+
createdAtLte: $request != null ? $request->createdAtLte : null,
372+
createdAtGte: $request != null ? $request->createdAtGte : null,
373+
status: $request != null ? $request->status : null,
374+
creatorId: $request != null ? $request->creatorId : null,
375+
merchantAccountId: $request != null ? $request->merchantAccountId : null,
376+
),
377+
);
378+
};
379+
352380

353381
return $response;
354382
} else {
@@ -494,5 +522,22 @@ public function list(?ListAllReportExecutionsRequest $request = null, ?Options $
494522
throw new \Gr4vy\errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
495523
}
496524
}
525+
/**
526+
* List executed reports
527+
*
528+
* List all executed reports that have been generated.
529+
*
530+
* @param ?ListAllReportExecutionsRequest $request
531+
* @return \Generator<ListAllReportExecutionsResponse>
532+
* @throws \Gr4vy\errors\APIException
533+
*/
534+
public function list(?ListAllReportExecutionsRequest $request = null, ?Options $options = null): \Generator
535+
{
536+
$res = $this->listIndividual($request, $options);
537+
while ($res !== null) {
538+
yield $res;
539+
$res = $res->next($res);
540+
}
541+
}
497542

498543
}

src/SDKConfiguration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ class SDKConfiguration
3333

3434
public string $openapiDocVersion = '1.0.0';
3535

36-
public string $sdkVersion = '1.0.0-beta.15';
36+
public string $sdkVersion = '1.0.0-beta.16';
3737

3838
public string $genVersion = '2.620.2';
3939

40-
public string $userAgent = 'speakeasy-sdk/php 1.0.0-beta.15 2.620.2 1.0.0 gr4vy/gr4vy-php';
40+
public string $userAgent = 'speakeasy-sdk/php 1.0.0-beta.16 2.620.2 1.0.0 gr4vy/gr4vy-php';
4141
/** @var array<string, array<string, array<string, mixed>>> */
4242
public ?array $globals = [
4343
'parameters' => [],

0 commit comments

Comments
 (0)