ultracart_api 4.0.34.rc → 4.0.37.rc

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ # UltracartClient::ConversationMessage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **author_conversation_participant_arn** | **String** | | [optional] |
8
+ | **author_conversation_participant_name** | **String** | | [optional] |
9
+ | **body** | **String** | | [optional] |
10
+ | **media_urls** | **Array<String>** | | [optional] |
11
+ | **message_dts** | **String** | Message date/time | [optional] |
12
+ | **transport_statuses** | [**Array<ConversationMessageTransportStatus>**](ConversationMessageTransportStatus.md) | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'ultracart_api'
18
+
19
+ instance = UltracartClient::ConversationMessage.new(
20
+ author_conversation_participant_arn: null,
21
+ author_conversation_participant_name: null,
22
+ body: null,
23
+ media_urls: null,
24
+ message_dts: null,
25
+ transport_statuses: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,20 @@
1
+ # UltracartClient::ConversationMessageTransportStatus
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversation_participant_arn** | **String** | | [optional] |
8
+ | **status** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::ConversationMessageTransportStatus.new(
16
+ conversation_participant_arn: null,
17
+ status: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,30 @@
1
+ # UltracartClient::ConversationParticipant
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversation_participant_arn** | **String** | | [optional] |
8
+ | **conversation_participant_name** | **String** | | [optional] |
9
+ | **conversation_participant_uuid** | **String** | | [optional] |
10
+ | **joined_dts** | **String** | Joined conversation date/time | [optional] |
11
+ | **last_message_dts** | **String** | Last message date/time | [optional] |
12
+ | **left_dts** | **String** | Left conversation date/time | [optional] |
13
+ | **status** | **String** | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'ultracart_api'
19
+
20
+ instance = UltracartClient::ConversationParticipant.new(
21
+ conversation_participant_arn: null,
22
+ conversation_participant_name: null,
23
+ conversation_participant_uuid: null,
24
+ joined_dts: null,
25
+ last_message_dts: null,
26
+ left_dts: null,
27
+ status: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,20 @@
1
+ # UltracartClient::ConversationStartRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **add_conversation_participant_arns** | **Array<String>** | | [optional] |
8
+ | **conversation_arn** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::ConversationStartRequest.new(
16
+ add_conversation_participant_arns: null,
17
+ conversation_arn: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # UltracartClient::ConversationStartResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversation_arn** | **String** | | [optional] |
8
+ | **conversation_uuid** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::ConversationStartResponse.new(
16
+ conversation_arn: null,
17
+ conversation_uuid: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,34 @@
1
+ # UltracartClient::ConversationSummary
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversation_arn** | **String** | | [optional] |
8
+ | **conversation_uuid** | **String** | | [optional] |
9
+ | **last_conversation_message_body** | **String** | | [optional] |
10
+ | **last_conversation_participant_arn** | **String** | | [optional] |
11
+ | **last_conversation_participant_name** | **String** | | [optional] |
12
+ | **last_message_dts** | **String** | Last message date/time | [optional] |
13
+ | **merchant_id** | **String** | | [optional] |
14
+ | **message_count** | **Integer** | | [optional] |
15
+ | **unread_messages** | **Boolean** | | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ultracart_api'
21
+
22
+ instance = UltracartClient::ConversationSummary.new(
23
+ conversation_arn: null,
24
+ conversation_uuid: null,
25
+ last_conversation_message_body: null,
26
+ last_conversation_participant_arn: null,
27
+ last_conversation_participant_name: null,
28
+ last_message_dts: null,
29
+ merchant_id: null,
30
+ message_count: null,
31
+ unread_messages: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,26 @@
1
+ # UltracartClient::ConversationsResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversations** | [**Array<ConversationSummary>**](ConversationSummary.md) | | [optional] |
8
+ | **error** | [**Error**](Error.md) | | [optional] |
9
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
10
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
11
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::ConversationsResponse.new(
19
+ conversations: null,
20
+ error: null,
21
+ metadata: null,
22
+ success: null,
23
+ warning: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,482 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module UltracartClient
16
+ class ConversationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
24
+ api_config = Configuration.new
25
+ api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
26
+ api_config.api_version = '2017-03-01'
27
+ api_config.verify_ssl = verify_ssl
28
+
29
+ api_client = ApiClient.new(api_config)
30
+ api_client.config.debugging = debugging
31
+
32
+ UltracartClient::ConversationApi.new(api_client)
33
+ end
34
+
35
+ # Get agent websocket authorization
36
+ # Retrieve a JWT to authorize an agent to make a websocket connection.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [ConversationAgentAuthResponse]
39
+ def get_agent_websocket_authorization(opts = {})
40
+ data, _status_code, _headers = get_agent_websocket_authorization_with_http_info(opts)
41
+ data
42
+ end
43
+
44
+ # Get agent websocket authorization
45
+ # Retrieve a JWT to authorize an agent to make a websocket connection.
46
+ # @param [Hash] opts the optional parameters
47
+ # @return [Array<(ConversationAgentAuthResponse, Integer, Hash)>] ConversationAgentAuthResponse data, response status code and response headers
48
+ def get_agent_websocket_authorization_with_http_info(opts = {})
49
+ if @api_client.config.debugging
50
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_agent_websocket_authorization ...'
51
+ end
52
+ # resource path
53
+ local_var_path = '/conversation/agent/auth'
54
+
55
+ # query parameters
56
+ query_params = opts[:query_params] || {}
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:debug_body]
69
+
70
+ # return_type
71
+ return_type = opts[:debug_return_type] || 'ConversationAgentAuthResponse'
72
+
73
+ # auth_names
74
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
75
+
76
+ new_options = opts.merge(
77
+ :operation => :"ConversationApi.get_agent_websocket_authorization",
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => return_type
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: ConversationApi#get_agent_websocket_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
93
+ # Retrieve a conversation
94
+ # Retrieve a conversation including the participants and messages
95
+ # @param conversation_uuid [String]
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Conversation]
98
+ def get_conversation(conversation_uuid, opts = {})
99
+ data, _status_code, _headers = get_conversation_with_http_info(conversation_uuid, opts)
100
+ data
101
+ end
102
+
103
+ # Retrieve a conversation
104
+ # Retrieve a conversation including the participants and messages
105
+ # @param conversation_uuid [String]
106
+ # @param [Hash] opts the optional parameters
107
+ # @return [Array<(Conversation, Integer, Hash)>] Conversation data, response status code and response headers
108
+ def get_conversation_with_http_info(conversation_uuid, opts = {})
109
+ if @api_client.config.debugging
110
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation ...'
111
+ end
112
+ # verify the required parameter 'conversation_uuid' is set
113
+ if @api_client.config.client_side_validation && conversation_uuid.nil?
114
+ fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation"
115
+ end
116
+ # resource path
117
+ local_var_path = '/conversation/conversations/{conversation_uuid}'.sub('{' + 'conversation_uuid' + '}', CGI.escape(conversation_uuid.to_s))
118
+
119
+ # query parameters
120
+ query_params = opts[:query_params] || {}
121
+
122
+ # header parameters
123
+ header_params = opts[:header_params] || {}
124
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:debug_body]
133
+
134
+ # return_type
135
+ return_type = opts[:debug_return_type] || 'Conversation'
136
+
137
+ # auth_names
138
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
139
+
140
+ new_options = opts.merge(
141
+ :operation => :"ConversationApi.get_conversation",
142
+ :header_params => header_params,
143
+ :query_params => query_params,
144
+ :form_params => form_params,
145
+ :body => post_body,
146
+ :auth_names => auth_names,
147
+ :return_type => return_type
148
+ )
149
+
150
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
151
+ if @api_client.config.debugging
152
+ @api_client.config.logger.debug "API called: ConversationApi#get_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
153
+ end
154
+ return data, status_code, headers
155
+ end
156
+
157
+ # Get a presigned conersation multimedia upload URL
158
+ # Get a presigned conersation multimedia upload URL
159
+ # @param extension [String]
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [nil]
162
+ def get_conversation_multimedia_upload_url(extension, opts = {})
163
+ get_conversation_multimedia_upload_url_with_http_info(extension, opts)
164
+ nil
165
+ end
166
+
167
+ # Get a presigned conersation multimedia upload URL
168
+ # Get a presigned conersation multimedia upload URL
169
+ # @param extension [String]
170
+ # @param [Hash] opts the optional parameters
171
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
172
+ def get_conversation_multimedia_upload_url_with_http_info(extension, opts = {})
173
+ if @api_client.config.debugging
174
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_multimedia_upload_url ...'
175
+ end
176
+ # verify the required parameter 'extension' is set
177
+ if @api_client.config.client_side_validation && extension.nil?
178
+ fail ArgumentError, "Missing the required parameter 'extension' when calling ConversationApi.get_conversation_multimedia_upload_url"
179
+ end
180
+ # resource path
181
+ local_var_path = '/conversation/upload_url/{extension}'.sub('{' + 'extension' + '}', CGI.escape(extension.to_s))
182
+
183
+ # query parameters
184
+ query_params = opts[:query_params] || {}
185
+
186
+ # header parameters
187
+ header_params = opts[:header_params] || {}
188
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
191
+
192
+ # form parameters
193
+ form_params = opts[:form_params] || {}
194
+
195
+ # http body (model)
196
+ post_body = opts[:debug_body]
197
+
198
+ # return_type
199
+ return_type = opts[:debug_return_type]
200
+
201
+ # auth_names
202
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
203
+
204
+ new_options = opts.merge(
205
+ :operation => :"ConversationApi.get_conversation_multimedia_upload_url",
206
+ :header_params => header_params,
207
+ :query_params => query_params,
208
+ :form_params => form_params,
209
+ :body => post_body,
210
+ :auth_names => auth_names,
211
+ :return_type => return_type
212
+ )
213
+
214
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: ConversationApi#get_conversation_multimedia_upload_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+
221
+ # Retrieve a list of conversation summaries newest to oldest
222
+ # Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
223
+ # @param [Hash] opts the optional parameters
224
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
225
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
226
+ # @return [ConversationsResponse]
227
+ def get_conversations(opts = {})
228
+ data, _status_code, _headers = get_conversations_with_http_info(opts)
229
+ data
230
+ end
231
+
232
+ # Retrieve a list of conversation summaries newest to oldest
233
+ # Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
234
+ # @param [Hash] opts the optional parameters
235
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
236
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
237
+ # @return [Array<(ConversationsResponse, Integer, Hash)>] ConversationsResponse data, response status code and response headers
238
+ def get_conversations_with_http_info(opts = {})
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversations ...'
241
+ end
242
+ # resource path
243
+ local_var_path = '/conversation/conversations'
244
+
245
+ # query parameters
246
+ query_params = opts[:query_params] || {}
247
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
248
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
249
+
250
+ # header parameters
251
+ header_params = opts[:header_params] || {}
252
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
253
+ # HTTP header 'Accept' (if needed)
254
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
255
+
256
+ # form parameters
257
+ form_params = opts[:form_params] || {}
258
+
259
+ # http body (model)
260
+ post_body = opts[:debug_body]
261
+
262
+ # return_type
263
+ return_type = opts[:debug_return_type] || 'ConversationsResponse'
264
+
265
+ # auth_names
266
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
267
+
268
+ new_options = opts.merge(
269
+ :operation => :"ConversationApi.get_conversations",
270
+ :header_params => header_params,
271
+ :query_params => query_params,
272
+ :form_params => form_params,
273
+ :body => post_body,
274
+ :auth_names => auth_names,
275
+ :return_type => return_type
276
+ )
277
+
278
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: ConversationApi#get_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
+ end
282
+ return data, status_code, headers
283
+ end
284
+
285
+ # Join a conversation
286
+ # Join a conversation
287
+ # @param conversation_uuid [String]
288
+ # @param [Hash] opts the optional parameters
289
+ # @return [nil]
290
+ def join_conversation(conversation_uuid, opts = {})
291
+ join_conversation_with_http_info(conversation_uuid, opts)
292
+ nil
293
+ end
294
+
295
+ # Join a conversation
296
+ # Join a conversation
297
+ # @param conversation_uuid [String]
298
+ # @param [Hash] opts the optional parameters
299
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
300
+ def join_conversation_with_http_info(conversation_uuid, opts = {})
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug 'Calling API: ConversationApi.join_conversation ...'
303
+ end
304
+ # verify the required parameter 'conversation_uuid' is set
305
+ if @api_client.config.client_side_validation && conversation_uuid.nil?
306
+ fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.join_conversation"
307
+ end
308
+ # resource path
309
+ local_var_path = '/conversation/conversations/{conversation_uuid}/join'.sub('{' + 'conversation_uuid' + '}', CGI.escape(conversation_uuid.to_s))
310
+
311
+ # query parameters
312
+ query_params = opts[:query_params] || {}
313
+
314
+ # header parameters
315
+ header_params = opts[:header_params] || {}
316
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
317
+ # HTTP header 'Accept' (if needed)
318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
319
+
320
+ # form parameters
321
+ form_params = opts[:form_params] || {}
322
+
323
+ # http body (model)
324
+ post_body = opts[:debug_body]
325
+
326
+ # return_type
327
+ return_type = opts[:debug_return_type]
328
+
329
+ # auth_names
330
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
331
+
332
+ new_options = opts.merge(
333
+ :operation => :"ConversationApi.join_conversation",
334
+ :header_params => header_params,
335
+ :query_params => query_params,
336
+ :form_params => form_params,
337
+ :body => post_body,
338
+ :auth_names => auth_names,
339
+ :return_type => return_type
340
+ )
341
+
342
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
343
+ if @api_client.config.debugging
344
+ @api_client.config.logger.debug "API called: ConversationApi#join_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
345
+ end
346
+ return data, status_code, headers
347
+ end
348
+
349
+ # Leave a conversation
350
+ # Leave a conversation
351
+ # @param conversation_uuid [String]
352
+ # @param [Hash] opts the optional parameters
353
+ # @return [nil]
354
+ def leave_conversation(conversation_uuid, opts = {})
355
+ leave_conversation_with_http_info(conversation_uuid, opts)
356
+ nil
357
+ end
358
+
359
+ # Leave a conversation
360
+ # Leave a conversation
361
+ # @param conversation_uuid [String]
362
+ # @param [Hash] opts the optional parameters
363
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
364
+ def leave_conversation_with_http_info(conversation_uuid, opts = {})
365
+ if @api_client.config.debugging
366
+ @api_client.config.logger.debug 'Calling API: ConversationApi.leave_conversation ...'
367
+ end
368
+ # verify the required parameter 'conversation_uuid' is set
369
+ if @api_client.config.client_side_validation && conversation_uuid.nil?
370
+ fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.leave_conversation"
371
+ end
372
+ # resource path
373
+ local_var_path = '/conversation/conversations/{conversation_uuid}/leave'.sub('{' + 'conversation_uuid' + '}', CGI.escape(conversation_uuid.to_s))
374
+
375
+ # query parameters
376
+ query_params = opts[:query_params] || {}
377
+
378
+ # header parameters
379
+ header_params = opts[:header_params] || {}
380
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
381
+ # HTTP header 'Accept' (if needed)
382
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
383
+
384
+ # form parameters
385
+ form_params = opts[:form_params] || {}
386
+
387
+ # http body (model)
388
+ post_body = opts[:debug_body]
389
+
390
+ # return_type
391
+ return_type = opts[:debug_return_type]
392
+
393
+ # auth_names
394
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
395
+
396
+ new_options = opts.merge(
397
+ :operation => :"ConversationApi.leave_conversation",
398
+ :header_params => header_params,
399
+ :query_params => query_params,
400
+ :form_params => form_params,
401
+ :body => post_body,
402
+ :auth_names => auth_names,
403
+ :return_type => return_type
404
+ )
405
+
406
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
407
+ if @api_client.config.debugging
408
+ @api_client.config.logger.debug "API called: ConversationApi#leave_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
409
+ end
410
+ return data, status_code, headers
411
+ end
412
+
413
+ # Start a conversation
414
+ # Start a new conversation
415
+ # @param start_request [ConversationStartRequest] Start request
416
+ # @param [Hash] opts the optional parameters
417
+ # @return [ConversationStartResponse]
418
+ def start_conversation(start_request, opts = {})
419
+ data, _status_code, _headers = start_conversation_with_http_info(start_request, opts)
420
+ data
421
+ end
422
+
423
+ # Start a conversation
424
+ # Start a new conversation
425
+ # @param start_request [ConversationStartRequest] Start request
426
+ # @param [Hash] opts the optional parameters
427
+ # @return [Array<(ConversationStartResponse, Integer, Hash)>] ConversationStartResponse data, response status code and response headers
428
+ def start_conversation_with_http_info(start_request, opts = {})
429
+ if @api_client.config.debugging
430
+ @api_client.config.logger.debug 'Calling API: ConversationApi.start_conversation ...'
431
+ end
432
+ # verify the required parameter 'start_request' is set
433
+ if @api_client.config.client_side_validation && start_request.nil?
434
+ fail ArgumentError, "Missing the required parameter 'start_request' when calling ConversationApi.start_conversation"
435
+ end
436
+ # resource path
437
+ local_var_path = '/conversation/conversations'
438
+
439
+ # query parameters
440
+ query_params = opts[:query_params] || {}
441
+
442
+ # header parameters
443
+ header_params = opts[:header_params] || {}
444
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
445
+ # HTTP header 'Accept' (if needed)
446
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
447
+ # HTTP header 'Content-Type'
448
+ content_type = @api_client.select_header_content_type(['application/json'])
449
+ if !content_type.nil?
450
+ header_params['Content-Type'] = content_type
451
+ end
452
+
453
+ # form parameters
454
+ form_params = opts[:form_params] || {}
455
+
456
+ # http body (model)
457
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(start_request)
458
+
459
+ # return_type
460
+ return_type = opts[:debug_return_type] || 'ConversationStartResponse'
461
+
462
+ # auth_names
463
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
464
+
465
+ new_options = opts.merge(
466
+ :operation => :"ConversationApi.start_conversation",
467
+ :header_params => header_params,
468
+ :query_params => query_params,
469
+ :form_params => form_params,
470
+ :body => post_body,
471
+ :auth_names => auth_names,
472
+ :return_type => return_type
473
+ )
474
+
475
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
476
+ if @api_client.config.debugging
477
+ @api_client.config.logger.debug "API called: ConversationApi#start_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
478
+ end
479
+ return data, status_code, headers
480
+ end
481
+ end
482
+ end