Class SubscriptionData
java.lang.Object
com.github.twitch4j.pubsub.domain.SubscriptionData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe id of the channel where the subscription took placeThe name of the channel where the subscription took placeThe event type for this subscriptionHow many months in total has the receiving user been subscribedThe display name for the user that purchased the subscriptionWhether this sub message was caused by a gift subscriptionDeprecated.Number of months gifted as part of a single, multi-month giftThe display name of the user that received the subscriptionThe id of the user that received the subscriptionThe login name of the user that received the subscriptionHow many months in a row has the receiving user been subscribedThe accompanying message when the subscription was sharedThe type of subscription plan that was purchasedThe name of the subscription plan that was purchasedgetTime()Deprecated.in favor of getTimestamp()RFC 3339 timestamp of when the subscription took placeThe id for the user that purchased the subscriptionThe login name for the user that purchased the subscriptioninthashCode()voidsetBenefitEndMonth(Integer benefitEndMonth) voidsetChannelId(String channelId) The id of the channel where the subscription took placevoidsetChannelName(String channelName) The name of the channel where the subscription took placevoidsetContext(SubscriptionType context) The event type for this subscriptionvoidsetCumulativeMonths(Integer cumulativeMonths) How many months in total has the receiving user been subscribedvoidsetDisplayName(String displayName) The display name for the user that purchased the subscriptionvoidWhether this sub message was caused by a gift subscriptionvoidDeprecated.voidsetMultiMonthDuration(Integer multiMonthDuration) Number of months gifted as part of a single, multi-month giftvoidsetRecipientDisplayName(String recipientDisplayName) voidsetRecipientId(String recipientId) voidsetRecipientUserName(String recipientUserName) voidsetStreakMonths(Integer streakMonths) How many months in a row has the receiving user been subscribedvoidsetSubMessage(CommerceMessage subMessage) The accompanying message when the subscription was sharedvoidsetSubPlan(SubscriptionPlan subPlan) The type of subscription plan that was purchasedvoidsetSubPlanName(String subPlanName) The name of the subscription plan that was purchasedvoidsetTimestamp(Instant timestamp) RFC 3339 timestamp of when the subscription took placevoidThe id for the user that purchased the subscriptionvoidsetUserName(String userName) The login name for the user that purchased the subscriptiontoString()
-
Constructor Details
-
SubscriptionData
public SubscriptionData()
-
-
Method Details
-
getRecipientId
The id of the user that received the subscription- Returns:
- the recipient id
-
getRecipientUserName
The login name of the user that received the subscription- Returns:
- the recipient name
-
getRecipientDisplayName
The display name of the user that received the subscription- Returns:
- the recipient display name
-
getBenefitEndMonth
- Returns:
- the new month the subscription will end on, in the case of an extendsub (otherwise null).
- See Also:
-
- Twitch Announcement (but not present in the official documentation)
-
getTime
Deprecated.in favor of getTimestamp()- Returns:
- RFC 3339 timestamp of when the subscription took place
-
getUserName
The login name for the user that purchased the subscription -
getDisplayName
The display name for the user that purchased the subscription -
getChannelName
The name of the channel where the subscription took place -
getUserId
The id for the user that purchased the subscription -
getChannelId
The id of the channel where the subscription took place -
getTimestamp
RFC 3339 timestamp of when the subscription took place -
getSubPlan
The type of subscription plan that was purchased -
getSubPlanName
The name of the subscription plan that was purchased -
getMonths
Deprecated.The number of months the receiving user been subscribed- See Also:
-
getCumulativeMonths
How many months in total has the receiving user been subscribed -
getStreakMonths
How many months in a row has the receiving user been subscribed -
getContext
The event type for this subscription -
getIsGift
Whether this sub message was caused by a gift subscription -
getMultiMonthDuration
Number of months gifted as part of a single, multi-month gift -
getSubMessage
The accompanying message when the subscription was shared -
setUserName
The login name for the user that purchased the subscription -
setDisplayName
The display name for the user that purchased the subscription -
setChannelName
The name of the channel where the subscription took place -
setUserId
The id for the user that purchased the subscription -
setChannelId
The id of the channel where the subscription took place -
setTimestamp
RFC 3339 timestamp of when the subscription took place -
setSubPlan
The type of subscription plan that was purchased -
setSubPlanName
The name of the subscription plan that was purchased -
setMonths
Deprecated.The number of months the receiving user been subscribed- See Also:
-
setCumulativeMonths
How many months in total has the receiving user been subscribed -
setStreakMonths
How many months in a row has the receiving user been subscribed -
setContext
The event type for this subscription -
setIsGift
Whether this sub message was caused by a gift subscription -
setMultiMonthDuration
Number of months gifted as part of a single, multi-month gift -
setSubMessage
The accompanying message when the subscription was shared -
setBenefitEndMonth
-
setRecipientId
-
setRecipientUserName
-
setRecipientDisplayName
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-