aspose_email_cloud 20.2.0 → 20.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +13 -0
  3. data/lib/aspose-email-cloud/api/email_api.rb +921 -879
  4. data/lib/aspose-email-cloud/api_client.rb +386 -382
  5. data/lib/aspose-email-cloud/api_error.rb +41 -41
  6. data/lib/aspose-email-cloud/configuration.rb +240 -240
  7. data/lib/aspose-email-cloud/models/account_base_request.rb +263 -260
  8. data/lib/aspose-email-cloud/models/add_attachment_request.rb +226 -223
  9. data/lib/aspose-email-cloud/models/ai_bcr_base64_image.rb +231 -228
  10. data/lib/aspose-email-cloud/models/ai_bcr_base64_rq.rb +228 -225
  11. data/lib/aspose-email-cloud/models/ai_bcr_image.rb +218 -215
  12. data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +231 -228
  13. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data.rb +256 -253
  14. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data_part.rb +300 -297
  15. data/lib/aspose-email-cloud/models/ai_bcr_options.rb +226 -223
  16. data/lib/aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq.rb +233 -230
  17. data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +251 -248
  18. data/lib/aspose-email-cloud/models/ai_bcr_rq.rb +213 -210
  19. data/lib/aspose-email-cloud/models/ai_bcr_storage_image_rq.rb +233 -230
  20. data/lib/aspose-email-cloud/models/ai_name_component.rb +267 -264
  21. data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +270 -267
  22. data/lib/aspose-email-cloud/models/ai_name_extracted.rb +233 -230
  23. data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +231 -228
  24. data/lib/aspose-email-cloud/models/ai_name_formatted.rb +226 -223
  25. data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +236 -233
  26. data/lib/aspose-email-cloud/models/ai_name_match_result.rb +233 -230
  27. data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +249 -246
  28. data/lib/aspose-email-cloud/models/ai_name_parsed_match_rq.rb +266 -263
  29. data/lib/aspose-email-cloud/models/ai_name_parsed_rq.rb +246 -243
  30. data/lib/aspose-email-cloud/models/ai_name_weighted.rb +231 -228
  31. data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +228 -225
  32. data/lib/aspose-email-cloud/models/alternate_view.rb +282 -279
  33. data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +318 -315
  34. data/lib/aspose-email-cloud/models/append_email_base_request.rb +336 -333
  35. data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +355 -352
  36. data/lib/aspose-email-cloud/models/append_email_model_rq.rb +336 -333
  37. data/lib/aspose-email-cloud/models/associated_person.rb +244 -241
  38. data/lib/aspose-email-cloud/models/attachment.rb +324 -321
  39. data/lib/aspose-email-cloud/models/attachment_base.rb +254 -251
  40. data/lib/aspose-email-cloud/models/base_object.rb +5 -2
  41. data/lib/aspose-email-cloud/models/calendar_dto.rb +557 -554
  42. data/lib/aspose-email-cloud/models/calendar_dto_alternate_rq.rb +268 -265
  43. data/lib/aspose-email-cloud/models/calendar_dto_list.rb +215 -212
  44. data/lib/aspose-email-cloud/models/calendar_reminder.rb +318 -315
  45. data/lib/aspose-email-cloud/models/contact_dto.rb +699 -696
  46. data/lib/aspose-email-cloud/models/contact_dto_list.rb +215 -212
  47. data/lib/aspose-email-cloud/models/contact_photo.rb +231 -228
  48. data/lib/aspose-email-cloud/models/content_type.rb +267 -264
  49. data/lib/aspose-email-cloud/models/content_type_parameter.rb +226 -223
  50. data/lib/aspose-email-cloud/models/create_email_request.rb +231 -228
  51. data/lib/aspose-email-cloud/models/create_folder_base_request.rb +313 -310
  52. data/lib/aspose-email-cloud/models/customer_event.rb +231 -228
  53. data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +318 -315
  54. data/lib/aspose-email-cloud/models/delete_message_base_request.rb +318 -315
  55. data/lib/aspose-email-cloud/models/disc_usage.rb +236 -233
  56. data/lib/aspose-email-cloud/models/discover_email_config_oauth.rb +391 -388
  57. data/lib/aspose-email-cloud/models/discover_email_config_password.rb +304 -301
  58. data/lib/aspose-email-cloud/models/discover_email_config_rq.rb +268 -265
  59. data/lib/aspose-email-cloud/models/email_account_config.rb +323 -320
  60. data/lib/aspose-email-cloud/models/email_account_config_list.rb +215 -212
  61. data/lib/aspose-email-cloud/models/email_account_request.rb +397 -394
  62. data/lib/aspose-email-cloud/models/email_address.rb +270 -267
  63. data/lib/aspose-email-cloud/models/email_client_account.rb +337 -0
  64. data/lib/aspose-email-cloud/models/email_client_account_credentials.rb +261 -0
  65. data/lib/aspose-email-cloud/models/email_client_account_oauth_credentials.rb +385 -0
  66. data/lib/aspose-email-cloud/models/email_client_account_password_credentials.rb +298 -0
  67. data/lib/aspose-email-cloud/models/email_client_multi_account.rb +233 -0
  68. data/lib/aspose-email-cloud/models/email_document.rb +233 -230
  69. data/lib/aspose-email-cloud/models/email_document_response.rb +213 -210
  70. data/lib/aspose-email-cloud/models/email_dto.rb +681 -678
  71. data/lib/aspose-email-cloud/models/email_dto_list.rb +215 -212
  72. data/lib/aspose-email-cloud/models/email_properties.rb +233 -230
  73. data/lib/aspose-email-cloud/models/email_property.rb +268 -265
  74. data/lib/aspose-email-cloud/models/email_property_response.rb +213 -210
  75. data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +230 -227
  76. data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +230 -227
  77. data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +230 -227
  78. data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +230 -227
  79. data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +230 -227
  80. data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +230 -227
  81. data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +230 -227
  82. data/lib/aspose-email-cloud/models/error.rb +252 -249
  83. data/lib/aspose-email-cloud/models/error_details.rb +231 -228
  84. data/lib/aspose-email-cloud/models/file_version.rb +306 -303
  85. data/lib/aspose-email-cloud/models/file_versions.rb +215 -212
  86. data/lib/aspose-email-cloud/models/files_list.rb +215 -212
  87. data/lib/aspose-email-cloud/models/files_upload_result.rb +230 -227
  88. data/lib/aspose-email-cloud/models/hierarchical_object.rb +5 -2
  89. data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +231 -228
  90. data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +226 -223
  91. data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +5 -2
  92. data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +5 -2
  93. data/lib/aspose-email-cloud/models/instant_messenger_address.rb +244 -241
  94. data/lib/aspose-email-cloud/models/link.rb +252 -249
  95. data/lib/aspose-email-cloud/models/linked_resource.rb +267 -264
  96. data/lib/aspose-email-cloud/models/list_response_of_ai_bcr_ocr_data.rb +214 -211
  97. data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +214 -211
  98. data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +214 -211
  99. data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +214 -211
  100. data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +214 -211
  101. data/lib/aspose-email-cloud/models/list_response_of_email_account_config.rb +214 -211
  102. data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +214 -211
  103. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object.rb +214 -211
  104. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +214 -211
  105. data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +214 -211
  106. data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +214 -211
  107. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +214 -211
  108. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +214 -211
  109. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +214 -211
  110. data/lib/aspose-email-cloud/models/list_response_of_string.rb +214 -211
  111. data/lib/aspose-email-cloud/models/mail_address.rb +244 -241
  112. data/lib/aspose-email-cloud/models/mail_server_folder.rb +226 -223
  113. data/lib/aspose-email-cloud/models/mime_response.rb +213 -210
  114. data/lib/aspose-email-cloud/models/name_value_pair.rb +226 -222
  115. data/lib/aspose-email-cloud/models/object_exist.rb +236 -233
  116. data/lib/aspose-email-cloud/models/phone_number.rb +244 -241
  117. data/lib/aspose-email-cloud/models/postal_address.rb +353 -350
  118. data/lib/aspose-email-cloud/models/primitive_object.rb +5 -2
  119. data/lib/aspose-email-cloud/models/reminder_attendee.rb +213 -210
  120. data/lib/aspose-email-cloud/models/reminder_trigger.rb +249 -246
  121. data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +99 -99
  122. data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +109 -109
  123. data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +99 -99
  124. data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +99 -99
  125. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +79 -79
  126. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +79 -79
  127. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +79 -79
  128. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +79 -79
  129. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +79 -79
  130. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +79 -79
  131. data/lib/aspose-email-cloud/models/requests/ai_name_complete_request_data.rb +110 -110
  132. data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +79 -79
  133. data/lib/aspose-email-cloud/models/requests/ai_name_expand_request_data.rb +110 -110
  134. data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +79 -79
  135. data/lib/aspose-email-cloud/models/requests/ai_name_format_request_data.rb +116 -116
  136. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +79 -79
  137. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb +110 -110
  138. data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +79 -79
  139. data/lib/aspose-email-cloud/models/requests/ai_name_match_request_data.rb +121 -121
  140. data/lib/aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb +110 -110
  141. data/lib/aspose-email-cloud/models/requests/ai_name_parse_request_data.rb +110 -110
  142. data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +79 -79
  143. data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +79 -79
  144. data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +79 -79
  145. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +79 -79
  146. data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +90 -90
  147. data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +108 -108
  148. data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +102 -102
  149. data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +89 -89
  150. data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +99 -99
  151. data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +79 -79
  152. data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +89 -89
  153. data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +85 -85
  154. data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +89 -89
  155. data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +109 -109
  156. data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +119 -119
  157. data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +79 -79
  158. data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +79 -79
  159. data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +91 -91
  160. data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +91 -91
  161. data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +99 -99
  162. data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +89 -89
  163. data/lib/aspose-email-cloud/models/requests/discover_email_config_oauth_request_data.rb +79 -79
  164. data/lib/aspose-email-cloud/models/requests/discover_email_config_password_request_data.rb +79 -79
  165. data/lib/aspose-email-cloud/models/requests/discover_email_config_request_data.rb +86 -86
  166. data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +91 -91
  167. data/lib/aspose-email-cloud/models/requests/email_request.rb +75 -75
  168. data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +109 -109
  169. data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +109 -109
  170. data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +101 -101
  171. data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +108 -108
  172. data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +107 -107
  173. data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +98 -98
  174. data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +91 -91
  175. data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +91 -91
  176. data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +111 -111
  177. data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +103 -103
  178. data/lib/aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb +103 -103
  179. data/lib/aspose-email-cloud/models/requests/get_contact_model_request_data.rb +101 -101
  180. data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +101 -101
  181. data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +75 -75
  182. data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +101 -101
  183. data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +101 -101
  184. data/lib/aspose-email-cloud/models/requests/get_email_client_account_request_data.rb +102 -0
  185. data/lib/aspose-email-cloud/models/requests/get_email_client_multi_account_request_data.rb +102 -0
  186. data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +103 -103
  187. data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +101 -101
  188. data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +101 -101
  189. data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +91 -91
  190. data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +85 -85
  191. data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +85 -85
  192. data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +101 -101
  193. data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +91 -91
  194. data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +93 -93
  195. data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +91 -91
  196. data/lib/aspose-email-cloud/models/requests/http_request.rb +51 -51
  197. data/lib/aspose-email-cloud/models/requests/is_email_address_disposable_request_data.rb +79 -0
  198. data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +104 -104
  199. data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +127 -127
  200. data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +127 -127
  201. data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +108 -108
  202. data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +102 -102
  203. data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +91 -91
  204. data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +89 -89
  205. data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +99 -99
  206. data/lib/aspose-email-cloud/models/requests/save_email_client_account_request_data.rb +79 -0
  207. data/lib/aspose-email-cloud/models/requests/save_email_client_multi_account_request_data.rb +79 -0
  208. data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +99 -99
  209. data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +79 -79
  210. data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +79 -79
  211. data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +79 -79
  212. data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +79 -79
  213. data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +79 -79
  214. data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +99 -99
  215. data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +79 -79
  216. data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +79 -79
  217. data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +89 -89
  218. data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +99 -99
  219. data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +89 -89
  220. data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +97 -97
  221. data/lib/aspose-email-cloud/models/save_email_account_request.rb +434 -431
  222. data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +521 -505
  223. data/lib/aspose-email-cloud/models/send_email_base_request.rb +281 -278
  224. data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +300 -297
  225. data/lib/aspose-email-cloud/models/send_email_model_rq.rb +276 -273
  226. data/lib/aspose-email-cloud/models/set_email_property_request.rb +231 -228
  227. data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +318 -315
  228. data/lib/aspose-email-cloud/models/storage_exist.rb +218 -215
  229. data/lib/aspose-email-cloud/models/storage_file.rb +275 -272
  230. data/lib/aspose-email-cloud/models/storage_file_location.rb +263 -260
  231. data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_account.rb +225 -0
  232. data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_multi_account.rb +225 -0
  233. data/lib/aspose-email-cloud/models/storage_folder_location.rb +226 -223
  234. data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +225 -222
  235. data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +225 -222
  236. data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +225 -222
  237. data/lib/aspose-email-cloud/models/storage_model_rq_of_calendar_dto.rb +225 -222
  238. data/lib/aspose-email-cloud/models/storage_model_rq_of_contact_dto.rb +225 -222
  239. data/lib/aspose-email-cloud/models/storage_model_rq_of_email_dto.rb +225 -222
  240. data/lib/aspose-email-cloud/models/url.rb +244 -241
  241. data/lib/aspose-email-cloud/models/value_response.rb +213 -210
  242. data/lib/aspose-email-cloud/models/value_t_of_boolean.rb +217 -0
  243. data/lib/aspose-email-cloud/version.rb +1 -1
  244. metadata +15 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b00a1fb44618852859397be2419126c0414282f6f6e9e6f0b2a41902bb6e6ac8
