aspose_email_cloud 19.12.0 → 20.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +65 -0
  3. data/lib/aspose-email-cloud/api/email_api.rb +158 -1
  4. data/lib/aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq.rb +230 -0
  5. data/lib/aspose-email-cloud/models/alternate_view.rb +279 -0
  6. data/lib/aspose-email-cloud/models/append_email_model_rq.rb +333 -0
  7. data/lib/aspose-email-cloud/models/associated_person.rb +241 -0
  8. data/lib/aspose-email-cloud/models/attachment.rb +321 -0
  9. data/lib/aspose-email-cloud/models/attachment_base.rb +251 -0
  10. data/lib/aspose-email-cloud/models/base_object.rb +86 -86
  11. data/lib/aspose-email-cloud/models/calendar_dto.rb +554 -0
  12. data/lib/aspose-email-cloud/models/calendar_dto_alternate_rq.rb +265 -0
  13. data/lib/aspose-email-cloud/models/calendar_dto_list.rb +212 -0
  14. data/lib/aspose-email-cloud/models/calendar_reminder.rb +315 -0
  15. data/lib/aspose-email-cloud/models/contact_dto.rb +696 -0
  16. data/lib/aspose-email-cloud/models/contact_dto_list.rb +212 -0
  17. data/lib/aspose-email-cloud/models/contact_photo.rb +228 -0
  18. data/lib/aspose-email-cloud/models/content_type.rb +264 -0
  19. data/lib/aspose-email-cloud/models/content_type_parameter.rb +223 -0
  20. data/lib/aspose-email-cloud/models/customer_event.rb +228 -0
  21. data/lib/aspose-email-cloud/models/email_address.rb +267 -0
  22. data/lib/aspose-email-cloud/models/email_dto.rb +678 -0
  23. data/lib/aspose-email-cloud/models/email_dto_list.rb +212 -0
  24. data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +227 -0
  25. data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +227 -0
  26. data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +227 -0
  27. data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +227 -0
  28. data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +227 -0
  29. data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +227 -0
  30. data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +227 -0
  31. data/lib/aspose-email-cloud/models/hierarchical_object.rb +101 -101
  32. data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +119 -119
  33. data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +117 -117
  34. data/lib/aspose-email-cloud/models/instant_messenger_address.rb +241 -0
  35. data/lib/aspose-email-cloud/models/linked_resource.rb +264 -0
  36. data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +211 -0
  37. data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +211 -0
  38. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +211 -0
  39. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +211 -0
  40. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +211 -0
  41. data/lib/aspose-email-cloud/models/mail_address.rb +241 -0
  42. data/lib/aspose-email-cloud/models/phone_number.rb +241 -0
  43. data/lib/aspose-email-cloud/models/postal_address.rb +350 -0
  44. data/lib/aspose-email-cloud/models/primitive_object.rb +99 -99
  45. data/lib/aspose-email-cloud/models/reminder_attendee.rb +210 -0
  46. data/lib/aspose-email-cloud/models/reminder_trigger.rb +246 -0
  47. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +75 -0
  48. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +75 -0
  49. data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +75 -0
  50. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +75 -0
  51. data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +83 -0
  52. data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +93 -0
  53. data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +91 -0
  54. data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +85 -0
  55. data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +81 -0
  56. data/lib/aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb +87 -0
  57. data/lib/aspose-email-cloud/models/requests/get_contact_model_request_data.rb +88 -0
  58. data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +88 -0
  59. data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +87 -0
  60. data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +88 -0
  61. data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +1 -1
  62. data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +105 -0
  63. data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +82 -0
  64. data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +89 -0
  65. data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +89 -0
  66. data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +75 -0
  67. data/lib/aspose-email-cloud/models/send_email_model_rq.rb +273 -0
  68. data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +222 -0
  69. data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +222 -0
  70. data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +222 -0
  71. data/lib/aspose-email-cloud/models/storage_model_rq_of_calendar_dto.rb +222 -0
  72. data/lib/aspose-email-cloud/models/storage_model_rq_of_contact_dto.rb +222 -0
  73. data/lib/aspose-email-cloud/models/storage_model_rq_of_email_dto.rb +222 -0
  74. data/lib/aspose-email-cloud/models/url.rb +241 -0
  75. data/lib/aspose-email-cloud/models/value_response.rb +1 -1
  76. data/lib/aspose-email-cloud/version.rb +1 -1
  77. metadata +67 -2
@@ -0,0 +1,75 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="ai_bcr_parse_model_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 ai_bcr_parse_model operation.
33
+ class AiBcrParseModelRequestData < EmailRequest
34
+
35
+ # Parse images to vCard document models
36
+ # @param [AiBcrBase64Rq] rq Request with base64 images data
37
+ def initialize(rq)
38
+ @rq = rq if rq
39
+ end
40
+
41
+ def to_http_info(api_client)
42
+ # verify the required parameter 'rq' is set
43
+ if api_client.config.client_side_validation && @rq.nil?
44
+ raise ArgumentError, "Missing the required parameter 'rq' when calling EmailApi.ai_bcr_parse_model"
45
+ end
46
+
47
+ # resource path
48
+ local_var_path = '/email/AiBcr/parse-model'
49
+
50
+ # query parameters
51
+ query_params = {}
52
+
53
+ # form parameters
54
+ form_params = {}
55
+
56
+ # http body (model)
57
+ post_body = api_client.object_to_http_body(@rq)
58
+ auth_names = ['JWT']
59
+
60
+ # header parameters
61
+ header_params = {}
62
+ # HTTP header 'Accept' (if needed)
63
+ header_params['Accept'] = select_header_accept(['application/json'])
64
+ # HTTP header 'Content-Type'
65
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
66
+
67
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
68
+ header_params,
69
+ query_params,
70
+ form_params,
71
+ post_body,
72
+ auth_names)
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,75 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="ai_bcr_parse_ocr_data_model_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 ai_bcr_parse_ocr_data_model operation.
33
+ class AiBcrParseOcrDataModelRequestData < EmailRequest
34
+
35
+ # Parse OCR data to vCard document models
36
+ # @param [AiBcrParseOcrDataRq] rq
37
+ def initialize(rq)
38
+ @rq = rq if rq
39
+ end
40
+
41
+ def to_http_info(api_client)
42
+ # verify the required parameter 'rq' is set
43
+ if api_client.config.client_side_validation && @rq.nil?
44
+ raise ArgumentError, "Missing the required parameter 'rq' when calling EmailApi.ai_bcr_parse_ocr_data_model"
45
+ end
46
+
47
+ # resource path
48
+ local_var_path = '/email/AiBcr/parse-ocr-data-model'
49
+
50
+ # query parameters
51
+ query_params = {}
52
+
53
+ # form parameters
54
+ form_params = {}
55
+
56
+ # http body (model)
57
+ post_body = api_client.object_to_http_body(@rq)
58
+ auth_names = ['JWT']
59
+
60
+ # header parameters
61
+ header_params = {}
62
+ # HTTP header 'Accept' (if needed)
63
+ header_params['Accept'] = select_header_accept(['application/json'])
64
+ # HTTP header 'Content-Type'
65
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
66
+
67
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
68
+ header_params,
69
+ query_params,
70
+ form_params,
71
+ post_body,
72
+ auth_names)
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,75 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="append_email_model_message_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 append_email_model_message operation.
33
+ class AppendEmailModelMessageRequestData < EmailRequest
34
+
35
+ # Adds an email from model to specified folder in email account
36
+ # @param [AppendEmailModelRq] rq Append email request
37
+ def initialize(rq)
38
+ @rq = rq if rq
39
+ end
40
+
41
+ def to_http_info(api_client)
42
+ # verify the required parameter 'rq' is set
43
+ if api_client.config.client_side_validation && @rq.nil?
44
+ raise ArgumentError, "Missing the required parameter 'rq' when calling EmailApi.append_email_model_message"
45
+ end
46
+
47
+ # resource path
48
+ local_var_path = '/email/client/AppendModel'
49
+
50
+ # query parameters
51
+ query_params = {}
52
+
53
+ # form parameters
54
+ form_params = {}
55
+
56
+ # http body (model)
57
+ post_body = api_client.object_to_http_body(@rq)
58
+ auth_names = ['JWT']
59
+
60
+ # header parameters
61
+ header_params = {}
62
+ # HTTP header 'Accept' (if needed)
63
+ header_params['Accept'] = select_header_accept(['application/json'])
64
+ # HTTP header 'Content-Type'
65
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
66
+
67
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
68
+ header_params,
69
+ query_params,
70
+ form_params,
71
+ post_body,
72
+ auth_names)
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,75 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="convert_calendar_model_to_alternate_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 convert_calendar_model_to_alternate operation.
33
+ class ConvertCalendarModelToAlternateRequestData < EmailRequest
34
+
35
+ # Convert iCalendar to AlternateView
36
+ # @param [CalendarDtoAlternateRq] rq iCalendar to AlternateView request
37
+ def initialize(rq)
38
+ @rq = rq if rq
39
+ end
40
+
41
+ def to_http_info(api_client)
42
+ # verify the required parameter 'rq' is set
43
+ if api_client.config.client_side_validation && @rq.nil?
44
+ raise ArgumentError, "Missing the required parameter 'rq' when calling EmailApi.convert_calendar_model_to_alternate"
45
+ end
46
+
47
+ # resource path
48
+ local_var_path = '/email/CalendarModel/as-alternate'
49
+
50
+ # query parameters
51
+ query_params = {}
52
+
53
+ # form parameters
54
+ form_params = {}
55
+
56
+ # http body (model)
57
+ post_body = api_client.object_to_http_body(@rq)
58
+ auth_names = ['JWT']
59
+
60
+ # header parameters
61
+ header_params = {}
62
+ # HTTP header 'Accept' (if needed)
63
+ header_params['Accept'] = select_header_accept(['application/json'])
64
+ # HTTP header 'Content-Type'
65
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
66
+
67
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
68
+ header_params,
69
+ query_params,
70
+ form_params,
71
+ post_body,
72
+ auth_names)
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,83 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="convert_email_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 convert_email operation.
33
+ class ConvertEmailRequestData < EmailRequest
34
+
35
+ # Converts email document to specified format and returns as file
36
+ # @param [String] format File format Enum, available values: Eml, Msg, MsgUnicode, Mhtml, Html
37
+ # @param [File] file File to upload
38
+ def initialize(format, file)
39
+ @format = format if format
40
+ @file = file if file
41
+ end
42
+
43
+ def to_http_info(api_client)
44
+ # verify the required parameter 'format' is set
45
+ if api_client.config.client_side_validation && @format.nil?
46
+ raise ArgumentError, "Missing the required parameter 'format' when calling EmailApi.convert_email"
47
+ end
48
+
49
+ # verify the required parameter 'file' is set
50
+ if api_client.config.client_side_validation && @file.nil?
51
+ raise ArgumentError, "Missing the required parameter 'file' when calling EmailApi.convert_email"
52
+ end
53
+
54
+ # resource path
55
+ local_var_path = '/email/convert/{format}'.sub('{' + 'format' + '}', @format.to_s)
56
+
57
+ # query parameters
58
+ query_params = {}
59
+
60
+ # form parameters
61
+ form_params = {}
62
+ form_params['File'] = @file
63
+
64
+ # http body (model)
65
+ post_body = nil
66
+ auth_names = ['JWT']
67
+
68
+ # header parameters
69
+ header_params = {}
70
+ # HTTP header 'Accept' (if needed)
71
+ header_params['Accept'] = select_header_accept(['application/json'])
72
+ # HTTP header 'Content-Type'
73
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
74
+
75
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
76
+ header_params,
77
+ query_params,
78
+ form_params,
79
+ post_body,
80
+ auth_names)
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,93 @@
1
+
2
+ # ----------------------------------------------------------------------------
3
+ # <copyright company="Aspose" file="fetch_email_model_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 fetch_email_model operation.
33
+ class FetchEmailModelRequestData < EmailRequest
34
+
35
+ # Fetch message model from email account
36
+ # @param [String] message_id Message identifier
37
+ # @param [String] first_account Email account
38
+ # @param [String] second_account Additional email account (should be specified for POP/IMAP accounts and should be SMTP account)
39
+ # @param [String] storage Storage name where account file(s) located
40
+ # @param [String] storage_folder Folder in storage where account file(s) located
41
+ def initialize(message_id, first_account, second_account = nil, storage = nil, storage_folder = nil)
42
+ @message_id = message_id if message_id
43
+ @first_account = first_account if first_account
44
+ @second_account = second_account if second_account
45
+ @storage = storage if storage
46
+ @storage_folder = storage_folder if storage_folder
47
+ end
48
+
49
+ def to_http_info(api_client)
50
+ # verify the required parameter 'message_id' is set
51
+ if api_client.config.client_side_validation && @message_id.nil?
52
+ raise ArgumentError, "Missing the required parameter 'message_id' when calling EmailApi.fetch_email_model"
53
+ end
54
+
55
+ # verify the required parameter 'first_account' is set
56
+ if api_client.config.client_side_validation && @first_account.nil?
57
+ raise ArgumentError, "Missing the required parameter 'first_account' when calling EmailApi.fetch_email_model"
58
+ end
59
+
60
+ # resource path
61
+ local_var_path = '/email/client/FetchModel'
62
+
63
+ # query parameters
64
+ query_params = {}
65
+ query_params[:messageId] = @message_id
66
+ query_params[:firstAccount] = @first_account
67
+ query_params[:secondAccount] = @second_account unless @second_account.nil?
68
+ query_params[:storage] = @storage unless @storage.nil?
69
+ query_params[:storageFolder] = @storage_folder unless @storage_folder.nil?
70
+
71
+ # form parameters
72
+ form_params = {}
73
+
74
+ # http body (model)
75
+ post_body = nil
76
+ auth_names = ['JWT']
77
+
78
+ # header parameters
79
+ header_params = {}
80
+ # HTTP header 'Accept' (if needed)
81
+ header_params['Accept'] = select_header_accept(['application/json'])
82
+ # HTTP header 'Content-Type'
83
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
84
+
85
+ AsposeEmailCloud::HttpRequest.new(local_var_path,
86
+ header_params,
87
+ query_params,
88
+ form_params,
89
+ post_body,
90
+ auth_names)
91
+ end
92
+ end
93
+ end