ElasticEmail 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/DIFF +0 -0
- data/ElasticEmail.gemspec +38 -0
- data/Gemfile +9 -0
- data/README.md +286 -0
- data/Rakefile +10 -0
- data/VERSION +1 -0
- data/docs/AccessLevel.md +15 -0
- data/docs/AccountStatusEnum.md +15 -0
- data/docs/ApiKey.md +28 -0
- data/docs/ApiKeyPayload.md +26 -0
- data/docs/BodyContentType.md +15 -0
- data/docs/BodyPart.md +22 -0
- data/docs/Campaign.md +26 -0
- data/docs/CampaignOptions.md +26 -0
- data/docs/CampaignRecipient.md +20 -0
- data/docs/CampaignStatus.md +15 -0
- data/docs/CampaignTemplate.md +30 -0
- data/docs/CampaignsApi.md +374 -0
- data/docs/ChannelLogStatusSummary.md +44 -0
- data/docs/CompressionFormat.md +15 -0
- data/docs/ConsentData.md +22 -0
- data/docs/ConsentTracking.md +15 -0
- data/docs/Contact.md +38 -0
- data/docs/ContactActivity.md +38 -0
- data/docs/ContactHistEventType.md +15 -0
- data/docs/ContactHistory.md +30 -0
- data/docs/ContactPayload.md +28 -0
- data/docs/ContactSource.md +15 -0
- data/docs/ContactStatus.md +15 -0
- data/docs/ContactUpdatePayload.md +22 -0
- data/docs/ContactsApi.md +756 -0
- data/docs/ContactsList.md +24 -0
- data/docs/DeliveryOptimizationType.md +15 -0
- data/docs/EmailContent.md +38 -0
- data/docs/EmailData.md +22 -0
- data/docs/EmailMessageData.md +22 -0
- data/docs/EmailRecipient.md +20 -0
- data/docs/EmailSend.md +20 -0
- data/docs/EmailStatus.md +40 -0
- data/docs/EmailTransactionalMessageData.md +22 -0
- data/docs/EmailValidationResult.md +34 -0
- data/docs/EmailValidationStatus.md +15 -0
- data/docs/EmailView.md +22 -0
- data/docs/EmailsApi.md +295 -0
- data/docs/EmailsPayload.md +20 -0
- data/docs/EncodingType.md +15 -0
- data/docs/EventType.md +15 -0
- data/docs/EventsApi.md +575 -0
- data/docs/EventsOrderBy.md +15 -0
- data/docs/ExportFileFormats.md +15 -0
- data/docs/ExportLink.md +20 -0
- data/docs/ExportStatus.md +15 -0
- data/docs/FileInfo.md +26 -0
- data/docs/FilePayload.md +22 -0
- data/docs/FileUploadResult.md +20 -0
- data/docs/FilesApi.md +374 -0
- data/docs/InboundPayload.md +28 -0
- data/docs/InboundRoute.md +30 -0
- data/docs/InboundRouteActionType.md +15 -0
- data/docs/InboundRouteApi.md +437 -0
- data/docs/InboundRouteFilterType.md +15 -0
- data/docs/ListPayload.md +22 -0
- data/docs/ListUpdatePayload.md +20 -0
- data/docs/ListsApi.md +519 -0
- data/docs/LogJobStatus.md +15 -0
- data/docs/LogStatusSummary.md +42 -0
- data/docs/MergeEmailPayload.md +22 -0
- data/docs/MessageAttachment.md +22 -0
- data/docs/MessageCategory.md +15 -0
- data/docs/NewApiKey.md +30 -0
- data/docs/NewSmtpCredentials.md +30 -0
- data/docs/Options.md +28 -0
- data/docs/RecipientEvent.md +42 -0
- data/docs/SecurityApi.md +749 -0
- data/docs/Segment.md +20 -0
- data/docs/SegmentPayload.md +20 -0
- data/docs/SegmentsApi.md +372 -0
- data/docs/SmtpCredentials.md +28 -0
- data/docs/SmtpCredentialsPayload.md +24 -0
- data/docs/SortOrderItem.md +20 -0
- data/docs/SplitOptimizationType.md +15 -0
- data/docs/SplitOptions.md +20 -0
- data/docs/StatisticsApi.md +379 -0
- data/docs/SubAccountInfo.md +34 -0
- data/docs/SubAccountsApi.md +445 -0
- data/docs/SubaccountEmailCreditsPayload.md +20 -0
- data/docs/SubaccountEmailSettings.md +30 -0
- data/docs/SubaccountEmailSettingsPayload.md +28 -0
- data/docs/SubaccountPayload.md +24 -0
- data/docs/SubaccountSettingsInfo.md +18 -0
- data/docs/SubaccountSettingsInfoPayload.md +18 -0
- data/docs/Suppression.md +24 -0
- data/docs/SuppressionsApi.md +895 -0
- data/docs/Template.md +28 -0
- data/docs/TemplatePayload.md +24 -0
- data/docs/TemplateScopeType.md +15 -0
- data/docs/TemplateType.md +15 -0
- data/docs/TemplatesApi.md +376 -0
- data/docs/TransactionalRecipient.md +22 -0
- data/docs/Utm.md +24 -0
- data/docs/VerificationFileResult.md +28 -0
- data/docs/VerificationFileResultDetails.md +30 -0
- data/docs/VerificationStatus.md +15 -0
- data/docs/VerificationsApi.md +662 -0
- data/lib/ElasticEmail.rb +137 -0
- data/lib/ElasticEmail/api/campaigns_api.rb +348 -0
- data/lib/ElasticEmail/api/contacts_api.rb +681 -0
- data/lib/ElasticEmail/api/emails_api.rb +280 -0
- data/lib/ElasticEmail/api/events_api.rb +538 -0
- data/lib/ElasticEmail/api/files_api.rb +340 -0
- data/lib/ElasticEmail/api/inbound_route_api.rb +404 -0
- data/lib/ElasticEmail/api/lists_api.rb +485 -0
- data/lib/ElasticEmail/api/security_api.rb +674 -0
- data/lib/ElasticEmail/api/segments_api.rb +345 -0
- data/lib/ElasticEmail/api/statistics_api.rb +341 -0
- data/lib/ElasticEmail/api/sub_accounts_api.rb +414 -0
- data/lib/ElasticEmail/api/suppressions_api.rb +782 -0
- data/lib/ElasticEmail/api/templates_api.rb +355 -0
- data/lib/ElasticEmail/api/verifications_api.rb +584 -0
- data/lib/ElasticEmail/api_client.rb +390 -0
- data/lib/ElasticEmail/api_error.rb +57 -0
- data/lib/ElasticEmail/configuration.rb +277 -0
- data/lib/ElasticEmail/models/access_level.rb +79 -0
- data/lib/ElasticEmail/models/account_status_enum.rb +40 -0
- data/lib/ElasticEmail/models/api_key.rb +276 -0
- data/lib/ElasticEmail/models/api_key_payload.rb +265 -0
- data/lib/ElasticEmail/models/body_content_type.rb +39 -0
- data/lib/ElasticEmail/models/body_part.rb +240 -0
- data/lib/ElasticEmail/models/campaign.rb +261 -0
- data/lib/ElasticEmail/models/campaign_options.rb +263 -0
- data/lib/ElasticEmail/models/campaign_recipient.rb +234 -0
- data/lib/ElasticEmail/models/campaign_status.rb +43 -0
- data/lib/ElasticEmail/models/campaign_template.rb +282 -0
- data/lib/ElasticEmail/models/channel_log_status_summary.rb +350 -0
- data/lib/ElasticEmail/models/compression_format.rb +37 -0
- data/lib/ElasticEmail/models/consent_data.rb +240 -0
- data/lib/ElasticEmail/models/consent_tracking.rb +38 -0
- data/lib/ElasticEmail/models/contact.rb +323 -0
- data/lib/ElasticEmail/models/contact_activity.rb +324 -0
- data/lib/ElasticEmail/models/contact_hist_event_type.rb +49 -0
- data/lib/ElasticEmail/models/contact_history.rb +279 -0
- data/lib/ElasticEmail/models/contact_payload.rb +270 -0
- data/lib/ElasticEmail/models/contact_source.rb +42 -0
- data/lib/ElasticEmail/models/contact_status.rb +44 -0
- data/lib/ElasticEmail/models/contact_update_payload.rb +241 -0
- data/lib/ElasticEmail/models/contacts_list.rb +251 -0
- data/lib/ElasticEmail/models/delivery_optimization_type.rb +38 -0
- data/lib/ElasticEmail/models/email_content.rb +330 -0
- data/lib/ElasticEmail/models/email_data.rb +241 -0
- data/lib/ElasticEmail/models/email_message_data.rb +242 -0
- data/lib/ElasticEmail/models/email_recipient.rb +232 -0
- data/lib/ElasticEmail/models/email_send.rb +229 -0
- data/lib/ElasticEmail/models/email_status.rb +332 -0
- data/lib/ElasticEmail/models/email_transactional_message_data.rb +240 -0
- data/lib/ElasticEmail/models/email_validation_result.rb +300 -0
- data/lib/ElasticEmail/models/email_validation_status.rb +40 -0
- data/lib/ElasticEmail/models/email_view.rb +240 -0
- data/lib/ElasticEmail/models/emails_payload.rb +232 -0
- data/lib/ElasticEmail/models/encoding_type.rb +42 -0
- data/lib/ElasticEmail/models/event_type.rb +43 -0
- data/lib/ElasticEmail/models/events_order_by.rb +37 -0
- data/lib/ElasticEmail/models/export_file_formats.rb +38 -0
- data/lib/ElasticEmail/models/export_link.rb +229 -0
- data/lib/ElasticEmail/models/export_status.rb +39 -0
- data/lib/ElasticEmail/models/file_info.rb +262 -0
- data/lib/ElasticEmail/models/file_payload.rb +239 -0
- data/lib/ElasticEmail/models/file_upload_result.rb +229 -0
- data/lib/ElasticEmail/models/inbound_payload.rb +269 -0
- data/lib/ElasticEmail/models/inbound_route.rb +278 -0
- data/lib/ElasticEmail/models/inbound_route_action_type.rb +38 -0
- data/lib/ElasticEmail/models/inbound_route_filter_type.rb +37 -0
- data/lib/ElasticEmail/models/list_payload.rb +241 -0
- data/lib/ElasticEmail/models/list_update_payload.rb +229 -0
- data/lib/ElasticEmail/models/log_job_status.rb +45 -0
- data/lib/ElasticEmail/models/log_status_summary.rb +340 -0
- data/lib/ElasticEmail/models/merge_email_payload.rb +239 -0
- data/lib/ElasticEmail/models/message_attachment.rb +237 -0
- data/lib/ElasticEmail/models/message_category.rb +52 -0
- data/lib/ElasticEmail/models/new_api_key.rb +286 -0
- data/lib/ElasticEmail/models/new_smtp_credentials.rb +284 -0
- data/lib/ElasticEmail/models/options.rb +271 -0
- data/lib/ElasticEmail/models/recipient_event.rb +341 -0
- data/lib/ElasticEmail/models/segment.rb +230 -0
- data/lib/ElasticEmail/models/segment_payload.rb +229 -0
- data/lib/ElasticEmail/models/smtp_credentials.rb +274 -0
- data/lib/ElasticEmail/models/smtp_credentials_payload.rb +253 -0
- data/lib/ElasticEmail/models/sort_order_item.rb +229 -0
- data/lib/ElasticEmail/models/split_optimization_type.rb +37 -0
- data/lib/ElasticEmail/models/split_options.rb +230 -0
- data/lib/ElasticEmail/models/sub_account_info.rb +300 -0
- data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +230 -0
- data/lib/ElasticEmail/models/subaccount_email_settings.rb +280 -0
- data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +270 -0
- data/lib/ElasticEmail/models/subaccount_payload.rb +250 -0
- data/lib/ElasticEmail/models/subaccount_settings_info.rb +220 -0
- data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +220 -0
- data/lib/ElasticEmail/models/suppression.rb +252 -0
- data/lib/ElasticEmail/models/template.rb +272 -0
- data/lib/ElasticEmail/models/template_payload.rb +252 -0
- data/lib/ElasticEmail/models/template_scope_type.rb +38 -0
- data/lib/ElasticEmail/models/template_type.rb +38 -0
- data/lib/ElasticEmail/models/transactional_recipient.rb +246 -0
- data/lib/ElasticEmail/models/utm.rb +250 -0
- data/lib/ElasticEmail/models/verification_file_result.rb +270 -0
- data/lib/ElasticEmail/models/verification_file_result_details.rb +282 -0
- data/lib/ElasticEmail/models/verification_status.rb +40 -0
- data/lib/ElasticEmail/version.rb +15 -0
- data/spec/api/campaigns_api_spec.rb +98 -0
- data/spec/api/contacts_api_spec.rb +166 -0
- data/spec/api/emails_api_spec.rb +83 -0
- data/spec/api/events_api_spec.rb +146 -0
- data/spec/api/files_api_spec.rb +97 -0
- data/spec/api/inbound_route_api_spec.rb +107 -0
- data/spec/api/lists_api_spec.rb +123 -0
- data/spec/api/security_api_spec.rb +161 -0
- data/spec/api/segments_api_spec.rb +97 -0
- data/spec/api/statistics_api_spec.rb +98 -0
- data/spec/api/sub_accounts_api_spec.rb +110 -0
- data/spec/api/suppressions_api_spec.rb +186 -0
- data/spec/api/templates_api_spec.rb +99 -0
- data/spec/api/verifications_api_spec.rb +145 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_level_spec.rb +28 -0
- data/spec/models/account_status_enum_spec.rb +28 -0
- data/spec/models/api_key_payload_spec.rb +58 -0
- data/spec/models/api_key_spec.rb +64 -0
- data/spec/models/body_content_type_spec.rb +28 -0
- data/spec/models/body_part_spec.rb +46 -0
- data/spec/models/campaign_options_spec.rb +58 -0
- data/spec/models/campaign_recipient_spec.rb +40 -0
- data/spec/models/campaign_spec.rb +58 -0
- data/spec/models/campaign_status_spec.rb +28 -0
- data/spec/models/campaign_template_spec.rb +70 -0
- data/spec/models/channel_log_status_summary_spec.rb +112 -0
- data/spec/models/compression_format_spec.rb +28 -0
- data/spec/models/consent_data_spec.rb +46 -0
- data/spec/models/consent_tracking_spec.rb +28 -0
- data/spec/models/contact_activity_spec.rb +94 -0
- data/spec/models/contact_hist_event_type_spec.rb +28 -0
- data/spec/models/contact_history_spec.rb +70 -0
- data/spec/models/contact_payload_spec.rb +64 -0
- data/spec/models/contact_source_spec.rb +28 -0
- data/spec/models/contact_spec.rb +94 -0
- data/spec/models/contact_status_spec.rb +28 -0
- data/spec/models/contact_update_payload_spec.rb +46 -0
- data/spec/models/contacts_list_spec.rb +52 -0
- data/spec/models/delivery_optimization_type_spec.rb +28 -0
- data/spec/models/email_content_spec.rb +94 -0
- data/spec/models/email_data_spec.rb +46 -0
- data/spec/models/email_message_data_spec.rb +46 -0
- data/spec/models/email_recipient_spec.rb +40 -0
- data/spec/models/email_send_spec.rb +40 -0
- data/spec/models/email_status_spec.rb +100 -0
- data/spec/models/email_transactional_message_data_spec.rb +46 -0
- data/spec/models/email_validation_result_spec.rb +82 -0
- data/spec/models/email_validation_status_spec.rb +28 -0
- data/spec/models/email_view_spec.rb +46 -0
- data/spec/models/emails_payload_spec.rb +40 -0
- data/spec/models/encoding_type_spec.rb +28 -0
- data/spec/models/event_type_spec.rb +28 -0
- data/spec/models/events_order_by_spec.rb +28 -0
- data/spec/models/export_file_formats_spec.rb +28 -0
- data/spec/models/export_link_spec.rb +40 -0
- data/spec/models/export_status_spec.rb +28 -0
- data/spec/models/file_info_spec.rb +58 -0
- data/spec/models/file_payload_spec.rb +46 -0
- data/spec/models/file_upload_result_spec.rb +40 -0
- data/spec/models/inbound_payload_spec.rb +64 -0
- data/spec/models/inbound_route_action_type_spec.rb +28 -0
- data/spec/models/inbound_route_filter_type_spec.rb +28 -0
- data/spec/models/inbound_route_spec.rb +70 -0
- data/spec/models/list_payload_spec.rb +46 -0
- data/spec/models/list_update_payload_spec.rb +40 -0
- data/spec/models/log_job_status_spec.rb +28 -0
- data/spec/models/log_status_summary_spec.rb +106 -0
- data/spec/models/merge_email_payload_spec.rb +46 -0
- data/spec/models/message_attachment_spec.rb +46 -0
- data/spec/models/message_category_spec.rb +28 -0
- data/spec/models/new_api_key_spec.rb +70 -0
- data/spec/models/new_smtp_credentials_spec.rb +70 -0
- data/spec/models/options_spec.rb +64 -0
- data/spec/models/recipient_event_spec.rb +106 -0
- data/spec/models/segment_payload_spec.rb +40 -0
- data/spec/models/segment_spec.rb +40 -0
- data/spec/models/smtp_credentials_payload_spec.rb +52 -0
- data/spec/models/smtp_credentials_spec.rb +64 -0
- data/spec/models/sort_order_item_spec.rb +40 -0
- data/spec/models/split_optimization_type_spec.rb +28 -0
- data/spec/models/split_options_spec.rb +40 -0
- data/spec/models/sub_account_info_spec.rb +82 -0
- data/spec/models/subaccount_email_credits_payload_spec.rb +40 -0
- data/spec/models/subaccount_email_settings_payload_spec.rb +64 -0
- data/spec/models/subaccount_email_settings_spec.rb +70 -0
- data/spec/models/subaccount_payload_spec.rb +52 -0
- data/spec/models/subaccount_settings_info_payload_spec.rb +34 -0
- data/spec/models/subaccount_settings_info_spec.rb +34 -0
- data/spec/models/suppression_spec.rb +52 -0
- data/spec/models/template_payload_spec.rb +52 -0
- data/spec/models/template_scope_type_spec.rb +28 -0
- data/spec/models/template_spec.rb +64 -0
- data/spec/models/template_type_spec.rb +28 -0
- data/spec/models/transactional_recipient_spec.rb +46 -0
- data/spec/models/utm_spec.rb +52 -0
- data/spec/models/verification_file_result_details_spec.rb +70 -0
- data/spec/models/verification_file_result_spec.rb +64 -0
- data/spec/models/verification_status_spec.rb +28 -0
- data/spec/spec_helper.rb +111 -0
- metadata +498 -0
@@ -0,0 +1,300 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module ElasticEmail
|
17
|
+
class EmailValidationResult
|
18
|
+
# Local part of an email
|
19
|
+
attr_accessor :account
|
20
|
+
|
21
|
+
# Name of selected domain.
|
22
|
+
attr_accessor :domain
|
23
|
+
|
24
|
+
# Full email address that was verified
|
25
|
+
attr_accessor :email
|
26
|
+
|
27
|
+
# Suggested spelling if a possible mistake was found
|
28
|
+
attr_accessor :suggested_spelling
|
29
|
+
|
30
|
+
# Does the email have a temporary domain
|
31
|
+
attr_accessor :disposable
|
32
|
+
|
33
|
+
# Is an email a role email (e.g. info@, noreply@ etc.)
|
34
|
+
attr_accessor :role
|
35
|
+
|
36
|
+
# All detected issues
|
37
|
+
attr_accessor :reason
|
38
|
+
|
39
|
+
# Date of creation in YYYY-MM-DDThh:ii:ss format
|
40
|
+
attr_accessor :date_added
|
41
|
+
|
42
|
+
attr_accessor :result
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'account' => :'Account',
|
48
|
+
:'domain' => :'Domain',
|
49
|
+
:'email' => :'Email',
|
50
|
+
:'suggested_spelling' => :'SuggestedSpelling',
|
51
|
+
:'disposable' => :'Disposable',
|
52
|
+
:'role' => :'Role',
|
53
|
+
:'reason' => :'Reason',
|
54
|
+
:'date_added' => :'DateAdded',
|
55
|
+
:'result' => :'Result'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Returns all the JSON keys this model knows about
|
60
|
+
def self.acceptable_attributes
|
61
|
+
attribute_map.values
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.openapi_types
|
66
|
+
{
|
67
|
+
:'account' => :'String',
|
68
|
+
:'domain' => :'String',
|
69
|
+
:'email' => :'String',
|
70
|
+
:'suggested_spelling' => :'String',
|
71
|
+
:'disposable' => :'Boolean',
|
72
|
+
:'role' => :'Boolean',
|
73
|
+
:'reason' => :'String',
|
74
|
+
:'date_added' => :'Time',
|
75
|
+
:'result' => :'EmailValidationStatus'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# List of attributes with nullable: true
|
80
|
+
def self.openapi_nullable
|
81
|
+
Set.new([
|
82
|
+
])
|
83
|
+
end
|
84
|
+
|
85
|
+
# Initializes the object
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
87
|
+
def initialize(attributes = {})
|
88
|
+
if (!attributes.is_a?(Hash))
|
89
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ElasticEmail::EmailValidationResult` initialize method"
|
90
|
+
end
|
91
|
+
|
92
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
94
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::EmailValidationResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
96
|
+
end
|
97
|
+
h[k.to_sym] = v
|
98
|
+
}
|
99
|
+
|
100
|
+
if attributes.key?(:'account')
|
101
|
+
self.account = attributes[:'account']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'domain')
|
105
|
+
self.domain = attributes[:'domain']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'email')
|
109
|
+
self.email = attributes[:'email']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'suggested_spelling')
|
113
|
+
self.suggested_spelling = attributes[:'suggested_spelling']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'disposable')
|
117
|
+
self.disposable = attributes[:'disposable']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'role')
|
121
|
+
self.role = attributes[:'role']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'reason')
|
125
|
+
self.reason = attributes[:'reason']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'date_added')
|
129
|
+
self.date_added = attributes[:'date_added']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'result')
|
133
|
+
self.result = attributes[:'result']
|
134
|
+
else
|
135
|
+
self.result = 'None'
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
140
|
+
# @return Array for valid properties with the reasons
|
141
|
+
def list_invalid_properties
|
142
|
+
invalid_properties = Array.new
|
143
|
+
invalid_properties
|
144
|
+
end
|
145
|
+
|
146
|
+
# Check to see if the all the properties in the model are valid
|
147
|
+
# @return true if the model is valid
|
148
|
+
def valid?
|
149
|
+
true
|
150
|
+
end
|
151
|
+
|
152
|
+
# Checks equality by comparing each attribute.
|
153
|
+
# @param [Object] Object to be compared
|
154
|
+
def ==(o)
|
155
|
+
return true if self.equal?(o)
|
156
|
+
self.class == o.class &&
|
157
|
+
account == o.account &&
|
158
|
+
domain == o.domain &&
|
159
|
+
email == o.email &&
|
160
|
+
suggested_spelling == o.suggested_spelling &&
|
161
|
+
disposable == o.disposable &&
|
162
|
+
role == o.role &&
|
163
|
+
reason == o.reason &&
|
164
|
+
date_added == o.date_added &&
|
165
|
+
result == o.result
|
166
|
+
end
|
167
|
+
|
168
|
+
# @see the `==` method
|
169
|
+
# @param [Object] Object to be compared
|
170
|
+
def eql?(o)
|
171
|
+
self == o
|
172
|
+
end
|
173
|
+
|
174
|
+
# Calculates hash code according to all attributes.
|
175
|
+
# @return [Integer] Hash code
|
176
|
+
def hash
|
177
|
+
[account, domain, email, suggested_spelling, disposable, role, reason, date_added, result].hash
|
178
|
+
end
|
179
|
+
|
180
|
+
# Builds the object from hash
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
182
|
+
# @return [Object] Returns the model itself
|
183
|
+
def self.build_from_hash(attributes)
|
184
|
+
new.build_from_hash(attributes)
|
185
|
+
end
|
186
|
+
|
187
|
+
# Builds the object from hash
|
188
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
189
|
+
# @return [Object] Returns the model itself
|
190
|
+
def build_from_hash(attributes)
|
191
|
+
return nil unless attributes.is_a?(Hash)
|
192
|
+
self.class.openapi_types.each_pair do |key, type|
|
193
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
194
|
+
self.send("#{key}=", nil)
|
195
|
+
elsif type =~ /\AArray<(.*)>/i
|
196
|
+
# check to ensure the input is an array given that the attribute
|
197
|
+
# is documented as an array but the input is not
|
198
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
199
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
200
|
+
end
|
201
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
202
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
self
|
207
|
+
end
|
208
|
+
|
209
|
+
# Deserializes the data based on type
|
210
|
+
# @param string type Data type
|
211
|
+
# @param string value Value to be deserialized
|
212
|
+
# @return [Object] Deserialized data
|
213
|
+
def _deserialize(type, value)
|
214
|
+
case type.to_sym
|
215
|
+
when :Time
|
216
|
+
Time.parse(value)
|
217
|
+
when :Date
|
218
|
+
Date.parse(value)
|
219
|
+
when :String
|
220
|
+
value.to_s
|
221
|
+
when :Integer
|
222
|
+
value.to_i
|
223
|
+
when :Float
|
224
|
+
value.to_f
|
225
|
+
when :Boolean
|
226
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
227
|
+
true
|
228
|
+
else
|
229
|
+
false
|
230
|
+
end
|
231
|
+
when :Object
|
232
|
+
# generic object (usually a Hash), return directly
|
233
|
+
value
|
234
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
235
|
+
inner_type = Regexp.last_match[:inner_type]
|
236
|
+
value.map { |v| _deserialize(inner_type, v) }
|
237
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
238
|
+
k_type = Regexp.last_match[:k_type]
|
239
|
+
v_type = Regexp.last_match[:v_type]
|
240
|
+
{}.tap do |hash|
|
241
|
+
value.each do |k, v|
|
242
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
243
|
+
end
|
244
|
+
end
|
245
|
+
else # model
|
246
|
+
# models (e.g. Pet) or oneOf
|
247
|
+
klass = ElasticEmail.const_get(type)
|
248
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
# Returns the string representation of the object
|
253
|
+
# @return [String] String presentation of the object
|
254
|
+
def to_s
|
255
|
+
to_hash.to_s
|
256
|
+
end
|
257
|
+
|
258
|
+
# to_body is an alias to to_hash (backward compatibility)
|
259
|
+
# @return [Hash] Returns the object in the form of hash
|
260
|
+
def to_body
|
261
|
+
to_hash
|
262
|
+
end
|
263
|
+
|
264
|
+
# Returns the object in the form of hash
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
266
|
+
def to_hash
|
267
|
+
hash = {}
|
268
|
+
self.class.attribute_map.each_pair do |attr, param|
|
269
|
+
value = self.send(attr)
|
270
|
+
if value.nil?
|
271
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
272
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
273
|
+
end
|
274
|
+
|
275
|
+
hash[param] = _to_hash(value)
|
276
|
+
end
|
277
|
+
hash
|
278
|
+
end
|
279
|
+
|
280
|
+
# Outputs non-array value in the form of hash
|
281
|
+
# For object, use to_hash. Otherwise, just return the value
|
282
|
+
# @param [Object] value Any valid value
|
283
|
+
# @return [Hash] Returns the value in the form of hash
|
284
|
+
def _to_hash(value)
|
285
|
+
if value.is_a?(Array)
|
286
|
+
value.compact.map { |v| _to_hash(v) }
|
287
|
+
elsif value.is_a?(Hash)
|
288
|
+
{}.tap do |hash|
|
289
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
290
|
+
end
|
291
|
+
elsif value.respond_to? :to_hash
|
292
|
+
value.to_hash
|
293
|
+
else
|
294
|
+
value
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
298
|
+
end
|
299
|
+
|
300
|
+
end
|
@@ -0,0 +1,40 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module ElasticEmail
|
17
|
+
class EmailValidationStatus
|
18
|
+
NONE = "None".freeze
|
19
|
+
VALID = "Valid".freeze
|
20
|
+
UNKNOWN = "Unknown".freeze
|
21
|
+
RISKY = "Risky".freeze
|
22
|
+
INVALID = "Invalid".freeze
|
23
|
+
|
24
|
+
# Builds the enum from string
|
25
|
+
# @param [String] The enum value in the form of the string
|
26
|
+
# @return [String] The enum value
|
27
|
+
def self.build_from_hash(value)
|
28
|
+
new.build_from_hash(value)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Builds the enum from string
|
32
|
+
# @param [String] The enum value in the form of the string
|
33
|
+
# @return [String] The enum value
|
34
|
+
def build_from_hash(value)
|
35
|
+
constantValues = EmailValidationStatus.constants.select { |c| EmailValidationStatus::const_get(c) == value }
|
36
|
+
raise "Invalid ENUM value #{value} for class #EmailValidationStatus" if constantValues.empty?
|
37
|
+
value
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,240 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module ElasticEmail
|
17
|
+
# Email details formatted in json
|
18
|
+
class EmailView
|
19
|
+
# Body (HTML, otherwise plain text) of email
|
20
|
+
attr_accessor :body
|
21
|
+
|
22
|
+
# Default subject of email.
|
23
|
+
attr_accessor :subject
|
24
|
+
|
25
|
+
# From email address
|
26
|
+
attr_accessor :from
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'body' => :'Body',
|
32
|
+
:'subject' => :'Subject',
|
33
|
+
:'from' => :'From'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'body' => :'String',
|
46
|
+
:'subject' => :'String',
|
47
|
+
:'from' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ElasticEmail::EmailView` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::EmailView`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'body')
|
73
|
+
self.body = attributes[:'body']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'subject')
|
77
|
+
self.subject = attributes[:'subject']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'from')
|
81
|
+
self.from = attributes[:'from']
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
86
|
+
# @return Array for valid properties with the reasons
|
87
|
+
def list_invalid_properties
|
88
|
+
invalid_properties = Array.new
|
89
|
+
invalid_properties
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
def valid?
|
95
|
+
true
|
96
|
+
end
|
97
|
+
|
98
|
+
# Checks equality by comparing each attribute.
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
body == o.body &&
|
104
|
+
subject == o.subject &&
|
105
|
+
from == o.from
|
106
|
+
end
|
107
|
+
|
108
|
+
# @see the `==` method
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
112
|
+
end
|
113
|
+
|
114
|
+
# Calculates hash code according to all attributes.
|
115
|
+
# @return [Integer] Hash code
|
116
|
+
def hash
|
117
|
+
[body, subject, from].hash
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def self.build_from_hash(attributes)
|
124
|
+
new.build_from_hash(attributes)
|
125
|
+
end
|
126
|
+
|
127
|
+
# Builds the object from hash
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
# @return [Object] Returns the model itself
|
130
|
+
def build_from_hash(attributes)
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
132
|
+
self.class.openapi_types.each_pair do |key, type|
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
134
|
+
self.send("#{key}=", nil)
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
136
|
+
# check to ensure the input is an array given that the attribute
|
137
|
+
# is documented as an array but the input is not
|
138
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
139
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
140
|
+
end
|
141
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
142
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
self
|
147
|
+
end
|
148
|
+
|
149
|
+
# Deserializes the data based on type
|
150
|
+
# @param string type Data type
|
151
|
+
# @param string value Value to be deserialized
|
152
|
+
# @return [Object] Deserialized data
|
153
|
+
def _deserialize(type, value)
|
154
|
+
case type.to_sym
|
155
|
+
when :Time
|
156
|
+
Time.parse(value)
|
157
|
+
when :Date
|
158
|
+
Date.parse(value)
|
159
|
+
when :String
|
160
|
+
value.to_s
|
161
|
+
when :Integer
|
162
|
+
value.to_i
|
163
|
+
when :Float
|
164
|
+
value.to_f
|
165
|
+
when :Boolean
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
167
|
+
true
|
168
|
+
else
|
169
|
+
false
|
170
|
+
end
|
171
|
+
when :Object
|
172
|
+
# generic object (usually a Hash), return directly
|
173
|
+
value
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
180
|
+
{}.tap do |hash|
|
181
|
+
value.each do |k, v|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
else # model
|
186
|
+
# models (e.g. Pet) or oneOf
|
187
|
+
klass = ElasticEmail.const_get(type)
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the string representation of the object
|
193
|
+
# @return [String] String presentation of the object
|
194
|
+
def to_s
|
195
|
+
to_hash.to_s
|
196
|
+
end
|
197
|
+
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_body
|
201
|
+
to_hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the object in the form of hash
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_hash
|
207
|
+
hash = {}
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
209
|
+
value = self.send(attr)
|
210
|
+
if value.nil?
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
213
|
+
end
|
214
|
+
|
215
|
+
hash[param] = _to_hash(value)
|
216
|
+
end
|
217
|
+
hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Outputs non-array value in the form of hash
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
222
|
+
# @param [Object] value Any valid value
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
224
|
+
def _to_hash(value)
|
225
|
+
if value.is_a?(Array)
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
227
|
+
elsif value.is_a?(Hash)
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
230
|
+
end
|
231
|
+
elsif value.respond_to? :to_hash
|
232
|
+
value.to_hash
|
233
|
+
else
|
234
|
+
value
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
239
|
+
|
240
|
+
end
|