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
data/lib/ElasticEmail.rb
ADDED
@@ -0,0 +1,137 @@
|
|
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
|
+
# Common files
|
14
|
+
require 'ElasticEmail/api_client'
|
15
|
+
require 'ElasticEmail/api_error'
|
16
|
+
require 'ElasticEmail/version'
|
17
|
+
require 'ElasticEmail/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'ElasticEmail/models/access_level'
|
21
|
+
require 'ElasticEmail/models/account_status_enum'
|
22
|
+
require 'ElasticEmail/models/api_key'
|
23
|
+
require 'ElasticEmail/models/api_key_payload'
|
24
|
+
require 'ElasticEmail/models/body_content_type'
|
25
|
+
require 'ElasticEmail/models/body_part'
|
26
|
+
require 'ElasticEmail/models/campaign'
|
27
|
+
require 'ElasticEmail/models/campaign_options'
|
28
|
+
require 'ElasticEmail/models/campaign_recipient'
|
29
|
+
require 'ElasticEmail/models/campaign_status'
|
30
|
+
require 'ElasticEmail/models/campaign_template'
|
31
|
+
require 'ElasticEmail/models/channel_log_status_summary'
|
32
|
+
require 'ElasticEmail/models/compression_format'
|
33
|
+
require 'ElasticEmail/models/consent_data'
|
34
|
+
require 'ElasticEmail/models/consent_tracking'
|
35
|
+
require 'ElasticEmail/models/contact'
|
36
|
+
require 'ElasticEmail/models/contact_activity'
|
37
|
+
require 'ElasticEmail/models/contact_hist_event_type'
|
38
|
+
require 'ElasticEmail/models/contact_history'
|
39
|
+
require 'ElasticEmail/models/contact_payload'
|
40
|
+
require 'ElasticEmail/models/contact_source'
|
41
|
+
require 'ElasticEmail/models/contact_status'
|
42
|
+
require 'ElasticEmail/models/contact_update_payload'
|
43
|
+
require 'ElasticEmail/models/contacts_list'
|
44
|
+
require 'ElasticEmail/models/delivery_optimization_type'
|
45
|
+
require 'ElasticEmail/models/email_content'
|
46
|
+
require 'ElasticEmail/models/email_data'
|
47
|
+
require 'ElasticEmail/models/email_message_data'
|
48
|
+
require 'ElasticEmail/models/email_recipient'
|
49
|
+
require 'ElasticEmail/models/email_send'
|
50
|
+
require 'ElasticEmail/models/email_status'
|
51
|
+
require 'ElasticEmail/models/email_transactional_message_data'
|
52
|
+
require 'ElasticEmail/models/email_validation_result'
|
53
|
+
require 'ElasticEmail/models/email_validation_status'
|
54
|
+
require 'ElasticEmail/models/email_view'
|
55
|
+
require 'ElasticEmail/models/emails_payload'
|
56
|
+
require 'ElasticEmail/models/encoding_type'
|
57
|
+
require 'ElasticEmail/models/event_type'
|
58
|
+
require 'ElasticEmail/models/events_order_by'
|
59
|
+
require 'ElasticEmail/models/export_file_formats'
|
60
|
+
require 'ElasticEmail/models/export_link'
|
61
|
+
require 'ElasticEmail/models/export_status'
|
62
|
+
require 'ElasticEmail/models/file_info'
|
63
|
+
require 'ElasticEmail/models/file_payload'
|
64
|
+
require 'ElasticEmail/models/file_upload_result'
|
65
|
+
require 'ElasticEmail/models/inbound_payload'
|
66
|
+
require 'ElasticEmail/models/inbound_route'
|
67
|
+
require 'ElasticEmail/models/inbound_route_action_type'
|
68
|
+
require 'ElasticEmail/models/inbound_route_filter_type'
|
69
|
+
require 'ElasticEmail/models/list_payload'
|
70
|
+
require 'ElasticEmail/models/list_update_payload'
|
71
|
+
require 'ElasticEmail/models/log_job_status'
|
72
|
+
require 'ElasticEmail/models/log_status_summary'
|
73
|
+
require 'ElasticEmail/models/merge_email_payload'
|
74
|
+
require 'ElasticEmail/models/message_attachment'
|
75
|
+
require 'ElasticEmail/models/message_category'
|
76
|
+
require 'ElasticEmail/models/new_api_key'
|
77
|
+
require 'ElasticEmail/models/new_smtp_credentials'
|
78
|
+
require 'ElasticEmail/models/options'
|
79
|
+
require 'ElasticEmail/models/recipient_event'
|
80
|
+
require 'ElasticEmail/models/segment'
|
81
|
+
require 'ElasticEmail/models/segment_payload'
|
82
|
+
require 'ElasticEmail/models/smtp_credentials'
|
83
|
+
require 'ElasticEmail/models/smtp_credentials_payload'
|
84
|
+
require 'ElasticEmail/models/sort_order_item'
|
85
|
+
require 'ElasticEmail/models/split_optimization_type'
|
86
|
+
require 'ElasticEmail/models/split_options'
|
87
|
+
require 'ElasticEmail/models/sub_account_info'
|
88
|
+
require 'ElasticEmail/models/subaccount_email_credits_payload'
|
89
|
+
require 'ElasticEmail/models/subaccount_email_settings'
|
90
|
+
require 'ElasticEmail/models/subaccount_email_settings_payload'
|
91
|
+
require 'ElasticEmail/models/subaccount_payload'
|
92
|
+
require 'ElasticEmail/models/subaccount_settings_info'
|
93
|
+
require 'ElasticEmail/models/subaccount_settings_info_payload'
|
94
|
+
require 'ElasticEmail/models/suppression'
|
95
|
+
require 'ElasticEmail/models/template'
|
96
|
+
require 'ElasticEmail/models/template_payload'
|
97
|
+
require 'ElasticEmail/models/template_scope_type'
|
98
|
+
require 'ElasticEmail/models/template_type'
|
99
|
+
require 'ElasticEmail/models/transactional_recipient'
|
100
|
+
require 'ElasticEmail/models/utm'
|
101
|
+
require 'ElasticEmail/models/verification_file_result'
|
102
|
+
require 'ElasticEmail/models/verification_file_result_details'
|
103
|
+
require 'ElasticEmail/models/verification_status'
|
104
|
+
|
105
|
+
# APIs
|
106
|
+
require 'ElasticEmail/api/campaigns_api'
|
107
|
+
require 'ElasticEmail/api/contacts_api'
|
108
|
+
require 'ElasticEmail/api/emails_api'
|
109
|
+
require 'ElasticEmail/api/events_api'
|
110
|
+
require 'ElasticEmail/api/files_api'
|
111
|
+
require 'ElasticEmail/api/inbound_route_api'
|
112
|
+
require 'ElasticEmail/api/lists_api'
|
113
|
+
require 'ElasticEmail/api/security_api'
|
114
|
+
require 'ElasticEmail/api/segments_api'
|
115
|
+
require 'ElasticEmail/api/statistics_api'
|
116
|
+
require 'ElasticEmail/api/sub_accounts_api'
|
117
|
+
require 'ElasticEmail/api/suppressions_api'
|
118
|
+
require 'ElasticEmail/api/templates_api'
|
119
|
+
require 'ElasticEmail/api/verifications_api'
|
120
|
+
|
121
|
+
module ElasticEmail
|
122
|
+
class << self
|
123
|
+
# Customize default settings for the SDK using block.
|
124
|
+
# ElasticEmail.configure do |config|
|
125
|
+
# config.username = "xxx"
|
126
|
+
# config.password = "xxx"
|
127
|
+
# end
|
128
|
+
# If no block given, return the default Configuration object.
|
129
|
+
def configure
|
130
|
+
if block_given?
|
131
|
+
yield(Configuration.default)
|
132
|
+
else
|
133
|
+
Configuration.default
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
@@ -0,0 +1,348 @@
|
|
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 CampaignsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete Campaign
|
23
|
+
# Delete the specific campaign. This does not cancel in progress email, see Cancel In Progress. Required Access Level: ModifyCampaigns
|
24
|
+
# @param name [String] Name of Campaign to delete
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [nil]
|
27
|
+
def campaigns_by_name_delete(name, opts = {})
|
28
|
+
campaigns_by_name_delete_with_http_info(name, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete Campaign
|
33
|
+
# Delete the specific campaign. This does not cancel in progress email, see Cancel In Progress. Required Access Level: ModifyCampaigns
|
34
|
+
# @param name [String] Name of Campaign to delete
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
37
|
+
def campaigns_by_name_delete_with_http_info(name, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: CampaignsApi.campaigns_by_name_delete ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'name' is set
|
42
|
+
if @api_client.config.client_side_validation && name.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling CampaignsApi.campaigns_by_name_delete"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/campaigns/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:debug_body]
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:debug_return_type]
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:operation => :"CampaignsApi.campaigns_by_name_delete",
|
68
|
+
:header_params => header_params,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body,
|
72
|
+
:auth_names => auth_names,
|
73
|
+
:return_type => return_type
|
74
|
+
)
|
75
|
+
|
76
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: CampaignsApi#campaigns_by_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
83
|
+
# Load Campaign
|
84
|
+
# Returns the specified campaign details. Required Access Level: ViewCampaigns
|
85
|
+
# @param name [String] Name of Campaign to get
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @return [Campaign]
|
88
|
+
def campaigns_by_name_get(name, opts = {})
|
89
|
+
data, _status_code, _headers = campaigns_by_name_get_with_http_info(name, opts)
|
90
|
+
data
|
91
|
+
end
|
92
|
+
|
93
|
+
# Load Campaign
|
94
|
+
# Returns the specified campaign details. Required Access Level: ViewCampaigns
|
95
|
+
# @param name [String] Name of Campaign to get
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @return [Array<(Campaign, Integer, Hash)>] Campaign data, response status code and response headers
|
98
|
+
def campaigns_by_name_get_with_http_info(name, opts = {})
|
99
|
+
if @api_client.config.debugging
|
100
|
+
@api_client.config.logger.debug 'Calling API: CampaignsApi.campaigns_by_name_get ...'
|
101
|
+
end
|
102
|
+
# verify the required parameter 'name' is set
|
103
|
+
if @api_client.config.client_side_validation && name.nil?
|
104
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling CampaignsApi.campaigns_by_name_get"
|
105
|
+
end
|
106
|
+
# resource path
|
107
|
+
local_var_path = '/campaigns/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
108
|
+
|
109
|
+
# query parameters
|
110
|
+
query_params = opts[:query_params] || {}
|
111
|
+
|
112
|
+
# header parameters
|
113
|
+
header_params = opts[:header_params] || {}
|
114
|
+
# HTTP header 'Accept' (if needed)
|
115
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
116
|
+
|
117
|
+
# form parameters
|
118
|
+
form_params = opts[:form_params] || {}
|
119
|
+
|
120
|
+
# http body (model)
|
121
|
+
post_body = opts[:debug_body]
|
122
|
+
|
123
|
+
# return_type
|
124
|
+
return_type = opts[:debug_return_type] || 'Campaign'
|
125
|
+
|
126
|
+
# auth_names
|
127
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
128
|
+
|
129
|
+
new_options = opts.merge(
|
130
|
+
:operation => :"CampaignsApi.campaigns_by_name_get",
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: CampaignsApi#campaigns_by_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# Update Campaign
|
147
|
+
# Updates a previously added campaign. Only Active and Paused campaigns can be updated. Required Access Level: ModifyCampaigns
|
148
|
+
# @param name [String] Name of Campaign to update
|
149
|
+
# @param campaign [Campaign] JSON representation of a campaign
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @return [Campaign]
|
152
|
+
def campaigns_by_name_put(name, campaign, opts = {})
|
153
|
+
data, _status_code, _headers = campaigns_by_name_put_with_http_info(name, campaign, opts)
|
154
|
+
data
|
155
|
+
end
|
156
|
+
|
157
|
+
# Update Campaign
|
158
|
+
# Updates a previously added campaign. Only Active and Paused campaigns can be updated. Required Access Level: ModifyCampaigns
|
159
|
+
# @param name [String] Name of Campaign to update
|
160
|
+
# @param campaign [Campaign] JSON representation of a campaign
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [Array<(Campaign, Integer, Hash)>] Campaign data, response status code and response headers
|
163
|
+
def campaigns_by_name_put_with_http_info(name, campaign, opts = {})
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug 'Calling API: CampaignsApi.campaigns_by_name_put ...'
|
166
|
+
end
|
167
|
+
# verify the required parameter 'name' is set
|
168
|
+
if @api_client.config.client_side_validation && name.nil?
|
169
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling CampaignsApi.campaigns_by_name_put"
|
170
|
+
end
|
171
|
+
# verify the required parameter 'campaign' is set
|
172
|
+
if @api_client.config.client_side_validation && campaign.nil?
|
173
|
+
fail ArgumentError, "Missing the required parameter 'campaign' when calling CampaignsApi.campaigns_by_name_put"
|
174
|
+
end
|
175
|
+
# resource path
|
176
|
+
local_var_path = '/campaigns/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
177
|
+
|
178
|
+
# query parameters
|
179
|
+
query_params = opts[:query_params] || {}
|
180
|
+
|
181
|
+
# header parameters
|
182
|
+
header_params = opts[:header_params] || {}
|
183
|
+
# HTTP header 'Accept' (if needed)
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
185
|
+
# HTTP header 'Content-Type'
|
186
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
187
|
+
|
188
|
+
# form parameters
|
189
|
+
form_params = opts[:form_params] || {}
|
190
|
+
|
191
|
+
# http body (model)
|
192
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign)
|
193
|
+
|
194
|
+
# return_type
|
195
|
+
return_type = opts[:debug_return_type] || 'Campaign'
|
196
|
+
|
197
|
+
# auth_names
|
198
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
199
|
+
|
200
|
+
new_options = opts.merge(
|
201
|
+
:operation => :"CampaignsApi.campaigns_by_name_put",
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => return_type
|
208
|
+
)
|
209
|
+
|
210
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug "API called: CampaignsApi#campaigns_by_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
213
|
+
end
|
214
|
+
return data, status_code, headers
|
215
|
+
end
|
216
|
+
|
217
|
+
# Load Campaigns
|
218
|
+
# Returns a list all of your campaigns. Limited to 1000 results. Required Access Level: ViewCampaigns
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @option opts [String] :search Text fragment used for searching in Campaign name (using the 'contains' rule)
|
221
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
222
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
223
|
+
# @return [Array<Campaign>]
|
224
|
+
def campaigns_get(opts = {})
|
225
|
+
data, _status_code, _headers = campaigns_get_with_http_info(opts)
|
226
|
+
data
|
227
|
+
end
|
228
|
+
|
229
|
+
# Load Campaigns
|
230
|
+
# Returns a list all of your campaigns. Limited to 1000 results. Required Access Level: ViewCampaigns
|
231
|
+
# @param [Hash] opts the optional parameters
|
232
|
+
# @option opts [String] :search Text fragment used for searching in Campaign name (using the 'contains' rule)
|
233
|
+
# @option opts [Integer] :offset How many items should be returned ahead.
|
234
|
+
# @option opts [Integer] :limit Maximum number of returned items.
|
235
|
+
# @return [Array<(Array<Campaign>, Integer, Hash)>] Array<Campaign> data, response status code and response headers
|
236
|
+
def campaigns_get_with_http_info(opts = {})
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug 'Calling API: CampaignsApi.campaigns_get ...'
|
239
|
+
end
|
240
|
+
# resource path
|
241
|
+
local_var_path = '/campaigns'
|
242
|
+
|
243
|
+
# query parameters
|
244
|
+
query_params = opts[:query_params] || {}
|
245
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
246
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
247
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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<Campaign>'
|
262
|
+
|
263
|
+
# auth_names
|
264
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
265
|
+
|
266
|
+
new_options = opts.merge(
|
267
|
+
:operation => :"CampaignsApi.campaigns_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: CampaignsApi#campaigns_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
279
|
+
end
|
280
|
+
return data, status_code, headers
|
281
|
+
end
|
282
|
+
|
283
|
+
# Add Campaign
|
284
|
+
# Add a campaign for processing. Required Access Level: ModifyCampaigns
|
285
|
+
# @param campaign [Campaign] JSON representation of a campaign
|
286
|
+
# @param [Hash] opts the optional parameters
|
287
|
+
# @return [Campaign]
|
288
|
+
def campaigns_post(campaign, opts = {})
|
289
|
+
data, _status_code, _headers = campaigns_post_with_http_info(campaign, opts)
|
290
|
+
data
|
291
|
+
end
|
292
|
+
|
293
|
+
# Add Campaign
|
294
|
+
# Add a campaign for processing. Required Access Level: ModifyCampaigns
|
295
|
+
# @param campaign [Campaign] JSON representation of a campaign
|
296
|
+
# @param [Hash] opts the optional parameters
|
297
|
+
# @return [Array<(Campaign, Integer, Hash)>] Campaign data, response status code and response headers
|
298
|
+
def campaigns_post_with_http_info(campaign, opts = {})
|
299
|
+
if @api_client.config.debugging
|
300
|
+
@api_client.config.logger.debug 'Calling API: CampaignsApi.campaigns_post ...'
|
301
|
+
end
|
302
|
+
# verify the required parameter 'campaign' is set
|
303
|
+
if @api_client.config.client_side_validation && campaign.nil?
|
304
|
+
fail ArgumentError, "Missing the required parameter 'campaign' when calling CampaignsApi.campaigns_post"
|
305
|
+
end
|
306
|
+
# resource path
|
307
|
+
local_var_path = '/campaigns'
|
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(campaign)
|
324
|
+
|
325
|
+
# return_type
|
326
|
+
return_type = opts[:debug_return_type] || 'Campaign'
|
327
|
+
|
328
|
+
# auth_names
|
329
|
+
auth_names = opts[:debug_auth_names] || ['apikey']
|
330
|
+
|
331
|
+
new_options = opts.merge(
|
332
|
+
:operation => :"CampaignsApi.campaigns_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: CampaignsApi#campaigns_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
344
|
+
end
|
345
|
+
return data, status_code, headers
|
346
|
+
end
|
347
|
+
end
|
348
|
+
end
|