Skip to content

Commit a3f2805

Browse files
author
autobot
committed
Generated PR for Release: 38.0.0
1 parent 71867a0 commit a3f2805

37 files changed

+258
-90
lines changed

doc/api/catalog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ children.
3939
IDs can be deleted. The response will only include IDs that were
4040
actually deleted.
4141

42-
To ensure consistency, only one delete request is processed at a time per seller account.
42+
To ensure consistency, only one delete request is processed at a time per seller account.
4343
While one (batch or non-batch) delete request is being processed, other (batched and non-batched)
4444
delete requests are rejected with the `429` error code.
4545

@@ -143,7 +143,7 @@ batches will be processed in order as long as the total object count for the
143143
request (items, variations, modifier lists, discounts, and taxes) is no more
144144
than 10,000.
145145

146-
To ensure consistency, only one update request is processed at a time per seller account.
146+
To ensure consistency, only one update request is processed at a time per seller account.
147147
While one (batch or non-batch) update request is being processed, other (batched and non-batched)
148148
update requests are rejected with the `429` error code.
149149

@@ -483,7 +483,7 @@ try {
483483

484484
Creates a new or updates the specified [CatalogObject](../../doc/models/catalog-object.md).
485485

486-
To ensure consistency, only one update request is processed at a time per seller account.
486+
To ensure consistency, only one update request is processed at a time per seller account.
487487
While one (batch or non-batch) update request is being processed, other (batched and non-batched)
488488
update requests are rejected with the `429` error code.
489489

@@ -565,7 +565,7 @@ are also deleted. For example, deleting a [CatalogItem](../../doc/models/catalog
565565
will also delete all of its
566566
[CatalogItemVariation](../../doc/models/catalog-item-variation.md) children.
567567

568-
To ensure consistency, only one delete request is processed at a time per seller account.
568+
To ensure consistency, only one delete request is processed at a time per seller account.
569569
While one (batch or non-batch) delete request is being processed, other (batched and non-batched)
570570
delete requests are rejected with the `429` error code.
571571

doc/api/gift-card-activities.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ try {
7070
# Create Gift Card Activity
7171

7272
Creates a gift card activity to manage the balance or state of a [gift card](../../doc/models/gift-card.md).
73-
For example, you create an `ACTIVATE` activity to activate a gift card with an initial balance
74-
before the gift card can be used.
73+
For example, create an `ACTIVATE` activity to activate a gift card with an initial balance before first use.
7574

7675
```ts
7776
async createGiftCardActivity( body: CreateGiftCardActivityRequest,

doc/api/gift-cards.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ try {
6666

6767
# Create Gift Card
6868

69-
Creates a digital gift card or registers a physical (plastic) gift card. After the gift card
70-
is created, you must call [CreateGiftCardActivity](../../doc/api/gift-card-activities.md#create-gift-card-activity)
71-
to activate the card with an initial balance before it can be used for payment.
69+
Creates a digital gift card or registers a physical (plastic) gift card. The resulting gift card
70+
has a `PENDING` state. To activate a gift card so that it can be redeemed for purchases, call
71+
[CreateGiftCardActivity](../../doc/api/gift-card-activities.md#create-gift-card-activity) and create an `ACTIVATE`
72+
activity with the initial balance. Alternatively, you can use [RefundPayment](../../doc/api/refunds.md#refund-payment)
73+
to refund a payment to the new gift card.
7274

7375
```ts
7476
async createGiftCard( body: CreateGiftCardRequest,

doc/api/o-auth.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,14 @@ where `ACCESS_TOKEN` is a
156156

157157
If the access token is expired or not a valid access token, the endpoint returns an `UNAUTHORIZED` error.
158158

159-
:information_source: **Note** This endpoint does not require authentication.
160-
161159
```ts
162-
async retrieveTokenStatus( authorization: string,
163-
requestOptions?: RequestOptions): Promise<ApiResponse<RetrieveTokenStatusResponse>>
160+
async retrieveTokenStatus(requestOptions?: RequestOptions): Promise<ApiResponse<RetrieveTokenStatusResponse>>
164161
```
165162

166163
## Parameters
167164

168165
| Parameter | Type | Tags | Description |
169166
| --- | --- | --- | --- |
170-
| `authorization` | `string` | Header, Required | Client APPLICATION_SECRET |
171167
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
172168

173169
## Response Type
@@ -177,10 +173,8 @@ requestOptions?: RequestOptions): Promise<ApiResponse<RetrieveTokenStatusRespons
177173
## Example Usage
178174

179175
```ts
180-
const authorization = 'Client CLIENT_SECRET';
181-
182176
try {
183-
const { result, ...httpResponse } = await oAuthApi.retrieveTokenStatus(authorization);
177+
const { result, ...httpResponse } = await oAuthApi.retrieveTokenStatus();
184178
// Get more response info...
185179
// const { statusCode, headers } = httpResponse;
186180
} catch (error) {

doc/api/payments.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ async listPayments( beginTime?: string,
3838
last4?: string,
3939
cardBrand?: string,
4040
limit?: number,
41+
isOfflinePayment?: boolean,
42+
offlineBeginTime?: string,
43+
offlineEndTime?: string,
4144
requestOptions?: RequestOptions): Promise<ApiResponse<ListPaymentsResponse>>
4245
```
4346

@@ -54,6 +57,9 @@ requestOptions?: RequestOptions): Promise<ApiResponse<ListPaymentsResponse>>
5457
| `last4` | `string \| undefined` | Query, Optional | The last four digits of a payment card. |
5558
| `cardBrand` | `string \| undefined` | Query, Optional | The brand of the payment card (for example, VISA). |
5659
| `limit` | `number \| undefined` | Query, Optional | The maximum number of results to be returned in a single page.<br>It is possible to receive fewer results than the specified limit on a given page.<br><br>The default value of 100 is also the maximum allowed value. If the provided value is<br>greater than 100, it is ignored and the default value is used instead.<br><br>Default: `100` |
60+
| `isOfflinePayment` | `boolean \| undefined` | Query, Optional | Whether the payment was taken offline or not. |
61+
| `offlineBeginTime` | `string \| undefined` | Query, Optional | Indicates the start of the time range for which to retrieve offline payments, in RFC 3339<br>format for timestamps. The range is determined using the<br>`offline_payment_details.client_created_at` field for each Payment. If set, payments without a<br>value set in `offline_payment_details.client_created_at` will not be returned.<br><br>Default: The current time. |
62+
| `offlineEndTime` | `string \| undefined` | Query, Optional | Indicates the end of the time range for which to retrieve offline payments, in RFC 3339<br>format for timestamps. The range is determined using the<br>`offline_payment_details.client_created_at` field for each Payment. If set, payments without a<br>value set in `offline_payment_details.client_created_at` will not be returned.<br><br>Default: The current time. |
5763
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
5864

5965
## Response Type
@@ -63,8 +69,21 @@ requestOptions?: RequestOptions): Promise<ApiResponse<ListPaymentsResponse>>
6369
## Example Usage
6470

6571
```ts
72+
const isOfflinePayment = false;
73+
6674
try {
67-
const { result, ...httpResponse } = await paymentsApi.listPayments();
75+
const { result, ...httpResponse } = await paymentsApi.listPayments(
76+
undefined,
77+
undefined,
78+
undefined,
79+
undefined,
80+
undefined,
81+
undefined,
82+
undefined,
83+
undefined,
84+
undefined,
85+
isOfflinePayment
86+
);
6887
// Get more response info...
6988
// const { statusCode, headers } = httpResponse;
7089
} catch (error) {

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*: `'2024-07-17'` |
8+
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2024-08-21'` |
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*: `{}` |
@@ -43,7 +43,7 @@ const client = new Client({
4343
bearerAuthCredentials: {
4444
accessToken: 'AccessToken'
4545
},
46-
squareVersion: '2024-07-17',
46+
squareVersion: '2024-08-21',
4747
timeout: 60000,
4848
additionalHeaders: {},
4949
userAgentDetail: '',
@@ -61,7 +61,7 @@ const client = new Client({
6161
bearerAuthCredentials: {
6262
accessToken: 'AccessToken'
6363
},
64-
squareVersion: '2024-07-17',
64+
squareVersion: '2024-08-21',
6565
timeout: 60000,
6666
additionalHeaders: {},
6767
userAgentDetail: '',

doc/models/create-payment-request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Describes a request to create a payment using
3535
| `cashDetails` | [`CashPaymentDetails \| undefined`](../../doc/models/cash-payment-details.md) | Optional | Stores details about a cash payment. Contains only non-confidential information. For more information, see<br>[Take Cash Payments](https://developer.squareup.com/docs/payments-api/take-payments/cash-payments). |
3636
| `externalDetails` | [`ExternalPaymentDetails \| undefined`](../../doc/models/external-payment-details.md) | Optional | Stores details about an external payment. Contains only non-confidential information.<br>For more information, see<br>[Take External Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). |
3737
| `customerDetails` | [`CustomerDetails \| undefined`](../../doc/models/customer-details.md) | Optional | Details about the customer making the payment. |
38+
| `offlinePaymentDetails` | [`OfflinePaymentDetails \| undefined`](../../doc/models/offline-payment-details.md) | Optional | Details specific to offline payments. |
3839

3940
## Example (as JSON)
4041

doc/models/gift-card-activity-activate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Represents details about an `ACTIVATE` [gift card activity type](../../doc/model
1515
| `orderId` | `string \| null \| undefined` | Optional | The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.<br><br>Applications that use the Square Orders API to process orders must specify the order ID<br>[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. |
1616
| `lineItemUid` | `string \| null \| undefined` | Optional | The UID of the `GIFT_CARD` line item in the order that represents the gift card purchase.<br><br>Applications that use the Square Orders API to process orders must specify the line item UID<br>in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. |
1717
| `referenceId` | `string \| null \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.<br><br>Applications that use a custom order processing system can use this field to track information<br>related to an order or payment. |
18-
| `buyerPaymentInstrumentIds` | `string[] \| null \| undefined` | Optional | The payment instrument IDs used to process the gift card purchase, such as a credit card ID<br>or bank account ID.<br><br>Applications that use a custom order processing system must specify payment instrument IDs in<br>the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.<br>Square uses this information to perform compliance checks.<br><br>For applications that use the Square Orders API to process payments, Square has the necessary<br>instrument IDs to perform compliance checks. |
18+
| `buyerPaymentInstrumentIds` | `string[] \| null \| undefined` | Optional | The payment instrument IDs used to process the gift card purchase, such as a credit card ID<br>or bank account ID.<br><br>Applications that use a custom order processing system must specify payment instrument IDs in<br>the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.<br>Square uses this information to perform compliance checks.<br><br>For applications that use the Square Orders API to process payments, Square has the necessary<br>instrument IDs to perform compliance checks.<br><br>Each buyer payment instrument ID can contain a maximum of 255 characters. |
1919

2020
## Example (as JSON)
2121

doc/models/gift-card-activity-load.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Represents details about a `LOAD` [gift card activity type](../../doc/models/gif
1515
| `orderId` | `string \| null \| undefined` | Optional | The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.<br><br>Applications that use the Square Orders API to process orders must specify the order ID in the<br>[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. |
1616
| `lineItemUid` | `string \| null \| undefined` | Optional | The UID of the `GIFT_CARD` line item in the order that represents the additional funds for the gift card.<br><br>Applications that use the Square Orders API to process orders must specify the line item UID<br>in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request. |
1717
| `referenceId` | `string \| null \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system.<br><br>Applications that use a custom order processing system can use this field to track information related to<br>an order or payment. |
18-
| `buyerPaymentInstrumentIds` | `string[] \| null \| undefined` | Optional | The payment instrument IDs used to process the order for the additional funds, such as a credit card ID<br>or bank account ID.<br><br>Applications that use a custom order processing system must specify payment instrument IDs in<br>the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.<br>Square uses this information to perform compliance checks.<br><br>For applications that use the Square Orders API to process payments, Square has the necessary<br>instrument IDs to perform compliance checks. |
18+
| `buyerPaymentInstrumentIds` | `string[] \| null \| undefined` | Optional | The payment instrument IDs used to process the order for the additional funds, such as a credit card ID<br>or bank account ID.<br><br>Applications that use a custom order processing system must specify payment instrument IDs in<br>the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.<br>Square uses this information to perform compliance checks.<br><br>For applications that use the Square Orders API to process payments, Square has the necessary<br>instrument IDs to perform compliance checks.<br><br>Each buyer payment instrument ID can contain a maximum of 255 characters. |
1919

2020
## Example (as JSON)
2121

doc/models/gift-card-activity-refund.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Represents details about a `REFUND` [gift card activity type](../../doc/models/g
1111

1212
| Name | Type | Tags | Description |
1313
| --- | --- | --- | --- |
14-
| `redeemActivityId` | `string \| null \| undefined` | Optional | The ID of the refunded `REDEEM` gift card activity. Square populates this field if the<br>`payment_id` in the corresponding [RefundPayment](api-endpoint:Refunds-RefundPayment) request<br>represents a redemption made by the same gift card. Note that you must use `RefundPayment`<br>to refund a gift card payment to the same gift card if the payment was processed by Square.<br><br>For applications that use a custom payment processing system, this field is required when creating<br>a `REFUND` activity. The provided `REDEEM` activity ID must be linked to the same gift card. |
14+
| `redeemActivityId` | `string \| null \| undefined` | Optional | The ID of the refunded `REDEEM` gift card activity. Square populates this field if the<br>`payment_id` in the corresponding [RefundPayment](api-endpoint:Refunds-RefundPayment) request<br>represents a gift card redemption.<br><br>For applications that use a custom payment processing system, this field is required when creating<br>a `REFUND` activity. The provided `REDEEM` activity ID must be linked to the same gift card. |
1515
| `amountMoney` | [`Money \| undefined`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. |
1616
| `referenceId` | `string \| null \| undefined` | Optional | A client-specified ID that associates the gift card activity with an entity in another system. |
17-
| `paymentId` | `string \| undefined` | Optional | The ID of the refunded payment. Square populates this field if the refund is for a<br>payment processed by Square and one of the following conditions is true:<br><br>- The Refunds API is used to refund a gift card payment to the same gift card.<br>- A seller initiated the refund from Square Point of Sale or the Seller Dashboard. The payment source can be the<br> same gift card or a cross-tender payment from a credit card or a different gift card. |
17+
| `paymentId` | `string \| undefined` | Optional | The ID of the refunded payment. Square populates this field if the refund is for a<br>payment processed by Square. This field matches the `payment_id` in the corresponding<br>[RefundPayment](api-endpoint:Refunds-RefundPayment) request. |
1818

1919
## Example (as JSON)
2020

0 commit comments

Comments
 (0)