forked from ringcentral/ringcentral-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCheckSubscriptionTest.java
More file actions
29 lines (22 loc) · 837 Bytes
/
CheckSubscriptionTest.java
File metadata and controls
29 lines (22 loc) · 837 Bytes
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
package com.ringcentral;
import com.ringcentral.definitions.SubscriptionInfo;
import com.ringcentral.definitions.SubscriptionListResource;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertNotNull;
public class CheckSubscriptionTest {
@Test
public void listSubscriptions() throws IOException, RestException {
RestClient rc = new RestClient(
System.getenv("RINGCENTRAL_CLIENT_ID"),
System.getenv("RINGCENTRAL_CLIENT_SECRET"),
System.getenv("RINGCENTRAL_SERVER_URL")
);
rc.authorize(System.getenv("RINGCENTRAL_JWT_TOKEN"));
SubscriptionListResource resp = rc.restapi().subscription().list();
for (SubscriptionInfo r : resp.records) {
assertNotNull(r.status);
}
rc.revoke();
}
}