Class SubscriptionData

java.lang.Object
com.github.twitch4j.pubsub.domain.SubscriptionData

public class SubscriptionData extends Object
  • Constructor Details

    • SubscriptionData

      public SubscriptionData()
  • Method Details

    • getRecipientId

      public String getRecipientId()
      The id of the user that received the subscription
      Returns:
      the recipient id
    • getRecipientUserName

      public String getRecipientUserName()
      The login name of the user that received the subscription
      Returns:
      the recipient name
    • getRecipientDisplayName

      public String getRecipientDisplayName()
      The display name of the user that received the subscription
      Returns:
      the recipient display name
    • getBenefitEndMonth

      public Month getBenefitEndMonth()
      Returns:
      the new month the subscription will end on, in the case of an extendsub (otherwise null).
      See Also:
    • getTime

      @Deprecated public String getTime()
      Deprecated.
      in favor of getTimestamp()
      Returns:
      RFC 3339 timestamp of when the subscription took place
    • getUserName

      public String getUserName()
      The login name for the user that purchased the subscription
    • getDisplayName

      public String getDisplayName()
      The display name for the user that purchased the subscription
    • getChannelName

      public String getChannelName()
      The name of the channel where the subscription took place
    • getUserId

      public String getUserId()
      The id for the user that purchased the subscription
    • getChannelId

      public String getChannelId()
      The id of the channel where the subscription took place
    • getTimestamp

      public Instant getTimestamp()
      RFC 3339 timestamp of when the subscription took place
    • getSubPlan

      public SubscriptionPlan getSubPlan()
      The type of subscription plan that was purchased
    • getSubPlanName

      public String getSubPlanName()
      The name of the subscription plan that was purchased
    • getCumulativeMonths

      public Integer getCumulativeMonths()
      How many months in total has the receiving user been subscribed
    • getStreakMonths

      public Integer getStreakMonths()
      How many months in a row has the receiving user been subscribed
    • getContext

      public SubscriptionType getContext()
      The event type for this subscription
    • getIsGift

      public Boolean getIsGift()
      Whether this sub message was caused by a gift subscription
    • getMultiMonthDuration

      public Integer getMultiMonthDuration()
      Number of months gifted as part of a single, multi-month gift
    • getSubMessage

      public CommerceMessage getSubMessage()
      The accompanying message when the subscription was shared
    • 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
    • setUserName

      @Deprecated public void setUserName(String userName)
      Deprecated.
      The login name for the user that purchased the subscription
    • setDisplayName

      @Deprecated public void setDisplayName(String displayName)
      Deprecated.
      The display name for the user that purchased the subscription
    • setChannelName

      @Deprecated public void setChannelName(String channelName)
      Deprecated.
      The name of the channel where the subscription took place
    • setUserId

      @Deprecated public void setUserId(String userId)
      Deprecated.
      The id for the user that purchased the subscription
    • setChannelId

      @Deprecated public void setChannelId(String channelId)
      Deprecated.
      The id of the channel where the subscription took place
    • setTimestamp

      @Deprecated public void setTimestamp(Instant timestamp)
      Deprecated.
      RFC 3339 timestamp of when the subscription took place
    • setSubPlan

      @Deprecated public void setSubPlan(SubscriptionPlan subPlan)
      Deprecated.
      The type of subscription plan that was purchased
    • setSubPlanName

      @Deprecated public void setSubPlanName(String subPlanName)
      Deprecated.
      The name of the subscription plan that was purchased
    • setMonths

      @Deprecated public void setMonths(Integer months)
      Deprecated.
      The number of months the receiving user been subscribed
      See Also:
    • setCumulativeMonths

      @Deprecated public void setCumulativeMonths(Integer cumulativeMonths)
      Deprecated.
      How many months in total has the receiving user been subscribed
    • setStreakMonths

      @Deprecated public void setStreakMonths(Integer streakMonths)
      Deprecated.
      How many months in a row has the receiving user been subscribed
    • setContext

      @Deprecated public void setContext(SubscriptionType context)
      Deprecated.
      The event type for this subscription
    • setIsGift

      @Deprecated public void setIsGift(Boolean isGift)
      Deprecated.
      Whether this sub message was caused by a gift subscription
    • setMultiMonthDuration

      @Deprecated public void setMultiMonthDuration(Integer multiMonthDuration)
      Deprecated.
      Number of months gifted as part of a single, multi-month gift
    • setSubMessage

      @Deprecated public void setSubMessage(CommerceMessage subMessage)
      Deprecated.
      The accompanying message when the subscription was shared
    • setBenefitEndMonth

      @Deprecated public void setBenefitEndMonth(Integer benefitEndMonth)
      Deprecated.
    • setRecipientId

      @Deprecated public void setRecipientId(String recipientId)
      Deprecated.
    • setRecipientUserName

      @Deprecated public void setRecipientUserName(String recipientUserName)
      Deprecated.
    • setRecipientDisplayName

      @Deprecated public void setRecipientDisplayName(String recipientDisplayName)
      Deprecated.
    • getMonths

      @Deprecated public Integer getMonths()
      Deprecated.
      The number of months the receiving user been subscribed
      See Also: