Skip to content

Commit c70d36b

Browse files
committed
BS-55: Adding of ShortMessagesEndpoints and ShortMessage class
1 parent b5137d7 commit c70d36b

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/main/java/org/restcomm/sdk/RestcommClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public RestEndpoints<XmppMapping> getXmppMappingsEndpoints() {
4545
return getEndpoints("xmpp-mappings", baseUrl + "/xmpp/xmppMappings", XmppMapping.class);
4646
}
4747

48+
public RestEndpoints<ShortMessage> getShortMessagesEndpoints() {
49+
return getEndpoints("messages", baseRestcommUrl + "/SMS/Messages.json", ShortMessage.class);
50+
}
51+
4852
private <T> RestEndpoints<T> getEndpoints(String endpoint, String defaultUrl, Class<T> type) {
4953
String url = endpoints.getOrDefault(endpoint, defaultUrl);
5054
return new RestEndpoints(url, httpClient, type);
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package org.restcomm.sdk.domain;
2+
3+
import lombok.Builder;
4+
import lombok.Getter;
5+
6+
@Builder(toBuilder = true)
7+
@Getter
8+
public class ShortMessage {
9+
10+
private String sid;
11+
private String dateCreated;
12+
private String dateUpdated;
13+
private String dateSent;
14+
private String accountSid;
15+
private String from;
16+
private String to;
17+
private String body;
18+
private String status;
19+
private String direction;
20+
private String price;
21+
private String priceUnit;
22+
private String uri;
23+
private String error_code;
24+
private String error_message;
25+
26+
}

0 commit comments

Comments
 (0)