mailslurp_client 7.0.7 → 8.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client.rb +19 -3
- metadata +14 -345
- data/Gemfile +0 -9
- data/LICENSE +0 -22
- data/README.md +0 -226
- data/Rakefile +0 -10
- data/docs/AttachmentControllerApi.md +0 -124
- data/docs/AttachmentMetaData.md +0 -23
- data/docs/BasicAuthOptions.md +0 -19
- data/docs/BulkActionsControllerApi.md +0 -165
- data/docs/BulkSendEmailOptions.md +0 -19
- data/docs/CommonActionsControllerApi.md +0 -167
- data/docs/ContactControllerApi.md +0 -274
- data/docs/ContactDto.md +0 -31
- data/docs/ContactProjection.md +0 -27
- data/docs/CreateContactOptions.md +0 -31
- data/docs/CreateDomainOptions.md +0 -17
- data/docs/CreateGroupOptions.md +0 -19
- data/docs/CreateTemplateOptions.md +0 -19
- data/docs/CreateWebhookOptions.md +0 -21
- data/docs/DomainControllerApi.md +0 -223
- data/docs/DomainDto.md +0 -29
- data/docs/DomainPreview.md +0 -21
- data/docs/Email.md +0 -49
- data/docs/EmailAnalysis.md +0 -25
- data/docs/EmailControllerApi.md +0 -740
- data/docs/EmailPreview.md +0 -31
- data/docs/EmailProjection.md +0 -33
- data/docs/ForwardEmailOptions.md +0 -23
- data/docs/GroupContactsDto.md +0 -19
- data/docs/GroupControllerApi.md +0 -437
- data/docs/GroupDto.md +0 -23
- data/docs/GroupProjection.md +0 -23
- data/docs/HTMLValidationResult.md +0 -21
- data/docs/Inbox.md +0 -33
- data/docs/InboxControllerApi.md +0 -652
- data/docs/InboxProjection.md +0 -29
- data/docs/JsonNode.md +0 -59
- data/docs/MatchOption.md +0 -21
- data/docs/MatchOptions.md +0 -17
- data/docs/PageContactProjection.md +0 -37
- data/docs/PageEmailPreview.md +0 -37
- data/docs/PageEmailProjection.md +0 -37
- data/docs/PageGroupProjection.md +0 -37
- data/docs/PageInboxProjection.md +0 -37
- data/docs/PageTemplateProjection.md +0 -37
- data/docs/PageWebhookProjection.md +0 -37
- data/docs/Pageable.md +0 -27
- data/docs/RawEmailJson.md +0 -17
- data/docs/SendEmailOptions.md +0 -45
- data/docs/SetInboxFavouritedOptions.md +0 -17
- data/docs/Sort.md +0 -21
- data/docs/TemplateControllerApi.md +0 -274
- data/docs/TemplateDto.md +0 -25
- data/docs/TemplateProjection.md +0 -25
- data/docs/TemplateVariable.md +0 -19
- data/docs/UnreadCount.md +0 -17
- data/docs/UpdateGroupContacts.md +0 -17
- data/docs/UpdateInboxOptions.md +0 -25
- data/docs/UploadAttachmentOptions.md +0 -21
- data/docs/ValidationDto.md +0 -19
- data/docs/ValidationMessage.md +0 -19
- data/docs/WaitForConditions.md +0 -29
- data/docs/WaitForControllerApi.md +0 -317
- data/docs/WebhookControllerApi.md +0 -339
- data/docs/WebhookDto.md +0 -33
- data/docs/WebhookProjection.md +0 -27
- data/docs/WebhookTestRequest.md +0 -23
- data/docs/WebhookTestResponse.md +0 -19
- data/docs/WebhookTestResult.md +0 -21
- data/git_push.sh +0 -58
- data/lib/mailslurp_client/api/attachment_controller_api.rb +0 -157
- data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +0 -203
- data/lib/mailslurp_client/api/common_actions_controller_api.rb +0 -201
- data/lib/mailslurp_client/api/contact_controller_api.rb +0 -323
- data/lib/mailslurp_client/api/domain_controller_api.rb +0 -264
- data/lib/mailslurp_client/api/email_controller_api.rb +0 -852
- data/lib/mailslurp_client/api/group_controller_api.rb +0 -519
- data/lib/mailslurp_client/api/inbox_controller_api.rb +0 -763
- data/lib/mailslurp_client/api/template_controller_api.rb +0 -323
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +0 -359
- data/lib/mailslurp_client/api/webhook_controller_api.rb +0 -405
- data/lib/mailslurp_client/api_client.rb +0 -386
- data/lib/mailslurp_client/api_error.rb +0 -57
- data/lib/mailslurp_client/configuration.rb +0 -248
- data/lib/mailslurp_client/models/attachment_meta_data.rb +0 -253
- data/lib/mailslurp_client/models/basic_auth_options.rb +0 -226
- data/lib/mailslurp_client/models/bulk_send_email_options.rb +0 -224
- data/lib/mailslurp_client/models/contact_dto.rb +0 -288
- data/lib/mailslurp_client/models/contact_projection.rb +0 -261
- data/lib/mailslurp_client/models/create_contact_options.rb +0 -277
- data/lib/mailslurp_client/models/create_domain_options.rb +0 -208
- data/lib/mailslurp_client/models/create_group_options.rb +0 -220
- data/lib/mailslurp_client/models/create_template_options.rb +0 -225
- data/lib/mailslurp_client/models/create_webhook_options.rb +0 -227
- data/lib/mailslurp_client/models/domain_dto.rb +0 -296
- data/lib/mailslurp_client/models/domain_preview.rb +0 -240
- data/lib/mailslurp_client/models/email.rb +0 -376
- data/lib/mailslurp_client/models/email_analysis.rb +0 -243
- data/lib/mailslurp_client/models/email_preview.rb +0 -286
- data/lib/mailslurp_client/models/email_projection.rb +0 -306
- data/lib/mailslurp_client/models/forward_email_options.rb +0 -245
- data/lib/mailslurp_client/models/group_contacts_dto.rb +0 -227
- data/lib/mailslurp_client/models/group_dto.rb +0 -248
- data/lib/mailslurp_client/models/group_projection.rb +0 -248
- data/lib/mailslurp_client/models/html_validation_result.rb +0 -243
- data/lib/mailslurp_client/models/inbox.rb +0 -290
- data/lib/mailslurp_client/models/inbox_projection.rb +0 -272
- data/lib/mailslurp_client/models/json_node.rb +0 -429
- data/lib/mailslurp_client/models/match_option.rb +0 -274
- data/lib/mailslurp_client/models/match_options.rb +0 -210
- data/lib/mailslurp_client/models/page_contact_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_email_preview.rb +0 -298
- data/lib/mailslurp_client/models/page_email_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_group_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_inbox_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_template_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_webhook_projection.rb +0 -298
- data/lib/mailslurp_client/models/pageable.rb +0 -251
- data/lib/mailslurp_client/models/raw_email_json.rb +0 -211
- data/lib/mailslurp_client/models/send_email_options.rb +0 -392
- data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +0 -208
- data/lib/mailslurp_client/models/sort.rb +0 -224
- data/lib/mailslurp_client/models/template_dto.rb +0 -269
- data/lib/mailslurp_client/models/template_projection.rb +0 -269
- data/lib/mailslurp_client/models/template_variable.rb +0 -259
- data/lib/mailslurp_client/models/unread_count.rb +0 -211
- data/lib/mailslurp_client/models/update_group_contacts.rb +0 -213
- data/lib/mailslurp_client/models/update_inbox_options.rb +0 -250
- data/lib/mailslurp_client/models/upload_attachment_options.rb +0 -228
- data/lib/mailslurp_client/models/validation_dto.rb +0 -225
- data/lib/mailslurp_client/models/validation_message.rb +0 -220
- data/lib/mailslurp_client/models/wait_for_conditions.rb +0 -315
- data/lib/mailslurp_client/models/webhook_dto.rb +0 -326
- data/lib/mailslurp_client/models/webhook_projection.rb +0 -277
- data/lib/mailslurp_client/models/webhook_test_request.rb +0 -284
- data/lib/mailslurp_client/models/webhook_test_response.rb +0 -215
- data/lib/mailslurp_client/models/webhook_test_result.rb +0 -235
- data/lib/mailslurp_client/version.rb +0 -15
- data/mailslurp_client.gemspec +0 -39
- data/spec/api/attachment_controller_api_spec.rb +0 -61
- data/spec/api/bulk_actions_controller_api_spec.rb +0 -68
- data/spec/api/common_actions_controller_api_spec.rb +0 -129
- data/spec/api/contact_controller_api_spec.rb +0 -91
- data/spec/api/domain_controller_api_spec.rb +0 -82
- data/spec/api/email_controller_api_spec.rb +0 -162
- data/spec/api/group_controller_api_spec.rb +0 -126
- data/spec/api/inbox_controller_api_spec.rb +0 -172
- data/spec/api/template_controller_api_spec.rb +0 -91
- data/spec/api/wait_for_controller_api_spec.rb +0 -107
- data/spec/api/webhook_controller_api_spec.rb +0 -107
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/attachment_meta_data_spec.rb +0 -59
- data/spec/models/basic_auth_options_spec.rb +0 -47
- data/spec/models/bulk_send_email_options_spec.rb +0 -47
- data/spec/models/contact_dto_spec.rb +0 -83
- data/spec/models/contact_projection_spec.rb +0 -71
- data/spec/models/create_contact_options_spec.rb +0 -83
- data/spec/models/create_domain_options_spec.rb +0 -41
- data/spec/models/create_group_options_spec.rb +0 -47
- data/spec/models/create_template_options_spec.rb +0 -47
- data/spec/models/create_webhook_options_spec.rb +0 -53
- data/spec/models/domain_dto_spec.rb +0 -77
- data/spec/models/domain_preview_spec.rb +0 -53
- data/spec/models/email_analysis_spec.rb +0 -65
- data/spec/models/email_preview_spec.rb +0 -83
- data/spec/models/email_projection_spec.rb +0 -89
- data/spec/models/email_spec.rb +0 -137
- data/spec/models/forward_email_options_spec.rb +0 -59
- data/spec/models/group_contacts_dto_spec.rb +0 -47
- data/spec/models/group_dto_spec.rb +0 -59
- data/spec/models/group_projection_spec.rb +0 -59
- data/spec/models/html_validation_result_spec.rb +0 -53
- data/spec/models/inbox_projection_spec.rb +0 -77
- data/spec/models/inbox_spec.rb +0 -89
- data/spec/models/json_node_spec.rb +0 -171
- data/spec/models/match_option_spec.rb +0 -61
- data/spec/models/match_options_spec.rb +0 -41
- data/spec/models/page_contact_projection_spec.rb +0 -101
- data/spec/models/page_email_preview_spec.rb +0 -101
- data/spec/models/page_email_projection_spec.rb +0 -101
- data/spec/models/page_group_projection_spec.rb +0 -101
- data/spec/models/page_inbox_projection_spec.rb +0 -101
- data/spec/models/page_template_projection_spec.rb +0 -101
- data/spec/models/page_webhook_projection_spec.rb +0 -101
- data/spec/models/pageable_spec.rb +0 -71
- data/spec/models/raw_email_json_spec.rb +0 -41
- data/spec/models/send_email_options_spec.rb +0 -129
- data/spec/models/set_inbox_favourited_options_spec.rb +0 -41
- data/spec/models/sort_spec.rb +0 -53
- data/spec/models/template_dto_spec.rb +0 -65
- data/spec/models/template_projection_spec.rb +0 -65
- data/spec/models/template_variable_spec.rb +0 -51
- data/spec/models/unread_count_spec.rb +0 -41
- data/spec/models/update_group_contacts_spec.rb +0 -41
- data/spec/models/update_inbox_options_spec.rb +0 -65
- data/spec/models/upload_attachment_options_spec.rb +0 -53
- data/spec/models/validation_dto_spec.rb +0 -47
- data/spec/models/validation_message_spec.rb +0 -47
- data/spec/models/wait_for_conditions_spec.rb +0 -85
- data/spec/models/webhook_dto_spec.rb +0 -93
- data/spec/models/webhook_projection_spec.rb +0 -71
- data/spec/models/webhook_test_request_spec.rb +0 -63
- data/spec/models/webhook_test_response_spec.rb +0 -47
- data/spec/models/webhook_test_result_spec.rb +0 -53
- data/spec/spec_helper.rb +0 -111
@@ -1,852 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#MailSlurp API
|
3
|
-
|
4
|
-
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 67c9a1eda264be4cfe0bb2c76151f0aadf0862bc
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'cgi'
|
14
|
-
|
15
|
-
module MailSlurpClient
|
16
|
-
class EmailControllerApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
# Delete all emails
|
23
|
-
# Deletes all emails in your account. Be careful as emails cannot be recovered
|
24
|
-
# @param [Hash] opts the optional parameters
|
25
|
-
# @return [nil]
|
26
|
-
def delete_all_emails(opts = {})
|
27
|
-
delete_all_emails_with_http_info(opts)
|
28
|
-
nil
|
29
|
-
end
|
30
|
-
|
31
|
-
# Delete all emails
|
32
|
-
# Deletes all emails in your account. Be careful as emails cannot be recovered
|
33
|
-
# @param [Hash] opts the optional parameters
|
34
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
35
|
-
def delete_all_emails_with_http_info(opts = {})
|
36
|
-
if @api_client.config.debugging
|
37
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.delete_all_emails ...'
|
38
|
-
end
|
39
|
-
# resource path
|
40
|
-
local_var_path = '/emails'
|
41
|
-
|
42
|
-
# query parameters
|
43
|
-
query_params = opts[:query_params] || {}
|
44
|
-
|
45
|
-
# header parameters
|
46
|
-
header_params = opts[:header_params] || {}
|
47
|
-
|
48
|
-
# form parameters
|
49
|
-
form_params = opts[:form_params] || {}
|
50
|
-
|
51
|
-
# http body (model)
|
52
|
-
post_body = opts[:body]
|
53
|
-
|
54
|
-
# return_type
|
55
|
-
return_type = opts[:return_type]
|
56
|
-
|
57
|
-
# auth_names
|
58
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
59
|
-
|
60
|
-
new_options = opts.merge(
|
61
|
-
:header_params => header_params,
|
62
|
-
:query_params => query_params,
|
63
|
-
:form_params => form_params,
|
64
|
-
:body => post_body,
|
65
|
-
:auth_names => auth_names,
|
66
|
-
:return_type => return_type
|
67
|
-
)
|
68
|
-
|
69
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
70
|
-
if @api_client.config.debugging
|
71
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#delete_all_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
72
|
-
end
|
73
|
-
return data, status_code, headers
|
74
|
-
end
|
75
|
-
|
76
|
-
# Delete an email
|
77
|
-
# Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
|
78
|
-
# @param email_id [String] emailId
|
79
|
-
# @param [Hash] opts the optional parameters
|
80
|
-
# @return [nil]
|
81
|
-
def delete_email(email_id, opts = {})
|
82
|
-
delete_email_with_http_info(email_id, opts)
|
83
|
-
nil
|
84
|
-
end
|
85
|
-
|
86
|
-
# Delete an email
|
87
|
-
# Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
|
88
|
-
# @param email_id [String] emailId
|
89
|
-
# @param [Hash] opts the optional parameters
|
90
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
91
|
-
def delete_email_with_http_info(email_id, opts = {})
|
92
|
-
if @api_client.config.debugging
|
93
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.delete_email ...'
|
94
|
-
end
|
95
|
-
# verify the required parameter 'email_id' is set
|
96
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
97
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.delete_email"
|
98
|
-
end
|
99
|
-
# resource path
|
100
|
-
local_var_path = '/emails/{emailId}'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
101
|
-
|
102
|
-
# query parameters
|
103
|
-
query_params = opts[:query_params] || {}
|
104
|
-
|
105
|
-
# header parameters
|
106
|
-
header_params = opts[:header_params] || {}
|
107
|
-
|
108
|
-
# form parameters
|
109
|
-
form_params = opts[:form_params] || {}
|
110
|
-
|
111
|
-
# http body (model)
|
112
|
-
post_body = opts[:body]
|
113
|
-
|
114
|
-
# return_type
|
115
|
-
return_type = opts[:return_type]
|
116
|
-
|
117
|
-
# auth_names
|
118
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
119
|
-
|
120
|
-
new_options = opts.merge(
|
121
|
-
:header_params => header_params,
|
122
|
-
:query_params => query_params,
|
123
|
-
:form_params => form_params,
|
124
|
-
:body => post_body,
|
125
|
-
:auth_names => auth_names,
|
126
|
-
:return_type => return_type
|
127
|
-
)
|
128
|
-
|
129
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
130
|
-
if @api_client.config.debugging
|
131
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#delete_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
132
|
-
end
|
133
|
-
return data, status_code, headers
|
134
|
-
end
|
135
|
-
|
136
|
-
# Get email attachment bytes
|
137
|
-
# Returns the specified attachment for a given email as a byte stream (file download). You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
|
138
|
-
# @param attachment_id [String] attachmentId
|
139
|
-
# @param email_id [String] emailId
|
140
|
-
# @param [Hash] opts the optional parameters
|
141
|
-
# @option opts [String] :api_key Can pass apiKey in url for this request if you wish to download the file in a browser
|
142
|
-
# @return [String]
|
143
|
-
def download_attachment(attachment_id, email_id, opts = {})
|
144
|
-
data, _status_code, _headers = download_attachment_with_http_info(attachment_id, email_id, opts)
|
145
|
-
data
|
146
|
-
end
|
147
|
-
|
148
|
-
# Get email attachment bytes
|
149
|
-
# Returns the specified attachment for a given email as a byte stream (file download). You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
|
150
|
-
# @param attachment_id [String] attachmentId
|
151
|
-
# @param email_id [String] emailId
|
152
|
-
# @param [Hash] opts the optional parameters
|
153
|
-
# @option opts [String] :api_key Can pass apiKey in url for this request if you wish to download the file in a browser
|
154
|
-
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
155
|
-
def download_attachment_with_http_info(attachment_id, email_id, opts = {})
|
156
|
-
if @api_client.config.debugging
|
157
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.download_attachment ...'
|
158
|
-
end
|
159
|
-
# verify the required parameter 'attachment_id' is set
|
160
|
-
if @api_client.config.client_side_validation && attachment_id.nil?
|
161
|
-
fail ArgumentError, "Missing the required parameter 'attachment_id' when calling EmailControllerApi.download_attachment"
|
162
|
-
end
|
163
|
-
# verify the required parameter 'email_id' is set
|
164
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
165
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.download_attachment"
|
166
|
-
end
|
167
|
-
# resource path
|
168
|
-
local_var_path = '/emails/{emailId}/attachments/{attachmentId}'.sub('{' + 'attachmentId' + '}', CGI.escape(attachment_id.to_s)).sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
169
|
-
|
170
|
-
# query parameters
|
171
|
-
query_params = opts[:query_params] || {}
|
172
|
-
query_params[:'apiKey'] = opts[:'api_key'] if !opts[:'api_key'].nil?
|
173
|
-
|
174
|
-
# header parameters
|
175
|
-
header_params = opts[:header_params] || {}
|
176
|
-
# HTTP header 'Accept' (if needed)
|
177
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
178
|
-
|
179
|
-
# form parameters
|
180
|
-
form_params = opts[:form_params] || {}
|
181
|
-
|
182
|
-
# http body (model)
|
183
|
-
post_body = opts[:body]
|
184
|
-
|
185
|
-
# return_type
|
186
|
-
return_type = opts[:return_type] || 'String'
|
187
|
-
|
188
|
-
# auth_names
|
189
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
190
|
-
|
191
|
-
new_options = opts.merge(
|
192
|
-
:header_params => header_params,
|
193
|
-
:query_params => query_params,
|
194
|
-
:form_params => form_params,
|
195
|
-
:body => post_body,
|
196
|
-
:auth_names => auth_names,
|
197
|
-
:return_type => return_type
|
198
|
-
)
|
199
|
-
|
200
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
201
|
-
if @api_client.config.debugging
|
202
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#download_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
203
|
-
end
|
204
|
-
return data, status_code, headers
|
205
|
-
end
|
206
|
-
|
207
|
-
# Forward email
|
208
|
-
# Forward an existing email to new recipients.
|
209
|
-
# @param email_id [String] emailId
|
210
|
-
# @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
|
211
|
-
# @param [Hash] opts the optional parameters
|
212
|
-
# @return [nil]
|
213
|
-
def forward_email(email_id, forward_email_options, opts = {})
|
214
|
-
forward_email_with_http_info(email_id, forward_email_options, opts)
|
215
|
-
nil
|
216
|
-
end
|
217
|
-
|
218
|
-
# Forward email
|
219
|
-
# Forward an existing email to new recipients.
|
220
|
-
# @param email_id [String] emailId
|
221
|
-
# @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
|
222
|
-
# @param [Hash] opts the optional parameters
|
223
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
224
|
-
def forward_email_with_http_info(email_id, forward_email_options, opts = {})
|
225
|
-
if @api_client.config.debugging
|
226
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.forward_email ...'
|
227
|
-
end
|
228
|
-
# verify the required parameter 'email_id' is set
|
229
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
230
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.forward_email"
|
231
|
-
end
|
232
|
-
# verify the required parameter 'forward_email_options' is set
|
233
|
-
if @api_client.config.client_side_validation && forward_email_options.nil?
|
234
|
-
fail ArgumentError, "Missing the required parameter 'forward_email_options' when calling EmailControllerApi.forward_email"
|
235
|
-
end
|
236
|
-
# resource path
|
237
|
-
local_var_path = '/emails/{emailId}/forward'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
238
|
-
|
239
|
-
# query parameters
|
240
|
-
query_params = opts[:query_params] || {}
|
241
|
-
|
242
|
-
# header parameters
|
243
|
-
header_params = opts[:header_params] || {}
|
244
|
-
# HTTP header 'Content-Type'
|
245
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
246
|
-
|
247
|
-
# form parameters
|
248
|
-
form_params = opts[:form_params] || {}
|
249
|
-
|
250
|
-
# http body (model)
|
251
|
-
post_body = opts[:body] || @api_client.object_to_http_body(forward_email_options)
|
252
|
-
|
253
|
-
# return_type
|
254
|
-
return_type = opts[:return_type]
|
255
|
-
|
256
|
-
# auth_names
|
257
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
258
|
-
|
259
|
-
new_options = opts.merge(
|
260
|
-
:header_params => header_params,
|
261
|
-
:query_params => query_params,
|
262
|
-
:form_params => form_params,
|
263
|
-
:body => post_body,
|
264
|
-
:auth_names => auth_names,
|
265
|
-
:return_type => return_type
|
266
|
-
)
|
267
|
-
|
268
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
269
|
-
if @api_client.config.debugging
|
270
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#forward_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
271
|
-
end
|
272
|
-
return data, status_code, headers
|
273
|
-
end
|
274
|
-
|
275
|
-
# Get email attachment metadata
|
276
|
-
# Returns the metadata such as name and content-type for a given attachment and email.
|
277
|
-
# @param attachment_id [String] attachmentId
|
278
|
-
# @param email_id [String] emailId
|
279
|
-
# @param [Hash] opts the optional parameters
|
280
|
-
# @return [AttachmentMetaData]
|
281
|
-
def get_attachment_meta_data(attachment_id, email_id, opts = {})
|
282
|
-
data, _status_code, _headers = get_attachment_meta_data_with_http_info(attachment_id, email_id, opts)
|
283
|
-
data
|
284
|
-
end
|
285
|
-
|
286
|
-
# Get email attachment metadata
|
287
|
-
# Returns the metadata such as name and content-type for a given attachment and email.
|
288
|
-
# @param attachment_id [String] attachmentId
|
289
|
-
# @param email_id [String] emailId
|
290
|
-
# @param [Hash] opts the optional parameters
|
291
|
-
# @return [Array<(AttachmentMetaData, Integer, Hash)>] AttachmentMetaData data, response status code and response headers
|
292
|
-
def get_attachment_meta_data_with_http_info(attachment_id, email_id, opts = {})
|
293
|
-
if @api_client.config.debugging
|
294
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_attachment_meta_data ...'
|
295
|
-
end
|
296
|
-
# verify the required parameter 'attachment_id' is set
|
297
|
-
if @api_client.config.client_side_validation && attachment_id.nil?
|
298
|
-
fail ArgumentError, "Missing the required parameter 'attachment_id' when calling EmailControllerApi.get_attachment_meta_data"
|
299
|
-
end
|
300
|
-
# verify the required parameter 'email_id' is set
|
301
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
302
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_attachment_meta_data"
|
303
|
-
end
|
304
|
-
# resource path
|
305
|
-
local_var_path = '/emails/{emailId}/attachments/{attachmentId}/metadata'.sub('{' + 'attachmentId' + '}', CGI.escape(attachment_id.to_s)).sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
306
|
-
|
307
|
-
# query parameters
|
308
|
-
query_params = opts[:query_params] || {}
|
309
|
-
|
310
|
-
# header parameters
|
311
|
-
header_params = opts[:header_params] || {}
|
312
|
-
# HTTP header 'Accept' (if needed)
|
313
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
314
|
-
|
315
|
-
# form parameters
|
316
|
-
form_params = opts[:form_params] || {}
|
317
|
-
|
318
|
-
# http body (model)
|
319
|
-
post_body = opts[:body]
|
320
|
-
|
321
|
-
# return_type
|
322
|
-
return_type = opts[:return_type] || 'AttachmentMetaData'
|
323
|
-
|
324
|
-
# auth_names
|
325
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
326
|
-
|
327
|
-
new_options = opts.merge(
|
328
|
-
:header_params => header_params,
|
329
|
-
:query_params => query_params,
|
330
|
-
:form_params => form_params,
|
331
|
-
:body => post_body,
|
332
|
-
:auth_names => auth_names,
|
333
|
-
:return_type => return_type
|
334
|
-
)
|
335
|
-
|
336
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
337
|
-
if @api_client.config.debugging
|
338
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#get_attachment_meta_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
339
|
-
end
|
340
|
-
return data, status_code, headers
|
341
|
-
end
|
342
|
-
|
343
|
-
# Get all email attachment metadata
|
344
|
-
# Returns an array of attachment metadata such as name and content-type for a given email if present.
|
345
|
-
# @param email_id [String] emailId
|
346
|
-
# @param [Hash] opts the optional parameters
|
347
|
-
# @return [Array<AttachmentMetaData>]
|
348
|
-
def get_attachments(email_id, opts = {})
|
349
|
-
data, _status_code, _headers = get_attachments_with_http_info(email_id, opts)
|
350
|
-
data
|
351
|
-
end
|
352
|
-
|
353
|
-
# Get all email attachment metadata
|
354
|
-
# Returns an array of attachment metadata such as name and content-type for a given email if present.
|
355
|
-
# @param email_id [String] emailId
|
356
|
-
# @param [Hash] opts the optional parameters
|
357
|
-
# @return [Array<(Array<AttachmentMetaData>, Integer, Hash)>] Array<AttachmentMetaData> data, response status code and response headers
|
358
|
-
def get_attachments_with_http_info(email_id, opts = {})
|
359
|
-
if @api_client.config.debugging
|
360
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_attachments ...'
|
361
|
-
end
|
362
|
-
# verify the required parameter 'email_id' is set
|
363
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
364
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_attachments"
|
365
|
-
end
|
366
|
-
# resource path
|
367
|
-
local_var_path = '/emails/{emailId}/attachments'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
368
|
-
|
369
|
-
# query parameters
|
370
|
-
query_params = opts[:query_params] || {}
|
371
|
-
|
372
|
-
# header parameters
|
373
|
-
header_params = opts[:header_params] || {}
|
374
|
-
# HTTP header 'Accept' (if needed)
|
375
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
376
|
-
|
377
|
-
# form parameters
|
378
|
-
form_params = opts[:form_params] || {}
|
379
|
-
|
380
|
-
# http body (model)
|
381
|
-
post_body = opts[:body]
|
382
|
-
|
383
|
-
# return_type
|
384
|
-
return_type = opts[:return_type] || 'Array<AttachmentMetaData>'
|
385
|
-
|
386
|
-
# auth_names
|
387
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
388
|
-
|
389
|
-
new_options = opts.merge(
|
390
|
-
:header_params => header_params,
|
391
|
-
:query_params => query_params,
|
392
|
-
:form_params => form_params,
|
393
|
-
:body => post_body,
|
394
|
-
:auth_names => auth_names,
|
395
|
-
:return_type => return_type
|
396
|
-
)
|
397
|
-
|
398
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
399
|
-
if @api_client.config.debugging
|
400
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#get_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
401
|
-
end
|
402
|
-
return data, status_code, headers
|
403
|
-
end
|
404
|
-
|
405
|
-
# Get email content
|
406
|
-
# Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
|
407
|
-
# @param email_id [String] emailId
|
408
|
-
# @param [Hash] opts the optional parameters
|
409
|
-
# @option opts [Boolean] :decode Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (default to false)
|
410
|
-
# @return [Email]
|
411
|
-
def get_email(email_id, opts = {})
|
412
|
-
data, _status_code, _headers = get_email_with_http_info(email_id, opts)
|
413
|
-
data
|
414
|
-
end
|
415
|
-
|
416
|
-
# Get email content
|
417
|
-
# Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
|
418
|
-
# @param email_id [String] emailId
|
419
|
-
# @param [Hash] opts the optional parameters
|
420
|
-
# @option opts [Boolean] :decode Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing
|
421
|
-
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
422
|
-
def get_email_with_http_info(email_id, opts = {})
|
423
|
-
if @api_client.config.debugging
|
424
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email ...'
|
425
|
-
end
|
426
|
-
# verify the required parameter 'email_id' is set
|
427
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
428
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email"
|
429
|
-
end
|
430
|
-
# resource path
|
431
|
-
local_var_path = '/emails/{emailId}'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
432
|
-
|
433
|
-
# query parameters
|
434
|
-
query_params = opts[:query_params] || {}
|
435
|
-
query_params[:'decode'] = opts[:'decode'] if !opts[:'decode'].nil?
|
436
|
-
|
437
|
-
# header parameters
|
438
|
-
header_params = opts[:header_params] || {}
|
439
|
-
# HTTP header 'Accept' (if needed)
|
440
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
441
|
-
|
442
|
-
# form parameters
|
443
|
-
form_params = opts[:form_params] || {}
|
444
|
-
|
445
|
-
# http body (model)
|
446
|
-
post_body = opts[:body]
|
447
|
-
|
448
|
-
# return_type
|
449
|
-
return_type = opts[:return_type] || 'Email'
|
450
|
-
|
451
|
-
# auth_names
|
452
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
453
|
-
|
454
|
-
new_options = opts.merge(
|
455
|
-
:header_params => header_params,
|
456
|
-
:query_params => query_params,
|
457
|
-
:form_params => form_params,
|
458
|
-
:body => post_body,
|
459
|
-
:auth_names => auth_names,
|
460
|
-
:return_type => return_type
|
461
|
-
)
|
462
|
-
|
463
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
464
|
-
if @api_client.config.debugging
|
465
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#get_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
466
|
-
end
|
467
|
-
return data, status_code, headers
|
468
|
-
end
|
469
|
-
|
470
|
-
# Get email content as HTML
|
471
|
-
# Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`
|
472
|
-
# @param email_id [String] emailId
|
473
|
-
# @param [Hash] opts the optional parameters
|
474
|
-
# @option opts [Boolean] :decode decode (default to false)
|
475
|
-
# @return [String]
|
476
|
-
def get_email_html(email_id, opts = {})
|
477
|
-
data, _status_code, _headers = get_email_html_with_http_info(email_id, opts)
|
478
|
-
data
|
479
|
-
end
|
480
|
-
|
481
|
-
# Get email content as HTML
|
482
|
-
# Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`
|
483
|
-
# @param email_id [String] emailId
|
484
|
-
# @param [Hash] opts the optional parameters
|
485
|
-
# @option opts [Boolean] :decode decode
|
486
|
-
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
487
|
-
def get_email_html_with_http_info(email_id, opts = {})
|
488
|
-
if @api_client.config.debugging
|
489
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_html ...'
|
490
|
-
end
|
491
|
-
# verify the required parameter 'email_id' is set
|
492
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
493
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_html"
|
494
|
-
end
|
495
|
-
# resource path
|
496
|
-
local_var_path = '/emails/{emailId}/html'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
497
|
-
|
498
|
-
# query parameters
|
499
|
-
query_params = opts[:query_params] || {}
|
500
|
-
query_params[:'decode'] = opts[:'decode'] if !opts[:'decode'].nil?
|
501
|
-
|
502
|
-
# header parameters
|
503
|
-
header_params = opts[:header_params] || {}
|
504
|
-
# HTTP header 'Accept' (if needed)
|
505
|
-
header_params['Accept'] = @api_client.select_header_accept(['text/html'])
|
506
|
-
|
507
|
-
# form parameters
|
508
|
-
form_params = opts[:form_params] || {}
|
509
|
-
|
510
|
-
# http body (model)
|
511
|
-
post_body = opts[:body]
|
512
|
-
|
513
|
-
# return_type
|
514
|
-
return_type = opts[:return_type] || 'String'
|
515
|
-
|
516
|
-
# auth_names
|
517
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
518
|
-
|
519
|
-
new_options = opts.merge(
|
520
|
-
:header_params => header_params,
|
521
|
-
:query_params => query_params,
|
522
|
-
:form_params => form_params,
|
523
|
-
:body => post_body,
|
524
|
-
:auth_names => auth_names,
|
525
|
-
:return_type => return_type
|
526
|
-
)
|
527
|
-
|
528
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
529
|
-
if @api_client.config.debugging
|
530
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#get_email_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
531
|
-
end
|
532
|
-
return data, status_code, headers
|
533
|
-
end
|
534
|
-
|
535
|
-
# Get all emails
|
536
|
-
# By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
|
537
|
-
# @param [Hash] opts the optional parameters
|
538
|
-
# @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
|
539
|
-
# @option opts [Integer] :page Optional page index in email list pagination (default to 0)
|
540
|
-
# @option opts [Integer] :size Optional page size in email list pagination (default to 20)
|
541
|
-
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
542
|
-
# @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (default to false)
|
543
|
-
# @return [PageEmailProjection]
|
544
|
-
def get_emails_paginated(opts = {})
|
545
|
-
data, _status_code, _headers = get_emails_paginated_with_http_info(opts)
|
546
|
-
data
|
547
|
-
end
|
548
|
-
|
549
|
-
# Get all emails
|
550
|
-
# By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
|
551
|
-
# @param [Hash] opts the optional parameters
|
552
|
-
# @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
|
553
|
-
# @option opts [Integer] :page Optional page index in email list pagination
|
554
|
-
# @option opts [Integer] :size Optional page size in email list pagination
|
555
|
-
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
556
|
-
# @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
|
557
|
-
# @return [Array<(PageEmailProjection, Integer, Hash)>] PageEmailProjection data, response status code and response headers
|
558
|
-
def get_emails_paginated_with_http_info(opts = {})
|
559
|
-
if @api_client.config.debugging
|
560
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_emails_paginated ...'
|
561
|
-
end
|
562
|
-
allowable_values = ["ASC", "DESC"]
|
563
|
-
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
564
|
-
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
565
|
-
end
|
566
|
-
# resource path
|
567
|
-
local_var_path = '/emails'
|
568
|
-
|
569
|
-
# query parameters
|
570
|
-
query_params = opts[:query_params] || {}
|
571
|
-
query_params[:'inboxId'] = @api_client.build_collection_param(opts[:'inbox_id'], :multi) if !opts[:'inbox_id'].nil?
|
572
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
573
|
-
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
574
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
575
|
-
query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
|
576
|
-
|
577
|
-
# header parameters
|
578
|
-
header_params = opts[:header_params] || {}
|
579
|
-
# HTTP header 'Accept' (if needed)
|
580
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
581
|
-
|
582
|
-
# form parameters
|
583
|
-
form_params = opts[:form_params] || {}
|
584
|
-
|
585
|
-
# http body (model)
|
586
|
-
post_body = opts[:body]
|
587
|
-
|
588
|
-
# return_type
|
589
|
-
return_type = opts[:return_type] || 'PageEmailProjection'
|
590
|
-
|
591
|
-
# auth_names
|
592
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
593
|
-
|
594
|
-
new_options = opts.merge(
|
595
|
-
:header_params => header_params,
|
596
|
-
:query_params => query_params,
|
597
|
-
:form_params => form_params,
|
598
|
-
:body => post_body,
|
599
|
-
:auth_names => auth_names,
|
600
|
-
:return_type => return_type
|
601
|
-
)
|
602
|
-
|
603
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
604
|
-
if @api_client.config.debugging
|
605
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#get_emails_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
606
|
-
end
|
607
|
-
return data, status_code, headers
|
608
|
-
end
|
609
|
-
|
610
|
-
# Get raw email string
|
611
|
-
# Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
|
612
|
-
# @param email_id [String] emailId
|
613
|
-
# @param [Hash] opts the optional parameters
|
614
|
-
# @return [String]
|
615
|
-
def get_raw_email_contents(email_id, opts = {})
|
616
|
-
data, _status_code, _headers = get_raw_email_contents_with_http_info(email_id, opts)
|
617
|
-
data
|
618
|
-
end
|
619
|
-
|
620
|
-
# Get raw email string
|
621
|
-
# Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
|
622
|
-
# @param email_id [String] emailId
|
623
|
-
# @param [Hash] opts the optional parameters
|
624
|
-
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
625
|
-
def get_raw_email_contents_with_http_info(email_id, opts = {})
|
626
|
-
if @api_client.config.debugging
|
627
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_raw_email_contents ...'
|
628
|
-
end
|
629
|
-
# verify the required parameter 'email_id' is set
|
630
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
631
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_raw_email_contents"
|
632
|
-
end
|
633
|
-
# resource path
|
634
|
-
local_var_path = '/emails/{emailId}/raw'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
635
|
-
|
636
|
-
# query parameters
|
637
|
-
query_params = opts[:query_params] || {}
|
638
|
-
|
639
|
-
# header parameters
|
640
|
-
header_params = opts[:header_params] || {}
|
641
|
-
# HTTP header 'Accept' (if needed)
|
642
|
-
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
643
|
-
|
644
|
-
# form parameters
|
645
|
-
form_params = opts[:form_params] || {}
|
646
|
-
|
647
|
-
# http body (model)
|
648
|
-
post_body = opts[:body]
|
649
|
-
|
650
|
-
# return_type
|
651
|
-
return_type = opts[:return_type] || 'String'
|
652
|
-
|
653
|
-
# auth_names
|
654
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
655
|
-
|
656
|
-
new_options = opts.merge(
|
657
|
-
:header_params => header_params,
|
658
|
-
:query_params => query_params,
|
659
|
-
:form_params => form_params,
|
660
|
-
:body => post_body,
|
661
|
-
:auth_names => auth_names,
|
662
|
-
:return_type => return_type
|
663
|
-
)
|
664
|
-
|
665
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
666
|
-
if @api_client.config.debugging
|
667
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#get_raw_email_contents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
668
|
-
end
|
669
|
-
return data, status_code, headers
|
670
|
-
end
|
671
|
-
|
672
|
-
# Get raw email in JSON
|
673
|
-
# Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
|
674
|
-
# @param email_id [String] emailId
|
675
|
-
# @param [Hash] opts the optional parameters
|
676
|
-
# @return [RawEmailJson]
|
677
|
-
def get_raw_email_json(email_id, opts = {})
|
678
|
-
data, _status_code, _headers = get_raw_email_json_with_http_info(email_id, opts)
|
679
|
-
data
|
680
|
-
end
|
681
|
-
|
682
|
-
# Get raw email in JSON
|
683
|
-
# Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
|
684
|
-
# @param email_id [String] emailId
|
685
|
-
# @param [Hash] opts the optional parameters
|
686
|
-
# @return [Array<(RawEmailJson, Integer, Hash)>] RawEmailJson data, response status code and response headers
|
687
|
-
def get_raw_email_json_with_http_info(email_id, opts = {})
|
688
|
-
if @api_client.config.debugging
|
689
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_raw_email_json ...'
|
690
|
-
end
|
691
|
-
# verify the required parameter 'email_id' is set
|
692
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
693
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_raw_email_json"
|
694
|
-
end
|
695
|
-
# resource path
|
696
|
-
local_var_path = '/emails/{emailId}/raw/json'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
697
|
-
|
698
|
-
# query parameters
|
699
|
-
query_params = opts[:query_params] || {}
|
700
|
-
|
701
|
-
# header parameters
|
702
|
-
header_params = opts[:header_params] || {}
|
703
|
-
# HTTP header 'Accept' (if needed)
|
704
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
705
|
-
|
706
|
-
# form parameters
|
707
|
-
form_params = opts[:form_params] || {}
|
708
|
-
|
709
|
-
# http body (model)
|
710
|
-
post_body = opts[:body]
|
711
|
-
|
712
|
-
# return_type
|
713
|
-
return_type = opts[:return_type] || 'RawEmailJson'
|
714
|
-
|
715
|
-
# auth_names
|
716
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
717
|
-
|
718
|
-
new_options = opts.merge(
|
719
|
-
:header_params => header_params,
|
720
|
-
:query_params => query_params,
|
721
|
-
:form_params => form_params,
|
722
|
-
:body => post_body,
|
723
|
-
:auth_names => auth_names,
|
724
|
-
:return_type => return_type
|
725
|
-
)
|
726
|
-
|
727
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
728
|
-
if @api_client.config.debugging
|
729
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#get_raw_email_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
730
|
-
end
|
731
|
-
return data, status_code, headers
|
732
|
-
end
|
733
|
-
|
734
|
-
# Get unread email count
|
735
|
-
# Get number of emails unread
|
736
|
-
# @param [Hash] opts the optional parameters
|
737
|
-
# @return [UnreadCount]
|
738
|
-
def get_unread_email_count(opts = {})
|
739
|
-
data, _status_code, _headers = get_unread_email_count_with_http_info(opts)
|
740
|
-
data
|
741
|
-
end
|
742
|
-
|
743
|
-
# Get unread email count
|
744
|
-
# Get number of emails unread
|
745
|
-
# @param [Hash] opts the optional parameters
|
746
|
-
# @return [Array<(UnreadCount, Integer, Hash)>] UnreadCount data, response status code and response headers
|
747
|
-
def get_unread_email_count_with_http_info(opts = {})
|
748
|
-
if @api_client.config.debugging
|
749
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_unread_email_count ...'
|
750
|
-
end
|
751
|
-
# resource path
|
752
|
-
local_var_path = '/emails/unreadCount'
|
753
|
-
|
754
|
-
# query parameters
|
755
|
-
query_params = opts[:query_params] || {}
|
756
|
-
|
757
|
-
# header parameters
|
758
|
-
header_params = opts[:header_params] || {}
|
759
|
-
# HTTP header 'Accept' (if needed)
|
760
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
761
|
-
|
762
|
-
# form parameters
|
763
|
-
form_params = opts[:form_params] || {}
|
764
|
-
|
765
|
-
# http body (model)
|
766
|
-
post_body = opts[:body]
|
767
|
-
|
768
|
-
# return_type
|
769
|
-
return_type = opts[:return_type] || 'UnreadCount'
|
770
|
-
|
771
|
-
# auth_names
|
772
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
773
|
-
|
774
|
-
new_options = opts.merge(
|
775
|
-
:header_params => header_params,
|
776
|
-
:query_params => query_params,
|
777
|
-
:form_params => form_params,
|
778
|
-
:body => post_body,
|
779
|
-
:auth_names => auth_names,
|
780
|
-
:return_type => return_type
|
781
|
-
)
|
782
|
-
|
783
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
784
|
-
if @api_client.config.debugging
|
785
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#get_unread_email_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
786
|
-
end
|
787
|
-
return data, status_code, headers
|
788
|
-
end
|
789
|
-
|
790
|
-
# Validate email
|
791
|
-
# Validate the HTML content of email if HTML is found. Considered valid if no HTML.
|
792
|
-
# @param email_id [String] emailId
|
793
|
-
# @param [Hash] opts the optional parameters
|
794
|
-
# @return [ValidationDto]
|
795
|
-
def validate_email(email_id, opts = {})
|
796
|
-
data, _status_code, _headers = validate_email_with_http_info(email_id, opts)
|
797
|
-
data
|
798
|
-
end
|
799
|
-
|
800
|
-
# Validate email
|
801
|
-
# Validate the HTML content of email if HTML is found. Considered valid if no HTML.
|
802
|
-
# @param email_id [String] emailId
|
803
|
-
# @param [Hash] opts the optional parameters
|
804
|
-
# @return [Array<(ValidationDto, Integer, Hash)>] ValidationDto data, response status code and response headers
|
805
|
-
def validate_email_with_http_info(email_id, opts = {})
|
806
|
-
if @api_client.config.debugging
|
807
|
-
@api_client.config.logger.debug 'Calling API: EmailControllerApi.validate_email ...'
|
808
|
-
end
|
809
|
-
# verify the required parameter 'email_id' is set
|
810
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
811
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.validate_email"
|
812
|
-
end
|
813
|
-
# resource path
|
814
|
-
local_var_path = '/emails/{emailId}/validate'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
815
|
-
|
816
|
-
# query parameters
|
817
|
-
query_params = opts[:query_params] || {}
|
818
|
-
|
819
|
-
# header parameters
|
820
|
-
header_params = opts[:header_params] || {}
|
821
|
-
# HTTP header 'Accept' (if needed)
|
822
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
823
|
-
|
824
|
-
# form parameters
|
825
|
-
form_params = opts[:form_params] || {}
|
826
|
-
|
827
|
-
# http body (model)
|
828
|
-
post_body = opts[:body]
|
829
|
-
|
830
|
-
# return_type
|
831
|
-
return_type = opts[:return_type] || 'ValidationDto'
|
832
|
-
|
833
|
-
# auth_names
|
834
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
835
|
-
|
836
|
-
new_options = opts.merge(
|
837
|
-
:header_params => header_params,
|
838
|
-
:query_params => query_params,
|
839
|
-
:form_params => form_params,
|
840
|
-
:body => post_body,
|
841
|
-
:auth_names => auth_names,
|
842
|
-
:return_type => return_type
|
843
|
-
)
|
844
|
-
|
845
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
846
|
-
if @api_client.config.debugging
|
847
|
-
@api_client.config.logger.debug "API called: EmailControllerApi#validate_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
848
|
-
end
|
849
|
-
return data, status_code, headers
|
850
|
-
end
|
851
|
-
end
|
852
|
-
end
|