asposeemailcloud 18.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fc0507f32a0cceb0eda39ff89aca678fde1b3900a15f473a63d4ec3055984f9e
4
+ data.tar.gz: 3767c8bb5c8e36191c49885fb94d088a827d20cc25c71c4c7d7387f008de0682
5
+ SHA512:
6
+ metadata.gz: 0b21c63cfd99559d69ddfc72831b194f9c88a68d88f5383c65a2e5e9ea39680df928f286fa7953863e830b8f30df8ee90677d9bb74106f24279c06d46e87b05b
7
+ data.tar.gz: 0e2cf1c5ff05a2fe8b8f26a752b64063c20a6c57aa4060e5c60cad0bec0a48bf8bc9b4b5bd859de058d1660b2bdcc66cd374d772f190d7ecf63fd5bbc0b5ac34
@@ -0,0 +1,55 @@
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
+ # Common files
14
+ require 'asposeemailcloud/api_client'
15
+ require 'asposeemailcloud/api_error'
16
+ require 'asposeemailcloud/version'
17
+ require 'asposeemailcloud/configuration'
18
+
19
+ # Models
20
+ require 'asposeemailcloud/models/email_document'
21
+ require 'asposeemailcloud/models/email_properties'
22
+ require 'asposeemailcloud/models/email_property'
23
+ require 'asposeemailcloud/models/http_status_code'
24
+ require 'asposeemailcloud/models/link'
25
+ require 'asposeemailcloud/models/mail_server_folder'
26
+ require 'asposeemailcloud/models/protocol_type'
27
+ require 'asposeemailcloud/models/saa_spose_response'
28
+ require 'asposeemailcloud/models/security_options'
29
+ require 'asposeemailcloud/models/email_document_response'
30
+ require 'asposeemailcloud/models/email_property_response'
31
+ require 'asposeemailcloud/models/list_folders_response'
32
+ require 'asposeemailcloud/models/list_response'
33
+ require 'asposeemailcloud/models/mime_response'
34
+
35
+ # APIs
36
+ require 'asposeemailcloud/api/email_api'
37
+ require 'asposeemailcloud/api/email_client_api'
38
+
39
+ module asposeemailcloud
40
+ class << self
41
+ # Customize default settings for the SDK using block.
42
+ # asposeemailcloud.configure do |config|
43
+ # config.username = "xxx"
44
+ # config.password = "xxx"
45
+ # end
46
+ # If no block given, return the default Configuration object.
47
+ def configure
48
+ if block_given?
49
+ yield(Configuration.default)
50
+ else
51
+ Configuration.default
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,418 @@
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 "uri"
14
+
15
+ module asposeemailcloud
16
+ class EmailApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Get document
24
+ #
25
+ # @param name
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :storage
28
+ # @option opts [String] :folder
29
+ # @return [File]
30
+ def email_get_document(name, opts = {})
31
+ data, _status_code, _headers = email_get_document_with_http_info(name, opts)
32
+ return data
33
+ end
34
+
35
+ # Get document
36
+ #
37
+ # @param name
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :storage
40
+ # @option opts [String] :folder
41
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
42
+ def email_get_document_with_http_info(name, opts = {})
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug "Calling API: EmailApi.email_get_document ..."
45
+ end
46
+ # verify the required parameter 'name' is set
47
+ if @api_client.config.client_side_validation && name.nil?
48
+ fail ArgumentError, "Missing the required parameter 'name' when calling EmailApi.email_get_document"
49
+ end
50
+ # resource path
51
+ local_var_path = "/email/{name}".sub('{' + 'name' + '}', name.to_s)
52
+
53
+ # query parameters
54
+ query_params = {}
55
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
56
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
57
+
58
+ # header parameters
59
+ header_params = {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
62
+ # HTTP header 'Content-Type'
63
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
64
+
65
+ # form parameters
66
+ form_params = {}
67
+
68
+ # http body (model)
69
+ post_body = nil
70
+ auth_names = []
71
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names,
77
+ :return_type => 'File')
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: EmailApi#email_get_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # Get email attachment
85
+ #
86
+ # @param name
87
+ # @param attach_name
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :storage
90
+ # @option opts [String] :folder
91
+ # @return [File]
92
+ def email_get_email_attachment(name, attach_name, opts = {})
93
+ data, _status_code, _headers = email_get_email_attachment_with_http_info(name, attach_name, opts)
94
+ return data
95
+ end
96
+
97
+ # Get email attachment
98
+ #
99
+ # @param name
100
+ # @param attach_name
101
+ # @param [Hash] opts the optional parameters
102
+ # @option opts [String] :storage
103
+ # @option opts [String] :folder
104
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
105
+ def email_get_email_attachment_with_http_info(name, attach_name, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "Calling API: EmailApi.email_get_email_attachment ..."
108
+ end
109
+ # verify the required parameter 'name' is set
110
+ if @api_client.config.client_side_validation && name.nil?
111
+ fail ArgumentError, "Missing the required parameter 'name' when calling EmailApi.email_get_email_attachment"
112
+ end
113
+ # verify the required parameter 'attach_name' is set
114
+ if @api_client.config.client_side_validation && attach_name.nil?
115
+ fail ArgumentError, "Missing the required parameter 'attach_name' when calling EmailApi.email_get_email_attachment"
116
+ end
117
+ # resource path
118
+ local_var_path = "/email/{name}/attachments/{attachName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'attachName' + '}', attach_name.to_s)
119
+
120
+ # query parameters
121
+ query_params = {}
122
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
123
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
124
+
125
+ # header parameters
126
+ header_params = {}
127
+ # HTTP header 'Accept' (if needed)
128
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
129
+ # HTTP header 'Content-Type'
130
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
131
+
132
+ # form parameters
133
+ form_params = {}
134
+
135
+ # http body (model)
136
+ post_body = nil
137
+ auth_names = []
138
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => 'File')
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: EmailApi#email_get_email_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
147
+ end
148
+ return data, status_code, headers
149
+ end
150
+
151
+ # Get email property
152
+ #
153
+ # @param property_name
154
+ # @param name
155
+ # @param [Hash] opts the optional parameters
156
+ # @option opts [String] :storage
157
+ # @option opts [String] :folder
158
+ # @return [File]
159
+ def email_get_email_property(property_name, name, opts = {})
160
+ data, _status_code, _headers = email_get_email_property_with_http_info(property_name, name, opts)
161
+ return data
162
+ end
163
+
164
+ # Get email property
165
+ #
166
+ # @param property_name
167
+ # @param name
168
+ # @param [Hash] opts the optional parameters
169
+ # @option opts [String] :storage
170
+ # @option opts [String] :folder
171
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
172
+ def email_get_email_property_with_http_info(property_name, name, opts = {})
173
+ if @api_client.config.debugging
174
+ @api_client.config.logger.debug "Calling API: EmailApi.email_get_email_property ..."
175
+ end
176
+ # verify the required parameter 'property_name' is set
177
+ if @api_client.config.client_side_validation && property_name.nil?
178
+ fail ArgumentError, "Missing the required parameter 'property_name' when calling EmailApi.email_get_email_property"
179
+ end
180
+ # verify the required parameter 'name' is set
181
+ if @api_client.config.client_side_validation && name.nil?
182
+ fail ArgumentError, "Missing the required parameter 'name' when calling EmailApi.email_get_email_property"
183
+ end
184
+ # resource path
185
+ local_var_path = "/email/{name}/properties/{propertyName}".sub('{' + 'propertyName' + '}', property_name.to_s).sub('{' + 'name' + '}', name.to_s)
186
+
187
+ # query parameters
188
+ query_params = {}
189
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
190
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
191
+
192
+ # header parameters
193
+ header_params = {}
194
+ # HTTP header 'Accept' (if needed)
195
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
196
+ # HTTP header 'Content-Type'
197
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
198
+
199
+ # form parameters
200
+ form_params = {}
201
+
202
+ # http body (model)
203
+ post_body = nil
204
+ auth_names = []
205
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
206
+ :header_params => header_params,
207
+ :query_params => query_params,
208
+ :form_params => form_params,
209
+ :body => post_body,
210
+ :auth_names => auth_names,
211
+ :return_type => 'File')
212
+ if @api_client.config.debugging
213
+ @api_client.config.logger.debug "API called: EmailApi#email_get_email_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
214
+ end
215
+ return data, status_code, headers
216
+ end
217
+
218
+ # Post add email attachment
219
+ #
220
+ # @param name
221
+ # @param attach_name
222
+ # @param [Hash] opts the optional parameters
223
+ # @option opts [String] :storage
224
+ # @option opts [String] :folder
225
+ # @return [EmailDocumentResponse]
226
+ def email_post_add_email_attachment(name, attach_name, opts = {})
227
+ data, _status_code, _headers = email_post_add_email_attachment_with_http_info(name, attach_name, opts)
228
+ return data
229
+ end
230
+
231
+ # Post add email attachment
232
+ #
233
+ # @param name
234
+ # @param attach_name
235
+ # @param [Hash] opts the optional parameters
236
+ # @option opts [String] :storage
237
+ # @option opts [String] :folder
238
+ # @return [Array<(EmailDocumentResponse, Fixnum, Hash)>] EmailDocumentResponse data, response status code and response headers
239
+ def email_post_add_email_attachment_with_http_info(name, attach_name, opts = {})
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug "Calling API: EmailApi.email_post_add_email_attachment ..."
242
+ end
243
+ # verify the required parameter 'name' is set
244
+ if @api_client.config.client_side_validation && name.nil?
245
+ fail ArgumentError, "Missing the required parameter 'name' when calling EmailApi.email_post_add_email_attachment"
246
+ end
247
+ # verify the required parameter 'attach_name' is set
248
+ if @api_client.config.client_side_validation && attach_name.nil?
249
+ fail ArgumentError, "Missing the required parameter 'attach_name' when calling EmailApi.email_post_add_email_attachment"
250
+ end
251
+ # resource path
252
+ local_var_path = "/email/{name}/attachments".sub('{' + 'name' + '}', name.to_s)
253
+
254
+ # query parameters
255
+ query_params = {}
256
+ query_params[:'attachName'] = attach_name
257
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
258
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
259
+
260
+ # header parameters
261
+ header_params = {}
262
+ # HTTP header 'Accept' (if needed)
263
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
264
+ # HTTP header 'Content-Type'
265
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
266
+
267
+ # form parameters
268
+ form_params = {}
269
+
270
+ # http body (model)
271
+ post_body = nil
272
+ auth_names = []
273
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
274
+ :header_params => header_params,
275
+ :query_params => query_params,
276
+ :form_params => form_params,
277
+ :body => post_body,
278
+ :auth_names => auth_names,
279
+ :return_type => 'EmailDocumentResponse')
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: EmailApi#email_post_add_email_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
285
+
286
+ # Put creatw new email
287
+ #
288
+ # @param name
289
+ # @param [Hash] opts the optional parameters
290
+ # @option opts [EmailDocument] :email
291
+ # @option opts [String] :storage
292
+ # @option opts [String] :folder
293
+ # @return [EmailDocumentResponse]
294
+ def email_put_create_new_email(name, opts = {})
295
+ data, _status_code, _headers = email_put_create_new_email_with_http_info(name, opts)
296
+ return data
297
+ end
298
+
299
+ # Put creatw new email
300
+ #
301
+ # @param name
302
+ # @param [Hash] opts the optional parameters
303
+ # @option opts [EmailDocument] :email
304
+ # @option opts [String] :storage
305
+ # @option opts [String] :folder
306
+ # @return [Array<(EmailDocumentResponse, Fixnum, Hash)>] EmailDocumentResponse data, response status code and response headers
307
+ def email_put_create_new_email_with_http_info(name, opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug "Calling API: EmailApi.email_put_create_new_email ..."
310
+ end
311
+ # verify the required parameter 'name' is set
312
+ if @api_client.config.client_side_validation && name.nil?
313
+ fail ArgumentError, "Missing the required parameter 'name' when calling EmailApi.email_put_create_new_email"
314
+ end
315
+ # resource path
316
+ local_var_path = "/email/{name}".sub('{' + 'name' + '}', name.to_s)
317
+
318
+ # query parameters
319
+ query_params = {}
320
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
321
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
322
+
323
+ # header parameters
324
+ header_params = {}
325
+ # HTTP header 'Accept' (if needed)
326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
327
+ # HTTP header 'Content-Type'
328
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
329
+
330
+ # form parameters
331
+ form_params = {}
332
+
333
+ # http body (model)
334
+ post_body = @api_client.object_to_http_body(opts[:'email'])
335
+ auth_names = []
336
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
337
+ :header_params => header_params,
338
+ :query_params => query_params,
339
+ :form_params => form_params,
340
+ :body => post_body,
341
+ :auth_names => auth_names,
342
+ :return_type => 'EmailDocumentResponse')
343
+ if @api_client.config.debugging
344
+ @api_client.config.logger.debug "API called: EmailApi#email_put_create_new_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
345
+ end
346
+ return data, status_code, headers
347
+ end
348
+
349
+ # Put set email property
350
+ #
351
+ # @param name
352
+ # @param property_name
353
+ # @param [Hash] opts the optional parameters
354
+ # @option opts [EmailProperty] :property
355
+ # @option opts [String] :storage
356
+ # @option opts [String] :folder
357
+ # @return [EmailPropertyResponse]
358
+ def email_put_set_email_property(name, property_name, opts = {})
359
+ data, _status_code, _headers = email_put_set_email_property_with_http_info(name, property_name, opts)
360
+ return data
361
+ end
362
+
363
+ # Put set email property
364
+ #
365
+ # @param name
366
+ # @param property_name
367
+ # @param [Hash] opts the optional parameters
368
+ # @option opts [EmailProperty] :property
369
+ # @option opts [String] :storage
370
+ # @option opts [String] :folder
371
+ # @return [Array<(EmailPropertyResponse, Fixnum, Hash)>] EmailPropertyResponse data, response status code and response headers
372
+ def email_put_set_email_property_with_http_info(name, property_name, opts = {})
373
+ if @api_client.config.debugging
374
+ @api_client.config.logger.debug "Calling API: EmailApi.email_put_set_email_property ..."
375
+ end
376
+ # verify the required parameter 'name' is set
377
+ if @api_client.config.client_side_validation && name.nil?
378
+ fail ArgumentError, "Missing the required parameter 'name' when calling EmailApi.email_put_set_email_property"
379
+ end
380
+ # verify the required parameter 'property_name' is set
381
+ if @api_client.config.client_side_validation && property_name.nil?
382
+ fail ArgumentError, "Missing the required parameter 'property_name' when calling EmailApi.email_put_set_email_property"
383
+ end
384
+ # resource path
385
+ local_var_path = "/email/{name}/properties/{propertyName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'propertyName' + '}', property_name.to_s)
386
+
387
+ # query parameters
388
+ query_params = {}
389
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
390
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
391
+
392
+ # header parameters
393
+ header_params = {}
394
+ # HTTP header 'Accept' (if needed)
395
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
396
+ # HTTP header 'Content-Type'
397
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
398
+
399
+ # form parameters
400
+ form_params = {}
401
+
402
+ # http body (model)
403
+ post_body = @api_client.object_to_http_body(opts[:'property'])
404
+ auth_names = []
405
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
406
+ :header_params => header_params,
407
+ :query_params => query_params,
408
+ :form_params => form_params,
409
+ :body => post_body,
410
+ :auth_names => auth_names,
411
+ :return_type => 'EmailPropertyResponse')
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug "API called: EmailApi#email_put_set_email_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ end
415
+ return data, status_code, headers
416
+ end
417
+ end
418
+ end