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

box / box-java-sdk / #6245

10 Feb 2026 06:10PM UTC coverage: 34.748% (-0.3%) from 35.043%
#6245

push

github

web-flow
chore: Update `.codegen.json` with commit hash of `codegen` and `openapi` spec [skip ci] (#1719)

18637 of 53635 relevant lines covered (34.75%)

0.35 hits per line

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

83.78
/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

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

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

34
  /**
35
   * Delete external users from current user enterprise. This will remove each external user from
36
   * all invited collaborations within the current enterprise.
37
   *
38
   * @param requestBody Request body of submitJobToDeleteExternalUsersV2025R0 method
39
   */
40
  public ExternalUsersSubmitDeleteJobResponseV2025R0 submitJobToDeleteExternalUsersV2025R0(
41
      ExternalUsersSubmitDeleteJobRequestV2025R0 requestBody) {
42
    return submitJobToDeleteExternalUsersV2025R0(
1✔
43
        requestBody, new SubmitJobToDeleteExternalUsersV2025R0Headers());
44
  }
45

46
  /**
47
   * Delete external users from current user enterprise. This will remove each external user from
48
   * all invited collaborations within the current enterprise.
49
   *
50
   * @param requestBody Request body of submitJobToDeleteExternalUsersV2025R0 method
51
   * @param headers Headers of submitJobToDeleteExternalUsersV2025R0 method
52
   */
53
  public ExternalUsersSubmitDeleteJobResponseV2025R0 submitJobToDeleteExternalUsersV2025R0(
54
      ExternalUsersSubmitDeleteJobRequestV2025R0 requestBody,
55
      SubmitJobToDeleteExternalUsersV2025R0Headers headers) {
56
    Map<String, String> headersMap =
1✔
57
        prepareParams(
1✔
58
            mergeMaps(
1✔
59
                mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))),
1✔
60
                headers.getExtraHeaders()));
1✔
61
    FetchResponse response =
1✔
62
        this.networkSession
63
            .getNetworkClient()
1✔
64
            .fetch(
1✔
65
                new FetchOptions.Builder(
66
                        String.join(
1✔
67
                            "",
68
                            this.networkSession.getBaseUrls().getBaseUrl(),
1✔
69
                            "/2.0/external_users/submit_delete_job"),
70
                        "POST")
71
                    .headers(headersMap)
1✔
72
                    .data(JsonManager.serialize(requestBody))
1✔
73
                    .contentType("application/json")
1✔
74
                    .responseFormat(ResponseFormat.JSON)
1✔
75
                    .auth(this.auth)
1✔
76
                    .networkSession(this.networkSession)
1✔
77
                    .build());
1✔
78
    return JsonManager.deserialize(
1✔
79
        response.getData(), ExternalUsersSubmitDeleteJobResponseV2025R0.class);
1✔
80
  }
81

82
  public Authentication getAuth() {
83
    return auth;
×
84
  }
85

86
  public NetworkSession getNetworkSession() {
87
    return networkSession;
×
88
  }
89

90
  public static class Builder {
91

92
    protected Authentication auth;
93

94
    protected NetworkSession networkSession;
95

96
    public Builder() {}
1✔
97

98
    public Builder auth(Authentication auth) {
99
      this.auth = auth;
1✔
100
      return this;
1✔
101
    }
102

103
    public Builder networkSession(NetworkSession networkSession) {
104
      this.networkSession = networkSession;
1✔
105
      return this;
1✔
106
    }
107

108
    public ExternalUsersManager build() {
109
      if (this.networkSession == null) {
1✔
110
        this.networkSession = new NetworkSession();
×
111
      }
112
      return new ExternalUsersManager(this);
1✔
113
    }
114
  }
115
}
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

© 2026 Coveralls, Inc