Class: Pipedrive::NotesApi
- Inherits:
-
Object
- Object
- Pipedrive::NotesApi
- Defined in:
- lib/pipedrive-openapi-client/api/notes_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ NotesApi
constructor
A new instance of NotesApi.
-
#notes_get(opts = {}) ⇒ GetNotes
Get all notes Returns all notes.
-
#notes_get_with_http_info(opts = {}) ⇒ Array<(GetNotes, Integer, Hash)>
Get all notes Returns all notes.
-
#notes_id_delete(id, opts = {}) ⇒ DeleteNote
Delete a note Deletes a specific note.
-
#notes_id_delete_with_http_info(id, opts = {}) ⇒ Array<(DeleteNote, Integer, Hash)>
Delete a note Deletes a specific note.
-
#notes_id_get(id, opts = {}) ⇒ PostNote
Get one note Returns details about a specific note.
-
#notes_id_get_with_http_info(id, opts = {}) ⇒ Array<(PostNote, Integer, Hash)>
Get one note Returns details about a specific note.
-
#notes_id_put(id, content, opts = {}) ⇒ PostNote
Update a note Updates a note.
-
#notes_id_put_with_http_info(id, content, opts = {}) ⇒ Array<(PostNote, Integer, Hash)>
Update a note Updates a note.
-
#notes_post(content, opts = {}) ⇒ PostNote
Add a note Adds a new note.
-
#notes_post_with_http_info(content, opts = {}) ⇒ Array<(PostNote, Integer, Hash)>
Add a note Adds a new note.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#notes_get(opts = {}) ⇒ GetNotes
Get all notes Returns all notes.
38 39 40 41 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 38 def notes_get(opts = {}) data, _status_code, _headers = notes_get_with_http_info(opts) data end |
#notes_get_with_http_info(opts = {}) ⇒ Array<(GetNotes, Integer, Hash)>
Get all notes Returns all notes.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 59 def notes_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotesApi.notes_get ...' end # resource path local_var_path = '/notes' # query parameters query_params = opts[:query_params] || {} query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil? query_params[:'deal_id'] = opts[:'deal_id'] if !opts[:'deal_id'].nil? query_params[:'person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil? query_params[:'org_id'] = opts[:'org_id'] if !opts[:'org_id'].nil? query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'pinned_to_deal_flag'] = opts[:'pinned_to_deal_flag'] if !opts[:'pinned_to_deal_flag'].nil? query_params[:'pinned_to_organization_flag'] = opts[:'pinned_to_organization_flag'] if !opts[:'pinned_to_organization_flag'].nil? query_params[:'pinned_to_person_flag'] = opts[:'pinned_to_person_flag'] if !opts[:'pinned_to_person_flag'].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] || 'GetNotes' # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#notes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#notes_id_delete(id, opts = {}) ⇒ DeleteNote
Delete a note Deletes a specific note.
119 120 121 122 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 119 def notes_id_delete(id, opts = {}) data, _status_code, _headers = notes_id_delete_with_http_info(id, opts) data end |
#notes_id_delete_with_http_info(id, opts = {}) ⇒ Array<(DeleteNote, Integer, Hash)>
Delete a note Deletes a specific note.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 129 def notes_id_delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotesApi.notes_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 NotesApi.notes_id_delete" end # resource path local_var_path = '/notes/{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] || 'DeleteNote' # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#notes_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#notes_id_get(id, opts = {}) ⇒ PostNote
Get one note Returns details about a specific note.
181 182 183 184 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 181 def notes_id_get(id, opts = {}) data, _status_code, _headers = notes_id_get_with_http_info(id, opts) data end |
#notes_id_get_with_http_info(id, opts = {}) ⇒ Array<(PostNote, Integer, Hash)>
Get one note Returns details about a specific note.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 191 def notes_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotesApi.notes_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 NotesApi.notes_id_get" end # resource path local_var_path = '/notes/{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] || 'PostNote' # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#notes_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#notes_id_put(id, content, opts = {}) ⇒ PostNote
Update a note Updates a note.
252 253 254 255 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 252 def notes_id_put(id, content, opts = {}) data, _status_code, _headers = notes_id_put_with_http_info(id, content, opts) data end |
#notes_id_put_with_http_info(id, content, opts = {}) ⇒ Array<(PostNote, Integer, Hash)>
Update a note Updates a note.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 271 def notes_id_put_with_http_info(id, content, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotesApi.notes_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 NotesApi.notes_id_put" end # verify the required parameter 'content' is set if @api_client.config.client_side_validation && content.nil? fail ArgumentError, "Missing the required parameter 'content' when calling NotesApi.notes_id_put" end # resource path local_var_path = '/notes/{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']) # 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['content'] = content form_params['user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil? form_params['deal_id'] = opts[:'deal_id'] if !opts[:'deal_id'].nil? form_params['person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil? form_params['org_id'] = opts[:'org_id'] if !opts[:'org_id'].nil? form_params['add_time'] = opts[:'add_time'] if !opts[:'add_time'].nil? form_params['pinned_to_deal_flag'] = opts[:'pinned_to_deal_flag'] if !opts[:'pinned_to_deal_flag'].nil? form_params['pinned_to_organization_flag'] = opts[:'pinned_to_organization_flag'] if !opts[:'pinned_to_organization_flag'].nil? form_params['pinned_to_person_flag'] = opts[:'pinned_to_person_flag'] if !opts[:'pinned_to_person_flag'].nil? # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PostNote' # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#notes_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#notes_post(content, opts = {}) ⇒ PostNote
Add a note Adds a new note.
346 347 348 349 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 346 def notes_post(content, opts = {}) data, _status_code, _headers = notes_post_with_http_info(content, opts) data end |
#notes_post_with_http_info(content, opts = {}) ⇒ Array<(PostNote, Integer, Hash)>
Add a note Adds a new note.
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/pipedrive-openapi-client/api/notes_api.rb', line 364 def notes_post_with_http_info(content, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotesApi.notes_post ...' end # verify the required parameter 'content' is set if @api_client.config.client_side_validation && content.nil? fail ArgumentError, "Missing the required parameter 'content' when calling NotesApi.notes_post" end # resource path local_var_path = '/notes' # 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/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} form_params['content'] = content form_params['user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil? form_params['deal_id'] = opts[:'deal_id'] if !opts[:'deal_id'].nil? form_params['person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil? form_params['org_id'] = opts[:'org_id'] if !opts[:'org_id'].nil? form_params['add_time'] = opts[:'add_time'] if !opts[:'add_time'].nil? form_params['pinned_to_deal_flag'] = opts[:'pinned_to_deal_flag'] if !opts[:'pinned_to_deal_flag'].nil? form_params['pinned_to_organization_flag'] = opts[:'pinned_to_organization_flag'] if !opts[:'pinned_to_organization_flag'].nil? form_params['pinned_to_person_flag'] = opts[:'pinned_to_person_flag'] if !opts[:'pinned_to_person_flag'].nil? # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PostNote' # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#notes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |