aspose_email_cloud 18.7.0 → 19.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +145 -0
  3. data/lib/aspose-email-cloud/api/email_api.rb +577 -0
  4. data/{src/asposeemailcloud → lib/aspose-email-cloud}/api_client.rb +125 -133
  5. data/lib/aspose-email-cloud/api_error.rb +42 -0
  6. data/{src/asposeemailcloud → lib/aspose-email-cloud}/configuration.rb +56 -43
  7. data/lib/aspose-email-cloud/models/account_base_request.rb +250 -0
  8. data/lib/aspose-email-cloud/models/add_attachment_request.rb +219 -0
  9. data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +300 -0
  10. data/lib/aspose-email-cloud/models/append_email_base_request.rb +316 -0
  11. data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +335 -0
  12. data/lib/aspose-email-cloud/models/base_object.rb +225 -0
  13. data/lib/aspose-email-cloud/models/contact_format.rb +45 -0
  14. data/lib/aspose-email-cloud/models/create_email_request.rb +224 -0
  15. data/lib/aspose-email-cloud/models/create_folder_base_request.rb +297 -0
  16. data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +302 -0
  17. data/lib/aspose-email-cloud/models/delete_message_base_request.rb +302 -0
  18. data/lib/aspose-email-cloud/models/disc_usage.rb +229 -0
  19. data/lib/aspose-email-cloud/models/email_account_request.rb +342 -0
  20. data/lib/aspose-email-cloud/models/email_document.rb +226 -0
  21. data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/email_document_response.rb +105 -109
  22. data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/email_properties.rb +122 -97
  23. data/lib/aspose-email-cloud/models/email_property.rb +256 -0
  24. data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/email_property_response.rb +105 -109
  25. data/lib/aspose-email-cloud/models/error.rb +241 -0
  26. data/lib/aspose-email-cloud/models/error_details.rb +224 -0
  27. data/lib/aspose-email-cloud/models/file_version.rb +289 -0
  28. data/lib/aspose-email-cloud/models/file_versions.rb +210 -0
  29. data/lib/aspose-email-cloud/models/files_list.rb +210 -0
  30. data/lib/aspose-email-cloud/models/files_upload_result.rb +223 -0
  31. data/lib/aspose-email-cloud/models/hierarchical_object.rb +238 -0
  32. data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +224 -0
  33. data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +219 -0
  34. data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +254 -0
  35. data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +252 -0
  36. data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/link.rb +138 -116
  37. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +208 -0
  38. data/{src/asposeemailcloud/models/email_document.rb → lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb} +105 -98
  39. data/{src/asposeemailcloud/models/list_folders_response.rb → lib/aspose-email-cloud/models/list_response_of_string.rb} +105 -111
  40. data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/mail_server_folder.rb +116 -96
  41. data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/mime_response.rb +105 -109
  42. data/lib/aspose-email-cloud/models/object_exist.rb +229 -0
  43. data/lib/aspose-email-cloud/models/primitive_object.rb +236 -0
  44. data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +89 -0
  45. data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +101 -0
  46. data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +89 -0
  47. data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +89 -0
  48. data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +75 -0
  49. data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +75 -0
  50. data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +92 -0
  51. data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +89 -0
  52. data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +82 -0
  53. data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +94 -0
  54. data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +75 -0
  55. data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +82 -0
  56. data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +78 -0
  57. data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +82 -0
  58. data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +96 -0
  59. data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +108 -0
  60. data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +75 -0
  61. data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +75 -0
  62. data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +81 -0
  63. data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +81 -0
  64. data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +89 -0
  65. data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +82 -0
  66. data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +81 -0
  67. data/lib/aspose-email-cloud/models/requests/email_request.rb +75 -0
  68. data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +93 -0
  69. data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +88 -0
  70. data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +95 -0
  71. data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +81 -0
  72. data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +100 -0
  73. data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +92 -0
  74. data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +93 -0
  75. data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +71 -0
  76. data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +88 -0
  77. data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +88 -0
  78. data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +81 -0
  79. data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +78 -0
  80. data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +78 -0
  81. data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +88 -0
  82. data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +81 -0
  83. data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +80 -0
  84. data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +81 -0
  85. data/lib/aspose-email-cloud/models/requests/http_request.rb +51 -0
  86. data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +88 -0
  87. data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +105 -0
  88. data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +92 -0
  89. data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +89 -0
  90. data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +81 -0
  91. data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +75 -0
  92. data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +75 -0
  93. data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +75 -0
  94. data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +75 -0
  95. data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +89 -0
  96. data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +75 -0
  97. data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +75 -0
  98. data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +82 -0
  99. data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +94 -0
  100. data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +82 -0
  101. data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +87 -0
  102. data/lib/aspose-email-cloud/models/save_email_account_request.rb +377 -0
  103. data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +447 -0
  104. data/lib/aspose-email-cloud/models/send_email_base_request.rb +267 -0
  105. data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +286 -0
  106. data/lib/aspose-email-cloud/models/set_email_property_request.rb +224 -0
  107. data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +302 -0
  108. data/{src/asposeemailcloud/models/email_property.rb → lib/aspose-email-cloud/models/storage_exist.rb} +110 -96
  109. data/lib/aspose-email-cloud/models/storage_file.rb +262 -0
  110. data/lib/aspose-email-cloud/models/storage_file_location.rb +254 -0
  111. data/lib/aspose-email-cloud/models/storage_folder_location.rb +219 -0
  112. data/{src/asposeemailcloud/models/list_response.rb → lib/aspose-email-cloud/models/value_response.rb} +105 -111
  113. data/{src/asposeemailcloud → lib/aspose-email-cloud}/version.rb +4 -4
  114. metadata +128 -38
  115. data/src/asposeemailcloud.rb +0 -55
  116. data/src/asposeemailcloud/api/email_api.rb +0 -418
  117. data/src/asposeemailcloud/api/email_client_api.rb +0 -960
  118. data/src/asposeemailcloud/api_error.rb +0 -38
  119. data/src/asposeemailcloud/models/http_status_code.rb +0 -76
  120. data/src/asposeemailcloud/models/protocol_type.rb +0 -34
  121. data/src/asposeemailcloud/models/saa_spose_response.rb +0 -202
  122. data/src/asposeemailcloud/models/security_options.rb +0 -33
