Class SendInvitationsApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.invitation.request.SendInvitationsApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
Zulip API request builder for sending user invitations.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSendInvitationsApiRequest(ZulipHttpClient client, List<String> inviteeEmails, List<Long> streamIds) Constructs aSendInvitationsApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the Zulip API request for sending user invitations.inviteExpiresInMinutes(int minutes) Sets the number of minutes before the invitation will expire.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.withNotifyReferrerOnJoin(boolean notifyReferrerOnJoin) Sets whether the referrer would like to receive a direct message from notification bot when a user account is created.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString
-
Field Details
-
INCLUDE_REALM_DEFAULT_SUBSCRIPTIONS
- See Also:
-
INVITEE_EMAILS
- See Also:
-
INVITE_AS
- See Also:
-
INVITE_EXPIRES_IN_MINUTES
- See Also:
-
NOTIFIY_REFERRER_ON_JOIN
- See Also:
-
STREAM_IDS
- See Also:
-
-
Constructor Details
-
SendInvitationsApiRequest
public SendInvitationsApiRequest(ZulipHttpClient client, List<String> inviteeEmails, List<Long> streamIds) Constructs aSendInvitationsApiRequest.- Parameters:
client- The Zulip HTTP clientinviteeEmails- The list of email addresses to invitestreamIds- The list of channel ids that the newly created user will be automatically subscribed to
-
-
Method Details
-
withIncludeRealmDefaultSubscriptions
public SendInvitationsApiRequest 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. Whenfalsethe user is not subscribed to any default channels.- Returns:
- This
SendInvitationsApiRequestinstance - See Also:
-
withInviteAs
Sets the organization level role of the user that is created when the invitation is accepted.- Parameters:
role- TheUserRolethat should apply to the new user- Returns:
- This
SendInvitationsApiRequestinstance - 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
SendInvitationsApiRequestinstance - See Also:
-
withNotifyReferrerOnJoin
Sets whether the referrer would like to receive a direct message from notification bot when a user account is created.- Parameters:
notifyReferrerOnJoin- Whentruethe referrer will receive a direct message from notification bot when a user account is created. Whenfalseno notification is sent- Returns:
- This
SendInvitationsApiRequestinstance - See Also:
-
execute
Executes the Zulip API request for sending user invitations.- Specified by:
executein interfaceVoidExecutableApiRequest- Throws:
ZulipClientException- if the request was not successful
-