class SignRequestClient::TeamsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/signrequest_client/api/teams_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

teams_create(data, opts = {}) click to toggle source

Create a Team Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {"email":"**email-of-member-to-invite@example.com**","is_admin":false,"is_owner":false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param data @param [Hash] opts the optional parameters @return [Team]

# File lib/signrequest_client/api/teams_api.rb, line 27
def teams_create(data, opts = {})
  data, _status_code, _headers = teams_create_with_http_info(data, opts)
  data
end
teams_create_with_http_info(data, opts = {}) click to toggle source

Create a Team Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {&quot;email&quot;:&quot;**email-of-member-to-invite@example.com**&quot;,&quot;is_admin&quot;:false,&quot;is_owner&quot;:false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param data @param [Hash] opts the optional parameters @return [Array<(Team, Fixnum, Hash)>] Team data, response status code and response headers

# File lib/signrequest_client/api/teams_api.rb, line 37
def teams_create_with_http_info(data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TeamsApi.teams_create ...'
  end
  # verify the required parameter 'data' is set
  if @api_client.config.client_side_validation && data.nil?
    fail ArgumentError, "Missing the required parameter 'data' when calling TeamsApi.teams_create"
  end
  # resource path
  local_var_path = '/teams/'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(data)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Team')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#teams_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
teams_delete(subdomain, opts = {}) click to toggle source

Delete a Team Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {"email":"**email-of-member-to-invite@example.com**","is_admin":false,"is_owner":false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param subdomain @param [Hash] opts the optional parameters @return [nil]

# File lib/signrequest_client/api/teams_api.rb, line 81
def teams_delete(subdomain, opts = {})
  teams_delete_with_http_info(subdomain, opts)
  nil
end
teams_delete_with_http_info(subdomain, opts = {}) click to toggle source

Delete a Team Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {&quot;email&quot;:&quot;**email-of-member-to-invite@example.com**&quot;,&quot;is_admin&quot;:false,&quot;is_owner&quot;:false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param subdomain @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/signrequest_client/api/teams_api.rb, line 91
def teams_delete_with_http_info(subdomain, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TeamsApi.teams_delete ...'
  end
  # verify the required parameter 'subdomain' is set
  if @api_client.config.client_side_validation && subdomain.nil?
    fail ArgumentError, "Missing the required parameter 'subdomain' when calling TeamsApi.teams_delete"
  end
  # resource path
  local_var_path = '/teams/{subdomain}/'.sub('{' + 'subdomain' + '}', subdomain.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#teams_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
teams_invite_member(subdomain, data, opts = {}) click to toggle source

Invite a Team Member Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {"email":"**email-of-member-to-invite@example.com**","is_admin":false,"is_owner":false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param subdomain @param data @param [Hash] opts the optional parameters @return [InviteMember]

# File lib/signrequest_client/api/teams_api.rb, line 135
def teams_invite_member(subdomain, data, opts = {})
  data, _status_code, _headers = teams_invite_member_with_http_info(subdomain, data, opts)
  data
end
teams_invite_member_with_http_info(subdomain, data, opts = {}) click to toggle source

Invite a Team Member Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {&quot;email&quot;:&quot;**email-of-member-to-invite@example.com**&quot;,&quot;is_admin&quot;:false,&quot;is_owner&quot;:false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param subdomain @param data @param [Hash] opts the optional parameters @return [Array<(InviteMember, Fixnum, Hash)>] InviteMember data, response status code and response headers

# File lib/signrequest_client/api/teams_api.rb, line 146
def teams_invite_member_with_http_info(subdomain, data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TeamsApi.teams_invite_member ...'
  end
  # verify the required parameter 'subdomain' is set
  if @api_client.config.client_side_validation && subdomain.nil?
    fail ArgumentError, "Missing the required parameter 'subdomain' when calling TeamsApi.teams_invite_member"
  end
  # verify the required parameter 'data' is set
  if @api_client.config.client_side_validation && data.nil?
    fail ArgumentError, "Missing the required parameter 'data' when calling TeamsApi.teams_invite_member"
  end
  # resource path
  local_var_path = '/teams/{subdomain}/invite_member/'.sub('{' + 'subdomain' + '}', subdomain.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(data)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InviteMember')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#teams_invite_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
teams_list(opts = {}) click to toggle source

Retrieve a list of Teams Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {"email":"**email-of-member-to-invite@example.com**","is_admin":false,"is_owner":false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param [Hash] opts the optional parameters @option opts [Integer] :page A page number within the paginated result set. @option opts [Integer] :limit Number of results to return per page. @return [InlineResponse2007]

# File lib/signrequest_client/api/teams_api.rb, line 195
def teams_list(opts = {})
  data, _status_code, _headers = teams_list_with_http_info(opts)
  data
end
teams_list_with_http_info(opts = {}) click to toggle source

Retrieve a list of Teams Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {&quot;email&quot;:&quot;**email-of-member-to-invite@example.com**&quot;,&quot;is_admin&quot;:false,&quot;is_owner&quot;:false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param [Hash] opts the optional parameters @option opts [Integer] :page A page number within the paginated result set. @option opts [Integer] :limit Number of results to return per page. @return [Array<(InlineResponse2007, Fixnum, Hash)>] InlineResponse2007 data, response status code and response headers

# File lib/signrequest_client/api/teams_api.rb, line 206
def teams_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TeamsApi.teams_list ...'
  end
  # resource path
  local_var_path = '/teams/'

  # query parameters
  query_params = {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2007')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#teams_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
teams_partial_update(subdomain, data, opts = {}) click to toggle source

Update a Team Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {"email":"**email-of-member-to-invite@example.com**","is_admin":false,"is_owner":false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param subdomain @param data @param [Hash] opts the optional parameters @return [Team]

# File lib/signrequest_client/api/teams_api.rb, line 249
def teams_partial_update(subdomain, data, opts = {})
  data, _status_code, _headers = teams_partial_update_with_http_info(subdomain, data, opts)
  data
end
teams_partial_update_with_http_info(subdomain, data, opts = {}) click to toggle source

Update a Team Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {&quot;email&quot;:&quot;**email-of-member-to-invite@example.com**&quot;,&quot;is_admin&quot;:false,&quot;is_owner&quot;:false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param subdomain @param data @param [Hash] opts the optional parameters @return [Array<(Team, Fixnum, Hash)>] Team data, response status code and response headers

# File lib/signrequest_client/api/teams_api.rb, line 260
def teams_partial_update_with_http_info(subdomain, data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TeamsApi.teams_partial_update ...'
  end
  # verify the required parameter 'subdomain' is set
  if @api_client.config.client_side_validation && subdomain.nil?
    fail ArgumentError, "Missing the required parameter 'subdomain' when calling TeamsApi.teams_partial_update"
  end
  # verify the required parameter 'data' is set
  if @api_client.config.client_side_validation && data.nil?
    fail ArgumentError, "Missing the required parameter 'data' when calling TeamsApi.teams_partial_update"
  end
  # resource path
  local_var_path = '/teams/{subdomain}/'.sub('{' + 'subdomain' + '}', subdomain.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(data)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Team')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#teams_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
teams_read(subdomain, opts = {}) click to toggle source

Retrieve a Team Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {"email":"**email-of-member-to-invite@example.com**","is_admin":false,"is_owner":false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param subdomain @param [Hash] opts the optional parameters @return [Team]

# File lib/signrequest_client/api/teams_api.rb, line 308
def teams_read(subdomain, opts = {})
  data, _status_code, _headers = teams_read_with_http_info(subdomain, opts)
  data
end
teams_read_with_http_info(subdomain, opts = {}) click to toggle source

Retrieve a Team Required fields are name and subdomain where the subdomain is globally unique. Use POST to create a Team. To update a field on a Team use PATCH. To use the API on behalf of a particular team change the endpoint to: https://*{{ subdomain }}*.signrequest.com/api/v1/… To invite new team members you can use POST {&quot;email&quot;:&quot;**email-of-member-to-invite@example.com**&quot;,&quot;is_admin&quot;:false,&quot;is_owner&quot;:false} to: https://signrequest.com/api/v1/teams/*{{ subdomain }}*/invite_member/ @param subdomain @param [Hash] opts the optional parameters @return [Array<(Team, Fixnum, Hash)>] Team data, response status code and response headers

# File lib/signrequest_client/api/teams_api.rb, line 318
def teams_read_with_http_info(subdomain, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TeamsApi.teams_read ...'
  end
  # verify the required parameter 'subdomain' is set
  if @api_client.config.client_side_validation && subdomain.nil?
    fail ArgumentError, "Missing the required parameter 'subdomain' when calling TeamsApi.teams_read"
  end
  # resource path
  local_var_path = '/teams/{subdomain}/'.sub('{' + 'subdomain' + '}', subdomain.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Team')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#teams_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end