mailslurp_client 5.0.0 → 7.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +127 -40
- data/docs/AttachmentControllerApi.md +124 -0
- data/docs/AttachmentMetaData.md +23 -0
- data/docs/BasicAuthOptions.md +10 -0
- data/docs/BulkActionsControllerApi.md +165 -0
- data/docs/BulkSendEmailOptions.md +11 -1
- data/docs/CommonActionsControllerApi.md +167 -0
- data/docs/ContactControllerApi.md +274 -0
- data/docs/ContactDto.md +31 -0
- data/docs/ContactProjection.md +27 -0
- data/docs/CreateContactOptions.md +31 -0
- data/docs/CreateDomainOptions.md +17 -0
- data/docs/CreateGroupOptions.md +19 -0
- data/docs/CreateTemplateOptions.md +19 -0
- data/docs/CreateWebhookOptions.md +13 -2
- data/docs/DomainControllerApi.md +223 -0
- data/docs/DomainDto.md +29 -0
- data/docs/DomainPreview.md +21 -0
- data/docs/Email.md +40 -15
- data/docs/EmailAnalysis.md +18 -5
- data/docs/EmailControllerApi.md +740 -0
- data/docs/EmailPreview.md +24 -6
- data/docs/EmailProjection.md +33 -0
- data/docs/ForwardEmailOptions.md +12 -0
- data/docs/GroupContactsDto.md +19 -0
- data/docs/GroupControllerApi.md +437 -0
- data/docs/GroupDto.md +23 -0
- data/docs/GroupProjection.md +23 -0
- data/docs/HTMLValidationResult.md +21 -0
- data/docs/Inbox.md +26 -4
- data/docs/InboxControllerApi.md +652 -0
- data/docs/InboxProjection.md +29 -0
- data/docs/JsonNode.md +59 -0
- data/docs/MatchOption.md +13 -2
- data/docs/MatchOptions.md +9 -0
- data/docs/PageContactProjection.md +37 -0
- data/docs/PageEmailPreview.md +37 -0
- data/docs/PageEmailProjection.md +37 -0
- data/docs/PageGroupProjection.md +37 -0
- data/docs/PageInboxProjection.md +37 -0
- data/docs/PageTemplateProjection.md +37 -0
- data/docs/PageWebhookProjection.md +37 -0
- data/docs/Pageable.md +27 -0
- data/docs/RawEmailJson.md +17 -0
- data/docs/SendEmailOptions.md +33 -6
- data/docs/SetInboxFavouritedOptions.md +17 -0
- data/docs/Sort.md +21 -0
- data/docs/TemplateControllerApi.md +274 -0
- data/docs/TemplateDto.md +25 -0
- data/docs/TemplateProjection.md +25 -0
- data/docs/TemplateVariable.md +19 -0
- data/docs/UnreadCount.md +17 -0
- data/docs/UpdateGroupContacts.md +17 -0
- data/docs/UpdateInboxOptions.md +25 -0
- data/docs/UploadAttachmentOptions.md +12 -1
- data/docs/ValidationDto.md +19 -0
- data/docs/ValidationMessage.md +19 -0
- data/docs/WaitForConditions.md +29 -0
- data/docs/WaitForControllerApi.md +317 -0
- data/docs/WebhookControllerApi.md +339 -0
- data/docs/WebhookDto.md +33 -0
- data/docs/WebhookProjection.md +27 -0
- data/docs/WebhookTestRequest.md +23 -0
- data/docs/WebhookTestResponse.md +19 -0
- data/docs/WebhookTestResult.md +21 -0
- data/git_push.sh +10 -7
- data/lib/mailslurp_client.rb +56 -7
- data/lib/mailslurp_client/api/attachment_controller_api.rb +157 -0
- data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +203 -0
- data/lib/mailslurp_client/api/common_actions_controller_api.rb +201 -0
- data/lib/mailslurp_client/api/contact_controller_api.rb +323 -0
- data/lib/mailslurp_client/api/domain_controller_api.rb +264 -0
- data/lib/mailslurp_client/api/email_controller_api.rb +852 -0
- data/lib/mailslurp_client/api/group_controller_api.rb +519 -0
- data/lib/mailslurp_client/api/inbox_controller_api.rb +763 -0
- data/lib/mailslurp_client/api/template_controller_api.rb +323 -0
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +359 -0
- data/lib/mailslurp_client/api/webhook_controller_api.rb +405 -0
- data/lib/mailslurp_client/api_client.rb +36 -39
- data/lib/mailslurp_client/api_error.rb +23 -4
- data/lib/mailslurp_client/configuration.rb +8 -11
- data/lib/mailslurp_client/models/attachment_meta_data.rb +253 -0
- data/lib/mailslurp_client/models/basic_auth_options.rb +39 -15
- data/lib/mailslurp_client/models/bulk_send_email_options.rb +42 -19
- data/lib/mailslurp_client/models/contact_dto.rb +288 -0
- data/lib/mailslurp_client/models/contact_projection.rb +261 -0
- data/lib/mailslurp_client/models/create_contact_options.rb +277 -0
- data/lib/mailslurp_client/models/create_domain_options.rb +208 -0
- data/lib/mailslurp_client/models/create_group_options.rb +220 -0
- data/lib/mailslurp_client/models/create_template_options.rb +225 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +54 -29
- data/lib/mailslurp_client/models/domain_dto.rb +296 -0
- data/lib/mailslurp_client/models/domain_preview.rb +240 -0
- data/lib/mailslurp_client/models/email.rb +86 -78
- data/lib/mailslurp_client/models/email_analysis.rb +46 -48
- data/lib/mailslurp_client/models/email_preview.rb +77 -41
- data/lib/mailslurp_client/models/email_projection.rb +306 -0
- data/lib/mailslurp_client/models/forward_email_options.rb +40 -17
- data/lib/mailslurp_client/models/group_contacts_dto.rb +227 -0
- data/lib/mailslurp_client/models/{webhook.rb → group_dto.rb} +60 -54
- data/lib/mailslurp_client/models/group_projection.rb +248 -0
- data/lib/mailslurp_client/models/html_validation_result.rb +243 -0
- data/lib/mailslurp_client/models/inbox.rb +104 -26
- data/lib/mailslurp_client/models/inbox_projection.rb +272 -0
- data/lib/mailslurp_client/models/json_node.rb +429 -0
- data/lib/mailslurp_client/models/match_option.rb +48 -24
- data/lib/mailslurp_client/models/match_options.rb +37 -14
- data/lib/mailslurp_client/models/page_contact_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_email_preview.rb +298 -0
- data/lib/mailslurp_client/models/page_email_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_group_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_inbox_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_template_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_webhook_projection.rb +298 -0
- data/lib/mailslurp_client/models/pageable.rb +251 -0
- data/lib/mailslurp_client/models/raw_email_json.rb +211 -0
- data/lib/mailslurp_client/models/send_email_options.rb +141 -46
- data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +208 -0
- data/lib/mailslurp_client/models/sort.rb +224 -0
- data/lib/mailslurp_client/models/template_dto.rb +269 -0
- data/lib/mailslurp_client/models/template_projection.rb +269 -0
- data/lib/mailslurp_client/models/template_variable.rb +259 -0
- data/lib/mailslurp_client/models/unread_count.rb +211 -0
- data/lib/mailslurp_client/models/update_group_contacts.rb +213 -0
- data/lib/mailslurp_client/models/update_inbox_options.rb +250 -0
- data/lib/mailslurp_client/models/upload_attachment_options.rb +43 -20
- data/lib/mailslurp_client/models/validation_dto.rb +225 -0
- data/lib/mailslurp_client/models/validation_message.rb +220 -0
- data/lib/mailslurp_client/models/wait_for_conditions.rb +315 -0
- data/lib/mailslurp_client/models/webhook_dto.rb +326 -0
- data/lib/mailslurp_client/models/webhook_projection.rb +277 -0
- data/lib/mailslurp_client/models/webhook_test_request.rb +284 -0
- data/lib/mailslurp_client/models/webhook_test_response.rb +215 -0
- data/lib/mailslurp_client/models/webhook_test_result.rb +235 -0
- data/lib/mailslurp_client/version.rb +5 -5
- data/mailslurp_client.gemspec +4 -10
- data/spec/api/attachment_controller_api_spec.rb +61 -0
- data/spec/api/bulk_actions_controller_api_spec.rb +68 -0
- data/spec/api/common_actions_controller_api_spec.rb +129 -0
- data/spec/api/contact_controller_api_spec.rb +91 -0
- data/spec/api/domain_controller_api_spec.rb +82 -0
- data/spec/api/email_controller_api_spec.rb +162 -0
- data/spec/api/group_controller_api_spec.rb +126 -0
- data/spec/api/inbox_controller_api_spec.rb +172 -0
- data/spec/api/template_controller_api_spec.rb +91 -0
- data/spec/api/wait_for_controller_api_spec.rb +107 -0
- data/spec/api/webhook_controller_api_spec.rb +107 -0
- data/spec/api_client_spec.rb +5 -5
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/attachment_meta_data_spec.rb +59 -0
- data/spec/models/basic_auth_options_spec.rb +4 -4
- data/spec/models/bulk_send_email_options_spec.rb +4 -4
- data/spec/models/contact_dto_spec.rb +83 -0
- data/spec/models/contact_projection_spec.rb +71 -0
- data/spec/models/create_contact_options_spec.rb +83 -0
- data/spec/models/create_domain_options_spec.rb +41 -0
- data/spec/models/create_group_options_spec.rb +47 -0
- data/spec/models/create_template_options_spec.rb +47 -0
- data/spec/models/create_webhook_options_spec.rb +6 -6
- data/spec/models/domain_dto_spec.rb +77 -0
- data/spec/models/domain_preview_spec.rb +53 -0
- data/spec/models/email_analysis_spec.rb +4 -4
- data/spec/models/email_preview_spec.rb +41 -5
- data/spec/models/email_projection_spec.rb +89 -0
- data/spec/models/email_spec.rb +17 -5
- data/spec/models/forward_email_options_spec.rb +4 -4
- data/spec/models/group_contacts_dto_spec.rb +47 -0
- data/spec/models/group_dto_spec.rb +59 -0
- data/spec/models/group_projection_spec.rb +59 -0
- data/spec/models/html_validation_result_spec.rb +53 -0
- data/spec/models/inbox_projection_spec.rb +77 -0
- data/spec/models/inbox_spec.rb +35 -5
- data/spec/models/json_node_spec.rb +171 -0
- data/spec/models/match_option_spec.rb +4 -4
- data/spec/models/match_options_spec.rb +4 -4
- data/spec/models/page_contact_projection_spec.rb +101 -0
- data/spec/models/page_email_preview_spec.rb +101 -0
- data/spec/models/page_email_projection_spec.rb +101 -0
- data/spec/models/page_group_projection_spec.rb +101 -0
- data/spec/models/page_inbox_projection_spec.rb +101 -0
- data/spec/models/page_template_projection_spec.rb +101 -0
- data/spec/models/page_webhook_projection_spec.rb +101 -0
- data/spec/models/pageable_spec.rb +71 -0
- data/spec/models/raw_email_json_spec.rb +41 -0
- data/spec/models/send_email_options_spec.rb +45 -5
- data/spec/models/set_inbox_favourited_options_spec.rb +41 -0
- data/spec/models/sort_spec.rb +53 -0
- data/spec/models/template_dto_spec.rb +65 -0
- data/spec/models/template_projection_spec.rb +65 -0
- data/spec/models/template_variable_spec.rb +51 -0
- data/spec/models/unread_count_spec.rb +41 -0
- data/spec/models/update_group_contacts_spec.rb +41 -0
- data/spec/models/{webhook_spec.rb → update_inbox_options_spec.rb} +14 -20
- data/spec/models/upload_attachment_options_spec.rb +4 -4
- data/spec/models/validation_dto_spec.rb +47 -0
- data/spec/models/validation_message_spec.rb +47 -0
- data/spec/models/wait_for_conditions_spec.rb +85 -0
- data/spec/models/webhook_dto_spec.rb +93 -0
- data/spec/models/webhook_projection_spec.rb +71 -0
- data/spec/models/webhook_test_request_spec.rb +63 -0
- data/spec/models/webhook_test_response_spec.rb +47 -0
- data/spec/models/webhook_test_result_spec.rb +53 -0
- data/spec/spec_helper.rb +4 -4
- metadata +223 -149
- data/Gemfile.lock +0 -79
- data/docs/CommonOperationsApi.md +0 -499
- data/docs/ExtraOperationsApi.md +0 -1021
- data/docs/Webhook.md +0 -13
- data/lib/mailslurp_client/api/common_operations_api.rb +0 -502
- data/lib/mailslurp_client/api/extra_operations_api.rb +0 -1054
- data/spec/api/common_operations_api_spec.rb +0 -95
- data/spec/api/extra_operations_api_spec.rb +0 -231
@@ -1,1054 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#MailSlurp API
|
3
|
-
|
4
|
-
#For documentation see [developer guide](https://www.mailslurp.com/developers). [Create an account](https://app.mailslurp.com) in the MailSlurp Dashboard to [view your API Key](https://app). For all bugs, feature requests, or help please [see support](https://www.mailslurp.com/support/).
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.0.1-alpha
|
7
|
-
Contact: contact@mailslurp.dev
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 3.3.4
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'uri'
|
14
|
-
|
15
|
-
module MailSlurpClient
|
16
|
-
class ExtraOperationsApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
# Bulk create Inboxes (email addresses)
|
23
|
-
# Enterprise Plan Required
|
24
|
-
# @param count Number of inboxes to be created in bulk
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [Array<Inbox>]
|
27
|
-
def bulk_create_inboxes(count, opts = {})
|
28
|
-
data, _status_code, _headers = bulk_create_inboxes_with_http_info(count, opts)
|
29
|
-
data
|
30
|
-
end
|
31
|
-
|
32
|
-
# Bulk create Inboxes (email addresses)
|
33
|
-
# Enterprise Plan Required
|
34
|
-
# @param count Number of inboxes to be created in bulk
|
35
|
-
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(Array<Inbox>, Fixnum, Hash)>] Array<Inbox> data, response status code and response headers
|
37
|
-
def bulk_create_inboxes_with_http_info(count, opts = {})
|
38
|
-
if @api_client.config.debugging
|
39
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.bulk_create_inboxes ...'
|
40
|
-
end
|
41
|
-
# verify the required parameter 'count' is set
|
42
|
-
if @api_client.config.client_side_validation && count.nil?
|
43
|
-
fail ArgumentError, "Missing the required parameter 'count' when calling ExtraOperationsApi.bulk_create_inboxes"
|
44
|
-
end
|
45
|
-
# resource path
|
46
|
-
local_var_path = '/bulk/inboxes'
|
47
|
-
|
48
|
-
# query parameters
|
49
|
-
query_params = {}
|
50
|
-
query_params[:'count'] = count
|
51
|
-
|
52
|
-
# header parameters
|
53
|
-
header_params = {}
|
54
|
-
# HTTP header 'Accept' (if needed)
|
55
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
-
|
57
|
-
# form parameters
|
58
|
-
form_params = {}
|
59
|
-
|
60
|
-
# http body (model)
|
61
|
-
post_body = nil
|
62
|
-
auth_names = ['API_KEY']
|
63
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
64
|
-
:header_params => header_params,
|
65
|
-
:query_params => query_params,
|
66
|
-
:form_params => form_params,
|
67
|
-
:body => post_body,
|
68
|
-
:auth_names => auth_names,
|
69
|
-
:return_type => 'Array<Inbox>')
|
70
|
-
if @api_client.config.debugging
|
71
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#bulk_create_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
72
|
-
end
|
73
|
-
return data, status_code, headers
|
74
|
-
end
|
75
|
-
|
76
|
-
# Bulk Delete Inboxes
|
77
|
-
# Enterprise Plan Required
|
78
|
-
# @param request_body ids
|
79
|
-
# @param [Hash] opts the optional parameters
|
80
|
-
# @return [nil]
|
81
|
-
def bulk_delete_inboxes(request_body, opts = {})
|
82
|
-
bulk_delete_inboxes_with_http_info(request_body, opts)
|
83
|
-
nil
|
84
|
-
end
|
85
|
-
|
86
|
-
# Bulk Delete Inboxes
|
87
|
-
# Enterprise Plan Required
|
88
|
-
# @param request_body ids
|
89
|
-
# @param [Hash] opts the optional parameters
|
90
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
91
|
-
def bulk_delete_inboxes_with_http_info(request_body, opts = {})
|
92
|
-
if @api_client.config.debugging
|
93
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.bulk_delete_inboxes ...'
|
94
|
-
end
|
95
|
-
# verify the required parameter 'request_body' is set
|
96
|
-
if @api_client.config.client_side_validation && request_body.nil?
|
97
|
-
fail ArgumentError, "Missing the required parameter 'request_body' when calling ExtraOperationsApi.bulk_delete_inboxes"
|
98
|
-
end
|
99
|
-
# resource path
|
100
|
-
local_var_path = '/bulk/inboxes'
|
101
|
-
|
102
|
-
# query parameters
|
103
|
-
query_params = {}
|
104
|
-
|
105
|
-
# header parameters
|
106
|
-
header_params = {}
|
107
|
-
# HTTP header 'Content-Type'
|
108
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
109
|
-
|
110
|
-
# form parameters
|
111
|
-
form_params = {}
|
112
|
-
|
113
|
-
# http body (model)
|
114
|
-
post_body = @api_client.object_to_http_body(request_body)
|
115
|
-
auth_names = ['API_KEY']
|
116
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
117
|
-
:header_params => header_params,
|
118
|
-
:query_params => query_params,
|
119
|
-
:form_params => form_params,
|
120
|
-
:body => post_body,
|
121
|
-
:auth_names => auth_names)
|
122
|
-
if @api_client.config.debugging
|
123
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#bulk_delete_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
124
|
-
end
|
125
|
-
return data, status_code, headers
|
126
|
-
end
|
127
|
-
|
128
|
-
# Bulk Send Emails
|
129
|
-
# Enterprise Plan Required
|
130
|
-
# @param bulk_send_email_options bulkSendEmailOptions
|
131
|
-
# @param [Hash] opts the optional parameters
|
132
|
-
# @return [nil]
|
133
|
-
def bulk_send_emails(bulk_send_email_options, opts = {})
|
134
|
-
bulk_send_emails_with_http_info(bulk_send_email_options, opts)
|
135
|
-
nil
|
136
|
-
end
|
137
|
-
|
138
|
-
# Bulk Send Emails
|
139
|
-
# Enterprise Plan Required
|
140
|
-
# @param bulk_send_email_options bulkSendEmailOptions
|
141
|
-
# @param [Hash] opts the optional parameters
|
142
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
143
|
-
def bulk_send_emails_with_http_info(bulk_send_email_options, opts = {})
|
144
|
-
if @api_client.config.debugging
|
145
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.bulk_send_emails ...'
|
146
|
-
end
|
147
|
-
# verify the required parameter 'bulk_send_email_options' is set
|
148
|
-
if @api_client.config.client_side_validation && bulk_send_email_options.nil?
|
149
|
-
fail ArgumentError, "Missing the required parameter 'bulk_send_email_options' when calling ExtraOperationsApi.bulk_send_emails"
|
150
|
-
end
|
151
|
-
# resource path
|
152
|
-
local_var_path = '/bulk/send'
|
153
|
-
|
154
|
-
# query parameters
|
155
|
-
query_params = {}
|
156
|
-
|
157
|
-
# header parameters
|
158
|
-
header_params = {}
|
159
|
-
# HTTP header 'Content-Type'
|
160
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
161
|
-
|
162
|
-
# form parameters
|
163
|
-
form_params = {}
|
164
|
-
|
165
|
-
# http body (model)
|
166
|
-
post_body = @api_client.object_to_http_body(bulk_send_email_options)
|
167
|
-
auth_names = ['API_KEY']
|
168
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
169
|
-
:header_params => header_params,
|
170
|
-
:query_params => query_params,
|
171
|
-
:form_params => form_params,
|
172
|
-
:body => post_body,
|
173
|
-
:auth_names => auth_names)
|
174
|
-
if @api_client.config.debugging
|
175
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#bulk_send_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
176
|
-
end
|
177
|
-
return data, status_code, headers
|
178
|
-
end
|
179
|
-
|
180
|
-
# Create an Inbox (email address)
|
181
|
-
# Create a new inbox and ephemeral email address to send and receive from. This is a necessary step before sending or receiving emails. The response contains the inbox's ID and its associated email address. It is recommended that you create a new inbox during each test method so that it is unique and empty
|
182
|
-
# @param [Hash] opts the optional parameters
|
183
|
-
# @return [Inbox]
|
184
|
-
def create_inbox(opts = {})
|
185
|
-
data, _status_code, _headers = create_inbox_with_http_info(opts)
|
186
|
-
data
|
187
|
-
end
|
188
|
-
|
189
|
-
# Create an Inbox (email address)
|
190
|
-
# Create a new inbox and ephemeral email address to send and receive from. This is a necessary step before sending or receiving emails. The response contains the inbox's ID and its associated email address. It is recommended that you create a new inbox during each test method so that it is unique and empty
|
191
|
-
# @param [Hash] opts the optional parameters
|
192
|
-
# @return [Array<(Inbox, Fixnum, Hash)>] Inbox data, response status code and response headers
|
193
|
-
def create_inbox_with_http_info(opts = {})
|
194
|
-
if @api_client.config.debugging
|
195
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.create_inbox ...'
|
196
|
-
end
|
197
|
-
# resource path
|
198
|
-
local_var_path = '/inboxes'
|
199
|
-
|
200
|
-
# query parameters
|
201
|
-
query_params = {}
|
202
|
-
|
203
|
-
# header parameters
|
204
|
-
header_params = {}
|
205
|
-
# HTTP header 'Accept' (if needed)
|
206
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
207
|
-
|
208
|
-
# form parameters
|
209
|
-
form_params = {}
|
210
|
-
|
211
|
-
# http body (model)
|
212
|
-
post_body = nil
|
213
|
-
auth_names = ['API_KEY']
|
214
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
215
|
-
:header_params => header_params,
|
216
|
-
:query_params => query_params,
|
217
|
-
:form_params => form_params,
|
218
|
-
:body => post_body,
|
219
|
-
:auth_names => auth_names,
|
220
|
-
:return_type => 'Inbox')
|
221
|
-
if @api_client.config.debugging
|
222
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#create_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
223
|
-
end
|
224
|
-
return data, status_code, headers
|
225
|
-
end
|
226
|
-
|
227
|
-
# Attach a WebHook URL to an inbox
|
228
|
-
# Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
|
229
|
-
# @param inbox_id inboxId
|
230
|
-
# @param create_webhook_options webhookOptions
|
231
|
-
# @param [Hash] opts the optional parameters
|
232
|
-
# @return [Webhook]
|
233
|
-
def create_webhook(inbox_id, create_webhook_options, opts = {})
|
234
|
-
data, _status_code, _headers = create_webhook_with_http_info(inbox_id, create_webhook_options, opts)
|
235
|
-
data
|
236
|
-
end
|
237
|
-
|
238
|
-
# Attach a WebHook URL to an inbox
|
239
|
-
# Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
|
240
|
-
# @param inbox_id inboxId
|
241
|
-
# @param create_webhook_options webhookOptions
|
242
|
-
# @param [Hash] opts the optional parameters
|
243
|
-
# @return [Array<(Webhook, Fixnum, Hash)>] Webhook data, response status code and response headers
|
244
|
-
def create_webhook_with_http_info(inbox_id, create_webhook_options, opts = {})
|
245
|
-
if @api_client.config.debugging
|
246
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.create_webhook ...'
|
247
|
-
end
|
248
|
-
# verify the required parameter 'inbox_id' is set
|
249
|
-
if @api_client.config.client_side_validation && inbox_id.nil?
|
250
|
-
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.create_webhook"
|
251
|
-
end
|
252
|
-
# verify the required parameter 'create_webhook_options' is set
|
253
|
-
if @api_client.config.client_side_validation && create_webhook_options.nil?
|
254
|
-
fail ArgumentError, "Missing the required parameter 'create_webhook_options' when calling ExtraOperationsApi.create_webhook"
|
255
|
-
end
|
256
|
-
# resource path
|
257
|
-
local_var_path = '/inboxes/{inboxId}/webhooks'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
|
258
|
-
|
259
|
-
# query parameters
|
260
|
-
query_params = {}
|
261
|
-
|
262
|
-
# header parameters
|
263
|
-
header_params = {}
|
264
|
-
# HTTP header 'Accept' (if needed)
|
265
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
266
|
-
# HTTP header 'Content-Type'
|
267
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
268
|
-
|
269
|
-
# form parameters
|
270
|
-
form_params = {}
|
271
|
-
|
272
|
-
# http body (model)
|
273
|
-
post_body = @api_client.object_to_http_body(create_webhook_options)
|
274
|
-
auth_names = ['API_KEY']
|
275
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
276
|
-
:header_params => header_params,
|
277
|
-
:query_params => query_params,
|
278
|
-
:form_params => form_params,
|
279
|
-
:body => post_body,
|
280
|
-
:auth_names => auth_names,
|
281
|
-
:return_type => 'Webhook')
|
282
|
-
if @api_client.config.debugging
|
283
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
284
|
-
end
|
285
|
-
return data, status_code, headers
|
286
|
-
end
|
287
|
-
|
288
|
-
# Delete Email
|
289
|
-
# Deletes an email and removes it from the inbox
|
290
|
-
# @param email_id emailId
|
291
|
-
# @param [Hash] opts the optional parameters
|
292
|
-
# @return [nil]
|
293
|
-
def delete_email1(email_id, opts = {})
|
294
|
-
delete_email1_with_http_info(email_id, opts)
|
295
|
-
nil
|
296
|
-
end
|
297
|
-
|
298
|
-
# Delete Email
|
299
|
-
# Deletes an email and removes it from the inbox
|
300
|
-
# @param email_id emailId
|
301
|
-
# @param [Hash] opts the optional parameters
|
302
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
303
|
-
def delete_email1_with_http_info(email_id, opts = {})
|
304
|
-
if @api_client.config.debugging
|
305
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.delete_email1 ...'
|
306
|
-
end
|
307
|
-
# verify the required parameter 'email_id' is set
|
308
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
309
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling ExtraOperationsApi.delete_email1"
|
310
|
-
end
|
311
|
-
# resource path
|
312
|
-
local_var_path = '/emails/{emailId}'.sub('{' + 'emailId' + '}', email_id.to_s)
|
313
|
-
|
314
|
-
# query parameters
|
315
|
-
query_params = {}
|
316
|
-
|
317
|
-
# header parameters
|
318
|
-
header_params = {}
|
319
|
-
|
320
|
-
# form parameters
|
321
|
-
form_params = {}
|
322
|
-
|
323
|
-
# http body (model)
|
324
|
-
post_body = nil
|
325
|
-
auth_names = ['API_KEY']
|
326
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
327
|
-
:header_params => header_params,
|
328
|
-
:query_params => query_params,
|
329
|
-
:form_params => form_params,
|
330
|
-
:body => post_body,
|
331
|
-
:auth_names => auth_names)
|
332
|
-
if @api_client.config.debugging
|
333
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#delete_email1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
334
|
-
end
|
335
|
-
return data, status_code, headers
|
336
|
-
end
|
337
|
-
|
338
|
-
# Delete Inbox / Email Address
|
339
|
-
# Permanently delete an inbox and associated email address
|
340
|
-
# @param inbox_id inboxId
|
341
|
-
# @param [Hash] opts the optional parameters
|
342
|
-
# @return [nil]
|
343
|
-
def delete_inbox(inbox_id, opts = {})
|
344
|
-
delete_inbox_with_http_info(inbox_id, opts)
|
345
|
-
nil
|
346
|
-
end
|
347
|
-
|
348
|
-
# Delete Inbox / Email Address
|
349
|
-
# Permanently delete an inbox and associated email address
|
350
|
-
# @param inbox_id inboxId
|
351
|
-
# @param [Hash] opts the optional parameters
|
352
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
353
|
-
def delete_inbox_with_http_info(inbox_id, opts = {})
|
354
|
-
if @api_client.config.debugging
|
355
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.delete_inbox ...'
|
356
|
-
end
|
357
|
-
# verify the required parameter 'inbox_id' is set
|
358
|
-
if @api_client.config.client_side_validation && inbox_id.nil?
|
359
|
-
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.delete_inbox"
|
360
|
-
end
|
361
|
-
# resource path
|
362
|
-
local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
|
363
|
-
|
364
|
-
# query parameters
|
365
|
-
query_params = {}
|
366
|
-
|
367
|
-
# header parameters
|
368
|
-
header_params = {}
|
369
|
-
|
370
|
-
# form parameters
|
371
|
-
form_params = {}
|
372
|
-
|
373
|
-
# http body (model)
|
374
|
-
post_body = nil
|
375
|
-
auth_names = ['API_KEY']
|
376
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
377
|
-
:header_params => header_params,
|
378
|
-
:query_params => query_params,
|
379
|
-
:form_params => form_params,
|
380
|
-
:body => post_body,
|
381
|
-
:auth_names => auth_names)
|
382
|
-
if @api_client.config.debugging
|
383
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#delete_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
384
|
-
end
|
385
|
-
return data, status_code, headers
|
386
|
-
end
|
387
|
-
|
388
|
-
# Delete and disable a WebHook for an Inbox
|
389
|
-
# @param inbox_id inboxId
|
390
|
-
# @param webhook_id webhookId
|
391
|
-
# @param [Hash] opts the optional parameters
|
392
|
-
# @return [nil]
|
393
|
-
def delete_webhook(inbox_id, webhook_id, opts = {})
|
394
|
-
delete_webhook_with_http_info(inbox_id, webhook_id, opts)
|
395
|
-
nil
|
396
|
-
end
|
397
|
-
|
398
|
-
# Delete and disable a WebHook for an Inbox
|
399
|
-
# @param inbox_id inboxId
|
400
|
-
# @param webhook_id webhookId
|
401
|
-
# @param [Hash] opts the optional parameters
|
402
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
403
|
-
def delete_webhook_with_http_info(inbox_id, webhook_id, opts = {})
|
404
|
-
if @api_client.config.debugging
|
405
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.delete_webhook ...'
|
406
|
-
end
|
407
|
-
# verify the required parameter 'inbox_id' is set
|
408
|
-
if @api_client.config.client_side_validation && inbox_id.nil?
|
409
|
-
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.delete_webhook"
|
410
|
-
end
|
411
|
-
# verify the required parameter 'webhook_id' is set
|
412
|
-
if @api_client.config.client_side_validation && webhook_id.nil?
|
413
|
-
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling ExtraOperationsApi.delete_webhook"
|
414
|
-
end
|
415
|
-
# resource path
|
416
|
-
local_var_path = '/inboxes/{inboxId}/webhooks/{webhookId}'.sub('{' + 'inboxId' + '}', inbox_id.to_s).sub('{' + 'webhookId' + '}', webhook_id.to_s)
|
417
|
-
|
418
|
-
# query parameters
|
419
|
-
query_params = {}
|
420
|
-
|
421
|
-
# header parameters
|
422
|
-
header_params = {}
|
423
|
-
|
424
|
-
# form parameters
|
425
|
-
form_params = {}
|
426
|
-
|
427
|
-
# http body (model)
|
428
|
-
post_body = nil
|
429
|
-
auth_names = ['API_KEY']
|
430
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
431
|
-
:header_params => header_params,
|
432
|
-
:query_params => query_params,
|
433
|
-
:form_params => form_params,
|
434
|
-
:body => post_body,
|
435
|
-
:auth_names => auth_names)
|
436
|
-
if @api_client.config.debugging
|
437
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
438
|
-
end
|
439
|
-
return data, status_code, headers
|
440
|
-
end
|
441
|
-
|
442
|
-
# Get email attachment
|
443
|
-
# Returns the specified attachment for a given email as a byte stream (file download). Get the attachmentId from the email response. Requires enterprise account.
|
444
|
-
# @param attachment_id attachmentId
|
445
|
-
# @param email_id emailId
|
446
|
-
# @param [Hash] opts the optional parameters
|
447
|
-
# @return [nil]
|
448
|
-
def download_attachment(attachment_id, email_id, opts = {})
|
449
|
-
download_attachment_with_http_info(attachment_id, email_id, opts)
|
450
|
-
nil
|
451
|
-
end
|
452
|
-
|
453
|
-
# Get email attachment
|
454
|
-
# Returns the specified attachment for a given email as a byte stream (file download). Get the attachmentId from the email response. Requires enterprise account.
|
455
|
-
# @param attachment_id attachmentId
|
456
|
-
# @param email_id emailId
|
457
|
-
# @param [Hash] opts the optional parameters
|
458
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
459
|
-
def download_attachment_with_http_info(attachment_id, email_id, opts = {})
|
460
|
-
if @api_client.config.debugging
|
461
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.download_attachment ...'
|
462
|
-
end
|
463
|
-
# verify the required parameter 'attachment_id' is set
|
464
|
-
if @api_client.config.client_side_validation && attachment_id.nil?
|
465
|
-
fail ArgumentError, "Missing the required parameter 'attachment_id' when calling ExtraOperationsApi.download_attachment"
|
466
|
-
end
|
467
|
-
# verify the required parameter 'email_id' is set
|
468
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
469
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling ExtraOperationsApi.download_attachment"
|
470
|
-
end
|
471
|
-
# resource path
|
472
|
-
local_var_path = '/emails/{emailId}/attachments/{attachmentId}'.sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'emailId' + '}', email_id.to_s)
|
473
|
-
|
474
|
-
# query parameters
|
475
|
-
query_params = {}
|
476
|
-
|
477
|
-
# header parameters
|
478
|
-
header_params = {}
|
479
|
-
|
480
|
-
# form parameters
|
481
|
-
form_params = {}
|
482
|
-
|
483
|
-
# http body (model)
|
484
|
-
post_body = nil
|
485
|
-
auth_names = ['API_KEY']
|
486
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
487
|
-
:header_params => header_params,
|
488
|
-
:query_params => query_params,
|
489
|
-
:form_params => form_params,
|
490
|
-
:body => post_body,
|
491
|
-
:auth_names => auth_names)
|
492
|
-
if @api_client.config.debugging
|
493
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#download_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
494
|
-
end
|
495
|
-
return data, status_code, headers
|
496
|
-
end
|
497
|
-
|
498
|
-
# Forward Email
|
499
|
-
# Forward email content to given recipients
|
500
|
-
# @param email_id emailId
|
501
|
-
# @param forward_email_options forwardEmailOptions
|
502
|
-
# @param [Hash] opts the optional parameters
|
503
|
-
# @return [nil]
|
504
|
-
def forward_email(email_id, forward_email_options, opts = {})
|
505
|
-
forward_email_with_http_info(email_id, forward_email_options, opts)
|
506
|
-
nil
|
507
|
-
end
|
508
|
-
|
509
|
-
# Forward Email
|
510
|
-
# Forward email content to given recipients
|
511
|
-
# @param email_id emailId
|
512
|
-
# @param forward_email_options forwardEmailOptions
|
513
|
-
# @param [Hash] opts the optional parameters
|
514
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
515
|
-
def forward_email_with_http_info(email_id, forward_email_options, opts = {})
|
516
|
-
if @api_client.config.debugging
|
517
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.forward_email ...'
|
518
|
-
end
|
519
|
-
# verify the required parameter 'email_id' is set
|
520
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
521
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling ExtraOperationsApi.forward_email"
|
522
|
-
end
|
523
|
-
# verify the required parameter 'forward_email_options' is set
|
524
|
-
if @api_client.config.client_side_validation && forward_email_options.nil?
|
525
|
-
fail ArgumentError, "Missing the required parameter 'forward_email_options' when calling ExtraOperationsApi.forward_email"
|
526
|
-
end
|
527
|
-
# resource path
|
528
|
-
local_var_path = '/emails/{emailId}/forward'.sub('{' + 'emailId' + '}', email_id.to_s)
|
529
|
-
|
530
|
-
# query parameters
|
531
|
-
query_params = {}
|
532
|
-
|
533
|
-
# header parameters
|
534
|
-
header_params = {}
|
535
|
-
# HTTP header 'Content-Type'
|
536
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
537
|
-
|
538
|
-
# form parameters
|
539
|
-
form_params = {}
|
540
|
-
|
541
|
-
# http body (model)
|
542
|
-
post_body = @api_client.object_to_http_body(forward_email_options)
|
543
|
-
auth_names = ['API_KEY']
|
544
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
545
|
-
:header_params => header_params,
|
546
|
-
:query_params => query_params,
|
547
|
-
:form_params => form_params,
|
548
|
-
:body => post_body,
|
549
|
-
:auth_names => auth_names)
|
550
|
-
if @api_client.config.debugging
|
551
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#forward_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
552
|
-
end
|
553
|
-
return data, status_code, headers
|
554
|
-
end
|
555
|
-
|
556
|
-
# Get Email Content
|
557
|
-
# Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawMessage endpoint
|
558
|
-
# @param email_id emailId
|
559
|
-
# @param [Hash] opts the optional parameters
|
560
|
-
# @return [Email]
|
561
|
-
def get_email(email_id, opts = {})
|
562
|
-
data, _status_code, _headers = get_email_with_http_info(email_id, opts)
|
563
|
-
data
|
564
|
-
end
|
565
|
-
|
566
|
-
# Get Email Content
|
567
|
-
# Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawMessage endpoint
|
568
|
-
# @param email_id emailId
|
569
|
-
# @param [Hash] opts the optional parameters
|
570
|
-
# @return [Array<(Email, Fixnum, Hash)>] Email data, response status code and response headers
|
571
|
-
def get_email_with_http_info(email_id, opts = {})
|
572
|
-
if @api_client.config.debugging
|
573
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_email ...'
|
574
|
-
end
|
575
|
-
# verify the required parameter 'email_id' is set
|
576
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
577
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling ExtraOperationsApi.get_email"
|
578
|
-
end
|
579
|
-
# resource path
|
580
|
-
local_var_path = '/emails/{emailId}'.sub('{' + 'emailId' + '}', email_id.to_s)
|
581
|
-
|
582
|
-
# query parameters
|
583
|
-
query_params = {}
|
584
|
-
|
585
|
-
# header parameters
|
586
|
-
header_params = {}
|
587
|
-
# HTTP header 'Accept' (if needed)
|
588
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
589
|
-
|
590
|
-
# form parameters
|
591
|
-
form_params = {}
|
592
|
-
|
593
|
-
# http body (model)
|
594
|
-
post_body = nil
|
595
|
-
auth_names = ['API_KEY']
|
596
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
597
|
-
:header_params => header_params,
|
598
|
-
:query_params => query_params,
|
599
|
-
:form_params => form_params,
|
600
|
-
:body => post_body,
|
601
|
-
:auth_names => auth_names,
|
602
|
-
:return_type => 'Email')
|
603
|
-
if @api_client.config.debugging
|
604
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#get_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
605
|
-
end
|
606
|
-
return data, status_code, headers
|
607
|
-
end
|
608
|
-
|
609
|
-
# List Emails in an Inbox / EmailAddress
|
610
|
-
# List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
|
611
|
-
# @param inbox_id Id of inbox that emails belongs to
|
612
|
-
# @param [Hash] opts the optional parameters
|
613
|
-
# @option opts [Integer] :limit Limit the result set, ordered by descending received date time
|
614
|
-
# @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
|
615
|
-
# @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
|
616
|
-
# @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
|
617
|
-
# @return [Array<EmailPreview>]
|
618
|
-
def get_emails(inbox_id, opts = {})
|
619
|
-
data, _status_code, _headers = get_emails_with_http_info(inbox_id, opts)
|
620
|
-
data
|
621
|
-
end
|
622
|
-
|
623
|
-
# List Emails in an Inbox / EmailAddress
|
624
|
-
# List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
|
625
|
-
# @param inbox_id Id of inbox that emails belongs to
|
626
|
-
# @param [Hash] opts the optional parameters
|
627
|
-
# @option opts [Integer] :limit Limit the result set, ordered by descending received date time
|
628
|
-
# @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
|
629
|
-
# @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
|
630
|
-
# @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
|
631
|
-
# @return [Array<(Array<EmailPreview>, Fixnum, Hash)>] Array<EmailPreview> data, response status code and response headers
|
632
|
-
def get_emails_with_http_info(inbox_id, opts = {})
|
633
|
-
if @api_client.config.debugging
|
634
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_emails ...'
|
635
|
-
end
|
636
|
-
# verify the required parameter 'inbox_id' is set
|
637
|
-
if @api_client.config.client_side_validation && inbox_id.nil?
|
638
|
-
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.get_emails"
|
639
|
-
end
|
640
|
-
# resource path
|
641
|
-
local_var_path = '/inboxes/{inboxId}/emails'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
|
642
|
-
|
643
|
-
# query parameters
|
644
|
-
query_params = {}
|
645
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
646
|
-
query_params[:'minCount'] = opts[:'min_count'] if !opts[:'min_count'].nil?
|
647
|
-
query_params[:'retryTimeout'] = opts[:'retry_timeout'] if !opts[:'retry_timeout'].nil?
|
648
|
-
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
649
|
-
|
650
|
-
# header parameters
|
651
|
-
header_params = {}
|
652
|
-
# HTTP header 'Accept' (if needed)
|
653
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
654
|
-
|
655
|
-
# form parameters
|
656
|
-
form_params = {}
|
657
|
-
|
658
|
-
# http body (model)
|
659
|
-
post_body = nil
|
660
|
-
auth_names = ['API_KEY']
|
661
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
662
|
-
:header_params => header_params,
|
663
|
-
:query_params => query_params,
|
664
|
-
:form_params => form_params,
|
665
|
-
:body => post_body,
|
666
|
-
:auth_names => auth_names,
|
667
|
-
:return_type => 'Array<EmailPreview>')
|
668
|
-
if @api_client.config.debugging
|
669
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#get_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
670
|
-
end
|
671
|
-
return data, status_code, headers
|
672
|
-
end
|
673
|
-
|
674
|
-
# Get Inbox / EmailAddress
|
675
|
-
# Returns an inbox's properties, including its email address and ID.
|
676
|
-
# @param inbox_id inboxId
|
677
|
-
# @param [Hash] opts the optional parameters
|
678
|
-
# @return [Inbox]
|
679
|
-
def get_inbox(inbox_id, opts = {})
|
680
|
-
data, _status_code, _headers = get_inbox_with_http_info(inbox_id, opts)
|
681
|
-
data
|
682
|
-
end
|
683
|
-
|
684
|
-
# Get Inbox / EmailAddress
|
685
|
-
# Returns an inbox's properties, including its email address and ID.
|
686
|
-
# @param inbox_id inboxId
|
687
|
-
# @param [Hash] opts the optional parameters
|
688
|
-
# @return [Array<(Inbox, Fixnum, Hash)>] Inbox data, response status code and response headers
|
689
|
-
def get_inbox_with_http_info(inbox_id, opts = {})
|
690
|
-
if @api_client.config.debugging
|
691
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_inbox ...'
|
692
|
-
end
|
693
|
-
# verify the required parameter 'inbox_id' is set
|
694
|
-
if @api_client.config.client_side_validation && inbox_id.nil?
|
695
|
-
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.get_inbox"
|
696
|
-
end
|
697
|
-
# resource path
|
698
|
-
local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
|
699
|
-
|
700
|
-
# query parameters
|
701
|
-
query_params = {}
|
702
|
-
|
703
|
-
# header parameters
|
704
|
-
header_params = {}
|
705
|
-
# HTTP header 'Accept' (if needed)
|
706
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
707
|
-
|
708
|
-
# form parameters
|
709
|
-
form_params = {}
|
710
|
-
|
711
|
-
# http body (model)
|
712
|
-
post_body = nil
|
713
|
-
auth_names = ['API_KEY']
|
714
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
715
|
-
:header_params => header_params,
|
716
|
-
:query_params => query_params,
|
717
|
-
:form_params => form_params,
|
718
|
-
:body => post_body,
|
719
|
-
:auth_names => auth_names,
|
720
|
-
:return_type => 'Inbox')
|
721
|
-
if @api_client.config.debugging
|
722
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#get_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
723
|
-
end
|
724
|
-
return data, status_code, headers
|
725
|
-
end
|
726
|
-
|
727
|
-
# List Inboxes / Email Addresses
|
728
|
-
# List the inboxes you have created
|
729
|
-
# @param [Hash] opts the optional parameters
|
730
|
-
# @return [Array<Inbox>]
|
731
|
-
def get_inboxes(opts = {})
|
732
|
-
data, _status_code, _headers = get_inboxes_with_http_info(opts)
|
733
|
-
data
|
734
|
-
end
|
735
|
-
|
736
|
-
# List Inboxes / Email Addresses
|
737
|
-
# List the inboxes you have created
|
738
|
-
# @param [Hash] opts the optional parameters
|
739
|
-
# @return [Array<(Array<Inbox>, Fixnum, Hash)>] Array<Inbox> data, response status code and response headers
|
740
|
-
def get_inboxes_with_http_info(opts = {})
|
741
|
-
if @api_client.config.debugging
|
742
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_inboxes ...'
|
743
|
-
end
|
744
|
-
# resource path
|
745
|
-
local_var_path = '/inboxes'
|
746
|
-
|
747
|
-
# query parameters
|
748
|
-
query_params = {}
|
749
|
-
|
750
|
-
# header parameters
|
751
|
-
header_params = {}
|
752
|
-
# HTTP header 'Accept' (if needed)
|
753
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
754
|
-
|
755
|
-
# form parameters
|
756
|
-
form_params = {}
|
757
|
-
|
758
|
-
# http body (model)
|
759
|
-
post_body = nil
|
760
|
-
auth_names = ['API_KEY']
|
761
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
762
|
-
:header_params => header_params,
|
763
|
-
:query_params => query_params,
|
764
|
-
:form_params => form_params,
|
765
|
-
:body => post_body,
|
766
|
-
:auth_names => auth_names,
|
767
|
-
:return_type => 'Array<Inbox>')
|
768
|
-
if @api_client.config.debugging
|
769
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#get_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
770
|
-
end
|
771
|
-
return data, status_code, headers
|
772
|
-
end
|
773
|
-
|
774
|
-
# Get Raw Email Content
|
775
|
-
# Returns a raw, unparsed and unprocessed email
|
776
|
-
# @param email_id emailId
|
777
|
-
# @param [Hash] opts the optional parameters
|
778
|
-
# @return [String]
|
779
|
-
def get_raw_email_contents(email_id, opts = {})
|
780
|
-
data, _status_code, _headers = get_raw_email_contents_with_http_info(email_id, opts)
|
781
|
-
data
|
782
|
-
end
|
783
|
-
|
784
|
-
# Get Raw Email Content
|
785
|
-
# Returns a raw, unparsed and unprocessed email
|
786
|
-
# @param email_id emailId
|
787
|
-
# @param [Hash] opts the optional parameters
|
788
|
-
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
789
|
-
def get_raw_email_contents_with_http_info(email_id, opts = {})
|
790
|
-
if @api_client.config.debugging
|
791
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_raw_email_contents ...'
|
792
|
-
end
|
793
|
-
# verify the required parameter 'email_id' is set
|
794
|
-
if @api_client.config.client_side_validation && email_id.nil?
|
795
|
-
fail ArgumentError, "Missing the required parameter 'email_id' when calling ExtraOperationsApi.get_raw_email_contents"
|
796
|
-
end
|
797
|
-
# resource path
|
798
|
-
local_var_path = '/emails/{emailId}/raw'.sub('{' + 'emailId' + '}', email_id.to_s)
|
799
|
-
|
800
|
-
# query parameters
|
801
|
-
query_params = {}
|
802
|
-
|
803
|
-
# header parameters
|
804
|
-
header_params = {}
|
805
|
-
# HTTP header 'Accept' (if needed)
|
806
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
807
|
-
|
808
|
-
# form parameters
|
809
|
-
form_params = {}
|
810
|
-
|
811
|
-
# http body (model)
|
812
|
-
post_body = nil
|
813
|
-
auth_names = ['API_KEY']
|
814
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
815
|
-
:header_params => header_params,
|
816
|
-
:query_params => query_params,
|
817
|
-
:form_params => form_params,
|
818
|
-
:body => post_body,
|
819
|
-
:auth_names => auth_names,
|
820
|
-
:return_type => 'String')
|
821
|
-
if @api_client.config.debugging
|
822
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#get_raw_email_contents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
823
|
-
end
|
824
|
-
return data, status_code, headers
|
825
|
-
end
|
826
|
-
|
827
|
-
# Get all WebHooks for an Inbox
|
828
|
-
# @param inbox_id inboxId
|
829
|
-
# @param [Hash] opts the optional parameters
|
830
|
-
# @return [Array<Webhook>]
|
831
|
-
def get_webhooks(inbox_id, opts = {})
|
832
|
-
data, _status_code, _headers = get_webhooks_with_http_info(inbox_id, opts)
|
833
|
-
data
|
834
|
-
end
|
835
|
-
|
836
|
-
# Get all WebHooks for an Inbox
|
837
|
-
# @param inbox_id inboxId
|
838
|
-
# @param [Hash] opts the optional parameters
|
839
|
-
# @return [Array<(Array<Webhook>, Fixnum, Hash)>] Array<Webhook> data, response status code and response headers
|
840
|
-
def get_webhooks_with_http_info(inbox_id, opts = {})
|
841
|
-
if @api_client.config.debugging
|
842
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_webhooks ...'
|
843
|
-
end
|
844
|
-
# verify the required parameter 'inbox_id' is set
|
845
|
-
if @api_client.config.client_side_validation && inbox_id.nil?
|
846
|
-
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.get_webhooks"
|
847
|
-
end
|
848
|
-
# resource path
|
849
|
-
local_var_path = '/inboxes/{inboxId}/webhooks'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
|
850
|
-
|
851
|
-
# query parameters
|
852
|
-
query_params = {}
|
853
|
-
|
854
|
-
# header parameters
|
855
|
-
header_params = {}
|
856
|
-
# HTTP header 'Accept' (if needed)
|
857
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
858
|
-
|
859
|
-
# form parameters
|
860
|
-
form_params = {}
|
861
|
-
|
862
|
-
# http body (model)
|
863
|
-
post_body = nil
|
864
|
-
auth_names = ['API_KEY']
|
865
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
866
|
-
:header_params => header_params,
|
867
|
-
:query_params => query_params,
|
868
|
-
:form_params => form_params,
|
869
|
-
:body => post_body,
|
870
|
-
:auth_names => auth_names,
|
871
|
-
:return_type => 'Array<Webhook>')
|
872
|
-
if @api_client.config.debugging
|
873
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#get_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
874
|
-
end
|
875
|
-
return data, status_code, headers
|
876
|
-
end
|
877
|
-
|
878
|
-
# Send Email
|
879
|
-
# Send an email from the inbox's email address. Specify the email recipients and contents in the request body. See the `SendEmailOptions` for more information. Note the `inboxId` refers to the inbox's id NOT its email address
|
880
|
-
# @param inbox_id inboxId
|
881
|
-
# @param send_email_options sendEmailOptions
|
882
|
-
# @param [Hash] opts the optional parameters
|
883
|
-
# @return [nil]
|
884
|
-
def send_email(inbox_id, send_email_options, opts = {})
|
885
|
-
send_email_with_http_info(inbox_id, send_email_options, opts)
|
886
|
-
nil
|
887
|
-
end
|
888
|
-
|
889
|
-
# Send Email
|
890
|
-
# Send an email from the inbox's email address. Specify the email recipients and contents in the request body. See the `SendEmailOptions` for more information. Note the `inboxId` refers to the inbox's id NOT its email address
|
891
|
-
# @param inbox_id inboxId
|
892
|
-
# @param send_email_options sendEmailOptions
|
893
|
-
# @param [Hash] opts the optional parameters
|
894
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
895
|
-
def send_email_with_http_info(inbox_id, send_email_options, opts = {})
|
896
|
-
if @api_client.config.debugging
|
897
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.send_email ...'
|
898
|
-
end
|
899
|
-
# verify the required parameter 'inbox_id' is set
|
900
|
-
if @api_client.config.client_side_validation && inbox_id.nil?
|
901
|
-
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.send_email"
|
902
|
-
end
|
903
|
-
# verify the required parameter 'send_email_options' is set
|
904
|
-
if @api_client.config.client_side_validation && send_email_options.nil?
|
905
|
-
fail ArgumentError, "Missing the required parameter 'send_email_options' when calling ExtraOperationsApi.send_email"
|
906
|
-
end
|
907
|
-
# resource path
|
908
|
-
local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
|
909
|
-
|
910
|
-
# query parameters
|
911
|
-
query_params = {}
|
912
|
-
|
913
|
-
# header parameters
|
914
|
-
header_params = {}
|
915
|
-
# HTTP header 'Content-Type'
|
916
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
917
|
-
|
918
|
-
# form parameters
|
919
|
-
form_params = {}
|
920
|
-
|
921
|
-
# http body (model)
|
922
|
-
post_body = @api_client.object_to_http_body(send_email_options)
|
923
|
-
auth_names = ['API_KEY']
|
924
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
925
|
-
:header_params => header_params,
|
926
|
-
:query_params => query_params,
|
927
|
-
:form_params => form_params,
|
928
|
-
:body => post_body,
|
929
|
-
:auth_names => auth_names)
|
930
|
-
if @api_client.config.debugging
|
931
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
932
|
-
end
|
933
|
-
return data, status_code, headers
|
934
|
-
end
|
935
|
-
|
936
|
-
# Upload an attachment for sending
|
937
|
-
# When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
|
938
|
-
# @param upload_attachment_options uploadOptions
|
939
|
-
# @param [Hash] opts the optional parameters
|
940
|
-
# @return [Array<String>]
|
941
|
-
def upload_attachment(upload_attachment_options, opts = {})
|
942
|
-
data, _status_code, _headers = upload_attachment_with_http_info(upload_attachment_options, opts)
|
943
|
-
data
|
944
|
-
end
|
945
|
-
|
946
|
-
# Upload an attachment for sending
|
947
|
-
# When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
|
948
|
-
# @param upload_attachment_options uploadOptions
|
949
|
-
# @param [Hash] opts the optional parameters
|
950
|
-
# @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers
|
951
|
-
def upload_attachment_with_http_info(upload_attachment_options, opts = {})
|
952
|
-
if @api_client.config.debugging
|
953
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.upload_attachment ...'
|
954
|
-
end
|
955
|
-
# verify the required parameter 'upload_attachment_options' is set
|
956
|
-
if @api_client.config.client_side_validation && upload_attachment_options.nil?
|
957
|
-
fail ArgumentError, "Missing the required parameter 'upload_attachment_options' when calling ExtraOperationsApi.upload_attachment"
|
958
|
-
end
|
959
|
-
# resource path
|
960
|
-
local_var_path = '/attachments'
|
961
|
-
|
962
|
-
# query parameters
|
963
|
-
query_params = {}
|
964
|
-
|
965
|
-
# header parameters
|
966
|
-
header_params = {}
|
967
|
-
# HTTP header 'Accept' (if needed)
|
968
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
969
|
-
# HTTP header 'Content-Type'
|
970
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
971
|
-
|
972
|
-
# form parameters
|
973
|
-
form_params = {}
|
974
|
-
|
975
|
-
# http body (model)
|
976
|
-
post_body = @api_client.object_to_http_body(upload_attachment_options)
|
977
|
-
auth_names = ['API_KEY']
|
978
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
979
|
-
:header_params => header_params,
|
980
|
-
:query_params => query_params,
|
981
|
-
:form_params => form_params,
|
982
|
-
:body => post_body,
|
983
|
-
:auth_names => auth_names,
|
984
|
-
:return_type => 'Array<String>')
|
985
|
-
if @api_client.config.debugging
|
986
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#upload_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
987
|
-
end
|
988
|
-
return data, status_code, headers
|
989
|
-
end
|
990
|
-
|
991
|
-
# Upload an attachment for sending using Multipart Form
|
992
|
-
# When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
|
993
|
-
# @param file file
|
994
|
-
# @param [Hash] opts the optional parameters
|
995
|
-
# @option opts [String] :content_type contentType
|
996
|
-
# @option opts [String] :filename filename
|
997
|
-
# @return [Array<String>]
|
998
|
-
def upload_multipart_form(file, opts = {})
|
999
|
-
data, _status_code, _headers = upload_multipart_form_with_http_info(file, opts)
|
1000
|
-
data
|
1001
|
-
end
|
1002
|
-
|
1003
|
-
# Upload an attachment for sending using Multipart Form
|
1004
|
-
# When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
|
1005
|
-
# @param file file
|
1006
|
-
# @param [Hash] opts the optional parameters
|
1007
|
-
# @option opts [String] :content_type contentType
|
1008
|
-
# @option opts [String] :filename filename
|
1009
|
-
# @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers
|
1010
|
-
def upload_multipart_form_with_http_info(file, opts = {})
|
1011
|
-
if @api_client.config.debugging
|
1012
|
-
@api_client.config.logger.debug 'Calling API: ExtraOperationsApi.upload_multipart_form ...'
|
1013
|
-
end
|
1014
|
-
# verify the required parameter 'file' is set
|
1015
|
-
if @api_client.config.client_side_validation && file.nil?
|
1016
|
-
fail ArgumentError, "Missing the required parameter 'file' when calling ExtraOperationsApi.upload_multipart_form"
|
1017
|
-
end
|
1018
|
-
# resource path
|
1019
|
-
local_var_path = '/attachments/multipart'
|
1020
|
-
|
1021
|
-
# query parameters
|
1022
|
-
query_params = {}
|
1023
|
-
query_params[:'contentType'] = opts[:'content_type'] if !opts[:'content_type'].nil?
|
1024
|
-
query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?
|
1025
|
-
|
1026
|
-
# header parameters
|
1027
|
-
header_params = {}
|
1028
|
-
# HTTP header 'Accept' (if needed)
|
1029
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1030
|
-
# HTTP header 'Content-Type'
|
1031
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
1032
|
-
|
1033
|
-
# form parameters
|
1034
|
-
form_params = {}
|
1035
|
-
form_params['file'] = file
|
1036
|
-
|
1037
|
-
# http body (model)
|
1038
|
-
post_body = nil
|
1039
|
-
auth_names = ['API_KEY']
|
1040
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1041
|
-
:header_params => header_params,
|
1042
|
-
:query_params => query_params,
|
1043
|
-
:form_params => form_params,
|
1044
|
-
:body => post_body,
|
1045
|
-
:auth_names => auth_names,
|
1046
|
-
:return_type => 'Array<String>')
|
1047
|
-
if @api_client.config.debugging
|
1048
|
-
@api_client.config.logger.debug "API called: ExtraOperationsApi#upload_multipart_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1049
|
-
end
|
1050
|
-
return data, status_code, headers
|
1051
|
-
end
|
1052
|
-
|
1053
|
-
end
|
1054
|
-
end
|