Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/java/org/restcomm/sdk/RestcommClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public RestEndpoints<XmppMapping> getXmppMappingsEndpoints() {
return getEndpoints("xmpp-mappings", baseUrl + "/xmpp/xmppMappings", XmppMapping.class);
}

public RestEndpoints<ShortMessage> getShortMessagesEndpoints() {
return getEndpoints("messages", baseRestcommUrl + "/SMS/Messages.json", ShortMessage.class);
}

private <T> RestEndpoints<T> getEndpoints(String endpoint, String defaultUrl, Class<T> type) {
String url = endpoints.getOrDefault(endpoint, defaultUrl);
return new RestEndpoints(url, httpClient, type);
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/org/restcomm/sdk/domain/ShortMessage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.restcomm.sdk.domain;

import lombok.Builder;
import lombok.Getter;

@Builder(toBuilder = true)
@Getter
public class ShortMessage {

private String sid;
private String dateCreated;
private String dateUpdated;
private String dateSent;
private String accountSid;
private String from;
private String to;
private String body;
private String status;
private String direction;
private String price;
private String priceUnit;
private String uri;
private String error_code;
private String error_message;

}