Class CreateReusableInvitationLinkApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.invitation.request.CreateReusableInvitationLinkApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<String>
public class CreateReusableInvitationLinkApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<String>
Zulip API request builder for creating a reusable invitation link.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes the Zulip API request for creating a reusable invitation link.inviteExpiresInMinutes
(int minutes) Sets the number of minutes before the invitation will expire.streamIds
(long... streamIds) Sets the list of channel ids that the newly created user will be automatically subscribed to.withGroupIds
(long... groupIds) Sets the ids of groups that the user should be added to upon accepting the invitation.withIncludeRealmDefaultSubscriptions
(boolean includeRealmDefaultSubscriptions) Sets whether the newly created user should be subscribed to the default channels for the organization.withInviteAs
(UserRole role) Sets the organization level role of the user that is created when the invitation is accepted.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
GROUP_IDS
- See Also:
-
INCLUDE_REALM_DEFAULT_SUBSCRIPTIONS
- See Also:
-
INVITE_AS
- See Also:
-
INVITE_EXPIRES_IN_MINUTES
- See Also:
-
STREAM_IDS
- See Also:
-
-
Constructor Details
-
CreateReusableInvitationLinkApiRequest
Constructs aCreateReusableInvitationLinkApiRequest
.- Parameters:
client
- The Zulip HTTP client
-
-
Method Details
-
withGroupIds
Sets the ids of groups that the user should be added to upon accepting the invitation.- Parameters:
groupIds
- The ids of the invited user should be added to- Returns:
- This
CreateReusableInvitationLinkApiRequest
instance - See Also:
-
withIncludeRealmDefaultSubscriptions
public CreateReusableInvitationLinkApiRequest withIncludeRealmDefaultSubscriptions(boolean includeRealmDefaultSubscriptions) Sets whether the newly created user should be subscribed to the default channels for the organization.- Parameters:
includeRealmDefaultSubscriptions
- Whentrue
, the newly created user will be subscribed to the default channels for the organization. Whenfalse
the user is not subscribed to any default channels.- Returns:
- This
CreateReusableInvitationLinkApiRequest
instance - See Also:
-
withInviteAs
Sets the organization level role of the user that is created when the invitation is accepted.- Parameters:
role
- TheUserRole
that should apply to the new user- Returns:
- This
CreateReusableInvitationLinkApiRequest
instance - See Also:
-
inviteExpiresInMinutes
Sets the number of minutes before the invitation will expire.- Parameters:
minutes
- The number of minutes before the invitation will expire- Returns:
- This
CreateReusableInvitationLinkApiRequest
instance - See Also:
-
streamIds
Sets the list of channel ids that the newly created user will be automatically subscribed to.- Parameters:
streamIds
- The ids of channels that the newly created user will be automatically subscribed to- Returns:
- This
CreateReusableInvitationLinkApiRequest
instance - See Also:
-
execute
Executes the Zulip API request for creating a reusable invitation link.- Specified by:
execute
in interfaceExecutableApiRequest<String>
- Returns:
- The generated invitation link URL
- Throws:
ZulipClientException
- if the request was not successful
-