asposeemailcloud 18.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,960 @@
1
+ =begin
2
+ #Aspose.Email for Cloud API Reference
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module asposeemailcloud
16
+ class EmailClientApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Append message
24
+ #
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :storage
27
+ # @option opts [String] :account_name1
28
+ # @option opts [String] :account_name2
29
+ # @option opts [String] :folder
30
+ # @option opts [String] :mail_path
31
+ # @option opts [BOOLEAN] :mark_as_sent (default to false)
32
+ # @return [SaaSposeResponse]
33
+ def email_client_append_message(opts = {})
34
+ data, _status_code, _headers = email_client_append_message_with_http_info(opts)
35
+ return data
36
+ end
37
+
38
+ # Append message
39
+ #
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [String] :storage
42
+ # @option opts [String] :account_name1
43
+ # @option opts [String] :account_name2
44
+ # @option opts [String] :folder
45
+ # @option opts [String] :mail_path
46
+ # @option opts [BOOLEAN] :mark_as_sent
47
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
48
+ def email_client_append_message_with_http_info(opts = {})
49
+ if @api_client.config.debugging
50
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_append_message ..."
51
+ end
52
+ # resource path
53
+ local_var_path = "/email/client/Append"
54
+
55
+ # query parameters
56
+ query_params = {}
57
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
58
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
59
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
60
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
61
+ query_params[:'mailPath'] = opts[:'mail_path'] if !opts[:'mail_path'].nil?
62
+ query_params[:'markAsSent'] = opts[:'mark_as_sent'] if !opts[:'mark_as_sent'].nil?
63
+
64
+ # header parameters
65
+ header_params = {}
66
+ # HTTP header 'Accept' (if needed)
67
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
68
+ # HTTP header 'Content-Type'
69
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
70
+
71
+ # form parameters
72
+ form_params = {}
73
+
74
+ # http body (model)
75
+ post_body = nil
76
+ auth_names = []
77
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
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 => 'SaaSposeResponse')
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_append_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Append mime message
91
+ #
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [String] :storage
94
+ # @option opts [String] :account_name1
95
+ # @option opts [String] :account_name2
96
+ # @option opts [String] :folder
97
+ # @option opts [String] :base64_mime_message
98
+ # @option opts [BOOLEAN] :mark_as_sent (default to false)
99
+ # @return [SaaSposeResponse]
100
+ def email_client_append_mime_message(opts = {})
101
+ data, _status_code, _headers = email_client_append_mime_message_with_http_info(opts)
102
+ return data
103
+ end
104
+
105
+ # Append mime message
106
+ #
107
+ # @param [Hash] opts the optional parameters
108
+ # @option opts [String] :storage
109
+ # @option opts [String] :account_name1
110
+ # @option opts [String] :account_name2
111
+ # @option opts [String] :folder
112
+ # @option opts [String] :base64_mime_message
113
+ # @option opts [BOOLEAN] :mark_as_sent
114
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
115
+ def email_client_append_mime_message_with_http_info(opts = {})
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_append_mime_message ..."
118
+ end
119
+ # resource path
120
+ local_var_path = "/email/client/AppendMime"
121
+
122
+ # query parameters
123
+ query_params = {}
124
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
125
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
126
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
127
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
128
+ query_params[:'markAsSent'] = opts[:'mark_as_sent'] if !opts[:'mark_as_sent'].nil?
129
+
130
+ # header parameters
131
+ header_params = {}
132
+ # HTTP header 'Accept' (if needed)
133
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
134
+ # HTTP header 'Content-Type'
135
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
136
+
137
+ # form parameters
138
+ form_params = {}
139
+
140
+ # http body (model)
141
+ post_body = @api_client.object_to_http_body(opts[:'base64_mime_message'])
142
+ auth_names = []
143
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => 'SaaSposeResponse')
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_append_mime_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # Create folder
157
+ #
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [String] :storage
160
+ # @option opts [String] :account_name1
161
+ # @option opts [String] :account_name2
162
+ # @option opts [String] :parent_folder
163
+ # @option opts [String] :name
164
+ # @return [SaaSposeResponse]
165
+ def email_client_create_folder(opts = {})
166
+ data, _status_code, _headers = email_client_create_folder_with_http_info(opts)
167
+ return data
168
+ end
169
+
170
+ # Create folder
171
+ #
172
+ # @param [Hash] opts the optional parameters
173
+ # @option opts [String] :storage
174
+ # @option opts [String] :account_name1
175
+ # @option opts [String] :account_name2
176
+ # @option opts [String] :parent_folder
177
+ # @option opts [String] :name
178
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
179
+ def email_client_create_folder_with_http_info(opts = {})
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_create_folder ..."
182
+ end
183
+ # resource path
184
+ local_var_path = "/email/client/CreateFolder"
185
+
186
+ # query parameters
187
+ query_params = {}
188
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
189
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
190
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
191
+ query_params[:'parentFolder'] = opts[:'parent_folder'] if !opts[:'parent_folder'].nil?
192
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
193
+
194
+ # header parameters
195
+ header_params = {}
196
+ # HTTP header 'Accept' (if needed)
197
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
198
+ # HTTP header 'Content-Type'
199
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
200
+
201
+ # form parameters
202
+ form_params = {}
203
+
204
+ # http body (model)
205
+ post_body = nil
206
+ auth_names = []
207
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
208
+ :header_params => header_params,
209
+ :query_params => query_params,
210
+ :form_params => form_params,
211
+ :body => post_body,
212
+ :auth_names => auth_names,
213
+ :return_type => 'SaaSposeResponse')
214
+ if @api_client.config.debugging
215
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
216
+ end
217
+ return data, status_code, headers
218
+ end
219
+
220
+ # Delete folder
221
+ #
222
+ # @param [Hash] opts the optional parameters
223
+ # @option opts [String] :storage
224
+ # @option opts [String] :account_name1
225
+ # @option opts [String] :account_name2
226
+ # @option opts [String] :folder
227
+ # @option opts [BOOLEAN] :delete_permanently (default to false)
228
+ # @return [SaaSposeResponse]
229
+ def email_client_delete_folder(opts = {})
230
+ data, _status_code, _headers = email_client_delete_folder_with_http_info(opts)
231
+ return data
232
+ end
233
+
234
+ # Delete folder
235
+ #
236
+ # @param [Hash] opts the optional parameters
237
+ # @option opts [String] :storage
238
+ # @option opts [String] :account_name1
239
+ # @option opts [String] :account_name2
240
+ # @option opts [String] :folder
241
+ # @option opts [BOOLEAN] :delete_permanently
242
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
243
+ def email_client_delete_folder_with_http_info(opts = {})
244
+ if @api_client.config.debugging
245
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_delete_folder ..."
246
+ end
247
+ # resource path
248
+ local_var_path = "/email/client/DeleteFolder"
249
+
250
+ # query parameters
251
+ query_params = {}
252
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
253
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
254
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
255
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
256
+ query_params[:'deletePermanently'] = opts[:'delete_permanently'] if !opts[:'delete_permanently'].nil?
257
+
258
+ # header parameters
259
+ header_params = {}
260
+ # HTTP header 'Accept' (if needed)
261
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
262
+ # HTTP header 'Content-Type'
263
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
264
+
265
+ # form parameters
266
+ form_params = {}
267
+
268
+ # http body (model)
269
+ post_body = nil
270
+ auth_names = []
271
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
272
+ :header_params => header_params,
273
+ :query_params => query_params,
274
+ :form_params => form_params,
275
+ :body => post_body,
276
+ :auth_names => auth_names,
277
+ :return_type => 'SaaSposeResponse')
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
+ end
281
+ return data, status_code, headers
282
+ end
283
+
284
+ # Delete message
285
+ #
286
+ # @param [Hash] opts the optional parameters
287
+ # @option opts [String] :storage
288
+ # @option opts [String] :account_name1
289
+ # @option opts [String] :account_name2
290
+ # @option opts [String] :message_id
291
+ # @option opts [BOOLEAN] :delete_permanently (default to false)
292
+ # @return [SaaSposeResponse]
293
+ def email_client_delete_message(opts = {})
294
+ data, _status_code, _headers = email_client_delete_message_with_http_info(opts)
295
+ return data
296
+ end
297
+
298
+ # Delete message
299
+ #
300
+ # @param [Hash] opts the optional parameters
301
+ # @option opts [String] :storage
302
+ # @option opts [String] :account_name1
303
+ # @option opts [String] :account_name2
304
+ # @option opts [String] :message_id
305
+ # @option opts [BOOLEAN] :delete_permanently
306
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
307
+ def email_client_delete_message_with_http_info(opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_delete_message ..."
310
+ end
311
+ # resource path
312
+ local_var_path = "/email/client/DeleteMessage"
313
+
314
+ # query parameters
315
+ query_params = {}
316
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
317
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
318
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
319
+ query_params[:'messageId'] = opts[:'message_id'] if !opts[:'message_id'].nil?
320
+ query_params[:'deletePermanently'] = opts[:'delete_permanently'] if !opts[:'delete_permanently'].nil?
321
+
322
+ # header parameters
323
+ header_params = {}
324
+ # HTTP header 'Accept' (if needed)
325
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
326
+ # HTTP header 'Content-Type'
327
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
328
+
329
+ # form parameters
330
+ form_params = {}
331
+
332
+ # http body (model)
333
+ post_body = nil
334
+ auth_names = []
335
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
336
+ :header_params => header_params,
337
+ :query_params => query_params,
338
+ :form_params => form_params,
339
+ :body => post_body,
340
+ :auth_names => auth_names,
341
+ :return_type => 'SaaSposeResponse')
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_delete_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
344
+ end
345
+ return data, status_code, headers
346
+ end
347
+
348
+ # Fetch message
349
+ #
350
+ # @param [Hash] opts the optional parameters
351
+ # @option opts [String] :storage
352
+ # @option opts [String] :account_name1
353
+ # @option opts [String] :account_name2
354
+ # @option opts [String] :message_id
355
+ # @return [MimeResponse]
356
+ def email_client_fetch_message(opts = {})
357
+ data, _status_code, _headers = email_client_fetch_message_with_http_info(opts)
358
+ return data
359
+ end
360
+
361
+ # Fetch message
362
+ #
363
+ # @param [Hash] opts the optional parameters
364
+ # @option opts [String] :storage
365
+ # @option opts [String] :account_name1
366
+ # @option opts [String] :account_name2
367
+ # @option opts [String] :message_id
368
+ # @return [Array<(MimeResponse, Fixnum, Hash)>] MimeResponse data, response status code and response headers
369
+ def email_client_fetch_message_with_http_info(opts = {})
370
+ if @api_client.config.debugging
371
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_fetch_message ..."
372
+ end
373
+ # resource path
374
+ local_var_path = "/email/client/Fetch"
375
+
376
+ # query parameters
377
+ query_params = {}
378
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
379
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
380
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
381
+ query_params[:'messageId'] = opts[:'message_id'] if !opts[:'message_id'].nil?
382
+
383
+ # header parameters
384
+ header_params = {}
385
+ # HTTP header 'Accept' (if needed)
386
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
387
+ # HTTP header 'Content-Type'
388
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
389
+
390
+ # form parameters
391
+ form_params = {}
392
+
393
+ # http body (model)
394
+ post_body = nil
395
+ auth_names = []
396
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
397
+ :header_params => header_params,
398
+ :query_params => query_params,
399
+ :form_params => form_params,
400
+ :body => post_body,
401
+ :auth_names => auth_names,
402
+ :return_type => 'MimeResponse')
403
+ if @api_client.config.debugging
404
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_fetch_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
405
+ end
406
+ return data, status_code, headers
407
+ end
408
+
409
+ # List folders
410
+ #
411
+ # @param [Hash] opts the optional parameters
412
+ # @option opts [String] :storage
413
+ # @option opts [String] :account_name1
414
+ # @option opts [String] :account_name2
415
+ # @option opts [String] :parent_folder
416
+ # @return [ListFoldersResponse]
417
+ def email_client_list_folders(opts = {})
418
+ data, _status_code, _headers = email_client_list_folders_with_http_info(opts)
419
+ return data
420
+ end
421
+
422
+ # List folders
423
+ #
424
+ # @param [Hash] opts the optional parameters
425
+ # @option opts [String] :storage
426
+ # @option opts [String] :account_name1
427
+ # @option opts [String] :account_name2
428
+ # @option opts [String] :parent_folder
429
+ # @return [Array<(ListFoldersResponse, Fixnum, Hash)>] ListFoldersResponse data, response status code and response headers
430
+ def email_client_list_folders_with_http_info(opts = {})
431
+ if @api_client.config.debugging
432
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_list_folders ..."
433
+ end
434
+ # resource path
435
+ local_var_path = "/email/client/ListFolders"
436
+
437
+ # query parameters
438
+ query_params = {}
439
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
440
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
441
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
442
+ query_params[:'parentFolder'] = opts[:'parent_folder'] if !opts[:'parent_folder'].nil?
443
+
444
+ # header parameters
445
+ header_params = {}
446
+ # HTTP header 'Accept' (if needed)
447
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
448
+ # HTTP header 'Content-Type'
449
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
450
+
451
+ # form parameters
452
+ form_params = {}
453
+
454
+ # http body (model)
455
+ post_body = nil
456
+ auth_names = []
457
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
458
+ :header_params => header_params,
459
+ :query_params => query_params,
460
+ :form_params => form_params,
461
+ :body => post_body,
462
+ :auth_names => auth_names,
463
+ :return_type => 'ListFoldersResponse')
464
+ if @api_client.config.debugging
465
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_list_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
466
+ end
467
+ return data, status_code, headers
468
+ end
469
+
470
+ # List messages
471
+ #
472
+ # @param [Hash] opts the optional parameters
473
+ # @option opts [String] :storage
474
+ # @option opts [String] :account_name1
475
+ # @option opts [String] :account_name2
476
+ # @option opts [String] :folder
477
+ # @option opts [BOOLEAN] :recursive (default to false)
478
+ # @option opts [String] :query_string
479
+ # @return [ListResponse]
480
+ def email_client_list_messages(opts = {})
481
+ data, _status_code, _headers = email_client_list_messages_with_http_info(opts)
482
+ return data
483
+ end
484
+
485
+ # List messages
486
+ #
487
+ # @param [Hash] opts the optional parameters
488
+ # @option opts [String] :storage
489
+ # @option opts [String] :account_name1
490
+ # @option opts [String] :account_name2
491
+ # @option opts [String] :folder
492
+ # @option opts [BOOLEAN] :recursive
493
+ # @option opts [String] :query_string
494
+ # @return [Array<(ListResponse, Fixnum, Hash)>] ListResponse data, response status code and response headers
495
+ def email_client_list_messages_with_http_info(opts = {})
496
+ if @api_client.config.debugging
497
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_list_messages ..."
498
+ end
499
+ # resource path
500
+ local_var_path = "/email/client/ListMessages"
501
+
502
+ # query parameters
503
+ query_params = {}
504
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
505
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
506
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
507
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
508
+ query_params[:'recursive'] = opts[:'recursive'] if !opts[:'recursive'].nil?
509
+ query_params[:'queryString'] = opts[:'query_string'] if !opts[:'query_string'].nil?
510
+
511
+ # header parameters
512
+ header_params = {}
513
+ # HTTP header 'Accept' (if needed)
514
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
515
+ # HTTP header 'Content-Type'
516
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
517
+
518
+ # form parameters
519
+ form_params = {}
520
+
521
+ # http body (model)
522
+ post_body = nil
523
+ auth_names = []
524
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
525
+ :header_params => header_params,
526
+ :query_params => query_params,
527
+ :form_params => form_params,
528
+ :body => post_body,
529
+ :auth_names => auth_names,
530
+ :return_type => 'ListResponse')
531
+ if @api_client.config.debugging
532
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_list_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
533
+ end
534
+ return data, status_code, headers
535
+ end
536
+
537
+ # Save mail account
538
+ #
539
+ # @param storage
540
+ # @param account_name
541
+ # @param host
542
+ # @param port
543
+ # @param login
544
+ # @param password
545
+ # @param security_options
546
+ # @param protocol_type
547
+ # @param description
548
+ # @param [Hash] opts the optional parameters
549
+ # @return [SaaSposeResponse]
550
+ def email_client_save_mail_account(storage, account_name, host, port, login, password, security_options, protocol_type, description, opts = {})
551
+ data, _status_code, _headers = email_client_save_mail_account_with_http_info(storage, account_name, host, port, login, password, security_options, protocol_type, description, opts)
552
+ return data
553
+ end
554
+
555
+ # Save mail account
556
+ #
557
+ # @param storage
558
+ # @param account_name
559
+ # @param host
560
+ # @param port
561
+ # @param login
562
+ # @param password
563
+ # @param security_options
564
+ # @param protocol_type
565
+ # @param description
566
+ # @param [Hash] opts the optional parameters
567
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
568
+ def email_client_save_mail_account_with_http_info(storage, account_name, host, port, login, password, security_options, protocol_type, description, opts = {})
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_save_mail_account ..."
571
+ end
572
+ # verify the required parameter 'storage' is set
573
+ if @api_client.config.client_side_validation && storage.nil?
574
+ fail ArgumentError, "Missing the required parameter 'storage' when calling EmailClientApi.email_client_save_mail_account"
575
+ end
576
+ # verify the required parameter 'account_name' is set
577
+ if @api_client.config.client_side_validation && account_name.nil?
578
+ fail ArgumentError, "Missing the required parameter 'account_name' when calling EmailClientApi.email_client_save_mail_account"
579
+ end
580
+ # verify the required parameter 'host' is set
581
+ if @api_client.config.client_side_validation && host.nil?
582
+ fail ArgumentError, "Missing the required parameter 'host' when calling EmailClientApi.email_client_save_mail_account"
583
+ end
584
+ # verify the required parameter 'port' is set
585
+ if @api_client.config.client_side_validation && port.nil?
586
+ fail ArgumentError, "Missing the required parameter 'port' when calling EmailClientApi.email_client_save_mail_account"
587
+ end
588
+ # verify the required parameter 'login' is set
589
+ if @api_client.config.client_side_validation && login.nil?
590
+ fail ArgumentError, "Missing the required parameter 'login' when calling EmailClientApi.email_client_save_mail_account"
591
+ end
592
+ # verify the required parameter 'password' is set
593
+ if @api_client.config.client_side_validation && password.nil?
594
+ fail ArgumentError, "Missing the required parameter 'password' when calling EmailClientApi.email_client_save_mail_account"
595
+ end
596
+ # verify the required parameter 'security_options' is set
597
+ if @api_client.config.client_side_validation && security_options.nil?
598
+ fail ArgumentError, "Missing the required parameter 'security_options' when calling EmailClientApi.email_client_save_mail_account"
599
+ end
600
+ # verify the required parameter 'protocol_type' is set
601
+ if @api_client.config.client_side_validation && protocol_type.nil?
602
+ fail ArgumentError, "Missing the required parameter 'protocol_type' when calling EmailClientApi.email_client_save_mail_account"
603
+ end
604
+ # verify the required parameter 'description' is set
605
+ if @api_client.config.client_side_validation && description.nil?
606
+ fail ArgumentError, "Missing the required parameter 'description' when calling EmailClientApi.email_client_save_mail_account"
607
+ end
608
+ # resource path
609
+ local_var_path = "/email/client/SaveMailAccount"
610
+
611
+ # query parameters
612
+ query_params = {}
613
+ query_params[:'storage'] = storage
614
+ query_params[:'accountName'] = account_name
615
+ query_params[:'host'] = host
616
+ query_params[:'port'] = port
617
+ query_params[:'login'] = login
618
+ query_params[:'password'] = password
619
+ query_params[:'securityOptions'] = security_options
620
+ query_params[:'protocolType'] = protocol_type
621
+ query_params[:'description'] = description
622
+
623
+ # header parameters
624
+ header_params = {}
625
+ # HTTP header 'Accept' (if needed)
626
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
627
+ # HTTP header 'Content-Type'
628
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
629
+
630
+ # form parameters
631
+ form_params = {}
632
+
633
+ # http body (model)
634
+ post_body = nil
635
+ auth_names = []
636
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
637
+ :header_params => header_params,
638
+ :query_params => query_params,
639
+ :form_params => form_params,
640
+ :body => post_body,
641
+ :auth_names => auth_names,
642
+ :return_type => 'SaaSposeResponse')
643
+ if @api_client.config.debugging
644
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_save_mail_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
645
+ end
646
+ return data, status_code, headers
647
+ end
648
+
649
+ # Save mail oauth account
650
+ #
651
+ # @param storage
652
+ # @param account_name
653
+ # @param host
654
+ # @param port
655
+ # @param login
656
+ # @param client_id
657
+ # @param client_secret
658
+ # @param refresh_token
659
+ # @param security_options
660
+ # @param protocol_type
661
+ # @param description
662
+ # @param [Hash] opts the optional parameters
663
+ # @return [SaaSposeResponse]
664
+ def email_client_save_mail_o_auth_account(storage, account_name, host, port, login, client_id, client_secret, refresh_token, security_options, protocol_type, description, opts = {})
665
+ data, _status_code, _headers = email_client_save_mail_o_auth_account_with_http_info(storage, account_name, host, port, login, client_id, client_secret, refresh_token, security_options, protocol_type, description, opts)
666
+ return data
667
+ end
668
+
669
+ # Save mail oauth account
670
+ #
671
+ # @param storage
672
+ # @param account_name
673
+ # @param host
674
+ # @param port
675
+ # @param login
676
+ # @param client_id
677
+ # @param client_secret
678
+ # @param refresh_token
679
+ # @param security_options
680
+ # @param protocol_type
681
+ # @param description
682
+ # @param [Hash] opts the optional parameters
683
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
684
+ def email_client_save_mail_o_auth_account_with_http_info(storage, account_name, host, port, login, client_id, client_secret, refresh_token, security_options, protocol_type, description, opts = {})
685
+ if @api_client.config.debugging
686
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_save_mail_o_auth_account ..."
687
+ end
688
+ # verify the required parameter 'storage' is set
689
+ if @api_client.config.client_side_validation && storage.nil?
690
+ fail ArgumentError, "Missing the required parameter 'storage' when calling EmailClientApi.email_client_save_mail_o_auth_account"
691
+ end
692
+ # verify the required parameter 'account_name' is set
693
+ if @api_client.config.client_side_validation && account_name.nil?
694
+ fail ArgumentError, "Missing the required parameter 'account_name' when calling EmailClientApi.email_client_save_mail_o_auth_account"
695
+ end
696
+ # verify the required parameter 'host' is set
697
+ if @api_client.config.client_side_validation && host.nil?
698
+ fail ArgumentError, "Missing the required parameter 'host' when calling EmailClientApi.email_client_save_mail_o_auth_account"
699
+ end
700
+ # verify the required parameter 'port' is set
701
+ if @api_client.config.client_side_validation && port.nil?
702
+ fail ArgumentError, "Missing the required parameter 'port' when calling EmailClientApi.email_client_save_mail_o_auth_account"
703
+ end
704
+ # verify the required parameter 'login' is set
705
+ if @api_client.config.client_side_validation && login.nil?
706
+ fail ArgumentError, "Missing the required parameter 'login' when calling EmailClientApi.email_client_save_mail_o_auth_account"
707
+ end
708
+ # verify the required parameter 'client_id' is set
709
+ if @api_client.config.client_side_validation && client_id.nil?
710
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling EmailClientApi.email_client_save_mail_o_auth_account"
711
+ end
712
+ # verify the required parameter 'client_secret' is set
713
+ if @api_client.config.client_side_validation && client_secret.nil?
714
+ fail ArgumentError, "Missing the required parameter 'client_secret' when calling EmailClientApi.email_client_save_mail_o_auth_account"
715
+ end
716
+ # verify the required parameter 'refresh_token' is set
717
+ if @api_client.config.client_side_validation && refresh_token.nil?
718
+ fail ArgumentError, "Missing the required parameter 'refresh_token' when calling EmailClientApi.email_client_save_mail_o_auth_account"
719
+ end
720
+ # verify the required parameter 'security_options' is set
721
+ if @api_client.config.client_side_validation && security_options.nil?
722
+ fail ArgumentError, "Missing the required parameter 'security_options' when calling EmailClientApi.email_client_save_mail_o_auth_account"
723
+ end
724
+ # verify the required parameter 'protocol_type' is set
725
+ if @api_client.config.client_side_validation && protocol_type.nil?
726
+ fail ArgumentError, "Missing the required parameter 'protocol_type' when calling EmailClientApi.email_client_save_mail_o_auth_account"
727
+ end
728
+ # verify the required parameter 'description' is set
729
+ if @api_client.config.client_side_validation && description.nil?
730
+ fail ArgumentError, "Missing the required parameter 'description' when calling EmailClientApi.email_client_save_mail_o_auth_account"
731
+ end
732
+ # resource path
733
+ local_var_path = "/email/client/SaveMailOAuthAccount"
734
+
735
+ # query parameters
736
+ query_params = {}
737
+ query_params[:'storage'] = storage
738
+ query_params[:'accountName'] = account_name
739
+ query_params[:'host'] = host
740
+ query_params[:'port'] = port
741
+ query_params[:'login'] = login
742
+ query_params[:'clientId'] = client_id
743
+ query_params[:'clientSecret'] = client_secret
744
+ query_params[:'refreshToken'] = refresh_token
745
+ query_params[:'securityOptions'] = security_options
746
+ query_params[:'protocolType'] = protocol_type
747
+ query_params[:'description'] = description
748
+
749
+ # header parameters
750
+ header_params = {}
751
+ # HTTP header 'Accept' (if needed)
752
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
753
+ # HTTP header 'Content-Type'
754
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
755
+
756
+ # form parameters
757
+ form_params = {}
758
+
759
+ # http body (model)
760
+ post_body = nil
761
+ auth_names = []
762
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
763
+ :header_params => header_params,
764
+ :query_params => query_params,
765
+ :form_params => form_params,
766
+ :body => post_body,
767
+ :auth_names => auth_names,
768
+ :return_type => 'SaaSposeResponse')
769
+ if @api_client.config.debugging
770
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_save_mail_o_auth_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
771
+ end
772
+ return data, status_code, headers
773
+ end
774
+
775
+ # Send
776
+ #
777
+ # @param [Hash] opts the optional parameters
778
+ # @option opts [String] :storage
779
+ # @option opts [String] :account_name1
780
+ # @option opts [String] :account_name2
781
+ # @option opts [String] :mail_path
782
+ # @return [SaaSposeResponse]
783
+ def email_client_send(opts = {})
784
+ data, _status_code, _headers = email_client_send_with_http_info(opts)
785
+ return data
786
+ end
787
+
788
+ # Send
789
+ #
790
+ # @param [Hash] opts the optional parameters
791
+ # @option opts [String] :storage
792
+ # @option opts [String] :account_name1
793
+ # @option opts [String] :account_name2
794
+ # @option opts [String] :mail_path
795
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
796
+ def email_client_send_with_http_info(opts = {})
797
+ if @api_client.config.debugging
798
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_send ..."
799
+ end
800
+ # resource path
801
+ local_var_path = "/email/client/Send"
802
+
803
+ # query parameters
804
+ query_params = {}
805
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
806
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
807
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
808
+ query_params[:'mailPath'] = opts[:'mail_path'] if !opts[:'mail_path'].nil?
809
+
810
+ # header parameters
811
+ header_params = {}
812
+ # HTTP header 'Accept' (if needed)
813
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
814
+ # HTTP header 'Content-Type'
815
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
816
+
817
+ # form parameters
818
+ form_params = {}
819
+
820
+ # http body (model)
821
+ post_body = nil
822
+ auth_names = []
823
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
824
+ :header_params => header_params,
825
+ :query_params => query_params,
826
+ :form_params => form_params,
827
+ :body => post_body,
828
+ :auth_names => auth_names,
829
+ :return_type => 'SaaSposeResponse')
830
+ if @api_client.config.debugging
831
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
832
+ end
833
+ return data, status_code, headers
834
+ end
835
+
836
+ # Send Mime
837
+ #
838
+ # @param [Hash] opts the optional parameters
839
+ # @option opts [String] :storage
840
+ # @option opts [String] :account_name1
841
+ # @option opts [String] :account_name2
842
+ # @option opts [String] :base64_mime_message
843
+ # @return [SaaSposeResponse]
844
+ def email_client_send_mime(opts = {})
845
+ data, _status_code, _headers = email_client_send_mime_with_http_info(opts)
846
+ return data
847
+ end
848
+
849
+ # Send Mime
850
+ #
851
+ # @param [Hash] opts the optional parameters
852
+ # @option opts [String] :storage
853
+ # @option opts [String] :account_name1
854
+ # @option opts [String] :account_name2
855
+ # @option opts [String] :base64_mime_message
856
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
857
+ def email_client_send_mime_with_http_info(opts = {})
858
+ if @api_client.config.debugging
859
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_send_mime ..."
860
+ end
861
+ # resource path
862
+ local_var_path = "/email/client/SendMime"
863
+
864
+ # query parameters
865
+ query_params = {}
866
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
867
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
868
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
869
+
870
+ # header parameters
871
+ header_params = {}
872
+ # HTTP header 'Accept' (if needed)
873
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
874
+ # HTTP header 'Content-Type'
875
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
876
+
877
+ # form parameters
878
+ form_params = {}
879
+
880
+ # http body (model)
881
+ post_body = @api_client.object_to_http_body(opts[:'base64_mime_message'])
882
+ auth_names = []
883
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
884
+ :header_params => header_params,
885
+ :query_params => query_params,
886
+ :form_params => form_params,
887
+ :body => post_body,
888
+ :auth_names => auth_names,
889
+ :return_type => 'SaaSposeResponse')
890
+ if @api_client.config.debugging
891
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_send_mime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
892
+ end
893
+ return data, status_code, headers
894
+ end
895
+
896
+ # Set read flag
897
+ #
898
+ # @param [Hash] opts the optional parameters
899
+ # @option opts [String] :storage
900
+ # @option opts [String] :account_name1
901
+ # @option opts [String] :account_name2
902
+ # @option opts [String] :message_id
903
+ # @option opts [BOOLEAN] :is_read (default to false)
904
+ # @return [SaaSposeResponse]
905
+ def email_client_set_read_flag(opts = {})
906
+ data, _status_code, _headers = email_client_set_read_flag_with_http_info(opts)
907
+ return data
908
+ end
909
+
910
+ # Set read flag
911
+ #
912
+ # @param [Hash] opts the optional parameters
913
+ # @option opts [String] :storage
914
+ # @option opts [String] :account_name1
915
+ # @option opts [String] :account_name2
916
+ # @option opts [String] :message_id
917
+ # @option opts [BOOLEAN] :is_read
918
+ # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
919
+ def email_client_set_read_flag_with_http_info(opts = {})
920
+ if @api_client.config.debugging
921
+ @api_client.config.logger.debug "Calling API: EmailClientApi.email_client_set_read_flag ..."
922
+ end
923
+ # resource path
924
+ local_var_path = "/email/client/SetReadFlag"
925
+
926
+ # query parameters
927
+ query_params = {}
928
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
929
+ query_params[:'accountName1'] = opts[:'account_name1'] if !opts[:'account_name1'].nil?
930
+ query_params[:'accountName2'] = opts[:'account_name2'] if !opts[:'account_name2'].nil?
931
+ query_params[:'messageId'] = opts[:'message_id'] if !opts[:'message_id'].nil?
932
+ query_params[:'isRead'] = opts[:'is_read'] if !opts[:'is_read'].nil?
933
+
934
+ # header parameters
935
+ header_params = {}
936
+ # HTTP header 'Accept' (if needed)
937
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
938
+ # HTTP header 'Content-Type'
939
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
940
+
941
+ # form parameters
942
+ form_params = {}
943
+
944
+ # http body (model)
945
+ post_body = nil
946
+ auth_names = []
947
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
948
+ :header_params => header_params,
949
+ :query_params => query_params,
950
+ :form_params => form_params,
951
+ :body => post_body,
952
+ :auth_names => auth_names,
953
+ :return_type => 'SaaSposeResponse')
954
+ if @api_client.config.debugging
955
+ @api_client.config.logger.debug "API called: EmailClientApi#email_client_set_read_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
956
+ end
957
+ return data, status_code, headers
958
+ end
959
+ end
960
+ end