Skip to content

Commit e502998

Browse files
author
autobot
committed
Generated PR for Release: 41.0.0.20240821
1 parent 208a4ad commit e502998

32 files changed

+573
-135
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

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

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

@@ -468,7 +468,7 @@ catalogApi.listCatalogAsync(null, null, null).thenAccept(result -> {
468468

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

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

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

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

doc/api/gift-card-activities.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ giftCardActivitiesApi.listGiftCardActivitiesAsync(null, null, null, null, null,
6767
# Create Gift Card Activity
6868

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

7372
```java
7473
CompletableFuture<CreateGiftCardActivityResponse> createGiftCardActivityAsync(

doc/api/gift-cards.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ giftCardsApi.listGiftCardsAsync(null, null, null, null, null).thenAccept(result
6363

6464
# Create Gift Card
6565

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

7072
```java
7173
CompletableFuture<CreateGiftCardResponse> createGiftCardAsync(

doc/api/o-auth.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,29 +148,18 @@ where `ACCESS_TOKEN` is a
148148

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

151-
:information_source: **Note** This endpoint does not require authentication.
152-
153151
```java
154-
CompletableFuture<RetrieveTokenStatusResponse> retrieveTokenStatusAsync(
155-
final String authorization)
152+
CompletableFuture<RetrieveTokenStatusResponse> retrieveTokenStatusAsync()
156153
```
157154

158-
## Parameters
159-
160-
| Parameter | Type | Tags | Description |
161-
| --- | --- | --- | --- |
162-
| `authorization` | `String` | Header, Required | Client APPLICATION_SECRET |
163-
164155
## Response Type
165156

166157
[`RetrieveTokenStatusResponse`](../../doc/models/retrieve-token-status-response.md)
167158

168159
## Example Usage
169160

170161
```java
171-
String authorization = "Client CLIENT_SECRET";
172-
173-
oAuthApi.retrieveTokenStatusAsync(authorization).thenAccept(result -> {
162+
oAuthApi.retrieveTokenStatusAsync().thenAccept(result -> {
174163
// TODO success callback handler
175164
System.out.println(result);
176165
}).exceptionally(exception -> {

doc/api/payments.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ CompletableFuture<ListPaymentsResponse> listPaymentsAsync(
3838
final Long total,
3939
final String last4,
4040
final String cardBrand,
41-
final Integer limit)
41+
final Integer limit,
42+
final Boolean isOfflinePayment,
43+
final String offlineBeginTime,
44+
final String offlineEndTime)
4245
```
4346

4447
## Parameters
@@ -54,6 +57,9 @@ CompletableFuture<ListPaymentsResponse> listPaymentsAsync(
5457
| `last4` | `String` | Query, Optional | The last four digits of a payment card. |
5558
| `cardBrand` | `String` | Query, Optional | The brand of the payment card (for example, VISA). |
5659
| `limit` | `Integer` | 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` | Query, Optional | Whether the payment was taken offline or not. |
61+
| `offlineBeginTime` | `String` | 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` | 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

5864
## Response Type
5965

@@ -62,7 +68,9 @@ CompletableFuture<ListPaymentsResponse> listPaymentsAsync(
6268
## Example Usage
6369

6470
```java
65-
paymentsApi.listPaymentsAsync(null, null, null, null, null, null, null, null, null).thenAccept(result -> {
71+
Boolean isOfflinePayment = false;
72+
73+
paymentsApi.listPaymentsAsync(null, null, null, null, null, null, null, null, null, isOfflinePayment, null, null).thenAccept(result -> {
6674
// TODO success callback handler
6775
System.out.println(result);
6876
}).exceptionally(exception -> {

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
| `httpClientConfig` | [`Consumer<HttpClientConfiguration.Builder>`](http-client-configuration-builder.md) | Set up Http Client Configuration instance. |
@@ -19,7 +19,7 @@ The API client can be initialized as follows:
1919
SquareClient client = new SquareClient.Builder()
2020
.httpClientConfig(configBuilder -> configBuilder
2121
.timeout(0))
22-
.squareVersion("2024-07-17")
22+
.squareVersion("2024-08-21")
2323
.bearerAuthCredentials(new BearerAuthModel.Builder(
2424
"AccessToken"
2525
)
@@ -44,7 +44,7 @@ public class Program {
4444
SquareClient client = new SquareClient.Builder()
4545
.httpClientConfig(configBuilder -> configBuilder
4646
.timeout(0))
47-
.squareVersion("2024-07-17")
47+
.squareVersion("2024-08-21")
4848
.bearerAuthCredentials(new BearerAuthModel.Builder(
4949
"AccessToken"
5050
)

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`](../../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). | CashPaymentDetails getCashDetails() |
3636
| `ExternalDetails` | [`ExternalPaymentDetails`](../../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). | ExternalPaymentDetails getExternalDetails() |
3737
| `CustomerDetails` | [`CustomerDetails`](../../doc/models/customer-details.md) | Optional | Details about the customer making the payment. | CustomerDetails getCustomerDetails() |
38+
| `OfflinePaymentDetails` | [`OfflinePaymentDetails`](../../doc/models/offline-payment-details.md) | Optional | Details specific to offline payments. | OfflinePaymentDetails getOfflinePaymentDetails() |
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` | 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. | String getOrderId() |
1616
| `LineItemUid` | `String` | 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. | String getLineItemUid() |
1717
| `ReferenceId` | `String` | 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. | String getReferenceId() |
18-
| `BuyerPaymentInstrumentIds` | `List<String>` | 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. | List<String> getBuyerPaymentInstrumentIds() |
18+
| `BuyerPaymentInstrumentIds` | `List<String>` | 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. | List<String> getBuyerPaymentInstrumentIds() |
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` | 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. | String getOrderId() |
1616
| `LineItemUid` | `String` | 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. | String getLineItemUid() |
1717
| `ReferenceId` | `String` | 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. | String getReferenceId() |
18-
| `BuyerPaymentInstrumentIds` | `List<String>` | 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. | List<String> getBuyerPaymentInstrumentIds() |
18+
| `BuyerPaymentInstrumentIds` | `List<String>` | 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. | List<String> getBuyerPaymentInstrumentIds() |
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 | Getter |
1313
| --- | --- | --- | --- | --- |
14-
| `RedeemActivityId` | `String` | 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. | String getRedeemActivityId() |
14+
| `RedeemActivityId` | `String` | 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. | String getRedeemActivityId() |
1515
| `AmountMoney` | [`Money`](../../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. | Money getAmountMoney() |
1616
| `ReferenceId` | `String` | Optional | A client-specified ID that associates the gift card activity with an entity in another system. | String getReferenceId() |
17-
| `PaymentId` | `String` | 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. | String getPaymentId() |
17+
| `PaymentId` | `String` | 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. | String getPaymentId() |
1818

1919
## Example (as JSON)
2020

0 commit comments

Comments
 (0)