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
    • getMonths

      @Deprecated public Integer getMonths()
      Deprecated.
      The number of months the receiving user been subscribed
      See Also:
    • 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
    • setUserName

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

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

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

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

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

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

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

      public void setSubPlanName(String subPlanName)
      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

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

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

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

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

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

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

      public void setBenefitEndMonth(Integer benefitEndMonth)
    • setRecipientId

      public void setRecipientId(String recipientId)
    • setRecipientUserName

      public void setRecipientUserName(String recipientUserName)
    • setRecipientDisplayName

      public void setRecipientDisplayName(String recipientDisplayName)
    • 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