-
public interface ISubscriptionBackendService
-
-
Method Summary
Modifier and Type Method Description abstract Pair<String, RywData>createSubscription(String appId, String aliasLabel, String aliasValue, SubscriptionObject subscription)Create a new subscription for the user identified by the aliasLabel/aliasValue provided. abstract RywDataupdateSubscription(String appId, String subscriptionId, SubscriptionObject subscription)Update an existing subscription with the properties provided. abstract UnitdeleteSubscription(String appId, String subscriptionId)Delete an existing subscription. abstract UnittransferSubscription(String appId, String subscriptionId, String aliasLabel, String aliasValue)Transfer an existing subscription to the user specified. abstract Map<String, String>getIdentityFromSubscription(String appId, String subscriptionId)Given an existing subscription, retrieve all identities associated to it. -
-
Method Detail
-
createSubscription
abstract Pair<String, RywData> createSubscription(String appId, String aliasLabel, String aliasValue, SubscriptionObject subscription)
Create a new subscription for the user identified by the aliasLabel/aliasValue provided. If the subscription being created already exists under a different user, ownership will be transferred to this user provided.
If there is a non-successful response from the backend, a BackendException will be thrown with response data.
- Parameters:
appId- The ID of the OneSignal application this user exists under.aliasLabel- The alias label to retrieve the user under.aliasValue- The identifier within the aliasLabel that identifies the user to retrieve.subscription- The subscription to create.
-
updateSubscription
abstract RywData updateSubscription(String appId, String subscriptionId, SubscriptionObject subscription)
Update an existing subscription with the properties provided.
- Parameters:
appId- The ID of the OneSignal application this subscription exists under.subscriptionId- The ID of the subscription to update.subscription- The subscription updates.
-
deleteSubscription
abstract Unit deleteSubscription(String appId, String subscriptionId)
Delete an existing subscription.
- Parameters:
appId- The ID of the OneSignal application this subscription exists under.subscriptionId- The ID of the subscription to delete.
-
transferSubscription
abstract Unit transferSubscription(String appId, String subscriptionId, String aliasLabel, String aliasValue)
Transfer an existing subscription to the user specified.
- Parameters:
appId- The ID of the OneSignal application this subscription exists under.subscriptionId- The ID of the subscription to transfer.aliasLabel- The alias label of the user to transfer the subscription under.aliasValue- The identifier within the aliasLabel that identifies the user to transfer under.
-
getIdentityFromSubscription
abstract Map<String, String> getIdentityFromSubscription(String appId, String subscriptionId)
Given an existing subscription, retrieve all identities associated to it.
- Parameters:
appId- The ID of the OneSignal application this subscription exists under.subscriptionId- The ID of the subscription to retrieve identities for.
-
-
-
-