Class Resubscription

java.lang.Object
com.github.twitch4j.eventsub.domain.chat.Resubscription

public class Resubscription extends Object
  • Constructor Details

    • Resubscription

      public Resubscription()
  • Method Details

    • getDurationMonths

      public int getDurationMonths()
      Returns:
      the number of months the subscription is for.
    • getCumulativeMonths

      public Integer getCumulativeMonths()
      The total number of months the user has subscribed.
    • getStreakMonths

      @Nullable public @Nullable Integer getStreakMonths()
      Optional: The number of consecutive months the user has subscribed.
    • getSubTier

      public SubscriptionPlan getSubTier()
      The type of subscription plan being used.

      Does not contain SubscriptionPlan.TWITCH_PRIME; use isPrime() instead.

    • isPrime

      public Boolean isPrime()
      Indicates if the subscription was obtained through Amazon Prime.
    • isGift

      public Boolean isGift()
      Whether or not the resub was a result of a gift.
    • isGifterAnonymous

      @Nullable public @Nullable Boolean isGifterAnonymous()
      Optional: Whether or not the gift was anonymous.
    • getGifterUserId

      @Nullable public @Nullable String getGifterUserId()
      Optional: The user ID of the subscription gifter. Null if anonymous.
    • getGifterUserName

      @Nullable public @Nullable String getGifterUserName()
      Optional: The user name of the subscription gifter. Null if anonymous.
    • getGifterUserLogin

      @Nullable public @Nullable String getGifterUserLogin()
      Optional: The user login of the subscription gifter. Null if anonymous.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object