Skip to content

Commit 6b432a8

Browse files
authored
Merge pull request #109 from square/release/34.0.0.20231018
Generated PR for Release: 34.0.0.20231018
2 parents c70e66d + 64802be commit 6b432a8

File tree

60 files changed

+3009
-178
lines changed

Some content is hidden

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

60 files changed

+3009
-178
lines changed

doc/api/bookings.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ BookingsApi bookingsApi = client.getBookingsApi();
1515
* [Search Availability](../../doc/api/bookings.md#search-availability)
1616
* [Bulk Retrieve Bookings](../../doc/api/bookings.md#bulk-retrieve-bookings)
1717
* [Retrieve Business Booking Profile](../../doc/api/bookings.md#retrieve-business-booking-profile)
18+
* [List Location Booking Profiles](../../doc/api/bookings.md#list-location-booking-profiles)
19+
* [Retrieve Location Booking Profile](../../doc/api/bookings.md#retrieve-location-booking-profile)
1820
* [List Team Member Booking Profiles](../../doc/api/bookings.md#list-team-member-booking-profiles)
1921
* [Bulk Retrieve Team Member Booking Profiles](../../doc/api/bookings.md#bulk-retrieve-team-member-booking-profiles)
2022
* [Retrieve Team Member Booking Profile](../../doc/api/bookings.md#retrieve-team-member-booking-profile)
@@ -243,6 +245,76 @@ bookingsApi.retrieveBusinessBookingProfileAsync().thenAccept(result -> {
243245
```
244246

245247

248+
# List Location Booking Profiles
249+
250+
Lists location booking profiles of a seller.
251+
252+
```java
253+
CompletableFuture<ListLocationBookingProfilesResponse> listLocationBookingProfilesAsync(
254+
final Integer limit,
255+
final String cursor)
256+
```
257+
258+
## Parameters
259+
260+
| Parameter | Type | Tags | Description |
261+
| --- | --- | --- | --- |
262+
| `limit` | `Integer` | Query, Optional | The maximum number of results to return in a paged response. |
263+
| `cursor` | `String` | Query, Optional | The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results. |
264+
265+
## Response Type
266+
267+
[`ListLocationBookingProfilesResponse`](../../doc/models/list-location-booking-profiles-response.md)
268+
269+
## Example Usage
270+
271+
```java
272+
bookingsApi.listLocationBookingProfilesAsync(null, null).thenAccept(result -> {
273+
// TODO success callback handler
274+
System.out.println(result);
275+
}).exceptionally(exception -> {
276+
// TODO failure callback handler
277+
exception.printStackTrace();
278+
return null;
279+
});
280+
```
281+
282+
283+
# Retrieve Location Booking Profile
284+
285+
Retrieves a seller's location booking profile.
286+
287+
```java
288+
CompletableFuture<RetrieveLocationBookingProfileResponse> retrieveLocationBookingProfileAsync(
289+
final String locationId)
290+
```
291+
292+
## Parameters
293+
294+
| Parameter | Type | Tags | Description |
295+
| --- | --- | --- | --- |
296+
| `locationId` | `String` | Template, Required | The ID of the location to retrieve the booking profile. |
297+
298+
## Response Type
299+
300+
[`RetrieveLocationBookingProfileResponse`](../../doc/models/retrieve-location-booking-profile-response.md)
301+
302+
## Example Usage
303+
304+
```java
305+
String locationId = "location_id4";
306+
307+
bookingsApi.retrieveLocationBookingProfileAsync(locationId).thenAccept(result -> {
308+
// TODO success callback handler
309+
System.out.println(result);
310+
}).exceptionally(exception -> {
311+
// TODO failure callback handler
312+
exception.printStackTrace();
313+
return null;
314+
});
315+
```
316+
317+
246318
# List Team Member Booking Profiles
247319

248320
Lists booking profiles for team members.

doc/api/employees.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ EmployeesApi employeesApi = client.getEmployeesApi();
1616

1717
# List Employees
1818

19-
**This endpoint is deprecated.**
20-
21-
ListEmployees
19+
**This endpoint is deprecated.**
2220

2321
```java
2422
CompletableFuture<ListEmployeesResponse> listEmployeesAsync(
@@ -57,9 +55,7 @@ employeesApi.listEmployeesAsync(null, null, null, null).thenAccept(result -> {
5755

5856
# Retrieve Employee
5957

60-
**This endpoint is deprecated.**
61-
62-
RetrieveEmployee
58+
**This endpoint is deprecated.**
6359

6460
```java
6561
CompletableFuture<RetrieveEmployeeResponse> retrieveEmployeeAsync(

doc/api/subscriptions.md

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ SubscriptionsApi subscriptionsApi = client.getSubscriptionsApi();
1111
## Methods
1212

1313
* [Create Subscription](../../doc/api/subscriptions.md#create-subscription)
14+
* [Bulk Swap Plan](../../doc/api/subscriptions.md#bulk-swap-plan)
1415
* [Search Subscriptions](../../doc/api/subscriptions.md#search-subscriptions)
1516
* [Retrieve Subscription](../../doc/api/subscriptions.md#retrieve-subscription)
1617
* [Update Subscription](../../doc/api/subscriptions.md#update-subscription)
1718
* [Delete Subscription Action](../../doc/api/subscriptions.md#delete-subscription-action)
19+
* [Change Billing Anchor Date](../../doc/api/subscriptions.md#change-billing-anchor-date)
1820
* [Cancel Subscription](../../doc/api/subscriptions.md#cancel-subscription)
1921
* [List Subscription Events](../../doc/api/subscriptions.md#list-subscription-events)
2022
* [Pause Subscription](../../doc/api/subscriptions.md#pause-subscription)
@@ -65,7 +67,7 @@ CreateSubscriptionRequest body = new CreateSubscriptionRequest.Builder(
6567
.build())
6668
.phases(Arrays.asList(
6769
new Phase.Builder()
68-
.ordinal(0)
70+
.ordinal(0L)
6971
.orderTemplateId("U2NaowWxzXwpsZU697x7ZHOAnCNZY")
7072
.build()
7173
))
@@ -82,6 +84,47 @@ subscriptionsApi.createSubscriptionAsync(body).thenAccept(result -> {
8284
```
8385

8486

87+
# Bulk Swap Plan
88+
89+
Schedules a plan variation change for all active subscriptions under a given plan
90+
variation. For more information, see [Swap Subscription Plan Variations](https://developer.squareup.com/docs/subscriptions-api/swap-plan-variations).
91+
92+
```java
93+
CompletableFuture<BulkSwapPlanResponse> bulkSwapPlanAsync(
94+
final BulkSwapPlanRequest body)
95+
```
96+
97+
## Parameters
98+
99+
| Parameter | Type | Tags | Description |
100+
| --- | --- | --- | --- |
101+
| `body` | [`BulkSwapPlanRequest`](../../doc/models/bulk-swap-plan-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
102+
103+
## Response Type
104+
105+
[`BulkSwapPlanResponse`](../../doc/models/bulk-swap-plan-response.md)
106+
107+
## Example Usage
108+
109+
```java
110+
BulkSwapPlanRequest body = new BulkSwapPlanRequest.Builder(
111+
"FQ7CDXXWSLUJRPM3GFJSJGZ7",
112+
"6JHXF3B2CW3YKHDV4XEM674H",
113+
"S8GWD5R9QB376"
114+
)
115+
.build();
116+
117+
subscriptionsApi.bulkSwapPlanAsync(body).thenAccept(result -> {
118+
// TODO success callback handler
119+
System.out.println(result);
120+
}).exceptionally(exception -> {
121+
// TODO failure callback handler
122+
exception.printStackTrace();
123+
return null;
124+
});
125+
```
126+
127+
85128
# Search Subscriptions
86129

87130
Searches for subscriptions.
@@ -263,6 +306,47 @@ subscriptionsApi.deleteSubscriptionActionAsync(subscriptionId, actionId).thenAcc
263306
```
264307

265308

309+
# Change Billing Anchor Date
310+
311+
Changes the [billing anchor date](https://developer.squareup.com/docs/subscriptions-api/subscription-billing#billing-dates)
312+
for a subscription.
313+
314+
```java
315+
CompletableFuture<ChangeBillingAnchorDateResponse> changeBillingAnchorDateAsync(
316+
final String subscriptionId,
317+
final ChangeBillingAnchorDateRequest body)
318+
```
319+
320+
## Parameters
321+
322+
| Parameter | Type | Tags | Description |
323+
| --- | --- | --- | --- |
324+
| `subscriptionId` | `String` | Template, Required | The ID of the subscription to update the billing anchor date. |
325+
| `body` | [`ChangeBillingAnchorDateRequest`](../../doc/models/change-billing-anchor-date-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
326+
327+
## Response Type
328+
329+
[`ChangeBillingAnchorDateResponse`](../../doc/models/change-billing-anchor-date-response.md)
330+
331+
## Example Usage
332+
333+
```java
334+
String subscriptionId = "subscription_id0";
335+
ChangeBillingAnchorDateRequest body = new ChangeBillingAnchorDateRequest.Builder()
336+
.monthlyBillingAnchorDate(1)
337+
.build();
338+
339+
subscriptionsApi.changeBillingAnchorDateAsync(subscriptionId, body).thenAccept(result -> {
340+
// TODO success callback handler
341+
System.out.println(result);
342+
}).exceptionally(exception -> {
343+
// TODO failure callback handler
344+
exception.printStackTrace();
345+
return null;
346+
});
347+
```
348+
349+
266350
# Cancel Subscription
267351

268352
Schedules a `CANCEL` action to cancel an active subscription. This
@@ -447,7 +531,7 @@ SwapPlanRequest body = new SwapPlanRequest.Builder()
447531
.newPlanVariationId("FQ7CDXXWSLUJRPM3GFJSJGZ7")
448532
.phases(Arrays.asList(
449533
new PhaseInput.Builder(
450-
0
534+
0L
451535
)
452536
.orderTemplateId("uhhnjH9osVv3shUADwaC0b3hNxQZY")
453537
.build()

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-09-25"` |
8+
| `squareVersion` | `String` | Square Connect API versions<br>*Default*: `"2023-10-18"` |
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-09-25")
22+
.squareVersion("2023-10-18")
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-09-25")
43+
.squareVersion("2023-10-18")
4444
.accessToken("AccessToken")
4545
.build();
4646

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
# Bulk Swap Plan Request
3+
4+
Defines input parameters in a call to the
5+
[BulkSwapPlan](../../doc/api/subscriptions.md#bulk-swap-plan) endpoint.
6+
7+
## Structure
8+
9+
`BulkSwapPlanRequest`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description | Getter |
14+
| --- | --- | --- | --- | --- |
15+
| `NewPlanVariationId` | `String` | Required | The ID of the new subscription plan variation.<br><br>This field is required.<br>**Constraints**: *Minimum Length*: `1` | String getNewPlanVariationId() |
16+
| `OldPlanVariationId` | `String` | Required | The ID of the plan variation whose subscriptions should be swapped. Active subscriptions<br>using this plan variation will be subscribed to the new plan variation on their next billing<br>day.<br>**Constraints**: *Minimum Length*: `1` | String getOldPlanVariationId() |
17+
| `LocationId` | `String` | Required | The ID of the location to associate with the swapped subscriptions.<br>**Constraints**: *Minimum Length*: `1` | String getLocationId() |
18+
19+
## Example (as JSON)
20+
21+
```json
22+
{
23+
"location_id": "S8GWD5R9QB376",
24+
"new_plan_variation_id": "FQ7CDXXWSLUJRPM3GFJSJGZ7",
25+
"old_plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H"
26+
}
27+
```
28+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
# Bulk Swap Plan Response
3+
4+
Defines output parameters in a response of the
5+
[BulkSwapPlan](../../doc/api/subscriptions.md#bulk-swap-plan) endpoint.
6+
7+
## Structure
8+
9+
`BulkSwapPlanResponse`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description | Getter |
14+
| --- | --- | --- | --- | --- |
15+
| `Errors` | [`List<Error>`](../../doc/models/error.md) | Optional | Errors encountered during the request. | List<Error> getErrors() |
16+
| `AffectedSubscriptions` | `Integer` | Optional | The number of affected subscriptions. | Integer getAffectedSubscriptions() |
17+
18+
## Example (as JSON)
19+
20+
```json
21+
{
22+
"affected_subscriptions": 12,
23+
"errors": [
24+
{
25+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
26+
"code": "MAP_KEY_LENGTH_TOO_LONG",
27+
"detail": "detail6",
28+
"field": "field4"
29+
},
30+
{
31+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
32+
"code": "MAP_KEY_LENGTH_TOO_LONG",
33+
"detail": "detail6",
34+
"field": "field4"
35+
}
36+
]
37+
}
38+
```
39+

doc/models/business-booking-profile.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
# Business Booking Profile
33

4+
A seller's business booking profile, including booking policy, appointment settings, etc.
5+
46
## Structure
57

68
`BusinessBookingProfile`

doc/models/cancel-subscription-response.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ Defines output parameters in a response from the
6464
"actions": [
6565
{
6666
"id": "id8",
67-
"type": "CANCEL",
67+
"type": "RESUME",
6868
"effective_date": "effective_date8",
69+
"monthly_billing_anchor_date": 186,
6970
"phases": [
7071
{
7172
"uid": "uid0",
@@ -85,13 +86,13 @@ Defines output parameters in a response from the
8586
"order_template_id": "order_template_id2",
8687
"plan_phase_uid": "plan_phase_uid6"
8788
}
88-
],
89-
"new_plan_variation_id": "new_plan_variation_id8"
89+
]
9090
},
9191
{
9292
"id": "id8",
93-
"type": "CANCEL",
93+
"type": "RESUME",
9494
"effective_date": "effective_date8",
95+
"monthly_billing_anchor_date": 186,
9596
"phases": [
9697
{
9798
"uid": "uid0",
@@ -111,13 +112,13 @@ Defines output parameters in a response from the
111112
"order_template_id": "order_template_id2",
112113
"plan_phase_uid": "plan_phase_uid6"
113114
}
114-
],
115-
"new_plan_variation_id": "new_plan_variation_id8"
115+
]
116116
},
117117
{
118118
"id": "id8",
119-
"type": "CANCEL",
119+
"type": "RESUME",
120120
"effective_date": "effective_date8",
121+
"monthly_billing_anchor_date": 186,
121122
"phases": [
122123
{
123124
"uid": "uid0",
@@ -137,8 +138,7 @@ Defines output parameters in a response from the
137138
"order_template_id": "order_template_id2",
138139
"plan_phase_uid": "plan_phase_uid6"
139140
}
140-
],
141-
"new_plan_variation_id": "new_plan_variation_id8"
141+
]
142142
}
143143
]
144144
}

0 commit comments

Comments
 (0)