Class: UltracartClient::ConversationApi
- Inherits:
-
Object
- Object
- UltracartClient::ConversationApi
- Defined in:
- lib/ultracart_api/api/conversation_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Class Method Summary collapse
Instance Method Summary collapse
-
#get_agent_keep_alive(opts = {}) ⇒ nil
Agent keep alive Called periodically by the conversation API to keep the session alive.
-
#get_agent_keep_alive_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Agent keep alive Called periodically by the conversation API to keep the session alive.
-
#get_agent_websocket_authorization(opts = {}) ⇒ ConversationAgentAuthResponse
Get agent websocket authorization Retrieve a JWT to authorize an agent to make a websocket connection.
-
#get_agent_websocket_authorization_with_http_info(opts = {}) ⇒ Array<(ConversationAgentAuthResponse, Fixnum, Hash)>
Get agent websocket authorization Retrieve a JWT to authorize an agent to make a websocket connection.
-
#get_conversation(conversation_uuid, opts = {}) ⇒ ConversationResponse
Retrieve a conversation Retrieve a conversation including the participants and messages.
-
#get_conversation_messages(conversation_uuid, since, opts = {}) ⇒ ConversationMessagesResponse
Retrieve conversation messages Retrieve conversation messages since a particular time.
-
#get_conversation_messages_with_http_info(conversation_uuid, since, opts = {}) ⇒ Array<(ConversationMessagesResponse, Fixnum, Hash)>
Retrieve conversation messages Retrieve conversation messages since a particular time.
-
#get_conversation_multimedia_upload_url(extension, opts = {}) ⇒ ConversationMultimediaUploadUrlResponse
Get a presigned conersation multimedia upload URL Get a presigned conersation multimedia upload URL.
-
#get_conversation_multimedia_upload_url_with_http_info(extension, opts = {}) ⇒ Array<(ConversationMultimediaUploadUrlResponse, Fixnum, Hash)>
Get a presigned conersation multimedia upload URL Get a presigned conersation multimedia upload URL.
-
#get_conversation_webchat_queue_statuses(opts = {}) ⇒ ConversationWebchatQueueStatusesResponse
Retrieve a conversation webchat queue statuses Retrieve a conversation webchat queue statuses including agent status and queue entries.
-
#get_conversation_webchat_queue_statuses_with_http_info(opts = {}) ⇒ Array<(ConversationWebchatQueueStatusesResponse, Fixnum, Hash)>
Retrieve a conversation webchat queue statuses Retrieve a conversation webchat queue statuses including agent status and queue entries.
-
#get_conversation_with_http_info(conversation_uuid, opts = {}) ⇒ Array<(ConversationResponse, Fixnum, Hash)>
Retrieve a conversation Retrieve a conversation including the participants and messages.
-
#get_conversations(opts = {}) ⇒ ConversationsResponse
Retrieve a list of conversation summaries newest to oldest Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
-
#get_conversations_with_http_info(opts = {}) ⇒ Array<(ConversationsResponse, Fixnum, Hash)>
Retrieve a list of conversation summaries newest to oldest Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
-
#initialize(api_client = ApiClient.default) ⇒ ConversationApi
constructor
A new instance of ConversationApi.
-
#join_conversation(conversation_uuid, opts = {}) ⇒ nil
Join a conversation Join a conversation.
-
#join_conversation_with_http_info(conversation_uuid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Join a conversation Join a conversation.
-
#leave_conversation(conversation_uuid, opts = {}) ⇒ nil
Leave a conversation Leave a conversation.
-
#leave_conversation_with_http_info(conversation_uuid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Leave a conversation Leave a conversation.
-
#start_conversation(start_request, opts = {}) ⇒ ConversationStartResponse
Start a conversation Start a new conversation.
-
#start_conversation_with_http_info(start_request, opts = {}) ⇒ Array<(ConversationStartResponse, Fixnum, Hash)>
Start a conversation Start a new conversation.
-
#update_conversation_webchat_queue_status(queue_name, status_request, opts = {}) ⇒ nil
Update status within the queue Update status within the queue.
-
#update_conversation_webchat_queue_status_with_http_info(queue_name, status_request, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update status within the queue Update status within the queue.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ConversationApi
Returns a new instance of ConversationApi.
19 20 21 |
# File 'lib/ultracart_api/api/conversation_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/ultracart_api/api/conversation_api.rb', line 17 def api_client @api_client end |
Class Method Details
.new_using_api_key(simple_key, verify_ssl = true, debugging = false) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 23 def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false) api_config = Configuration.new api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key api_config.api_version = '2017-03-01' api_config.verify_ssl = verify_ssl api_client = ApiClient.new(api_config) api_client.config.debugging = debugging UltracartClient::ConversationApi.new(api_client) end |
Instance Method Details
#get_agent_keep_alive(opts = {}) ⇒ nil
Agent keep alive Called periodically by the conversation API to keep the session alive.
39 40 41 42 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 39 def get_agent_keep_alive(opts = {}) get_agent_keep_alive_with_http_info(opts) nil end |
#get_agent_keep_alive_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Agent keep alive Called periodically by the conversation API to keep the session alive.
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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 48 def get_agent_keep_alive_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_agent_keep_alive ...' end # resource path local_var_path = '/conversation/agent/keepalive' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_agent_keep_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_agent_websocket_authorization(opts = {}) ⇒ ConversationAgentAuthResponse
Get agent websocket authorization Retrieve a JWT to authorize an agent to make a websocket connection.
87 88 89 90 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 87 def (opts = {}) data, _status_code, _headers = (opts) data end |
#get_agent_websocket_authorization_with_http_info(opts = {}) ⇒ Array<(ConversationAgentAuthResponse, Fixnum, Hash)>
Get agent websocket authorization Retrieve a JWT to authorize an agent to make a websocket connection.
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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 96 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_agent_websocket_authorization ...' end # resource path local_var_path = '/conversation/agent/auth' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationAgentAuthResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_agent_websocket_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_conversation(conversation_uuid, opts = {}) ⇒ ConversationResponse
Retrieve a conversation Retrieve a conversation including the participants and messages
138 139 140 141 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 138 def get_conversation(conversation_uuid, opts = {}) data, _status_code, _headers = get_conversation_with_http_info(conversation_uuid, opts) data end |
#get_conversation_messages(conversation_uuid, since, opts = {}) ⇒ ConversationMessagesResponse
Retrieve conversation messages Retrieve conversation messages since a particular time
197 198 199 200 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 197 def (conversation_uuid, since, opts = {}) data, _status_code, _headers = (conversation_uuid, since, opts) data end |
#get_conversation_messages_with_http_info(conversation_uuid, since, opts = {}) ⇒ Array<(ConversationMessagesResponse, Fixnum, Hash)>
Retrieve conversation messages Retrieve conversation messages since a particular time
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 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 209 def (conversation_uuid, since, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_messages ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation_messages" end # verify the required parameter 'since' is set if @api_client.config.client_side_validation && since.nil? fail ArgumentError, "Missing the required parameter 'since' when calling ConversationApi.get_conversation_messages" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}/messages/{since}'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s).sub('{' + 'since' + '}', since.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationMessagesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_conversation_multimedia_upload_url(extension, opts = {}) ⇒ ConversationMultimediaUploadUrlResponse
Get a presigned conersation multimedia upload URL Get a presigned conersation multimedia upload URL
259 260 261 262 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 259 def get_conversation_multimedia_upload_url(extension, opts = {}) data, _status_code, _headers = get_conversation_multimedia_upload_url_with_http_info(extension, opts) data end |
#get_conversation_multimedia_upload_url_with_http_info(extension, opts = {}) ⇒ Array<(ConversationMultimediaUploadUrlResponse, Fixnum, Hash)>
Get a presigned conersation multimedia upload URL Get a presigned conersation multimedia upload URL
269 270 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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 269 def get_conversation_multimedia_upload_url_with_http_info(extension, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_multimedia_upload_url ...' end # verify the required parameter 'extension' is set if @api_client.config.client_side_validation && extension.nil? fail ArgumentError, "Missing the required parameter 'extension' when calling ConversationApi.get_conversation_multimedia_upload_url" end # resource path local_var_path = '/conversation/upload_url/{extension}'.sub('{' + 'extension' + '}', extension.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationMultimediaUploadUrlResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_multimedia_upload_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_conversation_webchat_queue_statuses(opts = {}) ⇒ ConversationWebchatQueueStatusesResponse
Retrieve a conversation webchat queue statuses Retrieve a conversation webchat queue statuses including agent status and queue entries
313 314 315 316 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 313 def get_conversation_webchat_queue_statuses(opts = {}) data, _status_code, _headers = get_conversation_webchat_queue_statuses_with_http_info(opts) data end |
#get_conversation_webchat_queue_statuses_with_http_info(opts = {}) ⇒ Array<(ConversationWebchatQueueStatusesResponse, Fixnum, Hash)>
Retrieve a conversation webchat queue statuses Retrieve a conversation webchat queue statuses including agent status and queue entries
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 355 356 357 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 322 def get_conversation_webchat_queue_statuses_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_webchat_queue_statuses ...' end # resource path local_var_path = '/conversation/conversations/queues/statuses' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationWebchatQueueStatusesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation_webchat_queue_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_conversation_with_http_info(conversation_uuid, opts = {}) ⇒ Array<(ConversationResponse, Fixnum, Hash)>
Retrieve a conversation Retrieve a conversation including the participants and messages
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 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 149 def get_conversation_with_http_info(conversation_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_conversations(opts = {}) ⇒ ConversationsResponse
Retrieve a list of conversation summaries newest to oldest Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
366 367 368 369 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 366 def get_conversations(opts = {}) data, _status_code, _headers = get_conversations_with_http_info(opts) data end |
#get_conversations_with_http_info(opts = {}) ⇒ Array<(ConversationsResponse, Fixnum, Hash)>
Retrieve a list of conversation summaries newest to oldest Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 379 def get_conversations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversations ...' end # resource path local_var_path = '/conversation/conversations' # query parameters query_params = {} query_params[:'medium'] = opts[:'medium'] if !opts[:'medium'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil? query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#get_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#join_conversation(conversation_uuid, opts = {}) ⇒ nil
Join a conversation Join a conversation
424 425 426 427 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 424 def join_conversation(conversation_uuid, opts = {}) join_conversation_with_http_info(conversation_uuid, opts) nil end |
#join_conversation_with_http_info(conversation_uuid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Join a conversation Join a conversation
434 435 436 437 438 439 440 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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 434 def join_conversation_with_http_info(conversation_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.join_conversation ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.join_conversation" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}/join'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#join_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#leave_conversation(conversation_uuid, opts = {}) ⇒ nil
Leave a conversation Leave a conversation
478 479 480 481 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 478 def leave_conversation(conversation_uuid, opts = {}) leave_conversation_with_http_info(conversation_uuid, opts) nil end |
#leave_conversation_with_http_info(conversation_uuid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Leave a conversation Leave a conversation
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 488 def leave_conversation_with_http_info(conversation_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.leave_conversation ...' end # verify the required parameter 'conversation_uuid' is set if @api_client.config.client_side_validation && conversation_uuid.nil? fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.leave_conversation" end # resource path local_var_path = '/conversation/conversations/{conversation_uuid}/leave'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#leave_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#start_conversation(start_request, opts = {}) ⇒ ConversationStartResponse
Start a conversation Start a new conversation
532 533 534 535 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 532 def start_conversation(start_request, opts = {}) data, _status_code, _headers = start_conversation_with_http_info(start_request, opts) data end |
#start_conversation_with_http_info(start_request, opts = {}) ⇒ Array<(ConversationStartResponse, Fixnum, Hash)>
Start a conversation Start a new conversation
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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 542 def start_conversation_with_http_info(start_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.start_conversation ...' end # verify the required parameter 'start_request' is set if @api_client.config.client_side_validation && start_request.nil? fail ArgumentError, "Missing the required parameter 'start_request' when calling ConversationApi.start_conversation" end # resource path local_var_path = '/conversation/conversations' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = @api_client.object_to_http_body(start_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationStartResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#start_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_conversation_webchat_queue_status(queue_name, status_request, opts = {}) ⇒ nil
Update status within the queue Update status within the queue
588 589 590 591 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 588 def update_conversation_webchat_queue_status(queue_name, status_request, opts = {}) update_conversation_webchat_queue_status_with_http_info(queue_name, status_request, opts) nil end |
#update_conversation_webchat_queue_status_with_http_info(queue_name, status_request, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update status within the queue Update status within the queue
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 636 637 638 639 640 641 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 599 def update_conversation_webchat_queue_status_with_http_info(queue_name, status_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConversationApi.update_conversation_webchat_queue_status ...' end # verify the required parameter 'queue_name' is set if @api_client.config.client_side_validation && queue_name.nil? fail ArgumentError, "Missing the required parameter 'queue_name' when calling ConversationApi.update_conversation_webchat_queue_status" end # verify the required parameter 'status_request' is set if @api_client.config.client_side_validation && status_request.nil? fail ArgumentError, "Missing the required parameter 'status_request' when calling ConversationApi.update_conversation_webchat_queue_status" end # resource path local_var_path = '/conversation/conversations/queues/{queue_name}/status'.sub('{' + 'queue_name' + '}', queue_name.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = @api_client.object_to_http_body(status_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationApi#update_conversation_webchat_queue_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |