NAV

Distribution List(Last Updated : 01/11/2017)

Create/Update/Delete Result

Responses from the creation/update/deletion of a distribution list are the same. A DistributionListResult object with the following fields is returned as a response to a successful call:

Fields

Method Name Data Returned Description
getRequestId(): String Request ID The key for the specific request.
getPushId(): long Push ID The key for the specific push message.
getListId(): long List ID The key for the created/updated/deleted distribution list.

A BasicFailure object with the following fields are returned as a response to a failed call:

Fields

Method Name Data Returned Description
getRequestId(): String Request ID The key for the specific request.
getPushId(): long Push ID The key for the specific push message.
getStatusCode(): String API Status Code A code that provides additional information about the status of your request. Please reference the Status_code list for details.

The following example demonstrates how handlers are registered:

ApiResultListener<DistributionListResult, BasicFailure> creationResultListener = new ApiResultListener<DistributionListResult, BasicFailure>() { @Override public void onSuccess(@Nonnull DistributionListResult result) { // Handle success result } @Override public void onFailure(@Nonnull BasicFailure failure) { // Handle failure result } }; ResultHandler resultHandler = new ResultHandler.Builder() .listen(ApiResultTypeSpec.distributionListCreation, creationResultListener) // For update .listen(ApiResultTypeSpec.distributionListUpdate, updateResultListener) // For deletion .listen(ApiResultTypeSpec.distributionListDeletion, deletionResultListener) .build(typeSpecFinder);