Class ExtendSubscriptionEvent
java.lang.Object
com.github.philippheuer.events4j.core.domain.Event
com.github.twitch4j.chat.events.TwitchEvent
com.github.twitch4j.chat.events.AbstractChannelEvent
com.github.twitch4j.chat.events.channel.ExtendSubscriptionEvent
- All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent
public final class ExtendSubscriptionEvent extends AbstractChannelEvent
Called when a user extends their existing subscription into a future month.
- See Also:
- Official Announcement
-
Constructor Summary
Constructors Constructor Description ExtendSubscriptionEvent(com.github.twitch4j.common.events.domain.EventChannel channel, com.github.twitch4j.common.events.domain.EventUser user, com.github.twitch4j.common.enums.SubscriptionPlan subPlan, int cumulativeMonths, java.time.Month benefitEndMonth)Event Constructor -
Method Summary
Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.time.MonthgetBenefitEndMonth()The new month that the subscription will end on.intgetCumulativeMonths()The total number of months the user has subscribed.com.github.twitch4j.common.enums.SubscriptionPlangetSubPlan()The type of subscription plan being used.com.github.twitch4j.common.events.domain.EventUsergetUser()The user extending their subscription.inthashCode()java.lang.StringtoString()Methods inherited from class com.github.twitch4j.chat.events.AbstractChannelEvent
ban, getChannel, timeout, unbanMethods inherited from class com.github.twitch4j.chat.events.TwitchEvent
getTwitchChatMethods inherited from class com.github.philippheuer.events4j.core.domain.Event
getEventId, getFiredAt, getFiredAtInstant, getServiceMediator, setEventId, setFiredAt, setFiredAtInstant, setServiceMediatorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
ExtendSubscriptionEvent
public ExtendSubscriptionEvent(com.github.twitch4j.common.events.domain.EventChannel channel, com.github.twitch4j.common.events.domain.EventUser user, com.github.twitch4j.common.enums.SubscriptionPlan subPlan, int cumulativeMonths, java.time.Month benefitEndMonth)Event Constructor- Parameters:
channel- The channel that this event originates from.user- The user extending their subscription.subPlan- The type of subscription plan being used.cumulativeMonths- The total number of months the user has subscribed.benefitEndMonth- The new month that the subscription will end on.
-
-
Method Details
-
getUser
public com.github.twitch4j.common.events.domain.EventUser getUser()The user extending their subscription. -
getSubPlan
public com.github.twitch4j.common.enums.SubscriptionPlan getSubPlan()The type of subscription plan being used. -
getCumulativeMonths
public int getCumulativeMonths()The total number of months the user has subscribed. -
getBenefitEndMonth
public java.time.Month getBenefitEndMonth()The new month that the subscription will end on. -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classAbstractChannelEvent
-
canEqual
protected boolean canEqual(java.lang.Object other)- Overrides:
canEqualin classAbstractChannelEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractChannelEvent
-
toString
public java.lang.String toString()- Overrides:
toStringin classAbstractChannelEvent
-