ElasticEmail 4.0.23 → 4.0.25
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 +4 -4
- data/ElasticEmail.gemspec +2 -1
- data/README.md +28 -4
- data/VERSION +1 -1
- data/docs/CampaignOptions.md +4 -0
- data/docs/CampaignTemplate.md +2 -2
- data/docs/CampaignsApi.md +71 -0
- data/docs/CertificateValidationStatus.md +15 -0
- data/docs/DomainData.md +54 -0
- data/docs/DomainDetail.md +52 -0
- data/docs/{TemplateScopeType.md → DomainOwner.md} +2 -2
- data/docs/DomainPayload.md +20 -0
- data/docs/DomainUpdatePayload.md +24 -0
- data/docs/DomainsApi.md +583 -0
- data/docs/EmailContent.md +2 -2
- data/docs/EmailJobFailedStatus.md +24 -0
- data/docs/EmailJobStatus.md +56 -0
- data/docs/EmailMessageData.md +1 -1
- data/docs/EmailStatus.md +3 -1
- data/docs/EmailTransactionalMessageData.md +1 -1
- data/docs/EmailValidationResult.md +2 -2
- data/docs/EmailsApi.md +98 -4
- data/docs/EmailsPayload.md +1 -1
- data/docs/ListPayload.md +1 -1
- data/docs/ListsApi.md +78 -0
- data/docs/MergeEmailPayload.md +1 -1
- data/docs/{ContactHistEventType.md → MessageCategoryEnum.md} +2 -2
- data/docs/TrackingType.md +15 -0
- data/docs/TrackingValidationStatus.md +15 -0
- data/lib/ElasticEmail/api/campaigns_api.rb +62 -1
- data/lib/ElasticEmail/api/contacts_api.rb +1 -1
- data/lib/ElasticEmail/api/domains_api.rb +545 -0
- data/lib/ElasticEmail/api/emails_api.rb +96 -3
- data/lib/ElasticEmail/api/events_api.rb +1 -1
- data/lib/ElasticEmail/api/files_api.rb +1 -1
- data/lib/ElasticEmail/api/inbound_route_api.rb +1 -1
- data/lib/ElasticEmail/api/lists_api.rb +70 -1
- data/lib/ElasticEmail/api/security_api.rb +1 -1
- data/lib/ElasticEmail/api/segments_api.rb +1 -1
- data/lib/ElasticEmail/api/statistics_api.rb +1 -1
- data/lib/ElasticEmail/api/sub_accounts_api.rb +1 -1
- data/lib/ElasticEmail/api/suppressions_api.rb +1 -1
- data/lib/ElasticEmail/api/templates_api.rb +1 -1
- data/lib/ElasticEmail/api/verifications_api.rb +1 -1
- data/lib/ElasticEmail/api_client.rb +23 -21
- data/lib/ElasticEmail/api_error.rb +1 -1
- data/lib/ElasticEmail/configuration.rb +18 -10
- data/lib/ElasticEmail/models/access_level.rb +4 -3
- data/lib/ElasticEmail/models/account_status_enum.rb +1 -1
- data/lib/ElasticEmail/models/api_key.rb +14 -19
- data/lib/ElasticEmail/models/api_key_payload.rb +18 -19
- data/lib/ElasticEmail/models/body_content_type.rb +1 -1
- data/lib/ElasticEmail/models/body_part.rb +14 -19
- data/lib/ElasticEmail/models/campaign.rb +18 -19
- data/lib/ElasticEmail/models/campaign_options.rb +35 -20
- data/lib/ElasticEmail/models/campaign_recipient.rb +14 -19
- data/lib/ElasticEmail/models/campaign_status.rb +1 -1
- data/lib/ElasticEmail/models/campaign_template.rb +21 -19
- data/lib/ElasticEmail/models/certificate_validation_status.rb +42 -0
- data/lib/ElasticEmail/models/channel_log_status_summary.rb +14 -19
- data/lib/ElasticEmail/models/compression_format.rb +1 -1
- data/lib/ElasticEmail/models/consent_data.rb +14 -19
- data/lib/ElasticEmail/models/consent_tracking.rb +1 -1
- data/lib/ElasticEmail/models/contact.rb +14 -19
- data/lib/ElasticEmail/models/contact_activity.rb +14 -19
- data/lib/ElasticEmail/models/contact_payload.rb +16 -19
- data/lib/ElasticEmail/models/contact_source.rb +1 -1
- data/lib/ElasticEmail/models/contact_status.rb +1 -1
- data/lib/ElasticEmail/models/contact_update_payload.rb +14 -19
- data/lib/ElasticEmail/models/contacts_list.rb +14 -19
- data/lib/ElasticEmail/models/delivery_optimization_type.rb +1 -1
- data/lib/ElasticEmail/models/domain_data.rb +417 -0
- data/lib/ElasticEmail/models/domain_detail.rb +407 -0
- data/lib/ElasticEmail/models/domain_owner.rb +40 -0
- data/lib/ElasticEmail/models/domain_payload.rb +224 -0
- data/lib/ElasticEmail/models/{contact_history.rb → domain_update_payload.rb} +63 -79
- data/lib/ElasticEmail/models/email_content.rb +21 -19
- data/lib/ElasticEmail/models/email_data.rb +14 -19
- data/lib/ElasticEmail/models/email_job_failed_status.rb +242 -0
- data/lib/ElasticEmail/models/email_job_status.rb +415 -0
- data/lib/ElasticEmail/models/email_message_data.rb +23 -19
- data/lib/ElasticEmail/models/email_predicted_validation_status.rb +1 -1
- data/lib/ElasticEmail/models/email_recipient.rb +16 -19
- data/lib/ElasticEmail/models/email_send.rb +14 -19
- data/lib/ElasticEmail/models/email_status.rb +29 -23
- data/lib/ElasticEmail/models/email_transactional_message_data.rb +23 -19
- data/lib/ElasticEmail/models/email_validation_result.rb +16 -20
- data/lib/ElasticEmail/models/email_validation_status.rb +1 -1
- data/lib/ElasticEmail/models/email_view.rb +14 -19
- data/lib/ElasticEmail/models/emails_payload.rb +14 -19
- data/lib/ElasticEmail/models/encoding_type.rb +1 -1
- data/lib/ElasticEmail/models/event_type.rb +1 -1
- data/lib/ElasticEmail/models/events_order_by.rb +1 -1
- data/lib/ElasticEmail/models/export_file_formats.rb +1 -1
- data/lib/ElasticEmail/models/export_link.rb +14 -19
- data/lib/ElasticEmail/models/export_status.rb +1 -1
- data/lib/ElasticEmail/models/file_info.rb +14 -19
- data/lib/ElasticEmail/models/file_payload.rb +16 -19
- data/lib/ElasticEmail/models/file_upload_result.rb +14 -19
- data/lib/ElasticEmail/models/inbound_payload.rb +18 -19
- data/lib/ElasticEmail/models/inbound_route.rb +14 -19
- data/lib/ElasticEmail/models/inbound_route_action_type.rb +1 -1
- data/lib/ElasticEmail/models/inbound_route_filter_type.rb +1 -1
- data/lib/ElasticEmail/models/list_payload.rb +16 -19
- data/lib/ElasticEmail/models/list_update_payload.rb +14 -19
- data/lib/ElasticEmail/models/log_job_status.rb +1 -1
- data/lib/ElasticEmail/models/log_status_summary.rb +14 -19
- data/lib/ElasticEmail/models/merge_email_payload.rb +23 -19
- data/lib/ElasticEmail/models/message_attachment.rb +18 -19
- data/lib/ElasticEmail/models/message_category.rb +1 -1
- data/lib/ElasticEmail/models/message_category_enum.rb +55 -0
- data/lib/ElasticEmail/models/new_api_key.rb +14 -19
- data/lib/ElasticEmail/models/new_smtp_credentials.rb +14 -19
- data/lib/ElasticEmail/models/options.rb +16 -19
- data/lib/ElasticEmail/models/recipient_event.rb +14 -19
- data/lib/ElasticEmail/models/segment.rb +14 -19
- data/lib/ElasticEmail/models/segment_payload.rb +18 -19
- data/lib/ElasticEmail/models/smtp_credentials.rb +14 -19
- data/lib/ElasticEmail/models/smtp_credentials_payload.rb +16 -19
- data/lib/ElasticEmail/models/sort_order_item.rb +18 -19
- data/lib/ElasticEmail/models/split_optimization_type.rb +1 -1
- data/lib/ElasticEmail/models/split_options.rb +14 -19
- data/lib/ElasticEmail/models/sub_account_info.rb +14 -19
- data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +16 -19
- data/lib/ElasticEmail/models/subaccount_email_settings.rb +14 -19
- data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +14 -19
- data/lib/ElasticEmail/models/subaccount_payload.rb +18 -19
- data/lib/ElasticEmail/models/subaccount_settings_info.rb +14 -19
- data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +14 -19
- data/lib/ElasticEmail/models/suppression.rb +14 -19
- data/lib/ElasticEmail/models/template.rb +14 -19
- data/lib/ElasticEmail/models/template_payload.rb +16 -19
- data/lib/ElasticEmail/models/template_scope.rb +1 -1
- data/lib/ElasticEmail/models/template_type.rb +4 -2
- data/lib/ElasticEmail/models/tracking_type.rb +44 -0
- data/lib/ElasticEmail/models/tracking_validation_status.rb +42 -0
- data/lib/ElasticEmail/models/transactional_recipient.rb +16 -19
- data/lib/ElasticEmail/models/utm.rb +14 -19
- data/lib/ElasticEmail/models/verification_file_result.rb +14 -19
- data/lib/ElasticEmail/models/verification_file_result_details.rb +14 -19
- data/lib/ElasticEmail/models/verification_status.rb +1 -1
- data/lib/ElasticEmail/version.rb +2 -2
- data/lib/ElasticEmail.rb +13 -1
- data/spec/api/campaigns_api_spec.rb +19 -7
- data/spec/api/contacts_api_spec.rb +12 -25
- data/spec/api/domains_api_spec.rb +132 -0
- data/spec/api/emails_api_spec.rb +29 -7
- data/spec/api/events_api_spec.rb +9 -9
- data/spec/api/files_api_spec.rb +7 -7
- data/spec/api/inbound_route_api_spec.rb +8 -8
- data/spec/api/lists_api_spec.rb +23 -9
- data/spec/api/security_api_spec.rb +12 -12
- data/spec/api/segments_api_spec.rb +7 -7
- data/spec/api/statistics_api_spec.rb +7 -7
- data/spec/api/sub_accounts_api_spec.rb +8 -8
- data/spec/api/suppressions_api_spec.rb +26 -26
- data/spec/api/templates_api_spec.rb +7 -7
- data/spec/api/verifications_api_spec.rb +30 -18
- data/spec/models/access_level_spec.rb +5 -3
- data/spec/models/account_status_enum_spec.rb +5 -3
- data/spec/models/api_key_payload_spec.rb +10 -8
- data/spec/models/api_key_spec.rb +11 -9
- data/spec/models/body_content_type_spec.rb +5 -3
- data/spec/models/body_part_spec.rb +8 -6
- data/spec/models/campaign_options_spec.rb +22 -8
- data/spec/models/campaign_recipient_spec.rb +7 -5
- data/spec/models/campaign_spec.rb +10 -8
- data/spec/models/campaign_status_spec.rb +5 -3
- data/spec/models/campaign_template_spec.rb +12 -10
- data/spec/{configuration_spec.rb → models/certificate_validation_status_spec.rb} +15 -27
- data/spec/models/channel_log_status_summary_spec.rb +19 -17
- data/spec/models/compression_format_spec.rb +5 -3
- data/spec/models/consent_data_spec.rb +8 -6
- data/spec/models/consent_tracking_spec.rb +5 -3
- data/spec/models/contact_activity_spec.rb +16 -14
- data/spec/models/contact_payload_spec.rb +11 -9
- data/spec/models/contact_source_spec.rb +5 -3
- data/spec/models/contact_spec.rb +16 -14
- data/spec/models/contact_status_spec.rb +5 -3
- data/spec/models/contact_update_payload_spec.rb +8 -6
- data/spec/models/contacts_list_spec.rb +9 -7
- data/spec/models/delivery_optimization_type_spec.rb +5 -3
- data/spec/models/domain_data_spec.rb +144 -0
- data/spec/models/domain_detail_spec.rb +138 -0
- data/spec/models/domain_owner_spec.rb +30 -0
- data/spec/models/domain_payload_spec.rb +42 -0
- data/spec/models/domain_update_payload_spec.rb +54 -0
- data/spec/models/email_content_spec.rb +22 -14
- data/spec/models/email_data_spec.rb +8 -6
- data/spec/models/email_job_failed_status_spec.rb +54 -0
- data/spec/models/email_job_status_spec.rb +150 -0
- data/spec/models/email_message_data_spec.rb +8 -6
- data/spec/models/email_predicted_validation_status_spec.rb +4 -2
- data/spec/models/email_recipient_spec.rb +7 -5
- data/spec/models/email_send_spec.rb +7 -5
- data/spec/models/email_status_spec.rb +23 -15
- data/spec/models/email_transactional_message_data_spec.rb +8 -6
- data/spec/models/email_validation_result_spec.rb +26 -12
- data/spec/models/email_validation_status_spec.rb +5 -3
- data/spec/models/email_view_spec.rb +8 -6
- data/spec/models/emails_payload_spec.rb +7 -5
- data/spec/models/encoding_type_spec.rb +5 -3
- data/spec/models/event_type_spec.rb +5 -3
- data/spec/models/events_order_by_spec.rb +5 -3
- data/spec/models/export_file_formats_spec.rb +5 -3
- data/spec/models/export_link_spec.rb +7 -5
- data/spec/models/export_status_spec.rb +5 -3
- data/spec/models/file_info_spec.rb +10 -8
- data/spec/models/file_payload_spec.rb +8 -6
- data/spec/models/file_upload_result_spec.rb +7 -5
- data/spec/models/inbound_payload_spec.rb +11 -9
- data/spec/models/inbound_route_action_type_spec.rb +5 -3
- data/spec/models/inbound_route_filter_type_spec.rb +5 -3
- data/spec/models/inbound_route_spec.rb +12 -10
- data/spec/models/list_payload_spec.rb +8 -6
- data/spec/models/list_update_payload_spec.rb +7 -5
- data/spec/models/log_job_status_spec.rb +5 -3
- data/spec/models/log_status_summary_spec.rb +18 -16
- data/spec/models/merge_email_payload_spec.rb +8 -6
- data/spec/models/message_attachment_spec.rb +14 -6
- data/spec/models/message_category_enum_spec.rb +30 -0
- data/spec/models/message_category_spec.rb +5 -3
- data/spec/models/new_api_key_spec.rb +12 -10
- data/spec/models/new_smtp_credentials_spec.rb +12 -10
- data/spec/models/options_spec.rb +11 -9
- data/spec/models/recipient_event_spec.rb +18 -16
- data/spec/models/segment_payload_spec.rb +7 -5
- data/spec/models/segment_spec.rb +7 -5
- data/spec/models/smtp_credentials_payload_spec.rb +9 -7
- data/spec/models/smtp_credentials_spec.rb +11 -9
- data/spec/models/sort_order_item_spec.rb +7 -5
- data/spec/models/split_optimization_type_spec.rb +5 -3
- data/spec/models/split_options_spec.rb +7 -5
- data/spec/models/sub_account_info_spec.rb +14 -12
- data/spec/models/subaccount_email_credits_payload_spec.rb +7 -5
- data/spec/models/subaccount_email_settings_payload_spec.rb +17 -9
- data/spec/models/subaccount_email_settings_spec.rb +18 -10
- data/spec/models/subaccount_payload_spec.rb +9 -7
- data/spec/models/subaccount_settings_info_payload_spec.rb +6 -4
- data/spec/models/subaccount_settings_info_spec.rb +6 -4
- data/spec/models/suppression_spec.rb +9 -7
- data/spec/models/template_payload_spec.rb +9 -7
- data/spec/models/template_scope_spec.rb +5 -3
- data/spec/models/template_spec.rb +11 -9
- data/spec/models/template_type_spec.rb +5 -3
- data/spec/models/tracking_type_spec.rb +30 -0
- data/spec/models/tracking_validation_status_spec.rb +30 -0
- data/spec/models/transactional_recipient_spec.rb +8 -6
- data/spec/models/utm_spec.rb +9 -7
- data/spec/models/verification_file_result_details_spec.rb +12 -10
- data/spec/models/verification_file_result_spec.rb +11 -9
- data/spec/models/verification_status_spec.rb +5 -3
- data/spec/spec_helper.rb +1 -1
- metadata +126 -94
- data/docs/ContactHistory.md +0 -30
- data/lib/ElasticEmail/models/contact_hist_event_type.rb +0 -49
- data/lib/ElasticEmail/models/template_scope_type.rb +0 -38
- data/spec/api_client_spec.rb +0 -226
- data/spec/models/contact_hist_event_type_spec.rb +0 -28
- data/spec/models/contact_history_spec.rb +0 -70
- data/spec/models/template_scope_type_spec.rb +0 -28
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -66,6 +66,7 @@ module ElasticEmail
|
|
66
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
67
67
|
# @return Array for valid properties with the reasons
|
68
68
|
def list_invalid_properties
|
69
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
70
|
invalid_properties = Array.new
|
70
71
|
invalid_properties
|
71
72
|
end
|
@@ -73,6 +74,7 @@ module ElasticEmail
|
|
73
74
|
# Check to see if the all the properties in the model are valid
|
74
75
|
# @return true if the model is valid
|
75
76
|
def valid?
|
77
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
76
78
|
true
|
77
79
|
end
|
78
80
|
|
@@ -100,37 +102,30 @@ module ElasticEmail
|
|
100
102
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
103
|
# @return [Object] Returns the model itself
|
102
104
|
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
105
|
return nil unless attributes.is_a?(Hash)
|
111
106
|
attributes = attributes.transform_keys(&:to_sym)
|
112
|
-
|
113
|
-
|
114
|
-
|
107
|
+
transformed_hash = {}
|
108
|
+
openapi_types.each_pair do |key, type|
|
109
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
110
|
+
transformed_hash["#{key}"] = nil
|
115
111
|
elsif type =~ /\AArray<(.*)>/i
|
116
112
|
# check to ensure the input is an array given that the attribute
|
117
113
|
# is documented as an array but the input is not
|
118
|
-
if attributes[
|
119
|
-
|
114
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
115
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
120
116
|
end
|
121
|
-
elsif !attributes[
|
122
|
-
|
117
|
+
elsif !attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
123
119
|
end
|
124
120
|
end
|
125
|
-
|
126
|
-
self
|
121
|
+
new(transformed_hash)
|
127
122
|
end
|
128
123
|
|
129
124
|
# Deserializes the data based on type
|
130
125
|
# @param string type Data type
|
131
126
|
# @param string value Value to be deserialized
|
132
127
|
# @return [Object] Deserialized data
|
133
|
-
def _deserialize(type, value)
|
128
|
+
def self._deserialize(type, value)
|
134
129
|
case type.to_sym
|
135
130
|
when :Time
|
136
131
|
Time.parse(value)
|
@@ -165,7 +160,7 @@ module ElasticEmail
|
|
165
160
|
else # model
|
166
161
|
# models (e.g. Pet) or oneOf
|
167
162
|
klass = ElasticEmail.const_get(type)
|
168
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
163
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
164
|
end
|
170
165
|
end
|
171
166
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -96,6 +96,7 @@ module ElasticEmail
|
|
96
96
|
# Show invalid properties with the reasons. Usually used together with valid?
|
97
97
|
# @return Array for valid properties with the reasons
|
98
98
|
def list_invalid_properties
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
99
100
|
invalid_properties = Array.new
|
100
101
|
invalid_properties
|
101
102
|
end
|
@@ -103,6 +104,7 @@ module ElasticEmail
|
|
103
104
|
# Check to see if the all the properties in the model are valid
|
104
105
|
# @return true if the model is valid
|
105
106
|
def valid?
|
107
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
106
108
|
true
|
107
109
|
end
|
108
110
|
|
@@ -133,37 +135,30 @@ module ElasticEmail
|
|
133
135
|
# @param [Hash] attributes Model attributes in the form of hash
|
134
136
|
# @return [Object] Returns the model itself
|
135
137
|
def self.build_from_hash(attributes)
|
136
|
-
new.build_from_hash(attributes)
|
137
|
-
end
|
138
|
-
|
139
|
-
# Builds the object from hash
|
140
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
141
|
-
# @return [Object] Returns the model itself
|
142
|
-
def build_from_hash(attributes)
|
143
138
|
return nil unless attributes.is_a?(Hash)
|
144
139
|
attributes = attributes.transform_keys(&:to_sym)
|
145
|
-
|
146
|
-
|
147
|
-
|
140
|
+
transformed_hash = {}
|
141
|
+
openapi_types.each_pair do |key, type|
|
142
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
143
|
+
transformed_hash["#{key}"] = nil
|
148
144
|
elsif type =~ /\AArray<(.*)>/i
|
149
145
|
# check to ensure the input is an array given that the attribute
|
150
146
|
# is documented as an array but the input is not
|
151
|
-
if attributes[
|
152
|
-
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
153
149
|
end
|
154
|
-
elsif !attributes[
|
155
|
-
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
156
152
|
end
|
157
153
|
end
|
158
|
-
|
159
|
-
self
|
154
|
+
new(transformed_hash)
|
160
155
|
end
|
161
156
|
|
162
157
|
# Deserializes the data based on type
|
163
158
|
# @param string type Data type
|
164
159
|
# @param string value Value to be deserialized
|
165
160
|
# @return [Object] Deserialized data
|
166
|
-
def _deserialize(type, value)
|
161
|
+
def self._deserialize(type, value)
|
167
162
|
case type.to_sym
|
168
163
|
when :Time
|
169
164
|
Time.parse(value)
|
@@ -198,7 +193,7 @@ module ElasticEmail
|
|
198
193
|
else # model
|
199
194
|
# models (e.g. Pet) or oneOf
|
200
195
|
klass = ElasticEmail.const_get(type)
|
201
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
196
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
197
|
end
|
203
198
|
end
|
204
199
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -138,6 +138,7 @@ module ElasticEmail
|
|
138
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
139
139
|
# @return Array for valid properties with the reasons
|
140
140
|
def list_invalid_properties
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
141
142
|
invalid_properties = Array.new
|
142
143
|
invalid_properties
|
143
144
|
end
|
@@ -145,6 +146,7 @@ module ElasticEmail
|
|
145
146
|
# Check to see if the all the properties in the model are valid
|
146
147
|
# @return true if the model is valid
|
147
148
|
def valid?
|
149
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
148
150
|
true
|
149
151
|
end
|
150
152
|
|
@@ -177,37 +179,30 @@ module ElasticEmail
|
|
177
179
|
# @param [Hash] attributes Model attributes in the form of hash
|
178
180
|
# @return [Object] Returns the model itself
|
179
181
|
def self.build_from_hash(attributes)
|
180
|
-
new.build_from_hash(attributes)
|
181
|
-
end
|
182
|
-
|
183
|
-
# Builds the object from hash
|
184
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
185
|
-
# @return [Object] Returns the model itself
|
186
|
-
def build_from_hash(attributes)
|
187
182
|
return nil unless attributes.is_a?(Hash)
|
188
183
|
attributes = attributes.transform_keys(&:to_sym)
|
189
|
-
|
190
|
-
|
191
|
-
|
184
|
+
transformed_hash = {}
|
185
|
+
openapi_types.each_pair do |key, type|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
187
|
+
transformed_hash["#{key}"] = nil
|
192
188
|
elsif type =~ /\AArray<(.*)>/i
|
193
189
|
# check to ensure the input is an array given that the attribute
|
194
190
|
# is documented as an array but the input is not
|
195
|
-
if attributes[
|
196
|
-
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
197
193
|
end
|
198
|
-
elsif !attributes[
|
199
|
-
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
200
196
|
end
|
201
197
|
end
|
202
|
-
|
203
|
-
self
|
198
|
+
new(transformed_hash)
|
204
199
|
end
|
205
200
|
|
206
201
|
# Deserializes the data based on type
|
207
202
|
# @param string type Data type
|
208
203
|
# @param string value Value to be deserialized
|
209
204
|
# @return [Object] Deserialized data
|
210
|
-
def _deserialize(type, value)
|
205
|
+
def self._deserialize(type, value)
|
211
206
|
case type.to_sym
|
212
207
|
when :Time
|
213
208
|
Time.parse(value)
|
@@ -242,7 +237,7 @@ module ElasticEmail
|
|
242
237
|
else # model
|
243
238
|
# models (e.g. Pet) or oneOf
|
244
239
|
klass = ElasticEmail.const_get(type)
|
245
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
240
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
246
241
|
end
|
247
242
|
end
|
248
243
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -97,6 +97,8 @@ module ElasticEmail
|
|
97
97
|
|
98
98
|
if attributes.key?(:'name')
|
99
99
|
self.name = attributes[:'name']
|
100
|
+
else
|
101
|
+
self.name = nil
|
100
102
|
end
|
101
103
|
|
102
104
|
if attributes.key?(:'subject')
|
@@ -119,6 +121,7 @@ module ElasticEmail
|
|
119
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
120
122
|
# @return Array for valid properties with the reasons
|
121
123
|
def list_invalid_properties
|
124
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
122
125
|
invalid_properties = Array.new
|
123
126
|
if @name.nil?
|
124
127
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -130,6 +133,7 @@ module ElasticEmail
|
|
130
133
|
# Check to see if the all the properties in the model are valid
|
131
134
|
# @return true if the model is valid
|
132
135
|
def valid?
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
133
137
|
return false if @name.nil?
|
134
138
|
true
|
135
139
|
end
|
@@ -161,37 +165,30 @@ module ElasticEmail
|
|
161
165
|
# @param [Hash] attributes Model attributes in the form of hash
|
162
166
|
# @return [Object] Returns the model itself
|
163
167
|
def self.build_from_hash(attributes)
|
164
|
-
new.build_from_hash(attributes)
|
165
|
-
end
|
166
|
-
|
167
|
-
# Builds the object from hash
|
168
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
-
# @return [Object] Returns the model itself
|
170
|
-
def build_from_hash(attributes)
|
171
168
|
return nil unless attributes.is_a?(Hash)
|
172
169
|
attributes = attributes.transform_keys(&:to_sym)
|
173
|
-
|
174
|
-
|
175
|
-
|
170
|
+
transformed_hash = {}
|
171
|
+
openapi_types.each_pair do |key, type|
|
172
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
173
|
+
transformed_hash["#{key}"] = nil
|
176
174
|
elsif type =~ /\AArray<(.*)>/i
|
177
175
|
# check to ensure the input is an array given that the attribute
|
178
176
|
# is documented as an array but the input is not
|
179
|
-
if attributes[
|
180
|
-
|
177
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
178
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
181
179
|
end
|
182
|
-
elsif !attributes[
|
183
|
-
|
180
|
+
elsif !attributes[attribute_map[key]].nil?
|
181
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
184
182
|
end
|
185
183
|
end
|
186
|
-
|
187
|
-
self
|
184
|
+
new(transformed_hash)
|
188
185
|
end
|
189
186
|
|
190
187
|
# Deserializes the data based on type
|
191
188
|
# @param string type Data type
|
192
189
|
# @param string value Value to be deserialized
|
193
190
|
# @return [Object] Deserialized data
|
194
|
-
def _deserialize(type, value)
|
191
|
+
def self._deserialize(type, value)
|
195
192
|
case type.to_sym
|
196
193
|
when :Time
|
197
194
|
Time.parse(value)
|
@@ -226,7 +223,7 @@ module ElasticEmail
|
|
226
223
|
else # model
|
227
224
|
# models (e.g. Pet) or oneOf
|
228
225
|
klass = ElasticEmail.const_get(type)
|
229
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
230
227
|
end
|
231
228
|
end
|
232
229
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,9 +19,11 @@ module ElasticEmail
|
|
19
19
|
DRAG_DROP_EDITOR = "DragDropEditor".freeze
|
20
20
|
LANDING_PAGE_EDITOR = "LandingPageEditor".freeze
|
21
21
|
TEMPLATE_EDITOR = "TemplateEditor".freeze
|
22
|
+
FORM_TEMPLATE = "FormTemplate".freeze
|
23
|
+
LANDING_PAGE_TEMPLATE = "LandingPageTemplate".freeze
|
22
24
|
|
23
25
|
def self.all_vars
|
24
|
-
@all_vars ||= [RAW_HTML, DRAG_DROP_EDITOR, LANDING_PAGE_EDITOR, TEMPLATE_EDITOR].freeze
|
26
|
+
@all_vars ||= [RAW_HTML, DRAG_DROP_EDITOR, LANDING_PAGE_EDITOR, TEMPLATE_EDITOR, FORM_TEMPLATE, LANDING_PAGE_TEMPLATE].freeze
|
25
27
|
end
|
26
28
|
|
27
29
|
# Builds the enum from string
|
@@ -0,0 +1,44 @@
|
|
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. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">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
|
+
Generator version: 7.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module ElasticEmail
|
17
|
+
class TrackingType
|
18
|
+
NONE = "None".freeze
|
19
|
+
DELETE = "Delete".freeze
|
20
|
+
HTTP = "Http".freeze
|
21
|
+
EXTERNAL_HTTPS = "ExternalHttps".freeze
|
22
|
+
INTERNAL_CERT_HTTPS = "InternalCertHttps".freeze
|
23
|
+
LETS_ENCRYPT_CERT = "LetsEncryptCert".freeze
|
24
|
+
|
25
|
+
def self.all_vars
|
26
|
+
@all_vars ||= [NONE, DELETE, HTTP, EXTERNAL_HTTPS, INTERNAL_CERT_HTTPS, LETS_ENCRYPT_CERT].freeze
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def self.build_from_hash(value)
|
33
|
+
new.build_from_hash(value)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Builds the enum from string
|
37
|
+
# @param [String] The enum value in the form of the string
|
38
|
+
# @return [String] The enum value
|
39
|
+
def build_from_hash(value)
|
40
|
+
return value if TrackingType.all_vars.include?(value)
|
41
|
+
raise "Invalid ENUM value #{value} for class #TrackingType"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">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
|
+
Generator version: 7.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module ElasticEmail
|
17
|
+
class TrackingValidationStatus
|
18
|
+
VALIDATED = "Validated".freeze
|
19
|
+
NOT_VALIDATED = "NotValidated".freeze
|
20
|
+
INVALID = "Invalid".freeze
|
21
|
+
BROKEN = "Broken".freeze
|
22
|
+
|
23
|
+
def self.all_vars
|
24
|
+
@all_vars ||= [VALIDATED, NOT_VALIDATED, INVALID, BROKEN].freeze
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def self.build_from_hash(value)
|
31
|
+
new.build_from_hash(value)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Builds the enum from string
|
35
|
+
# @param [String] The enum value in the form of the string
|
36
|
+
# @return [String] The enum value
|
37
|
+
def build_from_hash(value)
|
38
|
+
return value if TrackingValidationStatus.all_vars.include?(value)
|
39
|
+
raise "Invalid ENUM value #{value} for class #TrackingValidationStatus"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -73,6 +73,8 @@ module ElasticEmail
|
|
73
73
|
if (value = attributes[:'to']).is_a?(Array)
|
74
74
|
self.to = value
|
75
75
|
end
|
76
|
+
else
|
77
|
+
self.to = nil
|
76
78
|
end
|
77
79
|
|
78
80
|
if attributes.key?(:'cc')
|
@@ -91,6 +93,7 @@ module ElasticEmail
|
|
91
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
92
94
|
# @return Array for valid properties with the reasons
|
93
95
|
def list_invalid_properties
|
96
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
94
97
|
invalid_properties = Array.new
|
95
98
|
if @to.nil?
|
96
99
|
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
@@ -102,6 +105,7 @@ module ElasticEmail
|
|
102
105
|
# Check to see if the all the properties in the model are valid
|
103
106
|
# @return true if the model is valid
|
104
107
|
def valid?
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
109
|
return false if @to.nil?
|
106
110
|
true
|
107
111
|
end
|
@@ -132,37 +136,30 @@ module ElasticEmail
|
|
132
136
|
# @param [Hash] attributes Model attributes in the form of hash
|
133
137
|
# @return [Object] Returns the model itself
|
134
138
|
def self.build_from_hash(attributes)
|
135
|
-
new.build_from_hash(attributes)
|
136
|
-
end
|
137
|
-
|
138
|
-
# Builds the object from hash
|
139
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
-
# @return [Object] Returns the model itself
|
141
|
-
def build_from_hash(attributes)
|
142
139
|
return nil unless attributes.is_a?(Hash)
|
143
140
|
attributes = attributes.transform_keys(&:to_sym)
|
144
|
-
|
145
|
-
|
146
|
-
|
141
|
+
transformed_hash = {}
|
142
|
+
openapi_types.each_pair do |key, type|
|
143
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = nil
|
147
145
|
elsif type =~ /\AArray<(.*)>/i
|
148
146
|
# check to ensure the input is an array given that the attribute
|
149
147
|
# is documented as an array but the input is not
|
150
|
-
if attributes[
|
151
|
-
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
149
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
152
150
|
end
|
153
|
-
elsif !attributes[
|
154
|
-
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
155
153
|
end
|
156
154
|
end
|
157
|
-
|
158
|
-
self
|
155
|
+
new(transformed_hash)
|
159
156
|
end
|
160
157
|
|
161
158
|
# Deserializes the data based on type
|
162
159
|
# @param string type Data type
|
163
160
|
# @param string value Value to be deserialized
|
164
161
|
# @return [Object] Deserialized data
|
165
|
-
def _deserialize(type, value)
|
162
|
+
def self._deserialize(type, value)
|
166
163
|
case type.to_sym
|
167
164
|
when :Time
|
168
165
|
Time.parse(value)
|
@@ -197,7 +194,7 @@ module ElasticEmail
|
|
197
194
|
else # model
|
198
195
|
# models (e.g. Pet) or oneOf
|
199
196
|
klass = ElasticEmail.const_get(type)
|
200
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
197
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
201
198
|
end
|
202
199
|
end
|
203
200
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.5.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -94,6 +94,7 @@ module ElasticEmail
|
|
94
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
95
95
|
# @return Array for valid properties with the reasons
|
96
96
|
def list_invalid_properties
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
97
98
|
invalid_properties = Array.new
|
98
99
|
invalid_properties
|
99
100
|
end
|
@@ -101,6 +102,7 @@ module ElasticEmail
|
|
101
102
|
# Check to see if the all the properties in the model are valid
|
102
103
|
# @return true if the model is valid
|
103
104
|
def valid?
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
104
106
|
true
|
105
107
|
end
|
106
108
|
|
@@ -131,37 +133,30 @@ module ElasticEmail
|
|
131
133
|
# @param [Hash] attributes Model attributes in the form of hash
|
132
134
|
# @return [Object] Returns the model itself
|
133
135
|
def self.build_from_hash(attributes)
|
134
|
-
new.build_from_hash(attributes)
|
135
|
-
end
|
136
|
-
|
137
|
-
# Builds the object from hash
|
138
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
-
# @return [Object] Returns the model itself
|
140
|
-
def build_from_hash(attributes)
|
141
136
|
return nil unless attributes.is_a?(Hash)
|
142
137
|
attributes = attributes.transform_keys(&:to_sym)
|
143
|
-
|
144
|
-
|
145
|
-
|
138
|
+
transformed_hash = {}
|
139
|
+
openapi_types.each_pair do |key, type|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = nil
|
146
142
|
elsif type =~ /\AArray<(.*)>/i
|
147
143
|
# check to ensure the input is an array given that the attribute
|
148
144
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
147
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
154
150
|
end
|
155
151
|
end
|
156
|
-
|
157
|
-
self
|
152
|
+
new(transformed_hash)
|
158
153
|
end
|
159
154
|
|
160
155
|
# Deserializes the data based on type
|
161
156
|
# @param string type Data type
|
162
157
|
# @param string value Value to be deserialized
|
163
158
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
159
|
+
def self._deserialize(type, value)
|
165
160
|
case type.to_sym
|
166
161
|
when :Time
|
167
162
|
Time.parse(value)
|
@@ -196,7 +191,7 @@ module ElasticEmail
|
|
196
191
|
else # model
|
197
192
|
# models (e.g. Pet) or oneOf
|
198
193
|
klass = ElasticEmail.const_get(type)
|
199
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
194
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
200
195
|
end
|
201
196
|
end
|
202
197
|
|