aspose_email_cloud 18.7.0 → 19.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose-email-cloud.rb +145 -0
- data/lib/aspose-email-cloud/api/email_api.rb +577 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/api_client.rb +125 -133
- data/lib/aspose-email-cloud/api_error.rb +42 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/configuration.rb +56 -43
- data/lib/aspose-email-cloud/models/account_base_request.rb +250 -0
- data/lib/aspose-email-cloud/models/add_attachment_request.rb +219 -0
- data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +300 -0
- data/lib/aspose-email-cloud/models/append_email_base_request.rb +316 -0
- data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +335 -0
- data/lib/aspose-email-cloud/models/base_object.rb +225 -0
- data/lib/aspose-email-cloud/models/contact_format.rb +45 -0
- data/lib/aspose-email-cloud/models/create_email_request.rb +224 -0
- data/lib/aspose-email-cloud/models/create_folder_base_request.rb +297 -0
- data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +302 -0
- data/lib/aspose-email-cloud/models/delete_message_base_request.rb +302 -0
- data/lib/aspose-email-cloud/models/disc_usage.rb +229 -0
- data/lib/aspose-email-cloud/models/email_account_request.rb +342 -0
- data/lib/aspose-email-cloud/models/email_document.rb +226 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/email_document_response.rb +105 -109
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/email_properties.rb +122 -97
- data/lib/aspose-email-cloud/models/email_property.rb +256 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/email_property_response.rb +105 -109
- data/lib/aspose-email-cloud/models/error.rb +241 -0
- data/lib/aspose-email-cloud/models/error_details.rb +224 -0
- data/lib/aspose-email-cloud/models/file_version.rb +289 -0
- data/lib/aspose-email-cloud/models/file_versions.rb +210 -0
- data/lib/aspose-email-cloud/models/files_list.rb +210 -0
- data/lib/aspose-email-cloud/models/files_upload_result.rb +223 -0
- data/lib/aspose-email-cloud/models/hierarchical_object.rb +238 -0
- data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +224 -0
- data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +219 -0
- data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +254 -0
- data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +252 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/link.rb +138 -116
- data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +208 -0
- data/{src/asposeemailcloud/models/email_document.rb → lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb} +105 -98
- data/{src/asposeemailcloud/models/list_folders_response.rb → lib/aspose-email-cloud/models/list_response_of_string.rb} +105 -111
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/mail_server_folder.rb +116 -96
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/mime_response.rb +105 -109
- data/lib/aspose-email-cloud/models/object_exist.rb +229 -0
- data/lib/aspose-email-cloud/models/primitive_object.rb +236 -0
- data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +101 -0
- data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +92 -0
- data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +94 -0
- data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +78 -0
- data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +96 -0
- data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +108 -0
- data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/email_request.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +93 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +95 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +100 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +92 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +93 -0
- data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +71 -0
- data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +78 -0
- data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +78 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +80 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/http_request.rb +51 -0
- data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +105 -0
- data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +92 -0
- data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +94 -0
- data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +87 -0
- data/lib/aspose-email-cloud/models/save_email_account_request.rb +377 -0
- data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +447 -0
- data/lib/aspose-email-cloud/models/send_email_base_request.rb +267 -0
- data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +286 -0
- data/lib/aspose-email-cloud/models/set_email_property_request.rb +224 -0
- data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +302 -0
- data/{src/asposeemailcloud/models/email_property.rb → lib/aspose-email-cloud/models/storage_exist.rb} +110 -96
- data/lib/aspose-email-cloud/models/storage_file.rb +262 -0
- data/lib/aspose-email-cloud/models/storage_file_location.rb +254 -0
- data/lib/aspose-email-cloud/models/storage_folder_location.rb +219 -0
- data/{src/asposeemailcloud/models/list_response.rb → lib/aspose-email-cloud/models/value_response.rb} +105 -111
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/version.rb +4 -4
- metadata +128 -38
- data/src/asposeemailcloud.rb +0 -55
- data/src/asposeemailcloud/api/email_api.rb +0 -418
- data/src/asposeemailcloud/api/email_client_api.rb +0 -960
- data/src/asposeemailcloud/api_error.rb +0 -38
- data/src/asposeemailcloud/models/http_status_code.rb +0 -76
- data/src/asposeemailcloud/models/protocol_type.rb +0 -34
- data/src/asposeemailcloud/models/saa_spose_response.rb +0 -202
- data/src/asposeemailcloud/models/security_options.rb +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c075bcdb46a2f76b9204b11c09873c0d889a3bcdb9d02a0f46ecfe15506506c1
|
4
|
+
data.tar.gz: 772952f5e68511b621b6129aec90174d4649eef8126006fb45f25f3ea9610d34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 324aa0d6df06ec11523ffd314523392110815ad563035e9af1caae79d0ec2b8e2cba3ba83a8e536b22122f2931ca1786bac0edd0cca3fd282c421833619e01a9
|
7
|
+
data.tar.gz: ed216e2601ec0b56ff02272f691fb33612eb1c7f84d2ada6fb4181d84a3330897ce354589358be83cb550585e3dc1b63706474cb587e5007bd02f2f36fabbc3f
|
@@ -0,0 +1,145 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="aspose-email-cloud.rb">
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ----------------------------------------------------------------------------
|
25
|
+
|
26
|
+
|
27
|
+
# Common files
|
28
|
+
require_relative './aspose-email-cloud/api_client'
|
29
|
+
require_relative './aspose-email-cloud/api_error'
|
30
|
+
require_relative './aspose-email-cloud/version'
|
31
|
+
require_relative './aspose-email-cloud/configuration'
|
32
|
+
|
33
|
+
# Models
|
34
|
+
require_relative './aspose-email-cloud/models/account_base_request'
|
35
|
+
require_relative './aspose-email-cloud/models/add_attachment_request'
|
36
|
+
require_relative './aspose-email-cloud/models/base_object'
|
37
|
+
require_relative './aspose-email-cloud/models/contact_format'
|
38
|
+
require_relative './aspose-email-cloud/models/create_email_request'
|
39
|
+
require_relative './aspose-email-cloud/models/disc_usage'
|
40
|
+
require_relative './aspose-email-cloud/models/email_account_request'
|
41
|
+
require_relative './aspose-email-cloud/models/email_document'
|
42
|
+
require_relative './aspose-email-cloud/models/email_document_response'
|
43
|
+
require_relative './aspose-email-cloud/models/email_properties'
|
44
|
+
require_relative './aspose-email-cloud/models/email_property'
|
45
|
+
require_relative './aspose-email-cloud/models/email_property_response'
|
46
|
+
require_relative './aspose-email-cloud/models/error'
|
47
|
+
require_relative './aspose-email-cloud/models/error_details'
|
48
|
+
require_relative './aspose-email-cloud/models/file_versions'
|
49
|
+
require_relative './aspose-email-cloud/models/files_list'
|
50
|
+
require_relative './aspose-email-cloud/models/files_upload_result'
|
51
|
+
require_relative './aspose-email-cloud/models/hierarchical_object_request'
|
52
|
+
require_relative './aspose-email-cloud/models/hierarchical_object_response'
|
53
|
+
require_relative './aspose-email-cloud/models/link'
|
54
|
+
require_relative './aspose-email-cloud/models/list_response_of_hierarchical_object_response'
|
55
|
+
require_relative './aspose-email-cloud/models/list_response_of_mail_server_folder'
|
56
|
+
require_relative './aspose-email-cloud/models/list_response_of_string'
|
57
|
+
require_relative './aspose-email-cloud/models/mail_server_folder'
|
58
|
+
require_relative './aspose-email-cloud/models/mime_response'
|
59
|
+
require_relative './aspose-email-cloud/models/object_exist'
|
60
|
+
require_relative './aspose-email-cloud/models/set_email_property_request'
|
61
|
+
require_relative './aspose-email-cloud/models/storage_exist'
|
62
|
+
require_relative './aspose-email-cloud/models/storage_file'
|
63
|
+
require_relative './aspose-email-cloud/models/storage_folder_location'
|
64
|
+
require_relative './aspose-email-cloud/models/value_response'
|
65
|
+
require_relative './aspose-email-cloud/models/append_email_account_base_request'
|
66
|
+
require_relative './aspose-email-cloud/models/create_folder_base_request'
|
67
|
+
require_relative './aspose-email-cloud/models/delete_folder_base_request'
|
68
|
+
require_relative './aspose-email-cloud/models/delete_message_base_request'
|
69
|
+
require_relative './aspose-email-cloud/models/file_version'
|
70
|
+
require_relative './aspose-email-cloud/models/hierarchical_object'
|
71
|
+
require_relative './aspose-email-cloud/models/indexed_hierarchical_object'
|
72
|
+
require_relative './aspose-email-cloud/models/indexed_primitive_object'
|
73
|
+
require_relative './aspose-email-cloud/models/primitive_object'
|
74
|
+
require_relative './aspose-email-cloud/models/save_email_account_request'
|
75
|
+
require_relative './aspose-email-cloud/models/save_o_auth_email_account_request'
|
76
|
+
require_relative './aspose-email-cloud/models/send_email_base_request'
|
77
|
+
require_relative './aspose-email-cloud/models/send_email_mime_base_request'
|
78
|
+
require_relative './aspose-email-cloud/models/set_message_read_flag_account_base_request'
|
79
|
+
require_relative './aspose-email-cloud/models/storage_file_location'
|
80
|
+
require_relative './aspose-email-cloud/models/append_email_base_request'
|
81
|
+
require_relative './aspose-email-cloud/models/append_email_mime_base_request'
|
82
|
+
|
83
|
+
# APIs
|
84
|
+
require_relative 'aspose-email-cloud/api/email_api'
|
85
|
+
|
86
|
+
|
87
|
+
#Model requests
|
88
|
+
require_relative './aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb'
|
89
|
+
require_relative './aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb'
|
90
|
+
require_relative './aspose-email-cloud/models/requests/add_email_attachment_request_data.rb'
|
91
|
+
require_relative './aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb'
|
92
|
+
require_relative './aspose-email-cloud/models/requests/append_email_message_request_data.rb'
|
93
|
+
require_relative './aspose-email-cloud/models/requests/append_mime_message_request_data.rb'
|
94
|
+
require_relative './aspose-email-cloud/models/requests/copy_file_request_data.rb'
|
95
|
+
require_relative './aspose-email-cloud/models/requests/copy_folder_request_data.rb'
|
96
|
+
require_relative './aspose-email-cloud/models/requests/create_calendar_request_data.rb'
|
97
|
+
require_relative './aspose-email-cloud/models/requests/create_contact_request_data.rb'
|
98
|
+
require_relative './aspose-email-cloud/models/requests/create_email_folder_request_data.rb'
|
99
|
+
require_relative './aspose-email-cloud/models/requests/create_email_request_data.rb'
|
100
|
+
require_relative './aspose-email-cloud/models/requests/create_folder_request_data.rb'
|
101
|
+
require_relative './aspose-email-cloud/models/requests/create_mapi_request_data.rb'
|
102
|
+
require_relative './aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb'
|
103
|
+
require_relative './aspose-email-cloud/models/requests/delete_contact_property_request_data.rb'
|
104
|
+
require_relative './aspose-email-cloud/models/requests/delete_email_folder_request_data.rb'
|
105
|
+
require_relative './aspose-email-cloud/models/requests/delete_email_message_request_data.rb'
|
106
|
+
require_relative './aspose-email-cloud/models/requests/delete_file_request_data.rb'
|
107
|
+
require_relative './aspose-email-cloud/models/requests/delete_folder_request_data.rb'
|
108
|
+
require_relative './aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb'
|
109
|
+
require_relative './aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb'
|
110
|
+
require_relative './aspose-email-cloud/models/requests/download_file_request_data.rb'
|
111
|
+
require_relative './aspose-email-cloud/models/requests/email_request.rb'
|
112
|
+
require_relative './aspose-email-cloud/models/requests/fetch_email_message_request_data.rb'
|
113
|
+
require_relative './aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb'
|
114
|
+
require_relative './aspose-email-cloud/models/requests/get_calendar_list_request_data.rb'
|
115
|
+
require_relative './aspose-email-cloud/models/requests/get_calendar_request_data.rb'
|
116
|
+
require_relative './aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb'
|
117
|
+
require_relative './aspose-email-cloud/models/requests/get_contact_list_request_data.rb'
|
118
|
+
require_relative './aspose-email-cloud/models/requests/get_contact_properties_request_data.rb'
|
119
|
+
require_relative './aspose-email-cloud/models/requests/get_disc_usage_request_data.rb'
|
120
|
+
require_relative './aspose-email-cloud/models/requests/get_email_attachment_request_data.rb'
|
121
|
+
require_relative './aspose-email-cloud/models/requests/get_email_property_request_data.rb'
|
122
|
+
require_relative './aspose-email-cloud/models/requests/get_email_request_data.rb'
|
123
|
+
require_relative './aspose-email-cloud/models/requests/get_files_list_request_data.rb'
|
124
|
+
require_relative './aspose-email-cloud/models/requests/get_file_versions_request_data.rb'
|
125
|
+
require_relative './aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb'
|
126
|
+
require_relative './aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb'
|
127
|
+
require_relative './aspose-email-cloud/models/requests/get_mapi_list_request_data.rb'
|
128
|
+
require_relative './aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb'
|
129
|
+
require_relative './aspose-email-cloud/models/requests/http_request.rb'
|
130
|
+
require_relative './aspose-email-cloud/models/requests/list_email_folders_request_data.rb'
|
131
|
+
require_relative './aspose-email-cloud/models/requests/list_email_messages_request_data.rb'
|
132
|
+
require_relative './aspose-email-cloud/models/requests/move_file_request_data.rb'
|
133
|
+
require_relative './aspose-email-cloud/models/requests/move_folder_request_data.rb'
|
134
|
+
require_relative './aspose-email-cloud/models/requests/object_exists_request_data.rb'
|
135
|
+
require_relative './aspose-email-cloud/models/requests/save_mail_account_request_data.rb'
|
136
|
+
require_relative './aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb'
|
137
|
+
require_relative './aspose-email-cloud/models/requests/send_email_mime_request_data.rb'
|
138
|
+
require_relative './aspose-email-cloud/models/requests/send_email_request_data.rb'
|
139
|
+
require_relative './aspose-email-cloud/models/requests/set_email_property_request_data.rb'
|
140
|
+
require_relative './aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb'
|
141
|
+
require_relative './aspose-email-cloud/models/requests/storage_exists_request_data.rb'
|
142
|
+
require_relative './aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb'
|
143
|
+
require_relative './aspose-email-cloud/models/requests/update_contact_properties_request_data.rb'
|
144
|
+
require_relative './aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb'
|
145
|
+
require_relative './aspose-email-cloud/models/requests/upload_file_request_data.rb'
|
@@ -0,0 +1,577 @@
|
|
1
|
+
|
2
|
+
# ----------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose" file="email_api.rb">
|
4
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
5
|
+
# </copyright>
|
6
|
+
# <summary>
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
8
|
+
# copy of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
12
|
+
# Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
23
|
+
# DEALINGS IN THE SOFTWARE.
|
24
|
+
# </summary>
|
25
|
+
# ----------------------------------------------------------------------------
|
26
|
+
|
27
|
+
|
28
|
+
require 'uri'
|
29
|
+
|
30
|
+
module AsposeEmailCloud
|
31
|
+
# Aspose.Email Cloud API
|
32
|
+
class EmailApi
|
33
|
+
attr_accessor :api_client
|
34
|
+
|
35
|
+
# Initializes a new instance of the EmailApi class.
|
36
|
+
# @param [String] app_key Key to access the server.
|
37
|
+
# @param [String] app_sid ID to access the server.
|
38
|
+
# @param [String] base_url Server URL.
|
39
|
+
# @param [String] api_version Api version.
|
40
|
+
# @param [Object] debug Debug switch [true, false].
|
41
|
+
def initialize(app_key = nil, app_sid = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v3.0', debug = false)
|
42
|
+
@api_client = ApiClient.new(app_key, app_sid, base_url, api_version, debug)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Adds an attachment to iCalendar file
|
46
|
+
# @param [add_calendar_attachmentRequest] request Request object.
|
47
|
+
# @return [nil]
|
48
|
+
def add_calendar_attachment(request)
|
49
|
+
http_request = request.to_http_info(@api_client)
|
50
|
+
make_request(http_request, :PUT, nil)
|
51
|
+
nil
|
52
|
+
end
|
53
|
+
|
54
|
+
# Add attachment to contact document
|
55
|
+
# @param [add_contact_attachmentRequest] request Request object.
|
56
|
+
# @return [nil]
|
57
|
+
def add_contact_attachment(request)
|
58
|
+
http_request = request.to_http_info(@api_client)
|
59
|
+
make_request(http_request, :PUT, nil)
|
60
|
+
nil
|
61
|
+
end
|
62
|
+
|
63
|
+
# Adds an attachment to Email document
|
64
|
+
# @param [add_email_attachmentRequest] request Request object.
|
65
|
+
# @return [EmailDocumentResponse]
|
66
|
+
def add_email_attachment(request)
|
67
|
+
http_request = request.to_http_info(@api_client)
|
68
|
+
make_request(http_request, :POST, 'EmailDocumentResponse')
|
69
|
+
end
|
70
|
+
|
71
|
+
# Add attachment to document
|
72
|
+
# @param [add_mapi_attachmentRequest] request Request object.
|
73
|
+
# @return [nil]
|
74
|
+
def add_mapi_attachment(request)
|
75
|
+
http_request = request.to_http_info(@api_client)
|
76
|
+
make_request(http_request, :PUT, nil)
|
77
|
+
nil
|
78
|
+
end
|
79
|
+
|
80
|
+
# Adds an email from *.eml file to specified folder in email account
|
81
|
+
# @param [append_email_messageRequest] request Request object.
|
82
|
+
# @return [EmailPropertyResponse]
|
83
|
+
def append_email_message(request)
|
84
|
+
http_request = request.to_http_info(@api_client)
|
85
|
+
make_request(http_request, :PUT, 'EmailPropertyResponse')
|
86
|
+
end
|
87
|
+
|
88
|
+
# Adds an email from MIME to specified folder in email account
|
89
|
+
# @param [append_mime_messageRequest] request Request object.
|
90
|
+
# @return [ValueResponse]
|
91
|
+
def append_mime_message(request)
|
92
|
+
http_request = request.to_http_info(@api_client)
|
93
|
+
make_request(http_request, :PUT, 'ValueResponse')
|
94
|
+
end
|
95
|
+
|
96
|
+
# Copy file
|
97
|
+
# @param [copy_fileRequest] request Request object.
|
98
|
+
# @return [nil]
|
99
|
+
def copy_file(request)
|
100
|
+
http_request = request.to_http_info(@api_client)
|
101
|
+
make_request(http_request, :PUT, nil)
|
102
|
+
nil
|
103
|
+
end
|
104
|
+
|
105
|
+
# Copy folder
|
106
|
+
# @param [copy_folderRequest] request Request object.
|
107
|
+
# @return [nil]
|
108
|
+
def copy_folder(request)
|
109
|
+
http_request = request.to_http_info(@api_client)
|
110
|
+
make_request(http_request, :PUT, nil)
|
111
|
+
nil
|
112
|
+
end
|
113
|
+
|
114
|
+
# Create calendar file
|
115
|
+
# @param [create_calendarRequest] request Request object.
|
116
|
+
# @return [nil]
|
117
|
+
def create_calendar(request)
|
118
|
+
http_request = request.to_http_info(@api_client)
|
119
|
+
make_request(http_request, :PUT, nil)
|
120
|
+
nil
|
121
|
+
end
|
122
|
+
|
123
|
+
# Create contact document
|
124
|
+
# @param [create_contactRequest] request Request object.
|
125
|
+
# @return [nil]
|
126
|
+
def create_contact(request)
|
127
|
+
http_request = request.to_http_info(@api_client)
|
128
|
+
make_request(http_request, :PUT, nil)
|
129
|
+
nil
|
130
|
+
end
|
131
|
+
|
132
|
+
# Create an email document
|
133
|
+
# @param [create_emailRequest] request Request object.
|
134
|
+
# @return [EmailDocumentResponse]
|
135
|
+
def create_email(request)
|
136
|
+
http_request = request.to_http_info(@api_client)
|
137
|
+
make_request(http_request, :PUT, 'EmailDocumentResponse')
|
138
|
+
end
|
139
|
+
|
140
|
+
# Create new folder in email account
|
141
|
+
# @param [create_email_folderRequest] request Request object.
|
142
|
+
# @return [nil]
|
143
|
+
def create_email_folder(request)
|
144
|
+
http_request = request.to_http_info(@api_client)
|
145
|
+
make_request(http_request, :PUT, nil)
|
146
|
+
nil
|
147
|
+
end
|
148
|
+
|
149
|
+
# Create the folder
|
150
|
+
# @param [create_folderRequest] request Request object.
|
151
|
+
# @return [nil]
|
152
|
+
def create_folder(request)
|
153
|
+
http_request = request.to_http_info(@api_client)
|
154
|
+
make_request(http_request, :PUT, nil)
|
155
|
+
nil
|
156
|
+
end
|
157
|
+
|
158
|
+
# Create new document
|
159
|
+
# @param [create_mapiRequest] request Request object.
|
160
|
+
# @return [nil]
|
161
|
+
def create_mapi(request)
|
162
|
+
http_request = request.to_http_info(@api_client)
|
163
|
+
make_request(http_request, :PUT, nil)
|
164
|
+
nil
|
165
|
+
end
|
166
|
+
|
167
|
+
# Deletes indexed property by index and name. To delete Reminder attachment, use path ReminderAttachment/{ReminderIndex}/{AttachmentIndex}
|
168
|
+
# @param [delete_calendar_propertyRequest] request Request object.
|
169
|
+
# @return [nil]
|
170
|
+
def delete_calendar_property(request)
|
171
|
+
http_request = request.to_http_info(@api_client)
|
172
|
+
make_request(http_request, :DELETE, nil)
|
173
|
+
nil
|
174
|
+
end
|
175
|
+
|
176
|
+
# Delete property from indexed property list
|
177
|
+
# @param [delete_contact_propertyRequest] request Request object.
|
178
|
+
# @return [nil]
|
179
|
+
def delete_contact_property(request)
|
180
|
+
http_request = request.to_http_info(@api_client)
|
181
|
+
make_request(http_request, :DELETE, nil)
|
182
|
+
nil
|
183
|
+
end
|
184
|
+
|
185
|
+
# Delete a folder in email account
|
186
|
+
# @param [delete_email_folderRequest] request Request object.
|
187
|
+
# @return [nil]
|
188
|
+
def delete_email_folder(request)
|
189
|
+
http_request = request.to_http_info(@api_client)
|
190
|
+
make_request(http_request, :DELETE, nil)
|
191
|
+
nil
|
192
|
+
end
|
193
|
+
|
194
|
+
# Delete message from email account by id
|
195
|
+
# @param [delete_email_messageRequest] request Request object.
|
196
|
+
# @return [nil]
|
197
|
+
def delete_email_message(request)
|
198
|
+
http_request = request.to_http_info(@api_client)
|
199
|
+
make_request(http_request, :DELETE, nil)
|
200
|
+
nil
|
201
|
+
end
|
202
|
+
|
203
|
+
# Delete file
|
204
|
+
# @param [delete_fileRequest] request Request object.
|
205
|
+
# @return [nil]
|
206
|
+
def delete_file(request)
|
207
|
+
http_request = request.to_http_info(@api_client)
|
208
|
+
make_request(http_request, :DELETE, nil)
|
209
|
+
nil
|
210
|
+
end
|
211
|
+
|
212
|
+
# Delete folder
|
213
|
+
# @param [delete_folderRequest] request Request object.
|
214
|
+
# @return [nil]
|
215
|
+
def delete_folder(request)
|
216
|
+
http_request = request.to_http_info(@api_client)
|
217
|
+
make_request(http_request, :DELETE, nil)
|
218
|
+
nil
|
219
|
+
end
|
220
|
+
|
221
|
+
# Remove attachment from document
|
222
|
+
# @param [delete_mapi_attachmentRequest] request Request object.
|
223
|
+
# @return [nil]
|
224
|
+
def delete_mapi_attachment(request)
|
225
|
+
http_request = request.to_http_info(@api_client)
|
226
|
+
make_request(http_request, :DELETE, nil)
|
227
|
+
nil
|
228
|
+
end
|
229
|
+
|
230
|
+
# Delete document properties
|
231
|
+
# @param [delete_mapi_propertiesRequest] request Request object.
|
232
|
+
# @return [nil]
|
233
|
+
def delete_mapi_properties(request)
|
234
|
+
http_request = request.to_http_info(@api_client)
|
235
|
+
make_request(http_request, :DELETE, nil)
|
236
|
+
nil
|
237
|
+
end
|
238
|
+
|
239
|
+
# Download file
|
240
|
+
# @param [download_fileRequest] request Request object.
|
241
|
+
# @return [File]
|
242
|
+
def download_file(request)
|
243
|
+
http_request = request.to_http_info(@api_client)
|
244
|
+
make_request(http_request, :GET, 'File')
|
245
|
+
end
|
246
|
+
|
247
|
+
# Fetch message mime from email account
|
248
|
+
# @param [fetch_email_messageRequest] request Request object.
|
249
|
+
# @return [MimeResponse]
|
250
|
+
def fetch_email_message(request)
|
251
|
+
http_request = request.to_http_info(@api_client)
|
252
|
+
make_request(http_request, :GET, 'MimeResponse')
|
253
|
+
end
|
254
|
+
|
255
|
+
# Get calendar file properties
|
256
|
+
# @param [get_calendarRequest] request Request object.
|
257
|
+
# @return [HierarchicalObject]
|
258
|
+
def get_calendar(request)
|
259
|
+
http_request = request.to_http_info(@api_client)
|
260
|
+
make_request(http_request, :GET, 'HierarchicalObject')
|
261
|
+
end
|
262
|
+
|
263
|
+
# Get iCalendar document attachment by name
|
264
|
+
# @param [get_calendar_attachmentRequest] request Request object.
|
265
|
+
# @return [File]
|
266
|
+
def get_calendar_attachment(request)
|
267
|
+
http_request = request.to_http_info(@api_client)
|
268
|
+
make_request(http_request, :GET, 'File')
|
269
|
+
end
|
270
|
+
|
271
|
+
# Get iCalendar files list in folder on storage
|
272
|
+
# @param [get_calendar_listRequest] request Request object.
|
273
|
+
# @return [ListResponseOfHierarchicalObjectResponse]
|
274
|
+
def get_calendar_list(request)
|
275
|
+
http_request = request.to_http_info(@api_client)
|
276
|
+
make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
|
277
|
+
end
|
278
|
+
|
279
|
+
# Get attachment file by name
|
280
|
+
# @param [get_contact_attachmentRequest] request Request object.
|
281
|
+
# @return [File]
|
282
|
+
def get_contact_attachment(request)
|
283
|
+
http_request = request.to_http_info(@api_client)
|
284
|
+
make_request(http_request, :GET, 'File')
|
285
|
+
end
|
286
|
+
|
287
|
+
# Get contact list from storage folder
|
288
|
+
# @param [get_contact_listRequest] request Request object.
|
289
|
+
# @return [ListResponseOfHierarchicalObjectResponse]
|
290
|
+
def get_contact_list(request)
|
291
|
+
http_request = request.to_http_info(@api_client)
|
292
|
+
make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
|
293
|
+
end
|
294
|
+
|
295
|
+
# Get contact document properties
|
296
|
+
# @param [get_contact_propertiesRequest] request Request object.
|
297
|
+
# @return [HierarchicalObject]
|
298
|
+
def get_contact_properties(request)
|
299
|
+
http_request = request.to_http_info(@api_client)
|
300
|
+
make_request(http_request, :GET, 'HierarchicalObject')
|
301
|
+
end
|
302
|
+
|
303
|
+
# Get disc usage
|
304
|
+
# @param [get_disc_usageRequest] request Request object.
|
305
|
+
# @return [DiscUsage]
|
306
|
+
def get_disc_usage(request)
|
307
|
+
http_request = request.to_http_info(@api_client)
|
308
|
+
make_request(http_request, :GET, 'DiscUsage')
|
309
|
+
end
|
310
|
+
|
311
|
+
# Get email document
|
312
|
+
# @param [get_emailRequest] request Request object.
|
313
|
+
# @return [EmailDocument]
|
314
|
+
def get_email(request)
|
315
|
+
http_request = request.to_http_info(@api_client)
|
316
|
+
make_request(http_request, :GET, 'EmailDocument')
|
317
|
+
end
|
318
|
+
|
319
|
+
# Get email attachment by name
|
320
|
+
# @param [get_email_attachmentRequest] request Request object.
|
321
|
+
# @return [File]
|
322
|
+
def get_email_attachment(request)
|
323
|
+
http_request = request.to_http_info(@api_client)
|
324
|
+
make_request(http_request, :GET, 'File')
|
325
|
+
end
|
326
|
+
|
327
|
+
# Get an email document property by its name
|
328
|
+
# @param [get_email_propertyRequest] request Request object.
|
329
|
+
# @return [EmailPropertyResponse]
|
330
|
+
def get_email_property(request)
|
331
|
+
http_request = request.to_http_info(@api_client)
|
332
|
+
make_request(http_request, :GET, 'EmailPropertyResponse')
|
333
|
+
end
|
334
|
+
|
335
|
+
# Get file versions
|
336
|
+
# @param [get_file_versionsRequest] request Request object.
|
337
|
+
# @return [FileVersions]
|
338
|
+
def get_file_versions(request)
|
339
|
+
http_request = request.to_http_info(@api_client)
|
340
|
+
make_request(http_request, :GET, 'FileVersions')
|
341
|
+
end
|
342
|
+
|
343
|
+
# Get all files and folders within a folder
|
344
|
+
# @param [get_files_listRequest] request Request object.
|
345
|
+
# @return [FilesList]
|
346
|
+
def get_files_list(request)
|
347
|
+
http_request = request.to_http_info(@api_client)
|
348
|
+
make_request(http_request, :GET, 'FilesList')
|
349
|
+
end
|
350
|
+
|
351
|
+
# Get document attachment as file stream
|
352
|
+
# @param [get_mapi_attachmentRequest] request Request object.
|
353
|
+
# @return [File]
|
354
|
+
def get_mapi_attachment(request)
|
355
|
+
http_request = request.to_http_info(@api_client)
|
356
|
+
make_request(http_request, :GET, 'File')
|
357
|
+
end
|
358
|
+
|
359
|
+
# Get document attachment list
|
360
|
+
# @param [get_mapi_attachmentsRequest] request Request object.
|
361
|
+
# @return [ListResponseOfString]
|
362
|
+
def get_mapi_attachments(request)
|
363
|
+
http_request = request.to_http_info(@api_client)
|
364
|
+
make_request(http_request, :GET, 'ListResponseOfString')
|
365
|
+
end
|
366
|
+
|
367
|
+
# Get document list from storage folder
|
368
|
+
# @param [get_mapi_listRequest] request Request object.
|
369
|
+
# @return [ListResponseOfHierarchicalObjectResponse]
|
370
|
+
def get_mapi_list(request)
|
371
|
+
http_request = request.to_http_info(@api_client)
|
372
|
+
make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
|
373
|
+
end
|
374
|
+
|
375
|
+
# Get document properties
|
376
|
+
# @param [get_mapi_propertiesRequest] request Request object.
|
377
|
+
# @return [HierarchicalObjectResponse]
|
378
|
+
def get_mapi_properties(request)
|
379
|
+
http_request = request.to_http_info(@api_client)
|
380
|
+
make_request(http_request, :GET, 'HierarchicalObjectResponse')
|
381
|
+
end
|
382
|
+
|
383
|
+
# Get folders list in email account
|
384
|
+
# @param [list_email_foldersRequest] request Request object.
|
385
|
+
# @return [ListResponseOfMailServerFolder]
|
386
|
+
def list_email_folders(request)
|
387
|
+
http_request = request.to_http_info(@api_client)
|
388
|
+
make_request(http_request, :GET, 'ListResponseOfMailServerFolder')
|
389
|
+
end
|
390
|
+
|
391
|
+
# Get messages from folder, filtered by query
|
392
|
+
# The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where <Field Name> - the name of a message field through which filtering is made, <Comparison operator> - comparison operators, as their name implies, allow to compare message field and specified value, <Field value> - value to be compared with a message field. The number of simple expressions can make a compound one, ex.: (<Simple expression 1> & <Simple expression 2>) | <Simple expression 3>, where \"&\" - logical-AND operator, \"|\" - logical-OR operator At present the following values are allowed as a field name (<Field name>): \"To\" - represents a TO field of message, \"Text\" - represents string in the header or body of the message, \"Bcc\" - represents a BCC field of message, \"Body\" - represents a string in the body of message, \"Cc\" - represents a CC field of message, \"From\" - represents a From field of message, \"Subject\" - represents a string in the subject of message, \"InternalDate\" - represents an internal date of message, \"SentDate\" - represents a sent date of message Additionally, the following field names are allowed for IMAP-protocol: \"Answered\" - represents an /Answered flag of message \"Seen\" - represents a /Seen flag of message \"Flagged\" - represents a /Flagged flag of message \"Draft\" - represents a /Draft flag of message \"Deleted\" - represents a Deleted/ flag of message \"Recent\" - represents a Deleted/ flag of message \"MessageSize\" - represents a size (in bytes) of message Additionally, the following field names are allowed for Exchange: \"IsRead\" - Indicates whether the message has been read \"HasAttachment\" - Indicates whether or not the message has attachments \"IsSubmitted\" - Indicates whether the message has been submitted to the Outbox \"ContentClass\" - represents a content class of item Additionally, the following field names are allowed for pst/ost files: \"MessageClass\" - Represents a message class \"ContainerClass\" - Represents a folder container class \"Importance\" - Represents a message importance \"MessageSize\" - represents a size (in bytes) of message \"FolderName\" - represents a folder name \"ContentsCount\" - represents a total number of items in the folder \"UnreadContentsCount\" - represents the number of unread items in the folder. \"Subfolders\" - Indicates whether or not the folder has subfolders \"Read\" - the message is marked as having been read \"HasAttachment\" - the message has at least one attachment \"Unsent\" - the message is still being composed \"Unmodified\" - the message has not been modified since it was first saved (if unsent) or it was delivered (if sent) \"FromMe\" - the user receiving the message was also the user who sent the message \"Resend\" - the message includes a request for a resend operation with a non-delivery report \"NotifyRead\" - the user who sent the message has requested notification when a recipient first reads it \"NotifyUnread\" - the user who sent the message has requested notification when a recipient deletes it before reading or the Message object expires \"EverRead\" - the message has been read at least once The field value (<Field value>) can take the following values: For text fields - any string, For date type fields - the string of \"d-MMM-yyy\" format, ex. \"10-Feb-2009\", For flags (fields of boolean type) - either \"True\", or \"False\"
|
393
|
+
# @param [list_email_messagesRequest] request Request object.
|
394
|
+
# @return [ListResponseOfString]
|
395
|
+
def list_email_messages(request)
|
396
|
+
http_request = request.to_http_info(@api_client)
|
397
|
+
make_request(http_request, :GET, 'ListResponseOfString')
|
398
|
+
end
|
399
|
+
|
400
|
+
# Move file
|
401
|
+
# @param [move_fileRequest] request Request object.
|
402
|
+
# @return [nil]
|
403
|
+
def move_file(request)
|
404
|
+
http_request = request.to_http_info(@api_client)
|
405
|
+
make_request(http_request, :PUT, nil)
|
406
|
+
nil
|
407
|
+
end
|
408
|
+
|
409
|
+
# Move folder
|
410
|
+
# @param [move_folderRequest] request Request object.
|
411
|
+
# @return [nil]
|
412
|
+
def move_folder(request)
|
413
|
+
http_request = request.to_http_info(@api_client)
|
414
|
+
make_request(http_request, :PUT, nil)
|
415
|
+
nil
|
416
|
+
end
|
417
|
+
|
418
|
+
# Check if file or folder exists
|
419
|
+
# @param [object_existsRequest] request Request object.
|
420
|
+
# @return [ObjectExist]
|
421
|
+
def object_exists(request)
|
422
|
+
http_request = request.to_http_info(@api_client)
|
423
|
+
make_request(http_request, :GET, 'ObjectExist')
|
424
|
+
end
|
425
|
+
|
426
|
+
# Create email account file (*.account) with login/password authentication
|
427
|
+
# @param [save_mail_accountRequest] request Request object.
|
428
|
+
# @return [nil]
|
429
|
+
def save_mail_account(request)
|
430
|
+
http_request = request.to_http_info(@api_client)
|
431
|
+
make_request(http_request, :POST, nil)
|
432
|
+
nil
|
433
|
+
end
|
434
|
+
|
435
|
+
# Create email account file (*.account) with OAuth
|
436
|
+
# @param [save_mail_o_auth_accountRequest] request Request object.
|
437
|
+
# @return [nil]
|
438
|
+
def save_mail_o_auth_account(request)
|
439
|
+
http_request = request.to_http_info(@api_client)
|
440
|
+
make_request(http_request, :POST, nil)
|
441
|
+
nil
|
442
|
+
end
|
443
|
+
|
444
|
+
# Send an email from *.eml file located on storage
|
445
|
+
# @param [send_emailRequest] request Request object.
|
446
|
+
# @return [nil]
|
447
|
+
def send_email(request)
|
448
|
+
http_request = request.to_http_info(@api_client)
|
449
|
+
make_request(http_request, :POST, nil)
|
450
|
+
nil
|
451
|
+
end
|
452
|
+
|
453
|
+
# Send an email specified by MIME in request
|
454
|
+
# @param [send_email_mimeRequest] request Request object.
|
455
|
+
# @return [nil]
|
456
|
+
def send_email_mime(request)
|
457
|
+
http_request = request.to_http_info(@api_client)
|
458
|
+
make_request(http_request, :POST, nil)
|
459
|
+
nil
|
460
|
+
end
|
461
|
+
|
462
|
+
# Set email document property value
|
463
|
+
# @param [set_email_propertyRequest] request Request object.
|
464
|
+
# @return [EmailPropertyResponse]
|
465
|
+
def set_email_property(request)
|
466
|
+
http_request = request.to_http_info(@api_client)
|
467
|
+
make_request(http_request, :PUT, 'EmailPropertyResponse')
|
468
|
+
end
|
469
|
+
|
470
|
+
# Sets \"Message is read\" flag
|
471
|
+
# @param [set_email_read_flagRequest] request Request object.
|
472
|
+
# @return [nil]
|
473
|
+
def set_email_read_flag(request)
|
474
|
+
http_request = request.to_http_info(@api_client)
|
475
|
+
make_request(http_request, :POST, nil)
|
476
|
+
nil
|
477
|
+
end
|
478
|
+
|
479
|
+
# Check if storage exists
|
480
|
+
# @param [storage_existsRequest] request Request object.
|
481
|
+
# @return [StorageExist]
|
482
|
+
def storage_exists(request)
|
483
|
+
http_request = request.to_http_info(@api_client)
|
484
|
+
make_request(http_request, :GET, 'StorageExist')
|
485
|
+
end
|
486
|
+
|
487
|
+
# Update calendar file properties
|
488
|
+
# @param [update_calendar_propertiesRequest] request Request object.
|
489
|
+
# @return [nil]
|
490
|
+
def update_calendar_properties(request)
|
491
|
+
http_request = request.to_http_info(@api_client)
|
492
|
+
make_request(http_request, :PUT, nil)
|
493
|
+
nil
|
494
|
+
end
|
495
|
+
|
496
|
+
# Update contact document properties
|
497
|
+
# @param [update_contact_propertiesRequest] request Request object.
|
498
|
+
# @return [nil]
|
499
|
+
def update_contact_properties(request)
|
500
|
+
http_request = request.to_http_info(@api_client)
|
501
|
+
make_request(http_request, :PUT, nil)
|
502
|
+
nil
|
503
|
+
end
|
504
|
+
|
505
|
+
# Update document properties
|
506
|
+
# @param [update_mapi_propertiesRequest] request Request object.
|
507
|
+
# @return [nil]
|
508
|
+
def update_mapi_properties(request)
|
509
|
+
http_request = request.to_http_info(@api_client)
|
510
|
+
make_request(http_request, :PUT, nil)
|
511
|
+
nil
|
512
|
+
end
|
513
|
+
|
514
|
+
# Upload file
|
515
|
+
# @param [upload_fileRequest] request Request object.
|
516
|
+
# @return [FilesUploadResult]
|
517
|
+
def upload_file(request)
|
518
|
+
http_request = request.to_http_info(@api_client)
|
519
|
+
make_request(http_request, :PUT, 'FilesUploadResult')
|
520
|
+
end
|
521
|
+
|
522
|
+
private
|
523
|
+
|
524
|
+
def make_request(http_request, method, return_type)
|
525
|
+
call_api(http_request, method, return_type)
|
526
|
+
rescue ApiError => e
|
527
|
+
if e.code.equal? 401
|
528
|
+
request_token
|
529
|
+
return call_api(http_request, method, return_type)
|
530
|
+
end
|
531
|
+
raise
|
532
|
+
|
533
|
+
end
|
534
|
+
|
535
|
+
def call_api(http_request, method, return_type)
|
536
|
+
response = @api_client.call_api(method,
|
537
|
+
http_request.resource_path,
|
538
|
+
header_params: http_request.header_params,
|
539
|
+
query_params: http_request.query_params,
|
540
|
+
form_params: http_request.form_params,
|
541
|
+
body: http_request.body,
|
542
|
+
auth_names: http_request.auth_names,
|
543
|
+
return_type: return_type)
|
544
|
+
response[0]
|
545
|
+
end
|
546
|
+
|
547
|
+
def request_token
|
548
|
+
config = @api_client.config
|
549
|
+
request_url = '/connect/token'
|
550
|
+
form_params =
|
551
|
+
{
|
552
|
+
'grant_type': 'client_credentials',
|
553
|
+
'client_id': config.api_key[:app_sid],
|
554
|
+
'client_secret': config.api_key[:api_key]
|
555
|
+
}
|
556
|
+
|
557
|
+
header_params =
|
558
|
+
{
|
559
|
+
'Accept' => 'application/json',
|
560
|
+
'Content-Type' =>'application/x-www-form-urlencoded'
|
561
|
+
}
|
562
|
+
|
563
|
+
base_path = @api_client.config.base_path
|
564
|
+
@api_client.config.base_path = ''
|
565
|
+
|
566
|
+
data = @api_client.call_api(:POST, request_url,
|
567
|
+
header_params: header_params,
|
568
|
+
form_params: form_params,
|
569
|
+
return_type: 'Object')
|
570
|
+
access_token = data[0]['access_token'.to_sym]
|
571
|
+
|
572
|
+
@api_client.config.base_path = base_path
|
573
|
+
@api_client.config.access_token = access_token
|
574
|
+
end
|
575
|
+
end
|
576
|
+
end
|
577
|
+
|