ElasticEmail 4.0.22 → 4.0.24
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 +3 -2
- data/README.md +10 -4
- data/VERSION +1 -1
- data/docs/CampaignOptions.md +4 -0
- data/docs/CampaignTemplate.md +2 -2
- 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/EmailTransactionalMessageData.md +1 -1
- data/docs/EmailValidationResult.md +2 -2
- data/docs/EmailsApi.md +97 -3
- 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/lib/ElasticEmail/api/campaigns_api.rb +1 -1
- data/lib/ElasticEmail/api/contacts_api.rb +1 -1
- data/lib/ElasticEmail/api/emails_api.rb +94 -1
- 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 +25 -23
- data/lib/ElasticEmail/api_error.rb +1 -1
- data/lib/ElasticEmail/configuration.rb +28 -10
- data/lib/ElasticEmail/models/access_level.rb +3 -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/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/email_content.rb +21 -19
- data/lib/ElasticEmail/models/email_data.rb +14 -19
- data/lib/ElasticEmail/models/{contact_history.rb → email_job_failed_status.rb} +44 -83
- 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 +14 -19
- 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/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 +3 -2
- 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 +3 -1
- data/spec/api/campaigns_api_spec.rb +7 -7
- data/spec/api/contacts_api_spec.rb +12 -25
- data/spec/api/emails_api_spec.rb +28 -6
- 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/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/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 +17 -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_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/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 +91 -99
- data/docs/ContactHistEventType.md +0 -15
- data/docs/ContactHistory.md +0 -30
- data/docs/TemplateScopeType.md +0 -15
- 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/configuration_spec.rb +0 -42
- 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.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -108,6 +108,7 @@ module ElasticEmail
|
|
108
108
|
# Show invalid properties with the reasons. Usually used together with valid?
|
109
109
|
# @return Array for valid properties with the reasons
|
110
110
|
def list_invalid_properties
|
111
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
111
112
|
invalid_properties = Array.new
|
112
113
|
if @content_type.nil?
|
113
114
|
invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
|
@@ -119,6 +120,7 @@ module ElasticEmail
|
|
119
120
|
# Check to see if the all the properties in the model are valid
|
120
121
|
# @return true if the model is valid
|
121
122
|
def valid?
|
123
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
122
124
|
return false if @content_type.nil?
|
123
125
|
true
|
124
126
|
end
|
@@ -149,37 +151,30 @@ module ElasticEmail
|
|
149
151
|
# @param [Hash] attributes Model attributes in the form of hash
|
150
152
|
# @return [Object] Returns the model itself
|
151
153
|
def self.build_from_hash(attributes)
|
152
|
-
new.build_from_hash(attributes)
|
153
|
-
end
|
154
|
-
|
155
|
-
# Builds the object from hash
|
156
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
157
|
-
# @return [Object] Returns the model itself
|
158
|
-
def build_from_hash(attributes)
|
159
154
|
return nil unless attributes.is_a?(Hash)
|
160
155
|
attributes = attributes.transform_keys(&:to_sym)
|
161
|
-
|
162
|
-
|
163
|
-
|
156
|
+
transformed_hash = {}
|
157
|
+
openapi_types.each_pair do |key, type|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = nil
|
164
160
|
elsif type =~ /\AArray<(.*)>/i
|
165
161
|
# check to ensure the input is an array given that the attribute
|
166
162
|
# is documented as an array but the input is not
|
167
|
-
if attributes[
|
168
|
-
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
169
165
|
end
|
170
|
-
elsif !attributes[
|
171
|
-
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
172
168
|
end
|
173
169
|
end
|
174
|
-
|
175
|
-
self
|
170
|
+
new(transformed_hash)
|
176
171
|
end
|
177
172
|
|
178
173
|
# Deserializes the data based on type
|
179
174
|
# @param string type Data type
|
180
175
|
# @param string value Value to be deserialized
|
181
176
|
# @return [Object] Deserialized data
|
182
|
-
def _deserialize(type, value)
|
177
|
+
def self._deserialize(type, value)
|
183
178
|
case type.to_sym
|
184
179
|
when :Time
|
185
180
|
Time.parse(value)
|
@@ -214,7 +209,7 @@ module ElasticEmail
|
|
214
209
|
else # model
|
215
210
|
# models (e.g. Pet) or oneOf
|
216
211
|
klass = ElasticEmail.const_get(type)
|
217
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
212
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
218
213
|
end
|
219
214
|
end
|
220
215
|
|
@@ -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.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -105,6 +105,8 @@ module ElasticEmail
|
|
105
105
|
|
106
106
|
if attributes.key?(:'name')
|
107
107
|
self.name = attributes[:'name']
|
108
|
+
else
|
109
|
+
self.name = nil
|
108
110
|
end
|
109
111
|
|
110
112
|
if attributes.key?(:'status')
|
@@ -115,6 +117,8 @@ module ElasticEmail
|
|
115
117
|
|
116
118
|
if attributes.key?(:'recipients')
|
117
119
|
self.recipients = attributes[:'recipients']
|
120
|
+
else
|
121
|
+
self.recipients = nil
|
118
122
|
end
|
119
123
|
|
120
124
|
if attributes.key?(:'options')
|
@@ -125,6 +129,7 @@ module ElasticEmail
|
|
125
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
126
130
|
# @return Array for valid properties with the reasons
|
127
131
|
def list_invalid_properties
|
132
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
128
133
|
invalid_properties = Array.new
|
129
134
|
if @name.nil?
|
130
135
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -140,6 +145,7 @@ module ElasticEmail
|
|
140
145
|
# Check to see if the all the properties in the model are valid
|
141
146
|
# @return true if the model is valid
|
142
147
|
def valid?
|
148
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
143
149
|
return false if @name.nil?
|
144
150
|
return false if @recipients.nil?
|
145
151
|
true
|
@@ -173,37 +179,30 @@ module ElasticEmail
|
|
173
179
|
# @param [Hash] attributes Model attributes in the form of hash
|
174
180
|
# @return [Object] Returns the model itself
|
175
181
|
def self.build_from_hash(attributes)
|
176
|
-
new.build_from_hash(attributes)
|
177
|
-
end
|
178
|
-
|
179
|
-
# Builds the object from hash
|
180
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
181
|
-
# @return [Object] Returns the model itself
|
182
|
-
def build_from_hash(attributes)
|
183
182
|
return nil unless attributes.is_a?(Hash)
|
184
183
|
attributes = attributes.transform_keys(&:to_sym)
|
185
|
-
|
186
|
-
|
187
|
-
|
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
|
188
188
|
elsif type =~ /\AArray<(.*)>/i
|
189
189
|
# check to ensure the input is an array given that the attribute
|
190
190
|
# is documented as an array but the input is not
|
191
|
-
if attributes[
|
192
|
-
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
193
193
|
end
|
194
|
-
elsif !attributes[
|
195
|
-
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
196
196
|
end
|
197
197
|
end
|
198
|
-
|
199
|
-
self
|
198
|
+
new(transformed_hash)
|
200
199
|
end
|
201
200
|
|
202
201
|
# Deserializes the data based on type
|
203
202
|
# @param string type Data type
|
204
203
|
# @param string value Value to be deserialized
|
205
204
|
# @return [Object] Deserialized data
|
206
|
-
def _deserialize(type, value)
|
205
|
+
def self._deserialize(type, value)
|
207
206
|
case type.to_sym
|
208
207
|
when :Time
|
209
208
|
Time.parse(value)
|
@@ -238,7 +237,7 @@ module ElasticEmail
|
|
238
237
|
else # model
|
239
238
|
# models (e.g. Pet) or oneOf
|
240
239
|
klass = ElasticEmail.const_get(type)
|
241
|
-
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)
|
242
241
|
end
|
243
242
|
end
|
244
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.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -27,6 +27,12 @@ module ElasticEmail
|
|
27
27
|
# Date when this Campaign is scheduled to be sent on
|
28
28
|
attr_accessor :schedule_for
|
29
29
|
|
30
|
+
# How often (in minutes) to send the campaign
|
31
|
+
attr_accessor :trigger_frequency
|
32
|
+
|
33
|
+
# How many times send the campaign
|
34
|
+
attr_accessor :trigger_count
|
35
|
+
|
30
36
|
attr_accessor :split_options
|
31
37
|
|
32
38
|
class EnumAttributeValidator
|
@@ -58,6 +64,8 @@ module ElasticEmail
|
|
58
64
|
:'track_opens' => :'TrackOpens',
|
59
65
|
:'track_clicks' => :'TrackClicks',
|
60
66
|
:'schedule_for' => :'ScheduleFor',
|
67
|
+
:'trigger_frequency' => :'TriggerFrequency',
|
68
|
+
:'trigger_count' => :'TriggerCount',
|
61
69
|
:'split_options' => :'SplitOptions'
|
62
70
|
}
|
63
71
|
end
|
@@ -74,6 +82,8 @@ module ElasticEmail
|
|
74
82
|
:'track_opens' => :'Boolean',
|
75
83
|
:'track_clicks' => :'Boolean',
|
76
84
|
:'schedule_for' => :'Time',
|
85
|
+
:'trigger_frequency' => :'Float',
|
86
|
+
:'trigger_count' => :'Integer',
|
77
87
|
:'split_options' => :'SplitOptions'
|
78
88
|
}
|
79
89
|
end
|
@@ -120,6 +130,14 @@ module ElasticEmail
|
|
120
130
|
self.schedule_for = attributes[:'schedule_for']
|
121
131
|
end
|
122
132
|
|
133
|
+
if attributes.key?(:'trigger_frequency')
|
134
|
+
self.trigger_frequency = attributes[:'trigger_frequency']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'trigger_count')
|
138
|
+
self.trigger_count = attributes[:'trigger_count']
|
139
|
+
end
|
140
|
+
|
123
141
|
if attributes.key?(:'split_options')
|
124
142
|
self.split_options = attributes[:'split_options']
|
125
143
|
end
|
@@ -128,6 +146,7 @@ module ElasticEmail
|
|
128
146
|
# Show invalid properties with the reasons. Usually used together with valid?
|
129
147
|
# @return Array for valid properties with the reasons
|
130
148
|
def list_invalid_properties
|
149
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
131
150
|
invalid_properties = Array.new
|
132
151
|
invalid_properties
|
133
152
|
end
|
@@ -135,6 +154,7 @@ module ElasticEmail
|
|
135
154
|
# Check to see if the all the properties in the model are valid
|
136
155
|
# @return true if the model is valid
|
137
156
|
def valid?
|
157
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
138
158
|
true
|
139
159
|
end
|
140
160
|
|
@@ -147,6 +167,8 @@ module ElasticEmail
|
|
147
167
|
track_opens == o.track_opens &&
|
148
168
|
track_clicks == o.track_clicks &&
|
149
169
|
schedule_for == o.schedule_for &&
|
170
|
+
trigger_frequency == o.trigger_frequency &&
|
171
|
+
trigger_count == o.trigger_count &&
|
150
172
|
split_options == o.split_options
|
151
173
|
end
|
152
174
|
|
@@ -159,44 +181,37 @@ module ElasticEmail
|
|
159
181
|
# Calculates hash code according to all attributes.
|
160
182
|
# @return [Integer] Hash code
|
161
183
|
def hash
|
162
|
-
[delivery_optimization, track_opens, track_clicks, schedule_for, split_options].hash
|
184
|
+
[delivery_optimization, track_opens, track_clicks, schedule_for, trigger_frequency, trigger_count, split_options].hash
|
163
185
|
end
|
164
186
|
|
165
187
|
# Builds the object from hash
|
166
188
|
# @param [Hash] attributes Model attributes in the form of hash
|
167
189
|
# @return [Object] Returns the model itself
|
168
190
|
def self.build_from_hash(attributes)
|
169
|
-
new.build_from_hash(attributes)
|
170
|
-
end
|
171
|
-
|
172
|
-
# Builds the object from hash
|
173
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
174
|
-
# @return [Object] Returns the model itself
|
175
|
-
def build_from_hash(attributes)
|
176
191
|
return nil unless attributes.is_a?(Hash)
|
177
192
|
attributes = attributes.transform_keys(&:to_sym)
|
178
|
-
|
179
|
-
|
180
|
-
|
193
|
+
transformed_hash = {}
|
194
|
+
openapi_types.each_pair do |key, type|
|
195
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
196
|
+
transformed_hash["#{key}"] = nil
|
181
197
|
elsif type =~ /\AArray<(.*)>/i
|
182
198
|
# check to ensure the input is an array given that the attribute
|
183
199
|
# is documented as an array but the input is not
|
184
|
-
if attributes[
|
185
|
-
|
200
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
201
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
186
202
|
end
|
187
|
-
elsif !attributes[
|
188
|
-
|
203
|
+
elsif !attributes[attribute_map[key]].nil?
|
204
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
189
205
|
end
|
190
206
|
end
|
191
|
-
|
192
|
-
self
|
207
|
+
new(transformed_hash)
|
193
208
|
end
|
194
209
|
|
195
210
|
# Deserializes the data based on type
|
196
211
|
# @param string type Data type
|
197
212
|
# @param string value Value to be deserialized
|
198
213
|
# @return [Object] Deserialized data
|
199
|
-
def _deserialize(type, value)
|
214
|
+
def self._deserialize(type, value)
|
200
215
|
case type.to_sym
|
201
216
|
when :Time
|
202
217
|
Time.parse(value)
|
@@ -231,7 +246,7 @@ module ElasticEmail
|
|
231
246
|
else # model
|
232
247
|
# models (e.g. Pet) or oneOf
|
233
248
|
klass = ElasticEmail.const_get(type)
|
234
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
249
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
235
250
|
end
|
236
251
|
end
|
237
252
|
|
@@ -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.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -80,6 +80,7 @@ module ElasticEmail
|
|
80
80
|
# Show invalid properties with the reasons. Usually used together with valid?
|
81
81
|
# @return Array for valid properties with the reasons
|
82
82
|
def list_invalid_properties
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
83
84
|
invalid_properties = Array.new
|
84
85
|
invalid_properties
|
85
86
|
end
|
@@ -87,6 +88,7 @@ module ElasticEmail
|
|
87
88
|
# Check to see if the all the properties in the model are valid
|
88
89
|
# @return true if the model is valid
|
89
90
|
def valid?
|
91
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
90
92
|
true
|
91
93
|
end
|
92
94
|
|
@@ -115,37 +117,30 @@ module ElasticEmail
|
|
115
117
|
# @param [Hash] attributes Model attributes in the form of hash
|
116
118
|
# @return [Object] Returns the model itself
|
117
119
|
def self.build_from_hash(attributes)
|
118
|
-
new.build_from_hash(attributes)
|
119
|
-
end
|
120
|
-
|
121
|
-
# Builds the object from hash
|
122
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
-
# @return [Object] Returns the model itself
|
124
|
-
def build_from_hash(attributes)
|
125
120
|
return nil unless attributes.is_a?(Hash)
|
126
121
|
attributes = attributes.transform_keys(&:to_sym)
|
127
|
-
|
128
|
-
|
129
|
-
|
122
|
+
transformed_hash = {}
|
123
|
+
openapi_types.each_pair do |key, type|
|
124
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
125
|
+
transformed_hash["#{key}"] = nil
|
130
126
|
elsif type =~ /\AArray<(.*)>/i
|
131
127
|
# check to ensure the input is an array given that the attribute
|
132
128
|
# is documented as an array but the input is not
|
133
|
-
if attributes[
|
134
|
-
|
129
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
130
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
135
131
|
end
|
136
|
-
elsif !attributes[
|
137
|
-
|
132
|
+
elsif !attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
138
134
|
end
|
139
135
|
end
|
140
|
-
|
141
|
-
self
|
136
|
+
new(transformed_hash)
|
142
137
|
end
|
143
138
|
|
144
139
|
# Deserializes the data based on type
|
145
140
|
# @param string type Data type
|
146
141
|
# @param string value Value to be deserialized
|
147
142
|
# @return [Object] Deserialized data
|
148
|
-
def _deserialize(type, value)
|
143
|
+
def self._deserialize(type, value)
|
149
144
|
case type.to_sym
|
150
145
|
when :Time
|
151
146
|
Time.parse(value)
|
@@ -180,7 +175,7 @@ module ElasticEmail
|
|
180
175
|
else # model
|
181
176
|
# models (e.g. Pet) or oneOf
|
182
177
|
klass = ElasticEmail.const_get(type)
|
183
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
178
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
184
179
|
end
|
185
180
|
end
|
186
181
|
|
@@ -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.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -94,6 +94,8 @@ module ElasticEmail
|
|
94
94
|
|
95
95
|
if attributes.key?(:'from')
|
96
96
|
self.from = attributes[:'from']
|
97
|
+
else
|
98
|
+
self.from = nil
|
97
99
|
end
|
98
100
|
|
99
101
|
if attributes.key?(:'reply_to')
|
@@ -122,13 +124,20 @@ module ElasticEmail
|
|
122
124
|
# Show invalid properties with the reasons. Usually used together with valid?
|
123
125
|
# @return Array for valid properties with the reasons
|
124
126
|
def list_invalid_properties
|
127
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
125
128
|
invalid_properties = Array.new
|
129
|
+
if @from.nil?
|
130
|
+
invalid_properties.push('invalid value for "from", from cannot be nil.')
|
131
|
+
end
|
132
|
+
|
126
133
|
invalid_properties
|
127
134
|
end
|
128
135
|
|
129
136
|
# Check to see if the all the properties in the model are valid
|
130
137
|
# @return true if the model is valid
|
131
138
|
def valid?
|
139
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
140
|
+
return false if @from.nil?
|
132
141
|
true
|
133
142
|
end
|
134
143
|
|
@@ -162,37 +171,30 @@ module ElasticEmail
|
|
162
171
|
# @param [Hash] attributes Model attributes in the form of hash
|
163
172
|
# @return [Object] Returns the model itself
|
164
173
|
def self.build_from_hash(attributes)
|
165
|
-
new.build_from_hash(attributes)
|
166
|
-
end
|
167
|
-
|
168
|
-
# Builds the object from hash
|
169
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
170
|
-
# @return [Object] Returns the model itself
|
171
|
-
def build_from_hash(attributes)
|
172
174
|
return nil unless attributes.is_a?(Hash)
|
173
175
|
attributes = attributes.transform_keys(&:to_sym)
|
174
|
-
|
175
|
-
|
176
|
-
|
176
|
+
transformed_hash = {}
|
177
|
+
openapi_types.each_pair do |key, type|
|
178
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
179
|
+
transformed_hash["#{key}"] = nil
|
177
180
|
elsif type =~ /\AArray<(.*)>/i
|
178
181
|
# check to ensure the input is an array given that the attribute
|
179
182
|
# is documented as an array but the input is not
|
180
|
-
if attributes[
|
181
|
-
|
183
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
184
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
182
185
|
end
|
183
|
-
elsif !attributes[
|
184
|
-
|
186
|
+
elsif !attributes[attribute_map[key]].nil?
|
187
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
185
188
|
end
|
186
189
|
end
|
187
|
-
|
188
|
-
self
|
190
|
+
new(transformed_hash)
|
189
191
|
end
|
190
192
|
|
191
193
|
# Deserializes the data based on type
|
192
194
|
# @param string type Data type
|
193
195
|
# @param string value Value to be deserialized
|
194
196
|
# @return [Object] Deserialized data
|
195
|
-
def _deserialize(type, value)
|
197
|
+
def self._deserialize(type, value)
|
196
198
|
case type.to_sym
|
197
199
|
when :Time
|
198
200
|
Time.parse(value)
|
@@ -227,7 +229,7 @@ module ElasticEmail
|
|
227
229
|
else # model
|
228
230
|
# models (e.g. Pet) or oneOf
|
229
231
|
klass = ElasticEmail.const_get(type)
|
230
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
232
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
231
233
|
end
|
232
234
|
end
|
233
235
|
|
@@ -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.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -184,6 +184,7 @@ module ElasticEmail
|
|
184
184
|
# Show invalid properties with the reasons. Usually used together with valid?
|
185
185
|
# @return Array for valid properties with the reasons
|
186
186
|
def list_invalid_properties
|
187
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
187
188
|
invalid_properties = Array.new
|
188
189
|
invalid_properties
|
189
190
|
end
|
@@ -191,6 +192,7 @@ module ElasticEmail
|
|
191
192
|
# Check to see if the all the properties in the model are valid
|
192
193
|
# @return true if the model is valid
|
193
194
|
def valid?
|
195
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
194
196
|
true
|
195
197
|
end
|
196
198
|
|
@@ -231,37 +233,30 @@ module ElasticEmail
|
|
231
233
|
# @param [Hash] attributes Model attributes in the form of hash
|
232
234
|
# @return [Object] Returns the model itself
|
233
235
|
def self.build_from_hash(attributes)
|
234
|
-
new.build_from_hash(attributes)
|
235
|
-
end
|
236
|
-
|
237
|
-
# Builds the object from hash
|
238
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
239
|
-
# @return [Object] Returns the model itself
|
240
|
-
def build_from_hash(attributes)
|
241
236
|
return nil unless attributes.is_a?(Hash)
|
242
237
|
attributes = attributes.transform_keys(&:to_sym)
|
243
|
-
|
244
|
-
|
245
|
-
|
238
|
+
transformed_hash = {}
|
239
|
+
openapi_types.each_pair do |key, type|
|
240
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
241
|
+
transformed_hash["#{key}"] = nil
|
246
242
|
elsif type =~ /\AArray<(.*)>/i
|
247
243
|
# check to ensure the input is an array given that the attribute
|
248
244
|
# is documented as an array but the input is not
|
249
|
-
if attributes[
|
250
|
-
|
245
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
246
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
251
247
|
end
|
252
|
-
elsif !attributes[
|
253
|
-
|
248
|
+
elsif !attributes[attribute_map[key]].nil?
|
249
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
254
250
|
end
|
255
251
|
end
|
256
|
-
|
257
|
-
self
|
252
|
+
new(transformed_hash)
|
258
253
|
end
|
259
254
|
|
260
255
|
# Deserializes the data based on type
|
261
256
|
# @param string type Data type
|
262
257
|
# @param string value Value to be deserialized
|
263
258
|
# @return [Object] Deserialized data
|
264
|
-
def _deserialize(type, value)
|
259
|
+
def self._deserialize(type, value)
|
265
260
|
case type.to_sym
|
266
261
|
when :Time
|
267
262
|
Time.parse(value)
|
@@ -296,7 +291,7 @@ module ElasticEmail
|
|
296
291
|
else # model
|
297
292
|
# models (e.g. Pet) or oneOf
|
298
293
|
klass = ElasticEmail.const_get(type)
|
299
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
294
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
300
295
|
end
|
301
296
|
end
|
302
297
|
|