Package com.github.twitch4j.helix.domain
Class CustomReward.CustomRewardBuilder
java.lang.Object
com.github.twitch4j.helix.domain.CustomReward.CustomRewardBuilder
- Enclosing class:
- CustomReward
-
Method Summary
Modifier and TypeMethodDescriptionbackgroundColor
(String backgroundColor) Custom background color for the reward.broadcasterId
(String broadcasterId) ID of the channel the reward is for.broadcasterLogin
(String broadcasterLogin) Login of the channel the reward is for.broadcasterName
(String broadcasterName) Display name of the channel the reward is for.build()
cooldownExpiresAt
(@Nullable Instant cooldownExpiresAt) Timestamp of the cooldown expiration.The cost of the reward.defaultImage
(Reward.Image defaultImage) Set of default images of 1x, 2x and 4x sizes for the rewardglobalCooldownSetting
(CustomReward.GlobalCooldownSetting globalCooldownSetting) Whether a cooldown is enabled and what the cooldown is.ID of the reward.image
(Reward.Image image) Set of custom images of 1x, 2x and 4x sizes for the reward.Whether the reward currently enabled; if false the reward won’t show up to viewers.Whether the reward is currently in stock; if false viewers can’t redeem.Whether the reward is currently paused; if true viewers can’t redeem.isUserInputRequired
(Boolean isUserInputRequired) Does the user need to enter information when redeeming the reward.maxPerStreamSetting
(CustomReward.MaxPerStreamSetting maxPerStreamSetting) Whether a maximum per stream is enabled and what the maximum is.maxPerUserPerStreamSetting
(CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting) Whether a maximum per user per stream is enabled and what the maximum is.The prompt for the viewer when they are redeeming the reward.redemptionsRedeemedCurrentStream
(@Nullable Integer redemptionsRedeemedCurrentStream) The number of redemptions redeemed during the current live stream.shouldRedemptionsSkipRequestQueue
(Boolean shouldRedemptionsSkipRequestQueue) Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status.The title of the reward.toString()
-
Method Details
-
broadcasterId
ID of the channel the reward is for.- Returns:
this
.
-
broadcasterLogin
Login of the channel the reward is for.- Returns:
this
.
-
broadcasterName
Display name of the channel the reward is for.- Returns:
this
.
-
id
ID of the reward.- Returns:
this
.
-
title
The title of the reward.- Returns:
this
.
-
prompt
The prompt for the viewer when they are redeeming the reward.- Returns:
this
.
-
cost
The cost of the reward.- Returns:
this
.
-
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
Set of default images of 1x, 2x and 4x sizes for the reward- Returns:
this
.
-
isEnabled
Whether the reward currently enabled; if false the reward won’t show up to viewers. Default: true.- Returns:
this
.
-
backgroundColor
Custom background color for the reward.Format: Hex with # prefix, ideally in ALL CAPS.
- Returns:
this
.
-
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
Whether the reward is currently paused; if true viewers can’t redeem.- Returns:
this
.
-
isInStock
Whether the reward is currently in stock; if false viewers can’t redeem.- Returns:
this
.
-
shouldRedemptionsSkipRequestQueue
public CustomReward.CustomRewardBuilder shouldRedemptionsSkipRequestQueue(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 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 Instant cooldownExpiresAt) Timestamp of the cooldown expiration. Null if the reward isn’t on cooldown.- Returns:
this
.
-
build
-
toString
-