-
- All Implemented Interfaces:
-
com.onesignal.common.events.IEventNotifier
public final class CreateSubscriptionOperation extends Operation
An Operation to create a new subscription in the OneSignal backend. The subscription wll be associated to the user with the appId and onesignalId provided.
-
-
Field Summary
Fields Modifier and Type Field Description private StringappIdprivate StringonesignalIdprivate StringsubscriptionIdprivate SubscriptionTypetypeprivate Booleanenabledprivate Stringaddressprivate SubscriptionStatusstatusprivate final StringcreateComparisonKeyprivate final StringmodifyComparisonKeyprivate final GroupComparisonTypegroupComparisonTypeprivate final BooleancanStartExecuteprivate final StringapplyToRecordIdprivate Stringnameprivate Stringidprivate final BooleanhasSubscribers
-
Constructor Summary
Constructors Constructor Description CreateSubscriptionOperation(String appId, String onesignalId, String subscriptionId, SubscriptionType type, Boolean enabled, String address, SubscriptionStatus status)CreateSubscriptionOperation()
-
Method Summary
-
Methods inherited from class com.onesignal.user.internal.operations.CreateSubscriptionOperation
toString -
Methods inherited from class com.onesignal.core.internal.operations.Operation
hasProperty, initializeFromJson, initializeFromModel, setAnyProperty, setBigDecimalProperty, setBooleanProperty, setDoubleProperty, setEnumProperty, setFloatProperty, setIntProperty, setListProperty, setLongProperty, setMapModelProperty, setOptAnyProperty, setOptBigDecimalProperty, setOptBooleanProperty, setOptDoubleProperty, setOptEnumProperty, setOptFloatProperty, setOptIntProperty, setOptListProperty, setOptLongProperty, setOptMapModelProperty, setOptStringProperty, setStringProperty, subscribe, toJSON, unsubscribe -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CreateSubscriptionOperation
CreateSubscriptionOperation(String appId, String onesignalId, String subscriptionId, SubscriptionType type, Boolean enabled, String address, SubscriptionStatus status)
-
CreateSubscriptionOperation
CreateSubscriptionOperation()
-
-
Method Detail
-
getOnesignalId
final String getOnesignalId()
-
setOnesignalId
final Unit setOnesignalId(String onesignalId)
-
getSubscriptionId
final String getSubscriptionId()
-
setSubscriptionId
final Unit setSubscriptionId(String subscriptionId)
-
getType
final SubscriptionType getType()
-
setType
final Unit setType(SubscriptionType type)
-
getEnabled
final Boolean getEnabled()
-
setEnabled
final Unit setEnabled(Boolean enabled)
-
getAddress
final String getAddress()
-
setAddress
final Unit setAddress(String address)
-
getStatus
final SubscriptionStatus getStatus()
-
setStatus
final Unit setStatus(SubscriptionStatus status)
-
getCreateComparisonKey
String getCreateComparisonKey()
-
getModifyComparisonKey
String getModifyComparisonKey()
-
getGroupComparisonType
GroupComparisonType getGroupComparisonType()
The comparison type to use when this operation is the starting operation, in terms of which operations can be grouped with it.
-
getCanStartExecute
Boolean getCanStartExecute()
-
getApplyToRecordId
String getApplyToRecordId()
-
getHasSubscribers
Boolean getHasSubscribers()
-
translateIds
Unit translateIds(Map<String, String> map)
Called when an operation has resolved a local ID to a backend ID (i.e. successfully created a backend resource). Any IDs within the operation that could be local IDs should be translated at this time. Within the map the key is the local Id, the value is the remote Id.
-
-
-
-