Class: Pipedrive::LeadsApi
- Inherits:
-
Object
- Object
- Pipedrive::LeadsApi
- Defined in:
- lib/pipedrive-openapi-client/api/leads_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) ⇒ LeadsApi
constructor
A new instance of LeadsApi.
-
#lead_labels_get(opts = {}) ⇒ InlineResponse2006
Get all lead labels Returns details of all Lead Labels.
-
#lead_labels_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse2006, Integer, Hash)>
Get all lead labels Returns details of all Lead Labels.
-
#lead_labels_id_delete(id, opts = {}) ⇒ nil
Delete a lead label Deletes a specific Lead Label.
-
#lead_labels_id_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a lead label Deletes a specific Lead Label.
-
#lead_labels_id_get(id, opts = {}) ⇒ nil
Get one lead label Returns details of a specific Lead Label.
-
#lead_labels_id_get_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get one lead label Returns details of a specific Lead Label.
-
#lead_labels_id_patch(id, opts = {}) ⇒ nil
Update a lead label Updates one or more properties of a Lead Label.
-
#lead_labels_id_patch_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update a lead label Updates one or more properties of a Lead Label.
-
#lead_labels_post(opts = {}) ⇒ InlineResponse2007
Add a lead label Creates a Lead Label.
-
#lead_labels_post_with_http_info(opts = {}) ⇒ Array<(InlineResponse2007, Integer, Hash)>
Add a lead label Creates a Lead Label.
-
#lead_sources_get(opts = {}) ⇒ InlineResponse2008
Get all lead sources Returns all Lead Sources.
-
#lead_sources_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse2008, Integer, Hash)>
Get all lead sources Returns all Lead Sources.
-
#leads_get(opts = {}) ⇒ InlineResponse2004
Get all leads Returns multiple Leads.
-
#leads_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse2004, Integer, Hash)>
Get all leads Returns multiple Leads.
-
#leads_id_delete(id, opts = {}) ⇒ InlineResponse2005
Delete a lead Deletes a specific Lead.
-
#leads_id_delete_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse2005, Integer, Hash)>
Delete a lead Deletes a specific Lead.
-
#leads_id_get(id, opts = {}) ⇒ nil
Get one lead Returns details of a specific Lead.
-
#leads_id_get_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get one lead Returns details of a specific Lead.
-
#leads_id_patch(id, opts = {}) ⇒ nil
Update a lead Updates one or more properties of a Lead.
-
#leads_id_patch_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update a lead Updates one or more properties of a Lead.
-
#leads_post(opts = {}) ⇒ InlineResponse201
Add a lead Creates a Lead.
-
#leads_post_with_http_info(opts = {}) ⇒ Array<(InlineResponse201, Integer, Hash)>
Add a lead Creates a Lead.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LeadsApi
Returns a new instance of LeadsApi.
19 20 21 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#lead_labels_get(opts = {}) ⇒ InlineResponse2006
Get all lead labels Returns details of all Lead Labels. This endpoint does not support pagination and all Labels are always returned.
26 27 28 29 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 26 def lead_labels_get(opts = {}) data, _status_code, _headers = lead_labels_get_with_http_info(opts) data end |
#lead_labels_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse2006, Integer, Hash)>
Get all lead labels Returns details of all Lead Labels. This endpoint does not support pagination and all Labels are always returned.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 35 def lead_labels_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.lead_labels_get ...' end # resource path local_var_path = '/leadLabels' # 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] || 'InlineResponse2006' # 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: LeadsApi#lead_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#lead_labels_id_delete(id, opts = {}) ⇒ nil
Delete a lead label Deletes a specific Lead Label
83 84 85 86 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 83 def lead_labels_id_delete(id, opts = {}) lead_labels_id_delete_with_http_info(id, opts) nil end |
#lead_labels_id_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a lead label Deletes a specific Lead Label
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 93 def lead_labels_id_delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.lead_labels_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 LeadsApi.lead_labels_id_delete" end # resource path local_var_path = '/leadLabels/{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'] = 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: LeadsApi#lead_labels_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#lead_labels_id_get(id, opts = {}) ⇒ nil
Get one lead label Returns details of a specific Lead Label
143 144 145 146 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 143 def lead_labels_id_get(id, opts = {}) lead_labels_id_get_with_http_info(id, opts) nil end |
#lead_labels_id_get_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get one lead label Returns details of a specific Lead Label
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 153 def lead_labels_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.lead_labels_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 LeadsApi.lead_labels_id_get" end # resource path local_var_path = '/leadLabels/{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] # 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: LeadsApi#lead_labels_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#lead_labels_id_patch(id, opts = {}) ⇒ nil
Update a lead label Updates one or more properties of a Lead Label. Only properties included in the request will be updated.
206 207 208 209 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 206 def lead_labels_id_patch(id, opts = {}) lead_labels_id_patch_with_http_info(id, opts) nil end |
#lead_labels_id_patch_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update a lead label Updates one or more properties of a Lead Label. Only properties included in the request will be updated.
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 217 def lead_labels_id_patch_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.lead_labels_id_patch ...' 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 LeadsApi.lead_labels_id_patch" end # resource path local_var_path = '/leadLabels/{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/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'inline_object17']) # return_type return_type = opts[:return_type] # 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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LeadsApi#lead_labels_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#lead_labels_post(opts = {}) ⇒ InlineResponse2007
Add a lead label Creates a Lead Label
269 270 271 272 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 269 def lead_labels_post(opts = {}) data, _status_code, _headers = lead_labels_post_with_http_info(opts) data end |
#lead_labels_post_with_http_info(opts = {}) ⇒ Array<(InlineResponse2007, Integer, Hash)>
Add a lead label Creates a Lead Label
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 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 279 def lead_labels_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.lead_labels_post ...' end # resource path local_var_path = '/leadLabels' # 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_object16']) # return_type return_type = opts[:return_type] || 'InlineResponse2007' # 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: LeadsApi#lead_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#lead_sources_get(opts = {}) ⇒ InlineResponse2008
Get all lead sources Returns all Lead Sources. Please note that the list of Lead Sources is fixed, it cannot be modified. All Leads created through the Public Pipedrive API will have a Lead Source API assigned.
328 329 330 331 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 328 def lead_sources_get(opts = {}) data, _status_code, _headers = lead_sources_get_with_http_info(opts) data end |
#lead_sources_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse2008, Integer, Hash)>
Get all lead sources Returns all Lead Sources. Please note that the list of Lead Sources is fixed, it cannot be modified. All Leads created through the Public Pipedrive API will have a Lead Source `API` assigned.
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 337 def lead_sources_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.lead_sources_get ...' end # resource path local_var_path = '/leadSources' # 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] || 'InlineResponse2008' # 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: LeadsApi#lead_sources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#leads_get(opts = {}) ⇒ InlineResponse2004
Get all leads Returns multiple Leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using limit and start query parameters.
387 388 389 390 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 387 def leads_get(opts = {}) data, _status_code, _headers = leads_get_with_http_info(opts) data end |
#leads_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse2004, Integer, Hash)>
Get all leads Returns multiple Leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters.
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 399 def leads_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.leads_get ...' end allowable_values = ["archived", "not_archived", "all"] if @api_client.config.client_side_validation && opts[:'archived_status'] && !allowable_values.include?(opts[:'archived_status']) fail ArgumentError, "invalid value for \"archived_status\", must be one of #{allowable_values}" end # resource path local_var_path = '/leads' # 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? query_params[:'archived_status'] = opts[:'archived_status'] if !opts[:'archived_status'].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] || 'InlineResponse2004' # 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: LeadsApi#leads_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#leads_id_delete(id, opts = {}) ⇒ InlineResponse2005
Delete a lead Deletes a specific Lead
454 455 456 457 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 454 def leads_id_delete(id, opts = {}) data, _status_code, _headers = leads_id_delete_with_http_info(id, opts) data end |
#leads_id_delete_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse2005, Integer, Hash)>
Delete a lead Deletes a specific Lead
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 464 def leads_id_delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.leads_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 LeadsApi.leads_id_delete" end # resource path local_var_path = '/leads/{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] || 'InlineResponse2005' # 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: LeadsApi#leads_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#leads_id_get(id, opts = {}) ⇒ nil
Get one lead Returns details of a specific Lead
516 517 518 519 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 516 def leads_id_get(id, opts = {}) leads_id_get_with_http_info(id, opts) nil end |
#leads_id_get_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get one lead Returns details of a specific Lead
526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 526 def leads_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.leads_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 LeadsApi.leads_id_get" end # resource path local_var_path = '/leads/{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] # 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: LeadsApi#leads_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#leads_id_patch(id, opts = {}) ⇒ nil
Update a lead Updates one or more properties of a Lead. Only properties included in the request will be updated. Send null to unset a property (applicable for example for value, person_id or organization_id).
579 580 581 582 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 579 def leads_id_patch(id, opts = {}) leads_id_patch_with_http_info(id, opts) nil end |
#leads_id_patch_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update a lead Updates one or more properties of a Lead. Only properties included in the request will be updated. Send `null` to unset a property (applicable for example for `value`, `person_id` or `organization_id`).
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 590 def leads_id_patch_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.leads_id_patch ...' 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 LeadsApi.leads_id_patch" end # resource path local_var_path = '/leads/{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/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'inline_object15']) # return_type return_type = opts[:return_type] # 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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LeadsApi#leads_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#leads_post(opts = {}) ⇒ InlineResponse201
Add a lead Creates a Lead. A Lead always has to be linked to a Person or an Organization or both. All Leads created through the Public Pipedrive API will have a Lead Source API assigned.
642 643 644 645 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 642 def leads_post(opts = {}) data, _status_code, _headers = leads_post_with_http_info(opts) data end |
#leads_post_with_http_info(opts = {}) ⇒ Array<(InlineResponse201, Integer, Hash)>
Add a lead Creates a Lead. A Lead always has to be linked to a Person or an Organization or both. All Leads created through the Public Pipedrive API will have a Lead Source `API` assigned.
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/pipedrive-openapi-client/api/leads_api.rb', line 652 def leads_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LeadsApi.leads_post ...' end # resource path local_var_path = '/leads' # 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_object14']) # return_type return_type = opts[:return_type] || 'InlineResponse201' # 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: LeadsApi#leads_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |