aspose_email_cloud 19.11.0 → 20.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (268) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +155 -2
  3. data/lib/aspose-email-cloud/api/email_api.rb +1039 -577
  4. data/lib/aspose-email-cloud/api_client.rb +385 -381
  5. data/lib/aspose-email-cloud/api_error.rb +41 -41
  6. data/lib/aspose-email-cloud/configuration.rb +240 -236
  7. data/lib/aspose-email-cloud/models/account_base_request.rb +154 -141
  8. data/lib/aspose-email-cloud/models/add_attachment_request.rb +150 -143
  9. data/lib/aspose-email-cloud/models/ai_bcr_base64_image.rb +231 -0
  10. data/lib/aspose-email-cloud/models/ai_bcr_base64_rq.rb +228 -0
  11. data/lib/aspose-email-cloud/models/ai_bcr_image.rb +218 -0
  12. data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +231 -0
  13. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data.rb +256 -0
  14. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data_part.rb +300 -0
  15. data/lib/aspose-email-cloud/models/ai_bcr_options.rb +226 -0
  16. data/lib/aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq.rb +233 -0
  17. data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +251 -0
  18. data/lib/aspose-email-cloud/models/ai_bcr_rq.rb +213 -0
  19. data/lib/aspose-email-cloud/models/ai_bcr_storage_image_rq.rb +233 -0
  20. data/lib/aspose-email-cloud/models/ai_name_component.rb +267 -0
  21. data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +270 -0
  22. data/lib/aspose-email-cloud/models/ai_name_extracted.rb +233 -0
  23. data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +231 -0
  24. data/lib/aspose-email-cloud/models/ai_name_formatted.rb +226 -0
  25. data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +236 -0
  26. data/lib/aspose-email-cloud/models/ai_name_match_result.rb +233 -0
  27. data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +249 -0
  28. data/lib/aspose-email-cloud/models/ai_name_parsed_match_rq.rb +266 -0
  29. data/lib/aspose-email-cloud/models/ai_name_parsed_rq.rb +246 -0
  30. data/lib/aspose-email-cloud/models/ai_name_weighted.rb +231 -0
  31. data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +228 -0
  32. data/lib/aspose-email-cloud/models/alternate_view.rb +282 -0
  33. data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +162 -144
  34. data/lib/aspose-email-cloud/models/append_email_base_request.rb +167 -147
  35. data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +166 -146
  36. data/lib/aspose-email-cloud/models/append_email_model_rq.rb +336 -0
  37. data/lib/aspose-email-cloud/models/associated_person.rb +244 -0
  38. data/lib/aspose-email-cloud/models/attachment.rb +324 -0
  39. data/lib/aspose-email-cloud/models/attachment_base.rb +254 -0
  40. data/lib/aspose-email-cloud/models/base_object.rb +91 -84
  41. data/lib/aspose-email-cloud/models/calendar_dto.rb +557 -0
  42. data/lib/aspose-email-cloud/models/calendar_dto_alternate_rq.rb +268 -0
  43. data/lib/aspose-email-cloud/models/calendar_dto_list.rb +215 -0
  44. data/lib/aspose-email-cloud/models/calendar_reminder.rb +318 -0
  45. data/lib/aspose-email-cloud/models/contact_dto.rb +699 -0
  46. data/lib/aspose-email-cloud/models/contact_dto_list.rb +215 -0
  47. data/lib/aspose-email-cloud/models/contact_photo.rb +231 -0
  48. data/lib/aspose-email-cloud/models/content_type.rb +267 -0
  49. data/lib/aspose-email-cloud/models/content_type_parameter.rb +226 -0
  50. data/lib/aspose-email-cloud/models/create_email_request.rb +150 -143
  51. data/lib/aspose-email-cloud/models/create_folder_base_request.rb +162 -146
  52. data/lib/aspose-email-cloud/models/customer_event.rb +231 -0
  53. data/lib/aspose-email-cloud/models/delete_email_thread_account_rq.rb +276 -0
  54. data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +162 -146
  55. data/lib/aspose-email-cloud/models/delete_message_base_request.rb +177 -148
  56. data/lib/aspose-email-cloud/models/disc_usage.rb +149 -143
  57. data/lib/aspose-email-cloud/models/discover_email_config_oauth.rb +391 -0
  58. data/lib/aspose-email-cloud/models/discover_email_config_password.rb +304 -0
  59. data/lib/aspose-email-cloud/models/discover_email_config_rq.rb +268 -0
  60. data/lib/aspose-email-cloud/models/email_account_config.rb +323 -0
  61. data/lib/aspose-email-cloud/models/email_account_config_list.rb +215 -0
  62. data/lib/aspose-email-cloud/models/email_account_request.rb +210 -155
  63. data/lib/aspose-email-cloud/models/email_address.rb +283 -0
  64. data/lib/aspose-email-cloud/models/email_client_account.rb +350 -0
  65. data/lib/aspose-email-cloud/models/email_client_account_credentials.rb +261 -0
  66. data/lib/aspose-email-cloud/models/email_client_account_oauth_credentials.rb +385 -0
  67. data/lib/aspose-email-cloud/models/email_client_account_password_credentials.rb +298 -0
  68. data/lib/aspose-email-cloud/models/email_client_multi_account.rb +233 -0
  69. data/lib/aspose-email-cloud/models/email_document.rb +150 -143
  70. data/lib/aspose-email-cloud/models/email_document_response.rb +146 -141
  71. data/lib/aspose-email-cloud/models/email_dto.rb +681 -0
  72. data/lib/aspose-email-cloud/models/email_dto_list.rb +215 -0
  73. data/lib/aspose-email-cloud/models/email_properties.rb +150 -142
  74. data/lib/aspose-email-cloud/models/email_property.rb +154 -142
  75. data/lib/aspose-email-cloud/models/email_property_response.rb +146 -141
  76. data/lib/aspose-email-cloud/models/email_thread.rb +254 -0
  77. data/lib/aspose-email-cloud/models/email_thread_list.rb +215 -0
  78. data/lib/aspose-email-cloud/models/email_thread_read_flag_rq.rb +294 -0
  79. data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +230 -0
  80. data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +230 -0
  81. data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +230 -0
  82. data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +230 -0
  83. data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +230 -0
  84. data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +230 -0
  85. data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +230 -0
  86. data/lib/aspose-email-cloud/models/error.rb +157 -147
  87. data/lib/aspose-email-cloud/models/error_details.rb +149 -143
  88. data/lib/aspose-email-cloud/models/file_version.rb +169 -153
  89. data/lib/aspose-email-cloud/models/file_versions.rb +145 -141
  90. data/lib/aspose-email-cloud/models/files_list.rb +145 -141
  91. data/lib/aspose-email-cloud/models/files_upload_result.rb +149 -143
  92. data/lib/aspose-email-cloud/models/hierarchical_object.rb +106 -97
  93. data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +150 -143
  94. data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +150 -143
  95. data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +124 -113
  96. data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +122 -111
  97. data/lib/aspose-email-cloud/models/instant_messenger_address.rb +244 -0
  98. data/lib/aspose-email-cloud/models/link.rb +158 -147
  99. data/lib/aspose-email-cloud/models/linked_resource.rb +267 -0
  100. data/lib/aspose-email-cloud/models/list_response_of_ai_bcr_ocr_data.rb +214 -0
  101. data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +214 -0
  102. data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +214 -0
  103. data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +214 -0
  104. data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +214 -0
  105. data/lib/aspose-email-cloud/models/list_response_of_email_account_config.rb +214 -0
  106. data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +214 -0
  107. data/lib/aspose-email-cloud/models/list_response_of_email_thread.rb +214 -0
  108. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object.rb +214 -0
  109. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +145 -139
  110. data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +145 -139
  111. data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +214 -0
  112. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +214 -0
  113. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +214 -0
  114. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +214 -0
  115. data/lib/aspose-email-cloud/models/list_response_of_string.rb +145 -139
  116. data/lib/aspose-email-cloud/models/mail_address.rb +257 -0
  117. data/lib/aspose-email-cloud/models/mail_server_folder.rb +150 -143
  118. data/lib/aspose-email-cloud/models/mime_response.rb +146 -141
  119. data/lib/aspose-email-cloud/models/move_email_message_rq.rb +302 -0
  120. data/lib/aspose-email-cloud/models/move_email_thread_rq.rb +276 -0
  121. data/lib/aspose-email-cloud/models/name_value_pair.rb +226 -0
  122. data/lib/aspose-email-cloud/models/object_exist.rb +149 -143
  123. data/lib/aspose-email-cloud/models/phone_number.rb +244 -0
  124. data/lib/aspose-email-cloud/models/postal_address.rb +353 -0
  125. data/lib/aspose-email-cloud/models/primitive_object.rb +104 -95
  126. data/lib/aspose-email-cloud/models/reminder_attendee.rb +213 -0
  127. data/lib/aspose-email-cloud/models/reminder_trigger.rb +249 -0
  128. data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +99 -89
  129. data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +109 -101
  130. data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +99 -89
  131. data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +99 -89
  132. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +79 -0
  133. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +79 -0
  134. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +79 -0
  135. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +79 -0
  136. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +79 -0
  137. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +79 -0
  138. data/lib/aspose-email-cloud/models/requests/ai_name_complete_request_data.rb +110 -0
  139. data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +79 -0
  140. data/lib/aspose-email-cloud/models/requests/ai_name_expand_request_data.rb +110 -0
  141. data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +79 -0
  142. data/lib/aspose-email-cloud/models/requests/ai_name_format_request_data.rb +116 -0
  143. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +79 -0
  144. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb +110 -0
  145. data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +79 -0
  146. data/lib/aspose-email-cloud/models/requests/ai_name_match_request_data.rb +121 -0
  147. data/lib/aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb +110 -0
  148. data/lib/aspose-email-cloud/models/requests/ai_name_parse_request_data.rb +110 -0
  149. data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +79 -75
  150. data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +79 -0
  151. data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +79 -75
  152. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +79 -0
  153. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_file_request_data.rb +89 -0
  154. data/lib/aspose-email-cloud/models/requests/convert_calendar_request_data.rb +90 -0
  155. data/lib/aspose-email-cloud/models/requests/convert_contact_model_to_file_request_data.rb +89 -0
  156. data/lib/aspose-email-cloud/models/requests/convert_contact_request_data.rb +100 -0
  157. data/lib/aspose-email-cloud/models/requests/convert_email_model_to_file_request_data.rb +89 -0
  158. data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +90 -0
  159. data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +107 -92
  160. data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +101 -89
  161. data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +89 -82
  162. data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +99 -94
  163. data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +79 -75
  164. data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +89 -82
  165. data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +84 -78
  166. data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +89 -82
  167. data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +109 -96
  168. data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +119 -108
  169. data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +79 -75
  170. data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +79 -75
  171. data/lib/aspose-email-cloud/models/requests/delete_email_thread_request_data.rb +89 -0
  172. data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +90 -81
  173. data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +90 -81
  174. data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +99 -89
  175. data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +89 -82
  176. data/lib/aspose-email-cloud/models/requests/discover_email_config_oauth_request_data.rb +79 -0
  177. data/lib/aspose-email-cloud/models/requests/discover_email_config_password_request_data.rb +79 -0
  178. data/lib/aspose-email-cloud/models/requests/discover_email_config_request_data.rb +86 -0
  179. data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +90 -81
  180. data/lib/aspose-email-cloud/models/requests/email_request.rb +75 -75
  181. data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +115 -93
  182. data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +115 -0
  183. data/lib/aspose-email-cloud/models/requests/fetch_email_thread_messages_request_data.rb +114 -0
  184. data/lib/aspose-email-cloud/models/requests/get_calendar_as_file_request_data.rb +101 -0
  185. data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +101 -88
  186. data/lib/aspose-email-cloud/models/requests/get_calendar_file_as_model_request_data.rb +80 -0
  187. data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +108 -95
  188. data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +107 -0
  189. data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +98 -0
  190. data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +91 -0
  191. data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +91 -81
  192. data/lib/aspose-email-cloud/models/requests/get_contact_as_file_request_data.rb +111 -0
  193. data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +111 -100
  194. data/lib/aspose-email-cloud/models/requests/get_contact_file_as_model_request_data.rb +90 -0
  195. data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +103 -92
  196. data/lib/aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb +103 -0
  197. data/lib/aspose-email-cloud/models/requests/get_contact_model_request_data.rb +101 -0
  198. data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +101 -93
  199. data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +74 -71
  200. data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +101 -0
  201. data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +101 -88
  202. data/lib/aspose-email-cloud/models/requests/get_email_client_account_request_data.rb +102 -0
  203. data/lib/aspose-email-cloud/models/requests/get_email_client_multi_account_request_data.rb +102 -0
  204. data/lib/aspose-email-cloud/models/requests/get_email_file_as_model_request_data.rb +80 -0
  205. data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +103 -0
  206. data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +101 -0
  207. data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +101 -88
  208. data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +91 -81
  209. data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +84 -78
  210. data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +84 -78
  211. data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +101 -88
  212. data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +91 -81
  213. data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +93 -80
  214. data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +91 -81
  215. data/lib/aspose-email-cloud/models/requests/http_request.rb +51 -51
  216. data/lib/aspose-email-cloud/models/requests/is_email_address_disposable_request_data.rb +79 -0
  217. data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +104 -88
  218. data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +127 -105
  219. data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +122 -0
  220. data/lib/aspose-email-cloud/models/requests/list_email_threads_request_data.rb +121 -0
  221. data/lib/aspose-email-cloud/models/requests/move_email_message_request_data.rb +79 -0
  222. data/lib/aspose-email-cloud/models/requests/move_email_thread_request_data.rb +89 -0
  223. data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +107 -92
  224. data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +101 -89
  225. data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +90 -81
  226. data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +89 -0
  227. data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +99 -0
  228. data/lib/aspose-email-cloud/models/requests/save_email_client_account_request_data.rb +79 -0
  229. data/lib/aspose-email-cloud/models/requests/save_email_client_multi_account_request_data.rb +79 -0
  230. data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +99 -0
  231. data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +79 -75
  232. data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +79 -75
  233. data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +79 -75
  234. data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +79 -0
  235. data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +79 -75
  236. data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +99 -89
  237. data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +79 -75
  238. data/lib/aspose-email-cloud/models/requests/set_email_thread_read_flag_request_data.rb +89 -0
  239. data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +78 -75
  240. data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +89 -82
  241. data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +99 -94
  242. data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +89 -82
  243. data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +96 -87
  244. data/lib/aspose-email-cloud/models/save_email_account_request.rb +214 -157
  245. data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +240 -166
  246. data/lib/aspose-email-cloud/models/send_email_base_request.rb +159 -145
  247. data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +158 -144
  248. data/lib/aspose-email-cloud/models/send_email_model_rq.rb +276 -0
  249. data/lib/aspose-email-cloud/models/set_email_property_request.rb +150 -143
  250. data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +162 -146
  251. data/lib/aspose-email-cloud/models/storage_exist.rb +145 -141
  252. data/lib/aspose-email-cloud/models/storage_file.rb +161 -149
  253. data/lib/aspose-email-cloud/models/storage_file_location.rb +154 -145
  254. data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_account.rb +225 -0
  255. data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_multi_account.rb +225 -0
  256. data/lib/aspose-email-cloud/models/storage_folder_location.rb +150 -143
  257. data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +225 -0
  258. data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +225 -0
  259. data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +225 -0
  260. data/lib/aspose-email-cloud/models/storage_model_rq_of_calendar_dto.rb +225 -0
  261. data/lib/aspose-email-cloud/models/storage_model_rq_of_contact_dto.rb +225 -0
  262. data/lib/aspose-email-cloud/models/storage_model_rq_of_email_dto.rb +225 -0
  263. data/lib/aspose-email-cloud/models/url.rb +244 -0
  264. data/lib/aspose-email-cloud/models/value_response.rb +146 -141
  265. data/lib/aspose-email-cloud/models/value_t_of_boolean.rb +217 -0
  266. data/lib/aspose-email-cloud/version.rb +15 -15
  267. metadata +206 -53
  268. data/lib/aspose-email-cloud/models/contact_format.rb +0 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c075bcdb46a2f76b9204b11c09873c0d889a3bcdb9d02a0f46ecfe15506506c1
4
- data.tar.gz: 772952f5e68511b621b6129aec90174d4649eef8126006fb45f25f3ea9610d34
3
+ metadata.gz: e29dd28dba7b6e6991ff4d1c72e99173bd476e8be63986d59db95682ec4cb4a1
4
+ data.tar.gz: 1e65b6110733f40992b02643e9500c657e44535b2754f08dec32f2f278b83b35
5
5
  SHA512:
6
- metadata.gz: 324aa0d6df06ec11523ffd314523392110815ad563035e9af1caae79d0ec2b8e2cba3ba83a8e536b22122f2931ca1786bac0edd0cca3fd282c421833619e01a9
7
- data.tar.gz: ed216e2601ec0b56ff02272f691fb33612eb1c7f84d2ada6fb4181d84a3330897ce354589358be83cb550585e3dc1b63706474cb587e5007bd02f2f36fabbc3f
6
+ metadata.gz: db56ff31ff0e8c8bdae5601f7269bc5f45b854d74c818b912535538d77a9915d0e6241b1a1fb1de8bdf79a625c7beb461f3dd8a67e5a6fa99e8d470cbd5ee896
7
+ data.tar.gz: f227d274ce6cece4ab4b273a4990fbab29f41d0ad34433c8e4b4d6839a8cc6b7b9df0c35bb9961556e90cbee0995a5f19205719293078aff92bb74420b21fe3e
@@ -1,6 +1,6 @@
1
1
  # ----------------------------------------------------------------------------
2
2
  # <copyright company="Aspose" file="aspose-email-cloud.rb">
3
- # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
3
+ # Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a
@@ -33,16 +33,56 @@ require_relative './aspose-email-cloud/configuration'
33
33
  # Models
34
34
  require_relative './aspose-email-cloud/models/account_base_request'
35
35
  require_relative './aspose-email-cloud/models/add_attachment_request'
36
+ require_relative './aspose-email-cloud/models/ai_bcr_image'
37
+ require_relative './aspose-email-cloud/models/ai_bcr_ocr_data'
38
+ require_relative './aspose-email-cloud/models/ai_bcr_ocr_data_part'
39
+ require_relative './aspose-email-cloud/models/ai_bcr_options'
40
+ require_relative './aspose-email-cloud/models/ai_bcr_rq'
41
+ require_relative './aspose-email-cloud/models/ai_name_component'
42
+ require_relative './aspose-email-cloud/models/ai_name_cultural_context'
43
+ require_relative './aspose-email-cloud/models/ai_name_extracted'
44
+ require_relative './aspose-email-cloud/models/ai_name_extracted_component'
45
+ require_relative './aspose-email-cloud/models/ai_name_formatted'
46
+ require_relative './aspose-email-cloud/models/ai_name_gender_hypothesis'
47
+ require_relative './aspose-email-cloud/models/ai_name_match_result'
48
+ require_relative './aspose-email-cloud/models/ai_name_mismatch'
49
+ require_relative './aspose-email-cloud/models/ai_name_parsed_rq'
50
+ require_relative './aspose-email-cloud/models/ai_name_weighted'
51
+ require_relative './aspose-email-cloud/models/ai_name_weighted_variants'
52
+ require_relative './aspose-email-cloud/models/associated_person'
53
+ require_relative './aspose-email-cloud/models/attachment_base'
36
54
  require_relative './aspose-email-cloud/models/base_object'
37
- require_relative './aspose-email-cloud/models/contact_format'
55
+ require_relative './aspose-email-cloud/models/calendar_dto'
56
+ require_relative './aspose-email-cloud/models/calendar_dto_alternate_rq'
57
+ require_relative './aspose-email-cloud/models/calendar_reminder'
58
+ require_relative './aspose-email-cloud/models/contact_dto'
59
+ require_relative './aspose-email-cloud/models/contact_photo'
60
+ require_relative './aspose-email-cloud/models/content_type'
61
+ require_relative './aspose-email-cloud/models/content_type_parameter'
38
62
  require_relative './aspose-email-cloud/models/create_email_request'
63
+ require_relative './aspose-email-cloud/models/customer_event'
39
64
  require_relative './aspose-email-cloud/models/disc_usage'
65
+ require_relative './aspose-email-cloud/models/discover_email_config_rq'
66
+ require_relative './aspose-email-cloud/models/email_account_config'
40
67
  require_relative './aspose-email-cloud/models/email_account_request'
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'
41
72
  require_relative './aspose-email-cloud/models/email_document'
42
73
  require_relative './aspose-email-cloud/models/email_document_response'
74
+ require_relative './aspose-email-cloud/models/email_dto'
43
75
  require_relative './aspose-email-cloud/models/email_properties'
44
76
  require_relative './aspose-email-cloud/models/email_property'
45
77
  require_relative './aspose-email-cloud/models/email_property_response'
78
+ require_relative './aspose-email-cloud/models/email_thread'
79
+ require_relative './aspose-email-cloud/models/enum_with_custom_of_associated_person_category'
80
+ require_relative './aspose-email-cloud/models/enum_with_custom_of_email_address_category'
81
+ require_relative './aspose-email-cloud/models/enum_with_custom_of_event_category'
82
+ require_relative './aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category'
83
+ require_relative './aspose-email-cloud/models/enum_with_custom_of_phone_number_category'
84
+ require_relative './aspose-email-cloud/models/enum_with_custom_of_postal_address_category'
85
+ require_relative './aspose-email-cloud/models/enum_with_custom_of_url_category'
46
86
  require_relative './aspose-email-cloud/models/error'
47
87
  require_relative './aspose-email-cloud/models/error_details'
48
88
  require_relative './aspose-email-cloud/models/file_versions'
@@ -50,35 +90,90 @@ require_relative './aspose-email-cloud/models/files_list'
50
90
  require_relative './aspose-email-cloud/models/files_upload_result'
51
91
  require_relative './aspose-email-cloud/models/hierarchical_object_request'
52
92
  require_relative './aspose-email-cloud/models/hierarchical_object_response'
