diff --git a/README.md b/README.md index 43f36ef..fc35abc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # restcomm-sdk-java The Java SDK for RestComm REST API + +- To build the Project, after downloading the zip and extracting it from GitHub, navigate to the folder containing the pom.xml +file and buiild the project using the following command in the terminal + +```sh +$ mvn package +``` +- Now when this command is executed, the compilation,validation and testing will be done and after the successful completion of them, a jar file will be generated in the target folder. + +- Include the jar file in your build path to get Started. + +Java version: 1.8.0_131 + +This is an SDK for RestComm REST API, +To know more about Restcomm, please refer to http://documentation.telestax.com/ + +Regarding issues, please refer to https://github.com/RestComm/restcomm-sdk-java/issues + diff --git a/restcomm-connect.java.sdk/src/main/asciidoc/Email.adoc b/restcomm-connect.java.sdk/src/main/asciidoc/Email.adoc new file mode 100644 index 0000000..34da54c --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/asciidoc/Email.adoc @@ -0,0 +1,54 @@ + += Restcomm JAVA Sdk - Emails + +[[Emails]] +== Emails + +Using the RestComm API, you can send Emails through a simple request. + +=== Sending a New Email + +A new Email Message can be sent by using the newEmail() method of the Email class. +.... + String FromUser; + String ToUser; + String MessageBody; + . + . + . + Email.newEmail().From(FromUser).To(ToUser).Body(MessageBody).sendEmail(); +.... + +====List of Parameters for Sending Email +[cols=",",options="header",] +|========================================================================================================== +|Parameter |Method +|From |From(). +|To |To(). +|Body |Body(). +|Subject |Subject(). +|BCC |BCC(). +|CC |CC(). +|========================================================================================================== + +In order to capture the new Email sent, +.... + Email message = Email.newEmail().From(FromUser).To(ToUser).Body(MessageBody).sendEmail(); +.... + +You can also access some of the fields of the Email captured, +.... + String AccountSid; + AccountSid = message.getAccount_sid(); +.... + +==== List of Fields +|====================================================================== +|Property |Method +|DateSent |getDate_sent(). +|AccountSid |getAccount_sid(). +|From |getFrom(). +|To |getTo(). +|Body |getBody(). +|Subject |getSubject(). +|====================================================================== diff --git a/restcomm-connect.java.sdk/src/main/asciidoc/Notifications.adoc b/restcomm-connect.java.sdk/src/main/asciidoc/Notifications.adoc new file mode 100644 index 0000000..fc03367 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/asciidoc/Notifications.adoc @@ -0,0 +1,141 @@ + += Restcomm JAVA Sdk - Notifications + +[[Notifications]] +== Notifications + +A *Notification* resource represents a single log entry made by RestComm while handling your calls or your use of the Restful APIs. It is very useful for debugging purposes. The Notifications list resource represents the set of notifications generated for an account. + + +From here onwards, by a Notification, we refer to a Notification Resource Object + +=== Fetching a Notification + +A Notification with a given Sid can be fetched by the following code snippet +.... + String Sid; + . + . + . + Notification CallNotification = Notification.getNotification(Sid); +.... + +=== Accessing the Fetched Notification + +A Field of a Notification Object can be accessed by using the corresponding getMethod for that Field +.... + String Message; + Message = CallNotification.getMessage_text(). +.... + +==== List of Fields +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Property |Method +|Sid | getSid(). +|DateCreated |getDate_created(). +|DateUpdated |getDate_updated(). +|AccountSid |getAccount_sid(). +|CallSid |getCall_sid(). +|ApiVersion |getApi_version(). +|Log |getLog(). +|ErrorCode |getErrorCode(). +|MoreInfo |getMore_info(). +|MessageText |getMessage_text(). +|MessageDate |getMessage_date(). +|RequestUrl |getRequest_url(). +|RequestMethod |getRequest_method(). +|RequestVariables |getRequest_variables(). +|ResponseHeaders |getResponse_headers(). +|ResponseBody |getResponse_body(). +|Uri |getUri(). +|=============================================================================================================================================================================================================================== + +== Fetching List of Notifications + +=== Fetching the Default List + +The Default Notifications List can be fetched by using the following code + +.... + NotificationList List = NotificationList.getList(); +.... + +=== Fetching a Filtered List + +A Filtered Notifications List can be fetched by using the getFilteredList() method of the class NotificationList + +.... + NotificationList List = NotificationList.getFilteredList().ErrorCode("1").MessageText("Hello World").Filter(); +.... + +The above mentioned code snippet fetches the Notifications with ErrorCode = 1 and MessageText = Hello World + +==== List of FilterParameters +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Parameter |Method +|StartTime |StartTime(). +|EndTime |EndTime(). +|ErrorCode |ErrorCode(). +|MessageText |MessageText(). +|RequestUrl |RequestUrl(). +|=============================================================================================================================================================================================================================== + +In addition to these, the regular Paging paramters can also be used similar to the FilterParameters +.... + NotificationList List = NotificationList.getFilteredList().PageSize("1").Filter(). +.... + +==== List of PagingParameters +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Paramter |Method +|Page |Page(). +|NumPages |NumPages(). +|PageSize |PageSize(). +|Total |Total(). +|Start |Start(). +|End |End(). +|=============================================================================================================================================================================================================================== + +== Accessing the Fetched NotificationList + +The size of the Fetched List can be known by +.... + int size = CallNotification.size(); +.... + +The a Notification from the fetched NotificationList Object can be obtained by +.... + Notification a = CallNotification.get(1); +.... + +== Additional Paging Information +We can also access the Additional Paging Information by using the Methods of NotificationList +.... + String Uri; + Uri = CallNotification.getpreviouspageuri(); +.... + +The API returns URIs to the next, previous, first and last pages of the returned list as shown in the table below: + +=== Request Parameters + +[cols=",",options="header",] +|============================================================ +|Parameter |Method +|Uri |geturi(). +|Firstpageuri |getfirstpageuri(). +|Nextpageuri |getnextpageuri(). +|Previouspageuri |getpreviouspageuri(). +|Lastpageuri |getlastpageuri(). +|============================================================ + +NOTE: The Default Account from which we fetch the Notifications is the Main Account. + +If we want to change the Default Account to any specific SubAccount , use the following method before Fetching the Notification(s) +.... + NotifactionList.SubAccountAccess(SubAccountSid); + NotificationList List = NotificationList.getList(); +.... diff --git a/restcomm-connect.java.sdk/src/main/asciidoc/SMS.adoc b/restcomm-connect.java.sdk/src/main/asciidoc/SMS.adoc new file mode 100644 index 0000000..13b67b6 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/asciidoc/SMS.adoc @@ -0,0 +1,155 @@ + += Restcomm JAVA Sdk - SMSMessages + +[[SMSMessages]] +== SMSMessages + +A *SMS Message* resource represents an inbound or outbound SMS message. + +=== Fetching an SMS + +A SMS with a given Sid can be fetched by implementing the following code snippet +.... + String Sid; + . + . + . + SMS newSMS = SMS.getSMS(Sid); +.... + +=== Accessing the Fetched SMS + +A Field of a SMS Object can be accessed by using the corresponding getMethod for that Field +.... + String MessageBody; + MessageBody = CallNotification.getBody(). +.... + +==== List of Fields +[cols=",",options="header",] +|======================================================================================================== +|Field |Method +|Sid |getSid(). +|DateCreated |getDate_created(). +|DateUpdated |getDate_updated(). +|DateSent |getDate_sent(). +|AccountSid |getAccount_sid(). +|From |getFrom(). +|To |getTo(). +|Body |getBody(). +|Status |getStatus(). +|Direction |getDirection(). +|ApiVersion |getApi_version(). +|Uri |getUri(). +|======================================================================================================== + +=== Sending a New SMS + +A new SMS Message can be sent by using the newSMS() method of the SMS class. +.... + String FromUser; + String ToUser; + String MessageBody; + . + . + . + SMS.newSMS().From(FromUser).To(ToUser).Body(MessageBody).sendSMS(); +.... + +In order to capture the new SMS sent, +.... + SMS message = SMS.newSMS().From(FromUser).To(ToUser).Body(MessageBody).sendSMS(); +.... + +== Fetching List of SMSMessages + +=== Fetching the Default List + +The Default SMSMessage List can be fetched by using the following code + +.... + SMSList List = SMSList.getList(); +.... + +=== Fetching a Filtered List + +A Filtered SMS List can be fetched by using the getFilteredList() method of the class SMSList + +.... + SMSList List = SMSList.getFilteredList().From("+1234").Filter(); +.... + +The above mentioned code snippet fetches all the SMSMessages sent from = +1234 + +==== List of FilterParameters +[cols=",",options="header",] +|=========================================================================================================================================================================================================================================================================== +|Parameter |Methods +|To |To(). +|From |From(). +|StartTime |Start_time(). +|EndTime |End_time(). +|Body |Body(). +|=========================================================================================================================================================================================================================================================================== +In addition to these, the regular Paging paramters can also be used similar to the FilterParameters +.... + NotificationList List = NotificationList.getFilteredList().From("+1234").PageSize("1").Filter(). +.... +The above mentioned code snippet fetches all the SMSMessages sent from = +1234 in pages of size 1 + +==== List of PagingParameters +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Paramter |Method +|Page |Page(). +|NumPages |NumPages(). +|PageSize |PageSize(). +|Total |Total(). +|Start |Start(). +|End |End(). +|=============================================================================================================================================================================================================================== + +== Accessing the Fetched SMSList + +The size of the Fetched List can be known by +.... + SMSList MessageList; + . + . + . + int size = MessageList.size(); +.... + +The a SMS from the fetched SMSList Object can be obtained by +.... + SMS a =MessageList.get(1); +.... + +== Additional Paging Information +We can also access the Additional Paging Information +.... + String Uri; + Uri = MessageList.getpreviouspageuri(); +.... + +The API returns URIs to the next, previous, first and last pages of the returned list as shown in the table below: + +=== Request Parameters + +[cols=",",options="header",] +|============================================================ +|Parameter |Method +|Uri |geturi(). +|Firstpageuri |getfirstpageuri(). +|Nextpageuri |getnextpageuri(). +|Previouspageuri |getpreviouspageuri(). +|Lastpageuri |getlastpageuri(). +|============================================================ + +NOTE: The Default Account from which we fetch the SMSList is the Main Account. + +If we want to change the Default Account to any specific SubAccount , use the following method before Fetching the Notification(s) +.... + SMSList.SubAccountAccess(SubAccountSid); + SMSList List = SMSList.getList(); +.... diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/Email.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/Email.java new file mode 100644 index 0000000..e3d4921 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/Email.java @@ -0,0 +1,116 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Emails; + +import org.apache.http.ParseException; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Exceptions.*; + +public class Email{ + + static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Email/Messages.json/"; + + static public void SubAccountAccess(String sid) + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Email/Messages.json/"; + } + + public static EmailCreator newEmail() + { + return new EmailCreator(BASE_URL); + } + + private String to; + + private String body; + + private String subject; + + private String from; + + private String date_sent; + + private String account_sid; + + public String getTo () + { + return to; + } + + private void setTo (String to) + { + this.to = to; + } + + public String getBody () + { + return body; + } + + private void setBody (String body) + { + this.body = body; + } + + public String getSubject () + { + return subject; + } + + private void setSubject (String subject) + { + this.subject = subject; + } + + public String getFrom () + { + return from; + } + + private void setFrom (String from) + { + this.from = from; + } + + public String getDate_sent () + { + return date_sent; + } + + private void setDate_sent (String date_sent) + { + this.date_sent = date_sent; + } + + public String getAccount_sid () + { + return account_sid; + } + + private void setAccount_sid (String account_sid) + { + this.account_sid = account_sid; + } +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/EmailCreator.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/EmailCreator.java new file mode 100644 index 0000000..94ef407 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/EmailCreator.java @@ -0,0 +1,72 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Emails; +import org.restcomm.connect.java.sdk.http.*; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; + + +public class EmailCreator { + + static String BASE_URL; + public Request request; + public EmailCreator(final String BASE_URL) { + + EmailCreator.BASE_URL = BASE_URL; + request = new Request(HttpMethod.POST,BASE_URL); + } + public EmailCreator From(String value) + { + request.addPostParameters("From", value); + return this; + } + public EmailCreator To(String value) + { + request.addPostParameters("To", value); + return this; + } + public EmailCreator Body(String value) + { + request.addPostParameters("Body", value); + return this; + } + public EmailCreator Subject(String value) + { + request.addPostParameters("Subject", value); + return this; + } + public EmailCreator BCC(String value) + { + request.addPostParameters("BCC", value); + return this; + } + public EmailCreator CC(String value) + { + request.addPostParameters("CC", value); + return this; + } + public Email sendEmail() + { + Restcomm.sendRequest(request); + return Utilities.EmailObject(Restcomm.getJSONResponse()); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.java new file mode 100644 index 0000000..baf6580 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.java @@ -0,0 +1,117 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Notifications; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; + +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; +import java.net.MalformedURLException; + +public class FilteredNotificationList extends NotificationList { + + private static String BASE_URL; + private static Request request; + + public FilteredNotificationList(final String BASE_URL) + { + this.BASE_URL = BASE_URL; + request = new Request(HttpMethod.GET,BASE_URL); + } + public FilteredNotificationList Page(String value) throws MalformedURLException + { + request.addGetParameters("Page", value); + return this; + } + public FilteredNotificationList NumPages(String value) + { + request.addGetParameters("NumPages", value); + return this; + } + public FilteredNotificationList PageSize(String value) + { + request.addGetParameters("PageSize", value); + return this; + } + public FilteredNotificationList Total(String value) + { + request.addGetParameters("Total", value); + return this; + } + public FilteredNotificationList Start(String value) + { + request.addGetParameters("Start", value); + return this; + } + public FilteredNotificationList End(String value) + { + request.addGetParameters("End", value); + return this; + } + public FilteredNotificationList MessageText(String value) + { + request.addGetParameters("MessageText", value); + return this; + } + public FilteredNotificationList RequestUrl(String value) + { + request.addGetParameters("RequestUrl", value); + return this; + } + public FilteredNotificationList ErrorCode(String value) + { + request.addGetParameters("ErrorCode", value); + return this; + } + public FilteredNotificationList EndTime(String value) + { + request.addGetParameters("EndTime", value); + return this; + } + public FilteredNotificationList StartTime(String value) + { + request.addGetParameters("StartTime", value); + return this; + } + + public NotificationList Filter() + { + Restcomm.sendRequest(request); + Gson gson = new Gson(); + return gson.fromJson(Restcomm.getJSONResponse(),NotificationList.class); + } + + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/Notification.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/Notification.java new file mode 100644 index 0000000..7ef04fd --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/Notification.java @@ -0,0 +1,217 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Notifications; + +import org.apache.http.ParseException; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Exceptions.*; + +public class Notification{ + + static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Notifications.json/"; + + static public void SubAccountAccess(String sid) + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Notifications.json/"; + } + public static Notification getNotification(String sid) + { + Restcomm.sendRequest((new Request(HttpMethod.GET,BASE_URL+sid))); + return Utilities.NotificationObject(Restcomm.getJSONResponse()); + } + /*public static NotificationList getNotificationList() + { + return new NotificationList(BASE_URL); + }*/ + + private String request_variables; + + private String sid; + + private String message_date; + + private String message_text; + + private String error_code; + + private String date_created; + + private String uri; + + private String api_version; + + private String log; + + private String request_url; + + private String account_sid; + + private String request_method; + + private String date_updated; + + private String more_info; + + public String getRequest_variables () + { + return request_variables; + } + + private void setRequest_variables (String request_variables) + { + this.request_variables = request_variables; + } + + public String getSid () + { + return sid; + } + + private void setSid (String sid) + { + this.sid = sid; + } + + public String getMessage_date () + { + return message_date; + } + + private void setMessage_date (String message_date) + { + this.message_date = message_date; + } + + public String getMessage_text () + { + return message_text; + } + + private void setMessage_text (String message_text) + { + this.message_text = message_text; + } + + public String getError_code () + { + return error_code; + } + + private void setError_code (String error_code) + { + this.error_code = error_code; + } + + public String getDate_created () + { + return date_created; + } + + private void setDate_created (String date_created) + { + this.date_created = date_created; + } + + public String getUri () + { + return uri; + } + + private void setUri (String uri) + { + this.uri = uri; + } + + public String getApi_version () + { + return api_version; + } + + private void setApi_version (String api_version) + { + this.api_version = api_version; + } + + public String getLog () + { + return log; + } + + private void setLog (String log) + { + this.log = log; + } + + public String getRequest_url () + { + return request_url; + } + + private void setRequest_url (String request_url) + { + this.request_url = request_url; + } + + public String getAccount_sid () + { + return account_sid; + } + + private void setAccount_sid (String account_sid) + { + this.account_sid = account_sid; + } + + public String getRequest_method () + { + return request_method; + } + + private void setRequest_method (String request_method) + { + this.request_method = request_method; + } + + public String getDate_updated () + { + return date_updated; + } + + private void setDate_updated (String date_updated) + { + this.date_updated = date_updated; + } + + public String getMore_info () + { + return more_info; + } + + private void setMore_info (String more_info) + { + this.more_info = more_info; + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/NotificationList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/NotificationList.java new file mode 100644 index 0000000..773bb32 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/NotificationList.java @@ -0,0 +1,79 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Notifications; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; + +public class NotificationList extends ListUtil { + + private static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Notifications.json"; + private static Request request; + + static public void SubAccountAccess(String sid) //To access the Applications connected to SubAccounts + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Notifications.json"; + } + private List notifications; + + public Notification get(int index) + { + return notifications.get(index); + } + public int size() + { + return notifications.size(); + } + private void setList (List Notifications) + { + this.notifications = Notifications; + } + public static NotificationList getList() + { + request = new Request(HttpMethod.GET,BASE_URL); + Restcomm.sendRequest(request); + Gson gson = new Gson(); + + request = new Request(HttpMethod.GET,BASE_URL); + return gson.fromJson(Restcomm.getJSONResponse(),NotificationList.class); + } + public static FilteredNotificationList getFilteredList() + { + + return new FilteredNotificationList(BASE_URL); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.java new file mode 100644 index 0000000..8c7cbde --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.java @@ -0,0 +1,117 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; + +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; +import java.net.MalformedURLException; + +public class FilteredSMSList extends SMSList { + + private static String BASE_URL; + private static Request request; + + public FilteredSMSList(final String BASE_URL) + { + this.BASE_URL = BASE_URL; + request = new Request(HttpMethod.GET,BASE_URL); + } + public FilteredSMSList Page(String value) throws MalformedURLException + { + request.addGetParameters("Page", value); + return this; + } + public FilteredSMSList NumPages(String value) + { + request.addGetParameters("NumPages", value); + return this; + } + public FilteredSMSList PageSize(String value) + { + request.addGetParameters("PageSize", value); + return this; + } + public FilteredSMSList Total(String value) + { + request.addGetParameters("Total", value); + return this; + } + public FilteredSMSList Start(String value) + { + request.addGetParameters("Start", value); + return this; + } + public FilteredSMSList End(String value) + { + request.addGetParameters("End", value); + return this; + } + public FilteredSMSList To(String value) + { + request.addGetParameters("To", value); + return this; + } + public FilteredSMSList From(String value) + { + request.addGetParameters("From", value); + return this; + } + public FilteredSMSList Body(String value) + { + request.addGetParameters("Body", value); + return this; + } + public FilteredSMSList EndTime(String value) + { + request.addGetParameters("EndTime", value); + return this; + } + public FilteredSMSList StartTime(String value) + { + request.addGetParameters("StartTime", value); + return this; + } + + public SMSList Filter() + { + Restcomm.sendRequest(request); + Gson gson = new Gson(); + return gson.fromJson(Restcomm.getJSONResponse(),SMSList.class); + } + + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMS.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMS.java new file mode 100644 index 0000000..df8e9ae --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMS.java @@ -0,0 +1,219 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; + +import org.apache.http.ParseException; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Exceptions.*; + +public class SMS{ + + static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/"; + + static public void SubAccountAccess(String sid) + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/SMS/Messages.json/"; + } + public static SMS getSMS(String sid) + { + Restcomm.sendRequest((new Request(HttpMethod.GET,BASE_URL+sid))); + return Utilities.SMSObject(Restcomm.getJSONResponse()); + } + public static SMSCreator newSMS() + { + return new SMSCreator(BASE_URL); + } + /*public static SMSList getSMSList() + { + return new SMSList(BASE_URL); + }*/ + private String to; + + private String sid; + + private String body; + + private String status; + + private String direction; + + private String date_created; + + private String date_sent; + + private String from; + + private String uri; + + private String api_version; + + private String account_sid; + + private String price; + + private String date_updated; + + private String price_unit; + + public String getTo () + { + return to; + } + + private void setTo (String to) + { + this.to = to; + } + + public String getSid () + { + return sid; + } + + private void setSid (String sid) + { + this.sid = sid; + } + + public String getBody () + { + return body; + } + + private void setBody (String body) + { + this.body = body; + } + + public String getStatus () + { + return status; + } + + private void setStatus (String status) + { + this.status = status; + } + + public String getDirection () + { + return direction; + } + + private void setDirection (String direction) + { + this.direction = direction; + } + + public String getDate_created () + { + return date_created; + } + + private void setDate_created (String date_created) + { + this.date_created = date_created; + } + + public String getDate_sent () + { + return date_sent; + } + + private void setDate_sent (String date_sent) + { + this.date_sent = date_sent; + } + + public String getFrom () + { + return from; + } + + private void setFrom (String from) + { + this.from = from; + } + + public String getUri () + { + return uri; + } + + private void setUri (String uri) + { + this.uri = uri; + } + + public String getApi_version () + { + return api_version; + } + + private void setApi_version (String api_version) + { + this.api_version = api_version; + } + + public String getAccount_sid () + { + return account_sid; + } + + private void setAccount_sid (String account_sid) + { + this.account_sid = account_sid; + } + + public String getPrice () + { + return price; + } + + private void setPrice (String price) + { + this.price = price; + } + + public String getDate_updated () + { + return date_updated; + } + + private void setDate_updated (String date_updated) + { + this.date_updated = date_updated; + } + + public String getPrice_unit () + { + return price_unit; + } + + private void setPrice_unit (String price_unit) + { + this.price_unit = price_unit; + } +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSCreator.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSCreator.java new file mode 100644 index 0000000..4e3d9ad --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSCreator.java @@ -0,0 +1,57 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; +import org.restcomm.connect.java.sdk.http.*; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; + + +public class SMSCreator { + + static String BASE_URL; + public Request request; + public SMSCreator(final String BASE_URL) { + + SMSCreator.BASE_URL = BASE_URL; + request = new Request(HttpMethod.POST,BASE_URL); + } + public SMSCreator From(String value) + { + request.addPostParameters("From", value); + return this; + } + public SMSCreator To(String value) + { + request.addPostParameters("To", value); + return this; + } + public SMSCreator Body(String value) + { + request.addPostParameters("Body", value); + return this; + } + public SMS sendSMS() + { + Restcomm.sendRequest(request); + return Utilities.SMSObject(Restcomm.getJSONResponse()); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSList.java new file mode 100644 index 0000000..46851e1 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSList.java @@ -0,0 +1,76 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; + +public class SMSList extends ListUtil { + + private static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json"; + private static Request request; + + static public void SubAccountAccess(String sid) //To access the Applications connected to SubAccounts + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/SMS/Messages.json"; + } + private List messages; + + public SMS get(int index) + { + return messages.get(index); + } + public int size() + { + return messages.size(); + } + private void setList (List messages) + { + this.messages = messages; + } + public static SMSList getList() + { + request = new Request(HttpMethod.GET,BASE_URL); + Restcomm.sendRequest(request); + Gson gson = new Gson(); + return gson.fromJson(Restcomm.getJSONResponse(),SMSList.class); + } + public static FilteredSMSList getFilteredList() + { + return new FilteredSMSList(BASE_URL); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java index 5c60414..7fda145 100644 --- a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java @@ -28,6 +28,9 @@ import org.restcomm.connect.java.sdk.Accounts.Account; import org.restcomm.connect.java.sdk.Clients.Client; +import org.restcomm.connect.java.sdk.SMS.SMS; +import org.restcomm.connect.java.sdk.Emails.Email; +import org.restcomm.connect.java.sdk.Notifications.Notification; public class Utilities { @@ -51,4 +54,19 @@ public static Client ClientObject(String jsonResponse) { Gson gson = new Gson(); return gson.fromJson(jsonResponse,Client.class); } + public static Notification NotificationObject(String jsonResponse) { + + Gson gson = new Gson(); + return gson.fromJson(jsonResponse,Notification.class); + } + public static SMS SMSObject(String jsonResponse) { + + Gson gson = new Gson(); + return gson.fromJson(jsonResponse,SMS.class); + } + public static Email EmailObject(String jsonResponse) { + + Gson gson = new Gson(); + return gson.fromJson(jsonResponse,Email.class); + } } diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java index 097db1d..9c02001 100644 --- a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java @@ -60,13 +60,23 @@ public HttpMethod getMethod() { return method; } - public void addGetParameters(String a,String b) throws MalformedURLException, URISyntaxException + public void addGetParameters(String a,String b) { + try{ URIBuilder urib = new URIBuilder(Url); urib.addParameter(a,b); urib.build(); Url = new URL(urib.toString()).toString(); + } + catch (MalformedURLException e) + { + e.printStackTrace(); + } + catch (URISyntaxException e) + { + e.printStackTrace(); + } } public void addPostParameters(String a,String b) { diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/BasicTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/BasicTest.java index 38aa5ac..97149f0 100644 --- a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/BasicTest.java +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/BasicTest.java @@ -36,7 +36,7 @@ public class BasicTest { public static void runOnceBeforeClass() { Restcomm.setCommonUrl("http://localhost:8080/"); - Restcomm.init("AC13b4372c92ed5c07d951cf842e2664ff", "cb0936cfee986d3e3ec6d1d77cc57888"); + Restcomm.init("AC13b4372c92ed5c07d951cf842e2664ff", "7bec2769d3b48e9132e596b60a558d65"); //System.out.println("@BeforeClass - runOnceBeforeClass"); } @AfterClass @@ -63,3 +63,5 @@ protected String readFile(String fileName) throws IOException { } } } +/*curl GET -X AC13b4372c92ed5c07d951cf842e2664ff:7bec2769d3b48e9132e596b60a558d65@cloud.restcomm.com/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json +*/ \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java index 235cc89..ac19aab 100644 --- a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java @@ -1,3 +1,23 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ package org.restcomm.connect.java.sdk.Clients; import org.restcomm.connect.java.sdk.BasicTest; diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/EmailTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/EmailTest.java new file mode 100644 index 0000000..0ebe32c --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/EmailTest.java @@ -0,0 +1,72 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Emails; +import org.restcomm.connect.java.sdk.BasicTest; + +import static org.junit.Assert.*; +import org.apache.http.ProtocolException; + +import java.io.File; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; + +import org.restcomm.connect.java.sdk.Emails.*; +import com.github.tomakehurst.wiremock.client.WireMock; +import com.github.tomakehurst.wiremock.junit.WireMockRule; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.restcomm.connect.java.sdk.Restcomm; + +import org.junit.rules.ExpectedException; +import java.io.IOException; + +public class EmailTest extends BasicTest{ + + private String path = "src/test/java/org/restcomm/connect/java/sdk/Emails/TextFiles/"; + private String EmailSid = "SMade2570e7f554578ac590311085f53e2"; + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void testnewEmail() throws Exception { + + WireMock.stubFor(WireMock.post(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Email/Messages.json/")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withRequestBody(WireMock.containing("From=m%40hmail.com")) + .withRequestBody(WireMock.containing("To=y%40hmail.com")) + .withRequestBody(WireMock.containing("Body=This+is+RestComm")) + .withRequestBody(WireMock.containing("Subject=Test+Email")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(readFile(path+"getEmail.txt")))); + + Email b = Email.newEmail().From("m@hmail.com").To("y@hmail.com").Body("This is RestComm").Subject("Test Email").sendEmail(); + + WireMock.verify(WireMock.postRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Email/Messages.json/"))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals("m@hmail.com",b.getFrom()); + assertEquals("y@hmail.com",b.getTo()); + + } + +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/TextFiles/getEmail.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/TextFiles/getEmail.txt new file mode 100644 index 0000000..bd4b014 --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/TextFiles/getEmail.txt @@ -0,0 +1,8 @@ +{ + "date_sent": "2017-06-29T05:58:52.324Z", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "from": "m@hmail.com", + "to": "y@hmail.com", + "body": "This is a test from RestComm", + "subject": "Test Email" +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/NotificationTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/NotificationTest.java new file mode 100644 index 0000000..168a96e --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/NotificationTest.java @@ -0,0 +1,85 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Notifications; +import org.restcomm.connect.java.sdk.BasicTest; + +import static org.junit.Assert.*; +import org.apache.http.ProtocolException; + +import java.io.File; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; + +import org.restcomm.connect.java.sdk.Notifications.*; +import com.github.tomakehurst.wiremock.client.WireMock; +import com.github.tomakehurst.wiremock.junit.WireMockRule; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.restcomm.connect.java.sdk.Restcomm; + +import org.junit.rules.ExpectedException; +import java.io.IOException; + +public class NotificationTest extends BasicTest{ + + private String path = "src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/"; + private String NotificationSid = "NO70eddcd2f3424aea94c5d7a638298a6a"; + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void testGetNotification() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Notifications.json/"+NotificationSid)) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "Notification/json") + .withBody(readFile(path+"getNotification.txt")))); + + Notification a = Notification.getNotification(NotificationSid); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Notifications.json/"+NotificationSid))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals(NotificationSid,a.getSid()); + } + + @Test + public void testNotificationList() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Notifications.json")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withQueryParam("PageSize", WireMock.equalTo("1")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "Notification/json") + .withBody(readFile(path+"getNotificationList.txt")))); + + NotificationList a = NotificationList.getFilteredList().PageSize("1").Filter(); + + Notification b = a.get(0); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Notifications.json?PageSize=1"))); + assertEquals(200,Restcomm.getStatusCode()); + assertNotNull(a); + assertEquals("NOa6b821987c1e47b4b91d26783abc205b",b.getSid()); + + } +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotification.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotification.txt new file mode 100644 index 0000000..5f2281c --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotification.txt @@ -0,0 +1,16 @@ +{ + "sid": "NO70eddcd2f3424aea94c5d7a638298a6a", + "date_created": "Wed, 21 Jun 2017 10:30:27 +0000", + "date_updated": "Wed, 21 Jun 2017 10:30:27 +0000", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "api_version": "2012-04-24", + "log": 0, + "error_code": 11008, + "more_info": "/restcomm/errors/11008.html", + "message_text": "The SIP Client client:client_name is not registered or does not exist", + "message_date": "2017-06-21T10:30:27.000Z", + "request_url": "", + "request_method": "", + "request_variables": "", + "uri": "/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications/NO70eddcd2f3424aea94c5d7a638298a6a.json" +} diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotificationList.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotificationList.txt new file mode 100644 index 0000000..55def49 --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotificationList.txt @@ -0,0 +1,31 @@ +{ + "page": 0, + "num_pages": 19, + "page_size": 1, + "total": 19, + "start": "0", + "end": "0", + "uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json", + "first_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json?Page\u003d0\u0026PageSize\u003d1", + "previous_page_uri": "null", + "next_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json?Page\u003d1\u0026PageSize\u003d1\u0026AfterSid\u003dNOa6b821987c1e47b4b91d26783abc205b", + "last_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json?Page\u003d19\u0026PageSize\u003d1", + "notifications": [ + { + "sid": "NOa6b821987c1e47b4b91d26783abc205b", + "date_created": "Wed, 17 May 2017 11:09:40 +0000", + "date_updated": "Wed, 17 May 2017 11:09:40 +0000", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "api_version": "2012-04-24", + "log": 0, + "error_code": 11001, + "more_info": "/restcomm/errors/11001.html", + "message_text": "Cannot Connect to Client: bob : Make sure the Client exist or is registered with Restcomm", + "message_date": "2017-05-17T11:09:40.000Z", + "request_url": "", + "request_method": "", + "request_variables": "", + "uri": "/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications/NOa6b821987c1e47b4b91d26783abc205b.json" + } + ] +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/SMSTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/SMSTest.java new file mode 100644 index 0000000..087ef65 --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/SMSTest.java @@ -0,0 +1,104 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; +import org.restcomm.connect.java.sdk.BasicTest; + +import static org.junit.Assert.*; +import org.apache.http.ProtocolException; + +import java.io.File; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; + +import org.restcomm.connect.java.sdk.SMS.*; +import com.github.tomakehurst.wiremock.client.WireMock; +import com.github.tomakehurst.wiremock.junit.WireMockRule; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.restcomm.connect.java.sdk.Restcomm; + +import org.junit.rules.ExpectedException; +import java.io.IOException; + +public class SMSTest extends BasicTest{ + + private String path = "src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/"; + private String SMSSid = "SMade2570e7f554578ac590311085f53e2"; + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void testGetSMS() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/"+SMSSid)) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "SMS/json") + .withBody(readFile(path+"getSMS.txt")))); + + SMS a = SMS.getSMS(SMSSid); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/"+SMSSid))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals(SMSSid,a.getSid()); + } + @Test + public void testnewSMS() throws Exception { + + WireMock.stubFor(WireMock.post(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withRequestBody(WireMock.containing("From=%2B1654123987")) + .withRequestBody(WireMock.containing("To=%2B1321654879")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(readFile(path+"getSMS.txt")))); + + SMS b = SMS.newSMS().From("+1654123987").To("+1321654879").Body("This is a test from RestComm").sendSMS(); + + WireMock.verify(WireMock.postRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/"))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals("+1654123987",b.getFrom()); + assertEquals("+1321654879",b.getTo()); + + } + @Test + public void testSMSList() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withQueryParam("From", WireMock.equalTo("Raj")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "SMS/json") + .withBody(readFile(path+"getSMSList.txt")))); + + SMSList a = SMSList.getFilteredList().From("Raj").Filter(); + + SMS b = a.get(0); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json?From=Raj"))); + assertEquals(200,Restcomm.getStatusCode()); + assertNotNull(a); + assertEquals("Raj",b.getFrom()); + + } +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMS.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMS.txt new file mode 100644 index 0000000..923cb91 --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMS.txt @@ -0,0 +1,15 @@ +{ + "sid": "SMade2570e7f554578ac590311085f53e2", + "date_created": "Wed, 28 Jun 2017 06:30:32 +0000", + "date_updated": "Wed, 28 Jun 2017 06:30:32 +0000", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "from": "+1654123987", + "to": "+1321654879", + "body": "This is a test from RestComm", + "status": "sending", + "direction": "outbound-api", + "price": "0", + "price_unit": "USD", + "api_version": "2012-04-24", + "uri": "/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages/SMade2570e7f554578ac590311085f53e2.json" +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMSList.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMSList.txt new file mode 100644 index 0000000..64f99da --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMSList.txt @@ -0,0 +1,30 @@ +{ + "page": 0, + "num_pages": 0, + "page_size": 50, + "total": 1, + "start": "0", + "end": "1", + "uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages.json", + "first_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages.json?Page\u003d0\u0026PageSize\u003d50", + "previous_page_uri": "null", + "next_page_uri": "null", + "last_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages.json?Page\u003d0\u0026PageSize\u003d50", + "messages": [ + { + "sid": "SMab777e46302441c2b89457b7c0734f4d", + "date_created": "Wed, 28 Jun 2017 06:31:00 +0000", + "date_updated": "Wed, 28 Jun 2017 06:31:00 +0000", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "from": "Raj", + "to": "Taj", + "body": "This is a test from RestComm", + "status": "sending", + "direction": "outbound-api", + "price": "0", + "price_unit": "USD", + "api_version": "2012-04-24", + "uri": "/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages/SMab777e46302441c2b89457b7c0734f4d.json" + } + ] +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/Email.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/Email.class new file mode 100644 index 0000000..490b133 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/Email.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/EmailCreator.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/EmailCreator.class new file mode 100644 index 0000000..fd74fee Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/EmailCreator.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.class new file mode 100644 index 0000000..9accc81 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/Notification.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/Notification.class new file mode 100644 index 0000000..e669181 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/Notification.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/NotificationList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/NotificationList.class new file mode 100644 index 0000000..8581d88 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/NotificationList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.class new file mode 100644 index 0000000..055b38b Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMS.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMS.class new file mode 100644 index 0000000..4524873 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMS.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSCreator.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSCreator.class new file mode 100644 index 0000000..921cf1f Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSCreator.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSList.class new file mode 100644 index 0000000..44f496c Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Utilities.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Utilities.class index 8d015f5..1a1c8b1 100644 Binary files a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Utilities.class and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Utilities.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/http/Request.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/http/Request.class index 6131d5a..60b7e86 100644 Binary files a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/http/Request.class and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/http/Request.class differ diff --git a/restcomm-connect.java.sdk/target/maven-archiver/pom.properties b/restcomm-connect.java.sdk/target/maven-archiver/pom.properties index f72e5c4..3c29bc4 100644 --- a/restcomm-connect.java.sdk/target/maven-archiver/pom.properties +++ b/restcomm-connect.java.sdk/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Thu Jun 22 17:43:11 GMT+05:30 2017 +#Thu Jun 29 11:55:24 GMT+05:30 2017 version=0.0.1-SNAPSHOT groupId=org.restcomm artifactId=restcomm-connect.java.sdk diff --git a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst index 3c7186b..17da84b 100644 --- a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -5,25 +5,34 @@ org/restcomm/connect/java/sdk/Calls/Call.class org/restcomm/connect/java/sdk/Clients/ClientCreator.class org/restcomm/connect/java/sdk/Applications/Application.class org/restcomm/connect/java/sdk/Accounts/SubAccount.class +org/restcomm/connect/java/sdk/SMS/SMSList.class org/restcomm/connect/java/sdk/Calls/CallModifier.class org/restcomm/connect/java/sdk/Clients/ClientList$1.class org/restcomm/connect/java/sdk/Applications/ApplicationCreator.class -org/restcomm/connect/java/sdk/Accounts/SubAccountCreator.class org/restcomm/connect/java/sdk/Accounts/SubAccountList.class +org/restcomm/connect/java/sdk/Accounts/SubAccountCreator.class org/restcomm/connect/java/sdk/Restcomm.class org/restcomm/connect/java/sdk/Calls/CallCreator.class +org/restcomm/connect/java/sdk/SMS/SMS.class org/restcomm/connect/java/sdk/http/HttpClient.class org/restcomm/connect/java/sdk/Applications/ApplicationList.class org/restcomm/connect/java/sdk/Accounts/AccountUpdater.class org/restcomm/connect/java/sdk/Applications/ApplicationList$1.class org/restcomm/connect/java/sdk/Exceptions/ResourceNotFoundException.class -org/restcomm/connect/java/sdk/Accounts/SubAccountList$1.class -org/restcomm/connect/java/sdk/Utilities.class +org/restcomm/connect/java/sdk/Emails/Email.class org/restcomm/connect/java/sdk/http/Request.class +org/restcomm/connect/java/sdk/Utilities.class +org/restcomm/connect/java/sdk/Accounts/SubAccountList$1.class org/restcomm/connect/java/sdk/Accounts/SubAccountUpdater.class org/restcomm/connect/java/sdk/Clients/ClientList.class +org/restcomm/connect/java/sdk/Notifications/NotificationList.class +org/restcomm/connect/java/sdk/Notifications/Notification.class +org/restcomm/connect/java/sdk/SMS/FilteredSMSList.class org/restcomm/connect/java/sdk/Clients/ClientUpdater.class -org/restcomm/connect/java/sdk/Calls/CallsList.class org/restcomm/connect/java/sdk/ListUtil.class +org/restcomm/connect/java/sdk/Calls/CallsList.class +org/restcomm/connect/java/sdk/SMS/SMSCreator.class +org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.class org/restcomm/connect/java/sdk/Clients/Client.class +org/restcomm/connect/java/sdk/Emails/EmailCreator.class org/restcomm/connect/java/sdk/Accounts/Account.class diff --git a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst index 1f72faf..07f0ad6 100644 --- a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -1,26 +1,35 @@ +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/NotificationList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Applications/ApplicationCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/AccountUpdater.java -/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/ClientCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/SubAccount.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/ClientCreator.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/Email.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/Account.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/ClientList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Applications/ApplicationList.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Restcomm.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/SubAccountCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Applications/ApplicationUpdater.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/Notification.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMS.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Calls/Call.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/SubAccountList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/ExceptionHandler.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Exceptions/ResourceNotFoundException.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Applications/Application.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/HttpMethod.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/EmailCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Calls/CallsList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/SubAccountUpdater.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Calls/CallCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Calls/CallModifier.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/ClientUpdater.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/Client.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/ListUtil.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/HttpClient.java diff --git a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst index 6557110..02c470a 100644 --- a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +++ b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst @@ -1,6 +1,9 @@ +org/restcomm/connect/java/sdk/SMS/SMSTest.class +org/restcomm/connect/java/sdk/Clients/ClientTest.class +org/restcomm/connect/java/sdk/Notifications/NotificationTest.class org/restcomm/connect/java/sdk/Accounts/SubAccountTest.class org/restcomm/connect/java/sdk/BasicTest.class org/restcomm/connect/java/sdk/Applications/ApplicationTest.class org/restcomm/connect/java/sdk/Accounts/AccountTest.class -org/restcomm/connect/java/sdk/Clients/ClientTest.class +org/restcomm/connect/java/sdk/Emails/EmailTest.class org/restcomm/connect/java/sdk/Calls/CallTest.class diff --git a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst index a590cfb..12aff6e 100644 --- a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +++ b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -3,4 +3,7 @@ /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Accounts/SubAccountTest.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Accounts/AccountTest.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/SMSTest.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Applications/ApplicationTest.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/NotificationTest.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/EmailTest.java diff --git a/restcomm-connect.java.sdk/target/restcomm-connect.java.sdk-0.0.1-SNAPSHOT.jar b/restcomm-connect.java.sdk/target/restcomm-connect.java.sdk-0.0.1-SNAPSHOT.jar index 84dc16d..1690b1a 100644 Binary files a/restcomm-connect.java.sdk/target/restcomm-connect.java.sdk-0.0.1-SNAPSHOT.jar and b/restcomm-connect.java.sdk/target/restcomm-connect.java.sdk-0.0.1-SNAPSHOT.jar differ diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.AccountTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.AccountTest.xml index 1992aef..c196aaf 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.AccountTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.AccountTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,6 +60,6 @@ - - + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.SubAccountTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.SubAccountTest.xml index e58b0d8..0b5e160 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.SubAccountTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.SubAccountTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,8 +60,8 @@ - - - - + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Applications.ApplicationTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Applications.ApplicationTest.xml index 7af564c..0ca28c1 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Applications.ApplicationTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Applications.ApplicationTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,9 +60,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Calls.CallTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Calls.CallTest.xml index c6c6fff..51d3ead 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Calls.CallTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Calls.CallTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,8 +60,8 @@ - - - - + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Clients.ClientTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Clients.ClientTest.xml index 49e9ffd..a3241dd 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Clients.ClientTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Clients.ClientTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,8 +60,8 @@ - - - - + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Emails.EmailTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Emails.EmailTest.xml new file mode 100644 index 0000000..549de75 --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Emails.EmailTest.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Notifications.NotificationTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Notifications.NotificationTest.xml new file mode 100644 index 0000000..75ed32b --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Notifications.NotificationTest.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.SMS.SMSTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.SMS.SMSTest.xml new file mode 100644 index 0000000..ebb2df2 --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.SMS.SMSTest.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.AccountTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.AccountTest.txt index ba53dc4..7138d24 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.AccountTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.AccountTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Accounts.AccountTest ------------------------------------------------------------------------------- -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.177 sec +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.186 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.SubAccountTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.SubAccountTest.txt index 203cd98..00c393f 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.SubAccountTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.SubAccountTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Accounts.SubAccountTest ------------------------------------------------------------------------------- -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.678 sec +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.75 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Applications.ApplicationTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Applications.ApplicationTest.txt index d222e24..8e2b5a5 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Applications.ApplicationTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Applications.ApplicationTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Applications.ApplicationTest ------------------------------------------------------------------------------- -Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.362 sec +Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.356 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Calls.CallTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Calls.CallTest.txt index 9da2d8a..d2b407b 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Calls.CallTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Calls.CallTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Calls.CallTest ------------------------------------------------------------------------------- -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.306 sec +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.301 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Clients.ClientTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Clients.ClientTest.txt index a1b9a90..2a3b959 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Clients.ClientTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Clients.ClientTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Clients.ClientTest ------------------------------------------------------------------------------- -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.291 sec +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.309 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Emails.EmailTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Emails.EmailTest.txt new file mode 100644 index 0000000..57bbe9f --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Emails.EmailTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: org.restcomm.connect.java.sdk.Emails.EmailTest +------------------------------------------------------------------------------- +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.058 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Notifications.NotificationTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Notifications.NotificationTest.txt new file mode 100644 index 0000000..48e31e6 --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Notifications.NotificationTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: org.restcomm.connect.java.sdk.Notifications.NotificationTest +------------------------------------------------------------------------------- +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.195 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.SMS.SMSTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.SMS.SMSTest.txt new file mode 100644 index 0000000..b54a406 --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.SMS.SMSTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: org.restcomm.connect.java.sdk.SMS.SMSTest +------------------------------------------------------------------------------- +Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.142 sec diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/BasicTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/BasicTest.class index 546376e..25a2dc0 100644 Binary files a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/BasicTest.class and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/BasicTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Clients/ClientTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Clients/ClientTest.class index 7946fa7..ba81a7b 100644 Binary files a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Clients/ClientTest.class and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Clients/ClientTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Emails/EmailTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Emails/EmailTest.class new file mode 100644 index 0000000..15f0ede Binary files /dev/null and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Emails/EmailTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Notifications/NotificationTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Notifications/NotificationTest.class new file mode 100644 index 0000000..dcf00e8 Binary files /dev/null and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Notifications/NotificationTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/SMS/SMSTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/SMS/SMSTest.class new file mode 100644 index 0000000..81be86c Binary files /dev/null and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/SMS/SMSTest.class differ