com.unblu.webapi.jersey.v4.api.InvitationsApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jersey3-client-v4 Show documentation
Show all versions of jersey3-client-v4 Show documentation
Client implemented using Jersey
package com.unblu.webapi.jersey.v4.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.unblu.webapi.jersey.v4.invoker.ApiClient;
import com.unblu.webapi.jersey.v4.invoker.ApiException;
import com.unblu.webapi.jersey.v4.invoker.ApiResponse;
import com.unblu.webapi.jersey.v4.invoker.Configuration;
import com.unblu.webapi.jersey.v4.invoker.Pair;
import com.unblu.webapi.model.v4.AcceptLinkData;
import com.unblu.webapi.model.v4.ConversationInvitationData;
import com.unblu.webapi.model.v4.ConversationInvitationQuery;
import com.unblu.webapi.model.v4.ConversationInvitationResult;
import com.unblu.webapi.model.v4.InvitationsAddSecondaryInvitationTargetBody;
import com.unblu.webapi.model.v4.InvitationsCancelSecondaryInvitationTargetBody;
import com.unblu.webapi.model.v4.InvitationsForwardConversationToAgentBody;
import com.unblu.webapi.model.v4.InvitationsForwardConversationToTeamBody;
import com.unblu.webapi.model.v4.InvitationsGetAcceptLinkBody;
import com.unblu.webapi.model.v4.InvitationsInviteAgentToConversationBody;
import com.unblu.webapi.model.v4.InvitationsInviteAnonymousVisitorToConversationWithEmailBody;
import com.unblu.webapi.model.v4.InvitationsInviteAnonymousVisitorToConversationWithLinkBody;
import com.unblu.webapi.model.v4.InvitationsInviteAnonymousVisitorToConversationWithPinBody;
import com.unblu.webapi.model.v4.InvitationsInviteTeamToConversationBody;
import com.unblu.webapi.model.v4.InvitationsRequeueConversationBody;
import jakarta.ws.rs.core.GenericType;
public class InvitationsApi {
private ApiClient apiClient;
public InvitationsApi() {
this(Configuration.getDefaultApiClient());
}
public InvitationsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* addSecondaryInvitationTarget Add a secondary invitation target to the given invitation. This target agent is informed additionally to the main target agent
* and can accept the invitation in their place. <ul> <li>The endpoint may only be called for conversation requests directed at a specific agent.
* <li>The secondary target must be different from the main target of the invitation. <li>Each secondary invitation target may only added to an
* invitation to a particular conversation once. The same secondary invitation target can, however, be added to invitations to multiple conversations.
* </ul> If any of these prerequisites are violated, the call to the endpoint returns an error response code. To cancel a secondary invitation,
* see`cancelSecondaryInvitationTarget`<br>
*
* @param invitationId The invitation that the secondary target should be added to (required)
* @param invitationsAddSecondaryInvitationTargetBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsAddSecondaryInvitationTarget(String invitationId, InvitationsAddSecondaryInvitationTargetBody invitationsAddSecondaryInvitationTargetBody) throws ApiException {
return invitationsAddSecondaryInvitationTargetWithHttpInfo(invitationId, invitationsAddSecondaryInvitationTargetBody).getData();
}
/**
* addSecondaryInvitationTarget Add a secondary invitation target to the given invitation. This target agent is informed additionally to the main target agent
* and can accept the invitation in their place. <ul> <li>The endpoint may only be called for conversation requests directed at a specific agent.
* <li>The secondary target must be different from the main target of the invitation. <li>Each secondary invitation target may only added to an
* invitation to a particular conversation once. The same secondary invitation target can, however, be added to invitations to multiple conversations.
* </ul> If any of these prerequisites are violated, the call to the endpoint returns an error response code. To cancel a secondary invitation,
* see`cancelSecondaryInvitationTarget`<br>
*
* @param invitationId The invitation that the secondary target should be added to (required)
* @param invitationsAddSecondaryInvitationTargetBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsAddSecondaryInvitationTargetWithHttpInfo(String invitationId, InvitationsAddSecondaryInvitationTargetBody invitationsAddSecondaryInvitationTargetBody) throws ApiException {
Object localVarPostBody = invitationsAddSecondaryInvitationTargetBody;
// verify the required parameter 'invitationId' is set
if (invitationId == null) {
throw new ApiException(400, "Missing the required parameter 'invitationId' when calling invitationsAddSecondaryInvitationTarget");
}
// verify the required parameter 'invitationsAddSecondaryInvitationTargetBody' is set
if (invitationsAddSecondaryInvitationTargetBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsAddSecondaryInvitationTargetBody' when calling invitationsAddSecondaryInvitationTarget");
}
// create path and map variables
String localVarPath = "/invitations/{invitationId}/addSecondaryInvitationTarget"
.replaceAll("\\{" + "invitationId" + "\\}", apiClient.escapeString(invitationId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* cancelSecondaryInvitationTarget Cancels the invitation sent to a secondary target. The secondary target agent will no longer be able to accept the
* invitation.<br> See also `addSecondaryInvitationTarget`<br>
*
* @param invitationId The invitation the secondary target belongs to (required)
* @param invitationsCancelSecondaryInvitationTargetBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsCancelSecondaryInvitationTarget(String invitationId, InvitationsCancelSecondaryInvitationTargetBody invitationsCancelSecondaryInvitationTargetBody) throws ApiException {
return invitationsCancelSecondaryInvitationTargetWithHttpInfo(invitationId, invitationsCancelSecondaryInvitationTargetBody).getData();
}
/**
* cancelSecondaryInvitationTarget Cancels the invitation sent to a secondary target. The secondary target agent will no longer be able to accept the
* invitation.<br> See also `addSecondaryInvitationTarget`<br>
*
* @param invitationId The invitation the secondary target belongs to (required)
* @param invitationsCancelSecondaryInvitationTargetBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsCancelSecondaryInvitationTargetWithHttpInfo(String invitationId, InvitationsCancelSecondaryInvitationTargetBody invitationsCancelSecondaryInvitationTargetBody) throws ApiException {
Object localVarPostBody = invitationsCancelSecondaryInvitationTargetBody;
// verify the required parameter 'invitationId' is set
if (invitationId == null) {
throw new ApiException(400, "Missing the required parameter 'invitationId' when calling invitationsCancelSecondaryInvitationTarget");
}
// verify the required parameter 'invitationsCancelSecondaryInvitationTargetBody' is set
if (invitationsCancelSecondaryInvitationTargetBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsCancelSecondaryInvitationTargetBody' when calling invitationsCancelSecondaryInvitationTarget");
}
// create path and map variables
String localVarPath = "/invitations/{invitationId}/cancelSecondaryInvitationTarget"
.replaceAll("\\{" + "invitationId" + "\\}", apiClient.escapeString(invitationId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* forwardConversationToAgent Forwards a conversation to an agent. The current assigned agent stays in the conversation until the invitation is accepted. Once
* the invited agent accepts the invitation, they join the conversation as the assigned agent, and the previous assigned agent is removed from the conversation.
* <p> If there is already a forwarding invitation for the conversation, that invitation is revoked.<br> If the conversation is in the queue, the
* assignment request invitation is revoked.<br>
*
* @param invitationsForwardConversationToAgentBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsForwardConversationToAgent(InvitationsForwardConversationToAgentBody invitationsForwardConversationToAgentBody) throws ApiException {
return invitationsForwardConversationToAgentWithHttpInfo(invitationsForwardConversationToAgentBody).getData();
}
/**
* forwardConversationToAgent Forwards a conversation to an agent. The current assigned agent stays in the conversation until the invitation is accepted. Once
* the invited agent accepts the invitation, they join the conversation as the assigned agent, and the previous assigned agent is removed from the conversation.
* <p> If there is already a forwarding invitation for the conversation, that invitation is revoked.<br> If the conversation is in the queue, the
* assignment request invitation is revoked.<br>
*
* @param invitationsForwardConversationToAgentBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsForwardConversationToAgentWithHttpInfo(InvitationsForwardConversationToAgentBody invitationsForwardConversationToAgentBody) throws ApiException {
Object localVarPostBody = invitationsForwardConversationToAgentBody;
// verify the required parameter 'invitationsForwardConversationToAgentBody' is set
if (invitationsForwardConversationToAgentBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsForwardConversationToAgentBody' when calling invitationsForwardConversationToAgent");
}
// create path and map variables
String localVarPath = "/invitations/forwardConversationToAgent";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* forwardConversationToTeam Forwards a conversation to a team. The current assigned agent remains in the conversation until the invitation is accepted. Once an
* agent of the invited team or its parent teams accepts the invitation, they join the conversation as its assigned agent, and the previous assigned agent is
* removed from the conversation. <p> If there is already a forwarding invitation for the conversation, that invitation is revoked.<br> If the
* conversation is in the queue, the assignment request invitation is revoked.<br>
*
* @param invitationsForwardConversationToTeamBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsForwardConversationToTeam(InvitationsForwardConversationToTeamBody invitationsForwardConversationToTeamBody) throws ApiException {
return invitationsForwardConversationToTeamWithHttpInfo(invitationsForwardConversationToTeamBody).getData();
}
/**
* forwardConversationToTeam Forwards a conversation to a team. The current assigned agent remains in the conversation until the invitation is accepted. Once an
* agent of the invited team or its parent teams accepts the invitation, they join the conversation as its assigned agent, and the previous assigned agent is
* removed from the conversation. <p> If there is already a forwarding invitation for the conversation, that invitation is revoked.<br> If the
* conversation is in the queue, the assignment request invitation is revoked.<br>
*
* @param invitationsForwardConversationToTeamBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsForwardConversationToTeamWithHttpInfo(InvitationsForwardConversationToTeamBody invitationsForwardConversationToTeamBody) throws ApiException {
Object localVarPostBody = invitationsForwardConversationToTeamBody;
// verify the required parameter 'invitationsForwardConversationToTeamBody' is set
if (invitationsForwardConversationToTeamBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsForwardConversationToTeamBody' when calling invitationsForwardConversationToTeam");
}
// create path and map variables
String localVarPath = "/invitations/forwardConversationToTeam";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* getAcceptLink Returns link(s) to accept the invitation that the conversation invitation token provided is related to. The token is validated first and the
* endpoint only returns links if the validation is successful. If the token is not valid, no longer redeemable (for example, because it's expired or been
* redeemed by another person), or the rate limit has been reached, the endpoint returns an error.<br> <br> <b>Note:</b> In environments
* where account ingress isn't enabled, you must provide the API key using the <code>apiKey</code> query parameter if this service is called for
* anonymous users. The API key is needed to identify the correct Unblu account.<br>
*
* @param invitationsGetAcceptLinkBody (required)
* @return AcceptLinkData
* @throws ApiException if fails to make API call
*/
public AcceptLinkData invitationsGetAcceptLink(InvitationsGetAcceptLinkBody invitationsGetAcceptLinkBody) throws ApiException {
return invitationsGetAcceptLinkWithHttpInfo(invitationsGetAcceptLinkBody).getData();
}
/**
* getAcceptLink Returns link(s) to accept the invitation that the conversation invitation token provided is related to. The token is validated first and the
* endpoint only returns links if the validation is successful. If the token is not valid, no longer redeemable (for example, because it's expired or been
* redeemed by another person), or the rate limit has been reached, the endpoint returns an error.<br> <br> <b>Note:</b> In environments
* where account ingress isn't enabled, you must provide the API key using the <code>apiKey</code> query parameter if this service is called for
* anonymous users. The API key is needed to identify the correct Unblu account.<br>
*
* @param invitationsGetAcceptLinkBody (required)
* @return ApiResponse<AcceptLinkData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsGetAcceptLinkWithHttpInfo(InvitationsGetAcceptLinkBody invitationsGetAcceptLinkBody) throws ApiException {
Object localVarPostBody = invitationsGetAcceptLinkBody;
// verify the required parameter 'invitationsGetAcceptLinkBody' is set
if (invitationsGetAcceptLinkBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsGetAcceptLinkBody' when calling invitationsGetAcceptLink");
}
// create path and map variables
String localVarPath = "/invitations/getAcceptLink";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* inviteAgentToConversation Creates an invitation to the given conversation for an agent. If the agent accepts the invitation, they join the conversation as a
* secondary agent. If a conflicting invitation already exists, an error is returned.<br>
*
* @param invitationsInviteAgentToConversationBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsInviteAgentToConversation(InvitationsInviteAgentToConversationBody invitationsInviteAgentToConversationBody) throws ApiException {
return invitationsInviteAgentToConversationWithHttpInfo(invitationsInviteAgentToConversationBody).getData();
}
/**
* inviteAgentToConversation Creates an invitation to the given conversation for an agent. If the agent accepts the invitation, they join the conversation as a
* secondary agent. If a conflicting invitation already exists, an error is returned.<br>
*
* @param invitationsInviteAgentToConversationBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsInviteAgentToConversationWithHttpInfo(InvitationsInviteAgentToConversationBody invitationsInviteAgentToConversationBody) throws ApiException {
Object localVarPostBody = invitationsInviteAgentToConversationBody;
// verify the required parameter 'invitationsInviteAgentToConversationBody' is set
if (invitationsInviteAgentToConversationBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsInviteAgentToConversationBody' when calling invitationsInviteAgentToConversation");
}
// create path and map variables
String localVarPath = "/invitations/inviteAgentToConversation";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* inviteAnonymousVisitorToConversationWithEmail Invites a visitor to join a conversation by email. Calling this method sends an email to the email address
* provided containing a link that opens the conversation in the Visitor Desk.<br>
*
* @param invitationsInviteAnonymousVisitorToConversationWithEmailBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsInviteAnonymousVisitorToConversationWithEmail(InvitationsInviteAnonymousVisitorToConversationWithEmailBody invitationsInviteAnonymousVisitorToConversationWithEmailBody) throws ApiException {
return invitationsInviteAnonymousVisitorToConversationWithEmailWithHttpInfo(invitationsInviteAnonymousVisitorToConversationWithEmailBody).getData();
}
/**
* inviteAnonymousVisitorToConversationWithEmail Invites a visitor to join a conversation by email. Calling this method sends an email to the email address
* provided containing a link that opens the conversation in the Visitor Desk.<br>
*
* @param invitationsInviteAnonymousVisitorToConversationWithEmailBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsInviteAnonymousVisitorToConversationWithEmailWithHttpInfo(InvitationsInviteAnonymousVisitorToConversationWithEmailBody invitationsInviteAnonymousVisitorToConversationWithEmailBody) throws ApiException {
Object localVarPostBody = invitationsInviteAnonymousVisitorToConversationWithEmailBody;
// verify the required parameter 'invitationsInviteAnonymousVisitorToConversationWithEmailBody' is set
if (invitationsInviteAnonymousVisitorToConversationWithEmailBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsInviteAnonymousVisitorToConversationWithEmailBody' when calling invitationsInviteAnonymousVisitorToConversationWithEmail");
}
// create path and map variables
String localVarPath = "/invitations/inviteAnonymousVisitorToConversationWithEmail";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* inviteAnonymousVisitorToConversationWithLink Invites a visitor to a join conversation using a link. The returned invitation data contains a link of the type
* \"ACCEPT_IN_VISITOR_DESK\" which can be passed on to the invited visitor.<br>
*
* @param invitationsInviteAnonymousVisitorToConversationWithLinkBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsInviteAnonymousVisitorToConversationWithLink(InvitationsInviteAnonymousVisitorToConversationWithLinkBody invitationsInviteAnonymousVisitorToConversationWithLinkBody) throws ApiException {
return invitationsInviteAnonymousVisitorToConversationWithLinkWithHttpInfo(invitationsInviteAnonymousVisitorToConversationWithLinkBody).getData();
}
/**
* inviteAnonymousVisitorToConversationWithLink Invites a visitor to a join conversation using a link. The returned invitation data contains a link of the type
* \"ACCEPT_IN_VISITOR_DESK\" which can be passed on to the invited visitor.<br>
*
* @param invitationsInviteAnonymousVisitorToConversationWithLinkBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsInviteAnonymousVisitorToConversationWithLinkWithHttpInfo(InvitationsInviteAnonymousVisitorToConversationWithLinkBody invitationsInviteAnonymousVisitorToConversationWithLinkBody) throws ApiException {
Object localVarPostBody = invitationsInviteAnonymousVisitorToConversationWithLinkBody;
// verify the required parameter 'invitationsInviteAnonymousVisitorToConversationWithLinkBody' is set
if (invitationsInviteAnonymousVisitorToConversationWithLinkBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsInviteAnonymousVisitorToConversationWithLinkBody' when calling invitationsInviteAnonymousVisitorToConversationWithLink");
}
// create path and map variables
String localVarPath = "/invitations/inviteAnonymousVisitorToConversationWithLink";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* inviteAnonymousVisitorToConversationWithPin Invites a visitor to join a conversation using a PIN. The PIN can be found in the \"token\" field of
* the returned invitation. It can be redeemed by entering it in the embedded or floating site integration UI.<br>
*
* @param invitationsInviteAnonymousVisitorToConversationWithPinBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsInviteAnonymousVisitorToConversationWithPin(InvitationsInviteAnonymousVisitorToConversationWithPinBody invitationsInviteAnonymousVisitorToConversationWithPinBody) throws ApiException {
return invitationsInviteAnonymousVisitorToConversationWithPinWithHttpInfo(invitationsInviteAnonymousVisitorToConversationWithPinBody).getData();
}
/**
* inviteAnonymousVisitorToConversationWithPin Invites a visitor to join a conversation using a PIN. The PIN can be found in the \"token\" field of
* the returned invitation. It can be redeemed by entering it in the embedded or floating site integration UI.<br>
*
* @param invitationsInviteAnonymousVisitorToConversationWithPinBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsInviteAnonymousVisitorToConversationWithPinWithHttpInfo(InvitationsInviteAnonymousVisitorToConversationWithPinBody invitationsInviteAnonymousVisitorToConversationWithPinBody) throws ApiException {
Object localVarPostBody = invitationsInviteAnonymousVisitorToConversationWithPinBody;
// verify the required parameter 'invitationsInviteAnonymousVisitorToConversationWithPinBody' is set
if (invitationsInviteAnonymousVisitorToConversationWithPinBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsInviteAnonymousVisitorToConversationWithPinBody' when calling invitationsInviteAnonymousVisitorToConversationWithPin");
}
// create path and map variables
String localVarPath = "/invitations/inviteAnonymousVisitorToConversationWithPin";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* inviteTeamToConversation Creates an invitation for a team for the given conversation. The invitation can be redeemed once by any agent in either the invited
* team or one of its parent teams. The agent who redeeems the invitation joins the conversation as a secondary agent. If a conflicting invitation already
* exists, an error is returned.<br>
*
* @param invitationsInviteTeamToConversationBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsInviteTeamToConversation(InvitationsInviteTeamToConversationBody invitationsInviteTeamToConversationBody) throws ApiException {
return invitationsInviteTeamToConversationWithHttpInfo(invitationsInviteTeamToConversationBody).getData();
}
/**
* inviteTeamToConversation Creates an invitation for a team for the given conversation. The invitation can be redeemed once by any agent in either the invited
* team or one of its parent teams. The agent who redeeems the invitation joins the conversation as a secondary agent. If a conflicting invitation already
* exists, an error is returned.<br>
*
* @param invitationsInviteTeamToConversationBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsInviteTeamToConversationWithHttpInfo(InvitationsInviteTeamToConversationBody invitationsInviteTeamToConversationBody) throws ApiException {
Object localVarPostBody = invitationsInviteTeamToConversationBody;
// verify the required parameter 'invitationsInviteTeamToConversationBody' is set
if (invitationsInviteTeamToConversationBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsInviteTeamToConversationBody' when calling invitationsInviteTeamToConversation");
}
// create path and map variables
String localVarPath = "/invitations/inviteTeamToConversation";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* read Returns the invitation with the given ID.<br>
*
* @param invitationId (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsRead(String invitationId) throws ApiException {
return invitationsReadWithHttpInfo(invitationId).getData();
}
/**
* read Returns the invitation with the given ID.<br>
*
* @param invitationId (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsReadWithHttpInfo(String invitationId) throws ApiException {
Object localVarPostBody = new HashMap<>();
// verify the required parameter 'invitationId' is set
if (invitationId == null) {
throw new ApiException(400, "Missing the required parameter 'invitationId' when calling invitationsRead");
}
// create path and map variables
String localVarPath = "/invitations/{invitationId}/read"
.replaceAll("\\{" + "invitationId" + "\\}", apiClient.escapeString(invitationId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* renewPin Renews the PIN of an anonymous visitor PIN invitation. An error is returned if the method is called for any other type of invitation.<br>
*
* @param invitationId Invitation id. (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsRenewPin(String invitationId) throws ApiException {
return invitationsRenewPinWithHttpInfo(invitationId).getData();
}
/**
* renewPin Renews the PIN of an anonymous visitor PIN invitation. An error is returned if the method is called for any other type of invitation.<br>
*
* @param invitationId Invitation id. (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsRenewPinWithHttpInfo(String invitationId) throws ApiException {
Object localVarPostBody = new HashMap<>();
// verify the required parameter 'invitationId' is set
if (invitationId == null) {
throw new ApiException(400, "Missing the required parameter 'invitationId' when calling invitationsRenewPin");
}
// create path and map variables
String localVarPath = "/invitations/{invitationId}/renewPin"
.replaceAll("\\{" + "invitationId" + "\\}", apiClient.escapeString(invitationId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* requeueConversation Return the given conversation to the queue by creating an assignment request invitation.<br> This is only possible for
* conversations that were initiated by the visitor, that is, the conversation's initial engagement type must be a request. <p> Optionally, existing
* agent participants can be removed from the conversation.<br>
*
* @param invitationsRequeueConversationBody (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsRequeueConversation(InvitationsRequeueConversationBody invitationsRequeueConversationBody) throws ApiException {
return invitationsRequeueConversationWithHttpInfo(invitationsRequeueConversationBody).getData();
}
/**
* requeueConversation Return the given conversation to the queue by creating an assignment request invitation.<br> This is only possible for
* conversations that were initiated by the visitor, that is, the conversation's initial engagement type must be a request. <p> Optionally, existing
* agent participants can be removed from the conversation.<br>
*
* @param invitationsRequeueConversationBody (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsRequeueConversationWithHttpInfo(InvitationsRequeueConversationBody invitationsRequeueConversationBody) throws ApiException {
Object localVarPostBody = invitationsRequeueConversationBody;
// verify the required parameter 'invitationsRequeueConversationBody' is set
if (invitationsRequeueConversationBody == null) {
throw new ApiException(400, "Missing the required parameter 'invitationsRequeueConversationBody' when calling invitationsRequeueConversation");
}
// create path and map variables
String localVarPath = "/invitations/requeueConversation";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* revoke Revokes the invitation making it impossible to accept it anymore.<br>
*
* @param invitationId Invitation id. (required)
* @return ConversationInvitationData
* @throws ApiException if fails to make API call
*/
public ConversationInvitationData invitationsRevoke(String invitationId) throws ApiException {
return invitationsRevokeWithHttpInfo(invitationId).getData();
}
/**
* revoke Revokes the invitation making it impossible to accept it anymore.<br>
*
* @param invitationId Invitation id. (required)
* @return ApiResponse<ConversationInvitationData>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsRevokeWithHttpInfo(String invitationId) throws ApiException {
Object localVarPostBody = new HashMap<>();
// verify the required parameter 'invitationId' is set
if (invitationId == null) {
throw new ApiException(400, "Missing the required parameter 'invitationId' when calling invitationsRevoke");
}
// create path and map variables
String localVarPath = "/invitations/{invitationId}/revoke"
.replaceAll("\\{" + "invitationId" + "\\}", apiClient.escapeString(invitationId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* search Search for invitations in the current account<br>
*
* @param conversationInvitationQuery (required)
* @return ConversationInvitationResult
* @throws ApiException if fails to make API call
*/
public ConversationInvitationResult invitationsSearch(ConversationInvitationQuery conversationInvitationQuery) throws ApiException {
return invitationsSearchWithHttpInfo(conversationInvitationQuery).getData();
}
/**
* search Search for invitations in the current account<br>
*
* @param conversationInvitationQuery (required)
* @return ApiResponse<ConversationInvitationResult>
* @throws ApiException if fails to make API call
*/
public ApiResponse invitationsSearchWithHttpInfo(ConversationInvitationQuery conversationInvitationQuery) throws ApiException {
Object localVarPostBody = conversationInvitationQuery;
// verify the required parameter 'conversationInvitationQuery' is set
if (conversationInvitationQuery == null) {
throw new ApiException(400, "Missing the required parameter 'conversationInvitationQuery' when calling invitationsSearch");
}
// create path and map variables
String localVarPath = "/invitations/search";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}