ElasticEmail 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/DIFF +0 -0
- data/ElasticEmail.gemspec +38 -0
- data/Gemfile +9 -0
- data/README.md +286 -0
- data/Rakefile +10 -0
- data/VERSION +1 -0
- data/docs/AccessLevel.md +15 -0
- data/docs/AccountStatusEnum.md +15 -0
- data/docs/ApiKey.md +28 -0
- data/docs/ApiKeyPayload.md +26 -0
- data/docs/BodyContentType.md +15 -0
- data/docs/BodyPart.md +22 -0
- data/docs/Campaign.md +26 -0
- data/docs/CampaignOptions.md +26 -0
- data/docs/CampaignRecipient.md +20 -0
- data/docs/CampaignStatus.md +15 -0
- data/docs/CampaignTemplate.md +30 -0
- data/docs/CampaignsApi.md +374 -0
- data/docs/ChannelLogStatusSummary.md +44 -0
- data/docs/CompressionFormat.md +15 -0
- data/docs/ConsentData.md +22 -0
- data/docs/ConsentTracking.md +15 -0
- data/docs/Contact.md +38 -0
- data/docs/ContactActivity.md +38 -0
- data/docs/ContactHistEventType.md +15 -0
- data/docs/ContactHistory.md +30 -0
- data/docs/ContactPayload.md +28 -0
- data/docs/ContactSource.md +15 -0
- data/docs/ContactStatus.md +15 -0
- data/docs/ContactUpdatePayload.md +22 -0
- data/docs/ContactsApi.md +756 -0
- data/docs/ContactsList.md +24 -0
- data/docs/DeliveryOptimizationType.md +15 -0
- data/docs/EmailContent.md +38 -0
- data/docs/EmailData.md +22 -0
- data/docs/EmailMessageData.md +22 -0
- data/docs/EmailRecipient.md +20 -0
- data/docs/EmailSend.md +20 -0
- data/docs/EmailStatus.md +40 -0
- data/docs/EmailTransactionalMessageData.md +22 -0
- data/docs/EmailValidationResult.md +34 -0
- data/docs/EmailValidationStatus.md +15 -0
- data/docs/EmailView.md +22 -0
- data/docs/EmailsApi.md +295 -0
- data/docs/EmailsPayload.md +20 -0
- data/docs/EncodingType.md +15 -0
- data/docs/EventType.md +15 -0
- data/docs/EventsApi.md +575 -0
- data/docs/EventsOrderBy.md +15 -0
- data/docs/ExportFileFormats.md +15 -0
- data/docs/ExportLink.md +20 -0
- data/docs/ExportStatus.md +15 -0
- data/docs/FileInfo.md +26 -0
- data/docs/FilePayload.md +22 -0
- data/docs/FileUploadResult.md +20 -0
- data/docs/FilesApi.md +374 -0
- data/docs/InboundPayload.md +28 -0
- data/docs/InboundRoute.md +30 -0
- data/docs/InboundRouteActionType.md +15 -0
- data/docs/InboundRouteApi.md +437 -0
- data/docs/InboundRouteFilterType.md +15 -0
- data/docs/ListPayload.md +22 -0
- data/docs/ListUpdatePayload.md +20 -0
- data/docs/ListsApi.md +519 -0
- data/docs/LogJobStatus.md +15 -0
- data/docs/LogStatusSummary.md +42 -0
- data/docs/MergeEmailPayload.md +22 -0
- data/docs/MessageAttachment.md +22 -0
- data/docs/MessageCategory.md +15 -0
- data/docs/NewApiKey.md +30 -0
- data/docs/NewSmtpCredentials.md +30 -0
- data/docs/Options.md +28 -0
- data/docs/RecipientEvent.md +42 -0
- data/docs/SecurityApi.md +749 -0
- data/docs/Segment.md +20 -0
- data/docs/SegmentPayload.md +20 -0
- data/docs/SegmentsApi.md +372 -0
- data/docs/SmtpCredentials.md +28 -0
- data/docs/SmtpCredentialsPayload.md +24 -0
- data/docs/SortOrderItem.md +20 -0
- data/docs/SplitOptimizationType.md +15 -0
- data/docs/SplitOptions.md +20 -0
- data/docs/StatisticsApi.md +379 -0
- data/docs/SubAccountInfo.md +34 -0
- data/docs/SubAccountsApi.md +445 -0
- data/docs/SubaccountEmailCreditsPayload.md +20 -0
- data/docs/SubaccountEmailSettings.md +30 -0
- data/docs/SubaccountEmailSettingsPayload.md +28 -0
- data/docs/SubaccountPayload.md +24 -0
- data/docs/SubaccountSettingsInfo.md +18 -0
- data/docs/SubaccountSettingsInfoPayload.md +18 -0
- data/docs/Suppression.md +24 -0
- data/docs/SuppressionsApi.md +895 -0
- data/docs/Template.md +28 -0
- data/docs/TemplatePayload.md +24 -0
- data/docs/TemplateScopeType.md +15 -0
- data/docs/TemplateType.md +15 -0
- data/docs/TemplatesApi.md +376 -0
- data/docs/TransactionalRecipient.md +22 -0
- data/docs/Utm.md +24 -0
- data/docs/VerificationFileResult.md +28 -0
- data/docs/VerificationFileResultDetails.md +30 -0
- data/docs/VerificationStatus.md +15 -0
- data/docs/VerificationsApi.md +662 -0
- data/lib/ElasticEmail.rb +137 -0
- data/lib/ElasticEmail/api/campaigns_api.rb +348 -0
- data/lib/ElasticEmail/api/contacts_api.rb +681 -0
- data/lib/ElasticEmail/api/emails_api.rb +280 -0
- data/lib/ElasticEmail/api/events_api.rb +538 -0
- data/lib/ElasticEmail/api/files_api.rb +340 -0
- data/lib/ElasticEmail/api/inbound_route_api.rb +404 -0
- data/lib/ElasticEmail/api/lists_api.rb +485 -0
- data/lib/ElasticEmail/api/security_api.rb +674 -0
- data/lib/ElasticEmail/api/segments_api.rb +345 -0
- data/lib/ElasticEmail/api/statistics_api.rb +341 -0
- data/lib/ElasticEmail/api/sub_accounts_api.rb +414 -0
- data/lib/ElasticEmail/api/suppressions_api.rb +782 -0
- data/lib/ElasticEmail/api/templates_api.rb +355 -0
- data/lib/ElasticEmail/api/verifications_api.rb +584 -0
- data/lib/ElasticEmail/api_client.rb +390 -0
- data/lib/ElasticEmail/api_error.rb +57 -0
- data/lib/ElasticEmail/configuration.rb +277 -0
- data/lib/ElasticEmail/models/access_level.rb +79 -0
- data/lib/ElasticEmail/models/account_status_enum.rb +40 -0
- data/lib/ElasticEmail/models/api_key.rb +276 -0
- data/lib/ElasticEmail/models/api_key_payload.rb +265 -0
- data/lib/ElasticEmail/models/body_content_type.rb +39 -0
- data/lib/ElasticEmail/models/body_part.rb +240 -0
- data/lib/ElasticEmail/models/campaign.rb +261 -0
- data/lib/ElasticEmail/models/campaign_options.rb +263 -0
- data/lib/ElasticEmail/models/campaign_recipient.rb +234 -0
- data/lib/ElasticEmail/models/campaign_status.rb +43 -0
- data/lib/ElasticEmail/models/campaign_template.rb +282 -0
- data/lib/ElasticEmail/models/channel_log_status_summary.rb +350 -0
- data/lib/ElasticEmail/models/compression_format.rb +37 -0
- data/lib/ElasticEmail/models/consent_data.rb +240 -0
- data/lib/ElasticEmail/models/consent_tracking.rb +38 -0
- data/lib/ElasticEmail/models/contact.rb +323 -0
- data/lib/ElasticEmail/models/contact_activity.rb +324 -0
- data/lib/ElasticEmail/models/contact_hist_event_type.rb +49 -0
- data/lib/ElasticEmail/models/contact_history.rb +279 -0
- data/lib/ElasticEmail/models/contact_payload.rb +270 -0
- data/lib/ElasticEmail/models/contact_source.rb +42 -0
- data/lib/ElasticEmail/models/contact_status.rb +44 -0
- data/lib/ElasticEmail/models/contact_update_payload.rb +241 -0
- data/lib/ElasticEmail/models/contacts_list.rb +251 -0
- data/lib/ElasticEmail/models/delivery_optimization_type.rb +38 -0
- data/lib/ElasticEmail/models/email_content.rb +330 -0
- data/lib/ElasticEmail/models/email_data.rb +241 -0
- data/lib/ElasticEmail/models/email_message_data.rb +242 -0
- data/lib/ElasticEmail/models/email_recipient.rb +232 -0
- data/lib/ElasticEmail/models/email_send.rb +229 -0
- data/lib/ElasticEmail/models/email_status.rb +332 -0
- data/lib/ElasticEmail/models/email_transactional_message_data.rb +240 -0
- data/lib/ElasticEmail/models/email_validation_result.rb +300 -0
- data/lib/ElasticEmail/models/email_validation_status.rb +40 -0
- data/lib/ElasticEmail/models/email_view.rb +240 -0
- data/lib/ElasticEmail/models/emails_payload.rb +232 -0
- data/lib/ElasticEmail/models/encoding_type.rb +42 -0
- data/lib/ElasticEmail/models/event_type.rb +43 -0
- data/lib/ElasticEmail/models/events_order_by.rb +37 -0
- data/lib/ElasticEmail/models/export_file_formats.rb +38 -0
- data/lib/ElasticEmail/models/export_link.rb +229 -0
- data/lib/ElasticEmail/models/export_status.rb +39 -0
- data/lib/ElasticEmail/models/file_info.rb +262 -0
- data/lib/ElasticEmail/models/file_payload.rb +239 -0
- data/lib/ElasticEmail/models/file_upload_result.rb +229 -0
- data/lib/ElasticEmail/models/inbound_payload.rb +269 -0
- data/lib/ElasticEmail/models/inbound_route.rb +278 -0
- data/lib/ElasticEmail/models/inbound_route_action_type.rb +38 -0
- data/lib/ElasticEmail/models/inbound_route_filter_type.rb +37 -0
- data/lib/ElasticEmail/models/list_payload.rb +241 -0
- data/lib/ElasticEmail/models/list_update_payload.rb +229 -0
- data/lib/ElasticEmail/models/log_job_status.rb +45 -0
- data/lib/ElasticEmail/models/log_status_summary.rb +340 -0
- data/lib/ElasticEmail/models/merge_email_payload.rb +239 -0
- data/lib/ElasticEmail/models/message_attachment.rb +237 -0
- data/lib/ElasticEmail/models/message_category.rb +52 -0
- data/lib/ElasticEmail/models/new_api_key.rb +286 -0
- data/lib/ElasticEmail/models/new_smtp_credentials.rb +284 -0
- data/lib/ElasticEmail/models/options.rb +271 -0
- data/lib/ElasticEmail/models/recipient_event.rb +341 -0
- data/lib/ElasticEmail/models/segment.rb +230 -0
- data/lib/ElasticEmail/models/segment_payload.rb +229 -0
- data/lib/ElasticEmail/models/smtp_credentials.rb +274 -0
- data/lib/ElasticEmail/models/smtp_credentials_payload.rb +253 -0
- data/lib/ElasticEmail/models/sort_order_item.rb +229 -0
- data/lib/ElasticEmail/models/split_optimization_type.rb +37 -0
- data/lib/ElasticEmail/models/split_options.rb +230 -0
- data/lib/ElasticEmail/models/sub_account_info.rb +300 -0
- data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +230 -0
- data/lib/ElasticEmail/models/subaccount_email_settings.rb +280 -0
- data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +270 -0
- data/lib/ElasticEmail/models/subaccount_payload.rb +250 -0
- data/lib/ElasticEmail/models/subaccount_settings_info.rb +220 -0
- data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +220 -0
- data/lib/ElasticEmail/models/suppression.rb +252 -0
- data/lib/ElasticEmail/models/template.rb +272 -0
- data/lib/ElasticEmail/models/template_payload.rb +252 -0
- data/lib/ElasticEmail/models/template_scope_type.rb +38 -0
- data/lib/ElasticEmail/models/template_type.rb +38 -0
- data/lib/ElasticEmail/models/transactional_recipient.rb +246 -0
- data/lib/ElasticEmail/models/utm.rb +250 -0
- data/lib/ElasticEmail/models/verification_file_result.rb +270 -0
- data/lib/ElasticEmail/models/verification_file_result_details.rb +282 -0
- data/lib/ElasticEmail/models/verification_status.rb +40 -0
- data/lib/ElasticEmail/version.rb +15 -0
- data/spec/api/campaigns_api_spec.rb +98 -0
- data/spec/api/contacts_api_spec.rb +166 -0
- data/spec/api/emails_api_spec.rb +83 -0
- data/spec/api/events_api_spec.rb +146 -0
- data/spec/api/files_api_spec.rb +97 -0
- data/spec/api/inbound_route_api_spec.rb +107 -0
- data/spec/api/lists_api_spec.rb +123 -0
- data/spec/api/security_api_spec.rb +161 -0
- data/spec/api/segments_api_spec.rb +97 -0
- data/spec/api/statistics_api_spec.rb +98 -0
- data/spec/api/sub_accounts_api_spec.rb +110 -0
- data/spec/api/suppressions_api_spec.rb +186 -0
- data/spec/api/templates_api_spec.rb +99 -0
- data/spec/api/verifications_api_spec.rb +145 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_level_spec.rb +28 -0
- data/spec/models/account_status_enum_spec.rb +28 -0
- data/spec/models/api_key_payload_spec.rb +58 -0
- data/spec/models/api_key_spec.rb +64 -0
- data/spec/models/body_content_type_spec.rb +28 -0
- data/spec/models/body_part_spec.rb +46 -0
- data/spec/models/campaign_options_spec.rb +58 -0
- data/spec/models/campaign_recipient_spec.rb +40 -0
- data/spec/models/campaign_spec.rb +58 -0
- data/spec/models/campaign_status_spec.rb +28 -0
- data/spec/models/campaign_template_spec.rb +70 -0
- data/spec/models/channel_log_status_summary_spec.rb +112 -0
- data/spec/models/compression_format_spec.rb +28 -0
- data/spec/models/consent_data_spec.rb +46 -0
- data/spec/models/consent_tracking_spec.rb +28 -0
- data/spec/models/contact_activity_spec.rb +94 -0
- data/spec/models/contact_hist_event_type_spec.rb +28 -0
- data/spec/models/contact_history_spec.rb +70 -0
- data/spec/models/contact_payload_spec.rb +64 -0
- data/spec/models/contact_source_spec.rb +28 -0
- data/spec/models/contact_spec.rb +94 -0
- data/spec/models/contact_status_spec.rb +28 -0
- data/spec/models/contact_update_payload_spec.rb +46 -0
- data/spec/models/contacts_list_spec.rb +52 -0
- data/spec/models/delivery_optimization_type_spec.rb +28 -0
- data/spec/models/email_content_spec.rb +94 -0
- data/spec/models/email_data_spec.rb +46 -0
- data/spec/models/email_message_data_spec.rb +46 -0
- data/spec/models/email_recipient_spec.rb +40 -0
- data/spec/models/email_send_spec.rb +40 -0
- data/spec/models/email_status_spec.rb +100 -0
- data/spec/models/email_transactional_message_data_spec.rb +46 -0
- data/spec/models/email_validation_result_spec.rb +82 -0
- data/spec/models/email_validation_status_spec.rb +28 -0
- data/spec/models/email_view_spec.rb +46 -0
- data/spec/models/emails_payload_spec.rb +40 -0
- data/spec/models/encoding_type_spec.rb +28 -0
- data/spec/models/event_type_spec.rb +28 -0
- data/spec/models/events_order_by_spec.rb +28 -0
- data/spec/models/export_file_formats_spec.rb +28 -0
- data/spec/models/export_link_spec.rb +40 -0
- data/spec/models/export_status_spec.rb +28 -0
- data/spec/models/file_info_spec.rb +58 -0
- data/spec/models/file_payload_spec.rb +46 -0
- data/spec/models/file_upload_result_spec.rb +40 -0
- data/spec/models/inbound_payload_spec.rb +64 -0
- data/spec/models/inbound_route_action_type_spec.rb +28 -0
- data/spec/models/inbound_route_filter_type_spec.rb +28 -0
- data/spec/models/inbound_route_spec.rb +70 -0
- data/spec/models/list_payload_spec.rb +46 -0
- data/spec/models/list_update_payload_spec.rb +40 -0
- data/spec/models/log_job_status_spec.rb +28 -0
- data/spec/models/log_status_summary_spec.rb +106 -0
- data/spec/models/merge_email_payload_spec.rb +46 -0
- data/spec/models/message_attachment_spec.rb +46 -0
- data/spec/models/message_category_spec.rb +28 -0
- data/spec/models/new_api_key_spec.rb +70 -0
- data/spec/models/new_smtp_credentials_spec.rb +70 -0
- data/spec/models/options_spec.rb +64 -0
- data/spec/models/recipient_event_spec.rb +106 -0
- data/spec/models/segment_payload_spec.rb +40 -0
- data/spec/models/segment_spec.rb +40 -0
- data/spec/models/smtp_credentials_payload_spec.rb +52 -0
- data/spec/models/smtp_credentials_spec.rb +64 -0
- data/spec/models/sort_order_item_spec.rb +40 -0
- data/spec/models/split_optimization_type_spec.rb +28 -0
- data/spec/models/split_options_spec.rb +40 -0
- data/spec/models/sub_account_info_spec.rb +82 -0
- data/spec/models/subaccount_email_credits_payload_spec.rb +40 -0
- data/spec/models/subaccount_email_settings_payload_spec.rb +64 -0
- data/spec/models/subaccount_email_settings_spec.rb +70 -0
- data/spec/models/subaccount_payload_spec.rb +52 -0
- data/spec/models/subaccount_settings_info_payload_spec.rb +34 -0
- data/spec/models/subaccount_settings_info_spec.rb +34 -0
- data/spec/models/suppression_spec.rb +52 -0
- data/spec/models/template_payload_spec.rb +52 -0
- data/spec/models/template_scope_type_spec.rb +28 -0
- data/spec/models/template_spec.rb +64 -0
- data/spec/models/template_type_spec.rb +28 -0
- data/spec/models/transactional_recipient_spec.rb +46 -0
- data/spec/models/utm_spec.rb +52 -0
- data/spec/models/verification_file_result_details_spec.rb +70 -0
- data/spec/models/verification_file_result_spec.rb +64 -0
- data/spec/models/verification_status_spec.rb +28 -0
- data/spec/spec_helper.rb +111 -0
- metadata +498 -0
@@ -0,0 +1,674 @@
|
|
1
|
+
=begin
|
2
|
+
#Elastic Email REST API
|
3
|
+
|
4
|
+
#This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. To start using this API, you will need your Access Token (available <a href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. This is the documentation for REST API. If you’d like to read our legacy documentation regarding Web API v2 click <a href=\"https://api.elasticemail.com/public/help\">here</a>.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
7
|
+
Contact: support@elasticemail.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module ElasticEmail
|
16
|
+
class SecurityApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete ApiKey
|
23
|
+
# Delete your existing ApiKey. Required Access Level: Security
|
24
|
+
# @param name [String] Name of the ApiKey
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :subaccount Email of the subaccount of which ApiKey should be deleted
|
27
|
+
# @return [nil]
|
28
|
+
def security_apikeys_by_name_delete(name, opts = {})
|
29
|
+
security_apikeys_by_name_delete_with_http_info(name, opts)
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
|
33
|
+
# Delete ApiKey
|
34
|
+
# Delete your existing ApiKey. Required Access Level: Security
|
35
|
+
# @param name [String] Name of the ApiKey
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [String] :subaccount Email of the subaccount of which ApiKey should be deleted
|
38
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
39
|
+
def security_apikeys_by_name_delete_with_http_info(name, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_apikeys_by_name_delete ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'name' is set
|
44
|
+
if @api_client.config.client_side_validation && name.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SecurityApi.security_apikeys_by_name_delete"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/security/apikeys/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
query_params[:'subaccount'] = opts[:'subaccount'] if !opts[:'subaccount'].nil?
|
53
|
+
|
54
|
+
# header parameters
|
55
|
+
header_params = opts[:header_params] || {}
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = opts[:form_params] || {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = opts[:debug_body]
|
62
|
+
|
63
|
+
# return_type
|
64
|
+
return_type = opts[:debug_return_type]
|
65
|
+
|
66
|
+
# auth_names
|
67
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
68
|
+
|
69
|
+
new_options = opts.merge(
|
70
|
+
:operation => :"SecurityApi.security_apikeys_by_name_delete",
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_apikeys_by_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Load ApiKey
|
87
|
+
# Load your existing ApiKey info. Required Access Level: Security
|
88
|
+
# @param name [String] Name of the ApiKey
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @option opts [String] :subaccount Email of the subaccount of which ApiKey should be loaded
|
91
|
+
# @return [ApiKey]
|
92
|
+
def security_apikeys_by_name_get(name, opts = {})
|
93
|
+
data, _status_code, _headers = security_apikeys_by_name_get_with_http_info(name, opts)
|
94
|
+
data
|
95
|
+
end
|
96
|
+
|
97
|
+
# Load ApiKey
|
98
|
+
# Load your existing ApiKey info. Required Access Level: Security
|
99
|
+
# @param name [String] Name of the ApiKey
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @option opts [String] :subaccount Email of the subaccount of which ApiKey should be loaded
|
102
|
+
# @return [Array<(ApiKey, Integer, Hash)>] ApiKey data, response status code and response headers
|
103
|
+
def security_apikeys_by_name_get_with_http_info(name, opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_apikeys_by_name_get ...'
|
106
|
+
end
|
107
|
+
# verify the required parameter 'name' is set
|
108
|
+
if @api_client.config.client_side_validation && name.nil?
|
109
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SecurityApi.security_apikeys_by_name_get"
|
110
|
+
end
|
111
|
+
# resource path
|
112
|
+
local_var_path = '/security/apikeys/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
113
|
+
|
114
|
+
# query parameters
|
115
|
+
query_params = opts[:query_params] || {}
|
116
|
+
query_params[:'subaccount'] = opts[:'subaccount'] if !opts[:'subaccount'].nil?
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = opts[:header_params] || {}
|
120
|
+
# HTTP header 'Accept' (if needed)
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
122
|
+
|
123
|
+
# form parameters
|
124
|
+
form_params = opts[:form_params] || {}
|
125
|
+
|
126
|
+
# http body (model)
|
127
|
+
post_body = opts[:debug_body]
|
128
|
+
|
129
|
+
# return_type
|
130
|
+
return_type = opts[:debug_return_type] || 'ApiKey'
|
131
|
+
|
132
|
+
# auth_names
|
133
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
134
|
+
|
135
|
+
new_options = opts.merge(
|
136
|
+
:operation => :"SecurityApi.security_apikeys_by_name_get",
|
137
|
+
:header_params => header_params,
|
138
|
+
:query_params => query_params,
|
139
|
+
:form_params => form_params,
|
140
|
+
:body => post_body,
|
141
|
+
:auth_names => auth_names,
|
142
|
+
:return_type => return_type
|
143
|
+
)
|
144
|
+
|
145
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_apikeys_by_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
|
152
|
+
# Update ApiKey
|
153
|
+
# Update your existing ApiKey. Required Access Level: Security
|
154
|
+
# @param name [String] Name of the ApiKey
|
155
|
+
# @param api_key_payload [ApiKeyPayload]
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [ApiKey]
|
158
|
+
def security_apikeys_by_name_put(name, api_key_payload, opts = {})
|
159
|
+
data, _status_code, _headers = security_apikeys_by_name_put_with_http_info(name, api_key_payload, opts)
|
160
|
+
data
|
161
|
+
end
|
162
|
+
|
163
|
+
# Update ApiKey
|
164
|
+
# Update your existing ApiKey. Required Access Level: Security
|
165
|
+
# @param name [String] Name of the ApiKey
|
166
|
+
# @param api_key_payload [ApiKeyPayload]
|
167
|
+
# @param [Hash] opts the optional parameters
|
168
|
+
# @return [Array<(ApiKey, Integer, Hash)>] ApiKey data, response status code and response headers
|
169
|
+
def security_apikeys_by_name_put_with_http_info(name, api_key_payload, opts = {})
|
170
|
+
if @api_client.config.debugging
|
171
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_apikeys_by_name_put ...'
|
172
|
+
end
|
173
|
+
# verify the required parameter 'name' is set
|
174
|
+
if @api_client.config.client_side_validation && name.nil?
|
175
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SecurityApi.security_apikeys_by_name_put"
|
176
|
+
end
|
177
|
+
# verify the required parameter 'api_key_payload' is set
|
178
|
+
if @api_client.config.client_side_validation && api_key_payload.nil?
|
179
|
+
fail ArgumentError, "Missing the required parameter 'api_key_payload' when calling SecurityApi.security_apikeys_by_name_put"
|
180
|
+
end
|
181
|
+
# resource path
|
182
|
+
local_var_path = '/security/apikeys/{name}'.sub('{' + 'name' + '}', CGI.escape(name.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'])
|
191
|
+
# HTTP header 'Content-Type'
|
192
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
193
|
+
|
194
|
+
# form parameters
|
195
|
+
form_params = opts[:form_params] || {}
|
196
|
+
|
197
|
+
# http body (model)
|
198
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(api_key_payload)
|
199
|
+
|
200
|
+
# return_type
|
201
|
+
return_type = opts[:debug_return_type] || 'ApiKey'
|
202
|
+
|
203
|
+
# auth_names
|
204
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
205
|
+
|
206
|
+
new_options = opts.merge(
|
207
|
+
:operation => :"SecurityApi.security_apikeys_by_name_put",
|
208
|
+
:header_params => header_params,
|
209
|
+
:query_params => query_params,
|
210
|
+
:form_params => form_params,
|
211
|
+
:body => post_body,
|
212
|
+
:auth_names => auth_names,
|
213
|
+
:return_type => return_type
|
214
|
+
)
|
215
|
+
|
216
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
217
|
+
if @api_client.config.debugging
|
218
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_apikeys_by_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
219
|
+
end
|
220
|
+
return data, status_code, headers
|
221
|
+
end
|
222
|
+
|
223
|
+
# List ApiKeys
|
224
|
+
# List all your existing ApiKeys. Required Access Level: Security
|
225
|
+
# @param [Hash] opts the optional parameters
|
226
|
+
# @option opts [String] :subaccount Email of the subaccount of which ApiKeys should be loaded
|
227
|
+
# @return [Array<ApiKey>]
|
228
|
+
def security_apikeys_get(opts = {})
|
229
|
+
data, _status_code, _headers = security_apikeys_get_with_http_info(opts)
|
230
|
+
data
|
231
|
+
end
|
232
|
+
|
233
|
+
# List ApiKeys
|
234
|
+
# List all your existing ApiKeys. Required Access Level: Security
|
235
|
+
# @param [Hash] opts the optional parameters
|
236
|
+
# @option opts [String] :subaccount Email of the subaccount of which ApiKeys should be loaded
|
237
|
+
# @return [Array<(Array<ApiKey>, Integer, Hash)>] Array<ApiKey> data, response status code and response headers
|
238
|
+
def security_apikeys_get_with_http_info(opts = {})
|
239
|
+
if @api_client.config.debugging
|
240
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_apikeys_get ...'
|
241
|
+
end
|
242
|
+
# resource path
|
243
|
+
local_var_path = '/security/apikeys'
|
244
|
+
|
245
|
+
# query parameters
|
246
|
+
query_params = opts[:query_params] || {}
|
247
|
+
query_params[:'subaccount'] = opts[:'subaccount'] if !opts[:'subaccount'].nil?
|
248
|
+
|
249
|
+
# header parameters
|
250
|
+
header_params = opts[:header_params] || {}
|
251
|
+
# HTTP header 'Accept' (if needed)
|
252
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
253
|
+
|
254
|
+
# form parameters
|
255
|
+
form_params = opts[:form_params] || {}
|
256
|
+
|
257
|
+
# http body (model)
|
258
|
+
post_body = opts[:debug_body]
|
259
|
+
|
260
|
+
# return_type
|
261
|
+
return_type = opts[:debug_return_type] || 'Array<ApiKey>'
|
262
|
+
|
263
|
+
# auth_names
|
264
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
265
|
+
|
266
|
+
new_options = opts.merge(
|
267
|
+
:operation => :"SecurityApi.security_apikeys_get",
|
268
|
+
:header_params => header_params,
|
269
|
+
:query_params => query_params,
|
270
|
+
:form_params => form_params,
|
271
|
+
:body => post_body,
|
272
|
+
:auth_names => auth_names,
|
273
|
+
:return_type => return_type
|
274
|
+
)
|
275
|
+
|
276
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
277
|
+
if @api_client.config.debugging
|
278
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_apikeys_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
279
|
+
end
|
280
|
+
return data, status_code, headers
|
281
|
+
end
|
282
|
+
|
283
|
+
# Add ApiKey
|
284
|
+
# Add a new ApiKey. Required Access Level: Security
|
285
|
+
# @param api_key_payload [ApiKeyPayload]
|
286
|
+
# @param [Hash] opts the optional parameters
|
287
|
+
# @return [NewApiKey]
|
288
|
+
def security_apikeys_post(api_key_payload, opts = {})
|
289
|
+
data, _status_code, _headers = security_apikeys_post_with_http_info(api_key_payload, opts)
|
290
|
+
data
|
291
|
+
end
|
292
|
+
|
293
|
+
# Add ApiKey
|
294
|
+
# Add a new ApiKey. Required Access Level: Security
|
295
|
+
# @param api_key_payload [ApiKeyPayload]
|
296
|
+
# @param [Hash] opts the optional parameters
|
297
|
+
# @return [Array<(NewApiKey, Integer, Hash)>] NewApiKey data, response status code and response headers
|
298
|
+
def security_apikeys_post_with_http_info(api_key_payload, opts = {})
|
299
|
+
if @api_client.config.debugging
|
300
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_apikeys_post ...'
|
301
|
+
end
|
302
|
+
# verify the required parameter 'api_key_payload' is set
|
303
|
+
if @api_client.config.client_side_validation && api_key_payload.nil?
|
304
|
+
fail ArgumentError, "Missing the required parameter 'api_key_payload' when calling SecurityApi.security_apikeys_post"
|
305
|
+
end
|
306
|
+
# resource path
|
307
|
+
local_var_path = '/security/apikeys'
|
308
|
+
|
309
|
+
# query parameters
|
310
|
+
query_params = opts[:query_params] || {}
|
311
|
+
|
312
|
+
# header parameters
|
313
|
+
header_params = opts[:header_params] || {}
|
314
|
+
# HTTP header 'Accept' (if needed)
|
315
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
316
|
+
# HTTP header 'Content-Type'
|
317
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
318
|
+
|
319
|
+
# form parameters
|
320
|
+
form_params = opts[:form_params] || {}
|
321
|
+
|
322
|
+
# http body (model)
|
323
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(api_key_payload)
|
324
|
+
|
325
|
+
# return_type
|
326
|
+
return_type = opts[:debug_return_type] || 'NewApiKey'
|
327
|
+
|
328
|
+
# auth_names
|
329
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
330
|
+
|
331
|
+
new_options = opts.merge(
|
332
|
+
:operation => :"SecurityApi.security_apikeys_post",
|
333
|
+
:header_params => header_params,
|
334
|
+
:query_params => query_params,
|
335
|
+
:form_params => form_params,
|
336
|
+
:body => post_body,
|
337
|
+
:auth_names => auth_names,
|
338
|
+
:return_type => return_type
|
339
|
+
)
|
340
|
+
|
341
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
342
|
+
if @api_client.config.debugging
|
343
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_apikeys_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
344
|
+
end
|
345
|
+
return data, status_code, headers
|
346
|
+
end
|
347
|
+
|
348
|
+
# Delete SMTP Credential
|
349
|
+
# Delete your existing SMTP Credentials. Required Access Level: Security
|
350
|
+
# @param name [String] Name of the SMTP Credential
|
351
|
+
# @param [Hash] opts the optional parameters
|
352
|
+
# @option opts [String] :subaccount Email of the subaccount of which credential should be deleted
|
353
|
+
# @return [nil]
|
354
|
+
def security_smtp_by_name_delete(name, opts = {})
|
355
|
+
security_smtp_by_name_delete_with_http_info(name, opts)
|
356
|
+
nil
|
357
|
+
end
|
358
|
+
|
359
|
+
# Delete SMTP Credential
|
360
|
+
# Delete your existing SMTP Credentials. Required Access Level: Security
|
361
|
+
# @param name [String] Name of the SMTP Credential
|
362
|
+
# @param [Hash] opts the optional parameters
|
363
|
+
# @option opts [String] :subaccount Email of the subaccount of which credential should be deleted
|
364
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
365
|
+
def security_smtp_by_name_delete_with_http_info(name, opts = {})
|
366
|
+
if @api_client.config.debugging
|
367
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_smtp_by_name_delete ...'
|
368
|
+
end
|
369
|
+
# verify the required parameter 'name' is set
|
370
|
+
if @api_client.config.client_side_validation && name.nil?
|
371
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SecurityApi.security_smtp_by_name_delete"
|
372
|
+
end
|
373
|
+
# resource path
|
374
|
+
local_var_path = '/security/smtp/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
375
|
+
|
376
|
+
# query parameters
|
377
|
+
query_params = opts[:query_params] || {}
|
378
|
+
query_params[:'subaccount'] = opts[:'subaccount'] if !opts[:'subaccount'].nil?
|
379
|
+
|
380
|
+
# header parameters
|
381
|
+
header_params = opts[:header_params] || {}
|
382
|
+
|
383
|
+
# form parameters
|
384
|
+
form_params = opts[:form_params] || {}
|
385
|
+
|
386
|
+
# http body (model)
|
387
|
+
post_body = opts[:debug_body]
|
388
|
+
|
389
|
+
# return_type
|
390
|
+
return_type = opts[:debug_return_type]
|
391
|
+
|
392
|
+
# auth_names
|
393
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
394
|
+
|
395
|
+
new_options = opts.merge(
|
396
|
+
:operation => :"SecurityApi.security_smtp_by_name_delete",
|
397
|
+
:header_params => header_params,
|
398
|
+
:query_params => query_params,
|
399
|
+
:form_params => form_params,
|
400
|
+
:body => post_body,
|
401
|
+
:auth_names => auth_names,
|
402
|
+
:return_type => return_type
|
403
|
+
)
|
404
|
+
|
405
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
406
|
+
if @api_client.config.debugging
|
407
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_smtp_by_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
408
|
+
end
|
409
|
+
return data, status_code, headers
|
410
|
+
end
|
411
|
+
|
412
|
+
# Load SMTP Credential
|
413
|
+
# Load your existing SMTP Credential info. Required Access Level: Security
|
414
|
+
# @param name [String] Name of the SMTP Credential
|
415
|
+
# @param [Hash] opts the optional parameters
|
416
|
+
# @option opts [String] :subaccount Email of the subaccount of which credential should be loaded
|
417
|
+
# @return [SmtpCredentials]
|
418
|
+
def security_smtp_by_name_get(name, opts = {})
|
419
|
+
data, _status_code, _headers = security_smtp_by_name_get_with_http_info(name, opts)
|
420
|
+
data
|
421
|
+
end
|
422
|
+
|
423
|
+
# Load SMTP Credential
|
424
|
+
# Load your existing SMTP Credential info. Required Access Level: Security
|
425
|
+
# @param name [String] Name of the SMTP Credential
|
426
|
+
# @param [Hash] opts the optional parameters
|
427
|
+
# @option opts [String] :subaccount Email of the subaccount of which credential should be loaded
|
428
|
+
# @return [Array<(SmtpCredentials, Integer, Hash)>] SmtpCredentials data, response status code and response headers
|
429
|
+
def security_smtp_by_name_get_with_http_info(name, opts = {})
|
430
|
+
if @api_client.config.debugging
|
431
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_smtp_by_name_get ...'
|
432
|
+
end
|
433
|
+
# verify the required parameter 'name' is set
|
434
|
+
if @api_client.config.client_side_validation && name.nil?
|
435
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SecurityApi.security_smtp_by_name_get"
|
436
|
+
end
|
437
|
+
# resource path
|
438
|
+
local_var_path = '/security/smtp/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
439
|
+
|
440
|
+
# query parameters
|
441
|
+
query_params = opts[:query_params] || {}
|
442
|
+
query_params[:'subaccount'] = opts[:'subaccount'] if !opts[:'subaccount'].nil?
|
443
|
+
|
444
|
+
# header parameters
|
445
|
+
header_params = opts[:header_params] || {}
|
446
|
+
# HTTP header 'Accept' (if needed)
|
447
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
448
|
+
|
449
|
+
# form parameters
|
450
|
+
form_params = opts[:form_params] || {}
|
451
|
+
|
452
|
+
# http body (model)
|
453
|
+
post_body = opts[:debug_body]
|
454
|
+
|
455
|
+
# return_type
|
456
|
+
return_type = opts[:debug_return_type] || 'SmtpCredentials'
|
457
|
+
|
458
|
+
# auth_names
|
459
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
460
|
+
|
461
|
+
new_options = opts.merge(
|
462
|
+
:operation => :"SecurityApi.security_smtp_by_name_get",
|
463
|
+
:header_params => header_params,
|
464
|
+
:query_params => query_params,
|
465
|
+
:form_params => form_params,
|
466
|
+
:body => post_body,
|
467
|
+
:auth_names => auth_names,
|
468
|
+
:return_type => return_type
|
469
|
+
)
|
470
|
+
|
471
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
472
|
+
if @api_client.config.debugging
|
473
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_smtp_by_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
474
|
+
end
|
475
|
+
return data, status_code, headers
|
476
|
+
end
|
477
|
+
|
478
|
+
# Update SMTP Credential
|
479
|
+
# Update your existing SMTP Credentials. Required Access Level: Security
|
480
|
+
# @param name [String] Name of the SMTP Credential
|
481
|
+
# @param smtp_credentials_payload [SmtpCredentialsPayload]
|
482
|
+
# @param [Hash] opts the optional parameters
|
483
|
+
# @return [SmtpCredentials]
|
484
|
+
def security_smtp_by_name_put(name, smtp_credentials_payload, opts = {})
|
485
|
+
data, _status_code, _headers = security_smtp_by_name_put_with_http_info(name, smtp_credentials_payload, opts)
|
486
|
+
data
|
487
|
+
end
|
488
|
+
|
489
|
+
# Update SMTP Credential
|
490
|
+
# Update your existing SMTP Credentials. Required Access Level: Security
|
491
|
+
# @param name [String] Name of the SMTP Credential
|
492
|
+
# @param smtp_credentials_payload [SmtpCredentialsPayload]
|
493
|
+
# @param [Hash] opts the optional parameters
|
494
|
+
# @return [Array<(SmtpCredentials, Integer, Hash)>] SmtpCredentials data, response status code and response headers
|
495
|
+
def security_smtp_by_name_put_with_http_info(name, smtp_credentials_payload, opts = {})
|
496
|
+
if @api_client.config.debugging
|
497
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_smtp_by_name_put ...'
|
498
|
+
end
|
499
|
+
# verify the required parameter 'name' is set
|
500
|
+
if @api_client.config.client_side_validation && name.nil?
|
501
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SecurityApi.security_smtp_by_name_put"
|
502
|
+
end
|
503
|
+
# verify the required parameter 'smtp_credentials_payload' is set
|
504
|
+
if @api_client.config.client_side_validation && smtp_credentials_payload.nil?
|
505
|
+
fail ArgumentError, "Missing the required parameter 'smtp_credentials_payload' when calling SecurityApi.security_smtp_by_name_put"
|
506
|
+
end
|
507
|
+
# resource path
|
508
|
+
local_var_path = '/security/smtp/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
509
|
+
|
510
|
+
# query parameters
|
511
|
+
query_params = opts[:query_params] || {}
|
512
|
+
|
513
|
+
# header parameters
|
514
|
+
header_params = opts[:header_params] || {}
|
515
|
+
# HTTP header 'Accept' (if needed)
|
516
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
517
|
+
# HTTP header 'Content-Type'
|
518
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
519
|
+
|
520
|
+
# form parameters
|
521
|
+
form_params = opts[:form_params] || {}
|
522
|
+
|
523
|
+
# http body (model)
|
524
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(smtp_credentials_payload)
|
525
|
+
|
526
|
+
# return_type
|
527
|
+
return_type = opts[:debug_return_type] || 'SmtpCredentials'
|
528
|
+
|
529
|
+
# auth_names
|
530
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
531
|
+
|
532
|
+
new_options = opts.merge(
|
533
|
+
:operation => :"SecurityApi.security_smtp_by_name_put",
|
534
|
+
:header_params => header_params,
|
535
|
+
:query_params => query_params,
|
536
|
+
:form_params => form_params,
|
537
|
+
:body => post_body,
|
538
|
+
:auth_names => auth_names,
|
539
|
+
:return_type => return_type
|
540
|
+
)
|
541
|
+
|
542
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
543
|
+
if @api_client.config.debugging
|
544
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_smtp_by_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
545
|
+
end
|
546
|
+
return data, status_code, headers
|
547
|
+
end
|
548
|
+
|
549
|
+
# List SMTP Credentials
|
550
|
+
# List all your existing SMTP Credentials. Required Access Level: Security
|
551
|
+
# @param [Hash] opts the optional parameters
|
552
|
+
# @option opts [String] :subaccount Email of the subaccount of which credentials should be listed
|
553
|
+
# @return [Array<SmtpCredentials>]
|
554
|
+
def security_smtp_get(opts = {})
|
555
|
+
data, _status_code, _headers = security_smtp_get_with_http_info(opts)
|
556
|
+
data
|
557
|
+
end
|
558
|
+
|
559
|
+
# List SMTP Credentials
|
560
|
+
# List all your existing SMTP Credentials. Required Access Level: Security
|
561
|
+
# @param [Hash] opts the optional parameters
|
562
|
+
# @option opts [String] :subaccount Email of the subaccount of which credentials should be listed
|
563
|
+
# @return [Array<(Array<SmtpCredentials>, Integer, Hash)>] Array<SmtpCredentials> data, response status code and response headers
|
564
|
+
def security_smtp_get_with_http_info(opts = {})
|
565
|
+
if @api_client.config.debugging
|
566
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_smtp_get ...'
|
567
|
+
end
|
568
|
+
# resource path
|
569
|
+
local_var_path = '/security/smtp'
|
570
|
+
|
571
|
+
# query parameters
|
572
|
+
query_params = opts[:query_params] || {}
|
573
|
+
query_params[:'subaccount'] = opts[:'subaccount'] if !opts[:'subaccount'].nil?
|
574
|
+
|
575
|
+
# header parameters
|
576
|
+
header_params = opts[:header_params] || {}
|
577
|
+
# HTTP header 'Accept' (if needed)
|
578
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
579
|
+
|
580
|
+
# form parameters
|
581
|
+
form_params = opts[:form_params] || {}
|
582
|
+
|
583
|
+
# http body (model)
|
584
|
+
post_body = opts[:debug_body]
|
585
|
+
|
586
|
+
# return_type
|
587
|
+
return_type = opts[:debug_return_type] || 'Array<SmtpCredentials>'
|
588
|
+
|
589
|
+
# auth_names
|
590
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
591
|
+
|
592
|
+
new_options = opts.merge(
|
593
|
+
:operation => :"SecurityApi.security_smtp_get",
|
594
|
+
:header_params => header_params,
|
595
|
+
:query_params => query_params,
|
596
|
+
:form_params => form_params,
|
597
|
+
:body => post_body,
|
598
|
+
:auth_names => auth_names,
|
599
|
+
:return_type => return_type
|
600
|
+
)
|
601
|
+
|
602
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
603
|
+
if @api_client.config.debugging
|
604
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_smtp_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
605
|
+
end
|
606
|
+
return data, status_code, headers
|
607
|
+
end
|
608
|
+
|
609
|
+
# Add SMTP Credential
|
610
|
+
# Add new SMTP Credential. Required Access Level: Security
|
611
|
+
# @param smtp_credentials_payload [SmtpCredentialsPayload]
|
612
|
+
# @param [Hash] opts the optional parameters
|
613
|
+
# @return [NewSmtpCredentials]
|
614
|
+
def security_smtp_post(smtp_credentials_payload, opts = {})
|
615
|
+
data, _status_code, _headers = security_smtp_post_with_http_info(smtp_credentials_payload, opts)
|
616
|
+
data
|
617
|
+
end
|
618
|
+
|
619
|
+
# Add SMTP Credential
|
620
|
+
# Add new SMTP Credential. Required Access Level: Security
|
621
|
+
# @param smtp_credentials_payload [SmtpCredentialsPayload]
|
622
|
+
# @param [Hash] opts the optional parameters
|
623
|
+
# @return [Array<(NewSmtpCredentials, Integer, Hash)>] NewSmtpCredentials data, response status code and response headers
|
624
|
+
def security_smtp_post_with_http_info(smtp_credentials_payload, opts = {})
|
625
|
+
if @api_client.config.debugging
|
626
|
+
@api_client.config.logger.debug 'Calling API: SecurityApi.security_smtp_post ...'
|
627
|
+
end
|
628
|
+
# verify the required parameter 'smtp_credentials_payload' is set
|
629
|
+
if @api_client.config.client_side_validation && smtp_credentials_payload.nil?
|
630
|
+
fail ArgumentError, "Missing the required parameter 'smtp_credentials_payload' when calling SecurityApi.security_smtp_post"
|
631
|
+
end
|
632
|
+
# resource path
|
633
|
+
local_var_path = '/security/smtp'
|
634
|
+
|
635
|
+
# query parameters
|
636
|
+
query_params = opts[:query_params] || {}
|
637
|
+
|
638
|
+
# header parameters
|
639
|
+
header_params = opts[:header_params] || {}
|
640
|
+
# HTTP header 'Accept' (if needed)
|
641
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
642
|
+
# HTTP header 'Content-Type'
|
643
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
644
|
+
|
645
|
+
# form parameters
|
646
|
+
form_params = opts[:form_params] || {}
|
647
|
+
|
648
|
+
# http body (model)
|
649
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(smtp_credentials_payload)
|
650
|
+
|
651
|
+
# return_type
|
652
|
+
return_type = opts[:debug_return_type] || 'NewSmtpCredentials'
|
653
|
+
|
654
|
+
# auth_names
|
655
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
656
|
+
|
657
|
+
new_options = opts.merge(
|
658
|
+
:operation => :"SecurityApi.security_smtp_post",
|
659
|
+
:header_params => header_params,
|
660
|
+
:query_params => query_params,
|
661
|
+
:form_params => form_params,
|
662
|
+
:body => post_body,
|
663
|
+
:auth_names => auth_names,
|
664
|
+
:return_type => return_type
|
665
|
+
)
|
666
|
+
|
667
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
668
|
+
if @api_client.config.debugging
|
669
|
+
@api_client.config.logger.debug "API called: SecurityApi#security_smtp_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
670
|
+
end
|
671
|
+
return data, status_code, headers
|
672
|
+
end
|
673
|
+
end
|
674
|
+
end
|