Skip to content

Commit 49ccb66

Browse files
authored
Merge pull request #98 from square/release/28.0.0.20230419
Generated PR for Release: 28.0.0.20230419
2 parents 6c56034 + 0417232 commit 49ccb66

File tree

775 files changed

+36339
-6069
lines changed

Some content is hidden

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

775 files changed

+36339
-6069
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ mvn test
121121
* [Mobile Authorization]
122122
* [OAuth]
123123

124+
### Webhook Subscriptions
125+
* [Webhook Subscriptions]
124126
## Deprecated APIs
125127

126128
The following Square APIs are [deprecated](https://developer.squareup.com/docs/build-basics/api-lifecycle):
@@ -181,3 +183,4 @@ You'll also need to provide logic to handle paginated results. For more informa
181183
[Gift Card Activities]: doc/api/gift-card-activities.md
182184
[Employees]: doc/api/employees.md
183185
[Transactions]: doc/api/transactions.md
186+
[Webhook Subscriptions]: doc/api/webhook-subscriptions.md

doc/api/apple-pay.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,16 @@ CompletableFuture<RegisterDomainResponse> registerDomainAsync(
4242

4343
```java
4444
RegisterDomainRequest body = new RegisterDomainRequest.Builder(
45-
"example.com")
46-
.build();
45+
"example.com"
46+
)
47+
.build();
4748

4849
applePayApi.registerDomainAsync(body).thenAccept(result -> {
4950
// TODO success callback handler
51+
System.out.println(result);
5052
}).exceptionally(exception -> {
5153
// TODO failure callback handler
54+
exception.printStackTrace();
5255
return null;
5356
});
5457
```

doc/api/bank-accounts.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ CompletableFuture<ListBankAccountsResponse> listBankAccountsAsync(
4343
```java
4444
bankAccountsApi.listBankAccountsAsync(null, null, null).thenAccept(result -> {
4545
// TODO success callback handler
46+
System.out.println(result);
4647
}).exceptionally(exception -> {
4748
// TODO failure callback handler
49+
exception.printStackTrace();
4850
return null;
4951
});
5052
```
@@ -76,8 +78,10 @@ String v1BankAccountId = "v1_bank_account_id8";
7678

7779
bankAccountsApi.getBankAccountByV1IdAsync(v1BankAccountId).thenAccept(result -> {
7880
// TODO success callback handler
81+
System.out.println(result);
7982
}).exceptionally(exception -> {
8083
// TODO failure callback handler
84+
exception.printStackTrace();
8185
return null;
8286
});
8387
```
@@ -110,8 +114,10 @@ String bankAccountId = "bank_account_id0";
110114

111115
bankAccountsApi.getBankAccountAsync(bankAccountId).thenAccept(result -> {
112116
// TODO success callback handler
117+
System.out.println(result);
113118
}).exceptionally(exception -> {
114119
// TODO failure callback handler
120+
exception.printStackTrace();
115121
return null;
116122
});
117123
```

doc/api/booking-custom-attributes.md

Lines changed: 70 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ CompletableFuture<ListBookingCustomAttributeDefinitionsResponse> listBookingCust
5252
```java
5353
bookingCustomAttributesApi.listBookingCustomAttributeDefinitionsAsync(null, null).thenAccept(result -> {
5454
// TODO success callback handler
55+
System.out.println(result);
5556
}).exceptionally(exception -> {
5657
// TODO failure callback handler
58+
exception.printStackTrace();
5759
return null;
5860
});
5961
```
@@ -87,17 +89,18 @@ CompletableFuture<CreateBookingCustomAttributeDefinitionResponse> createBookingC
8789
## Example Usage
8890

8991
```java
90-
CustomAttributeDefinition customAttributeDefinition = new CustomAttributeDefinition.Builder()
91-
.build();
92-
9392
CreateBookingCustomAttributeDefinitionRequest body = new CreateBookingCustomAttributeDefinitionRequest.Builder(
94-
customAttributeDefinition)
95-
.build();
93+
new CustomAttributeDefinition.Builder()
94+
.build()
95+
)
96+
.build();
9697

9798
bookingCustomAttributesApi.createBookingCustomAttributeDefinitionAsync(body).thenAccept(result -> {
9899
// TODO success callback handler
100+
System.out.println(result);
99101
}).exceptionally(exception -> {
100102
// TODO failure callback handler
103+
exception.printStackTrace();
101104
return null;
102105
});
103106
```
@@ -135,8 +138,10 @@ String key = "key0";
135138

136139
bookingCustomAttributesApi.deleteBookingCustomAttributeDefinitionAsync(key).thenAccept(result -> {
137140
// TODO success callback handler
141+
System.out.println(result);
138142
}).exceptionally(exception -> {
139143
// TODO failure callback handler
144+
exception.printStackTrace();
140145
return null;
141146
});
142147
```
@@ -173,8 +178,10 @@ String key = "key0";
173178

174179
bookingCustomAttributesApi.retrieveBookingCustomAttributeDefinitionAsync(key, null).thenAccept(result -> {
175180
// TODO success callback handler
181+
System.out.println(result);
176182
}).exceptionally(exception -> {
177183
// TODO failure callback handler
184+
exception.printStackTrace();
178185
return null;
179186
});
180187
```
@@ -211,17 +218,18 @@ CompletableFuture<UpdateBookingCustomAttributeDefinitionResponse> updateBookingC
211218

212219
```java
213220
String key = "key0";
214-
CustomAttributeDefinition customAttributeDefinition = new CustomAttributeDefinition.Builder()
215-
.build();
216-
217221
UpdateBookingCustomAttributeDefinitionRequest body = new UpdateBookingCustomAttributeDefinitionRequest.Builder(
218-
customAttributeDefinition)
219-
.build();
222+
new CustomAttributeDefinition.Builder()
223+
.build()
224+
)
225+
.build();
220226

221227
bookingCustomAttributesApi.updateBookingCustomAttributeDefinitionAsync(key, body).thenAccept(result -> {
222228
// TODO success callback handler
229+
System.out.println(result);
223230
}).exceptionally(exception -> {
224231
// TODO failure callback handler
232+
exception.printStackTrace();
225233
return null;
226234
});
227235
```
@@ -255,28 +263,28 @@ CompletableFuture<BulkDeleteBookingCustomAttributesResponse> bulkDeleteBookingCu
255263
## Example Usage
256264

257265
```java
258-
Map<String, BookingCustomAttributeDeleteRequest> values = new LinkedHashMap<>();
259-
BookingCustomAttributeDeleteRequest values0 = new BookingCustomAttributeDeleteRequest.Builder(
260-
"booking_id8",
261-
"key4")
262-
.build();
263-
264-
values.put("key0", values0);
265-
BookingCustomAttributeDeleteRequest values1 = new BookingCustomAttributeDeleteRequest.Builder(
266-
"booking_id9",
267-
"key5")
268-
.build();
269-
270-
values.put("key1", values1);
271-
272266
BulkDeleteBookingCustomAttributesRequest body = new BulkDeleteBookingCustomAttributesRequest.Builder(
273-
values)
274-
.build();
267+
new LinkedHashMap<String, BookingCustomAttributeDeleteRequest>() {{
268+
put("key0", new BookingCustomAttributeDeleteRequest.Builder(
269+
"booking_id8",
270+
"key4"
271+
)
272+
.build());
273+
put("key1", new BookingCustomAttributeDeleteRequest.Builder(
274+
"booking_id9",
275+
"key5"
276+
)
277+
.build());
278+
}}
279+
)
280+
.build();
275281

276282
bookingCustomAttributesApi.bulkDeleteBookingCustomAttributesAsync(body).thenAccept(result -> {
277283
// TODO success callback handler
284+
System.out.println(result);
278285
}).exceptionally(exception -> {
279286
// TODO failure callback handler
287+
exception.printStackTrace();
280288
return null;
281289
});
282290
```
@@ -310,34 +318,30 @@ CompletableFuture<BulkUpsertBookingCustomAttributesResponse> bulkUpsertBookingCu
310318
## Example Usage
311319

312320
```java
313-
Map<String, BookingCustomAttributeUpsertRequest> values = new LinkedHashMap<>();
314-
CustomAttribute customAttribute = new CustomAttribute.Builder()
315-
.build();
316-
317-
BookingCustomAttributeUpsertRequest values0 = new BookingCustomAttributeUpsertRequest.Builder(
318-
"booking_id8",
319-
customAttribute)
320-
.build();
321-
322-
values.put("key0", values0);
323-
CustomAttribute customAttribute = new CustomAttribute.Builder()
324-
.build();
325-
326-
BookingCustomAttributeUpsertRequest values1 = new BookingCustomAttributeUpsertRequest.Builder(
327-
"booking_id9",
328-
customAttribute)
329-
.build();
330-
331-
values.put("key1", values1);
332-
333321
BulkUpsertBookingCustomAttributesRequest body = new BulkUpsertBookingCustomAttributesRequest.Builder(
334-
values)
335-
.build();
322+
new LinkedHashMap<String, BookingCustomAttributeUpsertRequest>() {{
323+
put("key0", new BookingCustomAttributeUpsertRequest.Builder(
324+
"booking_id8",
325+
new CustomAttribute.Builder()
326+
.build()
327+
)
328+
.build());
329+
put("key1", new BookingCustomAttributeUpsertRequest.Builder(
330+
"booking_id9",
331+
new CustomAttribute.Builder()
332+
.build()
333+
)
334+
.build());
335+
}}
336+
)
337+
.build();
336338

337339
bookingCustomAttributesApi.bulkUpsertBookingCustomAttributesAsync(body).thenAccept(result -> {
338340
// TODO success callback handler
341+
System.out.println(result);
339342
}).exceptionally(exception -> {
340343
// TODO failure callback handler
344+
exception.printStackTrace();
341345
return null;
342346
});
343347
```
@@ -362,10 +366,10 @@ CompletableFuture<ListBookingCustomAttributesResponse> listBookingCustomAttribut
362366

363367
| Parameter | Type | Tags | Description |
364368
| --- | --- | --- | --- |
365-
| `bookingId` | `String` | Template, Required | The ID of the target [booking](../../doc/models/booking.md). |
369+
| `bookingId` | `String` | Template, Required | The ID of the target [booking](entity:Booking). |
366370
| `limit` | `Integer` | Query, Optional | The maximum number of results to return in a single paged response. This limit is advisory.<br>The response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.<br>The default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
367371
| `cursor` | `String` | Query, Optional | The cursor returned in the paged response from the previous call to this endpoint.<br>Provide this cursor to retrieve the next page of results for your original request. For more<br>information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
368-
| `withDefinitions` | `Boolean` | Query, Optional | Indicates whether to return the [custom attribute definition](../../doc/models/custom-attribute-definition.md) in the `definition` field of each<br>custom attribute. Set this parameter to `true` to get the name and description of each custom<br>attribute, information about the data type, or other definition details. The default value is `false`.<br>**Default**: `false` |
372+
| `withDefinitions` | `Boolean` | Query, Optional | Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of each<br>custom attribute. Set this parameter to `true` to get the name and description of each custom<br>attribute, information about the data type, or other definition details. The default value is `false`.<br>**Default**: `false` |
369373

370374
## Response Type
371375

@@ -379,8 +383,10 @@ Boolean withDefinitions = false;
379383

380384
bookingCustomAttributesApi.listBookingCustomAttributesAsync(bookingId, null, null, withDefinitions).thenAccept(result -> {
381385
// TODO success callback handler
386+
System.out.println(result);
382387
}).exceptionally(exception -> {
383388
// TODO failure callback handler
389+
exception.printStackTrace();
384390
return null;
385391
});
386392
```
@@ -406,7 +412,7 @@ CompletableFuture<DeleteBookingCustomAttributeResponse> deleteBookingCustomAttri
406412

407413
| Parameter | Type | Tags | Description |
408414
| --- | --- | --- | --- |
409-
| `bookingId` | `String` | Template, Required | The ID of the target [booking](../../doc/models/booking.md). |
415+
| `bookingId` | `String` | Template, Required | The ID of the target [booking](entity:Booking). |
410416
| `key` | `String` | Template, Required | The key of the custom attribute to delete. This key must match the `key` of a custom<br>attribute definition in the Square seller account. If the requesting application is not the<br>definition owner, you must use the qualified key. |
411417

412418
## Response Type
@@ -421,8 +427,10 @@ String key = "key0";
421427

422428
bookingCustomAttributesApi.deleteBookingCustomAttributeAsync(bookingId, key).thenAccept(result -> {
423429
// TODO success callback handler
430+
System.out.println(result);
424431
}).exceptionally(exception -> {
425432
// TODO failure callback handler
433+
exception.printStackTrace();
426434
return null;
427435
});
428436
```
@@ -447,9 +455,9 @@ CompletableFuture<RetrieveBookingCustomAttributeResponse> retrieveBookingCustomA
447455

448456
| Parameter | Type | Tags | Description |
449457
| --- | --- | --- | --- |
450-
| `bookingId` | `String` | Template, Required | The ID of the target [booking](../../doc/models/booking.md). |
458+
| `bookingId` | `String` | Template, Required | The ID of the target [booking](entity:Booking). |
451459
| `key` | `String` | Template, Required | The key of the custom attribute to retrieve. This key must match the `key` of a custom<br>attribute definition in the Square seller account. If the requesting application is not the<br>definition owner, you must use the qualified key. |
452-
| `withDefinition` | `Boolean` | Query, Optional | Indicates whether to return the [custom attribute definition](../../doc/models/custom-attribute-definition.md) in the `definition` field of<br>the custom attribute. Set this parameter to `true` to get the name and description of the custom<br>attribute, information about the data type, or other definition details. The default value is `false`.<br>**Default**: `false` |
460+
| `withDefinition` | `Boolean` | Query, Optional | Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of<br>the custom attribute. Set this parameter to `true` to get the name and description of the custom<br>attribute, information about the data type, or other definition details. The default value is `false`.<br>**Default**: `false` |
453461
| `version` | `Integer` | Query, Optional | The current version of the custom attribute, which is used for strongly consistent reads to<br>guarantee that you receive the most up-to-date data. When included in the request, Square<br>returns the specified version or a higher version if one exists. If the specified version is<br>higher than the current version, Square returns a `BAD_REQUEST` error. |
454462

455463
## Response Type
@@ -465,8 +473,10 @@ Boolean withDefinition = false;
465473

466474
bookingCustomAttributesApi.retrieveBookingCustomAttributeAsync(bookingId, key, withDefinition, null).thenAccept(result -> {
467475
// TODO success callback handler
476+
System.out.println(result);
468477
}).exceptionally(exception -> {
469478
// TODO failure callback handler
479+
exception.printStackTrace();
470480
return null;
471481
});
472482
```
@@ -493,7 +503,7 @@ CompletableFuture<UpsertBookingCustomAttributeResponse> upsertBookingCustomAttri
493503

494504
| Parameter | Type | Tags | Description |
495505
| --- | --- | --- | --- |
496-
| `bookingId` | `String` | Template, Required | The ID of the target [booking](../../doc/models/booking.md). |
506+
| `bookingId` | `String` | Template, Required | The ID of the target [booking](entity:Booking). |
497507
| `key` | `String` | Template, Required | The key of the custom attribute to create or update. 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. |
498508
| `body` | [`UpsertBookingCustomAttributeRequest`](../../doc/models/upsert-booking-custom-attribute-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
499509

@@ -506,17 +516,18 @@ CompletableFuture<UpsertBookingCustomAttributeResponse> upsertBookingCustomAttri
506516
```java
507517
String bookingId = "booking_id4";
508518
String key = "key0";
509-
CustomAttribute customAttribute = new CustomAttribute.Builder()
510-
.build();
511-
512519
UpsertBookingCustomAttributeRequest body = new UpsertBookingCustomAttributeRequest.Builder(
513-
customAttribute)
514-
.build();
520+
new CustomAttribute.Builder()
521+
.build()
522+
)
523+
.build();
515524

516525
bookingCustomAttributesApi.upsertBookingCustomAttributeAsync(bookingId, key, body).thenAccept(result -> {
517526
// TODO success callback handler
527+
System.out.println(result);
518528
}).exceptionally(exception -> {
519529
// TODO failure callback handler
530+
exception.printStackTrace();
520531
return null;
521532
});
522533
```

0 commit comments

Comments
 (0)