Skip to content

Commit

Permalink
Merge pull request #135 from square/release/29.0.0
Browse files Browse the repository at this point in the history
Generated PR for Release: 29.0.0
  • Loading branch information
jguze committed Jul 19, 2023
2 parents a33c353 + 3c95de6 commit 2419cd7
Show file tree
Hide file tree
Showing 380 changed files with 2,309 additions and 2,063 deletions.
8 changes: 7 additions & 1 deletion doc/api/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ async listCustomers(
limit?: number,
sortField?: string,
sortOrder?: string,
count?: boolean,
requestOptions?: RequestOptions
): Promise<ApiResponse<ListCustomersResponse>>
```
Expand All @@ -48,6 +49,7 @@ async listCustomers(
| `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). |
| `sortField` | [`string \| undefined`](../../doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>The default value is `DEFAULT`. |
| `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`. |
| `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` |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type
Expand All @@ -57,8 +59,12 @@ async listCustomers(
## Example Usage

```ts
const count = false;

try {
const { result, ...httpResponse } = await customersApi.listCustomers();
const { result, ...httpResponse } = await customersApi.listCustomers(
count
);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions doc/api/invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const body: CreateInvoiceRequest = {
squareGiftCard: false,
bankAccount: false,
buyNowPayLater: false,
cashAppPay: false,
},
customFields: [
{
Expand Down
2 changes: 1 addition & 1 deletion doc/api/refunds.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async listPaymentRefunds(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `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. |
| `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. |
| `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. |
| `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). |
| `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). |
Expand Down
27 changes: 18 additions & 9 deletions doc/api/subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,19 @@ const body: CreateSubscriptionRequest = {
locationId: 'S8GWD5R9QB376',
customerId: 'CHFGVKYY8RSV93M5KCYTG4PN0G',
idempotencyKey: '8193148c-9586-11e6-99f9-28cfe92138cf',
planId: '6JHXF3B2CW3YKHDV4XEM674H',
startDate: '2021-10-20',
taxPercentage: '5',
priceOverrideMoney: {
amount: BigInt(100),
currency: 'USD',
},
planVariationId: '6JHXF3B2CW3YKHDV4XEM674H',
startDate: '2023-06-20',
cardId: 'ccof:qy5x8hHGYsgLrp4Q4GB',
timezone: 'America/Los_Angeles',
source: {
name: 'My App',
name: 'My Application',
},
phases: [
{
ordinal: 0,
orderTemplateId: 'U2NaowWxzXwpsZU697x7ZHOAnCNZY',
}
],
};

try {
Expand Down Expand Up @@ -501,7 +502,15 @@ async swapPlan(
```ts
const subscriptionId = 'subscription_id0';

const body: SwapPlanRequest = {};
const body: SwapPlanRequest = {
newPlanVariationId: 'FQ7CDXXWSLUJRPM3GFJSJGZ7',
phases: [
{
ordinal: 0,
orderTemplateId: 'uhhnjH9osVv3shUADwaC0b3hNxQZY',
}
],
};

try {
const { result, ...httpResponse } = await subscriptionsApi.swapPlan(
Expand Down
6 changes: 3 additions & 3 deletions doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:

| Parameter | Type | Description |
| --- | --- | --- |
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2023-06-08'` |
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2023-07-20'` |
| `customUrl` | `string` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
| `environment` | `string` | The API environment. <br> **Default: `production`** |
| `additionalHeaders` | `Readonly<Record<string, string>>` | Additional headers to add to each API call<br>*Default*: `{}` |
Expand Down Expand Up @@ -40,7 +40,7 @@ The API client can be initialized as follows:

```ts
const client = new Client({
squareVersion: '2023-06-08',
squareVersion: '2023-07-20',
timeout: 60000,
additionalHeaders: {},
userAgentDetail: '',
Expand All @@ -55,7 +55,7 @@ const client = new Client({
import { ApiError, Client } from 'square';

const client = new Client({
squareVersion: '2023-06-08',
squareVersion: '2023-07-20',
timeout: 60000,
additionalHeaders: {},
userAgentDetail: '',
Expand Down
12 changes: 6 additions & 6 deletions doc/models/accept-dispute-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ Defines the fields in an `AcceptDispute` response.
},
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/accumulate-loyalty-points-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ Represents an [AccumulateLoyaltyPoints](../../doc/api/loyalty.md#accumulate-loya
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/add-group-to-customer-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ a request to the [AddGroupToCustomer](../../doc/api/customers.md#add-group-to-cu
{
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
2 changes: 1 addition & 1 deletion doc/models/additional-recipient.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Represents an additional recipient (other than the merchant) receiving a portion
"description": "description0",
"amount_money": {
"amount": 186,
"currency": "NGN"
"currency": "TZS"
},
"receivable_id": "receivable_id0"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/adjust-loyalty-points-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ Represents an [AdjustLoyaltyPoints](../../doc/api/loyalty.md#adjust-loyalty-poin
},
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
2 changes: 1 addition & 1 deletion doc/models/bank-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ linking a bank account to a Square account, see
"id": "id0",
"account_number_suffix": "account_number_suffix8",
"country": "FO",
"currency": "YER",
"currency": "SLL",
"account_type": "BUSINESS_CHECKING",
"holder_name": "holder_name4",
"primary_bank_identification_number": "primary_bank_identification_number8",
Expand Down
12 changes: 6 additions & 6 deletions doc/models/batch-delete-catalog-objects-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/batch-retrieve-catalog-objects-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,20 @@
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/batch-retrieve-orders-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,20 @@ a request to the `BatchRetrieveOrders` endpoint.
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/batch-upsert-catalog-objects-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,20 @@
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/booking-custom-attribute-upsert-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ Represents a response for an individual upsert request in a [BulkUpsertBookingCu
},
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
Loading

0 comments on commit 2419cd7

Please sign in to comment.