4
- data.tar.gz: 98d5a2f5d692371922332d1df9bae6d02b4b4aed44adf678f02215d185bdfc58
3
+ metadata.gz: f78e3a28187c0f18edfb95c4bab1c94eca17aacdd0d4188c246bcaf9b2686155
4
+ data.tar.gz: 4d5fe48261281a16294497add25ec23c3eb9489b2a074ac73ccd1a46d22db4a5
5
5
  SHA512:
6
- metadata.gz: 5abb3f96bf2f552936ea72462a65432a8556905d8d308712009c49a7e4c69cb5af730d3bd8de1672afbd2c837487468c24c24c7c657246c69a54660b1cf09105
7
- data.tar.gz: c19577f0e204a37b1ec442819d45e6a8b64753ed983ded2e1a590b25338a57c35481868183b35a344d26a9aeb8cdc76cada82d19b6b9c6c992350eb1b0bfb451
6
+ metadata.gz: 3f0096cce858287f019f5cf5513cfc9a70855285227dbb5761b690d1c4ce479b1ff64414fac9167046c5ae336a85c9c83ecbff8bb92660931184b858699cf7da
7
+ data.tar.gz: e902f3dc52b44a42ac118ff133ac0fcaac2736dd7e9fc02158cfa38eb7b43b89cebdd07cbd9f5fab02dd24e7f8cff4f4f849973d7dee8672d1bfb3601002406f
@@ -66,6 +66,9 @@ require_relative './aspose-email-cloud/models/discover_email_config_rq'
66
66
  require_relative './aspose-email-cloud/models/email_account_config'
67
67
  require_relative './aspose-email-cloud/models/email_account_request'
68
68
  require_relative './aspose-email-cloud/models/email_address'
69
+ require_relative './aspose-email-cloud/models/email_client_account'
70
+ require_relative './aspose-email-cloud/models/email_client_account_credentials'
71
+ require_relative './aspose-email-cloud/models/email_client_multi_account'
69
72
  require_relative './aspose-email-cloud/models/email_document'
70
73
  require_relative './aspose-email-cloud/models/email_document_response'
71
74
  require_relative './aspose-email-cloud/models/email_dto'
@@ -115,6 +118,8 @@ require_relative './aspose-email-cloud/models/reminder_trigger'
115
118
  require_relative './aspose-email-cloud/models/set_email_property_request'
116
119
  require_relative './aspose-email-cloud/models/storage_exist'
117
120
  require_relative './aspose-email-cloud/models/storage_file'
121
+ require_relative './aspose-email-cloud/models/storage_file_rq_of_email_client_account'
122
+ require_relative './aspose-email-cloud/models/storage_file_rq_of_email_client_multi_account'
118
123
  require_relative './aspose-email-cloud/models/storage_folder_location'
119
124
  require_relative './aspose-email-cloud/models/storage_model_of_calendar_dto'
120
125
  require_relative './aspose-email-cloud/models/storage_model_of_contact_dto'
@@ -124,6 +129,7 @@ require_relative './aspose-email-cloud/models/storage_model_rq_of_contact_dto'
124
129
  require_relative './aspose-email-cloud/models/storage_model_rq_of_email_dto'
125
130
  require_relative './aspose-email-cloud/models/url'
126
131
  require_relative './aspose-email-cloud/models/value_response'
132
+ require_relative './aspose-email-cloud/models/value_t_of_boolean'
127
133
  require_relative './aspose-email-cloud/models/ai_bcr_base64_image'
128
134
  require_relative './aspose-email-cloud/models/ai_bcr_base64_rq'
129
135
  require_relative './aspose-email-cloud/models/ai_bcr_image_storage_file'
@@ -141,6 +147,8 @@ require_relative './aspose-email-cloud/models/delete_message_base_request'
141
147
  require_relative './aspose-email-cloud/models/discover_email_config_oauth'
142
148
  require_relative './aspose-email-cloud/models/discover_email_config_password'
143
149
  require_relative './aspose-email-cloud/models/email_account_config_list'
150
+ require_relative './aspose-email-cloud/models/email_client_account_oauth_credentials'
151
+ require_relative './aspose-email-cloud/models/email_client_account_password_credentials'
144
152
  require_relative './aspose-email-cloud/models/email_dto_list'
145
153
  require_relative './aspose-email-cloud/models/file_version'
146
154
  require_relative './aspose-email-cloud/models/hierarchical_object'
@@ -228,6 +236,8 @@ require_relative './aspose-email-cloud/models/requests/get_contact_properties_re
228
236
  require_relative './aspose-email-cloud/models/requests/get_disc_usage_request_data.rb'
229
237
  require_relative './aspose-email-cloud/models/requests/get_email_as_file_request_data.rb'
230
238
  require_relative './aspose-email-cloud/models/requests/get_email_attachment_request_data.rb'
239
+ require_relative './aspose-email-cloud/models/requests/get_email_client_account_request_data.rb'
240
+ require_relative './aspose-email-cloud/models/requests/get_email_client_multi_account_request_data.rb'
231
241
  require_relative './aspose-email-cloud/models/requests/get_email_model_list_request_data.rb'
232
242
  require_relative './aspose-email-cloud/models/requests/get_email_model_request_data.rb'
233
243
  require_relative './aspose-email-cloud/models/requests/get_email_property_request_data.rb'
@@ -239,6 +249,7 @@ require_relative './aspose-email-cloud/models/requests/get_mapi_attachment_reque
239
249
  require_relative './aspose-email-cloud/models/requests/get_mapi_list_request_data.rb'
240
250
  require_relative './aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb'
241
251
  require_relative './aspose-email-cloud/models/requests/http_request.rb'
252
+ require_relative './aspose-email-cloud/models/requests/is_email_address_disposable_request_data.rb'
242
253
  require_relative './aspose-email-cloud/models/requests/list_email_folders_request_data.rb'
243
254
  require_relative './aspose-email-cloud/models/requests/list_email_messages_request_data.rb'
244
255
  require_relative './aspose-email-cloud/models/requests/list_email_models_request_data.rb'
@@ -247,6 +258,8 @@ require_relative './aspose-email-cloud/models/requests/move_folder_request_data.
247
258
  require_relative './aspose-email-cloud/models/requests/object_exists_request_data.rb'
248
259
  require_relative './aspose-email-cloud/models/requests/save_calendar_model_request_data.rb'
249
260
  require_relative './aspose-email-cloud/models/requests/save_contact_model_request_data.rb'
261
+ require_relative './aspose-email-cloud/models/requests/save_email_client_account_request_data.rb'
262
+ require_relative './aspose-email-cloud/models/requests/save_email_client_multi_account_request_data.rb'
250
263
  require_relative './aspose-email-cloud/models/requests/save_email_model_request_data.rb'
251
264
  require_relative './aspose-email-cloud/models/requests/save_mail_account_request_data.rb'
252
265
  require_relative './aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb'
@@ -1,879 +1,921 @@
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 [AddCalendarAttachmentRequestData] 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 [AddContactAttachmentRequestData] 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 [AddEmailAttachmentRequestData] 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 [AddMapiAttachmentRequestData] 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
- # Ocr images
81
- # @param [AiBcrOcrRequestData] request Request object.
82
- # @return [ListResponseOfAiBcrOcrData]
83
- def ai_bcr_ocr(request)
84
- http_request = request.to_http_info(@api_client)
85
- make_request(http_request, :POST, 'ListResponseOfAiBcrOcrData')
86
- end
87
-
88
- # Ocr images from storage
89
- # @param [AiBcrOcrStorageRequestData] request Request object.
90
- # @return [ListResponseOfAiBcrOcrData]
91
- def ai_bcr_ocr_storage(request)
92
- http_request = request.to_http_info(@api_client)
93
- make_request(http_request, :POST, 'ListResponseOfAiBcrOcrData')
94
- end
95
-
96
- # Parse images to vCard properties
97
- # @param [AiBcrParseRequestData] request Request object.
98
- # @return [ListResponseOfHierarchicalObject]
99
- def ai_bcr_parse(request)
100
- http_request = request.to_http_info(@api_client)
101
- make_request(http_request, :POST, 'ListResponseOfHierarchicalObject')
102
- end
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
-
120
- # Parse images from storage to vCard files
121
- # @param [AiBcrParseStorageRequestData] request Request object.
122
- # @return [ListResponseOfStorageFileLocation]
123
- def ai_bcr_parse_storage(request)
124
- http_request = request.to_http_info(@api_client)
125
- make_request(http_request, :POST, 'ListResponseOfStorageFileLocation')
126
- end
127
-
128
- # The call proposes k most probable names for given starting characters
129
- # @param [AiNameCompleteRequestData] request Request object.
130
- # @return [AiNameWeightedVariants]
131
- def ai_name_complete(request)
132
- http_request = request.to_http_info(@api_client)
133
- make_request(http_request, :GET, 'AiNameWeightedVariants')
134
- end
135
-
136
- # Expands a person's name into a list of possible alternatives using options for expanding instructions
137
- # @param [AiNameExpandRequestData] request Request object.
138
- # @return [AiNameWeightedVariants]
139
- def ai_name_expand(request)
140
- http_request = request.to_http_info(@api_client)
141
- make_request(http_request, :GET, 'AiNameWeightedVariants')
142
- end
143
-
144
- # Expands a person's parsed name into a list of possible alternatives using options for expanding instructions
145
- # @param [AiNameExpandParsedRequestData] request Request object.
146
- # @return [AiNameWeightedVariants]
147
- def ai_name_expand_parsed(request)
148
- http_request = request.to_http_info(@api_client)
149
- make_request(http_request, :POST, 'AiNameWeightedVariants')
150
- end
151
-
152
- # Formats a person's name in correct case and name order using options for formatting instructions
153
- # @param [AiNameFormatRequestData] request Request object.
154
- # @return [AiNameFormatted]
155
- def ai_name_format(request)
156
- http_request = request.to_http_info(@api_client)
157
- make_request(http_request, :GET, 'AiNameFormatted')
158
- end
159
-
160
- # Formats a person's parsed name in correct case and name order using options for formatting instructions
161
- # @param [AiNameFormatParsedRequestData] request Request object.
162
- # @return [AiNameFormatted]
163
- def ai_name_format_parsed(request)
164
- http_request = request.to_http_info(@api_client)
165
- make_request(http_request, :POST, 'AiNameFormatted')
166
- end
167
-
168
- # Detect person's gender from name string
169
- # @param [AiNameGenderizeRequestData] request Request object.
170
- # @return [ListResponseOfAiNameGenderHypothesis]
171
- def ai_name_genderize(request)
172
- http_request = request.to_http_info(@api_client)
173
- make_request(http_request, :GET, 'ListResponseOfAiNameGenderHypothesis')
174
- end
175
-
176
- # Detect person's gender from parsed name
177
- # @param [AiNameGenderizeParsedRequestData] request Request object.
178
- # @return [ListResponseOfAiNameGenderHypothesis]
179
- def ai_name_genderize_parsed(request)
180
- http_request = request.to_http_info(@api_client)
181
- make_request(http_request, :POST, 'ListResponseOfAiNameGenderHypothesis')
182
- end
183
-
184
- # Compare people's names. Uses options for comparing instructions
185
- # @param [AiNameMatchRequestData] request Request object.
186
- # @return [AiNameMatchResult]
187
- def ai_name_match(request)
188
- http_request = request.to_http_info(@api_client)
189
- make_request(http_request, :GET, 'AiNameMatchResult')
190
- end
191
-
192
- # Compare people's parsed names and attributes. Uses options for comparing instructions
193
- # @param [AiNameMatchParsedRequestData] request Request object.
194
- # @return [AiNameMatchResult]
195
- def ai_name_match_parsed(request)
196
- http_request = request.to_http_info(@api_client)
197
- make_request(http_request, :POST, 'AiNameMatchResult')
198
- end
199
-
200
- # Parse name to components
201
- # @param [AiNameParseRequestData] request Request object.
202
- # @return [ListResponseOfAiNameComponent]
203
- def ai_name_parse(request)
204
- http_request = request.to_http_info(@api_client)
205
- make_request(http_request, :GET, 'ListResponseOfAiNameComponent')
206
- end
207
-
208
- # Parse person's name out of an email address
209
- # @param [AiNameParseEmailAddressRequestData] request Request object.
210
- # @return [ListResponseOfAiNameExtracted]
211
- def ai_name_parse_email_address(request)
212
- http_request = request.to_http_info(@api_client)
213
- make_request(http_request, :GET, 'ListResponseOfAiNameExtracted')
214
- end
215
-
216
- # Adds an email from *.eml file to specified folder in email account
217
- # @param [AppendEmailMessageRequestData] request Request object.
218
- # @return [EmailPropertyResponse]
219
- def append_email_message(request)
220
- http_request = request.to_http_info(@api_client)
221
- make_request(http_request, :PUT, 'EmailPropertyResponse')
222
- end
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
-
232
- # Adds an email from MIME to specified folder in email account
233
- # @param [AppendMimeMessageRequestData] request Request object.
234
- # @return [ValueResponse]
235
- def append_mime_message(request)
236
- http_request = request.to_http_info(@api_client)
237
- make_request(http_request, :PUT, 'ValueResponse')
238
- end
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
-
256
- # Copy file
257
- # @param [CopyFileRequestData] request Request object.
258
- # @return [nil]
259
- def copy_file(request)
260
- http_request = request.to_http_info(@api_client)
261
- make_request(http_request, :PUT, nil)
262
- nil
263
- end
264
-
265
- # Copy folder
266
- # @param [CopyFolderRequestData] request Request object.
267
- # @return [nil]
268
- def copy_folder(request)
269
- http_request = request.to_http_info(@api_client)
270
- make_request(http_request, :PUT, nil)
271
- nil
272
- end
273
-
274
- # Create calendar file
275
- # @param [CreateCalendarRequestData] request Request object.
276
- # @return [nil]
277
- def create_calendar(request)
278
- http_request = request.to_http_info(@api_client)
279
- make_request(http_request, :PUT, nil)
280
- nil
281
- end
282
-
283
- # Create contact document
284
- # @param [CreateContactRequestData] request Request object.
285
- # @return [nil]
286
- def create_contact(request)
287
- http_request = request.to_http_info(@api_client)
288
- make_request(http_request, :PUT, nil)
289
- nil
290
- end
291
-
292
- # Create an email document
293
- # @param [CreateEmailRequestData] request Request object.
294
- # @return [EmailDocumentResponse]
295
- def create_email(request)
296
- http_request = request.to_http_info(@api_client)
297
- make_request(http_request, :PUT, 'EmailDocumentResponse')
298
- end
299
-
300
- # Create new folder in email account
301
- # @param [CreateEmailFolderRequestData] request Request object.
302
- # @return [nil]
303
- def create_email_folder(request)
304
- http_request = request.to_http_info(@api_client)
305
- make_request(http_request, :PUT, nil)
306
- nil
307
- end
308
-
309
- # Create the folder
310
- # @param [CreateFolderRequestData] request Request object.
311
- # @return [nil]
312
- def create_folder(request)
313
- http_request = request.to_http_info(@api_client)
314
- make_request(http_request, :PUT, nil)
315
- nil
316
- end
317
-
318
- # Create new document
319
- # @param [CreateMapiRequestData] request Request object.
320
- # @return [nil]
321
- def create_mapi(request)
322
- http_request = request.to_http_info(@api_client)
323
- make_request(http_request, :PUT, nil)
324
- nil
325
- end
326
-
327
- # Deletes indexed property by index and name. To delete Reminder attachment, use path ReminderAttachment/{ReminderIndex}/{AttachmentIndex}
328
- # @param [DeleteCalendarPropertyRequestData] request Request object.
329
- # @return [nil]
330
- def delete_calendar_property(request)
331
- http_request = request.to_http_info(@api_client)
332
- make_request(http_request, :DELETE, nil)
333
- nil
334
- end
335
-
336
- # Delete property from indexed property list
337
- # @param [DeleteContactPropertyRequestData] request Request object.
338
- # @return [nil]
339
- def delete_contact_property(request)
340
- http_request = request.to_http_info(@api_client)
341
- make_request(http_request, :DELETE, nil)
342
- nil
343
- end
344
-
345
- # Delete a folder in email account
346
- # @param [DeleteEmailFolderRequestData] request Request object.
347
- # @return [nil]
348
- def delete_email_folder(request)
349
- http_request = request.to_http_info(@api_client)
350
- make_request(http_request, :DELETE, nil)
351
- nil
352
- end
353
-
354
- # Delete message from email account by id
355
- # @param [DeleteEmailMessageRequestData] request Request object.
356
- # @return [nil]
357
- def delete_email_message(request)
358
- http_request = request.to_http_info(@api_client)
359
- make_request(http_request, :DELETE, nil)
360
- nil
361
- end
362
-
363
- # Delete file
364
- # @param [DeleteFileRequestData] request Request object.
365
- # @return [nil]
366
- def delete_file(request)
367
- http_request = request.to_http_info(@api_client)
368
- make_request(http_request, :DELETE, nil)
369
- nil
370
- end
371
-
372
- # Delete folder
373
- # @param [DeleteFolderRequestData] request Request object.
374
- # @return [nil]
375
- def delete_folder(request)
376
- http_request = request.to_http_info(@api_client)
377
- make_request(http_request, :DELETE, nil)
378
- nil
379
- end
380
-
381
- # Remove attachment from document
382
- # @param [DeleteMapiAttachmentRequestData] request Request object.
383
- # @return [nil]
384
- def delete_mapi_attachment(request)
385
- http_request = request.to_http_info(@api_client)
386
- make_request(http_request, :DELETE, nil)
387
- nil
388
- end
389
-
390
- # Delete document properties
391
- # @param [DeleteMapiPropertiesRequestData] request Request object.
392
- # @return [nil]
393
- def delete_mapi_properties(request)
394
- http_request = request.to_http_info(@api_client)
395
- make_request(http_request, :DELETE, nil)
396
- nil
397
- end
398
-
399
- # Discover email accounts by email address. Does not validate discovered accounts.
400
- # @param [DiscoverEmailConfigRequestData] request Request object.
401
- # @return [EmailAccountConfigList]
402
- def discover_email_config(request)
403
- http_request = request.to_http_info(@api_client)
404
- make_request(http_request, :GET, 'EmailAccountConfigList')
405
- end
406
-
407
- # Discover email accounts by email address. Validates discovered accounts using OAuth 2.0.
408
- # @param [DiscoverEmailConfigOauthRequestData] request Request object.
409
- # @return [EmailAccountConfigList]
410
- def discover_email_config_oauth(request)
411
- http_request = request.to_http_info(@api_client)
412
- make_request(http_request, :POST, 'EmailAccountConfigList')
413
- end
414
-
415
- # Discover email accounts by email address. Validates discovered accounts using login and password.
416
- # @param [DiscoverEmailConfigPasswordRequestData] request Request object.
417
- # @return [EmailAccountConfigList]
418
- def discover_email_config_password(request)
419
- http_request = request.to_http_info(@api_client)
420
- make_request(http_request, :POST, 'EmailAccountConfigList')
421
- end
422
-
423
- # Download file
424
- # @param [DownloadFileRequestData] request Request object.
425
- # @return [File]
426
- def download_file(request)
427
- http_request = request.to_http_info(@api_client)
428
- make_request(http_request, :GET, 'File')
429
- end
430
-
431
- # Fetch message mime from email account
432
- # @param [FetchEmailMessageRequestData] request Request object.
433
- # @return [MimeResponse]
434
- def fetch_email_message(request)
435
- http_request = request.to_http_info(@api_client)
436
- make_request(http_request, :GET, 'MimeResponse')
437
- end
438
-
439
- # Fetch message model from email account
440
- # @param [FetchEmailModelRequestData] request Request object.
441
- # @return [EmailDto]
442
- def fetch_email_model(request)
443
- http_request = request.to_http_info(@api_client)
444
- make_request(http_request, :GET, 'EmailDto')
445
- end
446
-
447
- # Get calendar file properties
448
- # @param [GetCalendarRequestData] request Request object.
449
- # @return [HierarchicalObject]
450
- def get_calendar(request)
451
- http_request = request.to_http_info(@api_client)
452
- make_request(http_request, :GET, 'HierarchicalObject')
453
- end
454
-
455
- # Get iCalendar document attachment by name
456
- # @param [GetCalendarAttachmentRequestData] request Request object.
457
- # @return [File]
458
- def get_calendar_attachment(request)
459
- http_request = request.to_http_info(@api_client)
460
- make_request(http_request, :GET, 'File')
461
- end
462
-
463
- # Get iCalendar files list in folder on storage
464
- # @param [GetCalendarListRequestData] request Request object.
465
- # @return [ListResponseOfHierarchicalObjectResponse]
466
- def get_calendar_list(request)
467
- http_request = request.to_http_info(@api_client)
468
- make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
469
- end
470
-
471
- # Get calendar file
472
- # @param [GetCalendarModelRequestData] request Request object.
473
- # @return [CalendarDto]
474
- def get_calendar_model(request)
475
- http_request = request.to_http_info(@api_client)
476
- make_request(http_request, :GET, 'CalendarDto')
477
- end
478
-
479
- # Get iCalendar from storage as AlternateView
480
- # @param [GetCalendarModelAsAlternateRequestData] request Request object.
481
- # @return [AlternateView]
482
- def get_calendar_model_as_alternate(request)
483
- http_request = request.to_http_info(@api_client)
484
- make_request(http_request, :GET, 'AlternateView')
485
- end
486
-
487
- # Get iCalendar list from storage folder
488
- # @param [GetCalendarModelListRequestData] request Request object.
489
- # @return [CalendarDtoList]
490
- def get_calendar_model_list(request)
491
- http_request = request.to_http_info(@api_client)
492
- make_request(http_request, :GET, 'CalendarDtoList')
493
- end
494
-
495
- # Get attachment file by name
496
- # @param [GetContactAttachmentRequestData] request Request object.
497
- # @return [File]
498
- def get_contact_attachment(request)
499
- http_request = request.to_http_info(@api_client)
500
- make_request(http_request, :GET, 'File')
501
- end
502
-
503
- # Get contact list from storage folder
504
- # @param [GetContactListRequestData] request Request object.
505
- # @return [ListResponseOfHierarchicalObjectResponse]
506
- def get_contact_list(request)
507
- http_request = request.to_http_info(@api_client)
508
- make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
509
- end
510
-
511
- # Get contact document.
512
- # @param [GetContactModelRequestData] request Request object.
513
- # @return [ContactDto]
514
- def get_contact_model(request)
515
- http_request = request.to_http_info(@api_client)
516
- make_request(http_request, :GET, 'ContactDto')
517
- end
518
-
519
- # Get contact list from storage folder.
520
- # @param [GetContactModelListRequestData] request Request object.
521
- # @return [ContactDtoList]
522
- def get_contact_model_list(request)
523
- http_request = request.to_http_info(@api_client)
524
- make_request(http_request, :GET, 'ContactDtoList')
525
- end
526
-
527
- # Get contact document properties
528
- # @param [GetContactPropertiesRequestData] request Request object.
529
- # @return [HierarchicalObject]
530
- def get_contact_properties(request)
531
- http_request = request.to_http_info(@api_client)
532
- make_request(http_request, :GET, 'HierarchicalObject')
533
- end
534
-
535
- # Get disc usage
536
- # @param [GetDiscUsageRequestData] request Request object.
537
- # @return [DiscUsage]
538
- def get_disc_usage(request)
539
- http_request = request.to_http_info(@api_client)
540
- make_request(http_request, :GET, 'DiscUsage')
541
- end
542
-
543
- # Get email document
544
- # @param [GetEmailRequestData] request Request object.
545
- # @return [EmailDocument]
546
- def get_email(request)
547
- http_request = request.to_http_info(@api_client)
548
- make_request(http_request, :GET, 'EmailDocument')
549
- end
550
-
551
- # Converts email document from storage to specified format and returns as file
552
- # @param [GetEmailAsFileRequestData] request Request object.
553
- # @return [File]
554
- def get_email_as_file(request)
555
- http_request = request.to_http_info(@api_client)
556
- make_request(http_request, :GET, 'File')
557
- end
558
-
559
- # Get email attachment by name
560
- # @param [GetEmailAttachmentRequestData] request Request object.
561
- # @return [File]
562
- def get_email_attachment(request)
563
- http_request = request.to_http_info(@api_client)
564
- make_request(http_request, :GET, 'File')
565
- end
566
-
567
- # Get email document.
568
- # @param [GetEmailModelRequestData] request Request object.
569
- # @return [EmailDto]
570
- def get_email_model(request)
571
- http_request = request.to_http_info(@api_client)
572
- make_request(http_request, :GET, 'EmailDto')
573
- end
574
-
575
- # Get email list from storage folder.
576
- # @param [GetEmailModelListRequestData] request Request object.
577
- # @return [EmailDtoList]
578
- def get_email_model_list(request)
579
- http_request = request.to_http_info(@api_client)
580
- make_request(http_request, :GET, 'EmailDtoList')
581
- end
582
-
583
- # Get an email document property by its name
584
- # @param [GetEmailPropertyRequestData] request Request object.
585
- # @return [EmailPropertyResponse]
586
- def get_email_property(request)
587
- http_request = request.to_http_info(@api_client)
588
- make_request(http_request, :GET, 'EmailPropertyResponse')
589
- end
590
-
591
- # Get file versions
592
- # @param [GetFileVersionsRequestData] request Request object.
593
- # @return [FileVersions]
594
- def get_file_versions(request)
595
- http_request = request.to_http_info(@api_client)
596
- make_request(http_request, :GET, 'FileVersions')
597
- end
598
-
599
- # Get all files and folders within a folder
600
- # @param [GetFilesListRequestData] request Request object.
601
- # @return [FilesList]
602
- def get_files_list(request)
603
- http_request = request.to_http_info(@api_client)
604
- make_request(http_request, :GET, 'FilesList')
605
- end
606
-
607
- # Get document attachment as file stream
608
- # @param [GetMapiAttachmentRequestData] request Request object.
609
- # @return [File]
610
- def get_mapi_attachment(request)
611
- http_request = request.to_http_info(@api_client)
612
- make_request(http_request, :GET, 'File')
613
- end
614
-
615
- # Get document attachment list
616
- # @param [GetMapiAttachmentsRequestData] request Request object.
617
- # @return [ListResponseOfString]
618
- def get_mapi_attachments(request)
619
- http_request = request.to_http_info(@api_client)
620
- make_request(http_request, :GET, 'ListResponseOfString')
621
- end
622
-
623
- # Get document list from storage folder
624
- # @param [GetMapiListRequestData] request Request object.
625
- # @return [ListResponseOfHierarchicalObjectResponse]
626
- def get_mapi_list(request)
627
- http_request = request.to_http_info(@api_client)
628
- make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
629
- end
630
-
631
- # Get document properties
632
- # @param [GetMapiPropertiesRequestData] request Request object.
633
- # @return [HierarchicalObjectResponse]
634
- def get_mapi_properties(request)
635
- http_request = request.to_http_info(@api_client)
636
- make_request(http_request, :GET, 'HierarchicalObjectResponse')
637
- end
638
-
639
- # Get folders list in email account
640
- # @param [ListEmailFoldersRequestData] request Request object.
641
- # @return [ListResponseOfMailServerFolder]
642
- def list_email_folders(request)
643
- http_request = request.to_http_info(@api_client)
644
- make_request(http_request, :GET, 'ListResponseOfMailServerFolder')
645
- end
646
-
647
- # Get messages from folder, filtered by query
648
- # The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where &lt;Field Name&gt; - the name of a message field through which filtering is made, &lt;Comparison operator&gt; - comparison operators, as their name implies, allow to compare message field and specified value, &lt;Field value&gt; - 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 \"&amp;\" - 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\"
649
- # @param [ListEmailMessagesRequestData] request Request object.
650
- # @return [ListResponseOfString]
651
- def list_email_messages(request)
652
- http_request = request.to_http_info(@api_client)
653
- make_request(http_request, :GET, 'ListResponseOfString')
654
- end
655
-
656
- # Get messages from folder, filtered by query
657
- # The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where &lt;Field Name&gt; - the name of a message field through which filtering is made, &lt;Comparison operator&gt; - comparison operators, as their name implies, allow to compare message field and specified value, &lt;Field value&gt; - 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 \"&amp;\" - 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\"
658
- # @param [ListEmailModelsRequestData] request Request object.
659
- # @return [ListResponseOfEmailDto]
660
- def list_email_models(request)
661
- http_request = request.to_http_info(@api_client)
662
- make_request(http_request, :GET, 'ListResponseOfEmailDto')
663
- end
664
-
665
- # Move file
666
- # @param [MoveFileRequestData] request Request object.
667
- # @return [nil]
668
- def move_file(request)
669
- http_request = request.to_http_info(@api_client)
670
- make_request(http_request, :PUT, nil)
671
- nil
672
- end
673
-
674
- # Move folder
675
- # @param [MoveFolderRequestData] request Request object.
676
- # @return [nil]
677
- def move_folder(request)
678
- http_request = request.to_http_info(@api_client)
679
- make_request(http_request, :PUT, nil)
680
- nil
681
- end
682
-
683
- # Check if file or folder exists
684
- # @param [ObjectExistsRequestData] request Request object.
685
- # @return [ObjectExist]
686
- def object_exists(request)
687
- http_request = request.to_http_info(@api_client)
688
- make_request(http_request, :GET, 'ObjectExist')
689
- end
690
-
691
- # Save iCalendar
692
- # @param [SaveCalendarModelRequestData] request Request object.
693
- # @return [nil]
694
- def save_calendar_model(request)
695
- http_request = request.to_http_info(@api_client)
696
- make_request(http_request, :PUT, nil)
697
- nil
698
- end
699
-
700
- # Save contact.
701
- # @param [SaveContactModelRequestData] request Request object.
702
- # @return [nil]
703
- def save_contact_model(request)
704
- http_request = request.to_http_info(@api_client)
705
- make_request(http_request, :PUT, nil)
706
- nil
707
- end
708
-
709
- # Save email document.
710
- # @param [SaveEmailModelRequestData] request Request object.
711
- # @return [nil]
712
- def save_email_model(request)
713
- http_request = request.to_http_info(@api_client)
714
- make_request(http_request, :PUT, nil)
715
- nil
716
- end
717
-
718
- # Create email account file (*.account) with login/password authentication
719
- # @param [SaveMailAccountRequestData] request Request object.
720
- # @return [nil]
721
- def save_mail_account(request)
722
- http_request = request.to_http_info(@api_client)
723
- make_request(http_request, :POST, nil)
724
- nil
725
- end
726
-
727
- # Create email account file (*.account) with OAuth
728
- # @param [SaveMailOAuthAccountRequestData] request Request object.
729
- # @return [nil]
730
- def save_mail_o_auth_account(request)
731
- http_request = request.to_http_info(@api_client)
732
- make_request(http_request, :POST, nil)
733
- nil
734
- end
735
-
736
- # Send an email from *.eml file located on storage
737
- # @param [SendEmailRequestData] request Request object.
738
- # @return [nil]
739
- def send_email(request)
740
- http_request = request.to_http_info(@api_client)
741
- make_request(http_request, :POST, nil)
742
- nil
743
- end
744
-
745
- # Send an email specified by MIME in request
746
- # @param [SendEmailMimeRequestData] request Request object.
747
- # @return [nil]
748
- def send_email_mime(request)
749
- http_request = request.to_http_info(@api_client)
750
- make_request(http_request, :POST, nil)
751
- nil
752
- end
753
-
754
- # Send an email specified by model in request
755
- # @param [SendEmailModelRequestData] request Request object.
756
- # @return [nil]
757
- def send_email_model(request)
758
- http_request = request.to_http_info(@api_client)
759
- make_request(http_request, :POST, nil)
760
- nil
761
- end
762
-
763
- # Set email document property value
764
- # @param [SetEmailPropertyRequestData] request Request object.
765
- # @return [EmailPropertyResponse]
766
- def set_email_property(request)
767
- http_request = request.to_http_info(@api_client)
768
- make_request(http_request, :PUT, 'EmailPropertyResponse')
769
- end
770
-
771
- # Sets \"Message is read\" flag
772
- # @param [SetEmailReadFlagRequestData] request Request object.
773
- # @return [nil]
774
- def set_email_read_flag(request)
775
- http_request = request.to_http_info(@api_client)
776
- make_request(http_request, :POST, nil)
777
- nil
778
- end
779
-
780
- # Check if storage exists
781
- # @param [StorageExistsRequestData] request Request object.
782
- # @return [StorageExist]
783
- def storage_exists(request)
784
- http_request = request.to_http_info(@api_client)
785
- make_request(http_request, :GET, 'StorageExist')
786
- end
787
-
788
- # Update calendar file properties
789
- # @param [UpdateCalendarPropertiesRequestData] request Request object.
790
- # @return [nil]
791
- def update_calendar_properties(request)
792
- http_request = request.to_http_info(@api_client)
793
- make_request(http_request, :PUT, nil)
794
- nil
795
- end
796
-
797
- # Update contact document properties
798
- # @param [UpdateContactPropertiesRequestData] request Request object.
799
- # @return [nil]
800
- def update_contact_properties(request)
801
- http_request = request.to_http_info(@api_client)
802
- make_request(http_request, :PUT, nil)
803
- nil
804
- end
805
-
806
- # Update document properties
807
- # @param [UpdateMapiPropertiesRequestData] request Request object.
808
- # @return [nil]
809
- def update_mapi_properties(request)
810
- http_request = request.to_http_info(@api_client)
811
- make_request(http_request, :PUT, nil)
812
- nil
813
- end
814
-
815
- # Upload file
816
- # @param [UploadFileRequestData] request Request object.
817
- # @return [FilesUploadResult]
818
- def upload_file(request)
819
- http_request = request.to_http_info(@api_client)
820
- make_request(http_request, :PUT, 'FilesUploadResult')
821
- end
822
-
823
- private
824
-
825
- def make_request(http_request, method, return_type)
826
- call_api(http_request, method, return_type)
827
- rescue ApiError => e
828
- if e.code.equal? 401
829
- request_token
830
- return call_api(http_request, method, return_type)
831
- end
832
- raise
833
-
834
- end
835
-
836
- def call_api(http_request, method, return_type)
837
- response = @api_client.call_api(method,
838
- http_request.resource_path,
839
- header_params: http_request.header_params,
840
- query_params: http_request.query_params,
841
- form_params: http_request.form_params,
842
- body: http_request.body,
843
- auth_names: http_request.auth_names,
844
- return_type: return_type)
845
- response[0]
846
- end
847
-
848
- def request_token
849
- config = @api_client.config
850
- request_url = '/connect/token'
851
- form_params =
852
- {
853
- 'grant_type': 'client_credentials',
854
- 'client_id': config.api_key[:app_sid],
855
- 'client_secret': config.api_key[:api_key]
856
- }
857
-
858
- header_params =
859
- {
860
- 'Accept' => 'application/json',
861
- 'Content-Type' =>'application/x-www-form-urlencoded'
862
- }
863
-
864
- base_path = @api_client.config.base_path
865
- @api_client.config.base_path = ''
866
-
867
- data = @api_client.call_api(:POST, request_url,
868
- header_params: header_params,
869
- form_params: form_params,
870
- return_type: 'Object',
871
- host: @api_client.config.auth_url)
872
- access_token = data[0]['access_token'.to_sym]
873
-
874
- @api_client.config.base_path = base_path
875
- @api_client.config.access_token = access_token
876
- end
877
- end
878
- end
879
-
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 [AddCalendarAttachmentRequestData] 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 [AddContactAttachmentRequestData] 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 [AddEmailAttachmentRequestData] 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 [AddMapiAttachmentRequestData] 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
+ # Ocr images
81
+ # @param [AiBcrOcrRequestData] request Request object.
82
+ # @return [ListResponseOfAiBcrOcrData]
83
+ def ai_bcr_ocr(request)
84
+ http_request = request.to_http_info(@api_client)
85
+ make_request(http_request, :POST, 'ListResponseOfAiBcrOcrData')
86
+ end
87
+
88
+ # Ocr images from storage
89
+ # @param [AiBcrOcrStorageRequestData] request Request object.
90
+ # @return [ListResponseOfAiBcrOcrData]
91
+ def ai_bcr_ocr_storage(request)
92
+ http_request = request.to_http_info(@api_client)
93
+ make_request(http_request, :POST, 'ListResponseOfAiBcrOcrData')
94
+ end
95
+
96
+ # Parse images to vCard properties
97
+ # @param [AiBcrParseRequestData] request Request object.
98
+ # @return [ListResponseOfHierarchicalObject]
99
+ def ai_bcr_parse(request)
100
+ http_request = request.to_http_info(@api_client)
101
+ make_request(http_request, :POST, 'ListResponseOfHierarchicalObject')
102
+ end
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
+
120
+ # Parse images from storage to vCard files
121
+ # @param [AiBcrParseStorageRequestData] request Request object.
122
+ # @return [ListResponseOfStorageFileLocation]
123
+ def ai_bcr_parse_storage(request)
124
+ http_request = request.to_http_info(@api_client)
125
+ make_request(http_request, :POST, 'ListResponseOfStorageFileLocation')
126
+ end
127
+
128
+ # The call proposes k most probable names for given starting characters
129
+ # @param [AiNameCompleteRequestData] request Request object.
130
+ # @return [AiNameWeightedVariants]
131
+ def ai_name_complete(request)
132
+ http_request = request.to_http_info(@api_client)
133
+ make_request(http_request, :GET, 'AiNameWeightedVariants')
134
+ end
135
+
136
+ # Expands a person's name into a list of possible alternatives using options for expanding instructions
137
+ # @param [AiNameExpandRequestData] request Request object.
138
+ # @return [AiNameWeightedVariants]
139
+ def ai_name_expand(request)
140
+ http_request = request.to_http_info(@api_client)
141
+ make_request(http_request, :GET, 'AiNameWeightedVariants')
142
+ end
143
+
144
+ # Expands a person's parsed name into a list of possible alternatives using options for expanding instructions
145
+ # @param [AiNameExpandParsedRequestData] request Request object.
146
+ # @return [AiNameWeightedVariants]
147
+ def ai_name_expand_parsed(request)
148
+ http_request = request.to_http_info(@api_client)
149
+ make_request(http_request, :POST, 'AiNameWeightedVariants')
150
+ end
151
+
152
+ # Formats a person's name in correct case and name order using options for formatting instructions
153
+ # @param [AiNameFormatRequestData] request Request object.
154
+ # @return [AiNameFormatted]
155
+ def ai_name_format(request)
156
+ http_request = request.to_http_info(@api_client)
157
+ make_request(http_request, :GET, 'AiNameFormatted')
158
+ end
159
+
160
+ # Formats a person's parsed name in correct case and name order using options for formatting instructions
161
+ # @param [AiNameFormatParsedRequestData] request Request object.
162
+ # @return [AiNameFormatted]
163
+ def ai_name_format_parsed(request)
164
+ http_request = request.to_http_info(@api_client)
165
+ make_request(http_request, :POST, 'AiNameFormatted')
166
+ end
167
+
168
+ # Detect person's gender from name string
169
+ # @param [AiNameGenderizeRequestData] request Request object.
170
+ # @return [ListResponseOfAiNameGenderHypothesis]
171
+ def ai_name_genderize(request)
172
+ http_request = request.to_http_info(@api_client)
173
+ make_request(http_request, :GET, 'ListResponseOfAiNameGenderHypothesis')
174
+ end
175
+
176
+ # Detect person's gender from parsed name
177
+ # @param [AiNameGenderizeParsedRequestData] request Request object.
178
+ # @return [ListResponseOfAiNameGenderHypothesis]
179
+ def ai_name_genderize_parsed(request)
180
+ http_request = request.to_http_info(@api_client)
181
+ make_request(http_request, :POST, 'ListResponseOfAiNameGenderHypothesis')
182
+ end
183
+
184
+ # Compare people's names. Uses options for comparing instructions
185
+ # @param [AiNameMatchRequestData] request Request object.
186
+ # @return [AiNameMatchResult]
187
+ def ai_name_match(request)
188
+ http_request = request.to_http_info(@api_client)
189
+ make_request(http_request, :GET, 'AiNameMatchResult')
190
+ end
191
+
192
+ # Compare people's parsed names and attributes. Uses options for comparing instructions
193
+ # @param [AiNameMatchParsedRequestData] request Request object.
194
+ # @return [AiNameMatchResult]
195
+ def ai_name_match_parsed(request)
196
+ http_request = request.to_http_info(@api_client)
197
+ make_request(http_request, :POST, 'AiNameMatchResult')
198
+ end
199
+
200
+ # Parse name to components
201
+ # @param [AiNameParseRequestData] request Request object.
202
+ # @return [ListResponseOfAiNameComponent]
203
+ def ai_name_parse(request)
204
+ http_request = request.to_http_info(@api_client)
205
+ make_request(http_request, :GET, 'ListResponseOfAiNameComponent')
206
+ end
207
+
208
+ # Parse person's name out of an email address
209
+ # @param [AiNameParseEmailAddressRequestData] request Request object.
210
+ # @return [ListResponseOfAiNameExtracted]
211
+ def ai_name_parse_email_address(request)
212
+ http_request = request.to_http_info(@api_client)
213
+ make_request(http_request, :GET, 'ListResponseOfAiNameExtracted')
214
+ end
215
+
216
+ # Adds an email from *.eml file to specified folder in email account
217
+ # @param [AppendEmailMessageRequestData] request Request object.
218
+ # @return [EmailPropertyResponse]
219
+ def append_email_message(request)
220
+ http_request = request.to_http_info(@api_client)
221
+ make_request(http_request, :PUT, 'EmailPropertyResponse')
222
+ end
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
+
232
+ # Adds an email from MIME to specified folder in email account
233
+ # @param [AppendMimeMessageRequestData] request Request object.
234
+ # @return [ValueResponse]
235
+ def append_mime_message(request)
236
+ http_request = request.to_http_info(@api_client)
237
+ make_request(http_request, :PUT, 'ValueResponse')
238
+ end
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
+
256
+ # Copy file
257
+ # @param [CopyFileRequestData] request Request object.
258
+ # @return [nil]
259
+ def copy_file(request)
260
+ http_request = request.to_http_info(@api_client)
261
+ make_request(http_request, :PUT, nil)
262
+ nil
263
+ end
264
+
265
+ # Copy folder
266
+ # @param [CopyFolderRequestData] request Request object.
267
+ # @return [nil]
268
+ def copy_folder(request)
269
+ http_request = request.to_http_info(@api_client)
270
+ make_request(http_request, :PUT, nil)
271
+ nil
272
+ end
273
+
274
+ # Create calendar file
275
+ # @param [CreateCalendarRequestData] request Request object.
276
+ # @return [nil]
277
+ def create_calendar(request)
278
+ http_request = request.to_http_info(@api_client)
279
+ make_request(http_request, :PUT, nil)
280
+ nil
281
+ end
282
+
283
+ # Create contact document
284
+ # @param [CreateContactRequestData] request Request object.
285
+ # @return [nil]
286
+ def create_contact(request)
287
+ http_request = request.to_http_info(@api_client)
288
+ make_request(http_request, :PUT, nil)
289
+ nil
290
+ end
291
+
292
+ # Create an email document
293
+ # @param [CreateEmailRequestData] request Request object.
294
+ # @return [EmailDocumentResponse]
295
+ def create_email(request)
296
+ http_request = request.to_http_info(@api_client)
297
+ make_request(http_request, :PUT, 'EmailDocumentResponse')
298
+ end
299
+
300
+ # Create new folder in email account
301
+ # @param [CreateEmailFolderRequestData] request Request object.
302
+ # @return [nil]
303
+ def create_email_folder(request)
304
+ http_request = request.to_http_info(@api_client)
305
+ make_request(http_request, :PUT, nil)
306
+ nil
307
+ end
308
+
309
+ # Create the folder
310
+ # @param [CreateFolderRequestData] request Request object.
311
+ # @return [nil]
312
+ def create_folder(request)
313
+ http_request = request.to_http_info(@api_client)
314
+ make_request(http_request, :PUT, nil)
315
+ nil
316
+ end
317
+
318
+ # Create new document
319
+ # @param [CreateMapiRequestData] request Request object.
320
+ # @return [nil]
321
+ def create_mapi(request)
322
+ http_request = request.to_http_info(@api_client)
323
+ make_request(http_request, :PUT, nil)
324
+ nil
325
+ end
326
+
327
+ # Deletes indexed property by index and name. To delete Reminder attachment, use path ReminderAttachment/{ReminderIndex}/{AttachmentIndex}
328
+ # @param [DeleteCalendarPropertyRequestData] request Request object.
329
+ # @return [nil]
330
+ def delete_calendar_property(request)
331
+ http_request = request.to_http_info(@api_client)
332
+ make_request(http_request, :DELETE, nil)
333
+ nil
334
+ end
335
+
336
+ # Delete property from indexed property list
337
+ # @param [DeleteContactPropertyRequestData] request Request object.
338
+ # @return [nil]
339
+ def delete_contact_property(request)
340
+ http_request = request.to_http_info(@api_client)
341
+ make_request(http_request, :DELETE, nil)
342
+ nil
343
+ end
344
+
345
+ # Delete a folder in email account
346
+ # @param [DeleteEmailFolderRequestData] request Request object.
347
+ # @return [nil]
348
+ def delete_email_folder(request)
349
+ http_request = request.to_http_info(@api_client)
350
+ make_request(http_request, :DELETE, nil)
351
+ nil
352
+ end
353
+
354
+ # Delete message from email account by id
355
+ # @param [DeleteEmailMessageRequestData] request Request object.
356
+ # @return [nil]
357
+ def delete_email_message(request)
358
+ http_request = request.to_http_info(@api_client)
359
+ make_request(http_request, :DELETE, nil)
360
+ nil
361
+ end
362
+
363
+ # Delete file
364
+ # @param [DeleteFileRequestData] request Request object.
365
+ # @return [nil]
366
+ def delete_file(request)
367
+ http_request = request.to_http_info(@api_client)
368
+ make_request(http_request, :DELETE, nil)
369
+ nil
370
+ end
371
+
372
+ # Delete folder
373
+ # @param [DeleteFolderRequestData] request Request object.
374
+ # @return [nil]
375
+ def delete_folder(request)
376
+ http_request = request.to_http_info(@api_client)
377
+ make_request(http_request, :DELETE, nil)
378
+ nil
379
+ end
380
+
381
+ # Remove attachment from document
382
+ # @param [DeleteMapiAttachmentRequestData] request Request object.
383
+ # @return [nil]
384
+ def delete_mapi_attachment(request)
385
+ http_request = request.to_http_info(@api_client)
386
+ make_request(http_request, :DELETE, nil)
387
+ nil
388
+ end
389
+
390
+ # Delete document properties
391
+ # @param [DeleteMapiPropertiesRequestData] request Request object.
392
+ # @return [nil]
393
+ def delete_mapi_properties(request)
394
+ http_request = request.to_http_info(@api_client)
395
+ make_request(http_request, :DELETE, nil)
396
+ nil
397
+ end
398
+
399
+ # Discover email accounts by email address. Does not validate discovered accounts.
400
+ # @param [DiscoverEmailConfigRequestData] request Request object.
401
+ # @return [EmailAccountConfigList]
402
+ def discover_email_config(request)
403
+ http_request = request.to_http_info(@api_client)
404
+ make_request(http_request, :GET, 'EmailAccountConfigList')
405
+ end
406
+
407
+ # Discover email accounts by email address. Validates discovered accounts using OAuth 2.0.
408
+ # @param [DiscoverEmailConfigOauthRequestData] request Request object.
409
+ # @return [EmailAccountConfigList]
410
+ def discover_email_config_oauth(request)
411
+ http_request = request.to_http_info(@api_client)
412
+ make_request(http_request, :POST, 'EmailAccountConfigList')
413
+ end
414
+
415
+ # Discover email accounts by email address. Validates discovered accounts using login and password.
416
+ # @param [DiscoverEmailConfigPasswordRequestData] request Request object.
417
+ # @return [EmailAccountConfigList]
418
+ def discover_email_config_password(request)
419
+ http_request = request.to_http_info(@api_client)
420
+ make_request(http_request, :POST, 'EmailAccountConfigList')
421
+ end
422
+
423
+ # Download file
424
+ # @param [DownloadFileRequestData] request Request object.
425
+ # @return [File]
426
+ def download_file(request)
427
+ http_request = request.to_http_info(@api_client)
428
+ make_request(http_request, :GET, 'File')
429
+ end
430
+
431
+ # Fetch message mime from email account
432
+ # @param [FetchEmailMessageRequestData] request Request object.
433
+ # @return [MimeResponse]
434
+ def fetch_email_message(request)
435
+ http_request = request.to_http_info(@api_client)
436
+ make_request(http_request, :GET, 'MimeResponse')
437
+ end
438
+
439
+ # Fetch message model from email account
440
+ # @param [FetchEmailModelRequestData] request Request object.
441
+ # @return [EmailDto]
442
+ def fetch_email_model(request)
443
+ http_request = request.to_http_info(@api_client)
444
+ make_request(http_request, :GET, 'EmailDto')
445
+ end
446
+
447
+ # Get calendar file properties
448
+ # @param [GetCalendarRequestData] request Request object.
449
+ # @return [HierarchicalObject]
450
+ def get_calendar(request)
451
+ http_request = request.to_http_info(@api_client)
452
+ make_request(http_request, :GET, 'HierarchicalObject')
453
+ end
454
+
455
+ # Get iCalendar document attachment by name
456
+ # @param [GetCalendarAttachmentRequestData] request Request object.
457
+ # @return [File]
458
+ def get_calendar_attachment(request)
459
+ http_request = request.to_http_info(@api_client)
460
+ make_request(http_request, :GET, 'File')
461
+ end
462
+
463
+ # Get iCalendar files list in folder on storage
464
+ # @param [GetCalendarListRequestData] request Request object.
465
+ # @return [ListResponseOfHierarchicalObjectResponse]
466
+ def get_calendar_list(request)
467
+ http_request = request.to_http_info(@api_client)
468
+ make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
469
+ end
470
+
471
+ # Get calendar file
472
+ # @param [GetCalendarModelRequestData] request Request object.
473
+ # @return [CalendarDto]
474
+ def get_calendar_model(request)
475
+ http_request = request.to_http_info(@api_client)
476
+ make_request(http_request, :GET, 'CalendarDto')
477
+ end
478
+
479
+ # Get iCalendar from storage as AlternateView
480
+ # @param [GetCalendarModelAsAlternateRequestData] request Request object.
481
+ # @return [AlternateView]
482
+ def get_calendar_model_as_alternate(request)
483
+ http_request = request.to_http_info(@api_client)
484
+ make_request(http_request, :GET, 'AlternateView')
485
+ end
486
+
487
+ # Get iCalendar list from storage folder
488
+ # @param [GetCalendarModelListRequestData] request Request object.
489
+ # @return [CalendarDtoList]
490
+ def get_calendar_model_list(request)
491
+ http_request = request.to_http_info(@api_client)
492
+ make_request(http_request, :GET, 'CalendarDtoList')
493
+ end
494
+
495
+ # Get attachment file by name
496
+ # @param [GetContactAttachmentRequestData] request Request object.
497
+ # @return [File]
498
+ def get_contact_attachment(request)
499
+ http_request = request.to_http_info(@api_client)
500
+ make_request(http_request, :GET, 'File')
501
+ end
502
+
503
+ # Get contact list from storage folder
504
+ # @param [GetContactListRequestData] request Request object.
505
+ # @return [ListResponseOfHierarchicalObjectResponse]
506
+ def get_contact_list(request)
507
+ http_request = request.to_http_info(@api_client)
508
+ make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
509
+ end
510
+
511
+ # Get contact document.
512
+ # @param [GetContactModelRequestData] request Request object.
513
+ # @return [ContactDto]
514
+ def get_contact_model(request)
515
+ http_request = request.to_http_info(@api_client)
516
+ make_request(http_request, :GET, 'ContactDto')
517
+ end
518
+
519
+ # Get contact list from storage folder.
520
+ # @param [GetContactModelListRequestData] request Request object.
521
+ # @return [ContactDtoList]
522
+ def get_contact_model_list(request)
523
+ http_request = request.to_http_info(@api_client)
524
+ make_request(http_request, :GET, 'ContactDtoList')
525
+ end
526
+
527
+ # Get contact document properties
528
+ # @param [GetContactPropertiesRequestData] request Request object.
529
+ # @return [HierarchicalObject]
530
+ def get_contact_properties(request)
531
+ http_request = request.to_http_info(@api_client)
532
+ make_request(http_request, :GET, 'HierarchicalObject')
533
+ end
534
+
535
+ # Get disc usage
536
+ # @param [GetDiscUsageRequestData] request Request object.
537
+ # @return [DiscUsage]
538
+ def get_disc_usage(request)
539
+ http_request = request.to_http_info(@api_client)
540
+ make_request(http_request, :GET, 'DiscUsage')
541
+ end
542
+
543
+ # Get email document
544
+ # @param [GetEmailRequestData] request Request object.
545
+ # @return [EmailDocument]
546
+ def get_email(request)
547
+ http_request = request.to_http_info(@api_client)
548
+ make_request(http_request, :GET, 'EmailDocument')
549
+ end
550
+
551
+ # Converts email document from storage to specified format and returns as file
552
+ # @param [GetEmailAsFileRequestData] request Request object.
553
+ # @return [File]
554
+ def get_email_as_file(request)
555
+ http_request = request.to_http_info(@api_client)
556
+ make_request(http_request, :GET, 'File')
557
+ end
558
+
559
+ # Get email attachment by name
560
+ # @param [GetEmailAttachmentRequestData] request Request object.
561
+ # @return [File]
562
+ def get_email_attachment(request)
563
+ http_request = request.to_http_info(@api_client)
564
+ make_request(http_request, :GET, 'File')
565
+ end
566
+
567
+ # Get email client account from storage
568
+ # @param [GetEmailClientAccountRequestData] request Request object.
569
+ # @return [EmailClientAccount]
570
+ def get_email_client_account(request)
571
+ http_request = request.to_http_info(@api_client)
572
+ make_request(http_request, :GET, 'EmailClientAccount')
573
+ end
574
+
575
+ # Get email client multi account file (*.multi.account). Will respond error if file extension is not \".multi.account\".
576
+ # @param [GetEmailClientMultiAccountRequestData] request Request object.
577
+ # @return [EmailClientMultiAccount]
578
+ def get_email_client_multi_account(request)
579
+ http_request = request.to_http_info(@api_client)
580
+ make_request(http_request, :GET, 'EmailClientMultiAccount')
581
+ end
582
+
583
+ # Get email document.
584
+ # @param [GetEmailModelRequestData] request Request object.
585
+ # @return [EmailDto]
586
+ def get_email_model(request)
587
+ http_request = request.to_http_info(@api_client)
588
+ make_request(http_request, :GET, 'EmailDto')
589
+ end
590
+
591
+ # Get email list from storage folder.
592
+ # @param [GetEmailModelListRequestData] request Request object.
593
+ # @return [EmailDtoList]
594
+ def get_email_model_list(request)
595
+ http_request = request.to_http_info(@api_client)
596
+ make_request(http_request, :GET, 'EmailDtoList')
597
+ end
598
+
599
+ # Get an email document property by its name
600
+ # @param [GetEmailPropertyRequestData] request Request object.
601
+ # @return [EmailPropertyResponse]
602
+ def get_email_property(request)
603
+ http_request = request.to_http_info(@api_client)
604
+ make_request(http_request, :GET, 'EmailPropertyResponse')
605
+ end
606
+
607
+ # Get file versions
608
+ # @param [GetFileVersionsRequestData] request Request object.
609
+ # @return [FileVersions]
610
+ def get_file_versions(request)
611
+ http_request = request.to_http_info(@api_client)
612
+ make_request(http_request, :GET, 'FileVersions')
613
+ end
614
+
615
+ # Get all files and folders within a folder
616
+ # @param [GetFilesListRequestData] request Request object.
617
+ # @return [FilesList]
618
+ def get_files_list(request)
619
+ http_request = request.to_http_info(@api_client)
620
+ make_request(http_request, :GET, 'FilesList')
621
+ end
622
+
623
+ # Get document attachment as file stream
624
+ # @param [GetMapiAttachmentRequestData] request Request object.
625
+ # @return [File]
626
+ def get_mapi_attachment(request)
627
+ http_request = request.to_http_info(@api_client)
628
+ make_request(http_request, :GET, 'File')
629
+ end
630
+
631
+ # Get document attachment list
632
+ # @param [GetMapiAttachmentsRequestData] request Request object.
633
+ # @return [ListResponseOfString]
634
+ def get_mapi_attachments(request)
635
+ http_request = request.to_http_info(@api_client)
636
+ make_request(http_request, :GET, 'ListResponseOfString')
637
+ end
638
+
639
+ # Get document list from storage folder
640
+ # @param [GetMapiListRequestData] request Request object.
641
+ # @return [ListResponseOfHierarchicalObjectResponse]
642
+ def get_mapi_list(request)
643
+ http_request = request.to_http_info(@api_client)
644
+ make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
645
+ end
646
+
647
+ # Get document properties
648
+ # @param [GetMapiPropertiesRequestData] request Request object.
649
+ # @return [HierarchicalObjectResponse]
650
+ def get_mapi_properties(request)
651
+ http_request = request.to_http_info(@api_client)
652
+ make_request(http_request, :GET, 'HierarchicalObjectResponse')
653
+ end
654
+
655
+ # Check email address is disposable
656
+ # @param [IsEmailAddressDisposableRequestData] request Request object.
657
+ # @return [ValueTOfBoolean]
658
+ def is_email_address_disposable(request)
659
+ http_request = request.to_http_info(@api_client)
660
+ make_request(http_request, :GET, 'ValueTOfBoolean')
661
+ end
662
+
663
+ # Get folders list in email account
664
+ # @param [ListEmailFoldersRequestData] request Request object.
665
+ # @return [ListResponseOfMailServerFolder]
666
+ def list_email_folders(request)
667
+ http_request = request.to_http_info(@api_client)
668
+ make_request(http_request, :GET, 'ListResponseOfMailServerFolder')
669
+ end
670
+
671
+ # Get messages from folder, filtered by query
672
+ # The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where &lt;Field Name&gt; - the name of a message field through which filtering is made, &lt;Comparison operator&gt; - comparison operators, as their name implies, allow to compare message field and specified value, &lt;Field value&gt; - 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 \"&amp;\" - 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\"
673
+ # @param [ListEmailMessagesRequestData] request Request object.
674
+ # @return [ListResponseOfString]
675
+ def list_email_messages(request)
676
+ http_request = request.to_http_info(@api_client)
677
+ make_request(http_request, :GET, 'ListResponseOfString')
678
+ end
679
+
680
+ # Get messages from folder, filtered by query
681
+ # The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where &lt;Field Name&gt; - the name of a message field through which filtering is made, &lt;Comparison operator&gt; - comparison operators, as their name implies, allow to compare message field and specified value, &lt;Field value&gt; - 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 \"&amp;\" - 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\"
682
+ # @param [ListEmailModelsRequestData] request Request object.
683
+ # @return [ListResponseOfEmailDto]
684
+ def list_email_models(request)
685
+ http_request = request.to_http_info(@api_client)
686
+ make_request(http_request, :GET, 'ListResponseOfEmailDto')
687
+ end
688
+
689
+ # Move file
690
+ # @param [MoveFileRequestData] request Request object.
691
+ # @return [nil]
692
+ def move_file(request)
693
+ http_request = request.to_http_info(@api_client)
694
+ make_request(http_request, :PUT, nil)
695
+ nil
696
+ end
697
+
698
+ # Move folder
699
+ # @param [MoveFolderRequestData] request Request object.
700
+ # @return [nil]
701
+ def move_folder(request)
702
+ http_request = request.to_http_info(@api_client)
703
+ make_request(http_request, :PUT, nil)
704
+ nil
705
+ end
706
+
707
+ # Check if file or folder exists
708
+ # @param [ObjectExistsRequestData] request Request object.
709
+ # @return [ObjectExist]
710
+ def object_exists(request)
711
+ http_request = request.to_http_info(@api_client)
712
+ make_request(http_request, :GET, 'ObjectExist')
713
+ end
714
+
715
+ # Save iCalendar
716
+ # @param [SaveCalendarModelRequestData] request Request object.
717
+ # @return [nil]
718
+ def save_calendar_model(request)
719
+ http_request = request.to_http_info(@api_client)
720
+ make_request(http_request, :PUT, nil)
721
+ nil
722
+ end
723
+
724
+ # Save contact.
725
+ # @param [SaveContactModelRequestData] request Request object.
726
+ # @return [nil]
727
+ def save_contact_model(request)
728
+ http_request = request.to_http_info(@api_client)
729
+ make_request(http_request, :PUT, nil)
730
+ nil
731
+ end
732
+
733
+ # Create email client account file (*.account) with any of supported credentials
734
+ # @param [SaveEmailClientAccountRequestData] request Request object.
735
+ # @return [nil]
736
+ def save_email_client_account(request)
737
+ http_request = request.to_http_info(@api_client)
738
+ make_request(http_request, :PUT, nil)
739
+ nil
740
+ end
741
+
742
+ # Create email client multi account file (*.multi.account). Will respond error if file extension is not \".multi.account\".
743
+ # @param [SaveEmailClientMultiAccountRequestData] request Request object.
744
+ # @return [nil]
745
+ def save_email_client_multi_account(request)
746
+ http_request = request.to_http_info(@api_client)
747
+ make_request(http_request, :PUT, nil)
748
+ nil
749
+ end
750
+
751
+ # Save email document.
752
+ # @param [SaveEmailModelRequestData] request Request object.
753
+ # @return [nil]
754
+ def save_email_model(request)
755
+ http_request = request.to_http_info(@api_client)
756
+ make_request(http_request, :PUT, nil)
757
+ nil
758
+ end
759
+
760
+ # Create email account file (*.account) with login/password authentication
761
+ # @param [SaveMailAccountRequestData] request Request object.
762
+ # @return [nil]
763
+ def save_mail_account(request)
764
+ http_request = request.to_http_info(@api_client)
765
+ make_request(http_request, :POST, nil)
766
+ nil
767
+ end
768
+
769
+ # Create email account file (*.account) with OAuth
770
+ # @param [SaveMailOAuthAccountRequestData] request Request object.
771
+ # @return [nil]
772
+ def save_mail_o_auth_account(request)
773
+ http_request = request.to_http_info(@api_client)
774
+ make_request(http_request, :POST, nil)
775
+ nil
776
+ end
777
+
778
+ # Send an email from *.eml file located on storage
779
+ # @param [SendEmailRequestData] request Request object.
780
+ # @return [nil]
781
+ def send_email(request)
782
+ http_request = request.to_http_info(@api_client)
783
+ make_request(http_request, :POST, nil)
784
+ nil
785
+ end
786
+
787
+ # Send an email specified by MIME in request
788
+ # @param [SendEmailMimeRequestData] request Request object.
789
+ # @return [nil]
790
+ def send_email_mime(request)
791
+ http_request = request.to_http_info(@api_client)
792
+ make_request(http_request, :POST, nil)
793
+ nil
794
+ end
795
+
796
+ # Send an email specified by model in request
797
+ # @param [SendEmailModelRequestData] request Request object.
798
+ # @return [nil]
799
+ def send_email_model(request)
800
+ http_request = request.to_http_info(@api_client)
801
+ make_request(http_request, :POST, nil)
802
+ nil
803
+ end
804
+
805
+ # Set email document property value
806
+ # @param [SetEmailPropertyRequestData] request Request object.
807
+ # @return [EmailPropertyResponse]
808
+ def set_email_property(request)
809
+ http_request = request.to_http_info(@api_client)
810
+ make_request(http_request, :PUT, 'EmailPropertyResponse')
811
+ end
812
+
813
+ # Sets \"Message is read\" flag
814
+ # @param [SetEmailReadFlagRequestData] request Request object.
815
+ # @return [nil]
816
+ def set_email_read_flag(request)
817
+ http_request = request.to_http_info(@api_client)
818
+ make_request(http_request, :POST, nil)
819
+ nil
820
+ end
821
+
822
+ # Check if storage exists
823
+ # @param [StorageExistsRequestData] request Request object.
824
+ # @return [StorageExist]
825
+ def storage_exists(request)
826
+ http_request = request.to_http_info(@api_client)
827
+ make_request(http_request, :GET, 'StorageExist')
828
+ end
829
+
830
+ # Update calendar file properties
831
+ # @param [UpdateCalendarPropertiesRequestData] request Request object.
832
+ # @return [nil]
833
+ def update_calendar_properties(request)
834
+ http_request = request.to_http_info(@api_client)
835
+ make_request(http_request, :PUT, nil)
836
+ nil
837
+ end
838
+
839
+ # Update contact document properties
840
+ # @param [UpdateContactPropertiesRequestData] request Request object.
841
+ # @return [nil]
842
+ def update_contact_properties(request)
843
+ http_request = request.to_http_info(@api_client)
844
+ make_request(http_request, :PUT, nil)
845
+ nil
846
+ end
847
+
848
+ # Update document properties
849
+ # @param [UpdateMapiPropertiesRequestData] request Request object.
850
+ # @return [nil]
851
+ def update_mapi_properties(request)
852
+ http_request = request.to_http_info(@api_client)
853
+ make_request(http_request, :PUT, nil)
854
+ nil
855
+ end
856
+
857
+ # Upload file
858
+ # @param [UploadFileRequestData] request Request object.
859
+ # @return [FilesUploadResult]
860
+ def upload_file(request)
861
+ http_request = request.to_http_info(@api_client)
862
+ make_request(http_request, :PUT, 'FilesUploadResult')
863
+ end
864
+
865
+ private
866
+
867
+ def make_request(http_request, method, return_type)
868
+ call_api(http_request, method, return_type)
869
+ rescue ApiError => e
870
+ if e.code.equal? 401
871
+ request_token
872
+ return call_api(http_request, method, return_type)
873
+ end
874
+ raise
875
+
876
+ end
877
+
878
+ def call_api(http_request, method, return_type)
879
+ response = @api_client.call_api(method,
880
+ http_request.resource_path,
881
+ header_params: http_request.header_params,
882
+ query_params: http_request.query_params,
883
+ form_params: http_request.form_params,
884
+ body: http_request.body,
885
+ auth_names: http_request.auth_names,
886
+ return_type: return_type)
887
+ response[0]
888
+ end
889
+
890
+ def request_token
891
+ config = @api_client.config
892
+ request_url = '/connect/token'
893
+ form_params =
894
+ {
895
+ 'grant_type': 'client_credentials',
896
+ 'client_id': config.api_key[:app_sid],
897
+ 'client_secret': config.api_key[:api_key]
898
+ }
899
+
900
+ header_params =
901
+ {
902
+ 'Accept' => 'application/json',
903
+ 'Content-Type' =>'application/x-www-form-urlencoded'
904
+ }
905
+
906
+ base_path = @api_client.config.base_path
907
+ @api_client.config.base_path = ''
908
+
909
+ data = @api_client.call_api(:POST, request_url,
910
+ header_params: header_params,
911
+ form_params: form_params,
912
+ return_type: 'Object',
913
+ host: @api_client.config.auth_url)
914
+ access_token = data[0]['access_token'.to_sym]
915
+
916
+ @api_client.config.base_path = base_path
917
+ @api_client.config.access_token = access_token
918
+ end
919
+ end
920
+ end
921
+