Skip to content

Commit 6f008a9

Browse files
author
autobot
committed
Generated PR for Release: 30.0.0.20230608
1 parent 7dbccf4 commit 6f008a9

File tree

127 files changed

+4927
-593
lines changed

Some content is hidden

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

127 files changed

+4927
-593
lines changed

doc/api/o-auth.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ following format:
3737
Authorization: Client APPLICATION_SECRET
3838
```
3939

40-
Replace `APPLICATION_SECRET` with the application secret on the Credentials
40+
Replace `APPLICATION_SECRET` with the application secret on the **Credentials**
4141
page in the [Developer Dashboard](https://developer.squareup.com/apps).
4242

4343
:information_source: **Note** This endpoint does not require authentication.
@@ -53,7 +53,7 @@ CompletableFuture<RenewTokenResponse> renewTokenAsync(
5353

5454
| Parameter | Type | Tags | Description |
5555
| --- | --- | --- | --- |
56-
| `clientId` | `String` | Template, Required | Your application ID, which is available in the OAuth page in the [Developer Dashboard](https://developer.squareup.com/apps). |
56+
| `clientId` | `String` | Template, Required | Your application ID, which is available on the **OAuth** page in the [Developer Dashboard](https://developer.squareup.com/apps). |
5757
| `body` | [`RenewTokenRequest`](../../doc/models/renew-token-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
5858
| `authorization` | `String` | Header, Required | Client APPLICATION_SECRET |
5959

@@ -98,8 +98,8 @@ following format:
9898
Authorization: Client APPLICATION_SECRET
9999
```
100100

101-
Replace `APPLICATION_SECRET` with the application secret on the OAuth
102-
page for your application on the Developer Dashboard.
101+
Replace `APPLICATION_SECRET` with the application secret on the **OAuth**
102+
page for your application in the Developer Dashboard.
103103

104104
:information_source: **Note** This endpoint does not require authentication.
105105

@@ -150,7 +150,7 @@ returns only an access token.
150150
The `grant_type` parameter specifies the type of OAuth request. If
151151
`grant_type` is `authorization_code`, you must include the authorization
152152
code you received when a seller granted you authorization. If `grant_type`
153-
is `refresh_token`, you must provide a valid refresh token. If you are using
153+
is `refresh_token`, you must provide a valid refresh token. If you're using
154154
an old version of the Square APIs (prior to March 13, 2019), `grant_type`
155155
can be `migration_token` and you must provide a valid migration token.
156156

doc/api/subscriptions.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ SubscriptionsApi subscriptionsApi = client.getSubscriptionsApi();
2424

2525
# Create Subscription
2626

27-
Creates a subscription to a subscription plan by a customer.
27+
Enrolls a customer in a subscription.
2828

