All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Improved error handling when there are apparent networking issues
- Added new workflows in
VerifyRequest
- Added support for verification workflows inside of
VerifyRequest
. - Added support for transfer to NCCO via
VoiceClient#transferCall
.
VerifyClient
had methods that were still claiming to throw anIOException
. This has been removed as it is not posible for it to be thrown.
- Added support for setting an application id as a messages callback value in updating a number.
- Added support for specifying a number type when searching for a number to purchase.
- Added support for updating account settings (delivery receipt URL and inbound SMS URL)
- Added support for Async Number Insights by setting the property
async
andcallback
on theAdvancedInsightRequest
object. - Add
ringback
support to theonAnswer
part of thePhoneEndpoint
.
- Changed from Auth0 to the Nexmo JWT Library.
- Renamed the
com.nexmo.client.applications
package tocom.nexmo.client.application
ApplicationClient
now supports the Applications v2 API. This change has resulted in some backwards incompatibility.NexmoClientException
is now aRuntimeException
. The various sub client methods will still declare that it is being thrown, but it is no longer a requirement to catch the exception. Additionally, theIOException
that was being thrown in each method has been converted to aNexmoResponseParseException
to more accurately reflect when it is thrown. This is also an unchecked exception and catching is no longer required.- The
NexmoUnacceptableAuthException
will now add which parameters are missing instead of which internal auth methods.
- Added new voice 'MATTHEW' to
VoiceName
enum.
- Fix UTF-8 Encoding for endpoints using JSON bodies.
- Added
NotifyAction
for use inNCCO
.
- Added header (application/json) for Redact client.
- Fixed Application Update to send json body as it is what the API now expects.
- Fixed the product name in Redact API for
messages
.
- Missing builders for
StreamAction
,AdvancedInsightRequest
,StandardInsightRequest
, andBasicInsightRequest
.
AbstractMethod
will force UTF-8 charset for requests usingStringEntity
.- Tests will now run using static builder methods for each of the classes that use builders for construction.
- Added static
builder
methods toAction
classes to reduce some of the verbosity around using them. You can now doTalkAction action = TalkAction.builder("Hello World!").build();
instead of justTalkAction action = new TalkAction.Builder("Hello World).build();
. - Added static
builder
methods toNexmoClient
to reduce some of the verbosity around instantiating the client. - Added
ncco
property to theCall
object for use in theVoiceClient.createCall
method. You can now send anNcco
directly to the API instead of defining ananswer_url
.
channels
property toRecordAction
as it was unintentionally removed during the version 4 release.
- Added
Ncco
class to wrapCollection<Action>
and handle the serialization of NCCO json throughtoJson
. - Added the following
Builder
classes:ConnectAction.Builder
ConversationAction.Builder
InputAction.Builder
RecordAction.Builder
StreamAction.Builder
TalkAction.Builder
- Added
PhoneEndpoint
tocom.nexmo.voice.ncco
package for use withConnectAction
. - Added
WebSocketEndpoint
tocom.nexmo.voice.ncco
package for use withConnectAction
. - Added
SipEndpoint
tocom.nexmo.voice.ncco
package for use withConnectAction
. - Added
EventMethod
enumeration to replace the usage of strings. - Added
EventType
enumeration and the ability to specify theeventType
property ofConnectAction
. - Added
NexmoClient.Builder
to allow for fluent creation ofNexmoClient
. - Added
getBasicNumberInsight
,getStandardNumberInsight
, andgetAdvancedNumberInsight
toInsightClient
which takes a respective*InsightRequest
. - Added
CallerIdentity
data object to be used in number insight. - Added
Builder
toCallsFilter
class to make filtering search results more intuative.
- Renamed all
Ncco
classes toAction
classes:- Renamed
Ncco
interface toAction
- Renamed
ConnectNcco
toConnectAction
- Renamed
ConversationNcco
toConversationAction
- Renamed
InputNcco
toInputAction
- Renamed
RecordNcco
toRecordAction
- Renamed
StreamNcco
toStreamAction
- Renamed
TalkNcco
toTalkAction
- Renamed
- All
Action
classes now must be constructed through the providedBuilder
class. - All
Action
classes are now immutable. - The
eventUrl
property ofConnectAction
,ConversationAction
,InputAction
, andRecordAction
is now aCollection<String>
instead of an array. - The
eventMethod
property ofConnectAction
,ConversationAction
,InputAction
, andRecordAction
is now anEventMethod
enum instead of a String. - Removed
ConnectWebSocketNcco
as it is built intoConnectAction
. VerifyClient
will now return*Response
instead of*Result
objects.- Refactored
com.nexmo.client.voice.endpoints
to be part of thecom.nexmo.client.voice
package. - Made all
*Endpoint
and*Method
classes package scoped. Users should always go through the appropriateClient
classes. - Moved
AbstractMethod
to the root package. - Removed legacy
setUri
methods from the variousVoiceClient
endpoints. This should be done throughHttpConfig
. - Changed
BasicInsightRequest
,StandardInsightRequest
, andAdvancedInsightRequest
to use builders as constructor telescoping is clunky. Added some static factory methods to these classes to allow shortcutting through the builder for "simple" requests. - Updated
BasicInsightEndpoint
,StandardInsightEndpoint
, andAdvancedInsightEndpoint
to a more restrictive scope and moved them to thecom.nexmo.client.insight
package. - Changed
status
property ofBasicInsightResponse
to anInsightStatus
enumeration. - Changed
SendMessageEndpoint
from XML to JSON. It now returns aSmsSubmissionResponse
instead of an array result.
- Added the ability to specify the number of channels to record in
RecordNcco
- Update base uri to always have the version string appended to it.
- Added missing voices to
VoiceName
enum. - Added configuration object to be used with
HttpWrapper
to allow for customization. - Added the ability to customize the base URI used for the various endpoints.
- Added
ConnectWebSocketNcco
to handle connecting to WebSocket endpoints similar toConnectNcco
to maintain backwards compatibility. - Added
getDisplayName
method toVoiceName
to represent the name that is used in serialization.
TalkNcco
to useVoiceName
object instead ofString
HttpWrapper
now uses system properties by default.
- Added
com.nexmo.client.incoming.MessageEvent
to assist with the deserialization of the JSON payload used for incoming messages. - Added
com.nexmo.client.incoming.CallEvent
to assist with the deserialization of the JSON payload used for call events. - Added
com.nexmo.client.incoming.InputEvent
to assist with the deserialization of the JSON payload used for input events. - Added
com.nexmo.client.incoming.RecordEvent
to assist with the deserialization of the JSON payload used for record events. - Added secret management methods to
AccountClient
in the form of the following methods:listSecrets
for listing all secrets.getSecret
for getting information on a specific secret.revokeSecret
for revoking a secret.createSecret
for creating a new secret.
- User Agent String now includes the Java version in addition to the client version.
enum
classes that are used to deserialize JSON have been updated to return anUNKNOWN
value instead of throwing anIllegalArgumentException
when the value cannot be deserialized. Theseenum
s are:RecordingFormat
MachineDetection
ModifyCallAction
CallDirection
CallStatus
RoamingDetails.RoamingStatus
AdvancedInsightResponse.PortedStatus
AdvancedInsightResponse.Validity
AdvancedInsightResponse.Reachability
- Updated
StreamNcco
'sstreamUrl
to serialize into an array for use in the Voice API.
- Added
RedactClient
and the ability to interact with the Nexmo Redact API.
TalkNcco
now usesVoiceName
internally instead ofString
for thevoiceName
property.
- Added
getSmsPrice
toAccountClient
for getting SMS pricing for a country. - Added
getVoicePrice
toAccountClient
for getting voice pricing for a country. - Added
getPrefixPrice
toAccountClient
for getting SMS and voice pricing for a prefix. - Added
topUp
toAccountClient
for topping up your account which has auto-reload enabled. - Added
getSms
toSmsClient
for searching for a single message by id. - Added
ConversionClient
and the ability to interact with the Nexmo Conversion API.
-
Updated
VerifyClient
to use the JSON endpoints instead of XML. -
Updated endpoints which are used by
VerifyClient
from public to package scope in order to encourage usage throughVerifyClient
. -
Deprecated XML version of the following endpoints:
VerifyEndpoint
CheckEndpoint
SearchEndpoint
-
Deprecated the following XML results:
VerifyResult
should useVerifyResponse
CheckResult
should useCheckResponse
SearchResult
should useSearchVerifyResponse
-
Deprecated the following XML methods:
VerifyCheckMethod
- Added
VerifyStatus
enumeration to use for statuses coming back from the verify endpoint. - Added
VerifyResponse
,CheckResponse
, andSearchVerifyResponse
for JSON responses to match other JSON using endpoints. - Added
VerifyMethod
,CheckMethod
, andSearchMethod
for better segregation between endpoint and method classes. - Add
split
attribute to theRecordNcco
object.
- Updated
ConversationNcco
'smusicOnHoldUrl
to serialize into an array for use in the Voice API.
- Updated Jackson Databind dependency to newer version.
- Modify call now works with the API again, returning
null
(because the API now returns 204 No Content) - VerifyRequest now supports all supported parameters.
- Client-side validation for the
from
parameter's length on theMessage
class has been removed.
- Add
level
attribute to theTalkNcco
object.
- Add signature authentication support to the API endpoints which support it.
- Add
NexmoClient.generateJwt
- Add
VoiceClient.downloadRecording
- Made exceptions from
AuthCollection
'sgetAuth
andgetAcceptableAuthMethod
more specific. (Backwards compatible change)
ModifyCallPayload.action
is now a value of the enumModifyCallPayload.Action
.- All calls now throw
HttpResponseException
if an abnormal HTTP status code is returned from the Nexmo API.
- Added missing values for CallStatus: FAILED, REJECTED, BUSY & CANCELLED
- Add missing setter for the Message.statusReportRequired property.
- Add
AccountClient.getBalance
method for getting an account balance. - Add
NumbersClient.listNumbers
method. - Add
NumbersClient.searchNumbers
method. - Add
NumbersClient.cancelNumber
method. - Add
NumbersClient.buyNumber
method. - Add
NumbersClient.updateNumber
andNumbersClient.linkNumber
. - Add the ability to mute, unmute, earmuff, unearmuff and transfer an ongoing call.
- Add
VerifyClient.advanceVerification
andVerifyClient.cancelVerification
- Add
ApplicationClient
end methods for creating, updating, deleting, listing and getting configured applications. - Add extra endpoints for searching SMS messages.
- All URL-encoded PUT and POST requests are now UTF-8 instead of ISO-8859-1.
- The event url is properly set on a
Call
- Number Insight now supports the
cnam
parameter for Standard and Advanced requests.
- Made servlet-api an optional dependency so it isn't bundled in war files. (This could result in class conflicts in Tomcat.)
- Nexmo Voice API
- Automated testing and code quality with Travis CI, Codecov and Codacy
- Publishing to Maven Central
- Complete refactoring and reorganisation of the library. All classes are now
under the
com.nexmo.client
package.
- New Insight API using non-deprecated endpoints.
- Migrate to Gradle
- Internal refactoring for unit testing
- Removed example code. See nexmo-community/nexmo-java-quickstart instead.
- Support for USSD submission
- Include LICENSE.txt file and license in all source files
- Updated signature generation/verification in line with updates to Nexmo Service
- Include the 'network' field in the SmsSubmissionResult object
- Migrate to apache httpclient 4.1
- Switch from use of username/password to 'api_key' / 'api_secret'
- Add support for 'signed' requests (using
NexmoSmsClientSignedRequests
) - Message submissions can now specify a protocol-id value where required
- Add support for supplying a ValidityPeriod along with a Message when submitting a snsRequest
- Add support for performing reachability checks if the feature is enabled on your account
- Message submissions can now specify a message-class using the enum
com.nexmo.messaging.sdk.messages.parameters.MessageClass
- Add support for supplying a network code to override the Nexmo automatic network detection (Feature must be enabled on your account)
- Adding constants for all current response codes
- Adding 'destination' and 'reachability' values to response object
- Correcting some comments and log statements
- Fix some small things reported by findbugs
- Re-factor NexmoSmsClient. There are now sub-classes of this client class depending on the level of security required
com.nexmo.messaging.sdk.NexmoSmsClient
: The default clientcom.nexmo.messaging.sdk.NexmoSmsClientSSL
: Uses SSL / HTTPS to encrypt the requestscom.nexmo.messaging.sdk.NexmoSmsClientSignedRequests
: Signs the requests using the secret key assigned to your accountcom.nexmo.messaging.sdk.NexmoSmsClientSignedRequestsSSL
: Signs the requests and uses SSL / HTTPS to encrypt
- Add https support to message submissions
- Add 'ant example-https' example task
- Add support for 'messagePrice' in the api response
- Add reporting of remaining-balance and message-price in the example scripts
- Add support for nexmo SNS service
- Ams submission - report comms-failure as an error response, not as an exception
- Ams submission - add support for 'remainingBalance' in the api response