From 30b225ce1c2719a4a1af3ac2002dd2d64275c1aa Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 15 Sep 2026 18:11:17 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-php-sdk: 2.1.5 --- .fern/metadata.json | 4 +- composer.json | 2 +- reference.md | 50 ++-------------- .../Transactions/TransactionsClient.php | 32 ++--------- src/SquareClient.php | 6 +- src/Types/CaptureTransactionResponse.php | 57 ------------------- src/Types/VoidTransactionResponse.php | 57 ------------------- 7 files changed, 16 insertions(+), 192 deletions(-) delete mode 100644 src/Types/CaptureTransactionResponse.php delete mode 100644 src/Types/VoidTransactionResponse.php diff --git a/.fern/metadata.json b/.fern/metadata.json index a3c7dd0d..f31cf12c 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -23,6 +23,6 @@ } } }, - "originGitCommit": "b05364cda2b85e35d8daa9ff2c24bbabbbd9652a", - "sdkVersion": "46.1.0.20260819" + "originGitCommit": "37b3f34f979590cc8d882c9ab2fe92748bfb0556", + "sdkVersion": "47.0.0.20260916" } \ No newline at end of file diff --git a/composer.json b/composer.json index a0fd398b..a54f6ee9 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "square/square", - "version": "46.1.0.20260819", + "version": "47.0.0.20260916", "description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.", "keywords": [ "square", diff --git a/reference.md b/reference.md index caf9f473..4c8ae595 100644 --- a/reference.md +++ b/reference.md @@ -23651,29 +23651,10 @@ $client->locations->transactions->get( -
$client->locations->transactions->capture($request) -> CaptureTransactionResponse +
$client->locations->transactions->capture($request)
-#### 📝 Description - -
-
- -
-
- -Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge) -endpoint with a `delay_capture` value of `true`. - - -See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture) -for more information. -
-
-
-
- #### 🔌 Usage
@@ -23703,7 +23684,7 @@ $client->locations->transactions->capture(
-**$locationId:** `string` — +**$locationId:** `string`
@@ -23711,7 +23692,7 @@ $client->locations->transactions->capture(
-**$transactionId:** `string` — +**$transactionId:** `string`
@@ -23723,29 +23704,10 @@ $client->locations->transactions->capture(
-
$client->locations->transactions->void($request) -> VoidTransactionResponse +
$client->locations->transactions->void($request)
-#### 📝 Description - -
-
- -
-
- -Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge) -endpoint with a `delay_capture` value of `true`. - - -See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture) -for more information. -
-
-
-
- #### 🔌 Usage
@@ -23775,7 +23737,7 @@ $client->locations->transactions->void(
-**$locationId:** `string` — +**$locationId:** `string`
@@ -23783,7 +23745,7 @@ $client->locations->transactions->void(
-**$transactionId:** `string` — +**$transactionId:** `string`
diff --git a/src/Locations/Transactions/TransactionsClient.php b/src/Locations/Transactions/TransactionsClient.php index 4a239d4a..44166a63 100644 --- a/src/Locations/Transactions/TransactionsClient.php +++ b/src/Locations/Transactions/TransactionsClient.php @@ -16,9 +16,7 @@ use Square\Locations\Transactions\Requests\GetTransactionsRequest; use Square\Types\GetTransactionResponse; use Square\Locations\Transactions\Requests\CaptureTransactionsRequest; -use Square\Types\CaptureTransactionResponse; use Square\Locations\Transactions\Requests\VoidTransactionsRequest; -use Square\Types\VoidTransactionResponse; class TransactionsClient { @@ -166,13 +164,6 @@ public function get(GetTransactionsRequest $request, ?array $options = null): Ge } /** - * Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge) - * endpoint with a `delay_capture` value of `true`. - * - * - * See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture) - * for more information. - * * @param CaptureTransactionsRequest $request * @param ?array{ * baseUrl?: string, @@ -182,11 +173,10 @@ public function get(GetTransactionsRequest $request, ?array $options = null): Ge * queryParameters?: array, * bodyProperties?: array, * } $options - * @return CaptureTransactionResponse * @throws SquareException * @throws SquareApiException */ - public function capture(CaptureTransactionsRequest $request, ?array $options = null): CaptureTransactionResponse + public function capture(CaptureTransactionsRequest $request, ?array $options = null): void { $options = array_merge($this->options, $options ?? []); try { @@ -200,11 +190,8 @@ public function capture(CaptureTransactionsRequest $request, ?array $options = n ); $statusCode = $response->getStatusCode(); if ($statusCode >= 200 && $statusCode < 400) { - $json = $response->getBody()->getContents(); - return CaptureTransactionResponse::fromJson($json); + return; } - } catch (JsonException $e) { - throw new SquareException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); } catch (ClientExceptionInterface $e) { throw new SquareException(message: $e->getMessage(), previous: $e); } @@ -216,13 +203,6 @@ public function capture(CaptureTransactionsRequest $request, ?array $options = n } /** - * Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge) - * endpoint with a `delay_capture` value of `true`. - * - * - * See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture) - * for more information. - * * @param VoidTransactionsRequest $request * @param ?array{ * baseUrl?: string, @@ -232,11 +212,10 @@ public function capture(CaptureTransactionsRequest $request, ?array $options = n * queryParameters?: array, * bodyProperties?: array, * } $options - * @return VoidTransactionResponse * @throws SquareException * @throws SquareApiException */ - public function void(VoidTransactionsRequest $request, ?array $options = null): VoidTransactionResponse + public function void(VoidTransactionsRequest $request, ?array $options = null): void { $options = array_merge($this->options, $options ?? []); try { @@ -250,11 +229,8 @@ public function void(VoidTransactionsRequest $request, ?array $options = null): ); $statusCode = $response->getStatusCode(); if ($statusCode >= 200 && $statusCode < 400) { - $json = $response->getBody()->getContents(); - return VoidTransactionResponse::fromJson($json); + return; } - } catch (JsonException $e) { - throw new SquareException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); } catch (ClientExceptionInterface $e) { throw new SquareException(message: $e->getMessage(), previous: $e); } diff --git a/src/SquareClient.php b/src/SquareClient.php index 20887527..85d35458 100644 --- a/src/SquareClient.php +++ b/src/SquareClient.php @@ -259,11 +259,11 @@ public function __construct( $token ??= $this->getFromEnvOrThrow('SQUARE_TOKEN', 'Please pass in token or set the environment variable SQUARE_TOKEN.'); $defaultHeaders = [ 'Authorization' => "Bearer $token", - 'Square-Version' => '2026-08-19', + 'Square-Version' => '2026-09-16', 'X-Fern-Language' => 'PHP', 'X-Fern-SDK-Name' => 'Square', - 'X-Fern-SDK-Version' => '46.1.0.20260819', - 'User-Agent' => 'square/square/46.1.0.20260819', + 'X-Fern-SDK-Version' => '47.0.0.20260916', + 'User-Agent' => 'square/square/47.0.0.20260916', ]; if ($version != null) { $defaultHeaders['Square-Version'] = $version; diff --git a/src/Types/CaptureTransactionResponse.php b/src/Types/CaptureTransactionResponse.php deleted file mode 100644 index 99ac3d08..00000000 --- a/src/Types/CaptureTransactionResponse.php +++ /dev/null @@ -1,57 +0,0 @@ - $errors Any errors that occurred during the request. - */ - #[JsonProperty('errors'), ArrayType([Error::class])] - private ?array $errors; - - /** - * @param array{ - * errors?: ?array, - * } $values - */ - public function __construct( - array $values = [], - ) { - $this->errors = $values['errors'] ?? null; - } - - /** - * @return ?array - */ - public function getErrors(): ?array - { - return $this->errors; - } - - /** - * @param ?array $value - */ - public function setErrors(?array $value = null): self - { - $this->errors = $value; - $this->_setField('errors'); - return $this; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/VoidTransactionResponse.php b/src/Types/VoidTransactionResponse.php deleted file mode 100644 index ef64e849..00000000 --- a/src/Types/VoidTransactionResponse.php +++ /dev/null @@ -1,57 +0,0 @@ - $errors Any errors that occurred during the request. - */ - #[JsonProperty('errors'), ArrayType([Error::class])] - private ?array $errors; - - /** - * @param array{ - * errors?: ?array, - * } $values - */ - public function __construct( - array $values = [], - ) { - $this->errors = $values['errors'] ?? null; - } - - /** - * @return ?array - */ - public function getErrors(): ?array - { - return $this->errors; - } - - /** - * @param ?array $value - */ - public function setErrors(?array $value = null): self - { - $this->errors = $value; - $this->_setField('errors'); - return $this; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} From b73bb59b6348c9a38ec07588675c6a028bb67de0 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 15 Sep 2026 18:11:17 +0000 Subject: [PATCH 2/2] [fern-replay] advance lockfile --- .fern/replay.lock | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index 6f61273f..cef78716 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -24,5 +24,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-php-sdk: 2.1.5 -current_generation: 0ba6f5e051ee942bbefed88fff34a9f2522db25b + - commit_sha: e620beff872903d961310de3c87121b659a0468d + tree_hash: 655e92c137b6aa9c47493113224daf4e0cd2b674 + timestamp: 2026-09-15T18:11:13.782Z + cli_version: unknown + generator_versions: + fernapi/fern-php-sdk: 2.1.5 +current_generation: e620beff872903d961310de3c87121b659a0468d patches: []