2929
If you provide a card on file in the request, Square charges the card for
30-
the subscription. Otherwise, Square bills an invoice to the customer's email
30+
the subscription. Otherwise, Square sends an invoice to the customer's email
3131
address. The subscription starts immediately, unless the request includes
32-
the optional `start_date`. Each individual subscription is associated with a particular location.
32+
the optional `start_date`. Each individual subscription is associated with a particular location.
33+
34+
For more information, see [Create a subscription](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#create-a-subscription).
3335

3436
```java
3537
CompletableFuture<CreateSubscriptionResponse> createSubscriptionAsync(
@@ -51,10 +53,10 @@ CompletableFuture<CreateSubscriptionResponse> createSubscriptionAsync(
5153
```java
5254
CreateSubscriptionRequest body = new CreateSubscriptionRequest.Builder(
5355
"S8GWD5R9QB376",
54-
"6JHXF3B2CW3YKHDV4XEM674H",
5556
"CHFGVKYY8RSV93M5KCYTG4PN0G"
5657
)
5758
.idempotencyKey("8193148c-9586-11e6-99f9-28cfe92138cf")
59+
.planId("6JHXF3B2CW3YKHDV4XEM674H")
5860
.startDate("2021-10-20")
5961
.taxPercentage("5")
6062
.priceOverrideMoney(new Money.Builder()
@@ -94,10 +96,7 @@ If left unset, all customers
9496
associated with the specified locations are returned.
9597
If the request specifies customer IDs, the endpoint orders results
9698
first by location, within location by customer ID, and within
97-
customer by subscription creation date.
98-
99-
For more information, see
100-
[Retrieve subscriptions](https://developer.squareup.com/docs/subscriptions-api/overview#retrieve-subscriptions).
99+
customer by subscription creation date.
101100

102101
```java
103102
CompletableFuture<SearchSubscriptionsResponse> searchSubscriptionsAsync(
@@ -146,7 +145,7 @@ subscriptionsApi.searchSubscriptionsAsync(body).thenAccept(result -> {
146145

147146
# Retrieve Subscription
148147

149-
Retrieves a subscription.
148+
Retrieves a specific subscription.
150149

151150
```java
152151
CompletableFuture<RetrieveSubscriptionResponse> retrieveSubscriptionAsync(
@@ -183,8 +182,8 @@ subscriptionsApi.retrieveSubscriptionAsync(subscriptionId, null).thenAccept(resu
183182

184183
# Update Subscription
185184

186-
Updates a subscription. You can set, modify, and clear the
187-
`subscription` field values.
185+
Updates a subscription by modifying or clearing `subscription` field values.
186+
To clear a field, set its value to `null`.
188187

189188
```java
190189
CompletableFuture<UpdateSubscriptionResponse> updateSubscriptionAsync(
@@ -263,9 +262,9 @@ subscriptionsApi.deleteSubscriptionActionAsync(subscriptionId, actionId).thenAcc
263262

264263
# Cancel Subscription
265264

266-
Schedules a `CANCEL` action to cancel an active subscription
267-
by setting the `canceled_date` field to the end of the active billing period
268-
and changing the subscription status from ACTIVE to CANCELED after this date.
265+
Schedules a `CANCEL` action to cancel an active subscription. This
266+
sets the `canceled_date` field to the end of the active billing period. After this date,
267+
the subscription status changes from ACTIVE to CANCELED.
269268

270269
```java
271270
CompletableFuture<CancelSubscriptionResponse> cancelSubscriptionAsync(
@@ -300,7 +299,7 @@ subscriptionsApi.cancelSubscriptionAsync(subscriptionId).thenAccept(result -> {
300299

301300
# List Subscription Events
302301

303-
Lists all events for a specific subscription.
302+
Lists all [events](https://developer.squareup.com/docs/subscriptions-api/actions-events) for a specific subscription.
304303

305304
```java
306305
CompletableFuture<ListSubscriptionEventsResponse> listSubscriptionEventsAsync(
@@ -314,7 +313,7 @@ CompletableFuture<ListSubscriptionEventsResponse> listSubscriptionEventsAsync(
314313
| Parameter | Type | Tags | Description |
315314
| --- | --- | --- | --- |
316315
| `subscriptionId` | `String` | Template, Required | The ID of the subscription to retrieve the events for. |
317-
| `cursor` | `String` | Query, Optional | When the total number of resulting subscription events exceeds the limit of a paged response,<br>specify the cursor returned from a preceding response here to fetch the next set of results.<br>If the cursor is unset, the response contains the last page of the results.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
316+
| `cursor` | `String` | Query, Optional | When the total number of resulting subscription events exceeds the limit of a paged response,<br>specify the cursor returned from a preceding response here to fetch the next set of results.<br>If the cursor is unset, the response contains the last page of the results.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
318317
| `limit` | `Integer` | Query, Optional | The upper limit on the number of subscription events to return<br>in a paged response. |
319318

320319
## Response Type
@@ -417,7 +416,8 @@ subscriptionsApi.resumeSubscriptionAsync(subscriptionId, body).thenAccept(result
417416

418417
# Swap Plan
419418

420-
Schedules a `SWAP_PLAN` action to swap a subscription plan in an existing subscription.
419+
Schedules a `SWAP_PLAN` action to swap a subscription plan variation in an existing subscription.
420+
For more information, see [Swap Subscription Plan Variations](https://developer.squareup.com/docs/subscriptions-api/swap-plan-variations).
421421

422422
```java
423423
CompletableFuture<SwapPlanResponse> swapPlanAsync(
@@ -440,10 +440,8 @@ CompletableFuture<SwapPlanResponse> swapPlanAsync(
440440

441441
```java
442442
String subscriptionId = "subscription_id0";
443-
SwapPlanRequest body = new SwapPlanRequest.Builder(
444-
null
445-
)
446-
.build();
443+
SwapPlanRequest body = new SwapPlanRequest.Builder()
444+
.build();
447445

448446
subscriptionsApi.swapPlanAsync(subscriptionId, body).thenAccept(result -> {
449447
// TODO success callback handler

doc/api/terminal.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ TerminalApi terminalApi = client.getTerminalApi();
1414
* [Search Terminal Actions](../../doc/api/terminal.md#search-terminal-actions)
1515
* [Get Terminal Action](../../doc/api/terminal.md#get-terminal-action)
1616
* [Cancel Terminal Action](../../doc/api/terminal.md#cancel-terminal-action)
17+
* [Dismiss Terminal Action](../../doc/api/terminal.md#dismiss-terminal-action)
1718
* [Create Terminal Checkout](../../doc/api/terminal.md#create-terminal-checkout)
1819
* [Search Terminal Checkouts](../../doc/api/terminal.md#search-terminal-checkouts)
1920
* [Get Terminal Checkout](../../doc/api/terminal.md#get-terminal-checkout)
@@ -132,7 +133,7 @@ CompletableFuture<GetTerminalActionResponse> getTerminalActionAsync(
132133

133134
| Parameter | Type | Tags | Description |
134135
| --- | --- | --- | --- |
135-
| `actionId` | `String` | Template, Required | Unique ID for the desired `TerminalAction` |
136+
| `actionId` | `String` | Template, Required | Unique ID for the desired `TerminalAction`. |
136137

137138
## Response Type
138139

@@ -167,7 +168,7 @@ CompletableFuture<CancelTerminalActionResponse> cancelTerminalActionAsync(
167168

168169
| Parameter | Type | Tags | Description |
169170
| --- | --- | --- | --- |
170-
| `actionId` | `String` | Template, Required | Unique ID for the desired `TerminalAction` |
171+
| `actionId` | `String` | Template, Required | Unique ID for the desired `TerminalAction`. |
171172

172173
## Response Type
173174

@@ -189,6 +190,43 @@ terminalApi.cancelTerminalActionAsync(actionId).thenAccept(result -> {
189190
```
190191

191192

193+
# Dismiss Terminal Action
194+
195+
Dismisses a Terminal action request if the status and type of the request permits it.
196+
197+
See [Link and Dismiss Actions](https://developer.squareup.com/docs/terminal-api/advanced-features/custom-workflows/link-and-dismiss-actions) for more details.
198+
199+
```java
200+
CompletableFuture<DismissTerminalActionResponse> dismissTerminalActionAsync(
201+
final String actionId)
202+
```
203+
204+
## Parameters
205+
206+
| Parameter | Type | Tags | Description |
207+
| --- | --- | --- | --- |
208+
| `actionId` | `String` | Template, Required | Unique ID for the `TerminalAction` associated with the waiting dialog to be dismissed. |
209+
210+
## Response Type
211+
212+
[`DismissTerminalActionResponse`](../../doc/models/dismiss-terminal-action-response.md)
213+
214+
## Example Usage
215+
216+
```java
217+
String actionId = "action_id6";
218+
219+
terminalApi.dismissTerminalActionAsync(actionId).thenAccept(result -> {
220+
// TODO success callback handler
221+
System.out.println(result);
222+
}).exceptionally(exception -> {
223+
// TODO failure callback handler
224+
exception.printStackTrace();
225+
return null;
226+
});
227+
```
228+
229+
192230
# Create Terminal Checkout
193231

194232
Creates a Terminal checkout request and sends it to the specified device to take a payment

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-05-17"` |
8+
| `squareVersion` | `String` | Square Connect API versions<br>*Default*: `"2023-06-08"` |
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` | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) | 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("2023-05-17")
22+
.squareVersion("2023-06-08")
2323
.accessToken("AccessToken")
2424
.environment(Environment.PRODUCTION)
2525
.customUrl("https://connect.squareup.com")
@@ -40,7 +40,7 @@ public class Program {
4040
SquareClient client = new SquareClient.Builder()
4141
.httpClientConfig(configBuilder -> configBuilder
4242
.timeout(0))
43-
.squareVersion("2023-05-17")
43+
.squareVersion("2023-06-08")
4444
.accessToken("AccessToken")
4545
.build();
4646

doc/models/activity-type.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,8 @@
4444
| `THIRD_PARTY_FEE` | Fees collected by a third-party platform. |
4545
| `THIRD_PARTY_FEE_REFUND` | Refunded fees from a third-party platform. |
4646
| `PAYOUT` | Balance change due to money transfer. |
47+
| `AUTOMATIC_BITCOIN_CONVERSIONS` | Indicates the withholding of a portion of each payment by Square that has been<br>automatically converted into bitcoin using Cash App. The seller manages their bitcoin in<br>their Cash App account. |
48+
| `AUTOMATIC_BITCOIN_CONVERSIONS_REVERSED` | Indicates a return of the payment withholding that had been scheduled to be converted<br>into bitcoin using Cash App to the Square payments balance. |
49+
| `CREDIT_CARD_REPAYMENT` | The repayment made toward the outstanding balance on the seller's Square credit card. |
50+
| `CREDIT_CARD_REPAYMENT_REVERSED` | The reversal of the repayment made toward the outstanding balance on the seller's<br>Square credit card. |
4751

doc/models/cancel-subscription-response.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Defines output parameters in a response from the
1313
| Name | Type | Tags | Description | Getter |
1414
| --- | --- | --- | --- | --- |
1515
| `Errors` | [`List<Error>`](../../doc/models/error.md) | Optional | Errors encountered during the request. | List<Error> getErrors() |
16-
| `Subscription` | [`Subscription`](../../doc/models/subscription.md) | Optional | Represents a subscription to a subscription plan by a subscriber.<br><br>For an overview of the `Subscription` type, see<br>[Subscription object](https://developer.squareup.com/docs/subscriptions-api/overview#subscription-object-overview). | Subscription getSubscription() |
16+
| `Subscription` | [`Subscription`](../../doc/models/subscription.md) | Optional | Represents a subscription purchased by a customer.<br><br>For more information, see<br>[Manage Subscriptions](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions). | Subscription getSubscription() |
1717
| `Actions` | [`List<SubscriptionAction>`](../../doc/models/subscription-action.md) | Optional | A list of a single `CANCEL` action scheduled for the subscription. | List<SubscriptionAction> getActions() |
1818

1919
## Example (as JSON)
@@ -35,7 +35,8 @@ Defines output parameters in a response from the
3535
"start_date": "2021-10-20",
3636
"status": "ACTIVE",
3737
"timezone": "America/Los_Angeles",
38-
"version": 1594311617331
38+
"version": 1594311617331,
39+
"plan_variation_id": "plan_variation_id8"
3940
},
4041
"errors": [
4142
{
@@ -62,19 +63,61 @@ Defines output parameters in a response from the
6263
"id": "id9",
6364
"type": "PAUSE",
6465
"effective_date": "effective_date1",
65-
"new_plan_id": "new_plan_id5"
66+
"phases": [
67+
{
68+
"uid": "uid6",
69+
"ordinal": 186,
70+
"order_template_id": "order_template_id8",
71+
"plan_phase_uid": "plan_phase_uid2"
72+
}
73+
],
74+
"new_plan_variation_id": "new_plan_variation_id9"
6675
},
6776
{
6877
"id": "id0",
6978
"type": "CANCEL",
7079
"effective_date": "effective_date0",
71-
"new_plan_id": "new_plan_id6"
80+
"phases": [
81+
{
82+
"uid": "uid5",
83+
"ordinal": 185,
84+
"order_template_id": "order_template_id7",
85+
"plan_phase_uid": "plan_phase_uid1"
86+
},
87+
{
88+
"uid": "uid6",
89+
"ordinal": 186,
90+
"order_template_id": "order_template_id8",
91+
"plan_phase_uid": "plan_phase_uid2"
92+
},
93+
{
94+
"uid": "uid7",
95+
"ordinal": 187,
96+
"order_template_id": "order_template_id9",
97+
"plan_phase_uid": "plan_phase_uid3"
98+
}
99+
],
100+
"new_plan_variation_id": "new_plan_variation_id0"
72101
},
73102
{
74103
"id": "id1",
75104
"type": "SWAP_PLAN",
76105
"effective_date": "effective_date9",
77-
"new_plan_id": "new_plan_id7"
106+
"phases": [
107+
{
108+
"uid": "uid4",
109+
"ordinal": 184,
110+
"order_template_id": "order_template_id6",
111+
"plan_phase_uid": "plan_phase_uid0"
112+
},
113+
{
114+
"uid": "uid5",
115+
"ordinal": 185,
116+
"order_template_id": "order_template_id7",
117+
"plan_phase_uid": "plan_phase_uid1"
118+
}
119+
],
120+
"new_plan_variation_id": "new_plan_variation_id1"
78121
}
79122
]
80123
}

doc/models/cancel-terminal-checkout-response.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"app_id": "APP_ID",
2525
"cancel_reason": "SELLER_CANCELED",
2626
"created_at": "2020-03-16T15:31:19.934Z",
27-
"deadline_duration": "PT10M",
27+
"deadline_duration": "PT5M",
2828
"device_options": {
2929
"device_id": "dbb5d83a-7838-11ea-bc55-0242ac130003",
3030
"skip_receipt_screen": true,

doc/models/catalog-custom-attribute-definition.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ to store any sensitive information (personally identifiable information, card de
4141
"name": "name2"
4242
},
4343
"allowed_object_types": [
44-
"PRICING_RULE",
45-
"PRODUCT_SET",
46-
"TIME_PERIOD"
44+
"TIME_PERIOD",
45+
"MEASUREMENT_UNIT",
46+
"SUBSCRIPTION_PLAN_VARIATION"
4747
],
4848
"seller_visibility": "SELLER_VISIBILITY_HIDDEN",
4949
"app_visibility": "APP_VISIBILITY_HIDDEN",

doc/models/catalog-item-option.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ A group of variations for a `CatalogItem`.
2727
"show_colors": false,
2828
"values": [
2929
{
30-
"type": "MODIFIER",
30+
"type": "TAX",
3131
"id": "id0",
3232
"updated_at": "updated_at6",
3333
"version": 100,
@@ -71,7 +71,7 @@ A group of variations for a `CatalogItem`.
7171
]
7272
},
7373
{
74-
"type": "MODIFIER_LIST",
74+
"type": "ITEM_VARIATION",
7575
"id": "id1",
7676
"updated_at": "updated_at7",
7777
"version": 101,
@@ -100,7 +100,7 @@ A group of variations for a `CatalogItem`.
100100
]
101101
},
102102
{
103-
"type": "DISCOUNT",
103+
"type": "CATEGORY",
104104
"id": "id2",
105105
"updated_at": "updated_at8",
106106
"version": 102,

0 commit comments

Comments
 (0)