Class CustomReward.CustomRewardBuilder

java.lang.Object
com.github.twitch4j.helix.domain.CustomReward.CustomRewardBuilder
Enclosing class:
CustomReward

public static class CustomReward.CustomRewardBuilder
extends java.lang.Object
  • Method Details

    • broadcasterId

      public CustomReward.CustomRewardBuilder broadcasterId​(java.lang.String broadcasterId)
      ID of the channel the reward is for.
      Returns:
      this.
    • broadcasterLogin

      public CustomReward.CustomRewardBuilder broadcasterLogin​(java.lang.String broadcasterLogin)
      Login of the channel the reward is for.
      Returns:
      this.
    • broadcasterName

      public CustomReward.CustomRewardBuilder broadcasterName​(java.lang.String broadcasterName)
      Display name of the channel the reward is for.
      Returns:
      this.
    • id

      public CustomReward.CustomRewardBuilder id​(java.lang.String id)
      ID of the reward.
      Returns:
      this.
    • title

      public CustomReward.CustomRewardBuilder title​(java.lang.String title)
      The title of the reward.
      Returns:
      this.
    • prompt

      public CustomReward.CustomRewardBuilder prompt​(java.lang.String prompt)
      The prompt for the viewer when they are redeeming the reward.
      Returns:
      this.
    • cost

      public CustomReward.CustomRewardBuilder cost​(java.lang.Integer cost)
      The cost of the reward.
      Returns:
      this.
    • image

      public CustomReward.CustomRewardBuilder image​(@Nullable com.github.twitch4j.eventsub.domain.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:
      this.
    • defaultImage

      public CustomReward.CustomRewardBuilder defaultImage​(com.github.twitch4j.eventsub.domain.Reward.Image defaultImage)
      Set of default images of 1x, 2x and 4x sizes for the reward
      Returns:
      this.
    • isEnabled

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

      public CustomReward.CustomRewardBuilder backgroundColor​(java.lang.String backgroundColor)
      Custom background color for the reward.

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

      Returns:
      this.
    • isUserInputRequired

      public CustomReward.CustomRewardBuilder isUserInputRequired​(java.lang.Boolean isUserInputRequired)
      Does the user need to enter information when redeeming the reward. Default: false.
      Returns:
      this.
    • maxPerStreamSetting

      public CustomReward.CustomRewardBuilder maxPerStreamSetting​(CustomReward.MaxPerStreamSetting maxPerStreamSetting)
      Whether a maximum per stream is enabled and what the maximum is.
      Returns:
      this.
    • maxPerUserPerStreamSetting

      public CustomReward.CustomRewardBuilder maxPerUserPerStreamSetting​(CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting)
      Whether a maximum per user per stream is enabled and what the maximum is.
      Returns:
      this.
    • globalCooldownSetting

      public CustomReward.CustomRewardBuilder globalCooldownSetting​(CustomReward.GlobalCooldownSetting globalCooldownSetting)
      Whether a cooldown is enabled and what the cooldown is.
      Returns:
      this.
    • isPaused

      public CustomReward.CustomRewardBuilder isPaused​(java.lang.Boolean isPaused)
      Whether the reward is currently paused; if true viewers can’t redeem.
      Returns:
      this.
    • isInStock

      public CustomReward.CustomRewardBuilder isInStock​(java.lang.Boolean isInStock)
      Whether the reward is currently in stock; if false viewers can’t redeem.
      Returns:
      this.
    • shouldRedemptionsSkipRequestQueue

      public CustomReward.CustomRewardBuilder shouldRedemptionsSkipRequestQueue​(java.lang.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:
      this.
    • redemptionsRedeemedCurrentStream

      public CustomReward.CustomRewardBuilder redemptionsRedeemedCurrentStream​(@Nullable @Nullable java.lang.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:
      this.
    • cooldownExpiresAt

      public CustomReward.CustomRewardBuilder cooldownExpiresAt​(@Nullable @Nullable java.time.Instant cooldownExpiresAt)
      Timestamp of the cooldown expiration. Null if the reward isn’t on cooldown.
      Returns:
      this.
    • build

      public CustomReward build()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object