class SignRequestClient::WebhooksApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

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

Create a Webhook

@param data @param [Hash] opts the optional parameters @return [WebhookSubscription]

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

Create a Webhook

@param data @param [Hash] opts the optional parameters @return [Array<(WebhookSubscription, Fixnum, Hash)>] WebhookSubscription data, response status code and response headers

# File lib/signrequest_client/api/webhooks_api.rb, line 37
def webhooks_create_with_http_info(data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_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 WebhooksApi.webhooks_create"
  end
  # resource path
  local_var_path = '/webhooks/'

  # 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 => 'WebhookSubscription')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhooksApi#webhooks_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
webhooks_delete(uuid, opts = {}) click to toggle source

Delete a Webhook

@param uuid @param [Hash] opts the optional parameters @return [nil]

# File lib/signrequest_client/api/webhooks_api.rb, line 81
def webhooks_delete(uuid, opts = {})
  webhooks_delete_with_http_info(uuid, opts)
  nil
end
webhooks_delete_with_http_info(uuid, opts = {}) click to toggle source

Delete a Webhook

@param uuid @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/signrequest_client/api/webhooks_api.rb, line 91
def webhooks_delete_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_delete ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling WebhooksApi.webhooks_delete"
  end
  # resource path
  local_var_path = '/webhooks/{uuid}/'.sub('{' + 'uuid' + '}', uuid.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: WebhooksApi#webhooks_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
webhooks_list(opts = {}) click to toggle source

Retrieve a list of Webhooks

@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 [InlineResponse2009]

# File lib/signrequest_client/api/webhooks_api.rb, line 135
def webhooks_list(opts = {})
  data, _status_code, _headers = webhooks_list_with_http_info(opts)
  data
end
webhooks_list_with_http_info(opts = {}) click to toggle source

Retrieve a list of Webhooks

@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<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers

# File lib/signrequest_client/api/webhooks_api.rb, line 146
def webhooks_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_list ...'
  end
  # resource path
  local_var_path = '/webhooks/'

  # 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 => 'InlineResponse2009')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhooksApi#webhooks_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
webhooks_partial_update(uuid, data, opts = {}) click to toggle source

Partially update a Webhook

@param uuid @param data @param [Hash] opts the optional parameters @return [WebhookSubscription]

# File lib/signrequest_client/api/webhooks_api.rb, line 189
def webhooks_partial_update(uuid, data, opts = {})
  data, _status_code, _headers = webhooks_partial_update_with_http_info(uuid, data, opts)
  data
end
webhooks_partial_update_with_http_info(uuid, data, opts = {}) click to toggle source

Partially update a Webhook

@param uuid @param data @param [Hash] opts the optional parameters @return [Array<(WebhookSubscription, Fixnum, Hash)>] WebhookSubscription data, response status code and response headers

# File lib/signrequest_client/api/webhooks_api.rb, line 200
def webhooks_partial_update_with_http_info(uuid, data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_partial_update ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling WebhooksApi.webhooks_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 WebhooksApi.webhooks_partial_update"
  end
  # resource path
  local_var_path = '/webhooks/{uuid}/'.sub('{' + 'uuid' + '}', uuid.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 => 'WebhookSubscription')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhooksApi#webhooks_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
webhooks_read(uuid, opts = {}) click to toggle source

Retrieve a Webhook

@param uuid @param [Hash] opts the optional parameters @return [WebhookSubscription]

# File lib/signrequest_client/api/webhooks_api.rb, line 248
def webhooks_read(uuid, opts = {})
  data, _status_code, _headers = webhooks_read_with_http_info(uuid, opts)
  data
end
webhooks_read_with_http_info(uuid, opts = {}) click to toggle source

Retrieve a Webhook

@param uuid @param [Hash] opts the optional parameters @return [Array<(WebhookSubscription, Fixnum, Hash)>] WebhookSubscription data, response status code and response headers

# File lib/signrequest_client/api/webhooks_api.rb, line 258
def webhooks_read_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_read ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling WebhooksApi.webhooks_read"
  end
  # resource path
  local_var_path = '/webhooks/{uuid}/'.sub('{' + 'uuid' + '}', uuid.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 => 'WebhookSubscription')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhooksApi#webhooks_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
webhooks_update(uuid, data, opts = {}) click to toggle source

Update a Webhook

@param uuid @param data @param [Hash] opts the optional parameters @return [WebhookSubscription]

# File lib/signrequest_client/api/webhooks_api.rb, line 303
def webhooks_update(uuid, data, opts = {})
  data, _status_code, _headers = webhooks_update_with_http_info(uuid, data, opts)
  data
end
webhooks_update_with_http_info(uuid, data, opts = {}) click to toggle source

Update a Webhook

@param uuid @param data @param [Hash] opts the optional parameters @return [Array<(WebhookSubscription, Fixnum, Hash)>] WebhookSubscription data, response status code and response headers

# File lib/signrequest_client/api/webhooks_api.rb, line 314
def webhooks_update_with_http_info(uuid, data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_update ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling WebhooksApi.webhooks_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 WebhooksApi.webhooks_update"
  end
  # resource path
  local_var_path = '/webhooks/{uuid}/'.sub('{' + 'uuid' + '}', uuid.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(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'WebhookSubscription')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebhooksApi#webhooks_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end