Class: Propertyware::ContactsApi
- Inherits:
-
Object
- Object
- Propertyware::ContactsApi
- Defined in:
- lib/propertyware/api/contacts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_contact(save_contact, opts = {}) ⇒ Contact
Create a contact (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program.
-
#create_contact_with_http_info(save_contact, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Create a contact (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program.
-
#create_contacts_using_post1(save_contact, opts = {}) ⇒ Array<RESTAPIBulkSuccessResponse>
Create contacts in bulk (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program.
-
#create_contacts_using_post1_with_http_info(save_contact, opts = {}) ⇒ Array<(Array<RESTAPIBulkSuccessResponse>, Integer, Hash)>
Create contacts in bulk (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program.
-
#delete_contact(contact_id, opts = {}) ⇒ ResponseEntity
Delete a contact (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program.
-
#delete_contact_conversation(contact_id, conversation_id, opts = {}) ⇒ ResponseEntity
Delete a contact conversation (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program.
-
#delete_contact_conversation_with_http_info(contact_id, conversation_id, opts = {}) ⇒ Array<(ResponseEntity, Integer, Hash)>
Delete a contact conversation (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program.
-
#delete_contact_with_http_info(contact_id, opts = {}) ⇒ Array<(ResponseEntity, Integer, Hash)>
Delete a contact (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program.
-
#get_contact(contact_id, opts = {}) ⇒ Contact
Retrieve a contact Retrieves a specific contact.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> -
Read
. -
#get_contact_conversation(contact_id, conversation_id, opts = {}) ⇒ Conversation
Retrieve a contact conversation Retrieves a specific contact conversation.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> -
Read
. -
#get_contact_conversation_with_http_info(contact_id, conversation_id, opts = {}) ⇒ Array<(Conversation, Integer, Hash)>
Retrieve a contact conversation Retrieves a specific contact conversation.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Read</code>.
-
#get_contact_conversations(contact_id, opts = {}) ⇒ Array<Conversation>
Retrieve all contact conversations Retrieves all the conversations of a contact.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> -
Read
<br/><br/>Sortable by:createddate
,lastmodifieddatetime
,id
. -
#get_contact_conversations_with_http_info(contact_id, opts = {}) ⇒ Array<(Array<Conversation>, Integer, Hash)>
Retrieve all contact conversations Retrieves all the conversations of a contact.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>createddate</code>, <code>lastmodifieddatetime</code>, <code>id</code>.
-
#get_contact_with_http_info(contact_id, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Retrieve a contact Retrieves a specific contact.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Read</code>.
-
#get_contacts(opts = {}) ⇒ Array<Contact>
Retrieve all contacts Retrieves a list of contacts.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> -
Read
<br/><br/>Sortable by:firstname
,createddate
,lastname
,email
,type
,lastmodifieddatetime
,id
. -
#get_contacts_with_http_info(opts = {}) ⇒ Array<(Array<Contact>, Integer, Hash)>
Retrieve all contacts Retrieves a list of contacts.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>firstname</code>, <code>createddate</code>, <code>lastname</code>, <code>email</code>, <code>type</code>, <code>lastmodifieddatetime</code>, <code>id</code>.
-
#initialize(api_client = ApiClient.default) ⇒ ContactsApi
constructor
A new instance of ContactsApi.
-
#update_contact(contact_id, save_contact, opts = {}) ⇒ Contact
Update a contact (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program.
-
#update_contact_with_http_info(contact_id, save_contact, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Update a contact (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ContactsApi
Returns a new instance of ContactsApi.
19 20 21 |
# File 'lib/propertyware/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/propertyware/api/contacts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_contact(save_contact, opts = {}) ⇒ Contact
Create a contact (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program. Please reach out to support if you’d like to be included.</p> Creates a contact.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> - Write
27 28 29 30 |
# File 'lib/propertyware/api/contacts_api.rb', line 27 def create_contact(save_contact, opts = {}) data, _status_code, _headers = create_contact_with_http_info(save_contact, opts) data end |
#create_contact_with_http_info(save_contact, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Create a contact (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates a contact.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Write</code>
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 82 83 84 85 86 87 88 |
# File 'lib/propertyware/api/contacts_api.rb', line 37 def create_contact_with_http_info(save_contact, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.create_contact ...' end # verify the required parameter 'save_contact' is set if @api_client.config.client_side_validation && save_contact.nil? fail ArgumentError, "Missing the required parameter 'save_contact' when calling ContactsApi.create_contact" end # resource path local_var_path = '/contacts' # 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(save_contact) # return_type return_type = opts[:debug_return_type] || 'Contact' # auth_names auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret'] = opts.merge( :operation => :"ContactsApi.create_contact", :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#create_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_contacts_using_post1(save_contact, opts = {}) ⇒ Array<RESTAPIBulkSuccessResponse>
Create contacts in bulk (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program. Please reach out to support if you’d like to be included.</p> Creates contacts in bulk.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> - Write
95 96 97 98 |
# File 'lib/propertyware/api/contacts_api.rb', line 95 def create_contacts_using_post1(save_contact, opts = {}) data, _status_code, _headers = create_contacts_using_post1_with_http_info(save_contact, opts) data end |
#create_contacts_using_post1_with_http_info(save_contact, opts = {}) ⇒ Array<(Array<RESTAPIBulkSuccessResponse>, Integer, Hash)>
Create contacts in bulk (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates contacts in bulk.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Write</code>
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 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/propertyware/api/contacts_api.rb', line 105 def create_contacts_using_post1_with_http_info(save_contact, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.create_contacts_using_post1 ...' end # verify the required parameter 'save_contact' is set if @api_client.config.client_side_validation && save_contact.nil? fail ArgumentError, "Missing the required parameter 'save_contact' when calling ContactsApi.create_contacts_using_post1" end # resource path local_var_path = '/contacts/bulk' # 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(save_contact) # return_type return_type = opts[:debug_return_type] || 'Array<RESTAPIBulkSuccessResponse>' # auth_names auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret'] = opts.merge( :operation => :"ContactsApi.create_contacts_using_post1", :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#create_contacts_using_post1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_contact(contact_id, opts = {}) ⇒ ResponseEntity
Delete a contact (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program. Please reach out to support if you’d like to be included.</p> Deletes a contact.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> - Delete
163 164 165 166 |
# File 'lib/propertyware/api/contacts_api.rb', line 163 def delete_contact(contact_id, opts = {}) data, _status_code, _headers = delete_contact_with_http_info(contact_id, opts) data end |
#delete_contact_conversation(contact_id, conversation_id, opts = {}) ⇒ ResponseEntity
Delete a contact conversation (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program. Please reach out to support if you’d like to be included.</p> Deletes a specific contact conversation.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> - Delete
227 228 229 230 |
# File 'lib/propertyware/api/contacts_api.rb', line 227 def delete_contact_conversation(contact_id, conversation_id, opts = {}) data, _status_code, _headers = delete_contact_conversation_with_http_info(contact_id, conversation_id, opts) data end |
#delete_contact_conversation_with_http_info(contact_id, conversation_id, opts = {}) ⇒ Array<(ResponseEntity, Integer, Hash)>
Delete a contact conversation (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Deletes a specific contact conversation.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Delete</code>
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 288 |
# File 'lib/propertyware/api/contacts_api.rb', line 238 def delete_contact_conversation_with_http_info(contact_id, conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.delete_contact_conversation ...' end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.delete_contact_conversation" end # verify the required parameter 'conversation_id' is set if @api_client.config.client_side_validation && conversation_id.nil? fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ContactsApi.delete_contact_conversation" end # resource path local_var_path = '/contacts/{contactID}/conversations/{conversationID}'.sub('{' + 'contactID' + '}', CGI.escape(contact_id.to_s)).sub('{' + 'conversationID' + '}', CGI.escape(conversation_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] || 'ResponseEntity' # auth_names auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret'] = opts.merge( :operation => :"ContactsApi.delete_contact_conversation", :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#delete_contact_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_contact_with_http_info(contact_id, opts = {}) ⇒ Array<(ResponseEntity, Integer, Hash)>
Delete a contact (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Deletes a contact.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Delete</code>
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 214 215 216 217 218 219 |
# File 'lib/propertyware/api/contacts_api.rb', line 173 def delete_contact_with_http_info(contact_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.delete_contact ...' end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.delete_contact" end # resource path local_var_path = '/contacts/{contactID}'.sub('{' + 'contactID' + '}', CGI.escape(contact_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] || 'ResponseEntity' # auth_names auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret'] = opts.merge( :operation => :"ContactsApi.delete_contact", :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#delete_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_contact(contact_id, opts = {}) ⇒ Contact
Retrieve a contact Retrieves a specific contact.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> - Read
296 297 298 299 |
# File 'lib/propertyware/api/contacts_api.rb', line 296 def get_contact(contact_id, opts = {}) data, _status_code, _headers = get_contact_with_http_info(contact_id, opts) data end |
#get_contact_conversation(contact_id, conversation_id, opts = {}) ⇒ Conversation
Retrieve a contact conversation Retrieves a specific contact conversation.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> - Read
362 363 364 365 |
# File 'lib/propertyware/api/contacts_api.rb', line 362 def get_contact_conversation(contact_id, conversation_id, opts = {}) data, _status_code, _headers = get_contact_conversation_with_http_info(contact_id, conversation_id, opts) data end |
#get_contact_conversation_with_http_info(contact_id, conversation_id, opts = {}) ⇒ Array<(Conversation, Integer, Hash)>
Retrieve a contact conversation Retrieves a specific contact conversation.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Read</code>
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 421 422 423 |
# File 'lib/propertyware/api/contacts_api.rb', line 373 def get_contact_conversation_with_http_info(contact_id, conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact_conversation ...' end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.get_contact_conversation" end # verify the required parameter 'conversation_id' is set if @api_client.config.client_side_validation && conversation_id.nil? fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ContactsApi.get_contact_conversation" end # resource path local_var_path = '/contacts/{contactID}/conversations/{conversationID}'.sub('{' + 'contactID' + '}', CGI.escape(contact_id.to_s)).sub('{' + 'conversationID' + '}', CGI.escape(conversation_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] || 'Conversation' # auth_names auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret'] = opts.merge( :operation => :"ContactsApi.get_contact_conversation", :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#get_contact_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_contact_conversations(contact_id, opts = {}) ⇒ Array<Conversation>
Retrieve all contact conversations Retrieves all the conversations of a contact.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> - Read
<br/><br/>Sortable by: createddate
, lastmodifieddatetime
, id
436 437 438 439 |
# File 'lib/propertyware/api/contacts_api.rb', line 436 def get_contact_conversations(contact_id, opts = {}) data, _status_code, _headers = get_contact_conversations_with_http_info(contact_id, opts) data end |
#get_contact_conversations_with_http_info(contact_id, opts = {}) ⇒ Array<(Array<Conversation>, Integer, Hash)>
Retrieve all contact conversations Retrieves all the conversations of a contact.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>createddate</code>, <code>lastmodifieddatetime</code>, <code>id</code>
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 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'lib/propertyware/api/contacts_api.rb', line 452 def get_contact_conversations_with_http_info(contact_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact_conversations ...' end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.get_contact_conversations" end allowable_values = ["MANAGEMENT_TEAM", "OWNER", "TENANT"] if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type']) fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end # resource path local_var_path = '/contacts/{contactID}/conversations'.sub('{' + 'contactID' + '}', CGI.escape(contact_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil? query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil? query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].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<Conversation>' # auth_names auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret'] = opts.merge( :operation => :"ContactsApi.get_contact_conversations", :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#get_contact_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_contact_with_http_info(contact_id, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Retrieve a contact Retrieves a specific contact.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Read</code>
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 354 |
# File 'lib/propertyware/api/contacts_api.rb', line 307 def get_contact_with_http_info(contact_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact ...' end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.get_contact" end # resource path local_var_path = '/contacts/{contactID}'.sub('{' + 'contactID' + '}', CGI.escape(contact_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'includeCustomFields'] = opts[:'include_custom_fields'] if !opts[:'include_custom_fields'].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] || 'Contact' # auth_names auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret'] = opts.merge( :operation => :"ContactsApi.get_contact", :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#get_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_contacts(opts = {}) ⇒ Array<Contact>
Retrieve all contacts Retrieves a list of contacts.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> - Read
<br/><br/>Sortable by: firstname
, createddate
, lastname
, email
, type
, lastmodifieddatetime
, id
521 522 523 524 |
# File 'lib/propertyware/api/contacts_api.rb', line 521 def get_contacts(opts = {}) data, _status_code, _headers = get_contacts_with_http_info(opts) data end |
#get_contacts_with_http_info(opts = {}) ⇒ Array<(Array<Contact>, Integer, Hash)>
Retrieve all contacts Retrieves a list of contacts.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>firstname</code>, <code>createddate</code>, <code>lastname</code>, <code>email</code>, <code>type</code>, <code>lastmodifieddatetime</code>, <code>id</code>
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 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'lib/propertyware/api/contacts_api.rb', line 537 def get_contacts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.get_contacts ...' end allowable_values = ["TENANT", "PROSPECT", "OWNER", "VENDOR", "OTHER"] if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type']) fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end # resource path local_var_path = '/contacts' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil? query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil? query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'includeCustomFields'] = opts[:'include_custom_fields'] if !opts[:'include_custom_fields'].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] || ['organizationId', 'clientId', 'clientSecret'] = opts.merge( :operation => :"ContactsApi.get_contacts", :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#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_contact(contact_id, save_contact, opts = {}) ⇒ Contact
Update a contact (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program. Please reach out to support if you’d like to be included.</p> Updates a contact.<br/><br/>Required permission:<br/><span class="permissionBlock">CONTACTS</span> - Write
598 599 600 601 |
# File 'lib/propertyware/api/contacts_api.rb', line 598 def update_contact(contact_id, save_contact, opts = {}) data, _status_code, _headers = update_contact_with_http_info(contact_id, save_contact, opts) data end |
#update_contact_with_http_info(contact_id, save_contact, opts = {}) ⇒ Array<(Contact, Integer, Hash)>
Update a contact (BETA) <p class="betaError"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Updates a contact.<br/><br/><b>Required permission:</b><br/><span class="permissionBlock">CONTACTS</span> - <code>Write</code>
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 636 637 638 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 |
# File 'lib/propertyware/api/contacts_api.rb', line 609 def update_contact_with_http_info(contact_id, save_contact, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ContactsApi.update_contact ...' end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.update_contact" end # verify the required parameter 'save_contact' is set if @api_client.config.client_side_validation && save_contact.nil? fail ArgumentError, "Missing the required parameter 'save_contact' when calling ContactsApi.update_contact" end # resource path local_var_path = '/contacts/{contactID}'.sub('{' + 'contactID' + '}', CGI.escape(contact_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' 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(save_contact) # return_type return_type = opts[:debug_return_type] || 'Contact' # auth_names auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret'] = opts.merge( :operation => :"ContactsApi.update_contact", :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#update_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |