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/docs/BodyPart.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# ElasticEmail::BodyPart
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **content_type** | [**BodyContentType**](BodyContentType.md) | Type of the body part | [optional] |
|
8
|
+
| **content** | **String** | Actual content of the body part | [optional] |
|
9
|
+
| **charset** | **String** | Text value of charset encoding for example: iso-8859-1, windows-1251, utf-8, us-ascii, windows-1250 and more… | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'ElasticEmail'
|
15
|
+
|
16
|
+
instance = ElasticEmail::BodyPart.new(
|
17
|
+
content_type: null,
|
18
|
+
content: null,
|
19
|
+
charset: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/Campaign.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# ElasticEmail::Campaign
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **content** | [**Array<CampaignTemplate>**](CampaignTemplate.md) | Campaign's email content. Provide multiple items to send an A/X Split Campaign | [optional] |
|
8
|
+
| **name** | **String** | Campaign name | [optional] |
|
9
|
+
| **status** | [**CampaignStatus**](CampaignStatus.md) | Campaign status | [optional] |
|
10
|
+
| **recipients** | [**CampaignRecipient**](CampaignRecipient.md) | Recipients this campaign should be sent to | [optional] |
|
11
|
+
| **options** | [**CampaignOptions**](CampaignOptions.md) | Campaign sending options | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'ElasticEmail'
|
17
|
+
|
18
|
+
instance = ElasticEmail::Campaign.new(
|
19
|
+
content: null,
|
20
|
+
name: null,
|
21
|
+
status: null,
|
22
|
+
recipients: null,
|
23
|
+
options: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# ElasticEmail::CampaignOptions
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **delivery_optimization** | [**DeliveryOptimizationType**](DeliveryOptimizationType.md) | How to order email delivery - by recipients' engagement score or by the time they open the most of the emails that were sent to them | [optional] |
|
8
|
+
| **track_opens** | **Boolean** | Should the opens be tracked? If no value has been provided, Account's default setting will be used. | [optional] |
|
9
|
+
| **track_clicks** | **Boolean** | Should the clicks be tracked? If no value has been provided, Account's default setting will be used. | [optional] |
|
10
|
+
| **schedule_for** | **Time** | Date when this Campaign is scheduled to be sent on | [optional] |
|
11
|
+
| **split_options** | [**SplitOptions**](SplitOptions.md) | Optional options for A/X split campaigns. Will be ignored if only one template content was provided | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'ElasticEmail'
|
17
|
+
|
18
|
+
instance = ElasticEmail::CampaignOptions.new(
|
19
|
+
delivery_optimization: null,
|
20
|
+
track_opens: true,
|
21
|
+
track_clicks: true,
|
22
|
+
schedule_for: null,
|
23
|
+
split_options: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# ElasticEmail::CampaignRecipient
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **list_names** | **Array<String>** | Names of lists from your Account to read recipients from | [optional] |
|
8
|
+
| **segment_names** | **Array<String>** | Names of segments from your Account to read recipients from | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ElasticEmail'
|
14
|
+
|
15
|
+
instance = ElasticEmail::CampaignRecipient.new(
|
16
|
+
list_names: null,
|
17
|
+
segment_names: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# ElasticEmail::CampaignTemplate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **poolname** | **String** | Name of your custom IP Pool to be used in the sending process | [optional] |
|
8
|
+
| **from** | **String** | Your e-mail with an optional name (e.g.: John Doe <email@domain.com>) | [optional] |
|
9
|
+
| **reply_to** | **String** | To what address should the recipients reply to (e.g. John Doe <email@domain.com>) | [optional] |
|
10
|
+
| **subject** | **String** | Default subject of email. | [optional] |
|
11
|
+
| **template_name** | **String** | Name of template. | [optional] |
|
12
|
+
| **attach_files** | **Array<String>** | Names of previously uploaded files that should be sent as downloadable attachments | [optional] |
|
13
|
+
| **utm** | [**Utm**](Utm.md) | Utm marketing data to be attached to every link in this e-mail. | [optional] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'ElasticEmail'
|
19
|
+
|
20
|
+
instance = ElasticEmail::CampaignTemplate.new(
|
21
|
+
poolname: My Custom Pool,
|
22
|
+
from: John Doe <email@domain.com>,
|
23
|
+
reply_to: John Doe <email@domain.com>,
|
24
|
+
subject: Hello!,
|
25
|
+
template_name: Template01,
|
26
|
+
attach_files: null,
|
27
|
+
utm: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
@@ -0,0 +1,374 @@
|
|
1
|
+
# ElasticEmail::CampaignsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.elasticemail.com/v4*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**campaigns_by_name_delete**](CampaignsApi.md#campaigns_by_name_delete) | **DELETE** /campaigns/{name} | Delete Campaign |
|
8
|
+
| [**campaigns_by_name_get**](CampaignsApi.md#campaigns_by_name_get) | **GET** /campaigns/{name} | Load Campaign |
|
9
|
+
| [**campaigns_by_name_put**](CampaignsApi.md#campaigns_by_name_put) | **PUT** /campaigns/{name} | Update Campaign |
|
10
|
+
| [**campaigns_get**](CampaignsApi.md#campaigns_get) | **GET** /campaigns | Load Campaigns |
|
11
|
+
| [**campaigns_post**](CampaignsApi.md#campaigns_post) | **POST** /campaigns | Add Campaign |
|
12
|
+
|
13
|
+
|
14
|
+
## campaigns_by_name_delete
|
15
|
+
|
16
|
+
> campaigns_by_name_delete(name)
|
17
|
+
|
18
|
+
Delete Campaign
|
19
|
+
|
20
|
+
Delete the specific campaign. This does not cancel in progress email, see Cancel In Progress. Required Access Level: ModifyCampaigns
|
21
|
+
|
22
|
+
### Examples
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'time'
|
26
|
+
require 'ElasticEmail'
|
27
|
+
# setup authorization
|
28
|
+
ElasticEmail.configure do |config|
|
29
|
+
# Configure API key authorization: apikey
|
30
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
31
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
32
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
33
|
+
end
|
34
|
+
|
35
|
+
api_instance = ElasticEmail::CampaignsApi.new
|
36
|
+
name = 'name_example' # String | Name of Campaign to delete
|
37
|
+
|
38
|
+
begin
|
39
|
+
# Delete Campaign
|
40
|
+
api_instance.campaigns_by_name_delete(name)
|
41
|
+
rescue ElasticEmail::ApiError => e
|
42
|
+
puts "Error when calling CampaignsApi->campaigns_by_name_delete: #{e}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
#### Using the campaigns_by_name_delete_with_http_info variant
|
47
|
+
|
48
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
49
|
+
|
50
|
+
> <Array(nil, Integer, Hash)> campaigns_by_name_delete_with_http_info(name)
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
begin
|
54
|
+
# Delete Campaign
|
55
|
+
data, status_code, headers = api_instance.campaigns_by_name_delete_with_http_info(name)
|
56
|
+
p status_code # => 2xx
|
57
|
+
p headers # => { ... }
|
58
|
+
p data # => nil
|
59
|
+
rescue ElasticEmail::ApiError => e
|
60
|
+
puts "Error when calling CampaignsApi->campaigns_by_name_delete_with_http_info: #{e}"
|
61
|
+
end
|
62
|
+
```
|
63
|
+
|
64
|
+
### Parameters
|
65
|
+
|
66
|
+
| Name | Type | Description | Notes |
|
67
|
+
| ---- | ---- | ----------- | ----- |
|
68
|
+
| **name** | **String** | Name of Campaign to delete | |
|
69
|
+
|
70
|
+
### Return type
|
71
|
+
|
72
|
+
nil (empty response body)
|
73
|
+
|
74
|
+
### Authorization
|
75
|
+
|
76
|
+
[apikey](../README.md#apikey)
|
77
|
+
|
78
|
+
### HTTP request headers
|
79
|
+
|
80
|
+
- **Content-Type**: Not defined
|
81
|
+
- **Accept**: Not defined
|
82
|
+
|
83
|
+
|
84
|
+
## campaigns_by_name_get
|
85
|
+
|
86
|
+
> <Campaign> campaigns_by_name_get(name)
|
87
|
+
|
88
|
+
Load Campaign
|
89
|
+
|
90
|
+
Returns the specified campaign details. Required Access Level: ViewCampaigns
|
91
|
+
|
92
|
+
### Examples
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
require 'time'
|
96
|
+
require 'ElasticEmail'
|
97
|
+
# setup authorization
|
98
|
+
ElasticEmail.configure do |config|
|
99
|
+
# Configure API key authorization: apikey
|
100
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
101
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
102
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
103
|
+
end
|
104
|
+
|
105
|
+
api_instance = ElasticEmail::CampaignsApi.new
|
106
|
+
name = 'name_example' # String | Name of Campaign to get
|
107
|
+
|
108
|
+
begin
|
109
|
+
# Load Campaign
|
110
|
+
result = api_instance.campaigns_by_name_get(name)
|
111
|
+
p result
|
112
|
+
rescue ElasticEmail::ApiError => e
|
113
|
+
puts "Error when calling CampaignsApi->campaigns_by_name_get: #{e}"
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
#### Using the campaigns_by_name_get_with_http_info variant
|
118
|
+
|
119
|
+
This returns an Array which contains the response data, status code and headers.
|
120
|
+
|
121
|
+
> <Array(<Campaign>, Integer, Hash)> campaigns_by_name_get_with_http_info(name)
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
begin
|
125
|
+
# Load Campaign
|
126
|
+
data, status_code, headers = api_instance.campaigns_by_name_get_with_http_info(name)
|
127
|
+
p status_code # => 2xx
|
128
|
+
p headers # => { ... }
|
129
|
+
p data # => <Campaign>
|
130
|
+
rescue ElasticEmail::ApiError => e
|
131
|
+
puts "Error when calling CampaignsApi->campaigns_by_name_get_with_http_info: #{e}"
|
132
|
+
end
|
133
|
+
```
|
134
|
+
|
135
|
+
### Parameters
|
136
|
+
|
137
|
+
| Name | Type | Description | Notes |
|
138
|
+
| ---- | ---- | ----------- | ----- |
|
139
|
+
| **name** | **String** | Name of Campaign to get | |
|
140
|
+
|
141
|
+
### Return type
|
142
|
+
|
143
|
+
[**Campaign**](Campaign.md)
|
144
|
+
|
145
|
+
### Authorization
|
146
|
+
|
147
|
+
[apikey](../README.md#apikey)
|
148
|
+
|
149
|
+
### HTTP request headers
|
150
|
+
|
151
|
+
- **Content-Type**: Not defined
|
152
|
+
- **Accept**: application/json
|
153
|
+
|
154
|
+
|
155
|
+
## campaigns_by_name_put
|
156
|
+
|
157
|
+
> <Campaign> campaigns_by_name_put(name, campaign)
|
158
|
+
|
159
|
+
Update Campaign
|
160
|
+
|
161
|
+
Updates a previously added campaign. Only Active and Paused campaigns can be updated. Required Access Level: ModifyCampaigns
|
162
|
+
|
163
|
+
### Examples
|
164
|
+
|
165
|
+
```ruby
|
166
|
+
require 'time'
|
167
|
+
require 'ElasticEmail'
|
168
|
+
# setup authorization
|
169
|
+
ElasticEmail.configure do |config|
|
170
|
+
# Configure API key authorization: apikey
|
171
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
172
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
173
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
174
|
+
end
|
175
|
+
|
176
|
+
api_instance = ElasticEmail::CampaignsApi.new
|
177
|
+
name = 'name_example' # String | Name of Campaign to update
|
178
|
+
campaign = ElasticEmail::Campaign.new # Campaign | JSON representation of a campaign
|
179
|
+
|
180
|
+
begin
|
181
|
+
# Update Campaign
|
182
|
+
result = api_instance.campaigns_by_name_put(name, campaign)
|
183
|
+
p result
|
184
|
+
rescue ElasticEmail::ApiError => e
|
185
|
+
puts "Error when calling CampaignsApi->campaigns_by_name_put: #{e}"
|
186
|
+
end
|
187
|
+
```
|
188
|
+
|
189
|
+
#### Using the campaigns_by_name_put_with_http_info variant
|
190
|
+
|
191
|
+
This returns an Array which contains the response data, status code and headers.
|
192
|
+
|
193
|
+
> <Array(<Campaign>, Integer, Hash)> campaigns_by_name_put_with_http_info(name, campaign)
|
194
|
+
|
195
|
+
```ruby
|
196
|
+
begin
|
197
|
+
# Update Campaign
|
198
|
+
data, status_code, headers = api_instance.campaigns_by_name_put_with_http_info(name, campaign)
|
199
|
+
p status_code # => 2xx
|
200
|
+
p headers # => { ... }
|
201
|
+
p data # => <Campaign>
|
202
|
+
rescue ElasticEmail::ApiError => e
|
203
|
+
puts "Error when calling CampaignsApi->campaigns_by_name_put_with_http_info: #{e}"
|
204
|
+
end
|
205
|
+
```
|
206
|
+
|
207
|
+
### Parameters
|
208
|
+
|
209
|
+
| Name | Type | Description | Notes |
|
210
|
+
| ---- | ---- | ----------- | ----- |
|
211
|
+
| **name** | **String** | Name of Campaign to update | |
|
212
|
+
| **campaign** | [**Campaign**](Campaign.md) | JSON representation of a campaign | |
|
213
|
+
|
214
|
+
### Return type
|
215
|
+
|
216
|
+
[**Campaign**](Campaign.md)
|
217
|
+
|
218
|
+
### Authorization
|
219
|
+
|
220
|
+
[apikey](../README.md#apikey)
|
221
|
+
|
222
|
+
### HTTP request headers
|
223
|
+
|
224
|
+
- **Content-Type**: application/json
|
225
|
+
- **Accept**: application/json
|
226
|
+
|
227
|
+
|
228
|
+
## campaigns_get
|
229
|
+
|
230
|
+
> <Array<Campaign>> campaigns_get(opts)
|
231
|
+
|
232
|
+
Load Campaigns
|
233
|
+
|
234
|
+
Returns a list all of your campaigns. Limited to 1000 results. Required Access Level: ViewCampaigns
|
235
|
+
|
236
|
+
### Examples
|
237
|
+
|
238
|
+
```ruby
|
239
|
+
require 'time'
|
240
|
+
require 'ElasticEmail'
|
241
|
+
# setup authorization
|
242
|
+
ElasticEmail.configure do |config|
|
243
|
+
# Configure API key authorization: apikey
|
244
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
245
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
246
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
247
|
+
end
|
248
|
+
|
249
|
+
api_instance = ElasticEmail::CampaignsApi.new
|
250
|
+
opts = {
|
251
|
+
search: 'search_example', # String | Text fragment used for searching in Campaign name (using the 'contains' rule)
|
252
|
+
offset: 20, # Integer | How many items should be returned ahead.
|
253
|
+
limit: 100 # Integer | Maximum number of returned items.
|
254
|
+
}
|
255
|
+
|
256
|
+
begin
|
257
|
+
# Load Campaigns
|
258
|
+
result = api_instance.campaigns_get(opts)
|
259
|
+
p result
|
260
|
+
rescue ElasticEmail::ApiError => e
|
261
|
+
puts "Error when calling CampaignsApi->campaigns_get: #{e}"
|
262
|
+
end
|
263
|
+
```
|
264
|
+
|
265
|
+
#### Using the campaigns_get_with_http_info variant
|
266
|
+
|
267
|
+
This returns an Array which contains the response data, status code and headers.
|
268
|
+
|
269
|
+
> <Array(<Array<Campaign>>, Integer, Hash)> campaigns_get_with_http_info(opts)
|
270
|
+
|
271
|
+
```ruby
|
272
|
+
begin
|
273
|
+
# Load Campaigns
|
274
|
+
data, status_code, headers = api_instance.campaigns_get_with_http_info(opts)
|
275
|
+
p status_code # => 2xx
|
276
|
+
p headers # => { ... }
|
277
|
+
p data # => <Array<Campaign>>
|
278
|
+
rescue ElasticEmail::ApiError => e
|
279
|
+
puts "Error when calling CampaignsApi->campaigns_get_with_http_info: #{e}"
|
280
|
+
end
|
281
|
+
```
|
282
|
+
|
283
|
+
### Parameters
|
284
|
+
|
285
|
+
| Name | Type | Description | Notes |
|
286
|
+
| ---- | ---- | ----------- | ----- |
|
287
|
+
| **search** | **String** | Text fragment used for searching in Campaign name (using the 'contains' rule) | [optional] |
|
288
|
+
| **offset** | **Integer** | How many items should be returned ahead. | [optional] |
|
289
|
+
| **limit** | **Integer** | Maximum number of returned items. | [optional] |
|
290
|
+
|
291
|
+
### Return type
|
292
|
+
|
293
|
+
[**Array<Campaign>**](Campaign.md)
|
294
|
+
|
295
|
+
### Authorization
|
296
|
+
|
297
|
+
[apikey](../README.md#apikey)
|
298
|
+
|
299
|
+
### HTTP request headers
|
300
|
+
|
301
|
+
- **Content-Type**: Not defined
|
302
|
+
- **Accept**: application/json
|
303
|
+
|
304
|
+
|
305
|
+
## campaigns_post
|
306
|
+
|
307
|
+
> <Campaign> campaigns_post(campaign)
|
308
|
+
|
309
|
+
Add Campaign
|
310
|
+
|
311
|
+
Add a campaign for processing. Required Access Level: ModifyCampaigns
|
312
|
+
|
313
|
+
### Examples
|
314
|
+
|
315
|
+
```ruby
|
316
|
+
require 'time'
|
317
|
+
require 'ElasticEmail'
|
318
|
+
# setup authorization
|
319
|
+
ElasticEmail.configure do |config|
|
320
|
+
# Configure API key authorization: apikey
|
321
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
322
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
323
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
324
|
+
end
|
325
|
+
|
326
|
+
api_instance = ElasticEmail::CampaignsApi.new
|
327
|
+
campaign = ElasticEmail::Campaign.new # Campaign | JSON representation of a campaign
|
328
|
+
|
329
|
+
begin
|
330
|
+
# Add Campaign
|
331
|
+
result = api_instance.campaigns_post(campaign)
|
332
|
+
p result
|
333
|
+
rescue ElasticEmail::ApiError => e
|
334
|
+
puts "Error when calling CampaignsApi->campaigns_post: #{e}"
|
335
|
+
end
|
336
|
+
```
|
337
|
+
|
338
|
+
#### Using the campaigns_post_with_http_info variant
|
339
|
+
|
340
|
+
This returns an Array which contains the response data, status code and headers.
|
341
|
+
|
342
|
+
> <Array(<Campaign>, Integer, Hash)> campaigns_post_with_http_info(campaign)
|
343
|
+
|
344
|
+
```ruby
|
345
|
+
begin
|
346
|
+
# Add Campaign
|
347
|
+
data, status_code, headers = api_instance.campaigns_post_with_http_info(campaign)
|
348
|
+
p status_code # => 2xx
|
349
|
+
p headers # => { ... }
|
350
|
+
p data # => <Campaign>
|
351
|
+
rescue ElasticEmail::ApiError => e
|
352
|
+
puts "Error when calling CampaignsApi->campaigns_post_with_http_info: #{e}"
|
353
|
+
end
|
354
|
+
```
|
355
|
+
|
356
|
+
### Parameters
|
357
|
+
|
358
|
+
| Name | Type | Description | Notes |
|
359
|
+
| ---- | ---- | ----------- | ----- |
|
360
|
+
| **campaign** | [**Campaign**](Campaign.md) | JSON representation of a campaign | |
|
361
|
+
|
362
|
+
### Return type
|
363
|
+
|
364
|
+
[**Campaign**](Campaign.md)
|
365
|
+
|
366
|
+
### Authorization
|
367
|
+
|
368
|
+
[apikey](../README.md#apikey)
|
369
|
+
|
370
|
+
### HTTP request headers
|
371
|
+
|
372
|
+
- **Content-Type**: application/json
|
373
|
+
- **Accept**: application/json
|
374
|
+
|