class Pipedrive::OrganizationFieldsApi
Attributes
Public Class Methods
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete multiple organization fields in bulk Marks multiple fields as deleted. @param ids [String] Comma-separated field IDs to delete @param [Hash] opts the optional parameters @return [nil]
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 27 def organization_fields_delete(ids, opts = {}) organization_fields_delete_with_http_info(ids, opts) nil end
Delete multiple organization fields in bulk Marks multiple fields as deleted. @param ids [String] Comma-separated field IDs to delete @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 37 def organization_fields_delete_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationFieldsApi.organization_fields_delete ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling OrganizationFieldsApi.organization_fields_delete" end # resource path local_var_path = '/organizationFields' # query parameters query_params = opts[:query_params] || {} query_params[:'ids'] = ids # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # 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(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationFieldsApi#organization_fields_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get all organization fields Returns data about all organization fields @param [Hash] opts the optional parameters @return [nil]
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 87 def organization_fields_get(opts = {}) organization_fields_get_with_http_info(opts) nil end
Get all organization fields Returns data about all organization fields @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 96 def organization_fields_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationFieldsApi.organization_fields_get ...' end # resource path local_var_path = '/organizationFields' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # 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: OrganizationFieldsApi#organization_fields_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete an organization field Marks a field as deleted. For more information on how to delete a custom field, see <a href="pipedrive.readme.io/docs/deleting-a-custom-field" target="_blank" rel="noopener noreferrer">this tutorial</a>. @param id [Integer] ID of the field @param [Hash] opts the optional parameters @return [nil]
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 142 def organization_fields_id_delete(id, opts = {}) organization_fields_id_delete_with_http_info(id, opts) nil end
Delete an organization field Marks a field as deleted. For more information on how to delete a custom field, see <a href="pipedrive.readme.io/docs/deleting-a-custom-field" target="_blank" rel="noopener noreferrer">this tutorial</a>. @param id [Integer] ID of the field @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 152 def organization_fields_id_delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationFieldsApi.organization_fields_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 OrganizationFieldsApi.organization_fields_id_delete" end # resource path local_var_path = '/organizationFields/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # 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(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationFieldsApi#organization_fields_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get one organization field Returns data about a specific organization field. @param id [Integer] ID of the field @param [Hash] opts the optional parameters @return [nil]
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 202 def organization_fields_id_get(id, opts = {}) organization_fields_id_get_with_http_info(id, opts) nil end
Get one organization field Returns data about a specific organization field. @param id [Integer] ID of the field @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 212 def organization_fields_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationFieldsApi.organization_fields_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 OrganizationFieldsApi.organization_fields_id_get" end # resource path local_var_path = '/organizationFields/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # 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: OrganizationFieldsApi#organization_fields_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update an organization field Updates an organization field. See an example of updating custom fields’ values in <a href=" pipedrive.readme.io/docs/updating-custom-field-value " target="_blank" rel="noopener noreferrer">this tutorial</a>. @param id [Integer] ID of the field @param name [String] Name of the field @param [Hash] opts the optional parameters @option opts [String] :options When field_type is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: [{\"id\":123,\"label\":\"Existing Item\"},{\"label\":\"New Item\"}] @return [nil]
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 264 def organization_fields_id_put(id, name, opts = {}) organization_fields_id_put_with_http_info(id, name, opts) nil end
Update an organization field Updates an organization field. See an example of updating custom fields’ values in <a href=" pipedrive.readme.io/docs/updating-custom-field-value " target="_blank" rel="noopener noreferrer">this tutorial</a>. @param id [Integer] ID of the field @param name [String] Name of the field @param [Hash] opts the optional parameters @option opts [String] :options When field_type is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: [{\"id\":123,\"label\":\"Existing Item\"},{\"label\":\"New Item\"}] @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 276 def organization_fields_id_put_with_http_info(id, name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationFieldsApi.organization_fields_id_put ...' 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 OrganizationFieldsApi.organization_fields_id_put" end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling OrganizationFieldsApi.organization_fields_id_put" end # resource path local_var_path = '/organizationFields/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} form_params['name'] = name form_params['options'] = opts[:'options'] if !opts[:'options'].nil? # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # 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(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationFieldsApi#organization_fields_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Add a new organization field Adds a new organization field. For more information on adding a new custom field, see <a href="pipedrive.readme.io/docs/adding-a-new-custom-field" target="_blank" rel="noopener noreferrer">this tutorial</a>. @param [Hash] opts the optional parameters @return [nil]
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 333 def organization_fields_post(opts = {}) organization_fields_post_with_http_info(opts) nil end
Add a new organization field Adds a new organization field. For more information on adding a new custom field, see <a href="pipedrive.readme.io/docs/adding-a-new-custom-field" target="_blank" rel="noopener noreferrer">this tutorial</a>. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/pipedrive-openapi-client/api/organization_fields_api.rb, line 342 def organization_fields_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationFieldsApi.organization_fields_post ...' end # resource path local_var_path = '/organizationFields' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # 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: OrganizationFieldsApi#organization_fields_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end