@@ -0,0 +1,51 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="http_request.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
+ module AsposeEmailCloud
29
+
30
+ # Http request data.
31
+ class HttpRequest
32
+
33
+ # Initializes a new instance.
34
+ # @param [String] resource_path Path to method endpoint.
35
+ # @param [Hash] header_params Header parameters to be placed in the request header.
36
+ # @param [Hash] query_params Query parameters in the url.
37
+ # @param [Hash] form_params Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`.
38
+ # @param [Object] body Request body.
39
+ # @param [Array] auth_names Auth Settings names for the request.
40
+ def initialize(resource_path, header_params, query_params, form_params, body, auth_names)
41
+ @resource_path = resource_path
42
+ @query_params = query_params
43
+ @header_params = header_params
44
+ @form_params = form_params
45
+ @body = body
46
+ @auth_names = auth_names
47
+ end
48
+
49
+ attr_reader :resource_path, :header_params, :query_params, :form_params, :body, :auth_names
50
+ end
51
+ end
@@ -0,0 +1,88 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="list_email_folders_request_data.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_relative './email_request'
29
+ require_relative './http_request'
30
+
31
+ module AsposeEmailCloud
32
+ # Request model for list_email_folders operation.
33
+ class ListEmailFoldersRequestData < EmailRequest
34
+
35
+ # Get folders list in email account
36
+ # @param [String] first_account Email account
37
+ # @param [String] second_account Additional email account (should be specified for POP/IMAP accounts and should be SMTP account)
38
+ # @param [String] storage Storage name where account file(s) located
39
+ # @param [String] storage_folder Folder in storage where account file(s) located
40
+ # @param [String] parent_folder Folder in which subfolders should be listed
41
+ def initialize(first_account, second_account = nil, storage = nil, storage_folder = nil, parent_folder = nil)
42
+ @first_account = first_account
43
+ @second_account = second_account
44
+ @storage = storage
45
+ @storage_folder = storage_folder
46
+ @parent_folder = parent_folder
47
+ end
48
+
49
+ def to_http_info(api_client)
50
+ # verify the required parameter 'first_account' is set
51
+ if api_client.config.client_side_validation && @first_account.nil?
52
+ raise ArgumentError, "Missing the required parameter 'first_account' when calling EmailApi.list_email_folders"
53
+ end
54
+
55
+ # resource path
56
+ local_var_path = '/email/client/ListFolders'
57
+
58
+ # query parameters
59
+ query_params = {}
60
+ query_params[:firstAccount] = @first_account
61
+ query_params[:secondAccount] = @second_account unless @second_account.nil?
62
+ query_params[:storage] = @storage unless @storage.nil?
63
+ query_params[:storageFolder] = @storage_folder unless @storage_folder.nil?
64
+ query_params[:parentFolder] = @parent_folder unless @parent_folder.nil?
65
+
66
+ # form parameters
67
+ form_params = {}
68
+
69
+ # http body (model)
70
+ post_body = nil
71
+ auth_names = ['JWT']
72
+
73
+ # header parameters
74
+ header_params = {}
75
+ # HTTP header 'Accept' (if needed)
76
+ header_params['Accept'] = select_header_accept(['application/json'])
77
+ # HTTP header 'Content-Type'
78
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
79
+
80
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
81
+ header_params,
82
+ query_params,
83
+ form_params,
84
+ post_body,
85
+ auth_names)
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,105 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="list_email_messages_request_data.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_relative './email_request'
29
+ require_relative './http_request'
30
+
31
+ module AsposeEmailCloud
32
+ # Request model for list_email_messages operation.
33
+ class ListEmailMessagesRequestData < EmailRequest
34
+
35
+ # Get messages from folder, filtered by query
36
+ # The query string should have the following view. The example of a simple expression: &#39;&lt;Field name&gt;&#39; &lt;Comparison operator&gt; &#39;&lt;Field value&gt;&#39;, where &amp;lt;Field Name&amp;gt; - the name of a message field through which filtering is made, &amp;lt;Comparison operator&amp;gt; - comparison operators, as their name implies, allow to compare message field and specified value, &amp;lt;Field value&amp;gt; - value to be compared with a message field. The number of simple expressions can make a compound one, ex.: (&lt;Simple expression 1&gt; &amp; &lt;Simple expression 2&gt;) | &lt;Simple expression 3&gt;, where \&quot;&amp;amp;\&quot; - logical-AND operator, \&quot;|\&quot; - logical-OR operator At present the following values are allowed as a field name (&lt;Field name&gt;): \&quot;To\&quot; - represents a TO field of message, \&quot;Text\&quot; - represents string in the header or body of the message, \&quot;Bcc\&quot; - represents a BCC field of message, \&quot;Body\&quot; - represents a string in the body of message, \&quot;Cc\&quot; - represents a CC field of message, \&quot;From\&quot; - represents a From field of message, \&quot;Subject\&quot; - represents a string in the subject of message, \&quot;InternalDate\&quot; - represents an internal date of message, \&quot;SentDate\&quot; - represents a sent date of message Additionally, the following field names are allowed for IMAP-protocol: \&quot;Answered\&quot; - represents an /Answered flag of message \&quot;Seen\&quot; - represents a /Seen flag of message \&quot;Flagged\&quot; - represents a /Flagged flag of message \&quot;Draft\&quot; - represents a /Draft flag of message \&quot;Deleted\&quot; - represents a Deleted/ flag of message \&quot;Recent\&quot; - represents a Deleted/ flag of message \&quot;MessageSize\&quot; - represents a size (in bytes) of message Additionally, the following field names are allowed for Exchange: \&quot;IsRead\&quot; - Indicates whether the message has been read \&quot;HasAttachment\&quot; - Indicates whether or not the message has attachments \&quot;IsSubmitted\&quot; - Indicates whether the message has been submitted to the Outbox \&quot;ContentClass\&quot; - represents a content class of item Additionally, the following field names are allowed for pst/ost files: \&quot;MessageClass\&quot; - Represents a message class \&quot;ContainerClass\&quot; - Represents a folder container class \&quot;Importance\&quot; - Represents a message importance \&quot;MessageSize\&quot; - represents a size (in bytes) of message \&quot;FolderName\&quot; - represents a folder name \&quot;ContentsCount\&quot; - represents a total number of items in the folder \&quot;UnreadContentsCount\&quot; - represents the number of unread items in the folder. \&quot;Subfolders\&quot; - Indicates whether or not the folder has subfolders \&quot;Read\&quot; - the message is marked as having been read \&quot;HasAttachment\&quot; - the message has at least one attachment \&quot;Unsent\&quot; - the message is still being composed \&quot;Unmodified\&quot; - the message has not been modified since it was first saved (if unsent) or it was delivered (if sent) \&quot;FromMe\&quot; - the user receiving the message was also the user who sent the message \&quot;Resend\&quot; - the message includes a request for a resend operation with a non-delivery report \&quot;NotifyRead\&quot; - the user who sent the message has requested notification when a recipient first reads it \&quot;NotifyUnread\&quot; - the user who sent the message has requested notification when a recipient deletes it before reading or the Message object expires \&quot;EverRead\&quot; - the message has been read at least once The field value (&lt;Field value&gt;) can take the following values: For text fields - any string, For date type fields - the string of \&quot;d-MMM-yyy\&quot; format, ex. \&quot;10-Feb-2009\&quot;, For flags (fields of boolean type) - either \&quot;True\&quot;, or \&quot;False\&quot;
37
+ # @param [String] folder A folder in email account
38
+ # @param [String] query_string A MailQuery search string
39
+ # @param [String] first_account Email account
40
+ # @param [String] second_account Additional email account (should be specified for POP/IMAP accounts and should be SMTP account)
41
+ # @param [String] storage Storage name where account file(s) located
42
+ # @param [String] storage_folder Folder in storage where account file(s) located
43
+ # @param [BOOLEAN] recursive Specifies that should message be searched in subfolders recursively
44
+ def initialize(folder, query_string, first_account, second_account = nil, storage = nil, storage_folder = nil, recursive = nil)
45
+ @folder = folder
46
+ @query_string = query_string
47
+ @first_account = first_account
48
+ @second_account = second_account
49
+ @storage = storage
50
+ @storage_folder = storage_folder
51
+ @recursive = recursive
52
+ end
53
+
54
+ def to_http_info(api_client)
55
+ # verify the required parameter 'folder' is set
56
+ if api_client.config.client_side_validation && @folder.nil?
57
+ raise ArgumentError, "Missing the required parameter 'folder' when calling EmailApi.list_email_messages"
58
+ end
59
+
60
+ # verify the required parameter 'query_string' is set
61
+ if api_client.config.client_side_validation && @query_string.nil?
62
+ raise ArgumentError, "Missing the required parameter 'query_string' when calling EmailApi.list_email_messages"
63
+ end
64
+
65
+ # verify the required parameter 'first_account' is set
66
+ if api_client.config.client_side_validation && @first_account.nil?
67
+ raise ArgumentError, "Missing the required parameter 'first_account' when calling EmailApi.list_email_messages"
68
+ end
69
+
70
+ # resource path
71
+ local_var_path = '/email/client/ListMessages'
72
+
73
+ # query parameters
74
+ query_params = {}
75
+ query_params[:folder] = @folder
76
+ query_params[:queryString] = @query_string
77
+ query_params[:firstAccount] = @first_account
78
+ query_params[:secondAccount] = @second_account unless @second_account.nil?
79
+ query_params[:storage] = @storage unless @storage.nil?
80
+ query_params[:storageFolder] = @storage_folder unless @storage_folder.nil?
81
+ query_params[:recursive] = @recursive unless @recursive.nil?
82
+
83
+ # form parameters
84
+ form_params = {}
85
+
86
+ # http body (model)
87
+ post_body = nil
88
+ auth_names = ['JWT']
89
+
90
+ # header parameters
91
+ header_params = {}
92
+ # HTTP header 'Accept' (if needed)
93
+ header_params['Accept'] = select_header_accept(['application/json'])
94
+ # HTTP header 'Content-Type'
95
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
96
+
97
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
98
+ header_params,
99
+ query_params,
100
+ form_params,
101
+ post_body,
102
+ auth_names)
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,92 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="move_file_request_data.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_relative './email_request'
29
+ require_relative './http_request'
30
+
31
+ module AsposeEmailCloud
32
+ # Request model for move_file operation.
33
+ class MoveFileRequestData < EmailRequest
34
+
35
+ # Move file
36
+ # @param [String] src_path Source file path e.g. &#39;/src.ext&#39;
37
+ # @param [String] dest_path Destination file path e.g. &#39;/dest.ext&#39;
38
+ # @param [String] src_storage_name Source storage name
39
+ # @param [String] dest_storage_name Destination storage name
40
+ # @param [String] version_id File version ID to move
41
+ def initialize(src_path, dest_path, src_storage_name = nil, dest_storage_name = nil, version_id = nil)
42
+ @src_path = src_path
43
+ @dest_path = dest_path
44
+ @src_storage_name = src_storage_name
45
+ @dest_storage_name = dest_storage_name
46
+ @version_id = version_id
47
+ end
48
+
49
+ def to_http_info(api_client)
50
+ # verify the required parameter 'src_path' is set
51
+ if api_client.config.client_side_validation && @src_path.nil?
52
+ raise ArgumentError, "Missing the required parameter 'src_path' when calling EmailApi.move_file"
53
+ end
54
+
55
+ # verify the required parameter 'dest_path' is set
56
+ if api_client.config.client_side_validation && @dest_path.nil?
57
+ raise ArgumentError, "Missing the required parameter 'dest_path' when calling EmailApi.move_file"
58
+ end
59
+
60
+ # resource path
61
+ local_var_path = '/email/storage/file/move/{srcPath}'.sub('{' + 'srcPath' + '}', @src_path.to_s)
62
+
63
+ # query parameters
64
+ query_params = {}
65
+ query_params[:destPath] = @dest_path
66
+ query_params[:srcStorageName] = @src_storage_name unless @src_storage_name.nil?
67
+ query_params[:destStorageName] = @dest_storage_name unless @dest_storage_name.nil?
68
+ query_params[:versionId] = @version_id unless @version_id.nil?
69
+
70
+ # form parameters
71
+ form_params = {}
72
+
73
+ # http body (model)
74
+ post_body = nil
75
+ auth_names = ['JWT']
76
+
77
+ # header parameters
78
+ header_params = {}
79
+ # HTTP header 'Accept' (if needed)
80
+ header_params['Accept'] = select_header_accept(['application/json'])
81
+ # HTTP header 'Content-Type'
82
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
83
+
84
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
85
+ header_params,
86
+ query_params,
87
+ form_params,
88
+ post_body,
89
+ auth_names)
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,89 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="move_folder_request_data.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_relative './email_request'
29
+ require_relative './http_request'
30
+
31
+ module AsposeEmailCloud
32
+ # Request model for move_folder operation.
33
+ class MoveFolderRequestData < EmailRequest
34
+
35
+ # Move folder
36
+ # @param [String] src_path Folder path to move e.g. &#39;/folder&#39;
37
+ # @param [String] dest_path Destination folder path to move to e.g &#39;/dst&#39;
38
+ # @param [String] src_storage_name Source storage name
39
+ # @param [String] dest_storage_name Destination storage name
40
+ def initialize(src_path, dest_path, src_storage_name = nil, dest_storage_name = nil)
41
+ @src_path = src_path
42
+ @dest_path = dest_path
43
+ @src_storage_name = src_storage_name
44
+ @dest_storage_name = dest_storage_name
45
+ end
46
+
47
+ def to_http_info(api_client)
48
+ # verify the required parameter 'src_path' is set
49
+ if api_client.config.client_side_validation && @src_path.nil?
50
+ raise ArgumentError, "Missing the required parameter 'src_path' when calling EmailApi.move_folder"
51
+ end
52
+
53
+ # verify the required parameter 'dest_path' is set
54
+ if api_client.config.client_side_validation && @dest_path.nil?
55
+ raise ArgumentError, "Missing the required parameter 'dest_path' when calling EmailApi.move_folder"
56
+ end
57
+
58
+ # resource path
59
+ local_var_path = '/email/storage/folder/move/{srcPath}'.sub('{' + 'srcPath' + '}', @src_path.to_s)
60
+
61
+ # query parameters
62
+ query_params = {}
63
+ query_params[:destPath] = @dest_path
64
+ query_params[:srcStorageName] = @src_storage_name unless @src_storage_name.nil?
65
+ query_params[:destStorageName] = @dest_storage_name unless @dest_storage_name.nil?
66
+
67
+ # form parameters
68
+ form_params = {}
69
+
70
+ # http body (model)
71
+ post_body = nil
72
+ auth_names = ['JWT']
73
+
74
+ # header parameters
75
+ header_params = {}
76
+ # HTTP header 'Accept' (if needed)
77
+ header_params['Accept'] = select_header_accept(['application/json'])
78
+ # HTTP header 'Content-Type'
79
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
80
+
81
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
82
+ header_params,
83
+ query_params,
84
+ form_params,
85
+ post_body,
86
+ auth_names)
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,81 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="object_exists_request_data.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_relative './email_request'
29
+ require_relative './http_request'
30
+
31
+ module AsposeEmailCloud
32
+ # Request model for object_exists operation.
33
+ class ObjectExistsRequestData < EmailRequest
34
+
35
+ # Check if file or folder exists
36
+ # @param [String] path File or folder path e.g. &#39;/file.ext&#39; or &#39;/folder&#39;
37
+ # @param [String] storage_name Storage name
38
+ # @param [String] version_id File version ID
39
+ def initialize(path, storage_name = nil, version_id = nil)
40
+ @path = path
41
+ @storage_name = storage_name
42
+ @version_id = version_id
43
+ end
44
+
45
+ def to_http_info(api_client)
46
+ # verify the required parameter 'path' is set
47
+ if api_client.config.client_side_validation && @path.nil?
48
+ raise ArgumentError, "Missing the required parameter 'path' when calling EmailApi.object_exists"
49
+ end
50
+
51
+ # resource path
52
+ local_var_path = '/email/storage/exist/{path}'.sub('{' + 'path' + '}', @path.to_s)
53
+
54
+ # query parameters
55
+ query_params = {}
56
+ query_params[:storageName] = @storage_name unless @storage_name.nil?
57
+ query_params[:versionId] = @version_id unless @version_id.nil?
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = nil
64
+ auth_names = ['JWT']
65
+
66
+ # header parameters
67
+ header_params = {}
68
+ # HTTP header 'Accept' (if needed)
69
+ header_params['Accept'] = select_header_accept(['application/json'])
70
+ # HTTP header 'Content-Type'
71
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
72
+
73
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
74
+ header_params,
75
+ query_params,
76
+ form_params,
77
+ post_body,
78
+ auth_names)
79
+ end
80
+ end
81
+ end