Package com.github.twitch4j.helix.domain
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 Summary
Modifier and Type Method Description CustomReward.CustomRewardBuilderbackgroundColor(java.lang.String backgroundColor)Custom background color for the reward.CustomReward.CustomRewardBuilderbroadcasterId(java.lang.String broadcasterId)ID of the channel the reward is for.CustomReward.CustomRewardBuilderbroadcasterLogin(java.lang.String broadcasterLogin)Login of the channel the reward is for.CustomReward.CustomRewardBuilderbroadcasterName(java.lang.String broadcasterName)Display name of the channel the reward is for.CustomRewardbuild()CustomReward.CustomRewardBuildercooldownExpiresAt(@Nullable java.time.Instant cooldownExpiresAt)Timestamp of the cooldown expiration.CustomReward.CustomRewardBuildercost(java.lang.Integer cost)The cost of the reward.CustomReward.CustomRewardBuilderdefaultImage(com.github.twitch4j.eventsub.domain.Reward.Image defaultImage)Set of default images of 1x, 2x and 4x sizes for the rewardCustomReward.CustomRewardBuilderglobalCooldownSetting(CustomReward.GlobalCooldownSetting globalCooldownSetting)Whether a cooldown is enabled and what the cooldown is.CustomReward.CustomRewardBuilderid(java.lang.String id)ID of the reward.CustomReward.CustomRewardBuilderimage(com.github.twitch4j.eventsub.domain.Reward.Image image)Set of custom images of 1x, 2x and 4x sizes for the reward.CustomReward.CustomRewardBuilderisEnabled(java.lang.Boolean isEnabled)Whether the reward currently enabled; if false the reward won’t show up to viewers.CustomReward.CustomRewardBuilderisInStock(java.lang.Boolean isInStock)Whether the reward is currently in stock; if false viewers can’t redeem.CustomReward.CustomRewardBuilderisPaused(java.lang.Boolean isPaused)Whether the reward is currently paused; if true viewers can’t redeem.CustomReward.CustomRewardBuilderisUserInputRequired(java.lang.Boolean isUserInputRequired)Does the user need to enter information when redeeming the reward.CustomReward.CustomRewardBuildermaxPerStreamSetting(CustomReward.MaxPerStreamSetting maxPerStreamSetting)Whether a maximum per stream is enabled and what the maximum is.CustomReward.CustomRewardBuildermaxPerUserPerStreamSetting(CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting)Whether a maximum per user per stream is enabled and what the maximum is.CustomReward.CustomRewardBuilderprompt(java.lang.String prompt)The prompt for the viewer when they are redeeming the reward.CustomReward.CustomRewardBuilderredemptionsRedeemedCurrentStream(@Nullable java.lang.Integer redemptionsRedeemedCurrentStream)The number of redemptions redeemed during the current live stream.CustomReward.CustomRewardBuildershouldRedemptionsSkipRequestQueue(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.CustomReward.CustomRewardBuildertitle(java.lang.String title)The title of the reward.java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
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
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(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
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-