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,280 @@
|
|
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 EmailsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# View Email
|
23
|
+
# Returns email details for viewing or rendering. Required Access Level: None
|
24
|
+
# @param msgid [String] Message identifier
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [EmailData]
|
27
|
+
def emails_by_msgid_view_get(msgid, opts = {})
|
28
|
+
data, _status_code, _headers = emails_by_msgid_view_get_with_http_info(msgid, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# View Email
|
33
|
+
# Returns email details for viewing or rendering. Required Access Level: None
|
34
|
+
# @param msgid [String] Message identifier
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(EmailData, Integer, Hash)>] EmailData data, response status code and response headers
|
37
|
+
def emails_by_msgid_view_get_with_http_info(msgid, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: EmailsApi.emails_by_msgid_view_get ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'msgid' is set
|
42
|
+
if @api_client.config.client_side_validation && msgid.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'msgid' when calling EmailsApi.emails_by_msgid_view_get"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/emails/{msgid}/view'.sub('{' + 'msgid' + '}', CGI.escape(msgid.to_s))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:debug_body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:debug_return_type] || 'EmailData'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:operation => :"EmailsApi.emails_by_msgid_view_get",
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: EmailsApi#emails_by_msgid_view_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
|
85
|
+
# Send Bulk Emails CSV
|
86
|
+
# Send bulk merge email. Required Access Level: SendHttp
|
87
|
+
# @param merge_email_payload [MergeEmailPayload] Email data
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [EmailSend]
|
90
|
+
def emails_mergefile_post(merge_email_payload, opts = {})
|
91
|
+
data, _status_code, _headers = emails_mergefile_post_with_http_info(merge_email_payload, opts)
|
92
|
+
data
|
93
|
+
end
|
94
|
+
|
95
|
+
# Send Bulk Emails CSV
|
96
|
+
# Send bulk merge email. Required Access Level: SendHttp
|
97
|
+
# @param merge_email_payload [MergeEmailPayload] Email data
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [Array<(EmailSend, Integer, Hash)>] EmailSend data, response status code and response headers
|
100
|
+
def emails_mergefile_post_with_http_info(merge_email_payload, opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug 'Calling API: EmailsApi.emails_mergefile_post ...'
|
103
|
+
end
|
104
|
+
# verify the required parameter 'merge_email_payload' is set
|
105
|
+
if @api_client.config.client_side_validation && merge_email_payload.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'merge_email_payload' when calling EmailsApi.emails_mergefile_post"
|
107
|
+
end
|
108
|
+
# resource path
|
109
|
+
local_var_path = '/emails/mergefile'
|
110
|
+
|
111
|
+
# query parameters
|
112
|
+
query_params = opts[:query_params] || {}
|
113
|
+
|
114
|
+
# header parameters
|
115
|
+
header_params = opts[:header_params] || {}
|
116
|
+
# HTTP header 'Accept' (if needed)
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
118
|
+
# HTTP header 'Content-Type'
|
119
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
120
|
+
|
121
|
+
# form parameters
|
122
|
+
form_params = opts[:form_params] || {}
|
123
|
+
|
124
|
+
# http body (model)
|
125
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(merge_email_payload)
|
126
|
+
|
127
|
+
# return_type
|
128
|
+
return_type = opts[:debug_return_type] || 'EmailSend'
|
129
|
+
|
130
|
+
# auth_names
|
131
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
132
|
+
|
133
|
+
new_options = opts.merge(
|
134
|
+
:operation => :"EmailsApi.emails_mergefile_post",
|
135
|
+
:header_params => header_params,
|
136
|
+
:query_params => query_params,
|
137
|
+
:form_params => form_params,
|
138
|
+
:body => post_body,
|
139
|
+
:auth_names => auth_names,
|
140
|
+
:return_type => return_type
|
141
|
+
)
|
142
|
+
|
143
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
144
|
+
if @api_client.config.debugging
|
145
|
+
@api_client.config.logger.debug "API called: EmailsApi#emails_mergefile_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
146
|
+
end
|
147
|
+
return data, status_code, headers
|
148
|
+
end
|
149
|
+
|
150
|
+
# Send Bulk Emails
|
151
|
+
# Send bulk merge email. Required Access Level: SendHttp
|
152
|
+
# @param email_message_data [EmailMessageData] Email data
|
153
|
+
# @param [Hash] opts the optional parameters
|
154
|
+
# @return [EmailSend]
|
155
|
+
def emails_post(email_message_data, opts = {})
|
156
|
+
data, _status_code, _headers = emails_post_with_http_info(email_message_data, opts)
|
157
|
+
data
|
158
|
+
end
|
159
|
+
|
160
|
+
# Send Bulk Emails
|
161
|
+
# Send bulk merge email. Required Access Level: SendHttp
|
162
|
+
# @param email_message_data [EmailMessageData] Email data
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @return [Array<(EmailSend, Integer, Hash)>] EmailSend data, response status code and response headers
|
165
|
+
def emails_post_with_http_info(email_message_data, opts = {})
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug 'Calling API: EmailsApi.emails_post ...'
|
168
|
+
end
|
169
|
+
# verify the required parameter 'email_message_data' is set
|
170
|
+
if @api_client.config.client_side_validation && email_message_data.nil?
|
171
|
+
fail ArgumentError, "Missing the required parameter 'email_message_data' when calling EmailsApi.emails_post"
|
172
|
+
end
|
173
|
+
# resource path
|
174
|
+
local_var_path = '/emails'
|
175
|
+
|
176
|
+
# query parameters
|
177
|
+
query_params = opts[:query_params] || {}
|
178
|
+
|
179
|
+
# header parameters
|
180
|
+
header_params = opts[:header_params] || {}
|
181
|
+
# HTTP header 'Accept' (if needed)
|
182
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
183
|
+
# HTTP header 'Content-Type'
|
184
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
185
|
+
|
186
|
+
# form parameters
|
187
|
+
form_params = opts[:form_params] || {}
|
188
|
+
|
189
|
+
# http body (model)
|
190
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(email_message_data)
|
191
|
+
|
192
|
+
# return_type
|
193
|
+
return_type = opts[:debug_return_type] || 'EmailSend'
|
194
|
+
|
195
|
+
# auth_names
|
196
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
197
|
+
|
198
|
+
new_options = opts.merge(
|
199
|
+
:operation => :"EmailsApi.emails_post",
|
200
|
+
:header_params => header_params,
|
201
|
+
:query_params => query_params,
|
202
|
+
:form_params => form_params,
|
203
|
+
:body => post_body,
|
204
|
+
:auth_names => auth_names,
|
205
|
+
:return_type => return_type
|
206
|
+
)
|
207
|
+
|
208
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
209
|
+
if @api_client.config.debugging
|
210
|
+
@api_client.config.logger.debug "API called: EmailsApi#emails_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
211
|
+
end
|
212
|
+
return data, status_code, headers
|
213
|
+
end
|
214
|
+
|
215
|
+
# Send Transactional Email
|
216
|
+
# Send transactional emails (recipients will be known to each other). Required Access Level: SendHttp
|
217
|
+
# @param email_transactional_message_data [EmailTransactionalMessageData] Email data
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @return [EmailSend]
|
220
|
+
def emails_transactional_post(email_transactional_message_data, opts = {})
|
221
|
+
data, _status_code, _headers = emails_transactional_post_with_http_info(email_transactional_message_data, opts)
|
222
|
+
data
|
223
|
+
end
|
224
|
+
|
225
|
+
# Send Transactional Email
|
226
|
+
# Send transactional emails (recipients will be known to each other). Required Access Level: SendHttp
|
227
|
+
# @param email_transactional_message_data [EmailTransactionalMessageData] Email data
|
228
|
+
# @param [Hash] opts the optional parameters
|
229
|
+
# @return [Array<(EmailSend, Integer, Hash)>] EmailSend data, response status code and response headers
|
230
|
+
def emails_transactional_post_with_http_info(email_transactional_message_data, opts = {})
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug 'Calling API: EmailsApi.emails_transactional_post ...'
|
233
|
+
end
|
234
|
+
# verify the required parameter 'email_transactional_message_data' is set
|
235
|
+
if @api_client.config.client_side_validation && email_transactional_message_data.nil?
|
236
|
+
fail ArgumentError, "Missing the required parameter 'email_transactional_message_data' when calling EmailsApi.emails_transactional_post"
|
237
|
+
end
|
238
|
+
# resource path
|
239
|
+
local_var_path = '/emails/transactional'
|
240
|
+
|
241
|
+
# query parameters
|
242
|
+
query_params = opts[:query_params] || {}
|
243
|
+
|
244
|
+
# header parameters
|
245
|
+
header_params = opts[:header_params] || {}
|
246
|
+
# HTTP header 'Accept' (if needed)
|
247
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
248
|
+
# HTTP header 'Content-Type'
|
249
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
250
|
+
|
251
|
+
# form parameters
|
252
|
+
form_params = opts[:form_params] || {}
|
253
|
+
|
254
|
+
# http body (model)
|
255
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(email_transactional_message_data)
|
256
|
+
|
257
|
+
# return_type
|
258
|
+
return_type = opts[:debug_return_type] || 'EmailSend'
|
259
|
+
|
260
|
+
# auth_names
|
261
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
262
|
+
|
263
|
+
new_options = opts.merge(
|
264
|
+
:operation => :"EmailsApi.emails_transactional_post",
|
265
|
+
:header_params => header_params,
|
266
|
+
:query_params => query_params,
|
267
|
+
:form_params => form_params,
|
268
|
+
:body => post_body,
|
269
|
+
:auth_names => auth_names,
|
270
|
+
:return_type => return_type
|
271
|
+
)
|
272
|
+
|
273
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug "API called: EmailsApi#emails_transactional_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
276
|
+
end
|
277
|
+
return data, status_code, headers
|
278
|
+
end
|
279
|
+
end
|
280
|
+
end
|
@@ -0,0 +1,538 @@
|
|
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 EventsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Load Email Events
|
23
|
+
# Returns a log of delivery events for the specific transaction ID. Required Access Level: ViewReports
|
24
|
+
# @param transactionid [String] ID number of transaction
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
27
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
28
|
+
# @option opts [EventsOrderBy] :order_by
|
29
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
30
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
31
|
+
# @return [Array<RecipientEvent>]
|
32
|
+
def events_by_transactionid_get(transactionid, opts = {})
|
33
|
+
data, _status_code, _headers = events_by_transactionid_get_with_http_info(transactionid, opts)
|
34
|
+
data
|
35
|
+
end
|
36
|
+
|
37
|
+
# Load Email Events
|
38
|
+
# Returns a log of delivery events for the specific transaction ID. Required Access Level: ViewReports
|
39
|
+
# @param transactionid [String] ID number of transaction
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
42
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
43
|
+
# @option opts [EventsOrderBy] :order_by
|
44
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
45
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
46
|
+
# @return [Array<(Array<RecipientEvent>, Integer, Hash)>] Array<RecipientEvent> data, response status code and response headers
|
47
|
+
def events_by_transactionid_get_with_http_info(transactionid, opts = {})
|
48
|
+
if @api_client.config.debugging
|
49
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_by_transactionid_get ...'
|
50
|
+
end
|
51
|
+
# verify the required parameter 'transactionid' is set
|
52
|
+
if @api_client.config.client_side_validation && transactionid.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'transactionid' when calling EventsApi.events_by_transactionid_get"
|
54
|
+
end
|
55
|
+
# resource path
|
56
|
+
local_var_path = '/events/{transactionid}'.sub('{' + 'transactionid' + '}', CGI.escape(transactionid.to_s))
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = opts[:query_params] || {}
|
60
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
61
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
62
|
+
query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].nil?
|
63
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
64
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
65
|
+
|
66
|
+
# header parameters
|
67
|
+
header_params = opts[:header_params] || {}
|
68
|
+
# HTTP header 'Accept' (if needed)
|
69
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
70
|
+
|
71
|
+
# form parameters
|
72
|
+
form_params = opts[:form_params] || {}
|
73
|
+
|
74
|
+
# http body (model)
|
75
|
+
post_body = opts[:debug_body]
|
76
|
+
|
77
|
+
# return_type
|
78
|
+
return_type = opts[:debug_return_type] || 'Array<RecipientEvent>'
|
79
|
+
|
80
|
+
# auth_names
|
81
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
82
|
+
|
83
|
+
new_options = opts.merge(
|
84
|
+
:operation => :"EventsApi.events_by_transactionid_get",
|
85
|
+
:header_params => header_params,
|
86
|
+
:query_params => query_params,
|
87
|
+
:form_params => form_params,
|
88
|
+
:body => post_body,
|
89
|
+
:auth_names => auth_names,
|
90
|
+
:return_type => return_type
|
91
|
+
)
|
92
|
+
|
93
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug "API called: EventsApi#events_by_transactionid_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
96
|
+
end
|
97
|
+
return data, status_code, headers
|
98
|
+
end
|
99
|
+
|
100
|
+
# Export Channel Events
|
101
|
+
# Export delivery events log information to the specified file format. Required Access Level: Export
|
102
|
+
# @param name [String] Name of selected channel.
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @option opts [Array<EventType>] :event_types Types of Events to return
|
105
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
106
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
107
|
+
# @option opts [ExportFileFormats] :file_format Format of the exported file
|
108
|
+
# @option opts [CompressionFormat] :compression_format FileResponse compression format. None or Zip.
|
109
|
+
# @option opts [String] :file_name Name of your file including extension.
|
110
|
+
# @return [ExportLink]
|
111
|
+
def events_channels_by_name_export_post(name, opts = {})
|
112
|
+
data, _status_code, _headers = events_channels_by_name_export_post_with_http_info(name, opts)
|
113
|
+
data
|
114
|
+
end
|
115
|
+
|
116
|
+
# Export Channel Events
|
117
|
+
# Export delivery events log information to the specified file format. Required Access Level: Export
|
118
|
+
# @param name [String] Name of selected channel.
|
119
|
+
# @param [Hash] opts the optional parameters
|
120
|
+
# @option opts [Array<EventType>] :event_types Types of Events to return
|
121
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
122
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
123
|
+
# @option opts [ExportFileFormats] :file_format Format of the exported file
|
124
|
+
# @option opts [CompressionFormat] :compression_format FileResponse compression format. None or Zip.
|
125
|
+
# @option opts [String] :file_name Name of your file including extension.
|
126
|
+
# @return [Array<(ExportLink, Integer, Hash)>] ExportLink data, response status code and response headers
|
127
|
+
def events_channels_by_name_export_post_with_http_info(name, opts = {})
|
128
|
+
if @api_client.config.debugging
|
129
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_channels_by_name_export_post ...'
|
130
|
+
end
|
131
|
+
# verify the required parameter 'name' is set
|
132
|
+
if @api_client.config.client_side_validation && name.nil?
|
133
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling EventsApi.events_channels_by_name_export_post"
|
134
|
+
end
|
135
|
+
# resource path
|
136
|
+
local_var_path = '/events/channels/{name}/export'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
137
|
+
|
138
|
+
# query parameters
|
139
|
+
query_params = opts[:query_params] || {}
|
140
|
+
query_params[:'eventTypes'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
141
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
142
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
143
|
+
query_params[:'fileFormat'] = opts[:'file_format'] if !opts[:'file_format'].nil?
|
144
|
+
query_params[:'compressionFormat'] = opts[:'compression_format'] if !opts[:'compression_format'].nil?
|
145
|
+
query_params[:'fileName'] = opts[:'file_name'] if !opts[:'file_name'].nil?
|
146
|
+
|
147
|
+
# header parameters
|
148
|
+
header_params = opts[:header_params] || {}
|
149
|
+
# HTTP header 'Accept' (if needed)
|
150
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
151
|
+
|
152
|
+
# form parameters
|
153
|
+
form_params = opts[:form_params] || {}
|
154
|
+
|
155
|
+
# http body (model)
|
156
|
+
post_body = opts[:debug_body]
|
157
|
+
|
158
|
+
# return_type
|
159
|
+
return_type = opts[:debug_return_type] || 'ExportLink'
|
160
|
+
|
161
|
+
# auth_names
|
162
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
163
|
+
|
164
|
+
new_options = opts.merge(
|
165
|
+
:operation => :"EventsApi.events_channels_by_name_export_post",
|
166
|
+
:header_params => header_params,
|
167
|
+
:query_params => query_params,
|
168
|
+
:form_params => form_params,
|
169
|
+
:body => post_body,
|
170
|
+
:auth_names => auth_names,
|
171
|
+
:return_type => return_type
|
172
|
+
)
|
173
|
+
|
174
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug "API called: EventsApi#events_channels_by_name_export_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
177
|
+
end
|
178
|
+
return data, status_code, headers
|
179
|
+
end
|
180
|
+
|
181
|
+
# Load Channel Events
|
182
|
+
# Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
|
183
|
+
# @param name [String] Name of selected channel.
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @option opts [Array<EventType>] :event_types Types of Events to return
|
186
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
187
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
188
|
+
# @option opts [EventsOrderBy] :order_by
|
189
|
+
# @option opts [Integer] :limit How many items to load. Maximum for this request is 1000 items
|
190
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
191
|
+
# @return [Array<RecipientEvent>]
|
192
|
+
def events_channels_by_name_get(name, opts = {})
|
193
|
+
data, _status_code, _headers = events_channels_by_name_get_with_http_info(name, opts)
|
194
|
+
data
|
195
|
+
end
|
196
|
+
|
197
|
+
# Load Channel Events
|
198
|
+
# Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
|
199
|
+
# @param name [String] Name of selected channel.
|
200
|
+
# @param [Hash] opts the optional parameters
|
201
|
+
# @option opts [Array<EventType>] :event_types Types of Events to return
|
202
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
203
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
204
|
+
# @option opts [EventsOrderBy] :order_by
|
205
|
+
# @option opts [Integer] :limit How many items to load. Maximum for this request is 1000 items
|
206
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
207
|
+
# @return [Array<(Array<RecipientEvent>, Integer, Hash)>] Array<RecipientEvent> data, response status code and response headers
|
208
|
+
def events_channels_by_name_get_with_http_info(name, opts = {})
|
209
|
+
if @api_client.config.debugging
|
210
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_channels_by_name_get ...'
|
211
|
+
end
|
212
|
+
# verify the required parameter 'name' is set
|
213
|
+
if @api_client.config.client_side_validation && name.nil?
|
214
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling EventsApi.events_channels_by_name_get"
|
215
|
+
end
|
216
|
+
# resource path
|
217
|
+
local_var_path = '/events/channels/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
218
|
+
|
219
|
+
# query parameters
|
220
|
+
query_params = opts[:query_params] || {}
|
221
|
+
query_params[:'eventTypes'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
222
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
223
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
224
|
+
query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].nil?
|
225
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
226
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
227
|
+
|
228
|
+
# header parameters
|
229
|
+
header_params = opts[:header_params] || {}
|
230
|
+
# HTTP header 'Accept' (if needed)
|
231
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
232
|
+
|
233
|
+
# form parameters
|
234
|
+
form_params = opts[:form_params] || {}
|
235
|
+
|
236
|
+
# http body (model)
|
237
|
+
post_body = opts[:debug_body]
|
238
|
+
|
239
|
+
# return_type
|
240
|
+
return_type = opts[:debug_return_type] || 'Array<RecipientEvent>'
|
241
|
+
|
242
|
+
# auth_names
|
243
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
244
|
+
|
245
|
+
new_options = opts.merge(
|
246
|
+
:operation => :"EventsApi.events_channels_by_name_get",
|
247
|
+
:header_params => header_params,
|
248
|
+
:query_params => query_params,
|
249
|
+
:form_params => form_params,
|
250
|
+
:body => post_body,
|
251
|
+
:auth_names => auth_names,
|
252
|
+
:return_type => return_type
|
253
|
+
)
|
254
|
+
|
255
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
256
|
+
if @api_client.config.debugging
|
257
|
+
@api_client.config.logger.debug "API called: EventsApi#events_channels_by_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
258
|
+
end
|
259
|
+
return data, status_code, headers
|
260
|
+
end
|
261
|
+
|
262
|
+
# Check Channel Export Status
|
263
|
+
# Check the current status of the channel export. Required Access Level: Export
|
264
|
+
# @param id [String] ID of the exported file
|
265
|
+
# @param [Hash] opts the optional parameters
|
266
|
+
# @return [ExportStatus]
|
267
|
+
def events_channels_export_by_id_status_get(id, opts = {})
|
268
|
+
data, _status_code, _headers = events_channels_export_by_id_status_get_with_http_info(id, opts)
|
269
|
+
data
|
270
|
+
end
|
271
|
+
|
272
|
+
# Check Channel Export Status
|
273
|
+
# Check the current status of the channel export. Required Access Level: Export
|
274
|
+
# @param id [String] ID of the exported file
|
275
|
+
# @param [Hash] opts the optional parameters
|
276
|
+
# @return [Array<(ExportStatus, Integer, Hash)>] ExportStatus data, response status code and response headers
|
277
|
+
def events_channels_export_by_id_status_get_with_http_info(id, opts = {})
|
278
|
+
if @api_client.config.debugging
|
279
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_channels_export_by_id_status_get ...'
|
280
|
+
end
|
281
|
+
# verify the required parameter 'id' is set
|
282
|
+
if @api_client.config.client_side_validation && id.nil?
|
283
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling EventsApi.events_channels_export_by_id_status_get"
|
284
|
+
end
|
285
|
+
# resource path
|
286
|
+
local_var_path = '/events/channels/export/{id}/status'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
287
|
+
|
288
|
+
# query parameters
|
289
|
+
query_params = opts[:query_params] || {}
|
290
|
+
|
291
|
+
# header parameters
|
292
|
+
header_params = opts[:header_params] || {}
|
293
|
+
# HTTP header 'Accept' (if needed)
|
294
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
295
|
+
|
296
|
+
# form parameters
|
297
|
+
form_params = opts[:form_params] || {}
|
298
|
+
|
299
|
+
# http body (model)
|
300
|
+
post_body = opts[:debug_body]
|
301
|
+
|
302
|
+
# return_type
|
303
|
+
return_type = opts[:debug_return_type] || 'ExportStatus'
|
304
|
+
|
305
|
+
# auth_names
|
306
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
307
|
+
|
308
|
+
new_options = opts.merge(
|
309
|
+
:operation => :"EventsApi.events_channels_export_by_id_status_get",
|
310
|
+
:header_params => header_params,
|
311
|
+
:query_params => query_params,
|
312
|
+
:form_params => form_params,
|
313
|
+
:body => post_body,
|
314
|
+
:auth_names => auth_names,
|
315
|
+
:return_type => return_type
|
316
|
+
)
|
317
|
+
|
318
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
319
|
+
if @api_client.config.debugging
|
320
|
+
@api_client.config.logger.debug "API called: EventsApi#events_channels_export_by_id_status_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
321
|
+
end
|
322
|
+
return data, status_code, headers
|
323
|
+
end
|
324
|
+
|
325
|
+
# Check Export Status
|
326
|
+
# Check the current status of the export. Required Access Level: Export
|
327
|
+
# @param id [String] ID of the exported file
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @return [ExportStatus]
|
330
|
+
def events_export_by_id_status_get(id, opts = {})
|
331
|
+
data, _status_code, _headers = events_export_by_id_status_get_with_http_info(id, opts)
|
332
|
+
data
|
333
|
+
end
|
334
|
+
|
335
|
+
# Check Export Status
|
336
|
+
# Check the current status of the export. Required Access Level: Export
|
337
|
+
# @param id [String] ID of the exported file
|
338
|
+
# @param [Hash] opts the optional parameters
|
339
|
+
# @return [Array<(ExportStatus, Integer, Hash)>] ExportStatus data, response status code and response headers
|
340
|
+
def events_export_by_id_status_get_with_http_info(id, opts = {})
|
341
|
+
if @api_client.config.debugging
|
342
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_export_by_id_status_get ...'
|
343
|
+
end
|
344
|
+
# verify the required parameter 'id' is set
|
345
|
+
if @api_client.config.client_side_validation && id.nil?
|
346
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling EventsApi.events_export_by_id_status_get"
|
347
|
+
end
|
348
|
+
# resource path
|
349
|
+
local_var_path = '/events/export/{id}/status'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
350
|
+
|
351
|
+
# query parameters
|
352
|
+
query_params = opts[:query_params] || {}
|
353
|
+
|
354
|
+
# header parameters
|
355
|
+
header_params = opts[:header_params] || {}
|
356
|
+
# HTTP header 'Accept' (if needed)
|
357
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
358
|
+
|
359
|
+
# form parameters
|
360
|
+
form_params = opts[:form_params] || {}
|
361
|
+
|
362
|
+
# http body (model)
|
363
|
+
post_body = opts[:debug_body]
|
364
|
+
|
365
|
+
# return_type
|
366
|
+
return_type = opts[:debug_return_type] || 'ExportStatus'
|
367
|
+
|
368
|
+
# auth_names
|
369
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
370
|
+
|
371
|
+
new_options = opts.merge(
|
372
|
+
:operation => :"EventsApi.events_export_by_id_status_get",
|
373
|
+
:header_params => header_params,
|
374
|
+
:query_params => query_params,
|
375
|
+
:form_params => form_params,
|
376
|
+
:body => post_body,
|
377
|
+
:auth_names => auth_names,
|
378
|
+
:return_type => return_type
|
379
|
+
)
|
380
|
+
|
381
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
382
|
+
if @api_client.config.debugging
|
383
|
+
@api_client.config.logger.debug "API called: EventsApi#events_export_by_id_status_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
384
|
+
end
|
385
|
+
return data, status_code, headers
|
386
|
+
end
|
387
|
+
|
388
|
+
# Export Events
|
389
|
+
# Export delivery events log information to the specified file format. Required Access Level: Export
|
390
|
+
# @param [Hash] opts the optional parameters
|
391
|
+
# @option opts [Array<EventType>] :event_types Types of Events to return
|
392
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
393
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
394
|
+
# @option opts [ExportFileFormats] :file_format Format of the exported file
|
395
|
+
# @option opts [CompressionFormat] :compression_format FileResponse compression format. None or Zip.
|
396
|
+
# @option opts [String] :file_name Name of your file including extension.
|
397
|
+
# @return [ExportLink]
|
398
|
+
def events_export_post(opts = {})
|
399
|
+
data, _status_code, _headers = events_export_post_with_http_info(opts)
|
400
|
+
data
|
401
|
+
end
|
402
|
+
|
403
|
+
# Export Events
|
404
|
+
# Export delivery events log information to the specified file format. Required Access Level: Export
|
405
|
+
# @param [Hash] opts the optional parameters
|
406
|
+
# @option opts [Array<EventType>] :event_types Types of Events to return
|
407
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
408
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
409
|
+
# @option opts [ExportFileFormats] :file_format Format of the exported file
|
410
|
+
# @option opts [CompressionFormat] :compression_format FileResponse compression format. None or Zip.
|
411
|
+
# @option opts [String] :file_name Name of your file including extension.
|
412
|
+
# @return [Array<(ExportLink, Integer, Hash)>] ExportLink data, response status code and response headers
|
413
|
+
def events_export_post_with_http_info(opts = {})
|
414
|
+
if @api_client.config.debugging
|
415
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_export_post ...'
|
416
|
+
end
|
417
|
+
# resource path
|
418
|
+
local_var_path = '/events/export'
|
419
|
+
|
420
|
+
# query parameters
|
421
|
+
query_params = opts[:query_params] || {}
|
422
|
+
query_params[:'eventTypes'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
423
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
424
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
425
|
+
query_params[:'fileFormat'] = opts[:'file_format'] if !opts[:'file_format'].nil?
|
426
|
+
query_params[:'compressionFormat'] = opts[:'compression_format'] if !opts[:'compression_format'].nil?
|
427
|
+
query_params[:'fileName'] = opts[:'file_name'] if !opts[:'file_name'].nil?
|
428
|
+
|
429
|
+
# header parameters
|
430
|
+
header_params = opts[:header_params] || {}
|
431
|
+
# HTTP header 'Accept' (if needed)
|
432
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
433
|
+
|
434
|
+
# form parameters
|
435
|
+
form_params = opts[:form_params] || {}
|
436
|
+
|
437
|
+
# http body (model)
|
438
|
+
post_body = opts[:debug_body]
|
439
|
+
|
440
|
+
# return_type
|
441
|
+
return_type = opts[:debug_return_type] || 'ExportLink'
|
442
|
+
|
443
|
+
# auth_names
|
444
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
445
|
+
|
446
|
+
new_options = opts.merge(
|
447
|
+
:operation => :"EventsApi.events_export_post",
|
448
|
+
:header_params => header_params,
|
449
|
+
:query_params => query_params,
|
450
|
+
:form_params => form_params,
|
451
|
+
:body => post_body,
|
452
|
+
:auth_names => auth_names,
|
453
|
+
:return_type => return_type
|
454
|
+
)
|
455
|
+
|
456
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
457
|
+
if @api_client.config.debugging
|
458
|
+
@api_client.config.logger.debug "API called: EventsApi#events_export_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
459
|
+
end
|
460
|
+
return data, status_code, headers
|
461
|
+
end
|
462
|
+
|
463
|
+
# Load Events
|
464
|
+
# Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
|
465
|
+
# @param [Hash] opts the optional parameters
|
466
|
+
# @option opts [Array<EventType>] :event_types Types of Events to return
|
467
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
468
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
469
|
+
# @option opts [EventsOrderBy] :order_by
|
470
|
+
# @option opts [Integer] :limit How many items to load. Maximum for this request is 1000 items
|
471
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
472
|
+
# @return [Array<RecipientEvent>]
|
473
|
+
def events_get(opts = {})
|
474
|
+
data, _status_code, _headers = events_get_with_http_info(opts)
|
475
|
+
data
|
476
|
+
end
|
477
|
+
|
478
|
+
# Load Events
|
479
|
+
# Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
|
480
|
+
# @param [Hash] opts the optional parameters
|
481
|
+
# @option opts [Array<EventType>] :event_types Types of Events to return
|
482
|
+
# @option opts [Time] :from Starting date for search in YYYY-MM-DDThh:mm:ss format.
|
483
|
+
# @option opts [Time] :to Ending date for search in YYYY-MM-DDThh:mm:ss format.
|
484
|
+
# @option opts [EventsOrderBy] :order_by
|
485
|
+
# @option opts [Integer] :limit How many items to load. Maximum for this request is 1000 items
|
486
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
487
|
+
# @return [Array<(Array<RecipientEvent>, Integer, Hash)>] Array<RecipientEvent> data, response status code and response headers
|
488
|
+
def events_get_with_http_info(opts = {})
|
489
|
+
if @api_client.config.debugging
|
490
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_get ...'
|
491
|
+
end
|
492
|
+
# resource path
|
493
|
+
local_var_path = '/events'
|
494
|
+
|
495
|
+
# query parameters
|
496
|
+
query_params = opts[:query_params] || {}
|
497
|
+
query_params[:'eventTypes'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
|
498
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
499
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
500
|
+
query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].nil?
|
501
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
502
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
503
|
+
|
504
|
+
# header parameters
|
505
|
+
header_params = opts[:header_params] || {}
|
506
|
+
# HTTP header 'Accept' (if needed)
|
507
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
508
|
+
|
509
|
+
# form parameters
|
510
|
+
form_params = opts[:form_params] || {}
|
511
|
+
|
512
|
+
# http body (model)
|
513
|
+
post_body = opts[:debug_body]
|
514
|
+
|
515
|
+
# return_type
|
516
|
+
return_type = opts[:debug_return_type] || 'Array<RecipientEvent>'
|
517
|
+
|
518
|
+
# auth_names
|
519
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
520
|
+
|
521
|
+
new_options = opts.merge(
|
522
|
+
:operation => :"EventsApi.events_get",
|
523
|
+
:header_params => header_params,
|
524
|
+
:query_params => query_params,
|
525
|
+
:form_params => form_params,
|
526
|
+
:body => post_body,
|
527
|
+
:auth_names => auth_names,
|
528
|
+
:return_type => return_type
|
529
|
+
)
|
530
|
+
|
531
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
532
|
+
if @api_client.config.debugging
|
533
|
+
@api_client.config.logger.debug "API called: EventsApi#events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
534
|
+
end
|
535
|
+
return data, status_code, headers
|
536
|
+
end
|
537
|
+
end
|
538
|
+
end
|