Skip to content

Commit 1bc9ef8

Browse files
author
autobot
committed
Generated PR for Release: 32.0.0.20230816
1 parent 667dc7e commit 1bc9ef8

File tree

68 files changed

+2026
-187
lines changed

Some content is hidden

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

68 files changed

+2026
-187
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ mvn test
7272

7373
### Orders
7474
* [Orders]
75+
* [Order Custom Attributes]
7576

7677
### Subscriptions
7778
* [Subscriptions]
@@ -98,10 +99,13 @@ mvn test
9899

99100
### Bookings
100101
* [Bookings]
102+
* [Booking Custom Attributes]
101103

102104
### Business
103105
* [Merchants]
106+
* [Merchant Custom Attributes]
104107
* [Locations]
108+
* [Location Custom Attributes]
105109
* [Devices]
106110
* [Cash Drawers]
107111
* [Vendors]
@@ -165,9 +169,13 @@ You'll also need to provide logic to handle paginated results. For more informa
165169
[Labor]: doc/api/labor.md
166170
[Loyalty]: doc/api/loyalty.md
167171
[Bookings]: doc/api/bookings.md
172+
[Booking Custom Attributes]: doc/api/booking-custom-attributes.md
168173
[Locations]: doc/api/locations.md
174+
[Location Custom Attributes]: doc/api/location-custom-attributes.md
169175
[Merchants]: doc/api/merchants.md
176+
[Merchant Custom Attributes]: doc/api/merchant-custom-attributes.md
170177
[Orders]: doc/api/orders.md
178+
[Order Custom Attributes]: doc/api/order-custom-attributes.md
171179
[Invoices]: doc/api/invoices.md
172180
[Apple Pay]: doc/api/apple-pay.md
173181
[Refunds]: doc/api/refunds.md

doc/api/bookings.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ BookingsApi bookingsApi = client.getBookingsApi();
1313
* [List Bookings](../../doc/api/bookings.md#list-bookings)
1414
* [Create Booking](../../doc/api/bookings.md#create-booking)
1515
* [Search Availability](../../doc/api/bookings.md#search-availability)
16+
* [Bulk Retrieve Bookings](../../doc/api/bookings.md#bulk-retrieve-bookings)
1617
* [Retrieve Business Booking Profile](../../doc/api/bookings.md#retrieve-business-booking-profile)
1718
* [List Team Member Booking Profiles](../../doc/api/bookings.md#list-team-member-booking-profiles)
1819
* [Retrieve Team Member Booking Profile](../../doc/api/bookings.md#retrieve-team-member-booking-profile)
@@ -32,6 +33,7 @@ To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ`
3233
CompletableFuture<ListBookingsResponse> listBookingsAsync(
3334
final Integer limit,
3435
final String cursor,
36+
final String customerId,
3537
final String teamMemberId,
3638
final String locationId,
3739
final String startAtMin,
@@ -44,6 +46,7 @@ CompletableFuture<ListBookingsResponse> listBookingsAsync(
4446
| --- | --- | --- | --- |
4547
| `limit` | `Integer` | Query, Optional | The maximum number of results per page to return in a paged response. |
4648
| `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. |
49+
| `customerId` | `String` | Query, Optional | The [customer](entity:Customer) for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved. |
4750
| `teamMemberId` | `String` | Query, Optional | The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved. |
4851
| `locationId` | `String` | Query, Optional | The location for which to retrieve bookings. If this is not set, all locations' bookings are retrieved. |
4952
| `startAtMin` | `String` | Query, Optional | The RFC 3339 timestamp specifying the earliest of the start time. If this is not set, the current time is used. |
@@ -56,7 +59,7 @@ CompletableFuture<ListBookingsResponse> listBookingsAsync(
5659
## Example Usage
5760

5861
```java
59-
bookingsApi.listBookingsAsync(null, null, null, null, null, null).thenAccept(result -> {
62+
bookingsApi.listBookingsAsync(null, null, null, null, null, null, null).thenAccept(result -> {
6063
// TODO success callback handler
6164
System.out.println(result);
6265
}).exceptionally(exception -> {
@@ -168,6 +171,51 @@ bookingsApi.searchAvailabilityAsync(body).thenAccept(result -> {
168171
```
169172

170173

174+
# Bulk Retrieve Bookings
175+
176+
Bulk-Retrieves a list of bookings by booking IDs.
177+
178+
To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.
179+
To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.
180+
181+
```java
182+
CompletableFuture<BulkRetrieveBookingsResponse> bulkRetrieveBookingsAsync(
183+
final BulkRetrieveBookingsRequest body)
184+
```
185+
186+
## Parameters
187+
188+
| Parameter | Type | Tags | Description |
189+
| --- | --- | --- | --- |
190+
| `body` | [`BulkRetrieveBookingsRequest`](../../doc/models/bulk-retrieve-bookings-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
191+
192+
## Response Type
193+
194+
[`BulkRetrieveBookingsResponse`](../../doc/models/bulk-retrieve-bookings-response.md)
195+
196+
## Example Usage
197+
198+
```java
199+
BulkRetrieveBookingsRequest body = new BulkRetrieveBookingsRequest.Builder(
200+
Arrays.asList(
201+
"booking_ids8",
202+
"booking_ids9",
203+
"booking_ids0"
204+
)
205+
)
206+
.build();
207+
208+
bookingsApi.bulkRetrieveBookingsAsync(body).thenAccept(result -> {
209+
// TODO success callback handler
210+
System.out.println(result);
211+
}).exceptionally(exception -> {
212+
// TODO failure callback handler
213+
exception.printStackTrace();
214+
return null;
215+
});
216+
```
217+
218+
171219
# Retrieve Business Booking Profile
172220

173221
Retrieves a seller's booking profile.

doc/api/gift-cards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ CompletableFuture<ListGiftCardsResponse> listGiftCardsAsync(
3939
| --- | --- | --- | --- |
4040
| `type` | `String` | Query, Optional | If a [type](entity:GiftCardType) is provided, the endpoint returns gift cards of the specified type.<br>Otherwise, the endpoint returns gift cards of all types. |
4141
| `state` | `String` | Query, Optional | If a [state](entity:GiftCardStatus) is provided, the endpoint returns the gift cards in the specified state.<br>Otherwise, the endpoint returns the gift cards of all states. |
42-
| `limit` | `Integer` | Query, Optional | If a limit is provided, the endpoint returns only the specified number of results per page.<br>The maximum value is 50. The default value is 30.<br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
42+
| `limit` | `Integer` | Query, Optional | If a limit is provided, the endpoint returns only the specified number of results per page.<br>The maximum value is 200. The default value is 30.<br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
4343
| `cursor` | `String` | 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>If a cursor is not provided, the endpoint returns the first page of the results.<br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
4444
| `customerId` | `String` | Query, Optional | If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer. |
4545

doc/api/loyalty.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,13 @@ CreateLoyaltyPromotionRequest body = new CreateLoyaltyPromotionRequest.Builder(
519519
new LoyaltyPromotionIncentive.Builder(
520520
"POINTS_MULTIPLIER"
521521
)
522-
.pointsMultiplierData(new LoyaltyPromotionIncentivePointsMultiplierData.Builder(
523-
3
524-
)
525-
.build())
522+
.pointsMultiplierData(new LoyaltyPromotionIncentivePointsMultiplierData.Builder()
523+
.multiplier("3.0")
524+
.build())
526525
.build(),
527526
new LoyaltyPromotionAvailableTimeData.Builder(
528527
Arrays.asList(
529-
"BEGIN:VEVENT\\nDTSTART:20220816T160000\\nDURATION:PT2H\\nRRULE:FREQ=WEEKLY;BYDAY=TU\\nEND:VEVENT"
528+
"BEGIN:VEVENT\nDTSTART:20220816T160000\nDURATION:PT2H\nRRULE:FREQ=WEEKLY;BYDAY=TU\nEND:VEVENT"
530529
)
531530
)
532531
.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-07-20"` |
8+
| `squareVersion` | `String` | Square Connect API versions<br>*Default*: `"2023-08-16"` |
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-07-20")
22+
.squareVersion("2023-08-16")
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-07-20")
43+
.squareVersion("2023-08-16")
4444
.accessToken("AccessToken")
4545
.build();
4646

doc/models/archived-state.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# Archived State
3+
4+
Defines the values for the `archived_state` query expression
5+
used in [SearchCatalogItems](../../doc/api/catalog.md#search-catalog-items)
6+
to return the archived, not archived or either type of catalog items.
7+
8+
## Enumeration
9+
10+
`ArchivedState`
11+
12+
## Fields
13+
14+
| Name | Description |
15+
| --- | --- |
16+
| `ARCHIVED_STATE_NOT_ARCHIVED` | Requested items are not archived with the `is_archived` attribute set to `false`. |
17+
| `ARCHIVED_STATE_ARCHIVED` | Requested items are archived with the `is_archived` attribute set to `true`. |
18+
| `ARCHIVED_STATE_ALL` | Requested items can be archived or not archived. |
19+

doc/models/booking-custom-attribute-delete-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ request. An individual request contains a booking ID, the custom attribute to de
1212

1313
| Name | Type | Tags | Description | Getter |
1414
| --- | --- | --- | --- | --- |
15-
| `BookingId` | `String` | Required | The ID of the target [booking](entity:Booking).<br>**Constraints**: *Minimum Length*: `1` | String getBookingId() |
15+
| `BookingId` | `String` | Required | The ID of the target [booking](entity:Booking).<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | String getBookingId() |
1616
| `Key` | `String` | Required | The key of the custom attribute to delete. This key must match the `key` of a<br>custom attribute definition in the Square seller account. If the requesting application is not<br>the definition owner, you must use the qualified key.<br>**Constraints**: *Minimum Length*: `1` | String getKey() |
1717

1818
## Example (as JSON)

doc/models/booking-custom-attribute-upsert-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and an optional idempotency key.
1313

1414
| Name | Type | Tags | Description | Getter |
1515
| --- | --- | --- | --- | --- |
16-
| `BookingId` | `String` | Required | The ID of the target [booking](entity:Booking).<br>**Constraints**: *Minimum Length*: `1` | String getBookingId() |
16+
| `BookingId` | `String` | Required | The ID of the target [booking](entity:Booking).<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | String getBookingId() |
1717
| `CustomAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding<br>`CustomAttributeDefinition` object. | CustomAttribute getCustomAttribute() |
1818
| `IdempotencyKey` | `String` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.<br>For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).<br>**Constraints**: *Maximum Length*: `45` | String getIdempotencyKey() |
1919

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# Bulk Retrieve Bookings Request
3+
4+
Request payload for bulk retrieval of bookings.
5+
6+
## Structure
7+
8+
`BulkRetrieveBookingsRequest`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description | Getter |
13+
| --- | --- | --- | --- | --- |
14+
| `BookingIds` | `List<String>` | Required | A non-empty list of [Booking](entity:Booking) IDs specifying bookings to retrieve. | List<String> getBookingIds() |
15+
16+
## Example (as JSON)
17+
18+
```json
19+
{
20+
"booking_ids": [
21+
"booking_ids4"
22+
]
23+
}
24+
```
25+
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
2+
# Bulk Retrieve Bookings Response
3+
4+
Response payload for bulk retrieval of bookings.
5+
6+
## Structure
7+
8+
`BulkRetrieveBookingsResponse`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description | Getter |
13+
| --- | --- | --- | --- | --- |
14+
| `Bookings` | [`Map<String, RetrieveBookingResponse>`](../../doc/models/retrieve-booking-response.md) | Optional | Requested bookings returned as a map containing `booking_id` as the key and `RetrieveBookingResponse` as the value. | Map<String, RetrieveBookingResponse> getBookings() |
15+
| `Errors` | [`List<Error>`](../../doc/models/error.md) | Optional | Errors that occurred during the request. | List<Error> getErrors() |
16+
17+
## Example (as JSON)
18+
19+
```json
20+
{
21+
"bookings": {
22+
"sc3p3m7dvctfr1": {
23+
"booking": {
24+
"all_day": false,
25+
"appointment_segments": [
26+
{
27+
"any_team_member": false,
28+
"duration_minutes": 60,
29+
"service_variation_id": "VG4FYBKK3UL6UITOEYQ6MFLS",
30+
"service_variation_version": 1641341724039,
31+
"team_member_id": "TMjiqI3PxyLMKr4k"
32+
}
33+
],
34+
"created_at": "2023-04-26T18:19:21Z",
35+
"customer_id": "4TDWKN9E8165X8Z77MRS0VFMJM",
36+
"id": "sc3p3m7dvctfr1",
37+
"location_id": "LY6WNBPVM6VGV",
38+
"start_at": "2023-05-01T14:00:00Z",
39+
"status": "ACCEPTED",
40+
"updated_at": "2023-04-26T18:19:21Z",
41+
"version": 0
42+
},
43+
"errors": []
44+
},
45+
"tdegug1dvctdef": {
46+
"errors": [
47+
{
48+
"category": "INVALID_REQUEST_ERROR",
49+
"code": "NOT_FOUND",
50+
"detail": "Specified booking was not found.",
51+
"field": "booking_id"
52+
}
53+
],
54+
"booking": {
55+
"id": "id8",
56+
"version": 86,
57+
"status": "CANCELLED_BY_SELLER",
58+
"created_at": "created_at6",
59+
"updated_at": "updated_at6"
60+
}
61+
},
62+
"tdegug1fqni3wh": {
63+
"booking": {
64+
"all_day": false,
65+
"appointment_segments": [
66+
{
67+
"any_team_member": false,
68+
"duration_minutes": 60,
69+
"service_variation_id": "VG4FYBKK3UL6UITOEYQ6MFLS",
70+
"service_variation_version": 1641341724039,
71+
"team_member_id": "TMjiqI3PxyLMKr4k"
72+
}
73+
],
74+
"created_at": "2023-04-26T18:19:30Z",
75+
"customer_id": "4TDWKN9E8165X8Z77MRS0VFMJM",
76+
"id": "tdegug1fqni3wh",
77+
"location_id": "LY6WNBPVM6VGV",
78+
"start_at": "2023-05-02T14:00:00Z",
79+
"status": "ACCEPTED",
80+
"updated_at": "2023-04-26T18:19:30Z",
81+
"version": 0
82+
},
83+
"errors": []
84+
}
85+
},
86+
"errors": []
87+
}
88+
```
89+

0 commit comments

Comments
 (0)