Class SubscriptionData
java.lang.Object
com.github.twitch4j.pubsub.domain.SubscriptionData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The 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 subscriptionint
hashCode()
void
setBenefitEndMonth
(Integer benefitEndMonth) void
setChannelId
(String channelId) The id of the channel where the subscription took placevoid
setChannelName
(String channelName) The name of the channel where the subscription took placevoid
setContext
(SubscriptionType context) The event type for this subscriptionvoid
setCumulativeMonths
(Integer cumulativeMonths) How many months in total has the receiving user been subscribedvoid
setDisplayName
(String displayName) The display name for the user that purchased the subscriptionvoid
Whether this sub message was caused by a gift subscriptionvoid
Deprecated.void
setMultiMonthDuration
(Integer multiMonthDuration) Number of months gifted as part of a single, multi-month giftvoid
setRecipientDisplayName
(String recipientDisplayName) void
setRecipientId
(String recipientId) void
setRecipientUserName
(String recipientUserName) void
setStreakMonths
(Integer streakMonths) How many months in a row has the receiving user been subscribedvoid
setSubMessage
(CommerceMessage subMessage) The accompanying message when the subscription was sharedvoid
setSubPlan
(SubscriptionPlan subPlan) The type of subscription plan that was purchasedvoid
setSubPlanName
(String subPlanName) The name of the subscription plan that was purchasedvoid
setTimestamp
(Instant timestamp) RFC 3339 timestamp of when the subscription took placevoid
The id for the user that purchased the subscriptionvoid
setUserName
(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
-