93
+ require_relative './aspose-email-cloud/models/instant_messenger_address'
53
94
  require_relative './aspose-email-cloud/models/link'
95
+ require_relative './aspose-email-cloud/models/list_response_of_ai_bcr_ocr_data'
96
+ require_relative './aspose-email-cloud/models/list_response_of_ai_name_component'
97
+ require_relative './aspose-email-cloud/models/list_response_of_ai_name_extracted'
98
+ require_relative './aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis'
99
+ require_relative './aspose-email-cloud/models/list_response_of_contact_dto'
100
+ require_relative './aspose-email-cloud/models/list_response_of_email_account_config'
101
+ require_relative './aspose-email-cloud/models/list_response_of_email_dto'
102
+ require_relative './aspose-email-cloud/models/list_response_of_email_thread'
103
+ require_relative './aspose-email-cloud/models/list_response_of_hierarchical_object'
54
104
  require_relative './aspose-email-cloud/models/list_response_of_hierarchical_object_response'
55
105
  require_relative './aspose-email-cloud/models/list_response_of_mail_server_folder'
106
+ require_relative './aspose-email-cloud/models/list_response_of_storage_file_location'
107
+ require_relative './aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto'
108
+ require_relative './aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto'
109
+ require_relative './aspose-email-cloud/models/list_response_of_storage_model_of_email_dto'
56
110
  require_relative './aspose-email-cloud/models/list_response_of_string'
111
+ require_relative './aspose-email-cloud/models/mail_address'
57
112
  require_relative './aspose-email-cloud/models/mail_server_folder'
58
113
  require_relative './aspose-email-cloud/models/mime_response'
114
+ require_relative './aspose-email-cloud/models/name_value_pair'
59
115
  require_relative './aspose-email-cloud/models/object_exist'
116
+ require_relative './aspose-email-cloud/models/phone_number'
117
+ require_relative './aspose-email-cloud/models/postal_address'
118
+ require_relative './aspose-email-cloud/models/reminder_attendee'
119
+ require_relative './aspose-email-cloud/models/reminder_trigger'
60
120
  require_relative './aspose-email-cloud/models/set_email_property_request'
61
121
  require_relative './aspose-email-cloud/models/storage_exist'
62
122
  require_relative './aspose-email-cloud/models/storage_file'
123
+ require_relative './aspose-email-cloud/models/storage_file_rq_of_email_client_account'
124
+ require_relative './aspose-email-cloud/models/storage_file_rq_of_email_client_multi_account'
63
125
  require_relative './aspose-email-cloud/models/storage_folder_location'
126
+ require_relative './aspose-email-cloud/models/storage_model_of_calendar_dto'
127
+ require_relative './aspose-email-cloud/models/storage_model_of_contact_dto'
128
+ require_relative './aspose-email-cloud/models/storage_model_of_email_dto'
129
+ require_relative './aspose-email-cloud/models/storage_model_rq_of_calendar_dto'
130
+ require_relative './aspose-email-cloud/models/storage_model_rq_of_contact_dto'
131
+ require_relative './aspose-email-cloud/models/storage_model_rq_of_email_dto'
132
+ require_relative './aspose-email-cloud/models/url'
64
133
  require_relative './aspose-email-cloud/models/value_response'
134
+ require_relative './aspose-email-cloud/models/value_t_of_boolean'
135
+ require_relative './aspose-email-cloud/models/ai_bcr_base64_image'
136
+ require_relative './aspose-email-cloud/models/ai_bcr_base64_rq'
137
+ require_relative './aspose-email-cloud/models/ai_bcr_image_storage_file'
138
+ require_relative './aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq'
139
+ require_relative './aspose-email-cloud/models/ai_bcr_storage_image_rq'
140
+ require_relative './aspose-email-cloud/models/ai_name_parsed_match_rq'
141
+ require_relative './aspose-email-cloud/models/alternate_view'
65
142
  require_relative './aspose-email-cloud/models/append_email_account_base_request'
143
+ require_relative './aspose-email-cloud/models/attachment'
144
+ require_relative './aspose-email-cloud/models/calendar_dto_list'
145
+ require_relative './aspose-email-cloud/models/contact_dto_list'
66
146
  require_relative './aspose-email-cloud/models/create_folder_base_request'
147
+ require_relative './aspose-email-cloud/models/delete_email_thread_account_rq'
67
148
  require_relative './aspose-email-cloud/models/delete_folder_base_request'
68
149
  require_relative './aspose-email-cloud/models/delete_message_base_request'
150
+ require_relative './aspose-email-cloud/models/discover_email_config_oauth'
151
+ require_relative './aspose-email-cloud/models/discover_email_config_password'
152
+ require_relative './aspose-email-cloud/models/email_account_config_list'
153
+ require_relative './aspose-email-cloud/models/email_client_account_oauth_credentials'
154
+ require_relative './aspose-email-cloud/models/email_client_account_password_credentials'
155
+ require_relative './aspose-email-cloud/models/email_dto_list'
156
+ require_relative './aspose-email-cloud/models/email_thread_list'
157
+ require_relative './aspose-email-cloud/models/email_thread_read_flag_rq'
69
158
  require_relative './aspose-email-cloud/models/file_version'
70
159
  require_relative './aspose-email-cloud/models/hierarchical_object'
71
160
  require_relative './aspose-email-cloud/models/indexed_hierarchical_object'
72
161
  require_relative './aspose-email-cloud/models/indexed_primitive_object'
162
+ require_relative './aspose-email-cloud/models/linked_resource'
163
+ require_relative './aspose-email-cloud/models/move_email_message_rq'
164
+ require_relative './aspose-email-cloud/models/move_email_thread_rq'
73
165
  require_relative './aspose-email-cloud/models/primitive_object'
74
166
  require_relative './aspose-email-cloud/models/save_email_account_request'
75
167
  require_relative './aspose-email-cloud/models/save_o_auth_email_account_request'
76
168
  require_relative './aspose-email-cloud/models/send_email_base_request'
77
169
  require_relative './aspose-email-cloud/models/send_email_mime_base_request'
170
+ require_relative './aspose-email-cloud/models/send_email_model_rq'
78
171
  require_relative './aspose-email-cloud/models/set_message_read_flag_account_base_request'
79
172
  require_relative './aspose-email-cloud/models/storage_file_location'
173
+ require_relative './aspose-email-cloud/models/ai_bcr_parse_storage_rq'
80
174
  require_relative './aspose-email-cloud/models/append_email_base_request'
81
175
  require_relative './aspose-email-cloud/models/append_email_mime_base_request'
176
+ require_relative './aspose-email-cloud/models/append_email_model_rq'
82
177
 
83
178
  # APIs
84
179
  require_relative 'aspose-email-cloud/api/email_api'
@@ -89,8 +184,33 @@ require_relative './aspose-email-cloud/models/requests/add_calendar_attachment_r
89
184
  require_relative './aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb'
90
185
  require_relative './aspose-email-cloud/models/requests/add_email_attachment_request_data.rb'
91
186
  require_relative './aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb'
187
+ require_relative './aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb'
188
+ require_relative './aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb'
189
+ require_relative './aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb'
190
+ require_relative './aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb'
191
+ require_relative './aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb'
192
+ require_relative './aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb'
193
+ require_relative './aspose-email-cloud/models/requests/ai_name_complete_request_data.rb'
194
+ require_relative './aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb'
195
+ require_relative './aspose-email-cloud/models/requests/ai_name_expand_request_data.rb'
196
+ require_relative './aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb'
197
+ require_relative './aspose-email-cloud/models/requests/ai_name_format_request_data.rb'
198
+ require_relative './aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb'
199
+ require_relative './aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb'
200
+ require_relative './aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb'
201
+ require_relative './aspose-email-cloud/models/requests/ai_name_match_request_data.rb'
202
+ require_relative './aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb'
203
+ require_relative './aspose-email-cloud/models/requests/ai_name_parse_request_data.rb'
92
204
  require_relative './aspose-email-cloud/models/requests/append_email_message_request_data.rb'
205
+ require_relative './aspose-email-cloud/models/requests/append_email_model_message_request_data.rb'
93
206
  require_relative './aspose-email-cloud/models/requests/append_mime_message_request_data.rb'
207
+ require_relative './aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb'
208
+ require_relative './aspose-email-cloud/models/requests/convert_calendar_model_to_file_request_data.rb'
209
+ require_relative './aspose-email-cloud/models/requests/convert_calendar_request_data.rb'
210
+ require_relative './aspose-email-cloud/models/requests/convert_contact_model_to_file_request_data.rb'
211
+ require_relative './aspose-email-cloud/models/requests/convert_contact_request_data.rb'
212
+ require_relative './aspose-email-cloud/models/requests/convert_email_model_to_file_request_data.rb'
213
+ require_relative './aspose-email-cloud/models/requests/convert_email_request_data.rb'
94
214
  require_relative './aspose-email-cloud/models/requests/copy_file_request_data.rb'
95
215
  require_relative './aspose-email-cloud/models/requests/copy_folder_request_data.rb'
96
216
  require_relative './aspose-email-cloud/models/requests/create_calendar_request_data.rb'
@@ -103,21 +223,42 @@ require_relative './aspose-email-cloud/models/requests/delete_calendar_property_
103
223
  require_relative './aspose-email-cloud/models/requests/delete_contact_property_request_data.rb'
104
224
  require_relative './aspose-email-cloud/models/requests/delete_email_folder_request_data.rb'
105
225
  require_relative './aspose-email-cloud/models/requests/delete_email_message_request_data.rb'
226
+ require_relative './aspose-email-cloud/models/requests/delete_email_thread_request_data.rb'
106
227
  require_relative './aspose-email-cloud/models/requests/delete_file_request_data.rb'
107
228
  require_relative './aspose-email-cloud/models/requests/delete_folder_request_data.rb'
108
229
  require_relative './aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb'
109
230
  require_relative './aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb'
231
+ require_relative './aspose-email-cloud/models/requests/discover_email_config_oauth_request_data.rb'
232
+ require_relative './aspose-email-cloud/models/requests/discover_email_config_password_request_data.rb'
233
+ require_relative './aspose-email-cloud/models/requests/discover_email_config_request_data.rb'
110
234
  require_relative './aspose-email-cloud/models/requests/download_file_request_data.rb'
111
235
  require_relative './aspose-email-cloud/models/requests/email_request.rb'
112
236
  require_relative './aspose-email-cloud/models/requests/fetch_email_message_request_data.rb'
237
+ require_relative './aspose-email-cloud/models/requests/fetch_email_model_request_data.rb'
238
+ require_relative './aspose-email-cloud/models/requests/fetch_email_thread_messages_request_data.rb'
239
+ require_relative './aspose-email-cloud/models/requests/get_calendar_as_file_request_data.rb'
113
240
  require_relative './aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb'
241
+ require_relative './aspose-email-cloud/models/requests/get_calendar_file_as_model_request_data.rb'
114
242
  require_relative './aspose-email-cloud/models/requests/get_calendar_list_request_data.rb'
243
+ require_relative './aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb'
244
+ require_relative './aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb'
245
+ require_relative './aspose-email-cloud/models/requests/get_calendar_model_request_data.rb'
115
246
  require_relative './aspose-email-cloud/models/requests/get_calendar_request_data.rb'
