forked from intercom/intercom-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAsyncAwayStatusReasonsClient.java
More file actions
42 lines (35 loc) · 1.47 KB
/
Copy pathAsyncAwayStatusReasonsClient.java
File metadata and controls
42 lines (35 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.intercom.api.resources.awaystatusreasons;
import com.intercom.api.core.ClientOptions;
import com.intercom.api.core.RequestOptions;
import com.intercom.api.types.AwayStatusReason;
import java.util.List;
import java.util.concurrent.CompletableFuture;
public class AsyncAwayStatusReasonsClient {
protected final ClientOptions clientOptions;
private final AsyncRawAwayStatusReasonsClient rawClient;
public AsyncAwayStatusReasonsClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.rawClient = new AsyncRawAwayStatusReasonsClient(clientOptions);
}
/**
* Get responses with HTTP metadata like headers
*/
public AsyncRawAwayStatusReasonsClient withRawResponse() {
return this.rawClient;
}
/**
* Returns a list of all away status reasons configured for the workspace, including deleted ones.
*/
public CompletableFuture<List<AwayStatusReason>> listAwayStatusReasons() {
return this.rawClient.listAwayStatusReasons().thenApply(response -> response.body());
}
/**
* Returns a list of all away status reasons configured for the workspace, including deleted ones.
*/
public CompletableFuture<List<AwayStatusReason>> listAwayStatusReasons(RequestOptions requestOptions) {
return this.rawClient.listAwayStatusReasons(requestOptions).thenApply(response -> response.body());
}
}