Package com.github.twitch4j.helix.domain
Class CustomReward
java.lang.Object
com.github.twitch4j.helix.domain.CustomReward
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
-
Constructor Summary
ConstructorDescriptionCustomReward
(String broadcasterId, String broadcasterLogin, String broadcasterName, String id, String title, String prompt, Integer cost, Reward.Image image, Reward.Image defaultImage, Boolean isEnabled, String backgroundColor, Boolean isUserInputRequired, CustomReward.MaxPerStreamSetting maxPerStreamSetting, CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting, CustomReward.GlobalCooldownSetting globalCooldownSetting, Boolean isPaused, Boolean isInStock, Boolean shouldRedemptionsSkipRequestQueue, @Nullable Integer redemptionsRedeemedCurrentStream, @Nullable Instant cooldownExpiresAt) Creates a newCustomReward
instance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
protected boolean
boolean
Custom background color for the reward.ID of the channel the reward is for.Login of the channel the reward is for.Display name of the channel the reward is for.@Nullable Instant
Timestamp of the cooldown expiration.getCost()
The cost of the reward.Set of default images of 1x, 2x and 4x sizes for the rewardWhether a cooldown is enabled and what the cooldown is.getId()
ID of the reward.getImage()
Set of custom images of 1x, 2x and 4x sizes for the reward.Whether a maximum per stream is enabled and what the maximum is.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.@Nullable Integer
The number of redemptions redeemed during the current live stream.Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status.getTitle()
The title of the reward.int
hashCode()
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.isPaused()
Whether the reward is currently paused; if true viewers can’t redeem.Does the user need to enter information when redeeming the reward.toString()
withBackgroundColor
(String backgroundColor) Custom background color for the reward.withBroadcasterId
(String broadcasterId) ID of the channel the reward is for.withBroadcasterLogin
(String broadcasterLogin) Login of the channel the reward is for.withBroadcasterName
(String broadcasterName) Display name of the channel the reward is for.withCooldownExpiresAt
(@Nullable Instant cooldownExpiresAt) Timestamp of the cooldown expiration.The cost of the reward.withDefaultImage
(Reward.Image defaultImage) Set of default images of 1x, 2x and 4x sizes for the rewardwithGlobalCooldownSetting
(CustomReward.GlobalCooldownSetting globalCooldownSetting) Whether a cooldown is enabled and what the cooldown is.ID of the reward.withImage
(Reward.Image image) Set of custom images of 1x, 2x and 4x sizes for the reward.withIsEnabled
(Boolean isEnabled) Whether the reward currently enabled; if false the reward won’t show up to viewers.withIsInStock
(Boolean isInStock) Whether the reward is currently in stock; if false viewers can’t redeem.withIsPaused
(Boolean isPaused) Whether the reward is currently paused; if true viewers can’t redeem.withIsUserInputRequired
(Boolean isUserInputRequired) Does the user need to enter information when redeeming the reward.withMaxPerStreamSetting
(CustomReward.MaxPerStreamSetting maxPerStreamSetting) Whether a maximum per stream is enabled and what the maximum is.withMaxPerUserPerStreamSetting
(CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting) Whether a maximum per user per stream is enabled and what the maximum is.withPrompt
(String prompt) The prompt for the viewer when they are redeeming the reward.withRedemptionsRedeemedCurrentStream
(@Nullable Integer redemptionsRedeemedCurrentStream) The number of redemptions redeemed during the current live stream.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.The title of the reward.
-
Constructor Details
-
CustomReward
public CustomReward() -
CustomReward
public CustomReward(String broadcasterId, String broadcasterLogin, String broadcasterName, String id, String title, String prompt, Integer cost, @Nullable Reward.Image image, Reward.Image defaultImage, Boolean isEnabled, String backgroundColor, Boolean isUserInputRequired, CustomReward.MaxPerStreamSetting maxPerStreamSetting, CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting, CustomReward.GlobalCooldownSetting globalCooldownSetting, Boolean isPaused, Boolean isInStock, Boolean shouldRedemptionsSkipRequestQueue, @Nullable @Nullable Integer redemptionsRedeemedCurrentStream, @Nullable @Nullable Instant cooldownExpiresAt) Creates a newCustomReward
instance.- Parameters:
broadcasterId
- ID of the channel the reward is for.broadcasterLogin
- Login of the channel the reward is for.broadcasterName
- Display name of the channel the reward is for.id
- ID of the reward.title
- The title of the reward.prompt
- The prompt for the viewer when they are redeeming the reward.cost
- The cost of the reward.image
- Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded.defaultImage
- Set of default images of 1x, 2x and 4x sizes for the rewardisEnabled
- Whether the reward currently enabled; if false the reward won’t show up to viewers. Default: true.backgroundColor
- Custom background color for the reward.Format: Hex with # prefix, ideally in ALL CAPS.
isUserInputRequired
- Does the user need to enter information when redeeming the reward. Default: false.maxPerStreamSetting
- Whether a maximum per stream is enabled and what the maximum is.maxPerUserPerStreamSetting
- Whether a maximum per user per stream is enabled and what the maximum is.globalCooldownSetting
- Whether a cooldown is enabled and what the cooldown is.isPaused
- Whether the reward is currently paused; if true viewers can’t redeem.isInStock
- Whether the reward is currently in stock; if false viewers can’t redeem.shouldRedemptionsSkipRequestQueue
- Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status.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.cooldownExpiresAt
- Timestamp of the cooldown expiration. Null if the reward isn’t on cooldown.
-
-
Method Details
-
builder
-
toBuilder
-
getBroadcasterId
ID of the channel the reward is for. -
getBroadcasterLogin
Login of the channel the reward is for. -
getBroadcasterName
Display name of the channel the reward is for. -
getId
ID of the reward. -
getTitle
The title of the reward. -
getPrompt
The prompt for the viewer when they are redeeming the reward. -
getCost
The cost of the reward. -
getImage
Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded. -
getDefaultImage
Set of default images of 1x, 2x and 4x sizes for the reward -
isEnabled
Whether the reward currently enabled; if false the reward won’t show up to viewers. Default: true. -
getBackgroundColor
Custom background color for the reward.Format: Hex with # prefix, ideally in ALL CAPS.
-
isUserInputRequired
Does the user need to enter information when redeeming the reward. Default: false. -
getMaxPerStreamSetting
Whether a maximum per stream is enabled and what the maximum is. -
getMaxPerUserPerStreamSetting
Whether a maximum per user per stream is enabled and what the maximum is. -
getGlobalCooldownSetting
Whether a cooldown is enabled and what the cooldown is. -
isPaused
Whether the reward is currently paused; if true viewers can’t redeem. -
isInStock
Whether the reward is currently in stock; if false viewers can’t redeem. -
getShouldRedemptionsSkipRequestQueue
Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status. -
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
Timestamp of the cooldown expiration. Null if the reward isn’t on cooldown. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withBroadcasterId
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
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
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
ID of the reward.- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withTitle
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
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
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
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
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
Whether the reward currently enabled; if false the reward won’t show up to viewers. Default: true.- Returns:
this
.
-
withBackgroundColor
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
Does the user need to enter information when redeeming the reward. Default: false.- Returns:
this
.
-
withMaxPerStreamSetting
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
Whether the reward is currently paused; if true viewers can’t redeem.- Returns:
this
.
-
withIsInStock
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
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).
-