Interface TestEntitlementCreateAction
- All Superinterfaces:
RestAction<Entitlement>
Extension of
RestAction
specifically
designed to create a Entitlement
.
This extension allows setting properties before executing the action.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The type of the owner for the entitlement -
Method Summary
Modifier and TypeMethodDescriptionsetOwnerId
(long ownerId) Set the owner's id to create the entitlement fordefault TestEntitlementCreateAction
setOwnerId
(String ownerId) Set the owner's id to create the entitlement forSet the owner type to create the entitlement forsetSkuId
(long skuId) Set the SKU's id to create the entitlement indefault TestEntitlementCreateAction
Set the SKU's id to create the entitlement inMethods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, deadline, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, setCheck, submit, submit, submitAfter, submitAfter, timeout, zip
-
Method Details
-
setSkuId
Set the SKU's id to create the entitlement in- Parameters:
skuId
- The id of the SKU- Returns:
- The current
TestEntitlementCreateAction
for chaining convenience - Throws:
IllegalArgumentException
- If the provided skuId is not a valid snowflake
-
setSkuId
Set the SKU's id to create the entitlement in- Parameters:
skuId
- The id of the SKU- Returns:
- The current
TestEntitlementCreateAction
for chaining convenience
-
setOwnerId
Set the owner's id to create the entitlement for- Parameters:
ownerId
- The id of the owner - either guild id or user id- Returns:
- The current
TestEntitlementCreateAction
for chaining convenience - Throws:
IllegalArgumentException
- If the provided ownerId is not a valid snowflake
-
setOwnerId
Set the owner's id to create the entitlement for- Parameters:
ownerId
- The id of the owner - either guild id or user id- Returns:
- The current
TestEntitlementCreateAction
for chaining convenience
-
setOwnerType
@CheckReturnValue @Nonnull TestEntitlementCreateAction setOwnerType(@Nonnull TestEntitlementCreateAction.OwnerType type) Set the owner type to create the entitlement for- Parameters:
type
- The type of the owner- Returns:
- The current
TestEntitlementCreateAction
for chaining convenience - Throws:
IllegalArgumentException
- If the provided type is null
-