247
+ require_relative './aspose-email-cloud/models/requests/get_contact_as_file_request_data.rb'
116
248
  require_relative './aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb'
249
+ require_relative './aspose-email-cloud/models/requests/get_contact_file_as_model_request_data.rb'
117
250
  require_relative './aspose-email-cloud/models/requests/get_contact_list_request_data.rb'
251
+ require_relative './aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb'
252
+ require_relative './aspose-email-cloud/models/requests/get_contact_model_request_data.rb'
118
253
  require_relative './aspose-email-cloud/models/requests/get_contact_properties_request_data.rb'
119
254
  require_relative './aspose-email-cloud/models/requests/get_disc_usage_request_data.rb'
255
+ require_relative './aspose-email-cloud/models/requests/get_email_as_file_request_data.rb'
120
256
  require_relative './aspose-email-cloud/models/requests/get_email_attachment_request_data.rb'
257
+ require_relative './aspose-email-cloud/models/requests/get_email_client_account_request_data.rb'
258
+ require_relative './aspose-email-cloud/models/requests/get_email_client_multi_account_request_data.rb'
259
+ require_relative './aspose-email-cloud/models/requests/get_email_file_as_model_request_data.rb'
260
+ require_relative './aspose-email-cloud/models/requests/get_email_model_list_request_data.rb'
261
+ require_relative './aspose-email-cloud/models/requests/get_email_model_request_data.rb'
121
262
  require_relative './aspose-email-cloud/models/requests/get_email_property_request_data.rb'
122
263
  require_relative './aspose-email-cloud/models/requests/get_email_request_data.rb'
123
264
  require_relative './aspose-email-cloud/models/requests/get_files_list_request_data.rb'
@@ -127,17 +268,29 @@ require_relative './aspose-email-cloud/models/requests/get_mapi_attachment_reque
127
268
  require_relative './aspose-email-cloud/models/requests/get_mapi_list_request_data.rb'
128
269
  require_relative './aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb'
129
270
  require_relative './aspose-email-cloud/models/requests/http_request.rb'
271
+ require_relative './aspose-email-cloud/models/requests/is_email_address_disposable_request_data.rb'
130
272
  require_relative './aspose-email-cloud/models/requests/list_email_folders_request_data.rb'
131
273
  require_relative './aspose-email-cloud/models/requests/list_email_messages_request_data.rb'
274
+ require_relative './aspose-email-cloud/models/requests/list_email_models_request_data.rb'
275
+ require_relative './aspose-email-cloud/models/requests/list_email_threads_request_data.rb'
276
+ require_relative './aspose-email-cloud/models/requests/move_email_message_request_data.rb'
277
+ require_relative './aspose-email-cloud/models/requests/move_email_thread_request_data.rb'
132
278
  require_relative './aspose-email-cloud/models/requests/move_file_request_data.rb'
133
279
  require_relative './aspose-email-cloud/models/requests/move_folder_request_data.rb'
134
280
  require_relative './aspose-email-cloud/models/requests/object_exists_request_data.rb'
281
+ require_relative './aspose-email-cloud/models/requests/save_calendar_model_request_data.rb'
282
+ require_relative './aspose-email-cloud/models/requests/save_contact_model_request_data.rb'
283
+ require_relative './aspose-email-cloud/models/requests/save_email_client_account_request_data.rb'
284
+ require_relative './aspose-email-cloud/models/requests/save_email_client_multi_account_request_data.rb'
285
+ require_relative './aspose-email-cloud/models/requests/save_email_model_request_data.rb'
135
286
  require_relative './aspose-email-cloud/models/requests/save_mail_account_request_data.rb'
136
287
  require_relative './aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb'
137
288
  require_relative './aspose-email-cloud/models/requests/send_email_mime_request_data.rb'
289
+ require_relative './aspose-email-cloud/models/requests/send_email_model_request_data.rb'
138
290
  require_relative './aspose-email-cloud/models/requests/send_email_request_data.rb'
139
291
  require_relative './aspose-email-cloud/models/requests/set_email_property_request_data.rb'
140
292
  require_relative './aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb'
293
+ require_relative './aspose-email-cloud/models/requests/set_email_thread_read_flag_request_data.rb'
141
294
  require_relative './aspose-email-cloud/models/requests/storage_exists_request_data.rb'
142
295
  require_relative './aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb'
143
296
  require_relative './aspose-email-cloud/models/requests/update_contact_properties_request_data.rb'
@@ -1,577 +1,1039 @@
1
-
2
- # ----------------------------------------------------------------------------
3
- # <copyright company="Aspose" file="email_api.rb">
4
- # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
5
- # </copyright>
6
- # <summary>
7
- # Permission is hereby granted, free of charge, to any person obtaining a
8
- # copy of this software and associated documentation files (the "Software"),
9
- # to deal in the Software without restriction, including without limitation
10
- # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
- # and/or sell copies of the Software, and to permit persons to whom the
12
- # Software is furnished to do so, subject to the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be included in
15
- # all copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
- # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
- # DEALINGS IN THE SOFTWARE.
24
- # </summary>
25
- # ----------------------------------------------------------------------------
26
-
27
-
28
- require 'uri'
29
-
30
- module AsposeEmailCloud
31
- # Aspose.Email Cloud API
32
- class EmailApi
33
- attr_accessor :api_client
34
-
35
- # Initializes a new instance of the EmailApi class.
36
- # @param [String] app_key Key to access the server.
37
- # @param [String] app_sid ID to access the server.
38
- # @param [String] base_url Server URL.
39
- # @param [String] api_version Api version.
40
- # @param [Object] debug Debug switch [true, false].
41
- def initialize(app_key = nil, app_sid = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v3.0', debug = false)
42
- @api_client = ApiClient.new(app_key, app_sid, base_url, api_version, debug)
43
- end
44
-
45
- # Adds an attachment to iCalendar file
46
- # @param [add_calendar_attachmentRequest] request Request object.
47
- # @return [nil]
48
- def add_calendar_attachment(request)
49
- http_request = request.to_http_info(@api_client)
50
- make_request(http_request, :PUT, nil)
51
- nil
52
- end
53
-
54
- # Add attachment to contact document
55
- # @param [add_contact_attachmentRequest] request Request object.
56
- # @return [nil]
57
- def add_contact_attachment(request)
58
- http_request = request.to_http_info(@api_client)
59
- make_request(http_request, :PUT, nil)
60
- nil
61
- end
62
-
63
- # Adds an attachment to Email document
64
- # @param [add_email_attachmentRequest] request Request object.
65
- # @return [EmailDocumentResponse]
66
- def add_email_attachment(request)
67
- http_request = request.to_http_info(@api_client)
68
- make_request(http_request, :POST, 'EmailDocumentResponse')
69
- end
70
-
71
- # Add attachment to document
72
- # @param [add_mapi_attachmentRequest] request Request object.
73
- # @return [nil]
74
- def add_mapi_attachment(request)
75
- http_request = request.to_http_info(@api_client)
76
- make_request(http_request, :PUT, nil)
77
- nil
78
- end
79
-
80
- # Adds an email from *.eml file to specified folder in email account
81
- # @param [append_email_messageRequest] request Request object.
82
- # @return [EmailPropertyResponse]
83
- def append_email_message(request)
84
- http_request = request.to_http_info(@api_client)
85
- make_request(http_request, :PUT, 'EmailPropertyResponse')
86
- end
87
-
88
- # Adds an email from MIME to specified folder in email account
89
- # @param [append_mime_messageRequest] request Request object.
90
- # @return [ValueResponse]
91
- def append_mime_message(request)
92
- http_request = request.to_http_info(@api_client)
93
- make_request(http_request, :PUT, 'ValueResponse')
94
- end
95
-
96
- # Copy file
97
- # @param [copy_fileRequest] request Request object.
98
- # @return [nil]
99
- def copy_file(request)
100
- http_request = request.to_http_info(@api_client)
101
- make_request(http_request, :PUT, nil)
102
- nil
103
- end
104
-
105
- # Copy folder
106
- # @param [copy_folderRequest] request Request object.
107
- # @return [nil]
108
- def copy_folder(request)
109
- http_request = request.to_http_info(@api_client)
110
- make_request(http_request, :PUT, nil)
111
- nil
112
- end
113
-
114
- # Create calendar file
115
- # @param [create_calendarRequest] request Request object.
116
- # @return [nil]
117
- def create_calendar(request)
118
- http_request = request.to_http_info(@api_client)
119
- make_request(http_request, :PUT, nil)
120
- nil
121
- end
122
-
123
- # Create contact document
124
- # @param [create_contactRequest] request Request object.
125
- # @return [nil]
126
- def create_contact(request)
127
- http_request = request.to_http_info(@api_client)
128
- make_request(http_request, :PUT, nil)
129
- nil
130
- end
131
-
132
- # Create an email document
133
- # @param [create_emailRequest] request Request object.
134
- # @return [EmailDocumentResponse]
135
- def create_email(request)
136
- http_request = request.to_http_info(@api_client)
137
- make_request(http_request, :PUT, 'EmailDocumentResponse')
138
- end
139
-
140
- # Create new folder in email account
141
- # @param [create_email_folderRequest] request Request object.
142
- # @return [nil]
143
- def create_email_folder(request)
144
- http_request = request.to_http_info(@api_client)
145
- make_request(http_request, :PUT, nil)
146
- nil
147
- end
148
-
149
- # Create the folder
150
- # @param [create_folderRequest] request Request object.
151
- # @return [nil]
152
- def create_folder(request)
153
- http_request = request.to_http_info(@api_client)
154
- make_request(http_request, :PUT, nil)
155
- nil
156
- end
157
-
158
- # Create new document
159
- # @param [create_mapiRequest] request Request object.
160
- # @return [nil]
161
- def create_mapi(request)
162
- http_request = request.to_http_info(@api_client)
163
- make_request(http_request, :PUT, nil)
164
- nil
165
- end
166
-
167
- # Deletes indexed property by index and name. To delete Reminder attachment, use path ReminderAttachment/{ReminderIndex}/{AttachmentIndex}
168
- # @param [delete_calendar_propertyRequest] request Request object.
169
- # @return [nil]
170
- def delete_calendar_property(request)
171
- http_request = request.to_http_info(@api_client)
172
- make_request(http_request, :DELETE, nil)
173
- nil
174
- end
175
-
176
- # Delete property from indexed property list
177
- # @param [delete_contact_propertyRequest] request Request object.
178
- # @return [nil]
179
- def delete_contact_property(request)
180
- http_request = request.to_http_info(@api_client)
181
- make_request(http_request, :DELETE, nil)
182
- nil
183
- end
184
-
185
- # Delete a folder in email account
186
- # @param [delete_email_folderRequest] request Request object.
187
- # @return [nil]
188
- def delete_email_folder(request)
189
- http_request = request.to_http_info(@api_client)
190
- make_request(http_request, :DELETE, nil)
191
- nil
192
- end
193
-
194
- # Delete message from email account by id
195
- # @param [delete_email_messageRequest] request Request object.
196
- # @return [nil]
197
- def delete_email_message(request)
198
- http_request = request.to_http_info(@api_client)
199
- make_request(http_request, :DELETE, nil)
200
- nil
201
- end
202
-
203
- # Delete file
204
- # @param [delete_fileRequest] request Request object.
205
- # @return [nil]
206
- def delete_file(request)
207
- http_request = request.to_http_info(@api_client)
208
- make_request(http_request, :DELETE, nil)
209
- nil
210
- end
211
-
212
- # Delete folder
213
- # @param [delete_folderRequest] request Request object.
214
- # @return [nil]
215
- def delete_folder(request)
216
- http_request = request.to_http_info(@api_client)
217
- make_request(http_request, :DELETE, nil)
218
- nil
219
- end
220
-
221
- # Remove attachment from document
222
- # @param [delete_mapi_attachmentRequest] request Request object.
223
- # @return [nil]
224
- def delete_mapi_attachment(request)
225
- http_request = request.to_http_info(@api_client)
226
- make_request(http_request, :DELETE, nil)
227
- nil
228
- end
229
-
230
- # Delete document properties
231
- # @param [delete_mapi_propertiesRequest] request Request object.
232
- # @return [nil]
233
- def delete_mapi_properties(request)
234
- http_request = request.to_http_info(@api_client)
235
- make_request(http_request, :DELETE, nil)
236
- nil
237
- end
238
-
239
- # Download file
240
- # @param [download_fileRequest] request Request object.
241
- # @return [File]
242
- def download_file(request)
243
- http_request = request.to_http_info(@api_client)
244
- make_request(http_request, :GET, 'File')
245
- end
246
-
247
- # Fetch message mime from email account
248
- # @param [fetch_email_messageRequest] request Request object.
249
- # @return [MimeResponse]
250
- def fetch_email_message(request)
251
- http_request = request.to_http_info(@api_client)
252
- make_request(http_request, :GET, 'MimeResponse')
253
- end
254
-
255
- # Get calendar file properties
256
- # @param [get_calendarRequest] request Request object.
257
- # @return [HierarchicalObject]
258
- def get_calendar(request)
259
- http_request = request.to_http_info(@api_client)
260
- make_request(http_request, :GET, 'HierarchicalObject')
261
- end
262
-
263
- # Get iCalendar document attachment by name
264
- # @param [get_calendar_attachmentRequest] request Request object.
265
- # @return [File]
266
- def get_calendar_attachment(request)
267
- http_request = request.to_http_info(@api_client)
268
- make_request(http_request, :GET, 'File')
269
- end
270
-
271
- # Get iCalendar files list in folder on storage
272
- # @param [get_calendar_listRequest] request Request object.
273
- # @return [ListResponseOfHierarchicalObjectResponse]
274
- def get_calendar_list(request)
275
- http_request = request.to_http_info(@api_client)
276
- make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
277
- end
278
-
279
- # Get attachment file by name
280
- # @param [get_contact_attachmentRequest] request Request object.
281
- # @return [File]
282
- def get_contact_attachment(request)
283
- http_request = request.to_http_info(@api_client)
284
- make_request(http_request, :GET, 'File')
285
- end
286
-
287
- # Get contact list from storage folder
288
- # @param [get_contact_listRequest] request Request object.
289
- # @return [ListResponseOfHierarchicalObjectResponse]
290
- def get_contact_list(request)
291
- http_request = request.to_http_info(@api_client)
292
- make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
293
- end
294
-
295
- # Get contact document properties
296
- # @param [get_contact_propertiesRequest] request Request object.
297
- # @return [HierarchicalObject]
298
- def get_contact_properties(request)
299
- http_request = request.to_http_info(@api_client)
300
- make_request(http_request, :GET, 'HierarchicalObject')
301
- end
302
-
303
- # Get disc usage
304
- # @param [get_disc_usageRequest] request Request object.
305
- # @return [DiscUsage]
306
- def get_disc_usage(request)
307
- http_request = request.to_http_info(@api_client)
308
- make_request(http_request, :GET, 'DiscUsage')
309
- end
310
-
311
- # Get email document
312
- # @param [get_emailRequest] request Request object.
313
- # @return [EmailDocument]
314
- def get_email(request)
315
- http_request = request.to_http_info(@api_client)
316
- make_request(http_request, :GET, 'EmailDocument')
317
- end
318
-
319
- # Get email attachment by name
320
- # @param [get_email_attachmentRequest] request Request object.
321
- # @return [File]
322
- def get_email_attachment(request)
323
- http_request = request.to_http_info(@api_client)
324
- make_request(http_request, :GET, 'File')
325
- end
326
-
327
- # Get an email document property by its name
328
- # @param [get_email_propertyRequest] request Request object.
329
- # @return [EmailPropertyResponse]
330
- def get_email_property(request)
331
- http_request = request.to_http_info(@api_client)
332
- make_request(http_request, :GET, 'EmailPropertyResponse')
333
- end
334
-
335
- # Get file versions
336
- # @param [get_file_versionsRequest] request Request object.
337
- # @return [FileVersions]
338
- def get_file_versions(request)
339
- http_request = request.to_http_info(@api_client)
340
- make_request(http_request, :GET, 'FileVersions')
341
- end
342
-
343
- # Get all files and folders within a folder
344
- # @param [get_files_listRequest] request Request object.
345
- # @return [FilesList]
346
- def get_files_list(request)
347
- http_request = request.to_http_info(@api_client)
348
- make_request(http_request, :GET, 'FilesList')
349
- end
350
-
351
- # Get document attachment as file stream
352
- # @param [get_mapi_attachmentRequest] request Request object.
353
- # @return [File]
354
- def get_mapi_attachment(request)
355
- http_request = request.to_http_info(@api_client)
356
- make_request(http_request, :GET, 'File')
357
- end
358
-
359
- # Get document attachment list
360
- # @param [get_mapi_attachmentsRequest] request Request object.
361
- # @return [ListResponseOfString]
362
- def get_mapi_attachments(request)
363
- http_request = request.to_http_info(@api_client)
364
- make_request(http_request, :GET, 'ListResponseOfString')
365
- end
366
-
367
- # Get document list from storage folder
368
- # @param [get_mapi_listRequest] request Request object.
369
- # @return [ListResponseOfHierarchicalObjectResponse]
370
- def get_mapi_list(request)
371
- http_request = request.to_http_info(@api_client)
372
- make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
373
- end
374
-
375
- # Get document properties
376
- # @param [get_mapi_propertiesRequest] request Request object.
377
- # @return [HierarchicalObjectResponse]
378
- def get_mapi_properties(request)
379
- http_request = request.to_http_info(@api_client)
380
- make_request(http_request, :GET, 'HierarchicalObjectResponse')
381
- end
382
-
383
- # Get folders list in email account
384
- # @param [list_email_foldersRequest] request Request object.
385
- # @return [ListResponseOfMailServerFolder]
386
- def list_email_folders(request)
387
- http_request = request.to_http_info(@api_client)
388
- make_request(http_request, :GET, 'ListResponseOfMailServerFolder')
389
- end
390
-
391
- # Get messages from folder, filtered by query
392
- # The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where &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\"
393
- # @param [list_email_messagesRequest] request Request object.
394
- # @return [ListResponseOfString]
395
- def list_email_messages(request)
396
- http_request = request.to_http_info(@api_client)
397
- make_request(http_request, :GET, 'ListResponseOfString')
398
- end
399
-
400
- # Move file
401
- # @param [move_fileRequest] request Request object.
402
- # @return [nil]
403
- def move_file(request)
404
- http_request = request.to_http_info(@api_client)
405
- make_request(http_request, :PUT, nil)
406
- nil
407
- end
408
-
409
- # Move folder
410
- # @param [move_folderRequest] request Request object.
411
- # @return [nil]
412
- def move_folder(request)
413
- http_request = request.to_http_info(@api_client)
414
- make_request(http_request, :PUT, nil)
415
- nil
416
- end
417
-
418
- # Check if file or folder exists
419
- # @param [object_existsRequest] request Request object.
420
- # @return [ObjectExist]
421
- def object_exists(request)
422
- http_request = request.to_http_info(@api_client)
423
- make_request(http_request, :GET, 'ObjectExist')
424
- end
425
-
426
- # Create email account file (*.account) with login/password authentication
427
- # @param [save_mail_accountRequest] request Request object.
428
- # @return [nil]
429
- def save_mail_account(request)
430
- http_request = request.to_http_info(@api_client)
431
- make_request(http_request, :POST, nil)
432
- nil
433
- end
434
-
435
- # Create email account file (*.account) with OAuth
436
- # @param [save_mail_o_auth_accountRequest] request Request object.
437
- # @return [nil]
438
- def save_mail_o_auth_account(request)
439
- http_request = request.to_http_info(@api_client)
440
- make_request(http_request, :POST, nil)
441
- nil
442
- end
443
-
444
- # Send an email from *.eml file located on storage
445
- # @param [send_emailRequest] request Request object.
446
- # @return [nil]
447
- def send_email(request)
448
- http_request = request.to_http_info(@api_client)
449
- make_request(http_request, :POST, nil)
450
- nil
451
- end
452
-
453
- # Send an email specified by MIME in request
454
- # @param [send_email_mimeRequest] request Request object.
455
- # @return [nil]
456
- def send_email_mime(request)
457
- http_request = request.to_http_info(@api_client)
458
- make_request(http_request, :POST, nil)
459
- nil
460
- end
461
-
462
- # Set email document property value
463
- # @param [set_email_propertyRequest] request Request object.
464
- # @return [EmailPropertyResponse]
465
- def set_email_property(request)
466
- http_request = request.to_http_info(@api_client)
467
- make_request(http_request, :PUT, 'EmailPropertyResponse')
468
- end
469
-
470
- # Sets \"Message is read\" flag
471
- # @param [set_email_read_flagRequest] request Request object.
472
- # @return [nil]
473
- def set_email_read_flag(request)
474
- http_request = request.to_http_info(@api_client)
475
- make_request(http_request, :POST, nil)
476
- nil
477
- end
478
-
479
- # Check if storage exists
480
- # @param [storage_existsRequest] request Request object.
481
- # @return [StorageExist]
482
- def storage_exists(request)
483
- http_request = request.to_http_info(@api_client)
484
- make_request(http_request, :GET, 'StorageExist')
485
- end
486
-
487
- # Update calendar file properties
488
- # @param [update_calendar_propertiesRequest] request Request object.
489
- # @return [nil]
490
- def update_calendar_properties(request)
491
- http_request = request.to_http_info(@api_client)
492
- make_request(http_request, :PUT, nil)
493
- nil
494
- end
495
-
496
- # Update contact document properties
497
- # @param [update_contact_propertiesRequest] request Request object.
498
- # @return [nil]
499
- def update_contact_properties(request)
500
- http_request = request.to_http_info(@api_client)
501
- make_request(http_request, :PUT, nil)
502
- nil
503
- end
504
-
505
- # Update document properties
506
- # @param [update_mapi_propertiesRequest] request Request object.
507
- # @return [nil]
508
- def update_mapi_properties(request)
509
- http_request = request.to_http_info(@api_client)
510
- make_request(http_request, :PUT, nil)
511
- nil
512
- end
513
-
514
- # Upload file
515
- # @param [upload_fileRequest] request Request object.
516
- # @return [FilesUploadResult]
517
- def upload_file(request)
518
- http_request = request.to_http_info(@api_client)
519
- make_request(http_request, :PUT, 'FilesUploadResult')
520
- end
521
-
522
- private
523
-
524
- def make_request(http_request, method, return_type)
525
- call_api(http_request, method, return_type)
526
- rescue ApiError => e
527
- if e.code.equal? 401
528
- request_token
529
- return call_api(http_request, method, return_type)
530
- end
531
- raise
532
-
533
- end
534
-
535
- def call_api(http_request, method, return_type)
536
- response = @api_client.call_api(method,
537
- http_request.resource_path,
538
- header_params: http_request.header_params,
539
- query_params: http_request.query_params,
540
- form_params: http_request.form_params,
541
- body: http_request.body,
542
- auth_names: http_request.auth_names,
543
- return_type: return_type)
544
- response[0]
545
- end
546
-
547
- def request_token
548
- config = @api_client.config
549
- request_url = '/connect/token'
550
- form_params =
551
- {
552
- 'grant_type': 'client_credentials',
553
- 'client_id': config.api_key[:app_sid],
554
- 'client_secret': config.api_key[:api_key]
555
- }
556
-
557
- header_params =
558
- {
559
- 'Accept' => 'application/json',
560
- 'Content-Type' =>'application/x-www-form-urlencoded'
561
- }
562
-
563
- base_path = @api_client.config.base_path
564
- @api_client.config.base_path = ''
565
-
566
- data = @api_client.call_api(:POST, request_url,
567
- header_params: header_params,
568
- form_params: form_params,
569
- return_type: 'Object')
570
- access_token = data[0]['access_token'.to_sym]
571
-
572
- @api_client.config.base_path = base_path
573
- @api_client.config.access_token = access_token
574
- end
575
- end
576
- end
577
-
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="email_api.rb">
4
+ # Copyright (c) 2018-2020 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
+ # Converts calendar document to specified format and returns as file
241
+ # @param [ConvertCalendarRequestData] request Request object.
242
+ # @return [File]
243
+ def convert_calendar(request)
244
+ http_request = request.to_http_info(@api_client)
245
+ make_request(http_request, :PUT, 'File')
246
+ end
247
+
248
+ # Convert iCalendar to AlternateView
249
+ # @param [ConvertCalendarModelToAlternateRequestData] request Request object.
250
+ # @return [AlternateView]
251
+ def convert_calendar_model_to_alternate(request)
252
+ http_request = request.to_http_info(@api_client)
253
+ make_request(http_request, :PUT, 'AlternateView')
254
+ end
255
+
256
+ # Converts calendar model to specified format and returns as file
257
+ # @param [ConvertCalendarModelToFileRequestData] request Request object.
258
+ # @return [File]
259
+ def convert_calendar_model_to_file(request)
260
+ http_request = request.to_http_info(@api_client)
261
+ make_request(http_request, :PUT, 'File')
262
+ end
263
+
264
+ # Converts contact document to specified format and returns as file
265
+ # @param [ConvertContactRequestData] request Request object.
266
+ # @return [File]
267
+ def convert_contact(request)
268
+ http_request = request.to_http_info(@api_client)
269
+ make_request(http_request, :PUT, 'File')
270
+ end
271
+
272
+ # Converts contact model to specified format and returns as file
273
+ # @param [ConvertContactModelToFileRequestData] request Request object.
274
+ # @return [File]
275
+ def convert_contact_model_to_file(request)
276
+ http_request = request.to_http_info(@api_client)
277
+ make_request(http_request, :PUT, 'File')
278
+ end
279
+
280
+ # Converts email document to specified format and returns as file
281
+ # @param [ConvertEmailRequestData] request Request object.
282
+ # @return [File]
283
+ def convert_email(request)
284
+ http_request = request.to_http_info(@api_client)
285
+ make_request(http_request, :PUT, 'File')
286
+ end
287
+
288
+ # Converts Email model to specified format and returns as file
289
+ # @param [ConvertEmailModelToFileRequestData] request Request object.
290
+ # @return [File]
291
+ def convert_email_model_to_file(request)
292
+ http_request = request.to_http_info(@api_client)
293
+ make_request(http_request, :PUT, 'File')
294
+ end
295
+
296
+ # @param [CopyFileRequestData] request Request object.
297
+ # @return [nil]
298
+ def copy_file(request)
299
+ http_request = request.to_http_info(@api_client)
300
+ make_request(http_request, :PUT, nil)
301
+ nil
302
+ end
303
+
304
+ # @param [CopyFolderRequestData] request Request object.
305
+ # @return [nil]
306
+ def copy_folder(request)
307
+ http_request = request.to_http_info(@api_client)
308
+ make_request(http_request, :PUT, nil)
309
+ nil
310
+ end
311
+
312
+ # Create calendar file
313
+ # @param [CreateCalendarRequestData] request Request object.
314
+ # @return [nil]
315
+ def create_calendar(request)
316
+ http_request = request.to_http_info(@api_client)
317
+ make_request(http_request, :PUT, nil)
318
+ nil
319
+ end
320
+
321
+ # Create contact document
322
+ # @param [CreateContactRequestData] request Request object.
323
+ # @return [nil]
324
+ def create_contact(request)
325
+ http_request = request.to_http_info(@api_client)
326
+ make_request(http_request, :PUT, nil)
327
+ nil
328
+ end
329
+
330
+ # Create an email document
331
+ # @param [CreateEmailRequestData] request Request object.
332
+ # @return [EmailDocumentResponse]
333
+ def create_email(request)
334
+ http_request = request.to_http_info(@api_client)
335
+ make_request(http_request, :PUT, 'EmailDocumentResponse')
336
+ end
337
+
338
+ # Create new folder in email account
339
+ # @param [CreateEmailFolderRequestData] request Request object.
340
+ # @return [nil]
341
+ def create_email_folder(request)
342
+ http_request = request.to_http_info(@api_client)
343
+ make_request(http_request, :PUT, nil)
344
+ nil
345
+ end
346
+
347
+ # @param [CreateFolderRequestData] request Request object.
348
+ # @return [nil]
349
+ def create_folder(request)
350
+ http_request = request.to_http_info(@api_client)
351
+ make_request(http_request, :PUT, nil)
352
+ nil
353
+ end
354
+
355
+ # Create new document
356
+ # @param [CreateMapiRequestData] request Request object.
357
+ # @return [nil]
358
+ def create_mapi(request)
359
+ http_request = request.to_http_info(@api_client)
360
+ make_request(http_request, :PUT, nil)
361
+ nil
362
+ end
363
+
364
+ # Deletes indexed property by index and name. To delete Reminder attachment, use path ReminderAttachment/{ReminderIndex}/{AttachmentIndex}
365
+ # @param [DeleteCalendarPropertyRequestData] request Request object.
366
+ # @return [nil]
367
+ def delete_calendar_property(request)
368
+ http_request = request.to_http_info(@api_client)
369
+ make_request(http_request, :DELETE, nil)
370
+ nil
371
+ end
372
+
373
+ # Delete property from indexed property list
374
+ # @param [DeleteContactPropertyRequestData] request Request object.
375
+ # @return [nil]
376
+ def delete_contact_property(request)
377
+ http_request = request.to_http_info(@api_client)
378
+ make_request(http_request, :DELETE, nil)
379
+ nil
380
+ end
381
+
382
+ # Delete a folder in email account
383
+ # @param [DeleteEmailFolderRequestData] request Request object.
384
+ # @return [nil]
385
+ def delete_email_folder(request)
386
+ http_request = request.to_http_info(@api_client)
387
+ make_request(http_request, :DELETE, nil)
388
+ nil
389
+ end
390
+
391
+ # Delete message from email account by id
392
+ # @param [DeleteEmailMessageRequestData] request Request object.
393
+ # @return [nil]
394
+ def delete_email_message(request)
395
+ http_request = request.to_http_info(@api_client)
396
+ make_request(http_request, :DELETE, nil)
397
+ nil
398
+ end
399
+
400
+ # Delete thread by id. All messages from thread will also be deleted
401
+ # @param [DeleteEmailThreadRequestData] request Request object.
402
+ # @return [nil]
403
+ def delete_email_thread(request)
404
+ http_request = request.to_http_info(@api_client)
405
+ make_request(http_request, :DELETE, nil)
406
+ nil
407
+ end
408
+
409
+ # @param [DeleteFileRequestData] request Request object.
410
+ # @return [nil]
411
+ def delete_file(request)
412
+ http_request = request.to_http_info(@api_client)
413
+ make_request(http_request, :DELETE, nil)
414
+ nil
415
+ end
416
+
417
+ # @param [DeleteFolderRequestData] request Request object.
418
+ # @return [nil]
419
+ def delete_folder(request)
420
+ http_request = request.to_http_info(@api_client)
421
+ make_request(http_request, :DELETE, nil)
422
+ nil
423
+ end
424
+
425
+ # Remove attachment from document
426
+ # @param [DeleteMapiAttachmentRequestData] request Request object.
427
+ # @return [nil]
428
+ def delete_mapi_attachment(request)
429
+ http_request = request.to_http_info(@api_client)
430
+ make_request(http_request, :DELETE, nil)
431
+ nil
432
+ end
433
+
434
+ # Delete document properties
435
+ # @param [DeleteMapiPropertiesRequestData] request Request object.
436
+ # @return [nil]
437
+ def delete_mapi_properties(request)
438
+ http_request = request.to_http_info(@api_client)
439
+ make_request(http_request, :DELETE, nil)
440
+ nil
441
+ end
442
+
443
+ # Discover email accounts by email address. Does not validate discovered accounts.
444
+ # @param [DiscoverEmailConfigRequestData] request Request object.
445
+ # @return [EmailAccountConfigList]
446
+ def discover_email_config(request)
447
+ http_request = request.to_http_info(@api_client)
448
+ make_request(http_request, :GET, 'EmailAccountConfigList')
449
+ end
450
+
451
+ # Discover email accounts by email address. Validates discovered accounts using OAuth 2.0.
452
+ # @param [DiscoverEmailConfigOauthRequestData] request Request object.
453
+ # @return [EmailAccountConfigList]
454
+ def discover_email_config_oauth(request)
455
+ http_request = request.to_http_info(@api_client)
456
+ make_request(http_request, :POST, 'EmailAccountConfigList')
457
+ end
458
+
459
+ # Discover email accounts by email address. Validates discovered accounts using login and password.
460
+ # @param [DiscoverEmailConfigPasswordRequestData] request Request object.
461
+ # @return [EmailAccountConfigList]
462
+ def discover_email_config_password(request)
463
+ http_request = request.to_http_info(@api_client)
464
+ make_request(http_request, :POST, 'EmailAccountConfigList')
465
+ end
466
+
467
+ # @param [DownloadFileRequestData] request Request object.
468
+ # @return [File]
469
+ def download_file(request)
470
+ http_request = request.to_http_info(@api_client)
471
+ make_request(http_request, :GET, 'File')
472
+ end
473
+
474
+ # Fetch message mime from email account
475
+ # @param [FetchEmailMessageRequestData] request Request object.
476
+ # @return [MimeResponse]
477
+ def fetch_email_message(request)
478
+ http_request = request.to_http_info(@api_client)
479
+ make_request(http_request, :GET, 'MimeResponse')
480
+ end
481
+
482
+ # Fetch message model from email account
483
+ # @param [FetchEmailModelRequestData] request Request object.
484
+ # @return [EmailDto]
485
+ def fetch_email_model(request)
486
+ http_request = request.to_http_info(@api_client)
487
+ make_request(http_request, :GET, 'EmailDto')
488
+ end
489
+
490
+ # Get messages from thread by id. All messages are fully fetched. For accounts with CacheFile only cached messages will be returned.
491
+ # @param [FetchEmailThreadMessagesRequestData] request Request object.
492
+ # @return [ListResponseOfEmailDto]
493
+ def fetch_email_thread_messages(request)
494
+ http_request = request.to_http_info(@api_client)
495
+ make_request(http_request, :GET, 'ListResponseOfEmailDto')
496
+ end
497
+
498
+ # Get calendar file properties
499
+ # @param [GetCalendarRequestData] request Request object.
500
+ # @return [HierarchicalObject]
501
+ def get_calendar(request)
502
+ http_request = request.to_http_info(@api_client)
503
+ make_request(http_request, :GET, 'HierarchicalObject')
504
+ end
505
+
506
+ # Converts calendar document from storage to specified format and returns as file
507
+ # @param [GetCalendarAsFileRequestData] request Request object.
508
+ # @return [File]
509
+ def get_calendar_as_file(request)
510
+ http_request = request.to_http_info(@api_client)
511
+ make_request(http_request, :GET, 'File')
512
+ end
513
+
514
+ # Get iCalendar document attachment by name
515
+ # @param [GetCalendarAttachmentRequestData] request Request object.
516
+ # @return [File]
517
+ def get_calendar_attachment(request)
518
+ http_request = request.to_http_info(@api_client)
519
+ make_request(http_request, :GET, 'File')
520
+ end
521
+
522
+ # Converts calendar document to a model representation
523
+ # @param [GetCalendarFileAsModelRequestData] request Request object.
524
+ # @return [CalendarDto]
525
+ def get_calendar_file_as_model(request)
526
+ http_request = request.to_http_info(@api_client)
527
+ make_request(http_request, :PUT, 'CalendarDto')
528
+ end
529
+
530
+ # Get iCalendar files list in folder on storage
531
+ # @param [GetCalendarListRequestData] request Request object.
532
+ # @return [ListResponseOfHierarchicalObjectResponse]
533
+ def get_calendar_list(request)
534
+ http_request = request.to_http_info(@api_client)
535
+ make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
536
+ end
537
+
538
+ # Get calendar file
539
+ # @param [GetCalendarModelRequestData] request Request object.
540
+ # @return [CalendarDto]
541
+ def get_calendar_model(request)
542
+ http_request = request.to_http_info(@api_client)
543
+ make_request(http_request, :GET, 'CalendarDto')
544
+ end
545
+
546
+ # Get iCalendar from storage as AlternateView
547
+ # @param [GetCalendarModelAsAlternateRequestData] request Request object.
548
+ # @return [AlternateView]
549
+ def get_calendar_model_as_alternate(request)
550
+ http_request = request.to_http_info(@api_client)
551
+ make_request(http_request, :GET, 'AlternateView')
552
+ end
553
+
554
+ # Get iCalendar list from storage folder
555
+ # @param [GetCalendarModelListRequestData] request Request object.
556
+ # @return [CalendarDtoList]
557
+ def get_calendar_model_list(request)
558
+ http_request = request.to_http_info(@api_client)
559
+ make_request(http_request, :GET, 'CalendarDtoList')
560
+ end
561
+
562
+ # Converts calendar document from storage to specified format and returns as file
563
+ # @param [GetContactAsFileRequestData] request Request object.
564
+ # @return [File]
565
+ def get_contact_as_file(request)
566
+ http_request = request.to_http_info(@api_client)
567
+ make_request(http_request, :GET, 'File')
568
+ end
569
+
570
+ # Get attachment file by name
571
+ # @param [GetContactAttachmentRequestData] request Request object.
572
+ # @return [File]
573
+ def get_contact_attachment(request)
574
+ http_request = request.to_http_info(@api_client)
575
+ make_request(http_request, :GET, 'File')
576
+ end
577
+
578
+ # Converts contact document to a model representation
579
+ # @param [GetContactFileAsModelRequestData] request Request object.
580
+ # @return [ContactDto]
581
+ def get_contact_file_as_model(request)
582
+ http_request = request.to_http_info(@api_client)
583
+ make_request(http_request, :PUT, 'ContactDto')
584
+ end
585
+
586
+ # Get contact list from storage folder
587
+ # @param [GetContactListRequestData] request Request object.
588
+ # @return [ListResponseOfHierarchicalObjectResponse]
589
+ def get_contact_list(request)
590
+ http_request = request.to_http_info(@api_client)
591
+ make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
592
+ end
593
+
594
+ # Get contact document.
595
+ # @param [GetContactModelRequestData] request Request object.
596
+ # @return [ContactDto]
597
+ def get_contact_model(request)
598
+ http_request = request.to_http_info(@api_client)
599
+ make_request(http_request, :GET, 'ContactDto')
600
+ end
601
+
602
+ # Get contact list from storage folder.
603
+ # @param [GetContactModelListRequestData] request Request object.
604
+ # @return [ContactDtoList]
605
+ def get_contact_model_list(request)
606
+ http_request = request.to_http_info(@api_client)
607
+ make_request(http_request, :GET, 'ContactDtoList')
608
+ end
609
+
610
+ # Get contact document properties
611
+ # @param [GetContactPropertiesRequestData] request Request object.
612
+ # @return [HierarchicalObject]
613
+ def get_contact_properties(request)
614
+ http_request = request.to_http_info(@api_client)
615
+ make_request(http_request, :GET, 'HierarchicalObject')
616
+ end
617
+
618
+ # @param [GetDiscUsageRequestData] request Request object.
619
+ # @return [DiscUsage]
620
+ def get_disc_usage(request)
621
+ http_request = request.to_http_info(@api_client)
622
+ make_request(http_request, :GET, 'DiscUsage')
623
+ end
624
+
625
+ # Get email document
626
+ # @param [GetEmailRequestData] request Request object.
627
+ # @return [EmailDocument]
628
+ def get_email(request)
629
+ http_request = request.to_http_info(@api_client)
630
+ make_request(http_request, :GET, 'EmailDocument')
631
+ end
632
+
633
+ # Converts email document from storage to specified format and returns as file
634
+ # @param [GetEmailAsFileRequestData] request Request object.
635
+ # @return [File]
636
+ def get_email_as_file(request)
637
+ http_request = request.to_http_info(@api_client)
638
+ make_request(http_request, :GET, 'File')
639
+ end
640
+
641
+ # Get email attachment by name
642
+ # @param [GetEmailAttachmentRequestData] request Request object.
643
+ # @return [File]
644
+ def get_email_attachment(request)
645
+ http_request = request.to_http_info(@api_client)
646
+ make_request(http_request, :GET, 'File')
647
+ end
648
+
649
+ # Get email client account from storage
650
+ # @param [GetEmailClientAccountRequestData] request Request object.
651
+ # @return [EmailClientAccount]
652
+ def get_email_client_account(request)
653
+ http_request = request.to_http_info(@api_client)
654
+ make_request(http_request, :GET, 'EmailClientAccount')
655
+ end
656
+
657
+ # Get email client multi account file (*.multi.account). Will respond error if file extension is not \".multi.account\".
658
+ # @param [GetEmailClientMultiAccountRequestData] request Request object.
659
+ # @return [EmailClientMultiAccount]
660
+ def get_email_client_multi_account(request)
661
+ http_request = request.to_http_info(@api_client)
662
+ make_request(http_request, :GET, 'EmailClientMultiAccount')
663
+ end
664
+
665
+ # Converts email document to a model representation
666
+ # @param [GetEmailFileAsModelRequestData] request Request object.
667
+ # @return [EmailDto]
668
+ def get_email_file_as_model(request)
669
+ http_request = request.to_http_info(@api_client)
670
+ make_request(http_request, :PUT, 'EmailDto')
671
+ end
672
+
673
+ # Get email document.
674
+ # @param [GetEmailModelRequestData] request Request object.
675
+ # @return [EmailDto]
676
+ def get_email_model(request)
677
+ http_request = request.to_http_info(@api_client)
678
+ make_request(http_request, :GET, 'EmailDto')
679
+ end
680
+
681
+ # Get email list from storage folder.
682
+ # @param [GetEmailModelListRequestData] request Request object.
683
+ # @return [EmailDtoList]
684
+ def get_email_model_list(request)
685
+ http_request = request.to_http_info(@api_client)
686
+ make_request(http_request, :GET, 'EmailDtoList')
687
+ end
688
+
689
+ # Get an email document property by its name
690
+ # @param [GetEmailPropertyRequestData] request Request object.
691
+ # @return [EmailPropertyResponse]
692
+ def get_email_property(request)
693
+ http_request = request.to_http_info(@api_client)
694
+ make_request(http_request, :GET, 'EmailPropertyResponse')
695
+ end
696
+
697
+ # @param [GetFileVersionsRequestData] request Request object.
698
+ # @return [FileVersions]
699
+ def get_file_versions(request)
700
+ http_request = request.to_http_info(@api_client)
701
+ make_request(http_request, :GET, 'FileVersions')
702
+ end
703
+
704
+ # @param [GetFilesListRequestData] request Request object.
705
+ # @return [FilesList]
706
+ def get_files_list(request)
707
+ http_request = request.to_http_info(@api_client)
708
+ make_request(http_request, :GET, 'FilesList')
709
+ end
710
+
711
+ # Get document attachment as file stream
712
+ # @param [GetMapiAttachmentRequestData] request Request object.
713
+ # @return [File]
714
+ def get_mapi_attachment(request)
715
+ http_request = request.to_http_info(@api_client)
716
+ make_request(http_request, :GET, 'File')
717
+ end
718
+
719
+ # Get document attachment list
720
+ # @param [GetMapiAttachmentsRequestData] request Request object.
721
+ # @return [ListResponseOfString]
722
+ def get_mapi_attachments(request)
723
+ http_request = request.to_http_info(@api_client)
724
+ make_request(http_request, :GET, 'ListResponseOfString')
725
+ end
726
+
727
+ # Get document list from storage folder
728
+ # @param [GetMapiListRequestData] request Request object.
729
+ # @return [ListResponseOfHierarchicalObjectResponse]
730
+ def get_mapi_list(request)
731
+ http_request = request.to_http_info(@api_client)
732
+ make_request(http_request, :GET, 'ListResponseOfHierarchicalObjectResponse')
733
+ end
734
+
735
+ # Get document properties
736
+ # @param [GetMapiPropertiesRequestData] request Request object.
737
+ # @return [HierarchicalObjectResponse]
738
+ def get_mapi_properties(request)
739
+ http_request = request.to_http_info(@api_client)
740
+ make_request(http_request, :GET, 'HierarchicalObjectResponse')
741
+ end
742
+
743
+ # Check email address is disposable
744
+ # @param [IsEmailAddressDisposableRequestData] request Request object.
745
+ # @return [ValueTOfBoolean]
746
+ def is_email_address_disposable(request)
747
+ http_request = request.to_http_info(@api_client)
748
+ make_request(http_request, :GET, 'ValueTOfBoolean')
749
+ end
750
+
751
+ # Get folders list in email account
752
+ # @param [ListEmailFoldersRequestData] request Request object.
753
+ # @return [ListResponseOfMailServerFolder]
754
+ def list_email_folders(request)
755
+ http_request = request.to_http_info(@api_client)
756
+ make_request(http_request, :GET, 'ListResponseOfMailServerFolder')
757
+ end
758
+
759
+ # Get messages from folder, filtered by query
760
+ # 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\"
761
+ # @param [ListEmailMessagesRequestData] request Request object.
762
+ # @return [ListResponseOfString]
763
+ def list_email_messages(request)
764
+ http_request = request.to_http_info(@api_client)
765
+ make_request(http_request, :GET, 'ListResponseOfString')
766
+ end
767
+
768
+ # Get messages from folder, filtered by query
769
+ # 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\"
770
+ # @param [ListEmailModelsRequestData] request Request object.
771
+ # @return [ListResponseOfEmailDto]
772
+ def list_email_models(request)
773
+ http_request = request.to_http_info(@api_client)
774
+ make_request(http_request, :GET, 'ListResponseOfEmailDto')
775
+ end
776
+
777
+ # Get message threads from folder. All messages are partly fetched (without email body and other fields)
778
+ # @param [ListEmailThreadsRequestData] request Request object.
779
+ # @return [EmailThreadList]
780
+ def list_email_threads(request)
781
+ http_request = request.to_http_info(@api_client)
782
+ make_request(http_request, :GET, 'EmailThreadList')
783
+ end
784
+
785
+ # Move message to another folder
786
+ # @param [MoveEmailMessageRequestData] request Request object.
787
+ # @return [nil]
788
+ def move_email_message(request)
789
+ http_request = request.to_http_info(@api_client)
790
+ make_request(http_request, :PUT, nil)
791
+ nil
792
+ end
793
+
794
+ # Move thread to another folder
795
+ # @param [MoveEmailThreadRequestData] request Request object.
796
+ # @return [nil]
797
+ def move_email_thread(request)
798
+ http_request = request.to_http_info(@api_client)
799
+ make_request(http_request, :PUT, nil)
800
+ nil
801
+ end
802
+
803
+ # @param [MoveFileRequestData] request Request object.
804
+ # @return [nil]
805
+ def move_file(request)
806
+ http_request = request.to_http_info(@api_client)
807
+ make_request(http_request, :PUT, nil)
808
+ nil
809
+ end
810
+
811
+ # @param [MoveFolderRequestData] request Request object.
812
+ # @return [nil]
813
+ def move_folder(request)
814
+ http_request = request.to_http_info(@api_client)
815
+ make_request(http_request, :PUT, nil)
816
+ nil
817
+ end
818
+
819
+ # @param [ObjectExistsRequestData] request Request object.
820
+ # @return [ObjectExist]
821
+ def object_exists(request)
822
+ http_request = request.to_http_info(@api_client)
823
+ make_request(http_request, :GET, 'ObjectExist')
824
+ end
825
+
826
+ # Save iCalendar
827
+ # @param [SaveCalendarModelRequestData] request Request object.
828
+ # @return [nil]
829
+ def save_calendar_model(request)
830
+ http_request = request.to_http_info(@api_client)
831
+ make_request(http_request, :PUT, nil)
832
+ nil
833
+ end
834
+
835
+ # Save contact.
836
+ # @param [SaveContactModelRequestData] request Request object.
837
+ # @return [nil]
838
+ def save_contact_model(request)
839
+ http_request = request.to_http_info(@api_client)
840
+ make_request(http_request, :PUT, nil)
841
+ nil
842
+ end
843
+
844
+ # Create email client account file (*.account) with any of supported credentials
845
+ # @param [SaveEmailClientAccountRequestData] request Request object.
846
+ # @return [nil]
847
+ def save_email_client_account(request)
848
+ http_request = request.to_http_info(@api_client)
849
+ make_request(http_request, :PUT, nil)
850
+ nil
851
+ end
852
+
853
+ # Create email client multi account file (*.multi.account). Will respond error if file extension is not \".multi.account\".
854
+ # @param [SaveEmailClientMultiAccountRequestData] request Request object.
855
+ # @return [nil]
856
+ def save_email_client_multi_account(request)
857
+ http_request = request.to_http_info(@api_client)
858
+ make_request(http_request, :PUT, nil)
859
+ nil
860
+ end
861
+
862
+ # Save email document.
863
+ # @param [SaveEmailModelRequestData] request Request object.
864
+ # @return [nil]
865
+ def save_email_model(request)
866
+ http_request = request.to_http_info(@api_client)
867
+ make_request(http_request, :PUT, nil)
868
+ nil
869
+ end
870
+
871
+ # Create email account file (*.account) with login/password authentication
872
+ # @param [SaveMailAccountRequestData] request Request object.
873
+ # @return [nil]
874
+ def save_mail_account(request)
875
+ http_request = request.to_http_info(@api_client)
876
+ make_request(http_request, :POST, nil)
877
+ nil
878
+ end
879
+
880
+ # Create email account file (*.account) with OAuth
881
+ # @param [SaveMailOAuthAccountRequestData] request Request object.
882
+ # @return [nil]
883
+ def save_mail_o_auth_account(request)
884
+ http_request = request.to_http_info(@api_client)
885
+ make_request(http_request, :POST, nil)
886
+ nil
887
+ end
888
+
889
+ # Send an email from *.eml file located on storage
890
+ # @param [SendEmailRequestData] request Request object.
891
+ # @return [nil]
892
+ def send_email(request)
893
+ http_request = request.to_http_info(@api_client)
894
+ make_request(http_request, :POST, nil)
895
+ nil
896
+ end
897
+
898
+ # Send an email specified by MIME in request
899
+ # @param [SendEmailMimeRequestData] request Request object.
900
+ # @return [nil]
901
+ def send_email_mime(request)
902
+ http_request = request.to_http_info(@api_client)
903
+ make_request(http_request, :POST, nil)
904
+ nil
905
+ end
906
+
907
+ # Send an email specified by model in request
908
+ # @param [SendEmailModelRequestData] request Request object.
909
+ # @return [nil]
910
+ def send_email_model(request)
911
+ http_request = request.to_http_info(@api_client)
912
+ make_request(http_request, :POST, nil)
913
+ nil
914
+ end
915
+
916
+ # Set email document property value
917
+ # @param [SetEmailPropertyRequestData] request Request object.
918
+ # @return [EmailPropertyResponse]
919
+ def set_email_property(request)
920
+ http_request = request.to_http_info(@api_client)
921
+ make_request(http_request, :PUT, 'EmailPropertyResponse')
922
+ end
923
+
924
+ # Sets \"Message is read\" flag
925
+ # @param [SetEmailReadFlagRequestData] request Request object.
926
+ # @return [nil]
927
+ def set_email_read_flag(request)
928
+ http_request = request.to_http_info(@api_client)
929
+ make_request(http_request, :POST, nil)
930
+ nil
931
+ end
932
+
933
+ # Mark all messages in thread as read or unread
934
+ # @param [SetEmailThreadReadFlagRequestData] request Request object.
935
+ # @return [nil]
936
+ def set_email_thread_read_flag(request)
937
+ http_request = request.to_http_info(@api_client)
938
+ make_request(http_request, :PUT, nil)
939
+ nil
940
+ end
941
+
942
+ # @param [StorageExistsRequestData] request Request object.
943
+ # @return [StorageExist]
944
+ def storage_exists(request)
945
+ http_request = request.to_http_info(@api_client)
946
+ make_request(http_request, :GET, 'StorageExist')
947
+ end
948
+
949
+ # Update calendar file properties
950
+ # @param [UpdateCalendarPropertiesRequestData] request Request object.
951
+ # @return [nil]
952
+ def update_calendar_properties(request)
953
+ http_request = request.to_http_info(@api_client)
954
+ make_request(http_request, :PUT, nil)
955
+ nil
956
+ end
957
+
958
+ # Update contact document properties
959
+ # @param [UpdateContactPropertiesRequestData] request Request object.
960
+ # @return [nil]
961
+ def update_contact_properties(request)
962
+ http_request = request.to_http_info(@api_client)
963
+ make_request(http_request, :PUT, nil)
964
+ nil
965
+ end
966
+
967
+ # Update document properties
968
+ # @param [UpdateMapiPropertiesRequestData] request Request object.
969
+ # @return [nil]
970
+ def update_mapi_properties(request)
971
+ http_request = request.to_http_info(@api_client)
972
+ make_request(http_request, :PUT, nil)
973
+ nil
974
+ end
975
+
976
+ # @param [UploadFileRequestData] request Request object.
977
+ # @return [FilesUploadResult]
978
+ def upload_file(request)
979
+ http_request = request.to_http_info(@api_client)
980
+ make_request(http_request, :PUT, 'FilesUploadResult')
981
+ end
982
+
983
+ private
984
+
985
+ def make_request(http_request, method, return_type)
986
+ call_api(http_request, method, return_type)
987
+ rescue ApiError => e
988
+ if e.code.equal? 401
989
+ request_token
990
+ return call_api(http_request, method, return_type)
991
+ end
992
+ raise
993
+
994
+ end
995
+
996
+ def call_api(http_request, method, return_type)
997
+ response = @api_client.call_api(method,
998
+ http_request.resource_path,
999
+ header_params: http_request.header_params,
1000
+ query_params: http_request.query_params,
1001
+ form_params: http_request.form_params,
1002
+ body: http_request.body,
1003
+ auth_names: http_request.auth_names,
1004
+ return_type: return_type)
1005
+ response[0]
1006
+ end
1007
+
1008
+ def request_token
1009
+ config = @api_client.config
1010
+ request_url = '/connect/token'
1011
+ form_params =
1012
+ {
1013
+ 'grant_type': 'client_credentials',
1014
+ 'client_id': config.api_key[:app_sid],
1015
+ 'client_secret': config.api_key[:api_key]
1016
+ }
1017
+
1018
+ header_params =
1019
+ {
1020
+ 'Accept' => 'application/json',
1021
+ 'Content-Type' =>'application/x-www-form-urlencoded'
1022
+ }
1023
+
1024
+ base_path = @api_client.config.base_path
1025
+ @api_client.config.base_path = ''
1026
+
1027
+ data = @api_client.call_api(:POST, request_url,
1028
+ header_params: header_params,
1029
+ form_params: form_params,
1030
+ return_type: 'Object',
1031
+ host: @api_client.config.auth_url)
1032
+ access_token = data[0]['access_token'.to_sym]
1033
+
1034
+ @api_client.config.base_path = base_path
1035
+ @api_client.config.access_token = access_token
1036
+ end
1037
+ end
1038
+ end
1039
+