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
@@ -1,38 +0,0 @@
1
- =begin
2
- #Aspose.Email for Cloud API Reference
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: 1.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
10
-
11
- =end
12
-
13
- module asposeemailcloud
14
- class ApiError < StandardError
15
- attr_reader :code, :response_headers, :response_body
16
-
17
- # Usage examples:
18
- # ApiError.new
19
- # ApiError.new("message")
20
- # ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
21
- # ApiError.new(:code => 404, :message => "Not Found")
22
- def initialize(arg = nil)
23
- if arg.is_a? Hash
24
- if arg.key?(:message) || arg.key?('message')
25
- super(arg[:message] || arg['message'])
26
- else
27
- super arg
28
- end
29
-
30
- arg.each do |k, v|
31
- instance_variable_set "@#{k}", v
32
- end
33
- else
34
- super arg
35
- end
36
- end
37
- end
38
- end
@@ -1,76 +0,0 @@
1
- =begin
2
- #Aspose.Email for Cloud API Reference
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: 1.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module asposeemailcloud
16
- class HttpStatusCode
17
-
18
- 100 = 100.freeze
19
- 101 = 101.freeze
20
- 200 = 200.freeze
21
- 201 = 201.freeze
22
- 202 = 202.freeze
23
- 203 = 203.freeze
24
- 204 = 204.freeze
25
- 205 = 205.freeze
26
- 206 = 206.freeze
27
- 300 = 300.freeze
28
- 300 = 300.freeze
29
- 301 = 301.freeze
30
- 301 = 301.freeze
31
- 302 = 302.freeze
32
- 302 = 302.freeze
33
- 303 = 303.freeze
34
- 303 = 303.freeze
35
- 304 = 304.freeze
36
- 305 = 305.freeze
37
- 306 = 306.freeze
38
- 307 = 307.freeze
39
- 307 = 307.freeze
40
- 400 = 400.freeze
41
- 401 = 401.freeze
42
- 402 = 402.freeze
43
- 403 = 403.freeze
44
- 404 = 404.freeze
45
- 405 = 405.freeze
46
- 406 = 406.freeze
47
- 407 = 407.freeze
48
- 408 = 408.freeze
49
- 409 = 409.freeze
50
- 410 = 410.freeze
51
- 411 = 411.freeze
52
- 412 = 412.freeze
53
- 413 = 413.freeze
54
- 414 = 414.freeze
55
- 415 = 415.freeze
56
- 416 = 416.freeze
57
- 417 = 417.freeze
58
- 426 = 426.freeze
59
- 500 = 500.freeze
60
- 501 = 501.freeze
61
- 502 = 502.freeze
62
- 503 = 503.freeze
63
- 504 = 504.freeze
64
- 505 = 505.freeze
65
-
66
- # Builds the enum from string
67
- # @param [String] The enum value in the form of the string
68
- # @return [String] The enum value
69
- def build_from_hash(value)
70
- consantValues = HttpStatusCode.constants.select{|c| c.to_s == value}
71
- raise "Invalid ENUM value #{value} for class #HttpStatusCode" if consantValues.empty?
72
- value
73
- end
74
- end
75
-
76
- end
@@ -1,34 +0,0 @@
1
- =begin
2
- #Aspose.Email for Cloud API Reference
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: 1.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module asposeemailcloud
16
- class ProtocolType
17
-
18
- 0 = 0.freeze
19
- 1 = 1.freeze
20
- 2 = 2.freeze
21
- 3 = 3.freeze
22
- 4 = 4.freeze
23
-
24
- # Builds the enum from string
25
- # @param [String] The enum value in the form of the string
26
- # @return [String] The enum value
27
- def build_from_hash(value)
28
- consantValues = ProtocolType.constants.select{|c| c.to_s == value}
29
- raise "Invalid ENUM value #{value} for class #ProtocolType" if consantValues.empty?
30
- value
31
- end
32
- end
33
-
34
- end
@@ -1,202 +0,0 @@
1
- =begin
2
- #Aspose.Email for Cloud API Reference
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: 1.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module asposeemailcloud
16
- # The basic SaaSposeResponse response class kept from the old Aspose for Cloud Platform. We keep this base class and use it because most probably users are already using it to get API responses. The plan in future is to get rid of this name, but who knows when ?!
17
- class SaaSposeResponse
18
- attr_accessor :code
19
-
20
- attr_accessor :status
21
-
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'code' => :'Code',
27
- :'status' => :'Status'
28
- }
29
- end
30
-
31
- # Attribute type mapping.
32
- def self.swagger_types
33
- {
34
- :'code' => :'HttpStatusCode',
35
- :'status' => :'String'
36
- }
37
- end
38
-
39
- # Initializes the object
40
- # @param [Hash] attributes Model attributes in the form of hash
41
- def initialize(attributes = {})
42
- return unless attributes.is_a?(Hash)
43
-
44
- # convert string to symbol for hash key
45
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
-
47
- if attributes.has_key?(:'Code')
48
- self.code = attributes[:'Code']
49
- end
50
-
51
- if attributes.has_key?(:'Status')
52
- self.status = attributes[:'Status']
53
- end
54
-
55
- end
56
-
57
- # Show invalid properties with the reasons. Usually used together with valid?
58
- # @return Array for valid properies with the reasons
59
- def list_invalid_properties
60
- invalid_properties = Array.new
61
- if @code.nil?
62
- invalid_properties.push("invalid value for 'code', code cannot be nil.")
63
- end
64
-
65
- return invalid_properties
66
- end
67
-
68
- # Check to see if the all the properties in the model are valid
69
- # @return true if the model is valid
70
- def valid?
71
- return false if @code.nil?
72
- return true
73
- end
74
-
75
- # Checks equality by comparing each attribute.
76
- # @param [Object] Object to be compared
77
- def ==(o)
78
- return true if self.equal?(o)
79
- self.class == o.class &&
80
- code == o.code &&
81
- status == o.status
82
- end
83
-
84
- # @see the `==` method
85
- # @param [Object] Object to be compared
86
- def eql?(o)
87
- self == o
88
- end
89
-
90
- # Calculates hash code according to all attributes.
91
- # @return [Fixnum] Hash code
92
- def hash
93
- [code, status].hash
94
- end
95
-
96
- # Builds the object from hash
97
- # @param [Hash] attributes Model attributes in the form of hash
98
- # @return [Object] Returns the model itself
99
- def build_from_hash(attributes)
100
- return nil unless attributes.is_a?(Hash)
101
- self.class.swagger_types.each_pair do |key, type|
102
- if type =~ /\AArray<(.*)>/i
103
- # check to ensure the input is an array given that the the attribute
104
- # is documented as an array but the input is not
105
- if attributes[self.class.attribute_map[key]].is_a?(Array)
106
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
107
- end
108
- elsif !attributes[self.class.attribute_map[key]].nil?
109
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
110
- end # or else data not found in attributes(hash), not an issue as the data can be optional
111
- end
112
-
113
- self
114
- end
115
-
116
- # Deserializes the data based on type
117
- # @param string type Data type
118
- # @param string value Value to be deserialized
119
- # @return [Object] Deserialized data
120
- def _deserialize(type, value)
121
- case type.to_sym
122
- when :DateTime
123
- DateTime.parse(value)
124
- when :Date
125
- Date.parse(value)
126
- when :String
127
- value.to_s
128
- when :Integer
129
- value.to_i
130
- when :Float
131
- value.to_f
132
- when :BOOLEAN
133
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
134
- true
135
- else
136
- false
137
- end
138
- when :Object
139
- # generic object (usually a Hash), return directly
140
- value
141
- when /\AArray<(?<inner_type>.+)>\z/
142
- inner_type = Regexp.last_match[:inner_type]
143
- value.map { |v| _deserialize(inner_type, v) }
144
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
145
- k_type = Regexp.last_match[:k_type]
146
- v_type = Regexp.last_match[:v_type]
147
- {}.tap do |hash|
148
- value.each do |k, v|
149
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
150
- end
151
- end
152
- else # model
153
- temp_model = asposeemailcloud.const_get(type).new
154
- temp_model.build_from_hash(value)
155
- end
156
- end
157
-
158
- # Returns the string representation of the object
159
- # @return [String] String presentation of the object
160
- def to_s
161
- to_hash.to_s
162
- end
163
-
164
- # to_body is an alias to to_hash (backward compatibility)
165
- # @return [Hash] Returns the object in the form of hash
166
- def to_body
167
- to_hash
168
- end
169
-
170
- # Returns the object in the form of hash
171
- # @return [Hash] Returns the object in the form of hash
172
- def to_hash
173
- hash = {}
174
- self.class.attribute_map.each_pair do |attr, param|
175
- value = self.send(attr)
176
- next if value.nil?
177
- hash[param] = _to_hash(value)
178
- end
179
- hash
180
- end
181
-
182
- # Outputs non-array value in the form of hash
183
- # For object, use to_hash. Otherwise, just return the value
184
- # @param [Object] value Any valid value
185
- # @return [Hash] Returns the value in the form of hash
186
- def _to_hash(value)
187
- if value.is_a?(Array)
188
- value.compact.map{ |v| _to_hash(v) }
189
- elsif value.is_a?(Hash)
190
- {}.tap do |hash|
191
- value.each { |k, v| hash[k] = _to_hash(v) }
192
- end
193
- elsif value.respond_to? :to_hash
194
- value.to_hash
195
- else
196
- value
197
- end
198
- end
199
-
200
- end
201
-
202
- end
@@ -1,33 +0,0 @@
1
- =begin
2
- #Aspose.Email for Cloud API Reference
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: 1.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module asposeemailcloud
16
- class SecurityOptions
17
-
18
- 0 = 0.freeze
19
- 1 = 1.freeze
20
- 2 = 2.freeze
21
- 256 = 256.freeze
22
-
23
- # Builds the enum from string
24
- # @param [String] The enum value in the form of the string
25
- # @return [String] The enum value
26
- def build_from_hash(value)
27
- consantValues = SecurityOptions.constants.select{|c| c.to_s == value}
28
- raise "Invalid ENUM value #{value} for class #SecurityOptions" if consantValues.empty?
29
- value
30
- end
31
- end
32
-
33
- end