From 8e40f92fb0941952cab39125c093d5465d025aa1 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:40:36 +0000 Subject: [PATCH] SDK regeneration --- reference.md | 26 ---------- src/Mobile/MobileClient.php | 98 ------------------------------------- src/SquareClient.php | 7 --- 3 files changed, 131 deletions(-) delete mode 100644 src/Mobile/MobileClient.php diff --git a/reference.md b/reference.md index 662f56d5..420c0255 100644 --- a/reference.md +++ b/reference.md @@ -15979,32 +15979,6 @@ $client->vendors->update( - - - - -## Mobile -
$client->mobile->authorizationCode() -
-
- -#### 🔌 Usage - -
-
- -
-
- -```php -$client->mobile->authorizationCode(); -``` -
-
-
-
- -
diff --git a/src/Mobile/MobileClient.php b/src/Mobile/MobileClient.php deleted file mode 100644 index cbbb64aa..00000000 --- a/src/Mobile/MobileClient.php +++ /dev/null @@ -1,98 +0,0 @@ -, - * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator - */ - private array $options; - - /** - * @var RawClient $client - */ - private RawClient $client; - - /** - * @param RawClient $client - * @param ?array{ - * baseUrl?: string, - * client?: ClientInterface, - * maxRetries?: int, - * timeout?: float, - * headers?: array, - * } $options - */ - public function __construct( - RawClient $client, - ?array $options = null, - ) { - $this->client = $client; - $this->options = $options ?? []; - } - - /** - * @param ?array{ - * baseUrl?: string, - * maxRetries?: int, - * timeout?: float, - * headers?: array, - * queryParameters?: array, - * bodyProperties?: array, - * } $options - * @throws SquareException - * @throws SquareApiException - */ - public function authorizationCode(?array $options = null): void - { - $options = array_merge($this->options, $options ?? []); - try { - $response = $this->client->sendRequest( - new JsonApiRequest( - baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Production->value, - path: "mobile/authorization-code", - method: HttpMethod::POST, - ), - $options, - ); - $statusCode = $response->getStatusCode(); - if ($statusCode >= 200 && $statusCode < 400) { - return; - } - } catch (RequestException $e) { - $response = $e->getResponse(); - if ($response === null) { - throw new SquareException(message: $e->getMessage(), previous: $e); - } - throw new SquareApiException( - message: "API request failed", - statusCode: $response->getStatusCode(), - body: $response->getBody()->getContents(), - ); - } catch (ClientExceptionInterface $e) { - throw new SquareException(message: $e->getMessage(), previous: $e); - } - throw new SquareApiException( - message: 'API request failed', - statusCode: $statusCode, - body: $response->getBody()->getContents(), - ); - } -} diff --git a/src/SquareClient.php b/src/SquareClient.php index b68ca716..9b922f84 100644 --- a/src/SquareClient.php +++ b/src/SquareClient.php @@ -35,7 +35,6 @@ use Square\Terminal\TerminalClient; use Square\TransferOrders\TransferOrdersClient; use Square\Vendors\VendorsClient; -use Square\Mobile\MobileClient; use Square\CashDrawers\CashDrawersClient; use Square\Webhooks\WebhooksClient; use GuzzleHttp\ClientInterface; @@ -209,11 +208,6 @@ class SquareClient */ public VendorsClient $vendors; - /** - * @var MobileClient $mobile - */ - public MobileClient $mobile; - /** * @var CashDrawersClient $cashDrawers */ @@ -313,7 +307,6 @@ public function __construct( $this->terminal = new TerminalClient($this->client, $this->options); $this->transferOrders = new TransferOrdersClient($this->client, $this->options); $this->vendors = new VendorsClient($this->client, $this->options); - $this->mobile = new MobileClient($this->client, $this->options); $this->cashDrawers = new CashDrawersClient($this->client, $this->options); $this->webhooks = new WebhooksClient($this->client, $this->options); }