Skip to content

Commit 4080837

Browse files
committed
Fix formatting
1 parent 2911539 commit 4080837

File tree

4 files changed

+35
-39
lines changed

4 files changed

+35
-39
lines changed

src/main/java/com/squareup/square/core/FileStream.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@ public InputStream getInputStream() {
3939
return inputStream;
4040
}
4141

42-
@Nullable
43-
public String getFileName() {
42+
@Nullable public String getFileName() {
4443
return fileName;
4544
}
4645

47-
@Nullable
48-
public MediaType getContentType() {
46+
@Nullable public MediaType getContentType() {
4947
return contentType;
5048
}
5149

src/main/java/com/squareup/square/core/InputStreamRequestBody.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public InputStreamRequestBody(@Nullable MediaType contentType, InputStream input
4040
*
4141
* @return the MediaType of the content, or null if not specified
4242
*/
43-
@Nullable
44-
@Override
43+
@Nullable @Override
4544
public MediaType contentType() {
4645
return contentType;
4746
}

src/main/java/com/squareup/square/core/SquareApiException.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
*/
44
package com.squareup.square.core;
55

6-
import java.util.ArrayList;
7-
import java.util.HashMap;
8-
import java.util.List;
9-
import java.util.Map;
10-
import java.util.Optional;
11-
126
import com.fasterxml.jackson.core.JsonProcessingException;
137
import com.fasterxml.jackson.databind.JsonNode;
148
import com.squareup.square.types.Error;
159
import com.squareup.square.types.ErrorCategory;
1610
import com.squareup.square.types.ErrorCode;
17-
11+
import java.util.ArrayList;
12+
import java.util.HashMap;
13+
import java.util.List;
14+
import java.util.Map;
15+
import java.util.Optional;
1816
import okhttp3.Response;
1917

2018
/**

src/test/java/com/squareup/square/integration/LaborTest.java

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,25 @@
1212
import com.squareup.square.labor.types.SearchShiftsRequest;
1313
import com.squareup.square.labor.types.UpdateBreakTypeRequest;
1414
import com.squareup.square.labor.types.UpdateShiftRequest;
15-
import com.squareup.square.types.Location;
16-
import com.squareup.square.types.SearchTeamMembersRequest;
17-
import com.squareup.square.types.SearchTeamMembersQuery;
18-
import com.squareup.square.types.SearchTeamMembersFilter;
19-
import com.squareup.square.types.TeamMemberStatus;
2015
import com.squareup.square.types.BreakType;
2116
import com.squareup.square.types.CreateBreakTypeResponse;
2217
import com.squareup.square.types.CreateShiftResponse;
2318
import com.squareup.square.types.DeleteBreakTypeResponse;
2419
import com.squareup.square.types.DeleteShiftResponse;
2520
import com.squareup.square.types.GetBreakTypeResponse;
2621
import com.squareup.square.types.GetShiftResponse;
22+
import com.squareup.square.types.Location;
2723
import com.squareup.square.types.SearchShiftsResponse;
24+
import com.squareup.square.types.SearchTeamMembersFilter;
25+
import com.squareup.square.types.SearchTeamMembersQuery;
26+
import com.squareup.square.types.SearchTeamMembersRequest;
2827
import com.squareup.square.types.Shift;
2928
import com.squareup.square.types.ShiftWage;
3029
import com.squareup.square.types.TeamMember;
30+
import com.squareup.square.types.TeamMemberStatus;
3131
import com.squareup.square.types.UpdateBreakTypeResponse;
3232
import com.squareup.square.types.UpdateShiftResponse;
3333
import com.squareup.square.types.WorkweekConfig;
34-
3534
import java.time.OffsetDateTime;
3635
import java.time.format.DateTimeFormatter;
3736
import java.util.Collections;
@@ -53,28 +52,30 @@ public class LaborTest {
5352
@BeforeEach
5453
public void before() {
5554
client = TestClientFactory.create();
56-
55+
5756
// Get first available location
58-
List<Location> locations = client.locations().list().getLocations()
59-
.orElseThrow(() -> new RuntimeException("No locations available"));
57+
List<Location> locations = client.locations()
58+
.list()
59+
.getLocations()
60+
.orElseThrow(() -> new RuntimeException("No locations available"));
6061
if (locations.isEmpty()) {
6162
throw new RuntimeException("No locations available for testing");
6263
}
6364
locationId = locations.get(0).getId().orElseThrow(() -> new RuntimeException("Location ID not present"));
64-
65+
6566
// Get first available team member at this location
66-
List<TeamMember> teamMembers = client.teamMembers().search(
67-
SearchTeamMembersRequest.builder()
68-
.query(SearchTeamMembersQuery.builder()
69-
.filter(SearchTeamMembersFilter.builder()
70-
.locationIds(Collections.singletonList(locationId))
71-
.status(TeamMemberStatus.ACTIVE)
67+
List<TeamMember> teamMembers = client.teamMembers()
68+
.search(SearchTeamMembersRequest.builder()
69+
.query(SearchTeamMembersQuery.builder()
70+
.filter(SearchTeamMembersFilter.builder()
71+
.locationIds(Collections.singletonList(locationId))
72+
.status(TeamMemberStatus.ACTIVE)
73+
.build())
74+
.build())
7275
.build())
73-
.build())
74-
.build()
75-
).getTeamMembers()
76-
.orElseThrow(() -> new RuntimeException("Failed to get team members"));
77-
76+
.getTeamMembers()
77+
.orElseThrow(() -> new RuntimeException("Failed to get team members"));
78+
7879
if (teamMembers.isEmpty()) {
7980
throw new RuntimeException("No team members available at location " + locationId);
8081
}
@@ -238,17 +239,17 @@ public void testDeleteShift() throws Exception {
238239
.limit(100)
239240
.build();
240241

241-
SearchShiftsResponse existingShifts = client.labor()
242-
.shifts()
243-
.search(searchRequest);
242+
SearchShiftsResponse existingShifts = client.labor().shifts().search(searchRequest);
244243

245244
// Delete any existing shifts
246245
if (existingShifts.getShifts().isPresent()) {
247246
for (Shift existingShift : existingShifts.getShifts().get()) {
248247
if (existingShift.getId().isPresent()) {
249248
client.labor()
250249
.shifts()
251-
.delete(DeleteShiftsRequest.builder().id(existingShift.getId().get()).build());
250+
.delete(DeleteShiftsRequest.builder()
251+
.id(existingShift.getId().get())
252+
.build());
252253
}
253254
}
254255
}
@@ -336,4 +337,4 @@ public void testListWorkweekConfigs() {
336337
.list(ListWorkweekConfigsRequest.builder().build());
337338
Assertions.assertFalse(response.getItems().isEmpty());
338339
}
339-
}
340+
}

0 commit comments

Comments
 (0)