Class: ElasticEmail::ContactsApi
- Inherits:
-
Object
- Object
- ElasticEmail::ContactsApi
- Defined in:
- lib/ElasticEmail/api/contacts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#contacts_by_email_delete(email, opts = {}) ⇒ nil
Delete Contact Deletes the provided contact.
-
#contacts_by_email_delete_with_http_info(email, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Contact Deletes the provided contact.
-
#contacts_by_email_get(email, opts = {}) ⇒ Contact
Load Contact Load detailed contact information for specified email.
-
#contacts_by_email_get_with_http_info(email, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Load Contact Load detailed contact information for specified email.
-
#contacts_by_email_history_get(email, opts = {}) ⇒ Array<ContactHistory>
Load History Returns detailed history of specified Contact.
-
#contacts_by_email_history_get_with_http_info(email, opts = {}) ⇒ Array<(Array<ContactHistory>, Integer, Hash)>
Load History Returns detailed history of specified Contact.
-
#contacts_by_email_put(email, contact_update_payload, opts = {}) ⇒ Contact
Update Contact Update selected contact.
-
#contacts_by_email_put_with_http_info(email, contact_update_payload, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Update Contact Update selected contact.
-
#contacts_delete_post(emails_payload, opts = {}) ⇒ nil
Delete Contacts Bulk Deletes provided contacts in bulk.
-
#contacts_delete_post_with_http_info(emails_payload, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Contacts Bulk Deletes provided contacts in bulk.
-
#contacts_export_by_id_status_get(id, opts = {}) ⇒ ExportStatus
Check Export Status Check the current status of the export.
-
#contacts_export_by_id_status_get_with_http_info(id, opts = {}) ⇒ Array<(ExportStatus, Integer, Hash)>
Check Export Status Check the current status of the export.
-
#contacts_export_post(opts = {}) ⇒ ExportLink
Export Contacts Request an Export of specified Contacts.
-
#contacts_export_post_with_http_info(opts = {}) ⇒ Array<(ExportLink, Integer, Hash)>
Export Contacts Request an Export of specified Contacts.
-
#contacts_get(opts = {}) ⇒ Array<Contact>
Load Contacts Returns a list of contacts.
-
#contacts_get_with_http_info(opts = {}) ⇒ Array<(Array<Contact>, Integer, Hash)>
Load Contacts Returns a list of contacts.
-
#contacts_import_post(opts = {}) ⇒ nil
Upload Contacts Upload contacts from a file.
-
#contacts_import_post_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Upload Contacts Upload contacts from a file.
-
#contacts_post(contact_payload, opts = {}) ⇒ Array<Contact>
Add Contact Add new Contacts to your Lists.
-
#contacts_post_with_http_info(contact_payload, opts = {}) ⇒ Array<(Array<Contact>, Integer, Hash)>
Add Contact Add new Contacts to your Lists.
-
#initialize(api_client = ApiClient.default) ⇒ ContactsApi
constructor
A new instance of ContactsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ContactsApi
Returns a new instance of ContactsApi.
19 20 21 |
# File 'lib/ElasticEmail/api/contacts_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/ElasticEmail/api/contacts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#contacts_by_email_delete(email, opts = {}) ⇒ nil
Delete Contact Deletes the provided contact. Required Access Level: ModifyContacts
27 28 29 30 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 27 def contacts_by_email_delete(email, opts = {}) contacts_by_email_delete_with_http_info(email, opts) nil end |
#contacts_by_email_delete_with_http_info(email, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Contact Deletes the provided contact. Required Access Level: ModifyContacts
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 77 78 79 80 81 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 37 def contacts_by_email_delete_with_http_info(email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_by_email_delete ...' end # verify the required parameter 'email' is set if @api_client.config.client_side_validation && email.nil? fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.contacts_by_email_delete" end # resource path local_var_path = '/contacts/{email}'.sub('{' + 'email' + '}', CGI.escape(email.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[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_by_email_delete", :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: ContactsApi#contacts_by_email_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#contacts_by_email_get(email, opts = {}) ⇒ Contact
Load Contact Load detailed contact information for specified email. Required Access Level: ViewContacts
88 89 90 91 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 88 def contacts_by_email_get(email, opts = {}) data, _status_code, _headers = contacts_by_email_get_with_http_info(email, opts) data end |
#contacts_by_email_get_with_http_info(email, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Load Contact Load detailed contact information for specified email. Required Access Level: ViewContacts
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 137 138 139 140 141 142 143 144 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 98 def contacts_by_email_get_with_http_info(email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_by_email_get ...' end # verify the required parameter 'email' is set if @api_client.config.client_side_validation && email.nil? fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.contacts_by_email_get" end # resource path local_var_path = '/contacts/{email}'.sub('{' + 'email' + '}', CGI.escape(email.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Contact' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_by_email_get", :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: ContactsApi#contacts_by_email_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#contacts_by_email_history_get(email, opts = {}) ⇒ Array<ContactHistory>
Load History Returns detailed history of specified Contact. Required Access Level: ViewContacts
153 154 155 156 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 153 def contacts_by_email_history_get(email, opts = {}) data, _status_code, _headers = contacts_by_email_history_get_with_http_info(email, opts) data end |
#contacts_by_email_history_get_with_http_info(email, opts = {}) ⇒ Array<(Array<ContactHistory>, Integer, Hash)>
Load History Returns detailed history of specified Contact. Required Access Level: ViewContacts
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 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 165 def contacts_by_email_history_get_with_http_info(email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_by_email_history_get ...' end # verify the required parameter 'email' is set if @api_client.config.client_side_validation && email.nil? fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.contacts_by_email_history_get" end # resource path local_var_path = '/contacts/{email}/history'.sub('{' + 'email' + '}', CGI.escape(email.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ContactHistory>' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_by_email_history_get", :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: ContactsApi#contacts_by_email_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#contacts_by_email_put(email, contact_update_payload, opts = {}) ⇒ Contact
Update Contact Update selected contact. Omitted contact's fields will not be changed. Required Access Level: ModifyContacts
221 222 223 224 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 221 def contacts_by_email_put(email, contact_update_payload, opts = {}) data, _status_code, _headers = contacts_by_email_put_with_http_info(email, contact_update_payload, opts) data end |
#contacts_by_email_put_with_http_info(email, contact_update_payload, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Update Contact Update selected contact. Omitted contact's fields will not be changed. Required Access Level: ModifyContacts
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 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 232 def contacts_by_email_put_with_http_info(email, contact_update_payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_by_email_put ...' end # verify the required parameter 'email' is set if @api_client.config.client_side_validation && email.nil? fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.contacts_by_email_put" end # verify the required parameter 'contact_update_payload' is set if @api_client.config.client_side_validation && contact_update_payload.nil? fail ArgumentError, "Missing the required parameter 'contact_update_payload' when calling ContactsApi.contacts_by_email_put" end # resource path local_var_path = '/contacts/{email}'.sub('{' + 'email' + '}', CGI.escape(email.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(contact_update_payload) # return_type return_type = opts[:debug_return_type] || 'Contact' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_by_email_put", :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: ContactsApi#contacts_by_email_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#contacts_delete_post(emails_payload, opts = {}) ⇒ nil
Delete Contacts Bulk Deletes provided contacts in bulk. Required Access Level: ModifyContacts
294 295 296 297 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 294 def contacts_delete_post(emails_payload, opts = {}) contacts_delete_post_with_http_info(emails_payload, opts) nil end |
#contacts_delete_post_with_http_info(emails_payload, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Contacts Bulk Deletes provided contacts in bulk. Required Access Level: ModifyContacts
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 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 304 def contacts_delete_post_with_http_info(emails_payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_delete_post ...' end # verify the required parameter 'emails_payload' is set if @api_client.config.client_side_validation && emails_payload.nil? fail ArgumentError, "Missing the required parameter 'emails_payload' when calling ContactsApi.contacts_delete_post" end # resource path local_var_path = '/contacts/delete' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(emails_payload) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_delete_post", :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: ContactsApi#contacts_delete_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#contacts_export_by_id_status_get(id, opts = {}) ⇒ ExportStatus
Check Export Status Check the current status of the export. Required Access Level: Export
360 361 362 363 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 360 def contacts_export_by_id_status_get(id, opts = {}) data, _status_code, _headers = contacts_export_by_id_status_get_with_http_info(id, opts) data end |
#contacts_export_by_id_status_get_with_http_info(id, opts = {}) ⇒ Array<(ExportStatus, Integer, Hash)>
Check Export Status Check the current status of the export. Required Access Level: Export
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 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 370 def contacts_export_by_id_status_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_export_by_id_status_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 ContactsApi.contacts_export_by_id_status_get" end # resource path local_var_path = '/contacts/export/{id}/status'.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExportStatus' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_export_by_id_status_get", :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: ContactsApi#contacts_export_by_id_status_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#contacts_export_post(opts = {}) ⇒ ExportLink
Export Contacts Request an Export of specified Contacts. Required Access Level: Export
427 428 429 430 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 427 def contacts_export_post(opts = {}) data, _status_code, _headers = contacts_export_post_with_http_info(opts) data end |
#contacts_export_post_with_http_info(opts = {}) ⇒ Array<(ExportLink, Integer, Hash)>
Export Contacts Request an Export of specified Contacts. Required Access Level: Export
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 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 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 441 def contacts_export_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_export_post ...' end # resource path local_var_path = '/contacts/export' # query parameters query_params = opts[:query_params] || {} query_params[:'fileFormat'] = opts[:'file_format'] if !opts[:'file_format'].nil? query_params[:'rule'] = opts[:'rule'] if !opts[:'rule'].nil? query_params[:'emails'] = @api_client.build_collection_param(opts[:'emails'], :multi) if !opts[:'emails'].nil? query_params[:'compressionFormat'] = opts[:'compression_format'] if !opts[:'compression_format'].nil? query_params[:'fileName'] = opts[:'file_name'] if !opts[:'file_name'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExportLink' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_export_post", :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: ContactsApi#contacts_export_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#contacts_get(opts = {}) ⇒ Array<Contact>
Load Contacts Returns a list of contacts. Required Access Level: ViewContacts
496 497 498 499 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 496 def contacts_get(opts = {}) data, _status_code, _headers = contacts_get_with_http_info(opts) data end |
#contacts_get_with_http_info(opts = {}) ⇒ Array<(Array<Contact>, Integer, Hash)>
Load Contacts Returns a list of contacts. Required Access Level: ViewContacts
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 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 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 507 def contacts_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_get ...' end # resource path local_var_path = '/contacts' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Contact>' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_get", :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: ContactsApi#contacts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#contacts_import_post(opts = {}) ⇒ nil
Upload Contacts Upload contacts from a file. Required Access Level: ModifyContacts
560 561 562 563 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 560 def contacts_import_post(opts = {}) contacts_import_post_with_http_info(opts) nil end |
#contacts_import_post_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Upload Contacts Upload contacts from a file. Required Access Level: ModifyContacts
572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 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 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 572 def contacts_import_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_import_post ...' end # resource path local_var_path = '/contacts/import' # query parameters query_params = opts[:query_params] || {} query_params[:'listName'] = opts[:'list_name'] if !opts[:'list_name'].nil? query_params[:'encodingName'] = opts[:'encoding_name'] if !opts[:'encoding_name'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['file'] = opts[:'file'] if !opts[:'file'].nil? # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_import_post", :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: ContactsApi#contacts_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#contacts_post(contact_payload, opts = {}) ⇒ Array<Contact>
Add Contact Add new Contacts to your Lists. Up to 1000 can be added (for more please refer to the import request). Required Access Level: ModifyContacts
628 629 630 631 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 628 def contacts_post(contact_payload, opts = {}) data, _status_code, _headers = contacts_post_with_http_info(contact_payload, opts) data end |
#contacts_post_with_http_info(contact_payload, opts = {}) ⇒ Array<(Array<Contact>, Integer, Hash)>
Add Contact Add new Contacts to your Lists. Up to 1000 can be added (for more please refer to the import request). Required Access Level: ModifyContacts
639 640 641 642 643 644 645 646 647 648 649 650 651 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 |
# File 'lib/ElasticEmail/api/contacts_api.rb', line 639 def contacts_post_with_http_info(contact_payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_post ...' end # verify the required parameter 'contact_payload' is set if @api_client.config.client_side_validation && contact_payload.nil? fail ArgumentError, "Missing the required parameter 'contact_payload' when calling ContactsApi.contacts_post" end # resource path local_var_path = '/contacts' # query parameters query_params = opts[:query_params] || {} query_params[:'listnames'] = @api_client.build_collection_param(opts[:'listnames'], :multi) if !opts[:'listnames'].nil? # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(contact_payload) # return_type return_type = opts[:debug_return_type] || 'Array<Contact>' # auth_names auth_names = opts[:debug_auth_names] || ['apikey'] = opts.merge( :operation => :"ContactsApi.contacts_post", :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: ContactsApi#contacts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |