Class InviteRequest
Describes the invite to mint. Immutable; build one with create().
InviteRequest request = InviteRequest.create()
.campaign("spring")
.channel("whatsapp")
.title("Join me")
.description("I am using this and thought of you.")
.payload("room-42")
.build();
title, description and imageUrl drive the preview card the link
service renders, which is what makes a shared link look like an invitation
in a messaging application rather than a bare address.
InviteRequest.Builder.build() validates and throws IllegalArgumentException naming the
offending field, so a mistake surfaces at the call you can see rather than
as a silently dropped value later.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe longest acceptedInviteRequest.Builder.description.static final intThe longest acceptedInviteRequest.Builder.payload.static final intThe longest acceptedInviteRequest.Builder.title.static final intThe longest acceptedInviteRequest.Builder.campaignorInviteRequest.Builder.channel. -
Method Summary
Modifier and TypeMethodDescriptionstatic InviteRequest.Buildercreate()Starts building a request.The campaign, or null.The channel, or null.The preview card description, or null.The preview card image address, or null.The custom parameters carried to the invited device.The application defined payload, or null.getTitle()The preview card title, or null.
-
Field Details
-
MAX_PAYLOAD_LENGTH
public static final int MAX_PAYLOAD_LENGTHThe longest acceptedInviteRequest.Builder.payload.- See Also:
-
MAX_TITLE_LENGTH
public static final int MAX_TITLE_LENGTHThe longest acceptedInviteRequest.Builder.title.- See Also:
-
MAX_DESCRIPTION_LENGTH
public static final int MAX_DESCRIPTION_LENGTHThe longest acceptedInviteRequest.Builder.description.- See Also:
-
MAX_TOKEN_LENGTH
public static final int MAX_TOKEN_LENGTHThe longest acceptedInviteRequest.Builder.campaignorInviteRequest.Builder.channel.- See Also:
-
-
Method Details
-
create
Starts building a request.
Returns
a new builder
-
getCampaign
The campaign, or null.
Returns
the campaign
-
getChannel
The channel, or null.
Returns
the channel
-
getPayload
The application defined payload, or null.
Returns
the payload
-
getTitle
The preview card title, or null.
Returns
the title
-
getDescription
The preview card description, or null.
Returns
the description
-
getImageUrl
The preview card image address, or null.
Returns
the image address
-
getParameters
-