ElasticEmail 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,44 @@
|
|
1
|
+
# ElasticEmail::ChannelLogStatusSummary
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **channel_name** | **String** | Channel name | [optional] |
|
8
|
+
| **recipients** | **Integer** | Number of recipients | [optional] |
|
9
|
+
| **email_total** | **Integer** | Number of emails | [optional] |
|
10
|
+
| **sms_total** | **Integer** | Number of SMS | [optional] |
|
11
|
+
| **delivered** | **Integer** | Number of delivered messages | [optional] |
|
12
|
+
| **bounced** | **Integer** | Number of bounced messages | [optional] |
|
13
|
+
| **in_progress** | **Integer** | Number of messages in progress | [optional] |
|
14
|
+
| **opened** | **Integer** | Number of opened messages | [optional] |
|
15
|
+
| **clicked** | **Integer** | Number of clicked messages | [optional] |
|
16
|
+
| **unsubscribed** | **Integer** | Number of unsubscribed messages | [optional] |
|
17
|
+
| **complaints** | **Integer** | Number of complaint messages | [optional] |
|
18
|
+
| **inbound** | **Integer** | Number of inbound messages | [optional] |
|
19
|
+
| **manual_cancel** | **Integer** | Number of manually cancelled messages | [optional] |
|
20
|
+
| **not_delivered** | **Integer** | Number of messages flagged with 'Not Delivered' | [optional] |
|
21
|
+
|
22
|
+
## Example
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'ElasticEmail'
|
26
|
+
|
27
|
+
instance = ElasticEmail::ChannelLogStatusSummary.new(
|
28
|
+
channel_name: null,
|
29
|
+
recipients: 1234,
|
30
|
+
email_total: 1234,
|
31
|
+
sms_total: 12,
|
32
|
+
delivered: 1000,
|
33
|
+
bounced: 1000,
|
34
|
+
in_progress: 1234,
|
35
|
+
opened: 1000,
|
36
|
+
clicked: 1000,
|
37
|
+
unsubscribed: 1000,
|
38
|
+
complaints: 1000,
|
39
|
+
inbound: 1000,
|
40
|
+
manual_cancel: 1000,
|
41
|
+
not_delivered: 0
|
42
|
+
)
|
43
|
+
```
|
44
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# ElasticEmail::CompressionFormat
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'ElasticEmail'
|
12
|
+
|
13
|
+
instance = ElasticEmail::CompressionFormat.new()
|
14
|
+
```
|
15
|
+
|
data/docs/ConsentData.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# ElasticEmail::ConsentData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **consent_ip** | **String** | IP address of consent to send this contact(s) your email. If not provided your current public IP address is used for consent. | [optional] |
|
8
|
+
| **consent_date** | **Time** | Date of consent to send this contact(s) your email. If not provided current date is used for consent. | [optional] |
|
9
|
+
| **consent_tracking** | [**ConsentTracking**](ConsentTracking.md) | Does the contant consent to have their tracking data stored. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'ElasticEmail'
|
15
|
+
|
16
|
+
instance = ElasticEmail::ConsentData.new(
|
17
|
+
consent_ip: 192.168.0.1,
|
18
|
+
consent_date: null,
|
19
|
+
consent_tracking: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/Contact.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# ElasticEmail::Contact
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **email** | **String** | Proper email address. | [optional] |
|
8
|
+
| **status** | [**ContactStatus**](ContactStatus.md) | Status of the given resource | [optional] |
|
9
|
+
| **first_name** | **String** | First name. | [optional] |
|
10
|
+
| **last_name** | **String** | Last name. | [optional] |
|
11
|
+
| **custom_fields** | **Hash<String, String>** | A key-value collection of custom contact fields which can be used in the system. | [optional] |
|
12
|
+
| **consent** | [**ConsentData**](ConsentData.md) | | [optional] |
|
13
|
+
| **source** | [**ContactSource**](ContactSource.md) | From where was this contact added | [optional] |
|
14
|
+
| **date_added** | **Time** | Date of creation in YYYY-MM-DDThh:ii:ss format | [optional] |
|
15
|
+
| **date_updated** | **Time** | Last change date | [optional] |
|
16
|
+
| **status_change_date** | **Time** | Date of last status change. | [optional] |
|
17
|
+
| **activity** | [**ContactActivity**](ContactActivity.md) | Contact's email statistics and activity | [optional] |
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'ElasticEmail'
|
23
|
+
|
24
|
+
instance = ElasticEmail::Contact.new(
|
25
|
+
email: mail@example.com,
|
26
|
+
status: null,
|
27
|
+
first_name: Fred,
|
28
|
+
last_name: Flintstone,
|
29
|
+
custom_fields: {"city":"New York","age":"34"},
|
30
|
+
consent: null,
|
31
|
+
source: null,
|
32
|
+
date_added: null,
|
33
|
+
date_updated: null,
|
34
|
+
status_change_date: null,
|
35
|
+
activity: null
|
36
|
+
)
|
37
|
+
```
|
38
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# ElasticEmail::ContactActivity
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **total_sent** | **Integer** | Total emails sent. | [optional] |
|
8
|
+
| **total_opened** | **Integer** | Total emails opened. | [optional] |
|
9
|
+
| **total_clicked** | **Integer** | Total emails clicked | [optional] |
|
10
|
+
| **total_failed** | **Integer** | Total emails failed. | [optional] |
|
11
|
+
| **last_sent** | **Time** | Last date when an email was sent to this contact | [optional] |
|
12
|
+
| **last_opened** | **Time** | Date this contact last opened an email | [optional] |
|
13
|
+
| **last_clicked** | **Time** | Date this contact last clicked an email | [optional] |
|
14
|
+
| **last_failed** | **Time** | Last date when an email sent to this contact bounced | [optional] |
|
15
|
+
| **last_ip** | **String** | IP from which this contact opened or clicked their email last time | [optional] |
|
16
|
+
| **error_code** | **Integer** | Last RFC Error code if any occurred | [optional] |
|
17
|
+
| **friendly_error_message** | **String** | Last RFC error message if any occurred | [optional] |
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'ElasticEmail'
|
23
|
+
|
24
|
+
instance = ElasticEmail::ContactActivity.new(
|
25
|
+
total_sent: 1000,
|
26
|
+
total_opened: 1000,
|
27
|
+
total_clicked: 1000,
|
28
|
+
total_failed: 1000,
|
29
|
+
last_sent: null,
|
30
|
+
last_opened: null,
|
31
|
+
last_clicked: null,
|
32
|
+
last_failed: null,
|
33
|
+
last_ip: null,
|
34
|
+
error_code: null,
|
35
|
+
friendly_error_message: null
|
36
|
+
)
|
37
|
+
```
|
38
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# ElasticEmail::ContactHistEventType
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'ElasticEmail'
|
12
|
+
|
13
|
+
instance = ElasticEmail::ContactHistEventType.new()
|
14
|
+
```
|
15
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# ElasticEmail::ContactHistory
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **event_type** | [**ContactHistEventType**](ContactHistEventType.md) | Type of event occured on this Contact. | [optional] |
|
8
|
+
| **event_date** | **Time** | Formatted date of event. | [optional] |
|
9
|
+
| **channel_name** | **String** | Name of channel this event occured on | [optional] |
|
10
|
+
| **template_name** | **String** | Name of template this event occured on | [optional] |
|
11
|
+
| **ip_address** | **String** | IP Address of the event. | [optional] |
|
12
|
+
| **country** | **String** | Country of the event. | [optional] |
|
13
|
+
| **data** | **String** | Additional information about the event | [optional] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'ElasticEmail'
|
19
|
+
|
20
|
+
instance = ElasticEmail::ContactHistory.new(
|
21
|
+
event_type: null,
|
22
|
+
event_date: null,
|
23
|
+
channel_name: null,
|
24
|
+
template_name: null,
|
25
|
+
ip_address: null,
|
26
|
+
country: null,
|
27
|
+
data: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# ElasticEmail::ContactPayload
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **email** | **String** | Proper email address. | [optional] |
|
8
|
+
| **status** | [**ContactStatus**](ContactStatus.md) | Status of the given resource | [optional] |
|
9
|
+
| **first_name** | **String** | First name. | [optional] |
|
10
|
+
| **last_name** | **String** | Last name. | [optional] |
|
11
|
+
| **custom_fields** | **Hash<String, String>** | A key-value collection of custom contact fields which can be used in the system. Only already existing custom fields will be saved. | [optional] |
|
12
|
+
| **consent** | [**ConsentData**](ConsentData.md) | | [optional] |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'ElasticEmail'
|
18
|
+
|
19
|
+
instance = ElasticEmail::ContactPayload.new(
|
20
|
+
email: mail@example.com,
|
21
|
+
status: null,
|
22
|
+
first_name: Fred,
|
23
|
+
last_name: Flintstone,
|
24
|
+
custom_fields: {"city":"New York","age":"34"},
|
25
|
+
consent: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# ElasticEmail::ContactUpdatePayload
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **first_name** | **String** | First name. | [optional] |
|
8
|
+
| **last_name** | **String** | Last name. | [optional] |
|
9
|
+
| **custom_fields** | **Hash<String, String>** | A key-value collection of custom contact fields which can be used in the system. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'ElasticEmail'
|
15
|
+
|
16
|
+
instance = ElasticEmail::ContactUpdatePayload.new(
|
17
|
+
first_name: Fred,
|
18
|
+
last_name: Flintstone,
|
19
|
+
custom_fields: {"city":"New York","age":"34"}
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/ContactsApi.md
ADDED
@@ -0,0 +1,756 @@
|
|
1
|
+
# ElasticEmail::ContactsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.elasticemail.com/v4*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**contacts_by_email_delete**](ContactsApi.md#contacts_by_email_delete) | **DELETE** /contacts/{email} | Delete Contact |
|
8
|
+
| [**contacts_by_email_get**](ContactsApi.md#contacts_by_email_get) | **GET** /contacts/{email} | Load Contact |
|
9
|
+
| [**contacts_by_email_history_get**](ContactsApi.md#contacts_by_email_history_get) | **GET** /contacts/{email}/history | Load History |
|
10
|
+
| [**contacts_by_email_put**](ContactsApi.md#contacts_by_email_put) | **PUT** /contacts/{email} | Update Contact |
|
11
|
+
| [**contacts_delete_post**](ContactsApi.md#contacts_delete_post) | **POST** /contacts/delete | Delete Contacts Bulk |
|
12
|
+
| [**contacts_export_by_id_status_get**](ContactsApi.md#contacts_export_by_id_status_get) | **GET** /contacts/export/{id}/status | Check Export Status |
|
13
|
+
| [**contacts_export_post**](ContactsApi.md#contacts_export_post) | **POST** /contacts/export | Export Contacts |
|
14
|
+
| [**contacts_get**](ContactsApi.md#contacts_get) | **GET** /contacts | Load Contacts |
|
15
|
+
| [**contacts_import_post**](ContactsApi.md#contacts_import_post) | **POST** /contacts/import | Upload Contacts |
|
16
|
+
| [**contacts_post**](ContactsApi.md#contacts_post) | **POST** /contacts | Add Contact |
|
17
|
+
|
18
|
+
|
19
|
+
## contacts_by_email_delete
|
20
|
+
|
21
|
+
> contacts_by_email_delete(email)
|
22
|
+
|
23
|
+
Delete Contact
|
24
|
+
|
25
|
+
Deletes the provided contact. Required Access Level: ModifyContacts
|
26
|
+
|
27
|
+
### Examples
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'time'
|
31
|
+
require 'ElasticEmail'
|
32
|
+
# setup authorization
|
33
|
+
ElasticEmail.configure do |config|
|
34
|
+
# Configure API key authorization: apikey
|
35
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
36
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
37
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
38
|
+
end
|
39
|
+
|
40
|
+
api_instance = ElasticEmail::ContactsApi.new
|
41
|
+
email = 'mail@example.com' # String | Proper email address.
|
42
|
+
|
43
|
+
begin
|
44
|
+
# Delete Contact
|
45
|
+
api_instance.contacts_by_email_delete(email)
|
46
|
+
rescue ElasticEmail::ApiError => e
|
47
|
+
puts "Error when calling ContactsApi->contacts_by_email_delete: #{e}"
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
#### Using the contacts_by_email_delete_with_http_info variant
|
52
|
+
|
53
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
54
|
+
|
55
|
+
> <Array(nil, Integer, Hash)> contacts_by_email_delete_with_http_info(email)
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
begin
|
59
|
+
# Delete Contact
|
60
|
+
data, status_code, headers = api_instance.contacts_by_email_delete_with_http_info(email)
|
61
|
+
p status_code # => 2xx
|
62
|
+
p headers # => { ... }
|
63
|
+
p data # => nil
|
64
|
+
rescue ElasticEmail::ApiError => e
|
65
|
+
puts "Error when calling ContactsApi->contacts_by_email_delete_with_http_info: #{e}"
|
66
|
+
end
|
67
|
+
```
|
68
|
+
|
69
|
+
### Parameters
|
70
|
+
|
71
|
+
| Name | Type | Description | Notes |
|
72
|
+
| ---- | ---- | ----------- | ----- |
|
73
|
+
| **email** | **String** | Proper email address. | |
|
74
|
+
|
75
|
+
### Return type
|
76
|
+
|
77
|
+
nil (empty response body)
|
78
|
+
|
79
|
+
### Authorization
|
80
|
+
|
81
|
+
[apikey](../README.md#apikey)
|
82
|
+
|
83
|
+
### HTTP request headers
|
84
|
+
|
85
|
+
- **Content-Type**: Not defined
|
86
|
+
- **Accept**: Not defined
|
87
|
+
|
88
|
+
|
89
|
+
## contacts_by_email_get
|
90
|
+
|
91
|
+
> <Contact> contacts_by_email_get(email)
|
92
|
+
|
93
|
+
Load Contact
|
94
|
+
|
95
|
+
Load detailed contact information for specified email. Required Access Level: ViewContacts
|
96
|
+
|
97
|
+
### Examples
|
98
|
+
|
99
|
+
```ruby
|
100
|
+
require 'time'
|
101
|
+
require 'ElasticEmail'
|
102
|
+
# setup authorization
|
103
|
+
ElasticEmail.configure do |config|
|
104
|
+
# Configure API key authorization: apikey
|
105
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
106
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
107
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
108
|
+
end
|
109
|
+
|
110
|
+
api_instance = ElasticEmail::ContactsApi.new
|
111
|
+
email = 'mail@example.com' # String | Proper email address.
|
112
|
+
|
113
|
+
begin
|
114
|
+
# Load Contact
|
115
|
+
result = api_instance.contacts_by_email_get(email)
|
116
|
+
p result
|
117
|
+
rescue ElasticEmail::ApiError => e
|
118
|
+
puts "Error when calling ContactsApi->contacts_by_email_get: #{e}"
|
119
|
+
end
|
120
|
+
```
|
121
|
+
|
122
|
+
#### Using the contacts_by_email_get_with_http_info variant
|
123
|
+
|
124
|
+
This returns an Array which contains the response data, status code and headers.
|
125
|
+
|
126
|
+
> <Array(<Contact>, Integer, Hash)> contacts_by_email_get_with_http_info(email)
|
127
|
+
|
128
|
+
```ruby
|
129
|
+
begin
|
130
|
+
# Load Contact
|
131
|
+
data, status_code, headers = api_instance.contacts_by_email_get_with_http_info(email)
|
132
|
+
p status_code # => 2xx
|
133
|
+
p headers # => { ... }
|
134
|
+
p data # => <Contact>
|
135
|
+
rescue ElasticEmail::ApiError => e
|
136
|
+
puts "Error when calling ContactsApi->contacts_by_email_get_with_http_info: #{e}"
|
137
|
+
end
|
138
|
+
```
|
139
|
+
|
140
|
+
### Parameters
|
141
|
+
|
142
|
+
| Name | Type | Description | Notes |
|
143
|
+
| ---- | ---- | ----------- | ----- |
|
144
|
+
| **email** | **String** | Proper email address. | |
|
145
|
+
|
146
|
+
### Return type
|
147
|
+
|
148
|
+
[**Contact**](Contact.md)
|
149
|
+
|
150
|
+
### Authorization
|
151
|
+
|
152
|
+
[apikey](../README.md#apikey)
|
153
|
+
|
154
|
+
### HTTP request headers
|
155
|
+
|
156
|
+
- **Content-Type**: Not defined
|
157
|
+
- **Accept**: application/json
|
158
|
+
|
159
|
+
|
160
|
+
## contacts_by_email_history_get
|
161
|
+
|
162
|
+
> <Array<ContactHistory>> contacts_by_email_history_get(email, opts)
|
163
|
+
|
164
|
+
Load History
|
165
|
+
|
166
|
+
Returns detailed history of specified Contact. Required Access Level: ViewContacts
|
167
|
+
|
168
|
+
### Examples
|
169
|
+
|
170
|
+
```ruby
|
171
|
+
require 'time'
|
172
|
+
require 'ElasticEmail'
|
173
|
+
# setup authorization
|
174
|
+
ElasticEmail.configure do |config|
|
175
|
+
# Configure API key authorization: apikey
|
176
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
177
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
178
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
179
|
+
end
|
180
|
+
|
181
|
+
api_instance = ElasticEmail::ContactsApi.new
|
182
|
+
email = 'mail@example.com' # String | Proper email address.
|
183
|
+
opts = {
|
184
|
+
limit: 100, # Integer | Maximum number of returned items.
|
185
|
+
offset: 20 # Integer | How many items should be returned ahead.
|
186
|
+
}
|
187
|
+
|
188
|
+
begin
|
189
|
+
# Load History
|
190
|
+
result = api_instance.contacts_by_email_history_get(email, opts)
|
191
|
+
p result
|
192
|
+
rescue ElasticEmail::ApiError => e
|
193
|
+
puts "Error when calling ContactsApi->contacts_by_email_history_get: #{e}"
|
194
|
+
end
|
195
|
+
```
|
196
|
+
|
197
|
+
#### Using the contacts_by_email_history_get_with_http_info variant
|
198
|
+
|
199
|
+
This returns an Array which contains the response data, status code and headers.
|
200
|
+
|
201
|
+
> <Array(<Array<ContactHistory>>, Integer, Hash)> contacts_by_email_history_get_with_http_info(email, opts)
|
202
|
+
|
203
|
+
```ruby
|
204
|
+
begin
|
205
|
+
# Load History
|
206
|
+
data, status_code, headers = api_instance.contacts_by_email_history_get_with_http_info(email, opts)
|
207
|
+
p status_code # => 2xx
|
208
|
+
p headers # => { ... }
|
209
|
+
p data # => <Array<ContactHistory>>
|
210
|
+
rescue ElasticEmail::ApiError => e
|
211
|
+
puts "Error when calling ContactsApi->contacts_by_email_history_get_with_http_info: #{e}"
|
212
|
+
end
|
213
|
+
```
|
214
|
+
|
215
|
+
### Parameters
|
216
|
+
|
217
|
+
| Name | Type | Description | Notes |
|
218
|
+
| ---- | ---- | ----------- | ----- |
|
219
|
+
| **email** | **String** | Proper email address. | |
|
220
|
+
| **limit** | **Integer** | Maximum number of returned items. | [optional] |
|
221
|
+
| **offset** | **Integer** | How many items should be returned ahead. | [optional] |
|
222
|
+
|
223
|
+
### Return type
|
224
|
+
|
225
|
+
[**Array<ContactHistory>**](ContactHistory.md)
|
226
|
+
|
227
|
+
### Authorization
|
228
|
+
|
229
|
+
[apikey](../README.md#apikey)
|
230
|
+
|
231
|
+
### HTTP request headers
|
232
|
+
|
233
|
+
- **Content-Type**: Not defined
|
234
|
+
- **Accept**: application/json
|
235
|
+
|
236
|
+
|
237
|
+
## contacts_by_email_put
|
238
|
+
|
239
|
+
> <Contact> contacts_by_email_put(email, contact_update_payload)
|
240
|
+
|
241
|
+
Update Contact
|
242
|
+
|
243
|
+
Update selected contact. Omitted contact's fields will not be changed. Required Access Level: ModifyContacts
|
244
|
+
|
245
|
+
### Examples
|
246
|
+
|
247
|
+
```ruby
|
248
|
+
require 'time'
|
249
|
+
require 'ElasticEmail'
|
250
|
+
# setup authorization
|
251
|
+
ElasticEmail.configure do |config|
|
252
|
+
# Configure API key authorization: apikey
|
253
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
254
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
255
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
256
|
+
end
|
257
|
+
|
258
|
+
api_instance = ElasticEmail::ContactsApi.new
|
259
|
+
email = 'mail@example.com' # String | Proper email address.
|
260
|
+
contact_update_payload = ElasticEmail::ContactUpdatePayload.new # ContactUpdatePayload |
|
261
|
+
|
262
|
+
begin
|
263
|
+
# Update Contact
|
264
|
+
result = api_instance.contacts_by_email_put(email, contact_update_payload)
|
265
|
+
p result
|
266
|
+
rescue ElasticEmail::ApiError => e
|
267
|
+
puts "Error when calling ContactsApi->contacts_by_email_put: #{e}"
|
268
|
+
end
|
269
|
+
```
|
270
|
+
|
271
|
+
#### Using the contacts_by_email_put_with_http_info variant
|
272
|
+
|
273
|
+
This returns an Array which contains the response data, status code and headers.
|
274
|
+
|
275
|
+
> <Array(<Contact>, Integer, Hash)> contacts_by_email_put_with_http_info(email, contact_update_payload)
|
276
|
+
|
277
|
+
```ruby
|
278
|
+
begin
|
279
|
+
# Update Contact
|
280
|
+
data, status_code, headers = api_instance.contacts_by_email_put_with_http_info(email, contact_update_payload)
|
281
|
+
p status_code # => 2xx
|
282
|
+
p headers # => { ... }
|
283
|
+
p data # => <Contact>
|
284
|
+
rescue ElasticEmail::ApiError => e
|
285
|
+
puts "Error when calling ContactsApi->contacts_by_email_put_with_http_info: #{e}"
|
286
|
+
end
|
287
|
+
```
|
288
|
+
|
289
|
+
### Parameters
|
290
|
+
|
291
|
+
| Name | Type | Description | Notes |
|
292
|
+
| ---- | ---- | ----------- | ----- |
|
293
|
+
| **email** | **String** | Proper email address. | |
|
294
|
+
| **contact_update_payload** | [**ContactUpdatePayload**](ContactUpdatePayload.md) | | |
|
295
|
+
|
296
|
+
### Return type
|
297
|
+
|
298
|
+
[**Contact**](Contact.md)
|
299
|
+
|
300
|
+
### Authorization
|
301
|
+
|
302
|
+
[apikey](../README.md#apikey)
|
303
|
+
|
304
|
+
### HTTP request headers
|
305
|
+
|
306
|
+
- **Content-Type**: application/json
|
307
|
+
- **Accept**: application/json
|
308
|
+
|
309
|
+
|
310
|
+
## contacts_delete_post
|
311
|
+
|
312
|
+
> contacts_delete_post(emails_payload)
|
313
|
+
|
314
|
+
Delete Contacts Bulk
|
315
|
+
|
316
|
+
Deletes provided contacts in bulk. Required Access Level: ModifyContacts
|
317
|
+
|
318
|
+
### Examples
|
319
|
+
|
320
|
+
```ruby
|
321
|
+
require 'time'
|
322
|
+
require 'ElasticEmail'
|
323
|
+
# setup authorization
|
324
|
+
ElasticEmail.configure do |config|
|
325
|
+
# Configure API key authorization: apikey
|
326
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
327
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
328
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
329
|
+
end
|
330
|
+
|
331
|
+
api_instance = ElasticEmail::ContactsApi.new
|
332
|
+
emails_payload = ElasticEmail::EmailsPayload.new # EmailsPayload | Provide either rule or a list of emails, not both.
|
333
|
+
|
334
|
+
begin
|
335
|
+
# Delete Contacts Bulk
|
336
|
+
api_instance.contacts_delete_post(emails_payload)
|
337
|
+
rescue ElasticEmail::ApiError => e
|
338
|
+
puts "Error when calling ContactsApi->contacts_delete_post: #{e}"
|
339
|
+
end
|
340
|
+
```
|
341
|
+
|
342
|
+
#### Using the contacts_delete_post_with_http_info variant
|
343
|
+
|
344
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
345
|
+
|
346
|
+
> <Array(nil, Integer, Hash)> contacts_delete_post_with_http_info(emails_payload)
|
347
|
+
|
348
|
+
```ruby
|
349
|
+
begin
|
350
|
+
# Delete Contacts Bulk
|
351
|
+
data, status_code, headers = api_instance.contacts_delete_post_with_http_info(emails_payload)
|
352
|
+
p status_code # => 2xx
|
353
|
+
p headers # => { ... }
|
354
|
+
p data # => nil
|
355
|
+
rescue ElasticEmail::ApiError => e
|
356
|
+
puts "Error when calling ContactsApi->contacts_delete_post_with_http_info: #{e}"
|
357
|
+
end
|
358
|
+
```
|
359
|
+
|
360
|
+
### Parameters
|
361
|
+
|
362
|
+
| Name | Type | Description | Notes |
|
363
|
+
| ---- | ---- | ----------- | ----- |
|
364
|
+
| **emails_payload** | [**EmailsPayload**](EmailsPayload.md) | Provide either rule or a list of emails, not both. | |
|
365
|
+
|
366
|
+
### Return type
|
367
|
+
|
368
|
+
nil (empty response body)
|
369
|
+
|
370
|
+
### Authorization
|
371
|
+
|
372
|
+
[apikey](../README.md#apikey)
|
373
|
+
|
374
|
+
### HTTP request headers
|
375
|
+
|
376
|
+
- **Content-Type**: application/json
|
377
|
+
- **Accept**: Not defined
|
378
|
+
|
379
|
+
|
380
|
+
## contacts_export_by_id_status_get
|
381
|
+
|
382
|
+
> <ExportStatus> contacts_export_by_id_status_get(id)
|
383
|
+
|
384
|
+
Check Export Status
|
385
|
+
|
386
|
+
Check the current status of the export. Required Access Level: Export
|
387
|
+
|
388
|
+
### Examples
|
389
|
+
|
390
|
+
```ruby
|
391
|
+
require 'time'
|
392
|
+
require 'ElasticEmail'
|
393
|
+
# setup authorization
|
394
|
+
ElasticEmail.configure do |config|
|
395
|
+
# Configure API key authorization: apikey
|
396
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
397
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
398
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
399
|
+
end
|
400
|
+
|
401
|
+
api_instance = ElasticEmail::ContactsApi.new
|
402
|
+
id = 'E33EBA7A-C20D-4D3D-8F2F-5EEF42F58E6F' # String | ID of the exported file
|
403
|
+
|
404
|
+
begin
|
405
|
+
# Check Export Status
|
406
|
+
result = api_instance.contacts_export_by_id_status_get(id)
|
407
|
+
p result
|
408
|
+
rescue ElasticEmail::ApiError => e
|
409
|
+
puts "Error when calling ContactsApi->contacts_export_by_id_status_get: #{e}"
|
410
|
+
end
|
411
|
+
```
|
412
|
+
|
413
|
+
#### Using the contacts_export_by_id_status_get_with_http_info variant
|
414
|
+
|
415
|
+
This returns an Array which contains the response data, status code and headers.
|
416
|
+
|
417
|
+
> <Array(<ExportStatus>, Integer, Hash)> contacts_export_by_id_status_get_with_http_info(id)
|
418
|
+
|
419
|
+
```ruby
|
420
|
+
begin
|
421
|
+
# Check Export Status
|
422
|
+
data, status_code, headers = api_instance.contacts_export_by_id_status_get_with_http_info(id)
|
423
|
+
p status_code # => 2xx
|
424
|
+
p headers # => { ... }
|
425
|
+
p data # => <ExportStatus>
|
426
|
+
rescue ElasticEmail::ApiError => e
|
427
|
+
puts "Error when calling ContactsApi->contacts_export_by_id_status_get_with_http_info: #{e}"
|
428
|
+
end
|
429
|
+
```
|
430
|
+
|
431
|
+
### Parameters
|
432
|
+
|
433
|
+
| Name | Type | Description | Notes |
|
434
|
+
| ---- | ---- | ----------- | ----- |
|
435
|
+
| **id** | **String** | ID of the exported file | |
|
436
|
+
|
437
|
+
### Return type
|
438
|
+
|
439
|
+
[**ExportStatus**](ExportStatus.md)
|
440
|
+
|
441
|
+
### Authorization
|
442
|
+
|
443
|
+
[apikey](../README.md#apikey)
|
444
|
+
|
445
|
+
### HTTP request headers
|
446
|
+
|
447
|
+
- **Content-Type**: Not defined
|
448
|
+
- **Accept**: application/json
|
449
|
+
|
450
|
+
|
451
|
+
## contacts_export_post
|
452
|
+
|
453
|
+
> <ExportLink> contacts_export_post(opts)
|
454
|
+
|
455
|
+
Export Contacts
|
456
|
+
|
457
|
+
Request an Export of specified Contacts. Required Access Level: Export
|
458
|
+
|
459
|
+
### Examples
|
460
|
+
|
461
|
+
```ruby
|
462
|
+
require 'time'
|
463
|
+
require 'ElasticEmail'
|
464
|
+
# setup authorization
|
465
|
+
ElasticEmail.configure do |config|
|
466
|
+
# Configure API key authorization: apikey
|
467
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
468
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
469
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
470
|
+
end
|
471
|
+
|
472
|
+
api_instance = ElasticEmail::ContactsApi.new
|
473
|
+
opts = {
|
474
|
+
file_format: ElasticEmail::ExportFileFormats::CSV, # ExportFileFormats | Format of the exported file
|
475
|
+
rule: 'Status%20=%20Engaged', # String | Query used for filtering.
|
476
|
+
emails: ['inner_example'], # Array<String> | Comma delimited list of contact emails
|
477
|
+
compression_format: ElasticEmail::CompressionFormat::NONE, # CompressionFormat | FileResponse compression format. None or Zip.
|
478
|
+
file_name: 'filename.txt' # String | Name of your file including extension.
|
479
|
+
}
|
480
|
+
|
481
|
+
begin
|
482
|
+
# Export Contacts
|
483
|
+
result = api_instance.contacts_export_post(opts)
|
484
|
+
p result
|
485
|
+
rescue ElasticEmail::ApiError => e
|
486
|
+
puts "Error when calling ContactsApi->contacts_export_post: #{e}"
|
487
|
+
end
|
488
|
+
```
|
489
|
+
|
490
|
+
#### Using the contacts_export_post_with_http_info variant
|
491
|
+
|
492
|
+
This returns an Array which contains the response data, status code and headers.
|
493
|
+
|
494
|
+
> <Array(<ExportLink>, Integer, Hash)> contacts_export_post_with_http_info(opts)
|
495
|
+
|
496
|
+
```ruby
|
497
|
+
begin
|
498
|
+
# Export Contacts
|
499
|
+
data, status_code, headers = api_instance.contacts_export_post_with_http_info(opts)
|
500
|
+
p status_code # => 2xx
|
501
|
+
p headers # => { ... }
|
502
|
+
p data # => <ExportLink>
|
503
|
+
rescue ElasticEmail::ApiError => e
|
504
|
+
puts "Error when calling ContactsApi->contacts_export_post_with_http_info: #{e}"
|
505
|
+
end
|
506
|
+
```
|
507
|
+
|
508
|
+
### Parameters
|
509
|
+
|
510
|
+
| Name | Type | Description | Notes |
|
511
|
+
| ---- | ---- | ----------- | ----- |
|
512
|
+
| **file_format** | [**ExportFileFormats**](.md) | Format of the exported file | [optional] |
|
513
|
+
| **rule** | **String** | Query used for filtering. | [optional] |
|
514
|
+
| **emails** | [**Array<String>**](String.md) | Comma delimited list of contact emails | [optional] |
|
515
|
+
| **compression_format** | [**CompressionFormat**](.md) | FileResponse compression format. None or Zip. | [optional] |
|
516
|
+
| **file_name** | **String** | Name of your file including extension. | [optional] |
|
517
|
+
|
518
|
+
### Return type
|
519
|
+
|
520
|
+
[**ExportLink**](ExportLink.md)
|
521
|
+
|
522
|
+
### Authorization
|
523
|
+
|
524
|
+
[apikey](../README.md#apikey)
|
525
|
+
|
526
|
+
### HTTP request headers
|
527
|
+
|
528
|
+
- **Content-Type**: Not defined
|
529
|
+
- **Accept**: application/json
|
530
|
+
|
531
|
+
|
532
|
+
## contacts_get
|
533
|
+
|
534
|
+
> <Array<Contact>> contacts_get(opts)
|
535
|
+
|
536
|
+
Load Contacts
|
537
|
+
|
538
|
+
Returns a list of contacts. Required Access Level: ViewContacts
|
539
|
+
|
540
|
+
### Examples
|
541
|
+
|
542
|
+
```ruby
|
543
|
+
require 'time'
|
544
|
+
require 'ElasticEmail'
|
545
|
+
# setup authorization
|
546
|
+
ElasticEmail.configure do |config|
|
547
|
+
# Configure API key authorization: apikey
|
548
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
549
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
550
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
551
|
+
end
|
552
|
+
|
553
|
+
api_instance = ElasticEmail::ContactsApi.new
|
554
|
+
opts = {
|
555
|
+
limit: 100, # Integer | Maximum number of returned items.
|
556
|
+
offset: 20 # Integer | How many items should be returned ahead.
|
557
|
+
}
|
558
|
+
|
559
|
+
begin
|
560
|
+
# Load Contacts
|
561
|
+
result = api_instance.contacts_get(opts)
|
562
|
+
p result
|
563
|
+
rescue ElasticEmail::ApiError => e
|
564
|
+
puts "Error when calling ContactsApi->contacts_get: #{e}"
|
565
|
+
end
|
566
|
+
```
|
567
|
+
|
568
|
+
#### Using the contacts_get_with_http_info variant
|
569
|
+
|
570
|
+
This returns an Array which contains the response data, status code and headers.
|
571
|
+
|
572
|
+
> <Array(<Array<Contact>>, Integer, Hash)> contacts_get_with_http_info(opts)
|
573
|
+
|
574
|
+
```ruby
|
575
|
+
begin
|
576
|
+
# Load Contacts
|
577
|
+
data, status_code, headers = api_instance.contacts_get_with_http_info(opts)
|
578
|
+
p status_code # => 2xx
|
579
|
+
p headers # => { ... }
|
580
|
+
p data # => <Array<Contact>>
|
581
|
+
rescue ElasticEmail::ApiError => e
|
582
|
+
puts "Error when calling ContactsApi->contacts_get_with_http_info: #{e}"
|
583
|
+
end
|
584
|
+
```
|
585
|
+
|
586
|
+
### Parameters
|
587
|
+
|
588
|
+
| Name | Type | Description | Notes |
|
589
|
+
| ---- | ---- | ----------- | ----- |
|
590
|
+
| **limit** | **Integer** | Maximum number of returned items. | [optional] |
|
591
|
+
| **offset** | **Integer** | How many items should be returned ahead. | [optional] |
|
592
|
+
|
593
|
+
### Return type
|
594
|
+
|
595
|
+
[**Array<Contact>**](Contact.md)
|
596
|
+
|
597
|
+
### Authorization
|
598
|
+
|
599
|
+
[apikey](../README.md#apikey)
|
600
|
+
|
601
|
+
### HTTP request headers
|
602
|
+
|
603
|
+
- **Content-Type**: Not defined
|
604
|
+
- **Accept**: application/json
|
605
|
+
|
606
|
+
|
607
|
+
## contacts_import_post
|
608
|
+
|
609
|
+
> contacts_import_post(opts)
|
610
|
+
|
611
|
+
Upload Contacts
|
612
|
+
|
613
|
+
Upload contacts from a file. Required Access Level: ModifyContacts
|
614
|
+
|
615
|
+
### Examples
|
616
|
+
|
617
|
+
```ruby
|
618
|
+
require 'time'
|
619
|
+
require 'ElasticEmail'
|
620
|
+
# setup authorization
|
621
|
+
ElasticEmail.configure do |config|
|
622
|
+
# Configure API key authorization: apikey
|
623
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
624
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
625
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
626
|
+
end
|
627
|
+
|
628
|
+
api_instance = ElasticEmail::ContactsApi.new
|
629
|
+
opts = {
|
630
|
+
list_name: 'list_name_example', # String | Name of an existing list to add these contacts to
|
631
|
+
encoding_name: 'encoding_name_example', # String | In what encoding the file is uploaded
|
632
|
+
file: File.new('/path/to/some/file') # File |
|
633
|
+
}
|
634
|
+
|
635
|
+
begin
|
636
|
+
# Upload Contacts
|
637
|
+
api_instance.contacts_import_post(opts)
|
638
|
+
rescue ElasticEmail::ApiError => e
|
639
|
+
puts "Error when calling ContactsApi->contacts_import_post: #{e}"
|
640
|
+
end
|
641
|
+
```
|
642
|
+
|
643
|
+
#### Using the contacts_import_post_with_http_info variant
|
644
|
+
|
645
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
646
|
+
|
647
|
+
> <Array(nil, Integer, Hash)> contacts_import_post_with_http_info(opts)
|
648
|
+
|
649
|
+
```ruby
|
650
|
+
begin
|
651
|
+
# Upload Contacts
|
652
|
+
data, status_code, headers = api_instance.contacts_import_post_with_http_info(opts)
|
653
|
+
p status_code # => 2xx
|
654
|
+
p headers # => { ... }
|
655
|
+
p data # => nil
|
656
|
+
rescue ElasticEmail::ApiError => e
|
657
|
+
puts "Error when calling ContactsApi->contacts_import_post_with_http_info: #{e}"
|
658
|
+
end
|
659
|
+
```
|
660
|
+
|
661
|
+
### Parameters
|
662
|
+
|
663
|
+
| Name | Type | Description | Notes |
|
664
|
+
| ---- | ---- | ----------- | ----- |
|
665
|
+
| **list_name** | **String** | Name of an existing list to add these contacts to | [optional] |
|
666
|
+
| **encoding_name** | **String** | In what encoding the file is uploaded | [optional] |
|
667
|
+
| **file** | **File** | | [optional] |
|
668
|
+
|
669
|
+
### Return type
|
670
|
+
|
671
|
+
nil (empty response body)
|
672
|
+
|
673
|
+
### Authorization
|
674
|
+
|
675
|
+
[apikey](../README.md#apikey)
|
676
|
+
|
677
|
+
### HTTP request headers
|
678
|
+
|
679
|
+
- **Content-Type**: multipart/form-data
|
680
|
+
- **Accept**: Not defined
|
681
|
+
|
682
|
+
|
683
|
+
## contacts_post
|
684
|
+
|
685
|
+
> <Array<Contact>> contacts_post(contact_payload, opts)
|
686
|
+
|
687
|
+
Add Contact
|
688
|
+
|
689
|
+
Add new Contacts to your Lists. Up to 1000 can be added (for more please refer to the import request). Required Access Level: ModifyContacts
|
690
|
+
|
691
|
+
### Examples
|
692
|
+
|
693
|
+
```ruby
|
694
|
+
require 'time'
|
695
|
+
require 'ElasticEmail'
|
696
|
+
# setup authorization
|
697
|
+
ElasticEmail.configure do |config|
|
698
|
+
# Configure API key authorization: apikey
|
699
|
+
config.api_key['apikey'] = 'YOUR API KEY'
|
700
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
701
|
+
# config.api_key_prefix['apikey'] = 'Bearer'
|
702
|
+
end
|
703
|
+
|
704
|
+
api_instance = ElasticEmail::ContactsApi.new
|
705
|
+
contact_payload = [ElasticEmail::ContactPayload.new] # Array<ContactPayload> |
|
706
|
+
opts = {
|
707
|
+
listnames: ['inner_example'] # Array<String> | Names of lists to which the uploaded contacts should be added to
|
708
|
+
}
|
709
|
+
|
710
|
+
begin
|
711
|
+
# Add Contact
|
712
|
+
result = api_instance.contacts_post(contact_payload, opts)
|
713
|
+
p result
|
714
|
+
rescue ElasticEmail::ApiError => e
|
715
|
+
puts "Error when calling ContactsApi->contacts_post: #{e}"
|
716
|
+
end
|
717
|
+
```
|
718
|
+
|
719
|
+
#### Using the contacts_post_with_http_info variant
|
720
|
+
|
721
|
+
This returns an Array which contains the response data, status code and headers.
|
722
|
+
|
723
|
+
> <Array(<Array<Contact>>, Integer, Hash)> contacts_post_with_http_info(contact_payload, opts)
|
724
|
+
|
725
|
+
```ruby
|
726
|
+
begin
|
727
|
+
# Add Contact
|
728
|
+
data, status_code, headers = api_instance.contacts_post_with_http_info(contact_payload, opts)
|
729
|
+
p status_code # => 2xx
|
730
|
+
p headers # => { ... }
|
731
|
+
p data # => <Array<Contact>>
|
732
|
+
rescue ElasticEmail::ApiError => e
|
733
|
+
puts "Error when calling ContactsApi->contacts_post_with_http_info: #{e}"
|
734
|
+
end
|
735
|
+
```
|
736
|
+
|
737
|
+
### Parameters
|
738
|
+
|
739
|
+
| Name | Type | Description | Notes |
|
740
|
+
| ---- | ---- | ----------- | ----- |
|
741
|
+
| **contact_payload** | [**Array<ContactPayload>**](ContactPayload.md) | | |
|
742
|
+
| **listnames** | [**Array<String>**](String.md) | Names of lists to which the uploaded contacts should be added to | [optional] |
|
743
|
+
|
744
|
+
### Return type
|
745
|
+
|
746
|
+
[**Array<Contact>**](Contact.md)
|
747
|
+
|
748
|
+
### Authorization
|
749
|
+
|
750
|
+
[apikey](../README.md#apikey)
|
751
|
+
|
752
|
+
### HTTP request headers
|
753
|
+
|
754
|
+
- **Content-Type**: application/json
|
755
|
+
- **Accept**: application/json
|
756
|
+
|