Class CustomReward

java.lang.Object
com.github.twitch4j.helix.domain.CustomReward

public class CustomReward extends Object
  • Constructor Details

  • Method Details

    • builder

      public static CustomReward.CustomRewardBuilder builder()
    • toBuilder

    • getBroadcasterId

      public String getBroadcasterId()
      ID of the channel the reward is for.
    • getBroadcasterLogin

      public String getBroadcasterLogin()
      Login of the channel the reward is for.
    • getBroadcasterName

      public String getBroadcasterName()
      Display name of the channel the reward is for.
    • getId

      public String getId()
      ID of the reward.
    • getTitle

      public String getTitle()
      The title of the reward.
    • getPrompt

      public String getPrompt()
      The prompt for the viewer when they are redeeming the reward.
    • getCost

      public Integer getCost()
      The cost of the reward.
    • getImage

      @Nullable public Reward.Image getImage()
      Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded.
    • getDefaultImage

      public Reward.Image getDefaultImage()
      Set of default images of 1x, 2x and 4x sizes for the reward
    • isEnabled

      public Boolean isEnabled()
      Whether the reward currently enabled; if false the reward won’t show up to viewers. Default: true.
    • getBackgroundColor

      public String getBackgroundColor()
      Custom background color for the reward.

      Format: Hex with # prefix, ideally in ALL CAPS.

    • isUserInputRequired

      public Boolean isUserInputRequired()
      Does the user need to enter information when redeeming the reward. Default: false.
    • getMaxPerStreamSetting

      public CustomReward.MaxPerStreamSetting getMaxPerStreamSetting()
      Whether a maximum per stream is enabled and what the maximum is.
    • getMaxPerUserPerStreamSetting

      public CustomReward.MaxPerUserPerStreamSetting getMaxPerUserPerStreamSetting()
      Whether a maximum per user per stream is enabled and what the maximum is.
    • getGlobalCooldownSetting

      public CustomReward.GlobalCooldownSetting getGlobalCooldownSetting()
      Whether a cooldown is enabled and what the cooldown is.
    • isPaused

      public Boolean isPaused()
      Whether the reward is currently paused; if true viewers can’t redeem.
    • isInStock

      public Boolean isInStock()
      Whether the reward is currently in stock; if false viewers can’t redeem.
    • getShouldRedemptionsSkipRequestQueue

      public Boolean getShouldRedemptionsSkipRequestQueue()
      Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status.
    • getRedemptionsRedeemedCurrentStream

      @Nullable public @Nullable Integer getRedemptionsRedeemedCurrentStream()
      The number of redemptions redeemed during the current live stream. Counts against the max_per_stream_setting limit. Null if the broadcasters stream isn’t live or max_per_stream_setting isn’t enabled.
    • getCooldownExpiresAt

      @Nullable public @Nullable Instant getCooldownExpiresAt()
      Timestamp of the cooldown expiration. Null if the reward isn’t on cooldown.
    • 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
    • withBroadcasterId

      public CustomReward withBroadcasterId(String broadcasterId)
      ID of the channel the reward is for.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withBroadcasterLogin

      public CustomReward withBroadcasterLogin(String broadcasterLogin)
      Login of the channel the reward is for.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withBroadcasterName

      public CustomReward withBroadcasterName(String broadcasterName)
      Display name of the channel the reward is for.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withId

      public CustomReward withId(String id)
      ID of the reward.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withTitle

      public CustomReward withTitle(String title)
      The title of the reward.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withPrompt

      public CustomReward withPrompt(String prompt)
      The prompt for the viewer when they are redeeming the reward.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCost

      public CustomReward withCost(Integer cost)
      The cost of the reward.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withImage

      public CustomReward withImage(@Nullable Reward.Image image)
      Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withDefaultImage

      public CustomReward withDefaultImage(Reward.Image defaultImage)
      Set of default images of 1x, 2x and 4x sizes for the reward
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withIsEnabled

      public CustomReward withIsEnabled(Boolean isEnabled)
      Whether the reward currently enabled; if false the reward won’t show up to viewers. Default: true.
      Returns:
      this.
    • withBackgroundColor

      public CustomReward withBackgroundColor(String backgroundColor)
      Custom background color for the reward.

      Format: Hex with # prefix, ideally in ALL CAPS.

      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withIsUserInputRequired

      public CustomReward withIsUserInputRequired(Boolean isUserInputRequired)
      Does the user need to enter information when redeeming the reward. Default: false.
      Returns:
      this.
    • withMaxPerStreamSetting

      public CustomReward withMaxPerStreamSetting(CustomReward.MaxPerStreamSetting maxPerStreamSetting)
      Whether a maximum per stream is enabled and what the maximum is.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withMaxPerUserPerStreamSetting

      public CustomReward withMaxPerUserPerStreamSetting(CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting)
      Whether a maximum per user per stream is enabled and what the maximum is.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withGlobalCooldownSetting

      public CustomReward withGlobalCooldownSetting(CustomReward.GlobalCooldownSetting globalCooldownSetting)
      Whether a cooldown is enabled and what the cooldown is.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withIsPaused

      public CustomReward withIsPaused(Boolean isPaused)
      Whether the reward is currently paused; if true viewers can’t redeem.
      Returns:
      this.
    • withIsInStock

      public CustomReward withIsInStock(Boolean isInStock)
      Whether the reward is currently in stock; if false viewers can’t redeem.
      Returns:
      this.
    • withShouldRedemptionsSkipRequestQueue

      public CustomReward withShouldRedemptionsSkipRequestQueue(Boolean shouldRedemptionsSkipRequestQueue)
      Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withRedemptionsRedeemedCurrentStream

      public CustomReward withRedemptionsRedeemedCurrentStream(@Nullable @Nullable Integer redemptionsRedeemedCurrentStream)
      The number of redemptions redeemed during the current live stream. Counts against the max_per_stream_setting limit. Null if the broadcasters stream isn’t live or max_per_stream_setting isn’t enabled.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCooldownExpiresAt

      public CustomReward withCooldownExpiresAt(@Nullable @Nullable Instant cooldownExpiresAt)
      Timestamp of the cooldown expiration. Null if the reward isn’t on cooldown.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).