Interface MessagingService
public interface MessagingService
Main class of the Messaging service for the Card issued by D1 and
ClickToPay.- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidgetMessageList(D1Task.Callback<List<Message>> callback) To retrieve message list for the current consumer.voidmarkMessageListAsRead(List<String> messageID, D1Task.Callback<Void> callback) To mark the message as read.voidregisterMessageNotification(D1Task.Callback<Void> callback) To register the notification for card issued by D1 andClickToPay.voidunregisterMessageNotification(D1Task.Callback<Void> callback) To unregister notification for card issued by D1 andClickToPay.
-
Method Details
-
registerMessageNotification
To register the notification for card issued by D1 andClickToPay.The SDK registers the token to the server. Hence,
D1Task.Builder.setApplicationProfileId(String)andMessagingService.updatePushTokenshould be called before calling this API. Otherwise, the SDK will either returnIllegalArgumentExceptionorD1Error.Code.pushTokenNotFound.- Parameters:
callback- The callback is invoked when the operation is completed. Notification is registered when the callback is successful.
Possible errors:
- Since:
- 4.0.0
-
unregisterMessageNotification
To unregister notification for card issued by D1 andClickToPay.- Parameters:
callback- The callback is invoked when the operation is completed. Notification is unregistered when the callback is successful.
Possible errors:
- Since:
- 4.0.0
-
getMessageList
To retrieve message list for the current consumer. The message is related to activities in the card issued by D1 andClickToPay.- Parameters:
callback- The callback is invoked when the operation is completed. When the callback is successful, the list ofmessagesis returned.
Possible errors:
- Since:
- 4.0.0
-
markMessageListAsRead
void markMessageListAsRead(@NonNull List<String> messageID, @NonNull D1Task.Callback<Void> callback) To mark the message as read. The message is related to activities in the card issued by D1 andClickToPay.- Parameters:
messageID- The list of message IDs.callback- The callback is invoked when the operation is completed.
Possible errors:
- Since:
- 4.0.0
-