-
- All Implemented Interfaces:
-
com.onesignal.common.events.IEventNotifier
public final class SubscriptionModel extends Model
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanoptedInprivate BooleanisDisabledInternallyprivate IntegerremoteDisabledReasonprivate volatile BooleanremoteDisableClearedByUserprivate SubscriptionTypetypeprivate Stringaddressprivate SubscriptionStatusstatusprivate Stringsdkprivate StringdeviceOSprivate Stringcarrierprivate StringappVersionprivate Stringidprivate final BooleanhasSubscribers
-
Constructor Summary
Constructors Constructor Description SubscriptionModel()
-
Method Summary
-
Methods inherited from class com.onesignal.user.internal.subscriptions.SubscriptionModel
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
-
-
Method Detail
-
getOptedIn
final Boolean getOptedIn()
-
setOptedIn
final Unit setOptedIn(Boolean optedIn)
-
getIsDisabledInternally
final Boolean getIsDisabledInternally()
-
setIsDisabledInternally
final Unit setIsDisabledInternally(Boolean isDisabledInternally)
-
getRemoteDisabledReason
final Integer getRemoteDisabledReason()
-
setRemoteDisabledReason
final Unit setRemoteDisabledReason(Integer remoteDisabledReason)
-
getRemoteDisableClearedByUser
final Boolean getRemoteDisableClearedByUser()
True from IPushSubscription.optIn until the server reports this subscription in any state other than a remote disable. Every opt-in sends a subscription update, and a fetch that started before that update went out still reports the disable the opt-in cleared; while this is set, RefreshUser leaves remoteDisabledReason alone instead of recording that stale answer. Memory only, since a fresh process has no update in flight to protect.
-
setRemoteDisableClearedByUser
final Unit setRemoteDisableClearedByUser(Boolean remoteDisableClearedByUser)
True from IPushSubscription.optIn until the server reports this subscription in any state other than a remote disable. Every opt-in sends a subscription update, and a fetch that started before that update went out still reports the disable the opt-in cleared; while this is set, RefreshUser leaves remoteDisabledReason alone instead of recording that stale answer. Memory only, since a fresh process has no update in flight to protect.
-
getType
final SubscriptionType getType()
-
setType
final Unit setType(SubscriptionType type)
-
getAddress
final String getAddress()
-
setAddress
final Unit setAddress(String address)
-
getStatus
final SubscriptionStatus getStatus()
-
setStatus
final Unit setStatus(SubscriptionStatus status)
-
getDeviceOS
final String getDeviceOS()
-
setDeviceOS
final Unit setDeviceOS(String deviceOS)
-
getCarrier
final String getCarrier()
-
setCarrier
final Unit setCarrier(String carrier)
-
getAppVersion
final String getAppVersion()
-
setAppVersion
final Unit setAppVersion(String appVersion)
-
getHasSubscribers
Boolean getHasSubscribers()
-
-
-
-