Skip to content

Commit 2419cd7

Browse files
authored
Merge pull request #135 from square/release/29.0.0
Generated PR for Release: 29.0.0
2 parents a33c353 + 3c95de6 commit 2419cd7

File tree

380 files changed

+2309
-2063
lines changed

Some content is hidden

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

380 files changed

+2309
-2063
lines changed

doc/api/customers.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ async listCustomers(
3636
limit?: number,
3737
sortField?: string,
3838
sortOrder?: string,
39+
count?: boolean,
3940
requestOptions?: RequestOptions
4041
): Promise<ApiResponse<ListCustomersResponse>>
4142
```
@@ -48,6 +49,7 @@ async listCustomers(
4849
| `limit` | `number \| undefined` | 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). |
4950
| `sortField` | [`string \| undefined`](../../doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>The default value is `DEFAULT`. |
5051
| `sortOrder` | [`string \| undefined`](../../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`. |
52+
| `count` | `boolean \| undefined` | 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` |
5153
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
5254

5355
## Response Type
@@ -57,8 +59,12 @@ async listCustomers(
5759
## Example Usage
5860

5961
```ts
62+
const count = false;
63+
6064
try {
61-
const { result, ...httpResponse } = await customersApi.listCustomers();
65+
const { result, ...httpResponse } = await customersApi.listCustomers(
66+
count
67+
);
6268
// Get more response info...
6369
// const { statusCode, headers } = httpResponse;
6470
} catch (error) {

doc/api/invoices.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const body: CreateInvoiceRequest = {
126126
squareGiftCard: false,
127127
bankAccount: false,
128128
buyNowPayLater: false,
129+
cashAppPay: false,
129130
},
130131
customFields: [
131132
{

doc/api/refunds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async listPaymentRefunds(
4242

4343
| Parameter | Type | Tags | Description |
4444
| --- | --- | --- | --- |
45-
| `beginTime` | `string \| undefined` | 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. |
45+
| `beginTime` | `string \| undefined` | 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. |
4646
| `endTime` | `string \| undefined` | 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. |
4747
| `sortOrder` | `string \| undefined` | 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). |
4848
| `cursor` | `string \| undefined` | 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/api/subscriptions.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,19 @@ const body: CreateSubscriptionRequest = {
5858
locationId: 'S8GWD5R9QB376',
5959
customerId: 'CHFGVKYY8RSV93M5KCYTG4PN0G',
6060
idempotencyKey: '8193148c-9586-11e6-99f9-28cfe92138cf',
61-
planId: '6JHXF3B2CW3YKHDV4XEM674H',
62-
startDate: '2021-10-20',
63-
taxPercentage: '5',
64-
priceOverrideMoney: {
65-
amount: BigInt(100),
66-
currency: 'USD',
67-
},
61+
planVariationId: '6JHXF3B2CW3YKHDV4XEM674H',
62+
startDate: '2023-06-20',
6863
cardId: 'ccof:qy5x8hHGYsgLrp4Q4GB',
6964
timezone: 'America/Los_Angeles',
7065
source: {
71-
name: 'My App',
66+
name: 'My Application',
7267
},
68+
phases: [
69+
{
70+
ordinal: 0,
71+
orderTemplateId: 'U2NaowWxzXwpsZU697x7ZHOAnCNZY',
72+
}
73+
],
7374
};
7475

7576
try {
@@ -501,7 +502,15 @@ async swapPlan(
501502
```ts
502503
const subscriptionId = 'subscription_id0';
503504

504-
const body: SwapPlanRequest = {};
505+
const body: SwapPlanRequest = {
506+
newPlanVariationId: 'FQ7CDXXWSLUJRPM3GFJSJGZ7',
507+
phases: [
508+
{
509+
ordinal: 0,
510+
orderTemplateId: 'uhhnjH9osVv3shUADwaC0b3hNxQZY',
511+
}
512+
],
513+
};
505514

506515
try {
507516
const { result, ...httpResponse } = await subscriptionsApi.swapPlan(

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
| `additionalHeaders` | `Readonly<Record<string, string>>` | Additional headers to add to each API call<br>*Default*: `{}` |
@@ -40,7 +40,7 @@ The API client can be initialized as follows:
4040

4141
```ts
4242
const client = new Client({
43-
squareVersion: '2023-06-08',
43+
squareVersion: '2023-07-20',
4444
timeout: 60000,
4545
additionalHeaders: {},
4646
userAgentDetail: '',
@@ -55,7 +55,7 @@ const client = new Client({
5555
import { ApiError, Client } from 'square';
5656

5757
const client = new Client({
58-
squareVersion: '2023-06-08',
58+
squareVersion: '2023-07-20',
5959
timeout: 60000,
6060
additionalHeaders: {},
6161
userAgentDetail: '',

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/api/loyalty.md#accumulate-loya
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/api/customers.md#add-group-to-cu
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
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ Represents an [AdjustLoyaltyPoints](../../doc/api/loyalty.md#adjust-loyalty-poin
5252
},
5353
"errors": [
5454
{
55-
"category": "AUTHENTICATION_ERROR",
56-
"code": "REFUND_ALREADY_PENDING",
55+
"category": "REFUND_ERROR",
56+
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
5757
"detail": "detail1",
5858
"field": "field9"
5959
},
6060
{
61-
"category": "INVALID_REQUEST_ERROR",
62-
"code": "PAYMENT_NOT_REFUNDABLE",
61+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
62+
"code": "BAD_REQUEST",
6363
"detail": "detail2",
6464
"field": "field0"
6565
},
6666
{
67-
"category": "RATE_LIMIT_ERROR",
68-
"code": "REFUND_DECLINED",
67+
"category": "EXTERNAL_VENDOR_ERROR",
68+
"code": "MISSING_REQUIRED_PARAMETER",
6969
"detail": "detail3",
7070
"field": "field1"
7171
}

0 commit comments

Comments
 (0)