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
|
|
@@ -88,6 +88,8 @@ module ElasticEmail
|
|
88
88
|
def self.openapi_nullable
|
89
89
|
Set.new([
|
90
90
|
:'time_offset',
|
91
|
+
:'track_opens',
|
92
|
+
:'track_clicks'
|
91
93
|
])
|
92
94
|
end
|
93
95
|
|
@@ -136,6 +138,7 @@ module ElasticEmail
|
|
136
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
137
139
|
# @return Array for valid properties with the reasons
|
138
140
|
def list_invalid_properties
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
139
142
|
invalid_properties = Array.new
|
140
143
|
invalid_properties
|
141
144
|
end
|
@@ -143,6 +146,7 @@ module ElasticEmail
|
|
143
146
|
# Check to see if the all the properties in the model are valid
|
144
147
|
# @return true if the model is valid
|
145
148
|
def valid?
|
149
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
146
150
|
true
|
147
151
|
end
|
148
152
|
|
@@ -175,37 +179,30 @@ module ElasticEmail
|
|
175
179
|
# @param [Hash] attributes Model attributes in the form of hash
|
176
180
|
# @return [Object] Returns the model itself
|
177
181
|
def self.build_from_hash(attributes)
|
178
|
-
new.build_from_hash(attributes)
|
179
|
-
end
|
180
|
-
|
181
|
-
# Builds the object from hash
|
182
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
183
|
-
# @return [Object] Returns the model itself
|
184
|
-
def build_from_hash(attributes)
|
185
182
|
return nil unless attributes.is_a?(Hash)
|
186
183
|
attributes = attributes.transform_keys(&:to_sym)
|
187
|
-
|
188
|
-
|
189
|
-
|
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
|
190
188
|
elsif type =~ /\AArray<(.*)>/i
|
191
189
|
# check to ensure the input is an array given that the attribute
|
192
190
|
# is documented as an array but the input is not
|
193
|
-
if attributes[
|
194
|
-
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
195
193
|
end
|
196
|
-
elsif !attributes[
|
197
|
-
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
198
196
|
end
|
199
197
|
end
|
200
|
-
|
201
|
-
self
|
198
|
+
new(transformed_hash)
|
202
199
|
end
|
203
200
|
|
204
201
|
# Deserializes the data based on type
|
205
202
|
# @param string type Data type
|
206
203
|
# @param string value Value to be deserialized
|
207
204
|
# @return [Object] Deserialized data
|
208
|
-
def _deserialize(type, value)
|
205
|
+
def self._deserialize(type, value)
|
209
206
|
case type.to_sym
|
210
207
|
when :Time
|
211
208
|
Time.parse(value)
|
@@ -240,7 +237,7 @@ module ElasticEmail
|
|
240
237
|
else # model
|
241
238
|
# models (e.g. Pet) or oneOf
|
242
239
|
klass = ElasticEmail.const_get(type)
|
243
|
-
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)
|
244
241
|
end
|
245
242
|
end
|
246
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
|
|
@@ -200,6 +200,7 @@ module ElasticEmail
|
|
200
200
|
# Show invalid properties with the reasons. Usually used together with valid?
|
201
201
|
# @return Array for valid properties with the reasons
|
202
202
|
def list_invalid_properties
|
203
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
203
204
|
invalid_properties = Array.new
|
204
205
|
invalid_properties
|
205
206
|
end
|
@@ -207,6 +208,7 @@ module ElasticEmail
|
|
207
208
|
# Check to see if the all the properties in the model are valid
|
208
209
|
# @return true if the model is valid
|
209
210
|
def valid?
|
211
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
210
212
|
true
|
211
213
|
end
|
212
214
|
|
@@ -246,37 +248,30 @@ module ElasticEmail
|
|
246
248
|
# @param [Hash] attributes Model attributes in the form of hash
|
247
249
|
# @return [Object] Returns the model itself
|
248
250
|
def self.build_from_hash(attributes)
|
249
|
-
new.build_from_hash(attributes)
|
250
|
-
end
|
251
|
-
|
252
|
-
# Builds the object from hash
|
253
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
254
|
-
# @return [Object] Returns the model itself
|
255
|
-
def build_from_hash(attributes)
|
256
251
|
return nil unless attributes.is_a?(Hash)
|
257
252
|
attributes = attributes.transform_keys(&:to_sym)
|
258
|
-
|
259
|
-
|
260
|
-
|
253
|
+
transformed_hash = {}
|
254
|
+
openapi_types.each_pair do |key, type|
|
255
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
256
|
+
transformed_hash["#{key}"] = nil
|
261
257
|
elsif type =~ /\AArray<(.*)>/i
|
262
258
|
# check to ensure the input is an array given that the attribute
|
263
259
|
# is documented as an array but the input is not
|
264
|
-
if attributes[
|
265
|
-
|
260
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
261
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
266
262
|
end
|
267
|
-
elsif !attributes[
|
268
|
-
|
263
|
+
elsif !attributes[attribute_map[key]].nil?
|
264
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
269
265
|
end
|
270
266
|
end
|
271
|
-
|
272
|
-
self
|
267
|
+
new(transformed_hash)
|
273
268
|
end
|
274
269
|
|
275
270
|
# Deserializes the data based on type
|
276
271
|
# @param string type Data type
|
277
272
|
# @param string value Value to be deserialized
|
278
273
|
# @return [Object] Deserialized data
|
279
|
-
def _deserialize(type, value)
|
274
|
+
def self._deserialize(type, value)
|
280
275
|
case type.to_sym
|
281
276
|
when :Time
|
282
277
|
Time.parse(value)
|
@@ -311,7 +306,7 @@ module ElasticEmail
|
|
311
306
|
else # model
|
312
307
|
# models (e.g. Pet) or oneOf
|
313
308
|
klass = ElasticEmail.const_get(type)
|
314
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
309
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
315
310
|
end
|
316
311
|
end
|
317
312
|
|
@@ -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
|
|
@@ -76,6 +76,7 @@ module ElasticEmail
|
|
76
76
|
# Show invalid properties with the reasons. Usually used together with valid?
|
77
77
|
# @return Array for valid properties with the reasons
|
78
78
|
def list_invalid_properties
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
80
|
invalid_properties = Array.new
|
80
81
|
invalid_properties
|
81
82
|
end
|
@@ -83,6 +84,7 @@ module ElasticEmail
|
|
83
84
|
# Check to see if the all the properties in the model are valid
|
84
85
|
# @return true if the model is valid
|
85
86
|
def valid?
|
87
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
86
88
|
true
|
87
89
|
end
|
88
90
|
|
@@ -111,37 +113,30 @@ module ElasticEmail
|
|
111
113
|
# @param [Hash] attributes Model attributes in the form of hash
|
112
114
|
# @return [Object] Returns the model itself
|
113
115
|
def self.build_from_hash(attributes)
|
114
|
-
new.build_from_hash(attributes)
|
115
|
-
end
|
116
|
-
|
117
|
-
# Builds the object from hash
|
118
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
-
# @return [Object] Returns the model itself
|
120
|
-
def build_from_hash(attributes)
|
121
116
|
return nil unless attributes.is_a?(Hash)
|
122
117
|
attributes = attributes.transform_keys(&:to_sym)
|
123
|
-
|
124
|
-
|
125
|
-
|
118
|
+
transformed_hash = {}
|
119
|
+
openapi_types.each_pair do |key, type|
|
120
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
121
|
+
transformed_hash["#{key}"] = nil
|
126
122
|
elsif type =~ /\AArray<(.*)>/i
|
127
123
|
# check to ensure the input is an array given that the attribute
|
128
124
|
# is documented as an array but the input is not
|
129
|
-
if attributes[
|
130
|
-
|
125
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
126
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
131
127
|
end
|
132
|
-
elsif !attributes[
|
133
|
-
|
128
|
+
elsif !attributes[attribute_map[key]].nil?
|
129
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
134
130
|
end
|
135
131
|
end
|
136
|
-
|
137
|
-
self
|
132
|
+
new(transformed_hash)
|
138
133
|
end
|
139
134
|
|
140
135
|
# Deserializes the data based on type
|
141
136
|
# @param string type Data type
|
142
137
|
# @param string value Value to be deserialized
|
143
138
|
# @return [Object] Deserialized data
|
144
|
-
def _deserialize(type, value)
|
139
|
+
def self._deserialize(type, value)
|
145
140
|
case type.to_sym
|
146
141
|
when :Time
|
147
142
|
Time.parse(value)
|
@@ -176,7 +171,7 @@ module ElasticEmail
|
|
176
171
|
else # model
|
177
172
|
# models (e.g. Pet) or oneOf
|
178
173
|
klass = ElasticEmail.const_get(type)
|
179
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
174
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
175
|
end
|
181
176
|
end
|
182
177
|
|
@@ -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
|
|
@@ -65,16 +65,21 @@ module ElasticEmail
|
|
65
65
|
|
66
66
|
if attributes.key?(:'name')
|
67
67
|
self.name = attributes[:'name']
|
68
|
+
else
|
69
|
+
self.name = nil
|
68
70
|
end
|
69
71
|
|
70
72
|
if attributes.key?(:'rule')
|
71
73
|
self.rule = attributes[:'rule']
|
74
|
+
else
|
75
|
+
self.rule = nil
|
72
76
|
end
|
73
77
|
end
|
74
78
|
|
75
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
80
|
# @return Array for valid properties with the reasons
|
77
81
|
def list_invalid_properties
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
83
|
invalid_properties = Array.new
|
79
84
|
if @name.nil?
|
80
85
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -90,6 +95,7 @@ module ElasticEmail
|
|
90
95
|
# Check to see if the all the properties in the model are valid
|
91
96
|
# @return true if the model is valid
|
92
97
|
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
93
99
|
return false if @name.nil?
|
94
100
|
return false if @rule.nil?
|
95
101
|
true
|
@@ -120,37 +126,30 @@ module ElasticEmail
|
|
120
126
|
# @param [Hash] attributes Model attributes in the form of hash
|
121
127
|
# @return [Object] Returns the model itself
|
122
128
|
def self.build_from_hash(attributes)
|
123
|
-
new.build_from_hash(attributes)
|
124
|
-
end
|
125
|
-
|
126
|
-
# Builds the object from hash
|
127
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
-
# @return [Object] Returns the model itself
|
129
|
-
def build_from_hash(attributes)
|
130
129
|
return nil unless attributes.is_a?(Hash)
|
131
130
|
attributes = attributes.transform_keys(&:to_sym)
|
132
|
-
|
133
|
-
|
134
|
-
|
131
|
+
transformed_hash = {}
|
132
|
+
openapi_types.each_pair do |key, type|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
134
|
+
transformed_hash["#{key}"] = nil
|
135
135
|
elsif type =~ /\AArray<(.*)>/i
|
136
136
|
# check to ensure the input is an array given that the attribute
|
137
137
|
# is documented as an array but the input is not
|
138
|
-
if attributes[
|
139
|
-
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
140
140
|
end
|
141
|
-
elsif !attributes[
|
142
|
-
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
143
143
|
end
|
144
144
|
end
|
145
|
-
|
146
|
-
self
|
145
|
+
new(transformed_hash)
|
147
146
|
end
|
148
147
|
|
149
148
|
# Deserializes the data based on type
|
150
149
|
# @param string type Data type
|
151
150
|
# @param string value Value to be deserialized
|
152
151
|
# @return [Object] Deserialized data
|
153
|
-
def _deserialize(type, value)
|
152
|
+
def self._deserialize(type, value)
|
154
153
|
case type.to_sym
|
155
154
|
when :Time
|
156
155
|
Time.parse(value)
|
@@ -185,7 +184,7 @@ module ElasticEmail
|
|
185
184
|
else # model
|
186
185
|
# models (e.g. Pet) or oneOf
|
187
186
|
klass = ElasticEmail.const_get(type)
|
188
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
187
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
188
|
end
|
190
189
|
end
|
191
190
|
|
@@ -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
|
|
@@ -139,6 +139,7 @@ module ElasticEmail
|
|
139
139
|
# Show invalid properties with the reasons. Usually used together with valid?
|
140
140
|
# @return Array for valid properties with the reasons
|
141
141
|
def list_invalid_properties
|
142
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
142
143
|
invalid_properties = Array.new
|
143
144
|
invalid_properties
|
144
145
|
end
|
@@ -146,6 +147,7 @@ module ElasticEmail
|
|
146
147
|
# Check to see if the all the properties in the model are valid
|
147
148
|
# @return true if the model is valid
|
148
149
|
def valid?
|
150
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
149
151
|
true
|
150
152
|
end
|
151
153
|
|
@@ -178,37 +180,30 @@ module ElasticEmail
|
|
178
180
|
# @param [Hash] attributes Model attributes in the form of hash
|
179
181
|
# @return [Object] Returns the model itself
|
180
182
|
def self.build_from_hash(attributes)
|
181
|
-
new.build_from_hash(attributes)
|
182
|
-
end
|
183
|
-
|
184
|
-
# Builds the object from hash
|
185
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
186
|
-
# @return [Object] Returns the model itself
|
187
|
-
def build_from_hash(attributes)
|
188
183
|
return nil unless attributes.is_a?(Hash)
|
189
184
|
attributes = attributes.transform_keys(&:to_sym)
|
190
|
-
|
191
|
-
|
192
|
-
|
185
|
+
transformed_hash = {}
|
186
|
+
openapi_types.each_pair do |key, type|
|
187
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
188
|
+
transformed_hash["#{key}"] = nil
|
193
189
|
elsif type =~ /\AArray<(.*)>/i
|
194
190
|
# check to ensure the input is an array given that the attribute
|
195
191
|
# is documented as an array but the input is not
|
196
|
-
if attributes[
|
197
|
-
|
192
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
193
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
198
194
|
end
|
199
|
-
elsif !attributes[
|
200
|
-
|
195
|
+
elsif !attributes[attribute_map[key]].nil?
|
196
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
201
197
|
end
|
202
198
|
end
|
203
|
-
|
204
|
-
self
|
199
|
+
new(transformed_hash)
|
205
200
|
end
|
206
201
|
|
207
202
|
# Deserializes the data based on type
|
208
203
|
# @param string type Data type
|
209
204
|
# @param string value Value to be deserialized
|
210
205
|
# @return [Object] Deserialized data
|
211
|
-
def _deserialize(type, value)
|
206
|
+
def self._deserialize(type, value)
|
212
207
|
case type.to_sym
|
213
208
|
when :Time
|
214
209
|
Time.parse(value)
|
@@ -243,7 +238,7 @@ module ElasticEmail
|
|
243
238
|
else # model
|
244
239
|
# models (e.g. Pet) or oneOf
|
245
240
|
klass = ElasticEmail.const_get(type)
|
246
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
241
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
247
242
|
end
|
248
243
|
end
|
249
244
|
|
@@ -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
|
|
@@ -77,6 +77,8 @@ module ElasticEmail
|
|
77
77
|
|
78
78
|
if attributes.key?(:'name')
|
79
79
|
self.name = attributes[:'name']
|
80
|
+
else
|
81
|
+
self.name = nil
|
80
82
|
end
|
81
83
|
|
82
84
|
if attributes.key?(:'expires')
|
@@ -97,6 +99,7 @@ module ElasticEmail
|
|
97
99
|
# Show invalid properties with the reasons. Usually used together with valid?
|
98
100
|
# @return Array for valid properties with the reasons
|
99
101
|
def list_invalid_properties
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
100
103
|
invalid_properties = Array.new
|
101
104
|
if @name.nil?
|
102
105
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -108,6 +111,7 @@ module ElasticEmail
|
|
108
111
|
# Check to see if the all the properties in the model are valid
|
109
112
|
# @return true if the model is valid
|
110
113
|
def valid?
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
111
115
|
return false if @name.nil?
|
112
116
|
true
|
113
117
|
end
|
@@ -139,37 +143,30 @@ module ElasticEmail
|
|
139
143
|
# @param [Hash] attributes Model attributes in the form of hash
|
140
144
|
# @return [Object] Returns the model itself
|
141
145
|
def self.build_from_hash(attributes)
|
142
|
-
new.build_from_hash(attributes)
|
143
|
-
end
|
144
|
-
|
145
|
-
# Builds the object from hash
|
146
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
-
# @return [Object] Returns the model itself
|
148
|
-
def build_from_hash(attributes)
|
149
146
|
return nil unless attributes.is_a?(Hash)
|
150
147
|
attributes = attributes.transform_keys(&:to_sym)
|
151
|
-
|
152
|
-
|
153
|
-
|
148
|
+
transformed_hash = {}
|
149
|
+
openapi_types.each_pair do |key, type|
|
150
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = nil
|
154
152
|
elsif type =~ /\AArray<(.*)>/i
|
155
153
|
# check to ensure the input is an array given that the attribute
|
156
154
|
# is documented as an array but the input is not
|
157
|
-
if attributes[
|
158
|
-
|
155
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
156
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
159
157
|
end
|
160
|
-
elsif !attributes[
|
161
|
-
|
158
|
+
elsif !attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
162
160
|
end
|
163
161
|
end
|
164
|
-
|
165
|
-
self
|
162
|
+
new(transformed_hash)
|
166
163
|
end
|
167
164
|
|
168
165
|
# Deserializes the data based on type
|
169
166
|
# @param string type Data type
|
170
167
|
# @param string value Value to be deserialized
|
171
168
|
# @return [Object] Deserialized data
|
172
|
-
def _deserialize(type, value)
|
169
|
+
def self._deserialize(type, value)
|
173
170
|
case type.to_sym
|
174
171
|
when :Time
|
175
172
|
Time.parse(value)
|
@@ -204,7 +201,7 @@ module ElasticEmail
|
|
204
201
|
else # model
|
205
202
|
# models (e.g. Pet) or oneOf
|
206
203
|
klass = ElasticEmail.const_get(type)
|
207
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
205
|
end
|
209
206
|
end
|
210
207
|
|
@@ -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,16 +66,21 @@ module ElasticEmail
|
|
66
66
|
|
67
67
|
if attributes.key?(:'public_inbound_id')
|
68
68
|
self.public_inbound_id = attributes[:'public_inbound_id']
|
69
|
+
else
|
70
|
+
self.public_inbound_id = nil
|
69
71
|
end
|
70
72
|
|
71
73
|
if attributes.key?(:'sort_order')
|
72
74
|
self.sort_order = attributes[:'sort_order']
|
75
|
+
else
|
76
|
+
self.sort_order = nil
|
73
77
|
end
|
74
78
|
end
|
75
79
|
|
76
80
|
# Show invalid properties with the reasons. Usually used together with valid?
|
77
81
|
# @return Array for valid properties with the reasons
|
78
82
|
def list_invalid_properties
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
84
|
invalid_properties = Array.new
|
80
85
|
if @public_inbound_id.nil?
|
81
86
|
invalid_properties.push('invalid value for "public_inbound_id", public_inbound_id cannot be nil.')
|
@@ -91,6 +96,7 @@ module ElasticEmail
|
|
91
96
|
# Check to see if the all the properties in the model are valid
|
92
97
|
# @return true if the model is valid
|
93
98
|
def valid?
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
94
100
|
return false if @public_inbound_id.nil?
|
95
101
|
return false if @sort_order.nil?
|
96
102
|
true
|
@@ -121,37 +127,30 @@ module ElasticEmail
|
|
121
127
|
# @param [Hash] attributes Model attributes in the form of hash
|
122
128
|
# @return [Object] Returns the model itself
|
123
129
|
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
130
|
return nil unless attributes.is_a?(Hash)
|
132
131
|
attributes = attributes.transform_keys(&:to_sym)
|
133
|
-
|
134
|
-
|
135
|
-
|
132
|
+
transformed_hash = {}
|
133
|
+
openapi_types.each_pair do |key, type|
|
134
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = nil
|
136
136
|
elsif type =~ /\AArray<(.*)>/i
|
137
137
|
# check to ensure the input is an array given that the attribute
|
138
138
|
# is documented as an array but the input is not
|
139
|
-
if attributes[
|
140
|
-
|
139
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
140
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
141
141
|
end
|
142
|
-
elsif !attributes[
|
143
|
-
|
142
|
+
elsif !attributes[attribute_map[key]].nil?
|
143
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
144
144
|
end
|
145
145
|
end
|
146
|
-
|
147
|
-
self
|
146
|
+
new(transformed_hash)
|
148
147
|
end
|
149
148
|
|
150
149
|
# Deserializes the data based on type
|
151
150
|
# @param string type Data type
|
152
151
|
# @param string value Value to be deserialized
|
153
152
|
# @return [Object] Deserialized data
|
154
|
-
def _deserialize(type, value)
|
153
|
+
def self._deserialize(type, value)
|
155
154
|
case type.to_sym
|
156
155
|
when :Time
|
157
156
|
Time.parse(value)
|
@@ -186,7 +185,7 @@ module ElasticEmail
|
|
186
185
|
else # model
|
187
186
|
# models (e.g. Pet) or oneOf
|
188
187
|
klass = ElasticEmail.const_get(type)
|
189
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
190
189
|
end
|
191
190
|
end
|
192
191
|
|