Class: Sendmux::Management::Generated::SendingAccountsApi
- Inherits:
-
Object
- Object
- Sendmux::Management::Generated::SendingAccountsApi
- Defined in:
- lib/sendmux_management_generated/api/sending_accounts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ SendingAccountsApi
constructor
A new instance of SendingAccountsApi.
-
#management_activate_provider(public_id, opts = {}) ⇒ ProviderItemResponse
Activate a sending account Enables a sending account.
-
#management_activate_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Activate a sending account Enables a sending account.
-
#management_create_provider(opts = {}) ⇒ ProviderItemResponse
Create an SMTP sending account Creates a custom SMTP sending account.
-
#management_create_provider_with_http_info(opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Create an SMTP sending account Creates a custom SMTP sending account.
-
#management_create_shared_amazon_ses_limit_request(opts = {}) ⇒ SharedAmazonSesLimitRequestCreateResponse
Request a shared Amazon SES daily limit increase Creates a review request for the shared Amazon SES daily sending limit.
-
#management_create_shared_amazon_ses_limit_request_with_http_info(opts = {}) ⇒ Array<(SharedAmazonSesLimitRequestCreateResponse, Integer, Hash)>
Request a shared Amazon SES daily limit increase Creates a review request for the shared Amazon SES daily sending limit.
-
#management_deactivate_provider(public_id, opts = {}) ⇒ ProviderItemResponse
Deactivate a sending account Disables a sending account.
-
#management_deactivate_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Deactivate a sending account Disables a sending account.
-
#management_delete_provider(public_id, opts = {}) ⇒ ProviderDeletedResponse
Delete a sending account Deletes a custom or connected sending account.
-
#management_delete_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderDeletedResponse, Integer, Hash)>
Delete a sending account Deletes a custom or connected sending account.
-
#management_get_provider(public_id, opts = {}) ⇒ ProviderItemResponse
Get a sending account Returns one sending account.
-
#management_get_provider_limits(opts = {}) ⇒ ProviderLimitsResponse
Get sending account limits Returns custom-account capacity and shared Amazon SES daily sending limit state.
-
#management_get_provider_limits_with_http_info(opts = {}) ⇒ Array<(ProviderLimitsResponse, Integer, Hash)>
Get sending account limits Returns custom-account capacity and shared Amazon SES daily sending limit state.
-
#management_get_provider_stats(opts = {}) ⇒ ProviderStatsResponse
Get sending account statistics Returns aggregate counts of configured sending accounts with breakdowns by type and status.
-
#management_get_provider_stats_with_http_info(opts = {}) ⇒ Array<(ProviderStatsResponse, Integer, Hash)>
Get sending account statistics Returns aggregate counts of configured sending accounts with breakdowns by type and status.
-
#management_get_provider_usage(opts = {}) ⇒ ProviderUsageResponse
Get sending account usage Returns per-account delivery-log counts for today and the trailing 7-day window.
-
#management_get_provider_usage_with_http_info(opts = {}) ⇒ Array<(ProviderUsageResponse, Integer, Hash)>
Get sending account usage Returns per-account delivery-log counts for today and the trailing 7-day window.
-
#management_get_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Get a sending account Returns one sending account.
-
#management_get_shared_amazon_ses_limit_request(opts = {}) ⇒ SharedAmazonSesLimitRequestPageResponse
Get shared Amazon SES limit request state Returns the shared Amazon SES daily limit state and any pending increase request.
-
#management_get_shared_amazon_ses_limit_request_with_http_info(opts = {}) ⇒ Array<(SharedAmazonSesLimitRequestPageResponse, Integer, Hash)>
Get shared Amazon SES limit request state Returns the shared Amazon SES daily limit state and any pending increase request.
-
#management_list_providers(opts = {}) ⇒ ProviderItemCursorListResponse
List sending accounts Returns a cursor-paginated list of sending accounts.
-
#management_list_providers_with_http_info(opts = {}) ⇒ Array<(ProviderItemCursorListResponse, Integer, Hash)>
List sending accounts Returns a cursor-paginated list of sending accounts.
-
#management_request_sending_account_limit_increase(opts = {}) ⇒ SendingAccountLimitRequestResponse
Request a sending account limit increase Creates a request to increase the number of custom or connected sending accounts allowed for the team.
-
#management_request_sending_account_limit_increase_with_http_info(opts = {}) ⇒ Array<(SendingAccountLimitRequestResponse, Integer, Hash)>
Request a sending account limit increase Creates a request to increase the number of custom or connected sending accounts allowed for the team.
-
#management_test_provider(public_id, opts = {}) ⇒ ProviderTestResultResponse
Test an SMTP sending account Runs a connection test for a custom SMTP account.
-
#management_test_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderTestResultResponse, Integer, Hash)>
Test an SMTP sending account Runs a connection test for a custom SMTP account.
-
#management_update_provider(public_id, opts = {}) ⇒ ProviderItemResponse
Update a sending account Updates a custom sending account.
-
#management_update_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Update a sending account Updates a custom sending account.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SendingAccountsApi
Returns a new instance of SendingAccountsApi.
19 20 21 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#management_activate_provider(public_id, opts = {}) ⇒ ProviderItemResponse
Activate a sending account Enables a sending account. OAuth accounts without an active connection are moved to pending until reconnected in the dashboard. The shared Amazon SES account can be activated.
28 29 30 31 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 28 def management_activate_provider(public_id, opts = {}) data, _status_code, _headers = management_activate_provider_with_http_info(public_id, opts) data end |
#management_activate_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Activate a sending account Enables a sending account. OAuth accounts without an active connection are moved to pending until reconnected in the dashboard. The shared Amazon SES account can be activated.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 39 def management_activate_provider_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_activate_provider ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SendingAccountsApi.management_activate_provider" end if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255 fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SendingAccountsApi.management_activate_provider, the character length must be smaller than or equal to 255.' end # resource path local_var_path = '/providers/{public_id}/activate'.sub('{public_id}', CGI.escape(public_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProviderItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_activate_provider", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_activate_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_create_provider(opts = {}) ⇒ ProviderItemResponse
Create an SMTP sending account Creates a custom SMTP sending account. Supply an ‘Idempotency-Key` header to safely retry on network errors. The SMTP password is stored securely and is never returned.
98 99 100 101 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 98 def management_create_provider(opts = {}) data, _status_code, _headers = management_create_provider_with_http_info(opts) data end |
#management_create_provider_with_http_info(opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Create an SMTP sending account Creates a custom SMTP sending account. Supply an `Idempotency-Key` header to safely retry on network errors. The SMTP password is stored securely and is never returned.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 109 def management_create_provider_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_create_provider ...' end if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255 fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SendingAccountsApi.management_create_provider, the character length must be smaller than or equal to 255.' end # resource path local_var_path = '/providers' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'provider_create_body']) # return_type return_type = opts[:debug_return_type] || 'ProviderItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_create_provider", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_create_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_create_shared_amazon_ses_limit_request(opts = {}) ⇒ SharedAmazonSesLimitRequestCreateResponse
Request a shared Amazon SES daily limit increase Creates a review request for the shared Amazon SES daily sending limit. This does not modify the limit directly.
168 169 170 171 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 168 def management_create_shared_amazon_ses_limit_request(opts = {}) data, _status_code, _headers = management_create_shared_amazon_ses_limit_request_with_http_info(opts) data end |
#management_create_shared_amazon_ses_limit_request_with_http_info(opts = {}) ⇒ Array<(SharedAmazonSesLimitRequestCreateResponse, Integer, Hash)>
Request a shared Amazon SES daily limit increase Creates a review request for the shared Amazon SES daily sending limit. This does not modify the limit directly.
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 178 def management_create_shared_amazon_ses_limit_request_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_create_shared_amazon_ses_limit_request ...' end if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255 fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SendingAccountsApi.management_create_shared_amazon_ses_limit_request, the character length must be smaller than or equal to 255.' end # resource path local_var_path = '/providers/shared-amazon-ses-limit-request' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SharedAmazonSesLimitRequestCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_create_shared_amazon_ses_limit_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_create_shared_amazon_ses_limit_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_deactivate_provider(public_id, opts = {}) ⇒ ProviderItemResponse
Deactivate a sending account Disables a sending account. The shared Amazon SES account can be deactivated.
233 234 235 236 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 233 def management_deactivate_provider(public_id, opts = {}) data, _status_code, _headers = management_deactivate_provider_with_http_info(public_id, opts) data end |
#management_deactivate_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Deactivate a sending account Disables a sending account. The shared Amazon SES account can be deactivated.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 244 def management_deactivate_provider_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_deactivate_provider ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SendingAccountsApi.management_deactivate_provider" end if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255 fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SendingAccountsApi.management_deactivate_provider, the character length must be smaller than or equal to 255.' end # resource path local_var_path = '/providers/{public_id}/deactivate'.sub('{public_id}', CGI.escape(public_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProviderItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_deactivate_provider", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_deactivate_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_delete_provider(public_id, opts = {}) ⇒ ProviderDeletedResponse
Delete a sending account Deletes a custom or connected sending account. The shared Amazon SES account cannot be deleted.
302 303 304 305 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 302 def management_delete_provider(public_id, opts = {}) data, _status_code, _headers = management_delete_provider_with_http_info(public_id, opts) data end |
#management_delete_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderDeletedResponse, Integer, Hash)>
Delete a sending account Deletes a custom or connected sending account. The shared Amazon SES account cannot be deleted.
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 312 def management_delete_provider_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_delete_provider ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SendingAccountsApi.management_delete_provider" end # resource path local_var_path = '/providers/{public_id}'.sub('{public_id}', CGI.escape(public_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProviderDeletedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_delete_provider", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_delete_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_get_provider(public_id, opts = {}) ⇒ ProviderItemResponse
Get a sending account Returns one sending account. Responses include an ETag for conditional GET and optimistic PATCH.
366 367 368 369 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 366 def management_get_provider(public_id, opts = {}) data, _status_code, _headers = management_get_provider_with_http_info(public_id, opts) data end |
#management_get_provider_limits(opts = {}) ⇒ ProviderLimitsResponse
Get sending account limits Returns custom-account capacity and shared Amazon SES daily sending limit state.
430 431 432 433 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 430 def management_get_provider_limits(opts = {}) data, _status_code, _headers = management_get_provider_limits_with_http_info(opts) data end |
#management_get_provider_limits_with_http_info(opts = {}) ⇒ Array<(ProviderLimitsResponse, Integer, Hash)>
Get sending account limits Returns custom-account capacity and shared Amazon SES daily sending limit state.
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 439 def management_get_provider_limits_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_get_provider_limits ...' end # resource path local_var_path = '/providers/limits' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProviderLimitsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_get_provider_limits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_get_provider_limits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_get_provider_stats(opts = {}) ⇒ ProviderStatsResponse
Get sending account statistics Returns aggregate counts of configured sending accounts with breakdowns by type and status.
487 488 489 490 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 487 def management_get_provider_stats(opts = {}) data, _status_code, _headers = management_get_provider_stats_with_http_info(opts) data end |
#management_get_provider_stats_with_http_info(opts = {}) ⇒ Array<(ProviderStatsResponse, Integer, Hash)>
Get sending account statistics Returns aggregate counts of configured sending accounts with breakdowns by type and status.
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 496 def management_get_provider_stats_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_get_provider_stats ...' end # resource path local_var_path = '/providers/stats' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProviderStatsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_get_provider_stats", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_get_provider_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_get_provider_usage(opts = {}) ⇒ ProviderUsageResponse
Get sending account usage Returns per-account delivery-log counts for today and the trailing 7-day window.
544 545 546 547 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 544 def management_get_provider_usage(opts = {}) data, _status_code, _headers = management_get_provider_usage_with_http_info(opts) data end |
#management_get_provider_usage_with_http_info(opts = {}) ⇒ Array<(ProviderUsageResponse, Integer, Hash)>
Get sending account usage Returns per-account delivery-log counts for today and the trailing 7-day window.
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 553 def management_get_provider_usage_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_get_provider_usage ...' end # resource path local_var_path = '/providers/usage' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProviderUsageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_get_provider_usage", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_get_provider_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_get_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Get a sending account Returns one sending account. Responses include an ETag for conditional GET and optimistic PATCH.
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 377 def management_get_provider_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_get_provider ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SendingAccountsApi.management_get_provider" end # resource path local_var_path = '/providers/{public_id}'.sub('{public_id}', CGI.escape(public_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProviderItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_get_provider", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_get_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_get_shared_amazon_ses_limit_request(opts = {}) ⇒ SharedAmazonSesLimitRequestPageResponse
Get shared Amazon SES limit request state Returns the shared Amazon SES daily limit state and any pending increase request.
601 602 603 604 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 601 def management_get_shared_amazon_ses_limit_request(opts = {}) data, _status_code, _headers = management_get_shared_amazon_ses_limit_request_with_http_info(opts) data end |
#management_get_shared_amazon_ses_limit_request_with_http_info(opts = {}) ⇒ Array<(SharedAmazonSesLimitRequestPageResponse, Integer, Hash)>
Get shared Amazon SES limit request state Returns the shared Amazon SES daily limit state and any pending increase request.
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 610 def management_get_shared_amazon_ses_limit_request_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_get_shared_amazon_ses_limit_request ...' end # resource path local_var_path = '/providers/shared-amazon-ses-limit-request' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SharedAmazonSesLimitRequestPageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_get_shared_amazon_ses_limit_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_get_shared_amazon_ses_limit_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_list_providers(opts = {}) ⇒ ProviderItemCursorListResponse
List sending accounts Returns a cursor-paginated list of sending accounts. Credentials are never returned. The shared Amazon SES account is included and marked with ‘is_shared: true`.
662 663 664 665 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 662 def management_list_providers(opts = {}) data, _status_code, _headers = management_list_providers_with_http_info(opts) data end |
#management_list_providers_with_http_info(opts = {}) ⇒ Array<(ProviderItemCursorListResponse, Integer, Hash)>
List sending accounts Returns a cursor-paginated list of sending accounts. Credentials are never returned. The shared Amazon SES account is included and marked with `is_shared: true`.
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 675 def management_list_providers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_list_providers ...' end allowable_values = ["active", "inactive", "error", "pending", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end allowable_values = ["smtp", "gmail_api", "outlook_api", "amazon_ses", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type']) fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SendingAccountsApi.management_list_providers, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SendingAccountsApi.management_list_providers, must be greater than or equal to 1.' end # resource path local_var_path = '/providers' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProviderItemCursorListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_list_providers", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_list_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_request_sending_account_limit_increase(opts = {}) ⇒ SendingAccountLimitRequestResponse
Request a sending account limit increase Creates a request to increase the number of custom or connected sending accounts allowed for the team.
744 745 746 747 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 744 def management_request_sending_account_limit_increase(opts = {}) data, _status_code, _headers = management_request_sending_account_limit_increase_with_http_info(opts) data end |
#management_request_sending_account_limit_increase_with_http_info(opts = {}) ⇒ Array<(SendingAccountLimitRequestResponse, Integer, Hash)>
Request a sending account limit increase Creates a request to increase the number of custom or connected sending accounts allowed for the team.
754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 754 def management_request_sending_account_limit_increase_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_request_sending_account_limit_increase ...' end if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255 fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SendingAccountsApi.management_request_sending_account_limit_increase, the character length must be smaller than or equal to 255.' end # resource path local_var_path = '/providers/limits/sending-accounts/request-increase' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SendingAccountLimitRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_request_sending_account_limit_increase", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_request_sending_account_limit_increase\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_test_provider(public_id, opts = {}) ⇒ ProviderTestResultResponse
Test an SMTP sending account Runs a connection test for a custom SMTP account. The shared Amazon SES account and OAuth accounts cannot be tested through this endpoint.
809 810 811 812 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 809 def management_test_provider(public_id, opts = {}) data, _status_code, _headers = management_test_provider_with_http_info(public_id, opts) data end |
#management_test_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderTestResultResponse, Integer, Hash)>
Test an SMTP sending account Runs a connection test for a custom SMTP account. The shared Amazon SES account and OAuth accounts cannot be tested through this endpoint.
820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 820 def management_test_provider_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_test_provider ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SendingAccountsApi.management_test_provider" end if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255 fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SendingAccountsApi.management_test_provider, the character length must be smaller than or equal to 255.' end # resource path local_var_path = '/providers/{public_id}/test'.sub('{public_id}', CGI.escape(public_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProviderTestResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_test_provider", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_test_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#management_update_provider(public_id, opts = {}) ⇒ ProviderItemResponse
Update a sending account Updates a custom sending account. The shared Amazon SES account cannot be edited here; use activate/deactivate and the limit-request endpoint for the allowed shared-account actions.
880 881 882 883 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 880 def management_update_provider(public_id, opts = {}) data, _status_code, _headers = management_update_provider_with_http_info(public_id, opts) data end |
#management_update_provider_with_http_info(public_id, opts = {}) ⇒ Array<(ProviderItemResponse, Integer, Hash)>
Update a sending account Updates a custom sending account. The shared Amazon SES account cannot be edited here; use activate/deactivate and the limit-request endpoint for the allowed shared-account actions.
892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 |
# File 'lib/sendmux_management_generated/api/sending_accounts_api.rb', line 892 def management_update_provider_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_update_provider ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SendingAccountsApi.management_update_provider" end # resource path local_var_path = '/providers/{public_id}'.sub('{public_id}', CGI.escape(public_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'provider_update_body']) # return_type return_type = opts[:debug_return_type] || 'ProviderItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SendingAccountsApi.management_update_provider", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendingAccountsApi#management_update_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |