• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #4746

19 Aug 2025 10:21AM UTC coverage: 38.831% (+0.7%) from 38.166%
#4746

push

github

web-flow
feat: Support external user deletion API

20 of 167 new or added lines in 8 files covered. (11.98%)

145 existing lines in 18 files now uncovered.

19109 of 49211 relevant lines covered (38.83%)

0.39 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

32.43
/src/main/java/com/box/sdkgen/managers/externalusers/ExternalUsersManager.java
1
package com.box.sdkgen.managers.externalusers;
2

3
import static com.box.sdkgen.internal.utils.UtilsManager.convertToString;
4
import static com.box.sdkgen.internal.utils.UtilsManager.entryOf;
5
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
6
import static com.box.sdkgen.internal.utils.UtilsManager.mergeMaps;
7
import static com.box.sdkgen.internal.utils.UtilsManager.prepareParams;
8

9
import com.box.sdkgen.networking.auth.Authentication;
10
import com.box.sdkgen.networking.fetchoptions.FetchOptions;
11
import com.box.sdkgen.networking.fetchoptions.ResponseFormat;
12
import com.box.sdkgen.networking.fetchresponse.FetchResponse;
13
import com.box.sdkgen.networking.network.NetworkSession;
14
import com.box.sdkgen.schemas.v2025r0.externaluserssubmitdeletejobrequestv2025r0.ExternalUsersSubmitDeleteJobRequestV2025R0;
15
import com.box.sdkgen.schemas.v2025r0.externaluserssubmitdeletejobresponsev2025r0.ExternalUsersSubmitDeleteJobResponseV2025R0;
16
import com.box.sdkgen.serialization.json.JsonManager;
17
import java.util.Map;
18

19
public class ExternalUsersManager {
20

21
  public Authentication auth;
22

23
  public NetworkSession networkSession;
24

NEW
25
  public ExternalUsersManager() {
×
NEW
26
    this.networkSession = new NetworkSession();
×
NEW
27
  }
×
28

29
  protected ExternalUsersManager(Builder builder) {
1✔
30
    this.auth = builder.auth;
1✔
31
    this.networkSession = builder.networkSession;
1✔
32
  }
1✔
33

34
  public ExternalUsersSubmitDeleteJobResponseV2025R0 createExternalUserSubmitDeleteJobV2025R0(
35
      ExternalUsersSubmitDeleteJobRequestV2025R0 requestBody) {
NEW
36
    return createExternalUserSubmitDeleteJobV2025R0(
×
37
        requestBody, new CreateExternalUserSubmitDeleteJobV2025R0Headers());
38
  }
39

40
  public ExternalUsersSubmitDeleteJobResponseV2025R0 createExternalUserSubmitDeleteJobV2025R0(
41
      ExternalUsersSubmitDeleteJobRequestV2025R0 requestBody,
42
      CreateExternalUserSubmitDeleteJobV2025R0Headers headers) {
NEW
43
    Map<String, String> headersMap =
×
NEW
44
        prepareParams(
×
NEW
45
            mergeMaps(
×
NEW
46
                mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))),
×
NEW
47
                headers.getExtraHeaders()));
×
NEW
48
    FetchResponse response =
×
49
        this.networkSession
NEW
50
            .getNetworkClient()
×
NEW
51
            .fetch(
×
52
                new FetchOptions.Builder(
NEW
53
                        String.join(
×
54
                            "",
NEW
55
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
56
                            "/2.0/external_users/submit_delete_job"),
57
                        "POST")
NEW
58
                    .headers(headersMap)
×
NEW
59
                    .data(JsonManager.serialize(requestBody))
×
NEW
60
                    .contentType("application/json")
×
NEW
61
                    .responseFormat(ResponseFormat.JSON)
×
NEW
62
                    .auth(this.auth)
×
NEW
63
                    .networkSession(this.networkSession)
×
NEW
64
                    .build());
×
NEW
65
    return JsonManager.deserialize(
×
NEW
66
        response.getData(), ExternalUsersSubmitDeleteJobResponseV2025R0.class);
×
67
  }
68

69
  public Authentication getAuth() {
NEW
70
    return auth;
×
71
  }
72

73
  public NetworkSession getNetworkSession() {
NEW
74
    return networkSession;
×
75
  }
76

77
  public static class Builder {
78

79
    protected Authentication auth;
80

81
    protected NetworkSession networkSession;
82

83
    public Builder() {
1✔
84
      this.networkSession = new NetworkSession();
1✔
85
    }
1✔
86

87
    public Builder auth(Authentication auth) {
88
      this.auth = auth;
1✔
89
      return this;
1✔
90
    }
91

92
    public Builder networkSession(NetworkSession networkSession) {
93
      this.networkSession = networkSession;
1✔
94
      return this;
1✔
95
    }
96

97
    public ExternalUsersManager build() {
98
      return new ExternalUsersManager(this);
1✔
99
    }
100
  }
101
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc