Skip to content

Commit fc8ae9d

Browse files
authored
Merge pull request #79 from square/release/20.0.0.20220512
Generated PR for Release: 20.0.0.20220512
2 parents 43f7665 + 9184e73 commit fc8ae9d

File tree

512 files changed

+16264
-5251
lines changed

Some content is hidden

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

512 files changed

+16264
-5251
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve Square SDKs
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Expected behavior**
14+
A clear and concise description of what you expected to happen.
15+
16+
**To Reproduce**
17+
Steps to reproduce the bug:
18+
1. (step 1)
19+
2. (step 2)
20+
3. (step 3)
21+
4. ...
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain the bug.
25+
26+
**Square SDK version**
27+
For example: 17.2.x
28+
29+
**Additional context**
30+
Add any other context about the problem here.

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Contributing to Square SDKs
2+
3+
Thank you for your willingness to help improve the Square SDKs. Your feedback and expertise ultimately benefits everyone who builds with Square.
4+
5+
If you encounter a bug while using Square SDKs, please [let us know](#bug-reporting). We'll investigate the issue and fix it as soon as possible.
6+
7+
We also accept feedback in the form of a pull request (PR), and will follow up with you if we need more information. However, any code changes required will be perfomed by Square engineering, and we'll close the PR.
8+
9+
## Bug report
10+
11+
To report a bug:
12+
* Go to the **[Issues](../../issues)** page.
13+
* Click **New issue**.
14+
* Click **Get started**.
15+
16+
## Other support
17+
18+
For all other support, including new feature requests, see:
19+
20+
* Square developer forums: [https://developer.squareup.com/forums](https://developer.squareup.com/forums)
21+
* Square support center: [https://squareup.com/help/us/en](https://squareup.com/help/us/en)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ mvn test
7777

7878
### Customers
7979
* [Customers]
80+
* [Customer Custom Attributes]
8081
* [Customer Groups]
8182
* [Customer Segments]
8283

@@ -95,6 +96,7 @@ mvn test
9596
* [Locations]
9697
* [Devices]
9798
* [Cash Drawers]
99+
* [Vendors]
98100

99101
### Team
100102
* [Team]
@@ -139,13 +141,15 @@ You'll also need to provide logic to handle paginated results. For more informa
139141
[Disputes]: doc/api/disputes.md
140142
[Terminal]: doc/api/terminal.md
141143
[Cash Drawers]: doc/api/cash-drawers.md
144+
[Vendors]: doc/api/vendors.md
142145
[Customer Groups]: doc/api/customer-groups.md
143146
[Customer Segments]: doc/api/customer-segments.md
144147
[Bank Accounts]: doc/api/bank-accounts.md
145148
[Payments]: doc/api/payments.md
146149
[Checkout]: doc/api/checkout.md
147150
[Catalog]: doc/api/catalog.md
148151
[Customers]: doc/api/customers.md
152+
[Customer Custom Attributes]: doc/api/customer-custom-attributes.md
149153
[Employees]: doc/api/employees.md
150154
[Inventory]: doc/api/inventory.md
151155
[Labor]: doc/api/labor.md

doc/api/bank-accounts.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ CompletableFuture<ListBankAccountsResponse> listBankAccountsAsync(
4141
## Example Usage
4242

4343
```java
44-
String cursor = "cursor6";
45-
Integer limit = 172;
46-
String locationId = "location_id4";
47-
48-
bankAccountsApi.listBankAccountsAsync(cursor, limit, locationId).thenAccept(result -> {
44+
bankAccountsApi.listBankAccountsAsync(null, null, null).thenAccept(result -> {
4945
// TODO success callback handler
5046
}).exceptionally(exception -> {
5147
// TODO failure callback handler

doc/api/bookings.md

Lines changed: 14 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,7 @@ CompletableFuture<ListBookingsResponse> listBookingsAsync(
5656
## Example Usage
5757

5858
```java
59-
Integer limit = 172;
60-
String cursor = "cursor6";
61-
String teamMemberId = "team_member_id0";
62-
String locationId = "location_id4";
63-
String startAtMin = "start_at_min8";
64-
String startAtMax = "start_at_max8";
65-
66-
bookingsApi.listBookingsAsync(limit, cursor, teamMemberId, locationId, startAtMin, startAtMax).thenAccept(result -> {
59+
bookingsApi.listBookingsAsync(null, null, null, null, null, null).thenAccept(result -> {
6760
// TODO success callback handler
6861
}).exceptionally(exception -> {
6962
// TODO failure callback handler
@@ -77,7 +70,10 @@ bookingsApi.listBookingsAsync(limit, cursor, teamMemberId, locationId, startAtMi
7770
Creates a booking.
7871

7972
To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.
80-
To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
73+
To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
74+
75+
For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*
76+
or *Appointments Premium*.
8177

8278
```java
8379
CompletableFuture<CreateBookingResponse> createBookingAsync(
@@ -98,15 +94,9 @@ CompletableFuture<CreateBookingResponse> createBookingAsync(
9894

9995
```java
10096
Booking booking = new Booking.Builder()
101-
.id("id8")
102-
.version(148)
103-
.status("ACCEPTED")
104-
.createdAt("created_at6")
105-
.updatedAt("updated_at4")
10697
.build();
10798
CreateBookingRequest body = new CreateBookingRequest.Builder(
10899
booking)
109-
.idempotencyKey("idempotency_key2")
110100
.build();
111101

112102
bookingsApi.createBookingAsync(body).thenAccept(result -> {
@@ -144,56 +134,9 @@ CompletableFuture<SearchAvailabilityResponse> searchAvailabilityAsync(
144134

145135
```java
146136
TimeRange timeRange = new TimeRange.Builder()
147-
.startAt("start_at8")
148-
.endAt("end_at4")
149-
.build();
150-
List<SegmentFilter> bodyQueryFilterSegmentFilters = new LinkedList<>();
151-
152-
List<String> bodyQueryFilterSegmentFilters0TeamMemberIdFilterAll = new LinkedList<>();
153-
bodyQueryFilterSegmentFilters0TeamMemberIdFilterAll.add("all7");
154-
List<String> bodyQueryFilterSegmentFilters0TeamMemberIdFilterAny = new LinkedList<>();
155-
bodyQueryFilterSegmentFilters0TeamMemberIdFilterAny.add("any0");
156-
bodyQueryFilterSegmentFilters0TeamMemberIdFilterAny.add("any1");
157-
List<String> bodyQueryFilterSegmentFilters0TeamMemberIdFilterNone = new LinkedList<>();
158-
bodyQueryFilterSegmentFilters0TeamMemberIdFilterNone.add("none5");
159-
FilterValue filterValue = new FilterValue.Builder()
160-
.all(filterValueAll)
161-
.any(filterValueAny)
162-
.none(filterValueNone)
163-
.build();
164-
SegmentFilter bodyQueryFilterSegmentFilters0 = new SegmentFilter.Builder(
165-
"service_variation_id8")
166-
.teamMemberIdFilter(bodyQueryFilterSegmentFilters0TeamMemberIdFilter)
167137
.build();
168-
bodyQueryFilterSegmentFilters.add(bodyQueryFilterSegmentFilters0);
169-
170-
List<String> bodyQueryFilterSegmentFilters1TeamMemberIdFilterAll = new LinkedList<>();
171-
bodyQueryFilterSegmentFilters1TeamMemberIdFilterAll.add("all6");
172-
bodyQueryFilterSegmentFilters1TeamMemberIdFilterAll.add("all7");
173-
bodyQueryFilterSegmentFilters1TeamMemberIdFilterAll.add("all8");
174-
List<String> bodyQueryFilterSegmentFilters1TeamMemberIdFilterAny = new LinkedList<>();
175-
bodyQueryFilterSegmentFilters1TeamMemberIdFilterAny.add("any1");
176-
bodyQueryFilterSegmentFilters1TeamMemberIdFilterAny.add("any2");
177-
bodyQueryFilterSegmentFilters1TeamMemberIdFilterAny.add("any3");
178-
List<String> bodyQueryFilterSegmentFilters1TeamMemberIdFilterNone = new LinkedList<>();
179-
bodyQueryFilterSegmentFilters1TeamMemberIdFilterNone.add("none6");
180-
bodyQueryFilterSegmentFilters1TeamMemberIdFilterNone.add("none7");
181-
FilterValue filterValue = new FilterValue.Builder()
182-
.all(filterValueAll)
183-
.any(filterValueAny)
184-
.none(filterValueNone)
185-
.build();
186-
SegmentFilter bodyQueryFilterSegmentFilters1 = new SegmentFilter.Builder(
187-
"service_variation_id7")
188-
.teamMemberIdFilter(bodyQueryFilterSegmentFilters1TeamMemberIdFilter)
189-
.build();
190-
bodyQueryFilterSegmentFilters.add(bodyQueryFilterSegmentFilters1);
191-
192138
SearchAvailabilityFilter searchAvailabilityFilter = new SearchAvailabilityFilter.Builder(
193139
startAtRange)
194-
.locationId("location_id6")
195-
.segmentFilters(searchAvailabilityFilterSegmentFilters)
196-
.bookingId("booking_id6")
197140
.build();
198141
SearchAvailabilityQuery searchAvailabilityQuery = new SearchAvailabilityQuery.Builder(
199142
filter)
@@ -264,11 +207,8 @@ CompletableFuture<ListTeamMemberBookingProfilesResponse> listTeamMemberBookingPr
264207

265208
```java
266209
Boolean bookableOnly = false;
267-
Integer limit = 172;
268-
String cursor = "cursor6";
269-
String locationId = "location_id4";
270210

271-
bookingsApi.listTeamMemberBookingProfilesAsync(bookableOnly, limit, cursor, locationId).thenAccept(result -> {
211+
bookingsApi.listTeamMemberBookingProfilesAsync(bookableOnly, null, null, null).thenAccept(result -> {
272212
// TODO success callback handler
273213
}).exceptionally(exception -> {
274214
// TODO failure callback handler
@@ -351,7 +291,10 @@ bookingsApi.retrieveBookingAsync(bookingId).thenAccept(result -> {
351291
Updates a booking.
352292

353293
To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.
354-
To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
294+
To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
295+
296+
For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*
297+
or *Appointments Premium*.
355298

356299
```java
357300
CompletableFuture<UpdateBookingResponse> updateBookingAsync(
@@ -375,15 +318,9 @@ CompletableFuture<UpdateBookingResponse> updateBookingAsync(
375318
```java
376319
String bookingId = "booking_id4";
377320
Booking booking = new Booking.Builder()
378-
.id("id8")
379-
.version(148)
380-
.status("ACCEPTED")
381-
.createdAt("created_at6")
382-
.updatedAt("updated_at4")
383321
.build();
384322
UpdateBookingRequest body = new UpdateBookingRequest.Builder(
385323
booking)
386-
.idempotencyKey("idempotency_key2")
387324
.build();
388325

389326
bookingsApi.updateBookingAsync(bookingId, body).thenAccept(result -> {
@@ -400,7 +337,10 @@ bookingsApi.updateBookingAsync(bookingId, body).thenAccept(result -> {
400337
Cancels an existing booking.
401338

402339
To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.
403-
To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
340+
To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
341+
342+
For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*
343+
or *Appointments Premium*.
404344

405345
```java
406346
CompletableFuture<CancelBookingResponse> cancelBookingAsync(
@@ -424,8 +364,6 @@ CompletableFuture<CancelBookingResponse> cancelBookingAsync(
424364
```java
425365
String bookingId = "booking_id4";
426366
CancelBookingRequest body = new CancelBookingRequest.Builder()
427-
.idempotencyKey("idempotency_key2")
428-
.bookingVersion(8)
429367
.build();
430368

431369
bookingsApi.cancelBookingAsync(bookingId, body).thenAccept(result -> {

doc/api/cards.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,9 @@ CompletableFuture<ListCardsResponse> listCardsAsync(
4747
## Example Usage
4848

4949
```java
50-
String cursor = "cursor6";
51-
String customerId = "customer_id8";
5250
Boolean includeDisabled = false;
53-
String referenceId = "reference_id2";
54-
String sortOrder = "DESC";
5551

56-
cardsApi.listCardsAsync(cursor, customerId, includeDisabled, referenceId, sortOrder).thenAccept(result -> {
52+
cardsApi.listCardsAsync(null, null, includeDisabled, null, null).thenAccept(result -> {
5753
// TODO success callback handler
5854
}).exceptionally(exception -> {
5955
// TODO failure callback handler
@@ -87,19 +83,12 @@ CompletableFuture<CreateCardResponse> createCardAsync(
8783
Address address = new Address.Builder()
8884
.addressLine1("500 Electric Ave")
8985
.addressLine2("Suite 600")
90-
.addressLine3("address_line_34")
9186
.locality("New York")
92-
.sublocality("sublocality8")
9387
.administrativeDistrictLevel1("NY")
9488
.postalCode("10003")
9589
.country("US")
9690
.build();
9791
Card card = new Card.Builder()
98-
.id("id0")
99-
.cardBrand("INTERAC")
100-
.last4("last_42")
101-
.expMonth(236L)
102-
.expYear(60L)
10392
.cardholderName("Amelia Earhart")
10493
.billingAddress(cardBillingAddress)
10594
.customerId("VDKXEEKPJN48QDG3BGGFAK05P8")
@@ -109,7 +98,6 @@ CreateCardRequest body = new CreateCardRequest.Builder(
10998
"4935a656-a929-4792-b97c-8848be85c27c",
11099
"cnon:uIbfJXhXETSP197M3GB",
111100
card)
112-
.verificationToken("verification_token0")
113101
.build();
114102

115103
cardsApi.createCardAsync(body).thenAccept(result -> {

doc/api/cash-drawers.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,8 @@ CompletableFuture<ListCashDrawerShiftsResponse> listCashDrawerShiftsAsync(
4949

5050
```java
5151
String locationId = "location_id4";
52-
String sortOrder = "DESC";
53-
String beginTime = "begin_time2";
54-
String endTime = "end_time2";
55-
Integer limit = 172;
56-
String cursor = "cursor6";
5752

58-
cashDrawersApi.listCashDrawerShiftsAsync(locationId, sortOrder, beginTime, endTime, limit, cursor).thenAccept(result -> {
53+
cashDrawersApi.listCashDrawerShiftsAsync(locationId, null, null, null, null, null).thenAccept(result -> {
5954
// TODO success callback handler
6055
}).exceptionally(exception -> {
6156
// TODO failure callback handler
@@ -131,10 +126,8 @@ CompletableFuture<ListCashDrawerShiftEventsResponse> listCashDrawerShiftEventsAs
131126
```java
132127
String locationId = "location_id4";
133128
String shiftId = "shift_id0";
134-
Integer limit = 172;
135-
String cursor = "cursor6";
136129

137-
cashDrawersApi.listCashDrawerShiftEventsAsync(locationId, shiftId, limit, cursor).thenAccept(result -> {
130+
cashDrawersApi.listCashDrawerShiftEventsAsync(locationId, shiftId, null, null).thenAccept(result -> {
138131
// TODO success callback handler
139132
}).exceptionally(exception -> {
140133
// TODO failure callback handler

0 commit comments

Comments
 (0)