aspose_email_cloud 19.12.0 → 20.1.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 +65 -0
- data/lib/aspose-email-cloud/api/email_api.rb +158 -1
- data/lib/aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq.rb +230 -0
- data/lib/aspose-email-cloud/models/alternate_view.rb +279 -0
- data/lib/aspose-email-cloud/models/append_email_model_rq.rb +333 -0
- data/lib/aspose-email-cloud/models/associated_person.rb +241 -0
- data/lib/aspose-email-cloud/models/attachment.rb +321 -0
- data/lib/aspose-email-cloud/models/attachment_base.rb +251 -0
- data/lib/aspose-email-cloud/models/base_object.rb +86 -86
- data/lib/aspose-email-cloud/models/calendar_dto.rb +554 -0
- data/lib/aspose-email-cloud/models/calendar_dto_alternate_rq.rb +265 -0
- data/lib/aspose-email-cloud/models/calendar_dto_list.rb +212 -0
- data/lib/aspose-email-cloud/models/calendar_reminder.rb +315 -0
- data/lib/aspose-email-cloud/models/contact_dto.rb +696 -0
- data/lib/aspose-email-cloud/models/contact_dto_list.rb +212 -0
- data/lib/aspose-email-cloud/models/contact_photo.rb +228 -0
- data/lib/aspose-email-cloud/models/content_type.rb +264 -0
- data/lib/aspose-email-cloud/models/content_type_parameter.rb +223 -0
- data/lib/aspose-email-cloud/models/customer_event.rb +228 -0
- data/lib/aspose-email-cloud/models/email_address.rb +267 -0
- data/lib/aspose-email-cloud/models/email_dto.rb +678 -0
- data/lib/aspose-email-cloud/models/email_dto_list.rb +212 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +227 -0
- data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +227 -0
- data/lib/aspose-email-cloud/models/hierarchical_object.rb +101 -101
- data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +119 -119
- data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +117 -117
- data/lib/aspose-email-cloud/models/instant_messenger_address.rb +241 -0
- data/lib/aspose-email-cloud/models/linked_resource.rb +264 -0
- data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +211 -0
- data/lib/aspose-email-cloud/models/mail_address.rb +241 -0
- data/lib/aspose-email-cloud/models/phone_number.rb +241 -0
- data/lib/aspose-email-cloud/models/postal_address.rb +350 -0
- data/lib/aspose-email-cloud/models/primitive_object.rb +99 -99
- data/lib/aspose-email-cloud/models/reminder_attendee.rb +210 -0
- data/lib/aspose-email-cloud/models/reminder_trigger.rb +246 -0
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +83 -0
- data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +93 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +91 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +85 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb +87 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_model_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +87 -0
- data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +1 -1
- data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +105 -0
- data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/send_email_model_rq.rb +273 -0
- data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_rq_of_calendar_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_rq_of_contact_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/storage_model_rq_of_email_dto.rb +222 -0
- data/lib/aspose-email-cloud/models/url.rb +241 -0
- data/lib/aspose-email-cloud/models/value_response.rb +1 -1
- data/lib/aspose-email-cloud/version.rb +1 -1
- metadata +67 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c49e8dbd0a3fd74cb819c46738da142d1c43434f1e7a4b446e892487fa5c6d4
|
4
|
+
data.tar.gz: c0c9819dc6f9e1363122fabcf3035c758b7fa7008a6f3fa99318b3cd65d5b49d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe7f588de77a7dec6e30643746ae363e033a611f59dd685944dd504c49cb007ce9920bd9844f03a33a2b56c6d2c6c98bc384cca7b7ef35f429aa2b4dfd6f6dca
|
7
|
+
data.tar.gz: 4ca8c9046d0dd6d2ff251952396f8e964fd027d35aa41d8643c424a2a2ca862aefa836d2143729f5c514687c27e2867cb173fa5989fddadfb69b400cfdd9d834
|
data/lib/aspose-email-cloud.rb
CHANGED
@@ -49,15 +49,34 @@ require_relative './aspose-email-cloud/models/ai_name_mismatch'
|
|
49
49
|
require_relative './aspose-email-cloud/models/ai_name_parsed_rq'
|
50
50
|
require_relative './aspose-email-cloud/models/ai_name_weighted'
|
51
51
|
require_relative './aspose-email-cloud/models/ai_name_weighted_variants'
|
52
|
+
require_relative './aspose-email-cloud/models/associated_person'
|
53
|
+
require_relative './aspose-email-cloud/models/attachment_base'
|
52
54
|
require_relative './aspose-email-cloud/models/base_object'
|
55
|
+
require_relative './aspose-email-cloud/models/calendar_dto'
|
56
|
+
require_relative './aspose-email-cloud/models/calendar_dto_alternate_rq'
|
57
|
+
require_relative './aspose-email-cloud/models/calendar_reminder'
|
58
|
+
require_relative './aspose-email-cloud/models/contact_dto'
|
59
|
+
require_relative './aspose-email-cloud/models/contact_photo'
|
60
|
+
require_relative './aspose-email-cloud/models/content_type'
|
61
|
+
require_relative './aspose-email-cloud/models/content_type_parameter'
|
53
62
|
require_relative './aspose-email-cloud/models/create_email_request'
|
63
|
+
require_relative './aspose-email-cloud/models/customer_event'
|
54
64
|
require_relative './aspose-email-cloud/models/disc_usage'
|
55
65
|
require_relative './aspose-email-cloud/models/email_account_request'
|
66
|
+
require_relative './aspose-email-cloud/models/email_address'
|
56
67
|
require_relative './aspose-email-cloud/models/email_document'
|
57
68
|
require_relative './aspose-email-cloud/models/email_document_response'
|
69
|
+
require_relative './aspose-email-cloud/models/email_dto'
|
58
70
|
require_relative './aspose-email-cloud/models/email_properties'
|
59
71
|
require_relative './aspose-email-cloud/models/email_property'
|
60
72
|
require_relative './aspose-email-cloud/models/email_property_response'
|
73
|
+
require_relative './aspose-email-cloud/models/enum_with_custom_of_associated_person_category'
|
74
|
+
require_relative './aspose-email-cloud/models/enum_with_custom_of_email_address_category'
|
75
|
+
require_relative './aspose-email-cloud/models/enum_with_custom_of_event_category'
|
76
|
+
require_relative './aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category'
|
77
|
+
require_relative './aspose-email-cloud/models/enum_with_custom_of_phone_number_category'
|
78
|
+
require_relative './aspose-email-cloud/models/enum_with_custom_of_postal_address_category'
|
79
|
+
require_relative './aspose-email-cloud/models/enum_with_custom_of_url_category'
|
61
80
|
require_relative './aspose-email-cloud/models/error'
|
62
81
|
require_relative './aspose-email-cloud/models/error_details'
|
63
82
|
require_relative './aspose-email-cloud/models/file_versions'
|
@@ -65,47 +84,74 @@ require_relative './aspose-email-cloud/models/files_list'
|
|
65
84
|
require_relative './aspose-email-cloud/models/files_upload_result'
|
66
85
|
require_relative './aspose-email-cloud/models/hierarchical_object_request'
|
67
86
|
require_relative './aspose-email-cloud/models/hierarchical_object_response'
|
87
|
+
require_relative './aspose-email-cloud/models/instant_messenger_address'
|
68
88
|
require_relative './aspose-email-cloud/models/link'
|
69
89
|
require_relative './aspose-email-cloud/models/list_response_of_ai_bcr_ocr_data'
|
70
90
|
require_relative './aspose-email-cloud/models/list_response_of_ai_name_component'
|
71
91
|
require_relative './aspose-email-cloud/models/list_response_of_ai_name_extracted'
|
72
92
|
require_relative './aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis'
|
93
|
+
require_relative './aspose-email-cloud/models/list_response_of_contact_dto'
|
94
|
+
require_relative './aspose-email-cloud/models/list_response_of_email_dto'
|
73
95
|
require_relative './aspose-email-cloud/models/list_response_of_hierarchical_object'
|
74
96
|
require_relative './aspose-email-cloud/models/list_response_of_hierarchical_object_response'
|
75
97
|
require_relative './aspose-email-cloud/models/list_response_of_mail_server_folder'
|
76
98
|
require_relative './aspose-email-cloud/models/list_response_of_storage_file_location'
|
99
|
+
require_relative './aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto'
|
100
|
+
require_relative './aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto'
|
101
|
+
require_relative './aspose-email-cloud/models/list_response_of_storage_model_of_email_dto'
|
77
102
|
require_relative './aspose-email-cloud/models/list_response_of_string'
|
103
|
+
require_relative './aspose-email-cloud/models/mail_address'
|
78
104
|
require_relative './aspose-email-cloud/models/mail_server_folder'
|
79
105
|
require_relative './aspose-email-cloud/models/mime_response'
|
80
106
|
require_relative './aspose-email-cloud/models/object_exist'
|
107
|
+
require_relative './aspose-email-cloud/models/phone_number'
|
108
|
+
require_relative './aspose-email-cloud/models/postal_address'
|
109
|
+
require_relative './aspose-email-cloud/models/reminder_attendee'
|
110
|
+
require_relative './aspose-email-cloud/models/reminder_trigger'
|
81
111
|
require_relative './aspose-email-cloud/models/set_email_property_request'
|
82
112
|
require_relative './aspose-email-cloud/models/storage_exist'
|
83
113
|
require_relative './aspose-email-cloud/models/storage_file'
|
84
114
|
require_relative './aspose-email-cloud/models/storage_folder_location'
|
115
|
+
require_relative './aspose-email-cloud/models/storage_model_of_calendar_dto'
|
116
|
+
require_relative './aspose-email-cloud/models/storage_model_of_contact_dto'
|
117
|
+
require_relative './aspose-email-cloud/models/storage_model_of_email_dto'
|
118
|
+
require_relative './aspose-email-cloud/models/storage_model_rq_of_calendar_dto'
|
119
|
+
require_relative './aspose-email-cloud/models/storage_model_rq_of_contact_dto'
|
120
|
+
require_relative './aspose-email-cloud/models/storage_model_rq_of_email_dto'
|
121
|
+
require_relative './aspose-email-cloud/models/url'
|
85
122
|
require_relative './aspose-email-cloud/models/value_response'
|
86
123
|
require_relative './aspose-email-cloud/models/ai_bcr_base64_image'
|
87
124
|
require_relative './aspose-email-cloud/models/ai_bcr_base64_rq'
|
88
125
|
require_relative './aspose-email-cloud/models/ai_bcr_image_storage_file'
|
126
|
+
require_relative './aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq'
|
89
127
|
require_relative './aspose-email-cloud/models/ai_bcr_storage_image_rq'
|
90
128
|
require_relative './aspose-email-cloud/models/ai_name_parsed_match_rq'
|
129
|
+
require_relative './aspose-email-cloud/models/alternate_view'
|
91
130
|
require_relative './aspose-email-cloud/models/append_email_account_base_request'
|
131
|
+
require_relative './aspose-email-cloud/models/attachment'
|
132
|
+
require_relative './aspose-email-cloud/models/calendar_dto_list'
|
133
|
+
require_relative './aspose-email-cloud/models/contact_dto_list'
|
92
134
|
require_relative './aspose-email-cloud/models/create_folder_base_request'
|
93
135
|
require_relative './aspose-email-cloud/models/delete_folder_base_request'
|
94
136
|
require_relative './aspose-email-cloud/models/delete_message_base_request'
|
137
|
+
require_relative './aspose-email-cloud/models/email_dto_list'
|
95
138
|
require_relative './aspose-email-cloud/models/file_version'
|
96
139
|
require_relative './aspose-email-cloud/models/hierarchical_object'
|
97
140
|
require_relative './aspose-email-cloud/models/indexed_hierarchical_object'
|
98
141
|
require_relative './aspose-email-cloud/models/indexed_primitive_object'
|
142
|
+
require_relative './aspose-email-cloud/models/linked_resource'
|
99
143
|
require_relative './aspose-email-cloud/models/primitive_object'
|
100
144
|
require_relative './aspose-email-cloud/models/save_email_account_request'
|
101
145
|
require_relative './aspose-email-cloud/models/save_o_auth_email_account_request'
|
102
146
|
require_relative './aspose-email-cloud/models/send_email_base_request'
|
103
147
|
require_relative './aspose-email-cloud/models/send_email_mime_base_request'
|
148
|
+
require_relative './aspose-email-cloud/models/send_email_model_rq'
|
104
149
|
require_relative './aspose-email-cloud/models/set_message_read_flag_account_base_request'
|
105
150
|
require_relative './aspose-email-cloud/models/storage_file_location'
|
106
151
|
require_relative './aspose-email-cloud/models/ai_bcr_parse_storage_rq'
|
107
152
|
require_relative './aspose-email-cloud/models/append_email_base_request'
|
108
153
|
require_relative './aspose-email-cloud/models/append_email_mime_base_request'
|
154
|
+
require_relative './aspose-email-cloud/models/append_email_model_rq'
|
109
155
|
|
110
156
|
# APIs
|
111
157
|
require_relative 'aspose-email-cloud/api/email_api'
|
@@ -118,6 +164,8 @@ require_relative './aspose-email-cloud/models/requests/add_email_attachment_requ
|
|
118
164
|
require_relative './aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb'
|
119
165
|
require_relative './aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb'
|
120
166
|
require_relative './aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb'
|
167
|
+
require_relative './aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb'
|
168
|
+
require_relative './aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb'
|
121
169
|
require_relative './aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb'
|
122
170
|
require_relative './aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb'
|
123
171
|
require_relative './aspose-email-cloud/models/requests/ai_name_complete_request_data.rb'
|
@@ -132,7 +180,10 @@ require_relative './aspose-email-cloud/models/requests/ai_name_match_request_dat
|
|
132
180
|
require_relative './aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb'
|
133
181
|
require_relative './aspose-email-cloud/models/requests/ai_name_parse_request_data.rb'
|
134
182
|
require_relative './aspose-email-cloud/models/requests/append_email_message_request_data.rb'
|
183
|
+
require_relative './aspose-email-cloud/models/requests/append_email_model_message_request_data.rb'
|
135
184
|
require_relative './aspose-email-cloud/models/requests/append_mime_message_request_data.rb'
|
185
|
+
require_relative './aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb'
|
186
|
+
require_relative './aspose-email-cloud/models/requests/convert_email_request_data.rb'
|
136
187
|
require_relative './aspose-email-cloud/models/requests/copy_file_request_data.rb'
|
137
188
|
require_relative './aspose-email-cloud/models/requests/copy_folder_request_data.rb'
|
138
189
|
require_relative './aspose-email-cloud/models/requests/create_calendar_request_data.rb'
|
@@ -152,14 +203,23 @@ require_relative './aspose-email-cloud/models/requests/delete_mapi_properties_re
|
|
152
203
|
require_relative './aspose-email-cloud/models/requests/download_file_request_data.rb'
|
153
204
|
require_relative './aspose-email-cloud/models/requests/email_request.rb'
|
154
205
|
require_relative './aspose-email-cloud/models/requests/fetch_email_message_request_data.rb'
|
206
|
+
require_relative './aspose-email-cloud/models/requests/fetch_email_model_request_data.rb'
|
155
207
|
require_relative './aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb'
|
156
208
|
require_relative './aspose-email-cloud/models/requests/get_calendar_list_request_data.rb'
|
209
|
+
require_relative './aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb'
|
210
|
+
require_relative './aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb'
|
211
|
+
require_relative './aspose-email-cloud/models/requests/get_calendar_model_request_data.rb'
|
157
212
|
require_relative './aspose-email-cloud/models/requests/get_calendar_request_data.rb'
|
158
213
|
require_relative './aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb'
|
159
214
|
require_relative './aspose-email-cloud/models/requests/get_contact_list_request_data.rb'
|
215
|
+
require_relative './aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb'
|
216
|
+
require_relative './aspose-email-cloud/models/requests/get_contact_model_request_data.rb'
|
160
217
|
require_relative './aspose-email-cloud/models/requests/get_contact_properties_request_data.rb'
|
161
218
|
require_relative './aspose-email-cloud/models/requests/get_disc_usage_request_data.rb'
|
219
|
+
require_relative './aspose-email-cloud/models/requests/get_email_as_file_request_data.rb'
|
162
220
|
require_relative './aspose-email-cloud/models/requests/get_email_attachment_request_data.rb'
|
221
|
+
require_relative './aspose-email-cloud/models/requests/get_email_model_list_request_data.rb'
|
222
|
+
require_relative './aspose-email-cloud/models/requests/get_email_model_request_data.rb'
|
163
223
|
require_relative './aspose-email-cloud/models/requests/get_email_property_request_data.rb'
|
164
224
|
require_relative './aspose-email-cloud/models/requests/get_email_request_data.rb'
|
165
225
|
require_relative './aspose-email-cloud/models/requests/get_files_list_request_data.rb'
|
@@ -171,12 +231,17 @@ require_relative './aspose-email-cloud/models/requests/get_mapi_properties_reque
|
|
171
231
|
require_relative './aspose-email-cloud/models/requests/http_request.rb'
|
172
232
|
require_relative './aspose-email-cloud/models/requests/list_email_folders_request_data.rb'
|
173
233
|
require_relative './aspose-email-cloud/models/requests/list_email_messages_request_data.rb'
|
234
|
+
require_relative './aspose-email-cloud/models/requests/list_email_models_request_data.rb'
|
174
235
|
require_relative './aspose-email-cloud/models/requests/move_file_request_data.rb'
|
175
236
|
require_relative './aspose-email-cloud/models/requests/move_folder_request_data.rb'
|
176
237
|
require_relative './aspose-email-cloud/models/requests/object_exists_request_data.rb'
|
238
|
+
require_relative './aspose-email-cloud/models/requests/save_calendar_model_request_data.rb'
|
239
|
+
require_relative './aspose-email-cloud/models/requests/save_contact_model_request_data.rb'
|
240
|
+
require_relative './aspose-email-cloud/models/requests/save_email_model_request_data.rb'
|
177
241
|
require_relative './aspose-email-cloud/models/requests/save_mail_account_request_data.rb'
|
178
242
|
require_relative './aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb'
|
179
243
|
require_relative './aspose-email-cloud/models/requests/send_email_mime_request_data.rb'
|
244
|
+
require_relative './aspose-email-cloud/models/requests/send_email_model_request_data.rb'
|
180
245
|
require_relative './aspose-email-cloud/models/requests/send_email_request_data.rb'
|
181
246
|
require_relative './aspose-email-cloud/models/requests/set_email_property_request_data.rb'
|
182
247
|
require_relative './aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb'
|
@@ -101,6 +101,22 @@ module AsposeEmailCloud
|
|
101
101
|
make_request(http_request, :POST, 'ListResponseOfHierarchicalObject')
|
102
102
|
end
|
103
103
|
|
104
|
+
# Parse images to vCard document models
|
105
|
+
# @param [AiBcrParseModelRequestData] request Request object.
|
106
|
+
# @return [ListResponseOfContactDto]
|
107
|
+
def ai_bcr_parse_model(request)
|
108
|
+
http_request = request.to_http_info(@api_client)
|
109
|
+
make_request(http_request, :POST, 'ListResponseOfContactDto')
|
110
|
+
end
|
111
|
+
|
112
|
+
# Parse OCR data to vCard document models
|
113
|
+
# @param [AiBcrParseOcrDataModelRequestData] request Request object.
|
114
|
+
# @return [ListResponseOfContactDto]
|
115
|
+
def ai_bcr_parse_ocr_data_model(request)
|
116
|
+
http_request = request.to_http_info(@api_client)
|
117
|
+
make_request(http_request, :POST, 'ListResponseOfContactDto')
|
118
|
+
end
|
119
|
+
|
104
120
|
# Parse images from storage to vCard files
|
105
121
|
# @param [AiBcrParseStorageRequestData] request Request object.
|
106
122
|
# @return [ListResponseOfStorageFileLocation]
|
@@ -205,6 +221,14 @@ module AsposeEmailCloud
|
|
205
221
|
make_request(http_request, :PUT, 'EmailPropertyResponse')
|
206
222
|
end
|
207
223
|
|
224
|
+
# Adds an email from model to specified folder in email account
|
225
|
+
# @param [AppendEmailModelMessageRequestData] request Request object.
|
226
|
+
# @return [ValueResponse]
|
227
|
+
def append_email_model_message(request)
|
228
|
+
http_request = request.to_http_info(@api_client)
|
229
|
+
make_request(http_request, :PUT, 'ValueResponse')
|
230
|
+
end
|
231
|
+
|
208
232
|
# Adds an email from MIME to specified folder in email account
|
209
233
|
# @param [AppendMimeMessageRequestData] request Request object.
|
210
234
|
# @return [ValueResponse]
|
@@ -213,6 +237,22 @@ module AsposeEmailCloud
|
|
213
237
|
make_request(http_request, :PUT, 'ValueResponse')
|
214
238
|
end
|
215
239
|
|
240
|
+
# Convert iCalendar to AlternateView
|
241
|
+
# @param [ConvertCalendarModelToAlternateRequestData] request Request object.
|
242
|
+
# @return [AlternateView]
|
243
|
+
def convert_calendar_model_to_alternate(request)
|
244
|
+
http_request = request.to_http_info(@api_client)
|
245
|
+
make_request(http_request, :PUT, 'AlternateView')
|
246
|
+
end
|
247
|
+
|
248
|
+
# Converts email document to specified format and returns as file
|
249
|
+
# @param [ConvertEmailRequestData] request Request object.
|
250
|
+
# @return [File]
|
251
|
+
def convert_email(request)
|
252
|
+
http_request = request.to_http_info(@api_client)
|
253
|
+
make_request(http_request, :PUT, 'File')
|
254
|
+
end
|
255
|
+
|
216
256
|
# Copy file
|
217
257
|
# @param [CopyFileRequestData] request Request object.
|
218
258
|
# @return [nil]
|
@@ -372,6 +412,14 @@ module AsposeEmailCloud
|
|
372
412
|
make_request(http_request, :GET, 'MimeResponse')
|
373
413
|
end
|
374
414
|
|
415
|
+
# Fetch message model from email account
|
416
|
+
# @param [FetchEmailModelRequestData] request Request object.
|
417
|
+
# @return [EmailDto]
|
418
|
+
def fetch_email_model(request)
|
419
|
+
http_request = request.to_http_info(@api_client)
|
420
|
+
make_request(http_request, :GET, 'EmailDto')
|
421
|
+
end
|
422
|
+
|
375
423
|
# Get calendar file properties
|
376
424
|
# @param [GetCalendarRequestData] request Request object.
|
377
425
|
# @return [HierarchicalObject]
|
@@ -396,6 +444,30 @@ module AsposeEmailCloud
|
|
396
444
|
make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
|
397
445
|
end
|
398
446
|
|
447
|
+
# Get calendar file
|
448
|
+
# @param [GetCalendarModelRequestData] request Request object.
|
449
|
+
# @return [CalendarDto]
|
450
|
+
def get_calendar_model(request)
|
451
|
+
http_request = request.to_http_info(@api_client)
|
452
|
+
make_request(http_request, :GET, 'CalendarDto')
|
453
|
+
end
|
454
|
+
|
455
|
+
# Get iCalendar from storage as AlternateView
|
456
|
+
# @param [GetCalendarModelAsAlternateRequestData] request Request object.
|
457
|
+
# @return [AlternateView]
|
458
|
+
def get_calendar_model_as_alternate(request)
|
459
|
+
http_request = request.to_http_info(@api_client)
|
460
|
+
make_request(http_request, :GET, 'AlternateView')
|
461
|
+
end
|
462
|
+
|
463
|
+
# Get iCalendar list from storage folder
|
464
|
+
# @param [GetCalendarModelListRequestData] request Request object.
|
465
|
+
# @return [CalendarDtoList]
|
466
|
+
def get_calendar_model_list(request)
|
467
|
+
http_request = request.to_http_info(@api_client)
|
468
|
+
make_request(http_request, :GET, 'CalendarDtoList')
|
469
|
+
end
|
470
|
+
|
399
471
|
# Get attachment file by name
|
400
472
|
# @param [GetContactAttachmentRequestData] request Request object.
|
401
473
|
# @return [File]
|
@@ -412,6 +484,22 @@ module AsposeEmailCloud
|
|
412
484
|
make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
|
413
485
|
end
|
414
486
|
|
487
|
+
# Get contact document.
|
488
|
+
# @param [GetContactModelRequestData] request Request object.
|
489
|
+
# @return [ContactDto]
|
490
|
+
def get_contact_model(request)
|
491
|
+
http_request = request.to_http_info(@api_client)
|
492
|
+
make_request(http_request, :GET, 'ContactDto')
|
493
|
+
end
|
494
|
+
|
495
|
+
# Get contact list from storage folder.
|
496
|
+
# @param [GetContactModelListRequestData] request Request object.
|
497
|
+
# @return [ContactDtoList]
|
498
|
+
def get_contact_model_list(request)
|
499
|
+
http_request = request.to_http_info(@api_client)
|
500
|
+
make_request(http_request, :GET, 'ContactDtoList')
|
501
|
+
end
|
502
|
+
|
415
503
|
# Get contact document properties
|
416
504
|
# @param [GetContactPropertiesRequestData] request Request object.
|
417
505
|
# @return [HierarchicalObject]
|
@@ -436,6 +524,14 @@ module AsposeEmailCloud
|
|
436
524
|
make_request(http_request, :GET, 'EmailDocument')
|
437
525
|
end
|
438
526
|
|
527
|
+
# Converts email document from storage to specified format and returns as file
|
528
|
+
# @param [GetEmailAsFileRequestData] request Request object.
|
529
|
+
# @return [File]
|
530
|
+
def get_email_as_file(request)
|
531
|
+
http_request = request.to_http_info(@api_client)
|
532
|
+
make_request(http_request, :GET, 'File')
|
533
|
+
end
|
534
|
+
|
439
535
|
# Get email attachment by name
|
440
536
|
# @param [GetEmailAttachmentRequestData] request Request object.
|
441
537
|
# @return [File]
|
@@ -444,6 +540,22 @@ module AsposeEmailCloud
|
|
444
540
|
make_request(http_request, :GET, 'File')
|
445
541
|
end
|
446
542
|
|
543
|
+
# Get email document.
|
544
|
+
# @param [GetEmailModelRequestData] request Request object.
|
545
|
+
# @return [EmailDto]
|
546
|
+
def get_email_model(request)
|
547
|
+
http_request = request.to_http_info(@api_client)
|
548
|
+
make_request(http_request, :GET, 'EmailDto')
|
549
|
+
end
|
550
|
+
|
551
|
+
# Get email list from storage folder.
|
552
|
+
# @param [GetEmailModelListRequestData] request Request object.
|
553
|
+
# @return [EmailDtoList]
|
554
|
+
def get_email_model_list(request)
|
555
|
+
http_request = request.to_http_info(@api_client)
|
556
|
+
make_request(http_request, :GET, 'EmailDtoList')
|
557
|
+
end
|
558
|
+
|
447
559
|
# Get an email document property by its name
|
448
560
|
# @param [GetEmailPropertyRequestData] request Request object.
|
449
561
|
# @return [EmailPropertyResponse]
|
@@ -509,7 +621,7 @@ module AsposeEmailCloud
|
|
509
621
|
end
|
510
622
|
|
511
623
|
# Get messages from folder, filtered by query
|
512
|
-
# 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\"
|
624
|
+
# 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\"
|
513
625
|
# @param [ListEmailMessagesRequestData] request Request object.
|
514
626
|
# @return [ListResponseOfString]
|
515
627
|
def list_email_messages(request)
|
@@ -517,6 +629,15 @@ module AsposeEmailCloud
|
|
517
629
|
make_request(http_request, :GET, 'ListResponseOfString')
|
518
630
|
end
|
519
631
|
|
632
|
+
# Get messages from folder, filtered by query
|
633
|
+
# 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\"
|
634
|
+
# @param [ListEmailModelsRequestData] request Request object.
|
635
|
+
# @return [ListResponseOfEmailDto]
|
636
|
+
def list_email_models(request)
|
637
|
+
http_request = request.to_http_info(@api_client)
|
638
|
+
make_request(http_request, :GET, 'ListResponseOfEmailDto')
|
639
|
+
end
|
640
|
+
|
520
641
|
# Move file
|
521
642
|
# @param [MoveFileRequestData] request Request object.
|
522
643
|
# @return [nil]
|
@@ -543,6 +664,33 @@ module AsposeEmailCloud
|
|
543
664
|
make_request(http_request, :GET, 'ObjectExist')
|
544
665
|
end
|
545
666
|
|
667
|
+
# Save iCalendar
|
668
|
+
# @param [SaveCalendarModelRequestData] request Request object.
|
669
|
+
# @return [nil]
|
670
|
+
def save_calendar_model(request)
|
671
|
+
http_request = request.to_http_info(@api_client)
|
672
|
+
make_request(http_request, :PUT, nil)
|
673
|
+
nil
|
674
|
+
end
|
675
|
+
|
676
|
+
# Save contact.
|
677
|
+
# @param [SaveContactModelRequestData] request Request object.
|
678
|
+
# @return [nil]
|
679
|
+
def save_contact_model(request)
|
680
|
+
http_request = request.to_http_info(@api_client)
|
681
|
+
make_request(http_request, :PUT, nil)
|
682
|
+
nil
|
683
|
+
end
|
684
|
+
|
685
|
+
# Save email document.
|
686
|
+
# @param [SaveEmailModelRequestData] request Request object.
|
687
|
+
# @return [nil]
|
688
|
+
def save_email_model(request)
|
689
|
+
http_request = request.to_http_info(@api_client)
|
690
|
+
make_request(http_request, :PUT, nil)
|
691
|
+
nil
|
692
|
+
end
|
693
|
+
|
546
694
|
# Create email account file (*.account) with login/password authentication
|
547
695
|
# @param [SaveMailAccountRequestData] request Request object.
|
548
696
|
# @return [nil]
|
@@ -579,6 +727,15 @@ module AsposeEmailCloud
|
|
579
727
|
nil
|
580
728
|
end
|
581
729
|
|
730
|
+
# Send an email specified by model in request
|
731
|
+
# @param [SendEmailModelRequestData] request Request object.
|
732
|
+
# @return [nil]
|
733
|
+
def send_email_model(request)
|
734
|
+
http_request = request.to_http_info(@api_client)
|
735
|
+
make_request(http_request, :POST, nil)
|
736
|
+
nil
|
737
|
+
end
|
738
|
+
|
582
739
|
# Set email document property value
|
583
740
|
# @param [SetEmailPropertyRequestData] request Request object.
|
584
741
|
# @return [EmailPropertyResponse]
|
@@ -0,0 +1,230 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="AiBcrParseOcrDataRq.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
|
+
require 'date'
|
28
|
+
|
29
|
+
module AsposeEmailCloud
|
30
|
+
# Parse ocr data request
|
31
|
+
class AiBcrParseOcrDataRq
|
32
|
+
# Recognition options
|
33
|
+
# @return [AiBcrOptions]
|
34
|
+
attr_accessor :options
|
35
|
+
|
36
|
+
# OCR data
|
37
|
+
# @return [Array<AiBcrOcrData>]
|
38
|
+
attr_accessor :data
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'options' => :'options',
|
44
|
+
:'data' => :'data'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.swagger_types
|
50
|
+
{
|
51
|
+
:'options' => :'AiBcrOptions',
|
52
|
+
:'data' => :'Array<AiBcrOcrData>'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
return unless attributes.is_a?(Hash)
|
60
|
+
|
61
|
+
# convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
63
|
+
|
64
|
+
if attributes.has_key?(:'options')
|
65
|
+
self.options = attributes[:'options']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'data')
|
69
|
+
if (value = attributes[:'data']).is_a?(Array)
|
70
|
+
self.data = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [AiBcrOptions] options Recognition options
|
77
|
+
# @param [Array<AiBcrOcrData>] data OCR data
|
78
|
+
def initialize(options=nil, data=nil)
|
79
|
+
self.options = options if options
|
80
|
+
self.data = data if data
|
81
|
+
end
|
82
|
+
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
84
|
+
# @return Array for valid properties with the reasons
|
85
|
+
def list_invalid_properties
|
86
|
+
invalid_properties = Array.new
|
87
|
+
if @data.nil?
|
88
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
89
|
+
end
|
90
|
+
|
91
|
+
invalid_properties
|
92
|
+
end
|
93
|
+
|
94
|
+
# Check to see if the all the properties in the model are valid
|
95
|
+
# @return true if the model is valid
|
96
|
+
def valid?
|
97
|
+
return false if @data.nil?
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
# Checks equality by comparing each attribute.
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def ==(o)
|
104
|
+
return true if self.equal?(o)
|
105
|
+
self.class == o.class &&
|
106
|
+
options == o.options &&
|
107
|
+
data == o.data
|
108
|
+
end
|
109
|
+
|
110
|
+
# @see the `==` method
|
111
|
+
# @param [Object] Object to be compared
|
112
|
+
def eql?(o)
|
113
|
+
self == o
|
114
|
+
end
|
115
|
+
|
116
|
+
# Calculates hash code according to all attributes.
|
117
|
+
# @return [Fixnum] Hash code
|
118
|
+
def hash
|
119
|
+
[options, data].hash
|
120
|
+
end
|
121
|
+
|
122
|
+
# Builds the object from hash
|
123
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
+
# @return [Object] Returns the model itself
|
125
|
+
def build_from_hash(attributes)
|
126
|
+
return nil unless attributes.is_a?(Hash)
|
127
|
+
self.class.swagger_types.each_pair do |key, type|
|
128
|
+
attribute_key = self.class.attribute_map[key]
|
129
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
130
|
+
if type =~ /\AArray<(.*)>/i
|
131
|
+
# check to ensure the input is an array given that the the attribute
|
132
|
+
# is documented as an array but the input is not
|
133
|
+
if attributes[attribute_key].is_a?(Array)
|
134
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
135
|
+
end
|
136
|
+
elsif !attributes[attribute_key].nil?
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
138
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
139
|
+
end
|
140
|
+
|
141
|
+
self
|
142
|
+
end
|
143
|
+
|
144
|
+
# Deserializes the data based on type
|
145
|
+
# @param string type Data type
|
146
|
+
# @param string value Value to be deserialized
|
147
|
+
# @return [Object] Deserialized data
|
148
|
+
def _deserialize(type, value)
|
149
|
+
case type.to_sym
|
150
|
+
when :DateTime
|
151
|
+
DateTime.parse(value)
|
152
|
+
when :Date
|
153
|
+
Date.parse(value)
|
154
|
+
when :String
|
155
|
+
value.to_s
|
156
|
+
when :Integer
|
157
|
+
value.to_i
|
158
|
+
when :Float
|
159
|
+
value.to_f
|
160
|
+
when :BOOLEAN
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
162
|
+
true
|
163
|
+
else
|
164
|
+
false
|
165
|
+
end
|
166
|
+
when :Object
|
167
|
+
# generic object (usually a Hash), return directly
|
168
|
+
value
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each do |k, v|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
else # model
|
181
|
+
type = value[:type] || type
|
182
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
183
|
+
temp_model.build_from_hash(value)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the string representation of the object
|
188
|
+
# @return [String] String presentation of the object
|
189
|
+
def to_s
|
190
|
+
to_hash.to_s
|
191
|
+
end
|
192
|
+
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_body
|
196
|
+
to_hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the object in the form of hash
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_hash
|
202
|
+
hash = {}
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
204
|
+
value = self.send(attr)
|
205
|
+
next if value.nil?
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
230
|
+
end
|