class Pipedrive::CallLogsApi
Attributes
Public Class Methods
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Get all call logs assigned to a particular user Returns all call logs assigned to a particular user @param [Hash] opts the optional parameters @option opts [Float] :limit For pagination, the limit of entries to be returned @option opts [Float] :start For pagination, the position that represents the first result for the page @return [InlineResponse200]
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 28 def call_logs_get(opts = {}) data, _status_code, _headers = call_logs_get_with_http_info(opts) data end
Get all call logs assigned to a particular user Returns all call logs assigned to a particular user @param [Hash] opts the optional parameters @option opts [Float] :limit For pagination, the limit of entries to be returned @option opts [Float] :start For pagination, the position that represents the first result for the page @return [Array<(InlineResponse200
, Integer, Hash)>] InlineResponse200
data, response status code and response headers
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 39 def call_logs_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallLogsApi.call_logs_get ...' end # resource path local_var_path = '/callLogs' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse200' # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallLogsApi#call_logs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a call log Deletes a call log. If there is an audio recording attached to it, it will also be deleted. The related activity will not be removed by this request. If you want to remove the related activities, please use the endpoint which is specific for activities. @param id [String] The ID received when you create the call log @param [Hash] opts the optional parameters @return [InlineResponse2003]
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 89 def call_logs_id_delete(id, opts = {}) data, _status_code, _headers = call_logs_id_delete_with_http_info(id, opts) data end
Delete a call log Deletes a call log. If there is an audio recording attached to it, it will also be deleted. The related activity will not be removed by this request. If you want to remove the related activities, please use the endpoint which is specific for activities. @param id [String] The ID received when you create the call log @param [Hash] opts the optional parameters @return [Array<(InlineResponse2003
, Integer, Hash)>] InlineResponse2003
data, response status code and response headers
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 99 def call_logs_id_delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallLogsApi.call_logs_id_delete ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CallLogsApi.call_logs_id_delete" end # resource path local_var_path = '/callLogs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2003' # auth_names auth_names = opts[:auth_names] || ['oauth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallLogsApi#call_logs_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get details of a call log Returns details of a specific call log @param id [String] The ID received when you create the call log @param [Hash] opts the optional parameters @return [InlineResponse2002]
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 151 def call_logs_id_get(id, opts = {}) data, _status_code, _headers = call_logs_id_get_with_http_info(id, opts) data end
Get details of a call log Returns details of a specific call log @param id [String] The ID received when you create the call log @param [Hash] opts the optional parameters @return [Array<(InlineResponse2002
, Integer, Hash)>] InlineResponse2002
data, response status code and response headers
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 161 def call_logs_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallLogsApi.call_logs_id_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CallLogsApi.call_logs_id_get" end # resource path local_var_path = '/callLogs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2002' # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallLogsApi#call_logs_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Attach an audio file to the call log Adds an audio recording to the call log. That audio can be played by those who have access to the call log object. @param id [String] The ID received when you create the call log @param file [File] Audio file supported by the HTML5 specification @param [Hash] opts the optional parameters @return [InlineResponse2003]
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 214 def call_logs_id_recordings_post(id, file, opts = {}) data, _status_code, _headers = call_logs_id_recordings_post_with_http_info(id, file, opts) data end
Attach an audio file to the call log Adds an audio recording to the call log. That audio can be played by those who have access to the call log object. @param id [String] The ID received when you create the call log @param file [File] Audio file supported by the HTML5 specification @param [Hash] opts the optional parameters @return [Array<(InlineResponse2003
, Integer, Hash)>] InlineResponse2003
data, response status code and response headers
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 225 def call_logs_id_recordings_post_with_http_info(id, file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallLogsApi.call_logs_id_recordings_post ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CallLogsApi.call_logs_id_recordings_post" end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling CallLogsApi.call_logs_id_recordings_post" end # resource path local_var_path = '/callLogs/{id}/recordings'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[: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(['multipart/form-data']) # form parameters form_params = opts[:form_params] || {} form_params['file'] = file # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2003' # auth_names auth_names = opts[:auth_names] || ['oauth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallLogsApi#call_logs_id_recordings_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Add a call log Adds a new call log @param [Hash] opts the optional parameters @option opts [InlineObject2] :inline_object2 @return [InlineResponse2001]
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 284 def call_logs_post(opts = {}) data, _status_code, _headers = call_logs_post_with_http_info(opts) data end
Add a call log Adds a new call log @param [Hash] opts the optional parameters @option opts [InlineObject2] :inline_object2 @return [Array<(InlineResponse2001
, Integer, Hash)>] InlineResponse2001
data, response status code and response headers
# File lib/pipedrive-openapi-client/api/call_logs_api.rb, line 294 def call_logs_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallLogsApi.call_logs_post ...' end # resource path local_var_path = '/callLogs' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[: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 = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'inline_object2']) # return_type return_type = opts[:return_type] || 'InlineResponse2001' # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallLogsApi#call_logs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end