Skip to content

Commit 8e6c214

Browse files
SDK regeneration
1 parent 5597672 commit 8e6c214

1,542 files changed

Lines changed: 6366 additions & 4132 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/metadata.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"cliVersion": "3.38.0",
2+
"cliVersion": "3.98.5",
33
"generatorName": "fernapi/fern-php-sdk",
4-
"generatorVersion": "1.25.2",
4+
"generatorVersion": "2.1.5",
55
"generatorConfig": {
66
"clientName": "SquareClient",
77
"namespace": "Square",
@@ -23,5 +23,5 @@
2323
}
2424
}
2525
},
26-
"sdkVersion": "44.0.0.20260122"
26+
"sdkVersion": "45.0.0.20260122"
2727
}

composer.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "square/square",
3-
"version": "44.0.0.20260122",
3+
"version": "45.0.0.20260122",
44
"description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.",
55
"keywords": [
66
"square",
@@ -11,15 +11,22 @@
1111
"require": {
1212
"php": "^8.1",
1313
"ext-json": "*",
14-
"guzzlehttp/guzzle": "^7.4",
14+
"psr/http-client": "^1.0",
15+
"psr/http-client-implementation": "^1.0",
16+
"psr/http-factory": "^1.0",
17+
"psr/http-factory-implementation": "^1.0",
18+
"psr/http-message": "^1.1 || ^2.0",
19+
"php-http/discovery": "^1.0",
20+
"php-http/multipart-stream-builder": "^1.0",
1521
"apimatic/unirest-php": "^4.0.0",
1622
"apimatic/core-interfaces": "~0.1.5",
1723
"apimatic/core": "~0.3.12"
1824
},
1925
"require-dev": {
2026
"phpunit/phpunit": "^9.0",
2127
"friendsofphp/php-cs-fixer": "3.5.0",
22-
"phpstan/phpstan": "^1.12"
28+
"phpstan/phpstan": "^1.12",
29+
"guzzlehttp/guzzle": "^7.4"
2330
},
2431
"autoload": {
2532
"psr-4": {

reference.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4898,6 +4898,7 @@ multipart/form-data file uploads in HEIC, HEIF, JPEG, PDF, PNG, and TIFF formats
48984898
$client->disputes->createEvidenceFile(
48994899
new CreateEvidenceFileDisputesRequest([
49004900
'disputeId' => 'dispute_id',
4901+
'imageFile' => File::createFromString("example_image_file", "example_image_file"),
49014902
]),
49024903
);
49034904
```
@@ -7489,6 +7490,7 @@ __NOTE:__ When testing in the Sandbox environment, the total file size is limite
74897490
$client->invoices->createInvoiceAttachment(
74907491
new CreateInvoiceAttachmentRequest([
74917492
'invoiceId' => 'invoice_id',
7493+
'imageFile' => File::createFromString("example_image_file", "example_image_file"),
74927494
]),
74937495
);
74947496
```
@@ -17436,7 +17438,9 @@ JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB.
1743617438

1743717439
```php
1743817440
$client->catalog->images->create(
17439-
new CreateImagesRequest([]),
17441+
new CreateImagesRequest([
17442+
'imageFile' => File::createFromString("example_image_file", "example_image_file"),
17443+
]),
1744017444
);
1744117445
```
1744217446
</dd>
@@ -17482,6 +17486,7 @@ JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB.
1748217486
$client->catalog->images->update(
1748317487
new UpdateImagesRequest([
1748417488
'imageId' => 'image_id',
17489+
'imageFile' => File::createFromString("example_image_file", "example_image_file"),
1748517490
]),
1748617491
);
1748717492
```
@@ -18320,7 +18325,7 @@ $client->customers->customAttributeDefinitions->create(
1832018325
'customAttributeDefinition' => new CustomAttributeDefinition([
1832118326
'key' => 'favoritemovie',
1832218327
'schema' => [
18323-
'\$ref' => "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String",
18328+
'$ref' => "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String",
1832418329
],
1832518330
'name' => 'Favorite Movie',
1832618331
'description' => 'The favorite movie of the customer.',
@@ -21932,7 +21937,7 @@ $client->locations->customAttributeDefinitions->create(
2193221937
'customAttributeDefinition' => new CustomAttributeDefinition([
2193321938
'key' => 'bestseller',
2193421939
'schema' => [
21935-
'\$ref' => "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String",
21940+
'$ref' => "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String",
2193621941
],
2193721942
'name' => 'Bestseller',
2193821943
'description' => 'Bestselling item at location',
@@ -24642,7 +24647,7 @@ $client->merchants->customAttributeDefinitions->create(
2464224647
'customAttributeDefinition' => new CustomAttributeDefinition([
2464324648
'key' => 'alternative_seller_name',
2464424649
'schema' => [
24645-
'\$ref' => "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String",
24650+
'$ref' => "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String",
2464624651
],
2464724652
'name' => 'Alternative Merchant Name',
2464824653
'description' => 'This is the other name this merchant goes by.',
@@ -25604,7 +25609,7 @@ $client->orders->customAttributeDefinitions->create(
2560425609
'customAttributeDefinition' => new CustomAttributeDefinition([
2560525610
'key' => 'cover-count',
2560625611
'schema' => [
25607-
'\$ref' => "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number",
25612+
'$ref' => "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number",
2560825613
],
2560925614
'name' => 'Cover count',
2561025615
'description' => 'The number of people seated at a table',
@@ -28034,3 +28039,4 @@ contained in the list of event types in the [Subscription](entity:WebhookSubscri
2803428039
</dd>
2803528040
</dl>
2803628041
</details>
28042+

src/ApplePay/ApplePayClient.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Square\ApplePay;
44

5-
use GuzzleHttp\ClientInterface;
5+
use Psr\Http\Client\ClientInterface;
66
use Square\Core\Client\RawClient;
77
use Square\ApplePay\Requests\RegisterDomainRequest;
88
use Square\Types\RegisterDomainResponse;
@@ -12,7 +12,6 @@
1212
use Square\Environments;
1313
use Square\Core\Client\HttpMethod;
1414
use JsonException;
15-
use GuzzleHttp\Exception\RequestException;
1615
use Psr\Http\Client\ClientExceptionInterface;
1716

1817
class ApplePayClient
@@ -100,16 +99,6 @@ public function registerDomain(RegisterDomainRequest $request, ?array $options =
10099
}
101100
} catch (JsonException $e) {
102101
throw new SquareException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
103-
} catch (RequestException $e) {
104-
$response = $e->getResponse();
105-
if ($response === null) {
106-
throw new SquareException(message: $e->getMessage(), previous: $e);
107-
}
108-
throw new SquareApiException(
109-
message: "API request failed",
110-
statusCode: $response->getStatusCode(),
111-
body: $response->getBody()->getContents(),
112-
);
113102
} catch (ClientExceptionInterface $e) {
114103
throw new SquareException(message: $e->getMessage(), previous: $e);
115104
}

src/ApplePay/Requests/RegisterDomainRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function getDomainName(): string
3838
public function setDomainName(string $value): self
3939
{
4040
$this->domainName = $value;
41+
$this->_setField('domainName');
4142
return $this;
4243
}
4344
}

src/BankAccounts/BankAccountsClient.php

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Square\BankAccounts;
44

5-
use GuzzleHttp\ClientInterface;
5+
use Psr\Http\Client\ClientInterface;
66
use Square\Core\Client\RawClient;
77
use Square\BankAccounts\Requests\ListBankAccountsRequest;
88
use Square\Core\Pagination\Pager;
@@ -17,7 +17,6 @@
1717
use Square\Environments;
1818
use Square\Core\Client\HttpMethod;
1919
use JsonException;
20-
use GuzzleHttp\Exception\RequestException;
2120
use Psr\Http\Client\ClientExceptionInterface;
2221
use Square\BankAccounts\Requests\GetByV1IdBankAccountsRequest;
2322
use Square\Types\GetBankAccountByV1IdResponse;
@@ -127,16 +126,6 @@ public function createBankAccount(CreateBankAccountRequest $request, ?array $opt
127126
}
128127
} catch (JsonException $e) {
129128
throw new SquareException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
130-
} catch (RequestException $e) {
131-
$response = $e->getResponse();
132-
if ($response === null) {
133-
throw new SquareException(message: $e->getMessage(), previous: $e);
134-
}
135-
throw new SquareApiException(
136-
message: "API request failed",
137-
statusCode: $response->getStatusCode(),
138-
body: $response->getBody()->getContents(),
139-
);
140129
} catch (ClientExceptionInterface $e) {
141130
throw new SquareException(message: $e->getMessage(), previous: $e);
142131
}
@@ -182,16 +171,6 @@ public function getByV1Id(GetByV1IdBankAccountsRequest $request, ?array $options
182171
}
183172
} catch (JsonException $e) {
184173
throw new SquareException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
185-
} catch (RequestException $e) {
186-
$response = $e->getResponse();
187-
if ($response === null) {
188-
throw new SquareException(message: $e->getMessage(), previous: $e);
189-
}
190-
throw new SquareApiException(
191-
message: "API request failed",
192-
statusCode: $response->getStatusCode(),
193-
body: $response->getBody()->getContents(),
194-
);
195174
} catch (ClientExceptionInterface $e) {
196175
throw new SquareException(message: $e->getMessage(), previous: $e);
197176
}
@@ -237,16 +216,6 @@ public function get(GetBankAccountsRequest $request, ?array $options = null): Ge
237216
}
238217
} catch (JsonException $e) {
239218
throw new SquareException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
240-
} catch (RequestException $e) {
241-
$response = $e->getResponse();
242-
if ($response === null) {
243-
throw new SquareException(message: $e->getMessage(), previous: $e);
244-
}
245-
throw new SquareApiException(
246-
message: "API request failed",
247-
statusCode: $response->getStatusCode(),
248-
body: $response->getBody()->getContents(),
249-
);
250219
} catch (ClientExceptionInterface $e) {
251220
throw new SquareException(message: $e->getMessage(), previous: $e);
252221
}
@@ -292,16 +261,6 @@ public function disableBankAccount(DisableBankAccountRequest $request, ?array $o
292261
}
293262
} catch (JsonException $e) {
294263
throw new SquareException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
295-
} catch (RequestException $e) {
296-
$response = $e->getResponse();
297-
if ($response === null) {
298-
throw new SquareException(message: $e->getMessage(), previous: $e);
299-
}
300-
throw new SquareApiException(
301-
message: "API request failed",
302-
statusCode: $response->getStatusCode(),
303-
body: $response->getBody()->getContents(),
304-
);
305264
} catch (ClientExceptionInterface $e) {
306265
throw new SquareException(message: $e->getMessage(), previous: $e);
307266
}
@@ -361,16 +320,6 @@ private function _list(ListBankAccountsRequest $request = new ListBankAccountsRe
361320
}
362321
} catch (JsonException $e) {
363322
throw new SquareException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
364-
} catch (RequestException $e) {
365-
$response = $e->getResponse();
366-
if ($response === null) {
367-
throw new SquareException(message: $e->getMessage(), previous: $e);
368-
}
369-
throw new SquareApiException(
370-
message: "API request failed",
371-
statusCode: $response->getStatusCode(),
372-
body: $response->getBody()->getContents(),
373-
);
374323
} catch (ClientExceptionInterface $e) {
375324
throw new SquareException(message: $e->getMessage(), previous: $e);
376325
}

src/BankAccounts/Requests/CreateBankAccountRequest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public function getIdempotencyKey(): string
6060
public function setIdempotencyKey(string $value): self
6161
{
6262
$this->idempotencyKey = $value;
63+
$this->_setField('idempotencyKey');
6364
return $this;
6465
}
6566

@@ -77,6 +78,7 @@ public function getSourceId(): string
7778
public function setSourceId(string $value): self
7879
{
7980
$this->sourceId = $value;
81+
$this->_setField('sourceId');
8082
return $this;
8183
}
8284

@@ -94,6 +96,7 @@ public function getCustomerId(): ?string
9496
public function setCustomerId(?string $value = null): self
9597
{
9698
$this->customerId = $value;
99+
$this->_setField('customerId');
97100
return $this;
98101
}
99102
}

src/BankAccounts/Requests/DisableBankAccountRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function getBankAccountId(): string
3636
public function setBankAccountId(string $value): self
3737
{
3838
$this->bankAccountId = $value;
39+
$this->_setField('bankAccountId');
3940
return $this;
4041
}
4142
}

src/BankAccounts/Requests/GetBankAccountsRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function getBankAccountId(): string
3636
public function setBankAccountId(string $value): self
3737
{
3838
$this->bankAccountId = $value;
39+
$this->_setField('bankAccountId');
3940
return $this;
4041
}
4142
}

src/BankAccounts/Requests/GetByV1IdBankAccountsRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function getV1BankAccountId(): string
3939
public function setV1BankAccountId(string $value): self
4040
{
4141
$this->v1BankAccountId = $value;
42+
$this->_setField('v1BankAccountId');
4243
return $this;
4344
}
4445
}

0 commit comments

Comments
 (0)