Skip to content

Commit 6b8fab3

Browse files
authored
Merge pull request #118 from square/release/29.0.0.20230720
Generated PR for Release: 29.0.0.20230720
2 parents 42bec21 + 805727c commit 6b8fab3

File tree

387 files changed

+2594
-2117
lines changed

Some content is hidden

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

387 files changed

+2594
-2117
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "square/square",
33
"description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.",
4-
"version": "28.0.1.20230608",
4+
"version": "29.0.0.20230720",
55
"type": "library",
66
"keywords": [
77
"Square",

doc/apis/customers.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function listCustomers(
3535
?string $cursor = null,
3636
?int $limit = null,
3737
?string $sortField = null,
38-
?string $sortOrder = null
38+
?string $sortOrder = null,
39+
?bool $count = false
3940
): ApiResponse
4041
```
4142

@@ -47,6 +48,7 @@ function listCustomers(
4748
| `limit` | `?int` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>If the specified limit is less than 1 or greater than 100, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 100.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
4849
| `sortField` | [`?string(CustomerSortField)`](../../doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>The default value is `DEFAULT`. |
4950
| `sortOrder` | [`?string(SortOrder)`](../../doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or<br>descending (`DESC`) order.<br><br>The default value is `ASC`. |
51+
| `count` | `?bool` | Query, Optional | Indicates whether to return the total count of customers in the `count` field of the response.<br><br>The default value is `false`.<br>**Default**: `false` |
5052

5153
## Response Type
5254

@@ -55,7 +57,9 @@ This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` met
5557
## Example Usage
5658

5759
```php
58-
$apiResponse = $customersApi->listCustomers();
60+
$count = false;
61+
62+
$apiResponse = $customersApi->listCustomers($count);
5963

6064
if ($apiResponse->isSuccess()) {
6165
$listCustomersResponse = $apiResponse->getResult();

doc/apis/invoices.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ $body = CreateInvoiceRequestBuilder::init(
124124
->squareGiftCard(false)
125125
->bankAccount(false)
126126
->buyNowPayLater(false)
127+
->cashAppPay(false)
127128
->build()
128129
)
129130
->customFields(

doc/apis/refunds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function listPaymentRefunds(
4141

4242
| Parameter | Type | Tags | Description |
4343
| --- | --- | --- | --- |
44-
| `beginTime` | `?string` | Query, Optional | Indicates the start of the time range to retrieve each PaymentRefund`for, in RFC 3339 format. The range is determined using the`created_at`field for each`PaymentRefund`.<br><br>Default: The current time minus one year. |
44+
| `beginTime` | `?string` | Query, Optional | Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339<br>format. The range is determined using the `created_at` field for each `PaymentRefund`.<br><br>Default: The current time minus one year. |
4545
| `endTime` | `?string` | Query, Optional | Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339<br>format. The range is determined using the `created_at` field for each `PaymentRefund`.<br><br>Default: The current time. |
4646
| `sortOrder` | `?string` | Query, Optional | The order in which results are listed by `PaymentRefund.created_at`:<br><br>- `ASC` - Oldest to newest.<br>- `DESC` - Newest to oldest (default). |
4747
| `cursor` | `?string` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for the original query.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |

doc/apis/subscriptions.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,23 @@ $body = CreateSubscriptionRequestBuilder::init(
5555
'CHFGVKYY8RSV93M5KCYTG4PN0G'
5656
)
5757
->idempotencyKey('8193148c-9586-11e6-99f9-28cfe92138cf')
58-
->planId('6JHXF3B2CW3YKHDV4XEM674H')
59-
->startDate('2021-10-20')
60-
->taxPercentage('5')
61-
->priceOverrideMoney(
62-
MoneyBuilder::init()
63-
->amount(100)
64-
->currency(Currency::USD)
65-
->build()
66-
)
58+
->planVariationId('6JHXF3B2CW3YKHDV4XEM674H')
59+
->startDate('2023-06-20')
6760
->cardId('ccof:qy5x8hHGYsgLrp4Q4GB')
6861
->timezone('America/Los_Angeles')
6962
->source(
7063
SubscriptionSourceBuilder::init()
71-
->name('My App')
64+
->name('My Application')
7265
->build()
7366
)
67+
->phases(
68+
[
69+
PhaseBuilder::init()
70+
->ordinal(0)
71+
->orderTemplateId('U2NaowWxzXwpsZU697x7ZHOAnCNZY')
72+
->build()
73+
]
74+
)
7475
->build();
7576

7677
$apiResponse = $subscriptionsApi->createSubscription($body);
@@ -478,7 +479,18 @@ This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` met
478479
```php
479480
$subscriptionId = 'subscription_id0';
480481

481-
$body = SwapPlanRequestBuilder::init()->build();
482+
$body = SwapPlanRequestBuilder::init()
483+
->newPlanVariationId('FQ7CDXXWSLUJRPM3GFJSJGZ7')
484+
->phases(
485+
[
486+
PhaseInputBuilder::init(
487+
0
488+
)
489+
->orderTemplateId('uhhnjH9osVv3shUADwaC0b3hNxQZY')
490+
->build()
491+
]
492+
)
493+
->build();
482494

483495
$apiResponse = $subscriptionsApi->swapPlan(
484496
$subscriptionId,

doc/client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:
55

66
| Parameter | Type | Description |
77
| --- | --- | --- |
8-
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2023-06-08'` |
8+
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2023-07-20'` |
99
| `customUrl` | `string` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
1010
| `environment` | `string` | The API environment. <br> **Default: `production`** |
1111
| `timeout` | `int` | Timeout for API calls in seconds.<br>*Default*: `60` |
@@ -26,7 +26,7 @@ The API client can be initialized as follows:
2626
```php
2727
$client = SquareClientBuilder::init()
2828
->accessToken('AccessToken')
29-
->squareVersion('2023-06-08')
29+
->squareVersion('2023-07-20')
3030
->environment('production')
3131
->customUrl('https://connect.squareup.com')
3232
->build();
@@ -51,7 +51,7 @@ use Square\SquareClientBuilder;
5151

5252
$client = SquareClientBuilder::init()
5353
->accessToken('AccessToken')
54-
->squareVersion('2023-06-08')
54+
->squareVersion('2023-07-20')
5555
->build();
5656

5757
$apiResponse = $client->getLocationsApi()->listLocations();

doc/models/accept-dispute-response.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ Defines the fields in an `AcceptDispute` response.
4141
},
4242
"errors": [
4343
{
44-
"category": "AUTHENTICATION_ERROR",
45-
"code": "REFUND_ALREADY_PENDING",
44+
"category": "REFUND_ERROR",
45+
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
4646
"detail": "detail1",
4747
"field": "field9"
4848
},
4949
{
50-
"category": "INVALID_REQUEST_ERROR",
51-
"code": "PAYMENT_NOT_REFUNDABLE",
50+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
51+
"code": "BAD_REQUEST",
5252
"detail": "detail2",
5353
"field": "field0"
5454
},
5555
{
56-
"category": "RATE_LIMIT_ERROR",
57-
"code": "REFUND_DECLINED",
56+
"category": "EXTERNAL_VENDOR_ERROR",
57+
"code": "MISSING_REQUIRED_PARAMETER",
5858
"detail": "detail3",
5959
"field": "field1"
6060
}

doc/models/accumulate-loyalty-points-response.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ Represents an [AccumulateLoyaltyPoints](../../doc/apis/loyalty.md#accumulate-loy
5656
],
5757
"errors": [
5858
{
59-
"category": "AUTHENTICATION_ERROR",
60-
"code": "REFUND_ALREADY_PENDING",
59+
"category": "REFUND_ERROR",
60+
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
6161
"detail": "detail1",
6262
"field": "field9"
6363
},
6464
{
65-
"category": "INVALID_REQUEST_ERROR",
66-
"code": "PAYMENT_NOT_REFUNDABLE",
65+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
66+
"code": "BAD_REQUEST",
6767
"detail": "detail2",
6868
"field": "field0"
6969
},
7070
{
71-
"category": "RATE_LIMIT_ERROR",
72-
"code": "REFUND_DECLINED",
71+
"category": "EXTERNAL_VENDOR_ERROR",
72+
"code": "MISSING_REQUIRED_PARAMETER",
7373
"detail": "detail3",
7474
"field": "field1"
7575
}

doc/models/add-group-to-customer-response.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ a request to the [AddGroupToCustomer](../../doc/apis/customers.md#add-group-to-c
2020
{
2121
"errors": [
2222
{
23-
"category": "AUTHENTICATION_ERROR",
24-
"code": "REFUND_ALREADY_PENDING",
23+
"category": "REFUND_ERROR",
24+
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
2525
"detail": "detail1",
2626
"field": "field9"
2727
},
2828
{
29-
"category": "INVALID_REQUEST_ERROR",
30-
"code": "PAYMENT_NOT_REFUNDABLE",
29+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
30+
"code": "BAD_REQUEST",
3131
"detail": "detail2",
3232
"field": "field0"
3333
},
3434
{
35-
"category": "RATE_LIMIT_ERROR",
36-
"code": "REFUND_DECLINED",
35+
"category": "EXTERNAL_VENDOR_ERROR",
36+
"code": "MISSING_REQUIRED_PARAMETER",
3737
"detail": "detail3",
3838
"field": "field1"
3939
}

doc/models/additional-recipient.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Represents an additional recipient (other than the merchant) receiving a portion
2424
"description": "description0",
2525
"amount_money": {
2626
"amount": 186,
27-
"currency": "NGN"
27+
"currency": "TZS"
2828
},
2929
"receivable_id": "receivable_id0"
3030
}

0 commit comments

Comments
 (0)