All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hellosign.openapi.api.TeamApi Maven / Gradle / Ivy

package com.hellosign.openapi.api;

import com.hellosign.openapi.ApiException;
import com.hellosign.openapi.ApiClient;
import com.hellosign.openapi.ApiResponse;
import com.hellosign.openapi.Configuration;
import com.hellosign.openapi.Pair;

import javax.ws.rs.core.GenericType;

import com.hellosign.openapi.model.ErrorResponse;
import com.hellosign.openapi.model.TeamAddMemberRequest;
import com.hellosign.openapi.model.TeamCreateRequest;
import com.hellosign.openapi.model.TeamGetInfoResponse;
import com.hellosign.openapi.model.TeamGetResponse;
import com.hellosign.openapi.model.TeamMembersResponse;
import com.hellosign.openapi.model.TeamRemoveMemberRequest;
import com.hellosign.openapi.model.TeamSubTeamsResponse;
import com.hellosign.openapi.model.TeamUpdateRequest;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class TeamApi {
  private ApiClient apiClient;

  public TeamApi() {
    this(Configuration.getDefaultApiClient());
  }

  public TeamApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * Get the API client
   *
   * @return API client
   */
  public ApiClient getApiClient() {
    return apiClient;
  }

  /**
   * Set the API client
   *
   * @param apiClient an instance of API client
   */
  public void setApiClient(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * Add User to Team
   * Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a HelloSign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.
   * @param teamAddMemberRequest  (required)
   * @param teamId The id of the team. (optional)
   * @return TeamGetResponse
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public TeamGetResponse teamAddMember(TeamAddMemberRequest teamAddMemberRequest, String teamId) throws ApiException { return teamAddMemberWithHttpInfo(teamAddMemberRequest, teamId).getData(); } /** * Add User to Team * Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a HelloSign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. * @param teamAddMemberRequest (required) * @param teamId The id of the team. (optional) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse teamAddMemberWithHttpInfo(TeamAddMemberRequest teamAddMemberRequest, String teamId) throws ApiException { Object localVarPostBody = teamAddMemberRequest; // verify the required parameter 'teamAddMemberRequest' is set if (teamAddMemberRequest == null) { throw new ApiException(400, "Missing the required parameter 'teamAddMemberRequest' when calling teamAddMember"); } // create path and map variables String localVarPath = "/team/add_member"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "team_id", teamId)); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; localVarFormParams = teamAddMemberRequest.createFormData(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("TeamApi.teamAddMember", localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * Create Team * Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. * @param teamCreateRequest (required) * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public TeamGetResponse teamCreate(TeamCreateRequest teamCreateRequest) throws ApiException { return teamCreateWithHttpInfo(teamCreateRequest).getData(); } /** * Create Team * Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. * @param teamCreateRequest (required) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse teamCreateWithHttpInfo(TeamCreateRequest teamCreateRequest) throws ApiException { Object localVarPostBody = teamCreateRequest; // verify the required parameter 'teamCreateRequest' is set if (teamCreateRequest == null) { throw new ApiException(400, "Missing the required parameter 'teamCreateRequest' when calling teamCreate"); } // create path and map variables String localVarPath = "/team/create"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; localVarFormParams = teamCreateRequest.createFormData(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("TeamApi.teamCreate", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * Delete Team * Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public void teamDelete() throws ApiException { teamDeleteWithHttpInfo(); } /** * Delete Team * Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse teamDeleteWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/team/destroy"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; localVarFormParams = new HashMap(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key", "oauth2" }; return apiClient.invokeAPI("TeamApi.teamDelete", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null, false); } /** * Get Team * Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public TeamGetResponse teamGet() throws ApiException { return teamGetWithHttpInfo().getData(); } /** * Get Team * Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse teamGetWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/team"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; localVarFormParams = new HashMap(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("TeamApi.teamGet", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * Get Team Info * Provides information about a team. * @param teamId The id of the team. (optional) * @return TeamGetInfoResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public TeamGetInfoResponse teamInfo(String teamId) throws ApiException { return teamInfoWithHttpInfo(teamId).getData(); } /** * Get Team Info * Provides information about a team. * @param teamId The id of the team. (optional) * @return ApiResponse<TeamGetInfoResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse teamInfoWithHttpInfo(String teamId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/team/info"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "team_id", teamId)); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; localVarFormParams = new HashMap(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("TeamApi.teamInfo", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * List Team Members * Provides a paginated list of members (and their roles) that belong to a given team. * @param teamId The id of the team that a member list is being requested from. (required) * @param page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return TeamMembersResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public TeamMembersResponse teamMembers(String teamId, Integer page, Integer pageSize) throws ApiException { return teamMembersWithHttpInfo(teamId, page, pageSize).getData(); } /** * List Team Members * Provides a paginated list of members (and their roles) that belong to a given team. * @param teamId The id of the team that a member list is being requested from. (required) * @param page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return ApiResponse<TeamMembersResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse teamMembersWithHttpInfo(String teamId, Integer page, Integer pageSize) throws ApiException { if (page == null) { page = 1; } if (pageSize == null) { pageSize = 20; } Object localVarPostBody = null; // verify the required parameter 'teamId' is set if (teamId == null) { throw new ApiException(400, "Missing the required parameter 'teamId' when calling teamMembers"); } // create path and map variables String localVarPath = "/team/members/{team_id}" .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; localVarFormParams = new HashMap(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("TeamApi.teamMembers", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * Remove User from Team * Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. * @param teamRemoveMemberRequest (required) * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public TeamGetResponse teamRemoveMember(TeamRemoveMemberRequest teamRemoveMemberRequest) throws ApiException { return teamRemoveMemberWithHttpInfo(teamRemoveMemberRequest).getData(); } /** * Remove User from Team * Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. * @param teamRemoveMemberRequest (required) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse teamRemoveMemberWithHttpInfo(TeamRemoveMemberRequest teamRemoveMemberRequest) throws ApiException { Object localVarPostBody = teamRemoveMemberRequest; // verify the required parameter 'teamRemoveMemberRequest' is set if (teamRemoveMemberRequest == null) { throw new ApiException(400, "Missing the required parameter 'teamRemoveMemberRequest' when calling teamRemoveMember"); } // create path and map variables String localVarPath = "/team/remove_member"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; localVarFormParams = teamRemoveMemberRequest.createFormData(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("TeamApi.teamRemoveMember", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * List Sub Teams * Provides a paginated list of sub teams that belong to a given team. * @param teamId The id of the parent Team. (required) * @param page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return TeamSubTeamsResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public TeamSubTeamsResponse teamSubTeams(String teamId, Integer page, Integer pageSize) throws ApiException { return teamSubTeamsWithHttpInfo(teamId, page, pageSize).getData(); } /** * List Sub Teams * Provides a paginated list of sub teams that belong to a given team. * @param teamId The id of the parent Team. (required) * @param page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return ApiResponse<TeamSubTeamsResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse teamSubTeamsWithHttpInfo(String teamId, Integer page, Integer pageSize) throws ApiException { if (page == null) { page = 1; } if (pageSize == null) { pageSize = 20; } Object localVarPostBody = null; // verify the required parameter 'teamId' is set if (teamId == null) { throw new ApiException(400, "Missing the required parameter 'teamId' when calling teamSubTeams"); } // create path and map variables String localVarPath = "/team/sub_teams/{team_id}" .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; localVarFormParams = new HashMap(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("TeamApi.teamSubTeams", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } /** * Update Team * Updates the name of your Team. * @param teamUpdateRequest (required) * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public TeamGetResponse teamUpdate(TeamUpdateRequest teamUpdateRequest) throws ApiException { return teamUpdateWithHttpInfo(teamUpdateRequest).getData(); } /** * Update Team * Updates the name of your Team. * @param teamUpdateRequest (required) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse teamUpdateWithHttpInfo(TeamUpdateRequest teamUpdateRequest) throws ApiException { Object localVarPostBody = teamUpdateRequest; // verify the required parameter 'teamUpdateRequest' is set if (teamUpdateRequest == null) { throw new ApiException(400, "Missing the required parameter 'teamUpdateRequest' when calling teamUpdate"); } // create path and map variables String localVarPath = "/team"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; localVarFormParams = teamUpdateRequest.createFormData(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key", "oauth2" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("TeamApi.teamUpdate", localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy