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

box / box-java-sdk / #5451

28 Oct 2025 12:21PM UTC coverage: 13.302% (-0.4%) from 13.665%
#5451

push

github

web-flow
feat(boxsdkgen): Add GET enterprise configuration endpoint (box/box-openapi#559) (#1529)

0 of 1631 new or added lines in 44 files covered. (0.0%)

14 existing lines in 8 files now uncovered.

8368 of 62906 relevant lines covered (13.3%)

0.13 hits per line

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

0.0
/src/main/java/com/box/sdkgen/managers/enterpriseconfigurations/EnterpriseConfigurationsManager.java
1
package com.box.sdkgen.managers.enterpriseconfigurations;
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.enterpriseconfigurationv2025r0.EnterpriseConfigurationV2025R0;
15
import com.box.sdkgen.serialization.json.JsonManager;
16
import java.util.Map;
17

18
public class EnterpriseConfigurationsManager {
19

20
  public Authentication auth;
21

22
  public NetworkSession networkSession;
23

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

NEW
28
  protected EnterpriseConfigurationsManager(Builder builder) {
×
NEW
29
    this.auth = builder.auth;
×
NEW
30
    this.networkSession = builder.networkSession;
×
NEW
31
  }
×
32

33
  /**
34
   * Retrieves the configuration for an enterprise.
35
   *
36
   * @param enterpriseId The ID of the enterprise. Example: "3442311"
37
   * @param queryParams Query parameters of getEnterpriseConfigurationByIdV2025R0 method
38
   */
39
  public EnterpriseConfigurationV2025R0 getEnterpriseConfigurationByIdV2025R0(
40
      String enterpriseId, GetEnterpriseConfigurationByIdV2025R0QueryParams queryParams) {
NEW
41
    return getEnterpriseConfigurationByIdV2025R0(
×
42
        enterpriseId, queryParams, new GetEnterpriseConfigurationByIdV2025R0Headers());
43
  }
44

45
  /**
46
   * Retrieves the configuration for an enterprise.
47
   *
48
   * @param enterpriseId The ID of the enterprise. Example: "3442311"
49
   * @param queryParams Query parameters of getEnterpriseConfigurationByIdV2025R0 method
50
   * @param headers Headers of getEnterpriseConfigurationByIdV2025R0 method
51
   */
52
  public EnterpriseConfigurationV2025R0 getEnterpriseConfigurationByIdV2025R0(
53
      String enterpriseId,
54
      GetEnterpriseConfigurationByIdV2025R0QueryParams queryParams,
55
      GetEnterpriseConfigurationByIdV2025R0Headers headers) {
NEW
56
    Map<String, String> queryParamsMap =
×
NEW
57
        prepareParams(mapOf(entryOf("categories", convertToString(queryParams.getCategories()))));
×
NEW
58
    Map<String, String> headersMap =
×
NEW
59
        prepareParams(
×
NEW
60
            mergeMaps(
×
NEW
61
                mapOf(entryOf("box-version", convertToString(headers.getBoxVersion()))),
×
NEW
62
                headers.getExtraHeaders()));
×
NEW
63
    FetchResponse response =
×
64
        this.networkSession
NEW
65
            .getNetworkClient()
×
NEW
66
            .fetch(
×
67
                new FetchOptions.Builder(
NEW
68
                        String.join(
×
69
                            "",
NEW
70
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
71
                            "/2.0/enterprise_configurations/",
NEW
72
                            convertToString(enterpriseId)),
×
73
                        "GET")
NEW
74
                    .params(queryParamsMap)
×
NEW
75
                    .headers(headersMap)
×
NEW
76
                    .responseFormat(ResponseFormat.JSON)
×
NEW
77
                    .auth(this.auth)
×
NEW
78
                    .networkSession(this.networkSession)
×
NEW
79
                    .build());
×
NEW
80
    return JsonManager.deserialize(response.getData(), EnterpriseConfigurationV2025R0.class);
×
81
  }
82

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

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

91
  public static class Builder {
92

93
    protected Authentication auth;
94

95
    protected NetworkSession networkSession;
96

NEW
97
    public Builder() {
×
NEW
98
      this.networkSession = new NetworkSession();
×
NEW
99
    }
×
100

101
    public Builder auth(Authentication auth) {
NEW
102
      this.auth = auth;
×
NEW
103
      return this;
×
104
    }
105

106
    public Builder networkSession(NetworkSession networkSession) {
NEW
107
      this.networkSession = networkSession;
×
NEW
108
      return this;
×
109
    }
110

111
    public EnterpriseConfigurationsManager build() {
NEW
112
      return new EnterpriseConfigurationsManager(this);
×
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

© 2025 Coveralls, Inc