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_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 = {}) ⇒ Conversation
Retrieve a conversation Retrieve a conversation including the participants and messages.
-
#get_conversation_multimedia_upload_url(extension, opts = {}) ⇒ nil
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<(nil, Fixnum, Hash)>
Get a presigned conersation multimedia upload URL Get a presigned conersation multimedia upload URL.
-
#get_conversation_with_http_info(conversation_uuid, opts = {}) ⇒ Array<(Conversation, 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.
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_websocket_authorization(opts = {}) ⇒ ConversationAgentAuthResponse
Get agent websocket authorization Retrieve a JWT to authorize an agent to make a websocket connection.
39 40 41 42 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 39 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.
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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 48 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 = {}) ⇒ Conversation
Retrieve a conversation Retrieve a conversation including the participants and messages
89 90 91 92 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 89 def get_conversation(conversation_uuid, opts = {}) data, _status_code, _headers = get_conversation_with_http_info(conversation_uuid, opts) data end |
#get_conversation_multimedia_upload_url(extension, opts = {}) ⇒ nil
Get a presigned conersation multimedia upload URL Get a presigned conersation multimedia upload URL
144 145 146 147 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 144 def get_conversation_multimedia_upload_url(extension, opts = {}) get_conversation_multimedia_upload_url_with_http_info(extension, opts) nil end |
#get_conversation_multimedia_upload_url_with_http_info(extension, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get a presigned conersation multimedia upload URL Get a presigned conersation multimedia upload URL
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 154 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) 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_with_http_info(conversation_uuid, opts = {}) ⇒ Array<(Conversation, Fixnum, Hash)>
Retrieve a conversation Retrieve a conversation including the participants and messages
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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 99 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 = {} # 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 => 'Conversation') 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.
199 200 201 202 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 199 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.
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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 210 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[:'_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
253 254 255 256 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 253 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
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 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 263 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
307 308 309 310 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 307 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
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 355 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 317 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
361 362 363 364 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 361 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
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 |
# File 'lib/ultracart_api/api/conversation_api.rb', line 371 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 |