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

box / box-java-sdk / #6049

31 Dec 2025 02:32PM UTC coverage: 35.12% (-0.5%) from 35.647%
#6049

push

github

web-flow
test: Remove integration mappings tests (box/box-codegen#912) (#1671)

18717 of 53294 relevant lines covered (35.12%)

0.35 hits per line

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

7.36
/src/main/java/com/box/sdkgen/managers/integrationmappings/IntegrationMappingsManager.java
1
package com.box.sdkgen.managers.integrationmappings;
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.integrationmapping.IntegrationMapping;
15
import com.box.sdkgen.schemas.integrationmappings.IntegrationMappings;
16
import com.box.sdkgen.schemas.integrationmappingslackcreaterequest.IntegrationMappingSlackCreateRequest;
17
import com.box.sdkgen.schemas.integrationmappingsteams.IntegrationMappingsTeams;
18
import com.box.sdkgen.schemas.integrationmappingteams.IntegrationMappingTeams;
19
import com.box.sdkgen.schemas.integrationmappingteamscreaterequest.IntegrationMappingTeamsCreateRequest;
20
import com.box.sdkgen.serialization.json.JsonManager;
21
import java.util.Map;
22

23
public class IntegrationMappingsManager {
24

25
  public Authentication auth;
26

27
  public NetworkSession networkSession;
28

29
  public IntegrationMappingsManager() {
×
30
    this.networkSession = new NetworkSession();
×
31
  }
×
32

33
  protected IntegrationMappingsManager(Builder builder) {
1✔
34
    this.auth = builder.auth;
1✔
35
    this.networkSession = builder.networkSession;
1✔
36
  }
1✔
37

38
  /**
39
   * Lists [Slack integration
40
   * mappings](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack)
41
   * in a users' enterprise.
42
   *
43
   * <p>You need Admin or Co-Admin role to use this endpoint.
44
   */
45
  public IntegrationMappings getSlackIntegrationMapping() {
46
    return getSlackIntegrationMapping(
×
47
        new GetSlackIntegrationMappingQueryParams(), new GetSlackIntegrationMappingHeaders());
48
  }
49

50
  /**
51
   * Lists [Slack integration
52
   * mappings](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack)
53
   * in a users' enterprise.
54
   *
55
   * <p>You need Admin or Co-Admin role to use this endpoint.
56
   *
57
   * @param queryParams Query parameters of getSlackIntegrationMapping method
58
   */
59
  public IntegrationMappings getSlackIntegrationMapping(
60
      GetSlackIntegrationMappingQueryParams queryParams) {
61
    return getSlackIntegrationMapping(queryParams, new GetSlackIntegrationMappingHeaders());
×
62
  }
63

64
  /**
65
   * Lists [Slack integration
66
   * mappings](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack)
67
   * in a users' enterprise.
68
   *
69
   * <p>You need Admin or Co-Admin role to use this endpoint.
70
   *
71
   * @param headers Headers of getSlackIntegrationMapping method
72
   */
73
  public IntegrationMappings getSlackIntegrationMapping(GetSlackIntegrationMappingHeaders headers) {
74
    return getSlackIntegrationMapping(new GetSlackIntegrationMappingQueryParams(), headers);
×
75
  }
76

77
  /**
78
   * Lists [Slack integration
79
   * mappings](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack)
80
   * in a users' enterprise.
81
   *
82
   * <p>You need Admin or Co-Admin role to use this endpoint.
83
   *
84
   * @param queryParams Query parameters of getSlackIntegrationMapping method
85
   * @param headers Headers of getSlackIntegrationMapping method
86
   */
87
  public IntegrationMappings getSlackIntegrationMapping(
88
      GetSlackIntegrationMappingQueryParams queryParams,
89
      GetSlackIntegrationMappingHeaders headers) {
90
    Map<String, String> queryParamsMap =
×
91
        prepareParams(
×
92
            mapOf(
×
93
                entryOf("marker", convertToString(queryParams.getMarker())),
×
94
                entryOf("limit", convertToString(queryParams.getLimit())),
×
95
                entryOf("partner_item_type", convertToString(queryParams.getPartnerItemType())),
×
96
                entryOf("partner_item_id", convertToString(queryParams.getPartnerItemId())),
×
97
                entryOf("box_item_id", convertToString(queryParams.getBoxItemId())),
×
98
                entryOf("box_item_type", convertToString(queryParams.getBoxItemType())),
×
99
                entryOf(
×
100
                    "is_manually_created", convertToString(queryParams.getIsManuallyCreated()))));
×
101
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
102
    FetchResponse response =
×
103
        this.networkSession
104
            .getNetworkClient()
×
105
            .fetch(
×
106
                new FetchOptions.Builder(
107
                        String.join(
×
108
                            "",
109
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
110
                            "/2.0/integration_mappings/slack"),
111
                        "GET")
112
                    .params(queryParamsMap)
×
113
                    .headers(headersMap)
×
114
                    .responseFormat(ResponseFormat.JSON)
×
115
                    .auth(this.auth)
×
116
                    .networkSession(this.networkSession)
×
117
                    .build());
×
118
    return JsonManager.deserialize(response.getData(), IntegrationMappings.class);
×
119
  }
120

121
  /**
122
   * Creates a [Slack integration
123
   * mapping](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack)
124
   * by mapping a Slack channel to a Box item.
125
   *
126
   * <p>You need Admin or Co-Admin role to use this endpoint.
127
   *
128
   * @param requestBody Request body of createSlackIntegrationMapping method
129
   */
130
  public IntegrationMapping createSlackIntegrationMapping(
131
      IntegrationMappingSlackCreateRequest requestBody) {
132
    return createSlackIntegrationMapping(requestBody, new CreateSlackIntegrationMappingHeaders());
×
133
  }
134

135
  /**
136
   * Creates a [Slack integration
137
   * mapping](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack)
138
   * by mapping a Slack channel to a Box item.
139
   *
140
   * <p>You need Admin or Co-Admin role to use this endpoint.
141
   *
142
   * @param requestBody Request body of createSlackIntegrationMapping method
143
   * @param headers Headers of createSlackIntegrationMapping method
144
   */
145
  public IntegrationMapping createSlackIntegrationMapping(
146
      IntegrationMappingSlackCreateRequest requestBody,
147
      CreateSlackIntegrationMappingHeaders headers) {
148
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
149
    FetchResponse response =
×
150
        this.networkSession
151
            .getNetworkClient()
×
152
            .fetch(
×
153
                new FetchOptions.Builder(
154
                        String.join(
×
155
                            "",
156
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
157
                            "/2.0/integration_mappings/slack"),
158
                        "POST")
159
                    .headers(headersMap)
×
160
                    .data(JsonManager.serialize(requestBody))
×
161
                    .contentType("application/json")
×
162
                    .responseFormat(ResponseFormat.JSON)
×
163
                    .auth(this.auth)
×
164
                    .networkSession(this.networkSession)
×
165
                    .build());
×
166
    return JsonManager.deserialize(response.getData(), IntegrationMapping.class);
×
167
  }
168

169
  /**
170
   * Updates a [Slack integration
171
   * mapping](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack).
172
   * Supports updating the Box folder ID and options.
173
   *
174
   * <p>You need Admin or Co-Admin role to use this endpoint.
175
   *
176
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
177
   */
178
  public IntegrationMapping updateSlackIntegrationMappingById(String integrationMappingId) {
179
    return updateSlackIntegrationMappingById(
×
180
        integrationMappingId,
181
        new UpdateSlackIntegrationMappingByIdRequestBody(),
182
        new UpdateSlackIntegrationMappingByIdHeaders());
183
  }
184

185
  /**
186
   * Updates a [Slack integration
187
   * mapping](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack).
188
   * Supports updating the Box folder ID and options.
189
   *
190
   * <p>You need Admin or Co-Admin role to use this endpoint.
191
   *
192
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
193
   * @param requestBody Request body of updateSlackIntegrationMappingById method
194
   */
195
  public IntegrationMapping updateSlackIntegrationMappingById(
196
      String integrationMappingId, UpdateSlackIntegrationMappingByIdRequestBody requestBody) {
197
    return updateSlackIntegrationMappingById(
×
198
        integrationMappingId, requestBody, new UpdateSlackIntegrationMappingByIdHeaders());
199
  }
200

201
  /**
202
   * Updates a [Slack integration
203
   * mapping](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack).
204
   * Supports updating the Box folder ID and options.
205
   *
206
   * <p>You need Admin or Co-Admin role to use this endpoint.
207
   *
208
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
209
   * @param headers Headers of updateSlackIntegrationMappingById method
210
   */
211
  public IntegrationMapping updateSlackIntegrationMappingById(
212
      String integrationMappingId, UpdateSlackIntegrationMappingByIdHeaders headers) {
213
    return updateSlackIntegrationMappingById(
×
214
        integrationMappingId, new UpdateSlackIntegrationMappingByIdRequestBody(), headers);
215
  }
216

217
  /**
218
   * Updates a [Slack integration
219
   * mapping](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack).
220
   * Supports updating the Box folder ID and options.
221
   *
222
   * <p>You need Admin or Co-Admin role to use this endpoint.
223
   *
224
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
225
   * @param requestBody Request body of updateSlackIntegrationMappingById method
226
   * @param headers Headers of updateSlackIntegrationMappingById method
227
   */
228
  public IntegrationMapping updateSlackIntegrationMappingById(
229
      String integrationMappingId,
230
      UpdateSlackIntegrationMappingByIdRequestBody requestBody,
231
      UpdateSlackIntegrationMappingByIdHeaders headers) {
232
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
233
    FetchResponse response =
×
234
        this.networkSession
235
            .getNetworkClient()
×
236
            .fetch(
×
237
                new FetchOptions.Builder(
238
                        String.join(
×
239
                            "",
240
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
241
                            "/2.0/integration_mappings/slack/",
242
                            convertToString(integrationMappingId)),
×
243
                        "PUT")
244
                    .headers(headersMap)
×
245
                    .data(JsonManager.serialize(requestBody))
×
246
                    .contentType("application/json")
×
247
                    .responseFormat(ResponseFormat.JSON)
×
248
                    .auth(this.auth)
×
249
                    .networkSession(this.networkSession)
×
250
                    .build());
×
251
    return JsonManager.deserialize(response.getData(), IntegrationMapping.class);
×
252
  }
253

254
  /**
255
   * Deletes a [Slack integration
256
   * mapping](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack).
257
   *
258
   * <p>You need Admin or Co-Admin role to use this endpoint.
259
   *
260
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
261
   */
262
  public void deleteSlackIntegrationMappingById(String integrationMappingId) {
263
    deleteSlackIntegrationMappingById(
×
264
        integrationMappingId, new DeleteSlackIntegrationMappingByIdHeaders());
265
  }
×
266

267
  /**
268
   * Deletes a [Slack integration
269
   * mapping](https://support.box.com/hc/en-us/articles/4415585987859-Box-as-the-Content-Layer-for-Slack).
270
   *
271
   * <p>You need Admin or Co-Admin role to use this endpoint.
272
   *
273
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
274
   * @param headers Headers of deleteSlackIntegrationMappingById method
275
   */
276
  public void deleteSlackIntegrationMappingById(
277
      String integrationMappingId, DeleteSlackIntegrationMappingByIdHeaders headers) {
278
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
279
    FetchResponse response =
×
280
        this.networkSession
281
            .getNetworkClient()
×
282
            .fetch(
×
283
                new FetchOptions.Builder(
284
                        String.join(
×
285
                            "",
286
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
287
                            "/2.0/integration_mappings/slack/",
288
                            convertToString(integrationMappingId)),
×
289
                        "DELETE")
290
                    .headers(headersMap)
×
291
                    .responseFormat(ResponseFormat.NO_CONTENT)
×
292
                    .auth(this.auth)
×
293
                    .networkSession(this.networkSession)
×
294
                    .build());
×
295
  }
×
296

297
  /**
298
   * Lists [Teams integration
299
   * mappings](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams) in a
300
   * users' enterprise. You need Admin or Co-Admin role to use this endpoint.
301
   */
302
  public IntegrationMappingsTeams getTeamsIntegrationMapping() {
303
    return getTeamsIntegrationMapping(
×
304
        new GetTeamsIntegrationMappingQueryParams(), new GetTeamsIntegrationMappingHeaders());
305
  }
306

307
  /**
308
   * Lists [Teams integration
309
   * mappings](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams) in a
310
   * users' enterprise. You need Admin or Co-Admin role to use this endpoint.
311
   *
312
   * @param queryParams Query parameters of getTeamsIntegrationMapping method
313
   */
314
  public IntegrationMappingsTeams getTeamsIntegrationMapping(
315
      GetTeamsIntegrationMappingQueryParams queryParams) {
316
    return getTeamsIntegrationMapping(queryParams, new GetTeamsIntegrationMappingHeaders());
×
317
  }
318

319
  /**
320
   * Lists [Teams integration
321
   * mappings](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams) in a
322
   * users' enterprise. You need Admin or Co-Admin role to use this endpoint.
323
   *
324
   * @param headers Headers of getTeamsIntegrationMapping method
325
   */
326
  public IntegrationMappingsTeams getTeamsIntegrationMapping(
327
      GetTeamsIntegrationMappingHeaders headers) {
328
    return getTeamsIntegrationMapping(new GetTeamsIntegrationMappingQueryParams(), headers);
×
329
  }
330

331
  /**
332
   * Lists [Teams integration
333
   * mappings](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams) in a
334
   * users' enterprise. You need Admin or Co-Admin role to use this endpoint.
335
   *
336
   * @param queryParams Query parameters of getTeamsIntegrationMapping method
337
   * @param headers Headers of getTeamsIntegrationMapping method
338
   */
339
  public IntegrationMappingsTeams getTeamsIntegrationMapping(
340
      GetTeamsIntegrationMappingQueryParams queryParams,
341
      GetTeamsIntegrationMappingHeaders headers) {
342
    Map<String, String> queryParamsMap =
×
343
        prepareParams(
×
344
            mapOf(
×
345
                entryOf("partner_item_type", convertToString(queryParams.getPartnerItemType())),
×
346
                entryOf("partner_item_id", convertToString(queryParams.getPartnerItemId())),
×
347
                entryOf("box_item_id", convertToString(queryParams.getBoxItemId())),
×
348
                entryOf("box_item_type", convertToString(queryParams.getBoxItemType()))));
×
349
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
350
    FetchResponse response =
×
351
        this.networkSession
352
            .getNetworkClient()
×
353
            .fetch(
×
354
                new FetchOptions.Builder(
355
                        String.join(
×
356
                            "",
357
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
358
                            "/2.0/integration_mappings/teams"),
359
                        "GET")
360
                    .params(queryParamsMap)
×
361
                    .headers(headersMap)
×
362
                    .responseFormat(ResponseFormat.JSON)
×
363
                    .auth(this.auth)
×
364
                    .networkSession(this.networkSession)
×
365
                    .build());
×
366
    return JsonManager.deserialize(response.getData(), IntegrationMappingsTeams.class);
×
367
  }
368

369
  /**
370
   * Creates a [Teams integration
371
   * mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams) by mapping
372
   * a Teams channel to a Box item. You need Admin or Co-Admin role to use this endpoint.
373
   *
374
   * @param requestBody Request body of createTeamsIntegrationMapping method
375
   */
376
  public IntegrationMappingTeams createTeamsIntegrationMapping(
377
      IntegrationMappingTeamsCreateRequest requestBody) {
378
    return createTeamsIntegrationMapping(requestBody, new CreateTeamsIntegrationMappingHeaders());
×
379
  }
380

381
  /**
382
   * Creates a [Teams integration
383
   * mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams) by mapping
384
   * a Teams channel to a Box item. You need Admin or Co-Admin role to use this endpoint.
385
   *
386
   * @param requestBody Request body of createTeamsIntegrationMapping method
387
   * @param headers Headers of createTeamsIntegrationMapping method
388
   */
389
  public IntegrationMappingTeams createTeamsIntegrationMapping(
390
      IntegrationMappingTeamsCreateRequest requestBody,
391
      CreateTeamsIntegrationMappingHeaders headers) {
392
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
393
    FetchResponse response =
×
394
        this.networkSession
395
            .getNetworkClient()
×
396
            .fetch(
×
397
                new FetchOptions.Builder(
398
                        String.join(
×
399
                            "",
400
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
401
                            "/2.0/integration_mappings/teams"),
402
                        "POST")
403
                    .headers(headersMap)
×
404
                    .data(JsonManager.serialize(requestBody))
×
405
                    .contentType("application/json")
×
406
                    .responseFormat(ResponseFormat.JSON)
×
407
                    .auth(this.auth)
×
408
                    .networkSession(this.networkSession)
×
409
                    .build());
×
410
    return JsonManager.deserialize(response.getData(), IntegrationMappingTeams.class);
×
411
  }
412

413
  /**
414
   * Updates a [Teams integration
415
   * mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams). Supports
416
   * updating the Box folder ID and options. You need Admin or Co-Admin role to use this endpoint.
417
   *
418
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
419
   */
420
  public IntegrationMappingTeams updateTeamsIntegrationMappingById(String integrationMappingId) {
421
    return updateTeamsIntegrationMappingById(
×
422
        integrationMappingId,
423
        new UpdateTeamsIntegrationMappingByIdRequestBody(),
424
        new UpdateTeamsIntegrationMappingByIdHeaders());
425
  }
426

427
  /**
428
   * Updates a [Teams integration
429
   * mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams). Supports
430
   * updating the Box folder ID and options. You need Admin or Co-Admin role to use this endpoint.
431
   *
432
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
433
   * @param requestBody Request body of updateTeamsIntegrationMappingById method
434
   */
435
  public IntegrationMappingTeams updateTeamsIntegrationMappingById(
436
      String integrationMappingId, UpdateTeamsIntegrationMappingByIdRequestBody requestBody) {
437
    return updateTeamsIntegrationMappingById(
×
438
        integrationMappingId, requestBody, new UpdateTeamsIntegrationMappingByIdHeaders());
439
  }
440

441
  /**
442
   * Updates a [Teams integration
443
   * mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams). Supports
444
   * updating the Box folder ID and options. You need Admin or Co-Admin role to use this endpoint.
445
   *
446
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
447
   * @param headers Headers of updateTeamsIntegrationMappingById method
448
   */
449
  public IntegrationMappingTeams updateTeamsIntegrationMappingById(
450
      String integrationMappingId, UpdateTeamsIntegrationMappingByIdHeaders headers) {
451
    return updateTeamsIntegrationMappingById(
×
452
        integrationMappingId, new UpdateTeamsIntegrationMappingByIdRequestBody(), headers);
453
  }
454

455
  /**
456
   * Updates a [Teams integration
457
   * mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams). Supports
458
   * updating the Box folder ID and options. You need Admin or Co-Admin role to use this endpoint.
459
   *
460
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
461
   * @param requestBody Request body of updateTeamsIntegrationMappingById method
462
   * @param headers Headers of updateTeamsIntegrationMappingById method
463
   */
464
  public IntegrationMappingTeams updateTeamsIntegrationMappingById(
465
      String integrationMappingId,
466
      UpdateTeamsIntegrationMappingByIdRequestBody requestBody,
467
      UpdateTeamsIntegrationMappingByIdHeaders headers) {
468
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
469
    FetchResponse response =
×
470
        this.networkSession
471
            .getNetworkClient()
×
472
            .fetch(
×
473
                new FetchOptions.Builder(
474
                        String.join(
×
475
                            "",
476
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
477
                            "/2.0/integration_mappings/teams/",
478
                            convertToString(integrationMappingId)),
×
479
                        "PUT")
480
                    .headers(headersMap)
×
481
                    .data(JsonManager.serialize(requestBody))
×
482
                    .contentType("application/json")
×
483
                    .responseFormat(ResponseFormat.JSON)
×
484
                    .auth(this.auth)
×
485
                    .networkSession(this.networkSession)
×
486
                    .build());
×
487
    return JsonManager.deserialize(response.getData(), IntegrationMappingTeams.class);
×
488
  }
489

490
  /**
491
   * Deletes a [Teams integration
492
   * mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams). You need
493
   * Admin or Co-Admin role to use this endpoint.
494
   *
495
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
496
   */
497
  public void deleteTeamsIntegrationMappingById(String integrationMappingId) {
498
    deleteTeamsIntegrationMappingById(
×
499
        integrationMappingId, new DeleteTeamsIntegrationMappingByIdHeaders());
500
  }
×
501

502
  /**
503
   * Deletes a [Teams integration
504
   * mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams). You need
505
   * Admin or Co-Admin role to use this endpoint.
506
   *
507
   * @param integrationMappingId An ID of an integration mapping. Example: "11235432"
508
   * @param headers Headers of deleteTeamsIntegrationMappingById method
509
   */
510
  public void deleteTeamsIntegrationMappingById(
511
      String integrationMappingId, DeleteTeamsIntegrationMappingByIdHeaders headers) {
512
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
513
    FetchResponse response =
×
514
        this.networkSession
515
            .getNetworkClient()
×
516
            .fetch(
×
517
                new FetchOptions.Builder(
518
                        String.join(
×
519
                            "",
520
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
521
                            "/2.0/integration_mappings/teams/",
522
                            convertToString(integrationMappingId)),
×
523
                        "DELETE")
524
                    .headers(headersMap)
×
525
                    .responseFormat(ResponseFormat.NO_CONTENT)
×
526
                    .auth(this.auth)
×
527
                    .networkSession(this.networkSession)
×
528
                    .build());
×
529
  }
×
530

531
  public Authentication getAuth() {
532
    return auth;
×
533
  }
534

535
  public NetworkSession getNetworkSession() {
536
    return networkSession;
×
537
  }
538

539
  public static class Builder {
540

541
    protected Authentication auth;
542

543
    protected NetworkSession networkSession;
544

545
    public Builder() {
1✔
546
      this.networkSession = new NetworkSession();
1✔
547
    }
1✔
548

549
    public Builder auth(Authentication auth) {
550
      this.auth = auth;
1✔
551
      return this;
1✔
552
    }
553

554
    public Builder networkSession(NetworkSession networkSession) {
555
      this.networkSession = networkSession;
1✔
556
      return this;
1✔
557
    }
558

559
    public IntegrationMappingsManager build() {
560
      return new IntegrationMappingsManager(this);
1✔
561
    }
562
  }
563
}
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