sendmux-management 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +12 -0
- data/README.md +3 -0
- data/lib/sendmux/management/client.rb +66 -0
- data/lib/sendmux/management/version.rb +7 -0
- data/lib/sendmux/management.rb +12 -0
- data/lib/sendmux_management_generated/api/billing_api.rb +221 -0
- data/lib/sendmux_management_generated/api/domain_filters_api.rb +161 -0
- data/lib/sendmux_management_generated/api/domains_api.rb +419 -0
- data/lib/sendmux_management_generated/api/emails_api.rb +258 -0
- data/lib/sendmux_management_generated/api/inboxes_api.rb +175 -0
- data/lib/sendmux_management_generated/api/mailbox_filters_api.rb +161 -0
- data/lib/sendmux_management_generated/api/mailboxes_api.rb +659 -0
- data/lib/sendmux_management_generated/api/sending_accounts_api.rb +946 -0
- data/lib/sendmux_management_generated/api/webhooks_api.rb +666 -0
- data/lib/sendmux_management_generated/api_client.rb +441 -0
- data/lib/sendmux_management_generated/api_error.rb +58 -0
- data/lib/sendmux_management_generated/api_model_base.rb +88 -0
- data/lib/sendmux_management_generated/configuration.rb +393 -0
- data/lib/sendmux_management_generated/models/api_error_detail.rb +219 -0
- data/lib/sendmux_management_generated/models/api_error_error.rb +275 -0
- data/lib/sendmux_management_generated/models/api_error_meta.rb +164 -0
- data/lib/sendmux_management_generated/models/api_error_response.rb +216 -0
- data/lib/sendmux_management_generated/models/balance.rb +293 -0
- data/lib/sendmux_management_generated/models/balance_auto_topup.rb +226 -0
- data/lib/sendmux_management_generated/models/balance_response.rb +223 -0
- data/lib/sendmux_management_generated/models/cursor_pagination.rb +173 -0
- data/lib/sendmux_management_generated/models/delivery_log_item.rb +393 -0
- data/lib/sendmux_management_generated/models/delivery_log_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/delivery_log_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/domain_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/domain_deleted_response_all_of_data.rb +190 -0
- data/lib/sendmux_management_generated/models/domain_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/domain_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/domain_verify_response.rb +223 -0
- data/lib/sendmux_management_generated/models/email_metrics.rb +218 -0
- data/lib/sendmux_management_generated/models/email_metrics_comparison.rb +294 -0
- data/lib/sendmux_management_generated/models/email_metrics_comparison_change_pct.rb +268 -0
- data/lib/sendmux_management_generated/models/email_metrics_response.rb +223 -0
- data/lib/sendmux_management_generated/models/email_metrics_summary.rb +268 -0
- data/lib/sendmux_management_generated/models/email_metrics_timeseries_inner.rb +294 -0
- data/lib/sendmux_management_generated/models/filter_rule.rb +242 -0
- data/lib/sendmux_management_generated/models/filter_state.rb +218 -0
- data/lib/sendmux_management_generated/models/filter_state_response.rb +223 -0
- data/lib/sendmux_management_generated/models/incoming_log_item.rb +465 -0
- data/lib/sendmux_management_generated/models/incoming_log_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/incoming_log_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox.rb +284 -0
- data/lib/sendmux_management_generated/models/mailbox_app_password_result.rb +164 -0
- data/lib/sendmux_management_generated/models/mailbox_app_password_result_credential.rb +359 -0
- data/lib/sendmux_management_generated/models/mailbox_app_password_result_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_create_result.rb +189 -0
- data/lib/sendmux_management_generated/models/mailbox_create_result_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_credential.rb +353 -0
- data/lib/sendmux_management_generated/models/mailbox_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_domain.rb +358 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +276 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_mx_record.rb +190 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +191 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +246 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +242 -0
- data/lib/sendmux_management_generated/models/mailbox_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/mailbox_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_key_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_send_scope.rb +213 -0
- data/lib/sendmux_management_generated/models/management_create_domain_request.rb +165 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +182 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +257 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +210 -0
- data/lib/sendmux_management_generated/models/management_test_webhook200_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +268 -0
- data/lib/sendmux_management_generated/models/provider_create_body.rb +579 -0
- data/lib/sendmux_management_generated/models/provider_create_body_quotas.rb +174 -0
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +104 -0
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day_any_of.rb +215 -0
- data/lib/sendmux_management_generated/models/provider_deleted.rb +190 -0
- data/lib/sendmux_management_generated/models/provider_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_item.rb +695 -0
- data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/provider_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_limits.rb +190 -0
- data/lib/sendmux_management_generated/models/provider_limits_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_quota_range.rb +208 -0
- data/lib/sendmux_management_generated/models/provider_quotas.rb +186 -0
- data/lib/sendmux_management_generated/models/provider_stats.rb +325 -0
- data/lib/sendmux_management_generated/models/provider_stats_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_status_counts.rb +242 -0
- data/lib/sendmux_management_generated/models/provider_test_result.rb +251 -0
- data/lib/sendmux_management_generated/models/provider_test_result_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_type_counts.rb +246 -0
- data/lib/sendmux_management_generated/models/provider_update_body.rb +537 -0
- data/lib/sendmux_management_generated/models/provider_usage.rb +216 -0
- data/lib/sendmux_management_generated/models/provider_usage_item.rb +374 -0
- data/lib/sendmux_management_generated/models/provider_usage_response.rb +223 -0
- data/lib/sendmux_management_generated/models/resource_limit_snapshot.rb +420 -0
- data/lib/sendmux_management_generated/models/response_meta.rb +164 -0
- data/lib/sendmux_management_generated/models/sending_account_limit_request.rb +190 -0
- data/lib/sendmux_management_generated/models/sending_account_limit_request_response.rb +223 -0
- data/lib/sendmux_management_generated/models/set_filter_state_body.rb +226 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +315 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +361 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +190 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_request.rb +368 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +223 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page.rb +176 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +223 -0
- data/lib/sendmux_management_generated/models/spend_summary.rb +292 -0
- data/lib/sendmux_management_generated/models/spend_summary_response.rb +223 -0
- data/lib/sendmux_management_generated/models/success_envelope.rb +192 -0
- data/lib/sendmux_management_generated/models/transaction.rb +332 -0
- data/lib/sendmux_management_generated/models/transaction_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/update_mailbox_body.rb +210 -0
- data/lib/sendmux_management_generated/models/webhook_create_body.rb +269 -0
- data/lib/sendmux_management_generated/models/webhook_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_attempt.rb +562 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_payload.rb +359 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_payload_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_event_data.rb +395 -0
- data/lib/sendmux_management_generated/models/webhook_event_payload.rb +297 -0
- data/lib/sendmux_management_generated/models/webhook_filters.rb +168 -0
- data/lib/sendmux_management_generated/models/webhook_subscription.rb +380 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +414 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_with_secret_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_test_response.rb +165 -0
- data/lib/sendmux_management_generated/models/webhook_update_body.rb +233 -0
- data/lib/sendmux_management_generated/version.rb +15 -0
- data/lib/sendmux_management_generated.rb +158 -0
- metadata +247 -0
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Sendmux API
|
|
3
|
+
|
|
4
|
+
#Programmatic access to your Sendmux email infrastructure.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Sendmux::Management::Generated
|
|
16
|
+
class DomainsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Add a mailbox domain
|
|
23
|
+
# Creates a new sending domain and returns the DNS records the customer must place before verification can succeed. Provisioning touches both our mail platform and Amazon SES — on any failure the partial state is automatically rolled back. Supply an `Idempotency-Key` header (any unique string, max 255 chars) to safely retry on network errors. Replays with the same key return the original response; replays with a different body return `409 idempotency_conflict`.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :idempotency_key
|
|
26
|
+
# @option opts [ManagementCreateDomainRequest] :management_create_domain_request
|
|
27
|
+
# @return [DomainItemResponse]
|
|
28
|
+
def management_create_domain(opts = {})
|
|
29
|
+
data, _status_code, _headers = management_create_domain_with_http_info(opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Add a mailbox domain
|
|
34
|
+
# Creates a new sending domain and returns the DNS records the customer must place before verification can succeed. Provisioning touches both our mail platform and Amazon SES — on any failure the partial state is automatically rolled back. Supply an `Idempotency-Key` header (any unique string, max 255 chars) to safely retry on network errors. Replays with the same key return the original response; replays with a different body return `409 idempotency_conflict`.
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @option opts [String] :idempotency_key
|
|
37
|
+
# @option opts [ManagementCreateDomainRequest] :management_create_domain_request
|
|
38
|
+
# @return [Array<(DomainItemResponse, Integer, Hash)>] DomainItemResponse data, response status code and response headers
|
|
39
|
+
def management_create_domain_with_http_info(opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.management_create_domain ...'
|
|
42
|
+
end
|
|
43
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
44
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling DomainsApi.management_create_domain, the character length must be smaller than or equal to 255.'
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/domains'
|
|
49
|
+
|
|
50
|
+
# query parameters
|
|
51
|
+
query_params = opts[:query_params] || {}
|
|
52
|
+
|
|
53
|
+
# header parameters
|
|
54
|
+
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
57
|
+
# HTTP header 'Content-Type'
|
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
59
|
+
if !content_type.nil?
|
|
60
|
+
header_params['Content-Type'] = content_type
|
|
61
|
+
end
|
|
62
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
63
|
+
|
|
64
|
+
# form parameters
|
|
65
|
+
form_params = opts[:form_params] || {}
|
|
66
|
+
|
|
67
|
+
# http body (model)
|
|
68
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'management_create_domain_request'])
|
|
69
|
+
|
|
70
|
+
# return_type
|
|
71
|
+
return_type = opts[:debug_return_type] || 'DomainItemResponse'
|
|
72
|
+
|
|
73
|
+
# auth_names
|
|
74
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
75
|
+
|
|
76
|
+
new_options = opts.merge(
|
|
77
|
+
:operation => :"DomainsApi.management_create_domain",
|
|
78
|
+
:header_params => header_params,
|
|
79
|
+
:query_params => query_params,
|
|
80
|
+
:form_params => form_params,
|
|
81
|
+
:body => post_body,
|
|
82
|
+
:auth_names => auth_names,
|
|
83
|
+
:return_type => return_type
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
87
|
+
if @api_client.config.debugging
|
|
88
|
+
@api_client.config.logger.debug "API called: DomainsApi#management_create_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
89
|
+
end
|
|
90
|
+
return data, status_code, headers
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Delete a mailbox domain
|
|
94
|
+
# Removes a domain from our mail platform, Amazon SES, and Sendmux. Blocked if any active mailbox still uses the domain — delete those mailboxes first.
|
|
95
|
+
# @param public_id [String]
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [DomainDeletedResponse]
|
|
98
|
+
def management_delete_domain(public_id, opts = {})
|
|
99
|
+
data, _status_code, _headers = management_delete_domain_with_http_info(public_id, opts)
|
|
100
|
+
data
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Delete a mailbox domain
|
|
104
|
+
# Removes a domain from our mail platform, Amazon SES, and Sendmux. Blocked if any active mailbox still uses the domain — delete those mailboxes first.
|
|
105
|
+
# @param public_id [String]
|
|
106
|
+
# @param [Hash] opts the optional parameters
|
|
107
|
+
# @return [Array<(DomainDeletedResponse, Integer, Hash)>] DomainDeletedResponse data, response status code and response headers
|
|
108
|
+
def management_delete_domain_with_http_info(public_id, opts = {})
|
|
109
|
+
if @api_client.config.debugging
|
|
110
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.management_delete_domain ...'
|
|
111
|
+
end
|
|
112
|
+
# verify the required parameter 'public_id' is set
|
|
113
|
+
if @api_client.config.client_side_validation && public_id.nil?
|
|
114
|
+
fail ArgumentError, "Missing the required parameter 'public_id' when calling DomainsApi.management_delete_domain"
|
|
115
|
+
end
|
|
116
|
+
# resource path
|
|
117
|
+
local_var_path = '/domains/{public_id}'.sub('{public_id}', CGI.escape(public_id.to_s))
|
|
118
|
+
|
|
119
|
+
# query parameters
|
|
120
|
+
query_params = opts[:query_params] || {}
|
|
121
|
+
|
|
122
|
+
# header parameters
|
|
123
|
+
header_params = opts[:header_params] || {}
|
|
124
|
+
# HTTP header 'Accept' (if needed)
|
|
125
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
126
|
+
|
|
127
|
+
# form parameters
|
|
128
|
+
form_params = opts[:form_params] || {}
|
|
129
|
+
|
|
130
|
+
# http body (model)
|
|
131
|
+
post_body = opts[:debug_body]
|
|
132
|
+
|
|
133
|
+
# return_type
|
|
134
|
+
return_type = opts[:debug_return_type] || 'DomainDeletedResponse'
|
|
135
|
+
|
|
136
|
+
# auth_names
|
|
137
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
138
|
+
|
|
139
|
+
new_options = opts.merge(
|
|
140
|
+
:operation => :"DomainsApi.management_delete_domain",
|
|
141
|
+
:header_params => header_params,
|
|
142
|
+
:query_params => query_params,
|
|
143
|
+
:form_params => form_params,
|
|
144
|
+
:body => post_body,
|
|
145
|
+
:auth_names => auth_names,
|
|
146
|
+
:return_type => return_type
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug "API called: DomainsApi#management_delete_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
152
|
+
end
|
|
153
|
+
return data, status_code, headers
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Get a mailbox domain
|
|
157
|
+
# Returns a single domain including its DNS records and latest verification state. Responses carry a weak `ETag` header — send it back as `If-None-Match` on the next request and the server will return `304 Not Modified` (no body) when the resource has not changed.
|
|
158
|
+
# @param public_id [String]
|
|
159
|
+
# @param [Hash] opts the optional parameters
|
|
160
|
+
# @option opts [String] :if_none_match
|
|
161
|
+
# @return [DomainItemResponse]
|
|
162
|
+
def management_get_domain(public_id, opts = {})
|
|
163
|
+
data, _status_code, _headers = management_get_domain_with_http_info(public_id, opts)
|
|
164
|
+
data
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Get a mailbox domain
|
|
168
|
+
# Returns a single domain including its DNS records and latest verification state. Responses carry a weak `ETag` header — send it back as `If-None-Match` on the next request and the server will return `304 Not Modified` (no body) when the resource has not changed.
|
|
169
|
+
# @param public_id [String]
|
|
170
|
+
# @param [Hash] opts the optional parameters
|
|
171
|
+
# @option opts [String] :if_none_match
|
|
172
|
+
# @return [Array<(DomainItemResponse, Integer, Hash)>] DomainItemResponse data, response status code and response headers
|
|
173
|
+
def management_get_domain_with_http_info(public_id, opts = {})
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.management_get_domain ...'
|
|
176
|
+
end
|
|
177
|
+
# verify the required parameter 'public_id' is set
|
|
178
|
+
if @api_client.config.client_side_validation && public_id.nil?
|
|
179
|
+
fail ArgumentError, "Missing the required parameter 'public_id' when calling DomainsApi.management_get_domain"
|
|
180
|
+
end
|
|
181
|
+
# resource path
|
|
182
|
+
local_var_path = '/domains/{public_id}'.sub('{public_id}', CGI.escape(public_id.to_s))
|
|
183
|
+
|
|
184
|
+
# query parameters
|
|
185
|
+
query_params = opts[:query_params] || {}
|
|
186
|
+
|
|
187
|
+
# header parameters
|
|
188
|
+
header_params = opts[:header_params] || {}
|
|
189
|
+
# HTTP header 'Accept' (if needed)
|
|
190
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
191
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
192
|
+
|
|
193
|
+
# form parameters
|
|
194
|
+
form_params = opts[:form_params] || {}
|
|
195
|
+
|
|
196
|
+
# http body (model)
|
|
197
|
+
post_body = opts[:debug_body]
|
|
198
|
+
|
|
199
|
+
# return_type
|
|
200
|
+
return_type = opts[:debug_return_type] || 'DomainItemResponse'
|
|
201
|
+
|
|
202
|
+
# auth_names
|
|
203
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
204
|
+
|
|
205
|
+
new_options = opts.merge(
|
|
206
|
+
:operation => :"DomainsApi.management_get_domain",
|
|
207
|
+
:header_params => header_params,
|
|
208
|
+
:query_params => query_params,
|
|
209
|
+
:form_params => form_params,
|
|
210
|
+
:body => post_body,
|
|
211
|
+
:auth_names => auth_names,
|
|
212
|
+
:return_type => return_type
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
216
|
+
if @api_client.config.debugging
|
|
217
|
+
@api_client.config.logger.debug "API called: DomainsApi#management_get_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
218
|
+
end
|
|
219
|
+
return data, status_code, headers
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Download a domain as a zone file
|
|
223
|
+
# Returns the domain's DNS records formatted as a BIND-style zone file fragment. Suitable for direct paste into a DNS provider that accepts zone-file imports.
|
|
224
|
+
# @param public_id [String]
|
|
225
|
+
# @param [Hash] opts the optional parameters
|
|
226
|
+
# @return [String]
|
|
227
|
+
def management_get_domain_zone_file(public_id, opts = {})
|
|
228
|
+
data, _status_code, _headers = management_get_domain_zone_file_with_http_info(public_id, opts)
|
|
229
|
+
data
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Download a domain as a zone file
|
|
233
|
+
# Returns the domain's DNS records formatted as a BIND-style zone file fragment. Suitable for direct paste into a DNS provider that accepts zone-file imports.
|
|
234
|
+
# @param public_id [String]
|
|
235
|
+
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
237
|
+
def management_get_domain_zone_file_with_http_info(public_id, opts = {})
|
|
238
|
+
if @api_client.config.debugging
|
|
239
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.management_get_domain_zone_file ...'
|
|
240
|
+
end
|
|
241
|
+
# verify the required parameter 'public_id' is set
|
|
242
|
+
if @api_client.config.client_side_validation && public_id.nil?
|
|
243
|
+
fail ArgumentError, "Missing the required parameter 'public_id' when calling DomainsApi.management_get_domain_zone_file"
|
|
244
|
+
end
|
|
245
|
+
# resource path
|
|
246
|
+
local_var_path = '/domains/{public_id}/zone-file'.sub('{public_id}', CGI.escape(public_id.to_s))
|
|
247
|
+
|
|
248
|
+
# query parameters
|
|
249
|
+
query_params = opts[:query_params] || {}
|
|
250
|
+
|
|
251
|
+
# header parameters
|
|
252
|
+
header_params = opts[:header_params] || {}
|
|
253
|
+
# HTTP header 'Accept' (if needed)
|
|
254
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json']) unless header_params['Accept']
|
|
255
|
+
|
|
256
|
+
# form parameters
|
|
257
|
+
form_params = opts[:form_params] || {}
|
|
258
|
+
|
|
259
|
+
# http body (model)
|
|
260
|
+
post_body = opts[:debug_body]
|
|
261
|
+
|
|
262
|
+
# return_type
|
|
263
|
+
return_type = opts[:debug_return_type] || 'String'
|
|
264
|
+
|
|
265
|
+
# auth_names
|
|
266
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
267
|
+
|
|
268
|
+
new_options = opts.merge(
|
|
269
|
+
:operation => :"DomainsApi.management_get_domain_zone_file",
|
|
270
|
+
:header_params => header_params,
|
|
271
|
+
:query_params => query_params,
|
|
272
|
+
:form_params => form_params,
|
|
273
|
+
:body => post_body,
|
|
274
|
+
:auth_names => auth_names,
|
|
275
|
+
:return_type => return_type
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
279
|
+
if @api_client.config.debugging
|
|
280
|
+
@api_client.config.logger.debug "API called: DomainsApi#management_get_domain_zone_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
281
|
+
end
|
|
282
|
+
return data, status_code, headers
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# List mailbox domains
|
|
286
|
+
# Returns a cursor-paginated list of sending domains configured for the team, ordered by `created_at` descending. Each entry includes the DNS records the customer must place, the current verification status, and the SES DKIM state. Pass `cursor=<next_cursor>` from the previous response to fetch the next page.
|
|
287
|
+
# @param [Hash] opts the optional parameters
|
|
288
|
+
# @option opts [String] :cursor
|
|
289
|
+
# @option opts [Integer] :limit
|
|
290
|
+
# @return [DomainItemCursorListResponse]
|
|
291
|
+
def management_list_domains(opts = {})
|
|
292
|
+
data, _status_code, _headers = management_list_domains_with_http_info(opts)
|
|
293
|
+
data
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# List mailbox domains
|
|
297
|
+
# Returns a cursor-paginated list of sending domains configured for the team, ordered by `created_at` descending. Each entry includes the DNS records the customer must place, the current verification status, and the SES DKIM state. Pass `cursor=<next_cursor>` from the previous response to fetch the next page.
|
|
298
|
+
# @param [Hash] opts the optional parameters
|
|
299
|
+
# @option opts [String] :cursor
|
|
300
|
+
# @option opts [Integer] :limit
|
|
301
|
+
# @return [Array<(DomainItemCursorListResponse, Integer, Hash)>] DomainItemCursorListResponse data, response status code and response headers
|
|
302
|
+
def management_list_domains_with_http_info(opts = {})
|
|
303
|
+
if @api_client.config.debugging
|
|
304
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.management_list_domains ...'
|
|
305
|
+
end
|
|
306
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
307
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DomainsApi.management_list_domains, must be smaller than or equal to 100.'
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
311
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DomainsApi.management_list_domains, must be greater than or equal to 1.'
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# resource path
|
|
315
|
+
local_var_path = '/domains'
|
|
316
|
+
|
|
317
|
+
# query parameters
|
|
318
|
+
query_params = opts[:query_params] || {}
|
|
319
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
320
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
321
|
+
|
|
322
|
+
# header parameters
|
|
323
|
+
header_params = opts[:header_params] || {}
|
|
324
|
+
# HTTP header 'Accept' (if needed)
|
|
325
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
326
|
+
|
|
327
|
+
# form parameters
|
|
328
|
+
form_params = opts[:form_params] || {}
|
|
329
|
+
|
|
330
|
+
# http body (model)
|
|
331
|
+
post_body = opts[:debug_body]
|
|
332
|
+
|
|
333
|
+
# return_type
|
|
334
|
+
return_type = opts[:debug_return_type] || 'DomainItemCursorListResponse'
|
|
335
|
+
|
|
336
|
+
# auth_names
|
|
337
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
338
|
+
|
|
339
|
+
new_options = opts.merge(
|
|
340
|
+
:operation => :"DomainsApi.management_list_domains",
|
|
341
|
+
:header_params => header_params,
|
|
342
|
+
:query_params => query_params,
|
|
343
|
+
:form_params => form_params,
|
|
344
|
+
:body => post_body,
|
|
345
|
+
:auth_names => auth_names,
|
|
346
|
+
:return_type => return_type
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
350
|
+
if @api_client.config.debugging
|
|
351
|
+
@api_client.config.logger.debug "API called: DomainsApi#management_list_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
352
|
+
end
|
|
353
|
+
return data, status_code, headers
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Verify a mailbox domain
|
|
357
|
+
# Runs an immediate DNS-over-HTTPS check of the domain's MX, SPF, DMARC and ownership TXT records, then asks SES for the latest DKIM status. If every check passes the domain is marked verified. Domains automatically re-verify every 6 hours — this endpoint is only needed to trigger a check on demand.
|
|
358
|
+
# @param public_id [String]
|
|
359
|
+
# @param [Hash] opts the optional parameters
|
|
360
|
+
# @return [DomainVerifyResponse]
|
|
361
|
+
def management_verify_domain(public_id, opts = {})
|
|
362
|
+
data, _status_code, _headers = management_verify_domain_with_http_info(public_id, opts)
|
|
363
|
+
data
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Verify a mailbox domain
|
|
367
|
+
# Runs an immediate DNS-over-HTTPS check of the domain's MX, SPF, DMARC and ownership TXT records, then asks SES for the latest DKIM status. If every check passes the domain is marked verified. Domains automatically re-verify every 6 hours — this endpoint is only needed to trigger a check on demand.
|
|
368
|
+
# @param public_id [String]
|
|
369
|
+
# @param [Hash] opts the optional parameters
|
|
370
|
+
# @return [Array<(DomainVerifyResponse, Integer, Hash)>] DomainVerifyResponse data, response status code and response headers
|
|
371
|
+
def management_verify_domain_with_http_info(public_id, opts = {})
|
|
372
|
+
if @api_client.config.debugging
|
|
373
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.management_verify_domain ...'
|
|
374
|
+
end
|
|
375
|
+
# verify the required parameter 'public_id' is set
|
|
376
|
+
if @api_client.config.client_side_validation && public_id.nil?
|
|
377
|
+
fail ArgumentError, "Missing the required parameter 'public_id' when calling DomainsApi.management_verify_domain"
|
|
378
|
+
end
|
|
379
|
+
# resource path
|
|
380
|
+
local_var_path = '/domains/{public_id}/verify'.sub('{public_id}', CGI.escape(public_id.to_s))
|
|
381
|
+
|
|
382
|
+
# query parameters
|
|
383
|
+
query_params = opts[:query_params] || {}
|
|
384
|
+
|
|
385
|
+
# header parameters
|
|
386
|
+
header_params = opts[:header_params] || {}
|
|
387
|
+
# HTTP header 'Accept' (if needed)
|
|
388
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
389
|
+
|
|
390
|
+
# form parameters
|
|
391
|
+
form_params = opts[:form_params] || {}
|
|
392
|
+
|
|
393
|
+
# http body (model)
|
|
394
|
+
post_body = opts[:debug_body]
|
|
395
|
+
|
|
396
|
+
# return_type
|
|
397
|
+
return_type = opts[:debug_return_type] || 'DomainVerifyResponse'
|
|
398
|
+
|
|
399
|
+
# auth_names
|
|
400
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
401
|
+
|
|
402
|
+
new_options = opts.merge(
|
|
403
|
+
:operation => :"DomainsApi.management_verify_domain",
|
|
404
|
+
:header_params => header_params,
|
|
405
|
+
:query_params => query_params,
|
|
406
|
+
:form_params => form_params,
|
|
407
|
+
:body => post_body,
|
|
408
|
+
:auth_names => auth_names,
|
|
409
|
+
:return_type => return_type
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
413
|
+
if @api_client.config.debugging
|
|
414
|
+
@api_client.config.logger.debug "API called: DomainsApi#management_verify_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
415
|
+
end
|
|
416
|
+
return data, status_code, headers
|
|
417
|
+
end
|
|
418
|
+
end
|
|
419
|
+
end
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Sendmux API
|
|
3
|
+
|
|
4
|
+
#Programmatic access to your Sendmux email infrastructure.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Sendmux::Management::Generated
|
|
16
|
+
class EmailsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get delivery log
|
|
23
|
+
# Returns a single delivery log by its public ID. Responses carry a weak `ETag` header — send it back as `If-None-Match` on the next request and the server will return `304 Not Modified` (no body) when the log has not changed. Logs in a terminal status (sent/failed/rejected) stop changing, so 304 replay is a real bandwidth win on repeated polls.
|
|
24
|
+
# @param public_id [String]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :if_none_match
|
|
27
|
+
# @return [DeliveryLogItemResponse]
|
|
28
|
+
def management_get_email_log(public_id, opts = {})
|
|
29
|
+
data, _status_code, _headers = management_get_email_log_with_http_info(public_id, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Get delivery log
|
|
34
|
+
# Returns a single delivery log by its public ID. Responses carry a weak `ETag` header — send it back as `If-None-Match` on the next request and the server will return `304 Not Modified` (no body) when the log has not changed. Logs in a terminal status (sent/failed/rejected) stop changing, so 304 replay is a real bandwidth win on repeated polls.
|
|
35
|
+
# @param public_id [String]
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [String] :if_none_match
|
|
38
|
+
# @return [Array<(DeliveryLogItemResponse, Integer, Hash)>] DeliveryLogItemResponse data, response status code and response headers
|
|
39
|
+
def management_get_email_log_with_http_info(public_id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: EmailsApi.management_get_email_log ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'public_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && public_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'public_id' when calling EmailsApi.management_get_email_log"
|
|
46
|
+
end
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/emails/logs/{public_id}'.sub('{public_id}', CGI.escape(public_id.to_s))
|
|
49
|
+
|
|
50
|
+
# query parameters
|
|
51
|
+
query_params = opts[:query_params] || {}
|
|
52
|
+
|
|
53
|
+
# header parameters
|
|
54
|
+
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
57
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body]
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'DeliveryLogItemResponse'
|
|
67
|
+
|
|
68
|
+
# auth_names
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"EmailsApi.management_get_email_log",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: EmailsApi#management_get_email_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Get email metrics
|
|
89
|
+
# Returns aggregated email delivery counts with flexible time windowing and comparison period.
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @option opts [String] :window
|
|
92
|
+
# @option opts [String] :from_date
|
|
93
|
+
# @option opts [String] :to_date
|
|
94
|
+
# @option opts [String] :granularity
|
|
95
|
+
# @option opts [String] :provider_id
|
|
96
|
+
# @return [EmailMetricsResponse]
|
|
97
|
+
def management_get_email_metrics(opts = {})
|
|
98
|
+
data, _status_code, _headers = management_get_email_metrics_with_http_info(opts)
|
|
99
|
+
data
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Get email metrics
|
|
103
|
+
# Returns aggregated email delivery counts with flexible time windowing and comparison period.
|
|
104
|
+
# @param [Hash] opts the optional parameters
|
|
105
|
+
# @option opts [String] :window
|
|
106
|
+
# @option opts [String] :from_date
|
|
107
|
+
# @option opts [String] :to_date
|
|
108
|
+
# @option opts [String] :granularity
|
|
109
|
+
# @option opts [String] :provider_id
|
|
110
|
+
# @return [Array<(EmailMetricsResponse, Integer, Hash)>] EmailMetricsResponse data, response status code and response headers
|
|
111
|
+
def management_get_email_metrics_with_http_info(opts = {})
|
|
112
|
+
if @api_client.config.debugging
|
|
113
|
+
@api_client.config.logger.debug 'Calling API: EmailsApi.management_get_email_metrics ...'
|
|
114
|
+
end
|
|
115
|
+
allowable_values = ["24h", "7d", "30d", "unknown_default_open_api"]
|
|
116
|
+
if @api_client.config.client_side_validation && opts[:'window'] && !allowable_values.include?(opts[:'window'])
|
|
117
|
+
fail ArgumentError, "invalid value for \"window\", must be one of #{allowable_values}"
|
|
118
|
+
end
|
|
119
|
+
allowable_values = ["hourly", "daily", "unknown_default_open_api"]
|
|
120
|
+
if @api_client.config.client_side_validation && opts[:'granularity'] && !allowable_values.include?(opts[:'granularity'])
|
|
121
|
+
fail ArgumentError, "invalid value for \"granularity\", must be one of #{allowable_values}"
|
|
122
|
+
end
|
|
123
|
+
# resource path
|
|
124
|
+
local_var_path = '/emails/metrics'
|
|
125
|
+
|
|
126
|
+
# query parameters
|
|
127
|
+
query_params = opts[:query_params] || {}
|
|
128
|
+
query_params[:'window'] = opts[:'window'] if !opts[:'window'].nil?
|
|
129
|
+
query_params[:'from_date'] = opts[:'from_date'] if !opts[:'from_date'].nil?
|
|
130
|
+
query_params[:'to_date'] = opts[:'to_date'] if !opts[:'to_date'].nil?
|
|
131
|
+
query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?
|
|
132
|
+
query_params[:'provider_id'] = opts[:'provider_id'] if !opts[:'provider_id'].nil?
|
|
133
|
+
|
|
134
|
+
# header parameters
|
|
135
|
+
header_params = opts[:header_params] || {}
|
|
136
|
+
# HTTP header 'Accept' (if needed)
|
|
137
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
138
|
+
|
|
139
|
+
# form parameters
|
|
140
|
+
form_params = opts[:form_params] || {}
|
|
141
|
+
|
|
142
|
+
# http body (model)
|
|
143
|
+
post_body = opts[:debug_body]
|
|
144
|
+
|
|
145
|
+
# return_type
|
|
146
|
+
return_type = opts[:debug_return_type] || 'EmailMetricsResponse'
|
|
147
|
+
|
|
148
|
+
# auth_names
|
|
149
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
150
|
+
|
|
151
|
+
new_options = opts.merge(
|
|
152
|
+
:operation => :"EmailsApi.management_get_email_metrics",
|
|
153
|
+
:header_params => header_params,
|
|
154
|
+
:query_params => query_params,
|
|
155
|
+
:form_params => form_params,
|
|
156
|
+
:body => post_body,
|
|
157
|
+
:auth_names => auth_names,
|
|
158
|
+
:return_type => return_type
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
162
|
+
if @api_client.config.debugging
|
|
163
|
+
@api_client.config.logger.debug "API called: EmailsApi#management_get_email_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
164
|
+
end
|
|
165
|
+
return data, status_code, headers
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# List delivery logs
|
|
169
|
+
# Returns paginated delivery logs with cursor-based pagination and filters.
|
|
170
|
+
# @param [Hash] opts the optional parameters
|
|
171
|
+
# @option opts [Integer] :limit
|
|
172
|
+
# @option opts [String] :cursor
|
|
173
|
+
# @option opts [String] :status
|
|
174
|
+
# @option opts [String] :from_date
|
|
175
|
+
# @option opts [String] :to_date
|
|
176
|
+
# @option opts [String] :provider_id
|
|
177
|
+
# @option opts [String] :search
|
|
178
|
+
# @return [DeliveryLogItemCursorListResponse]
|
|
179
|
+
def management_list_email_logs(opts = {})
|
|
180
|
+
data, _status_code, _headers = management_list_email_logs_with_http_info(opts)
|
|
181
|
+
data
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# List delivery logs
|
|
185
|
+
# Returns paginated delivery logs with cursor-based pagination and filters.
|
|
186
|
+
# @param [Hash] opts the optional parameters
|
|
187
|
+
# @option opts [Integer] :limit
|
|
188
|
+
# @option opts [String] :cursor
|
|
189
|
+
# @option opts [String] :status
|
|
190
|
+
# @option opts [String] :from_date
|
|
191
|
+
# @option opts [String] :to_date
|
|
192
|
+
# @option opts [String] :provider_id
|
|
193
|
+
# @option opts [String] :search
|
|
194
|
+
# @return [Array<(DeliveryLogItemCursorListResponse, Integer, Hash)>] DeliveryLogItemCursorListResponse data, response status code and response headers
|
|
195
|
+
def management_list_email_logs_with_http_info(opts = {})
|
|
196
|
+
if @api_client.config.debugging
|
|
197
|
+
@api_client.config.logger.debug 'Calling API: EmailsApi.management_list_email_logs ...'
|
|
198
|
+
end
|
|
199
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
200
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailsApi.management_list_email_logs, must be smaller than or equal to 100.'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
204
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailsApi.management_list_email_logs, must be greater than or equal to 1.'
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
allowable_values = ["pending", "sent", "failed", "rejected", "unknown_default_open_api"]
|
|
208
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
209
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
210
|
+
end
|
|
211
|
+
# resource path
|
|
212
|
+
local_var_path = '/emails/logs'
|
|
213
|
+
|
|
214
|
+
# query parameters
|
|
215
|
+
query_params = opts[:query_params] || {}
|
|
216
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
217
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
218
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
219
|
+
query_params[:'from_date'] = opts[:'from_date'] if !opts[:'from_date'].nil?
|
|
220
|
+
query_params[:'to_date'] = opts[:'to_date'] if !opts[:'to_date'].nil?
|
|
221
|
+
query_params[:'provider_id'] = opts[:'provider_id'] if !opts[:'provider_id'].nil?
|
|
222
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
223
|
+
|
|
224
|
+
# header parameters
|
|
225
|
+
header_params = opts[:header_params] || {}
|
|
226
|
+
# HTTP header 'Accept' (if needed)
|
|
227
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
228
|
+
|
|
229
|
+
# form parameters
|
|
230
|
+
form_params = opts[:form_params] || {}
|
|
231
|
+
|
|
232
|
+
# http body (model)
|
|
233
|
+
post_body = opts[:debug_body]
|
|
234
|
+
|
|
235
|
+
# return_type
|
|
236
|
+
return_type = opts[:debug_return_type] || 'DeliveryLogItemCursorListResponse'
|
|
237
|
+
|
|
238
|
+
# auth_names
|
|
239
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
240
|
+
|
|
241
|
+
new_options = opts.merge(
|
|
242
|
+
:operation => :"EmailsApi.management_list_email_logs",
|
|
243
|
+
:header_params => header_params,
|
|
244
|
+
:query_params => query_params,
|
|
245
|
+
:form_params => form_params,
|
|
246
|
+
:body => post_body,
|
|
247
|
+
:auth_names => auth_names,
|
|
248
|
+
:return_type => return_type
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
252
|
+
if @api_client.config.debugging
|
|
253
|
+
@api_client.config.logger.debug "API called: EmailsApi#management_list_email_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
254
|
+
end
|
|
255
|
+
return data, status_code, headers
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
end
|