ElasticEmail 4.0.23 → 4.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ElasticEmail.gemspec +2 -1
- 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 +10 -18
- 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
|
|
@@ -66,6 +66,8 @@ module ElasticEmail
|
|
66
66
|
|
67
67
|
if attributes.key?(:'credits')
|
68
68
|
self.credits = attributes[:'credits']
|
69
|
+
else
|
70
|
+
self.credits = nil
|
69
71
|
end
|
70
72
|
|
71
73
|
if attributes.key?(:'notes')
|
@@ -76,6 +78,7 @@ module ElasticEmail
|
|
76
78
|
# Show invalid properties with the reasons. Usually used together with valid?
|
77
79
|
# @return Array for valid properties with the reasons
|
78
80
|
def list_invalid_properties
|
81
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
82
|
invalid_properties = Array.new
|
80
83
|
if @credits.nil?
|
81
84
|
invalid_properties.push('invalid value for "credits", credits cannot be nil.')
|
@@ -87,6 +90,7 @@ module ElasticEmail
|
|
87
90
|
# Check to see if the all the properties in the model are valid
|
88
91
|
# @return true if the model is valid
|
89
92
|
def valid?
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
90
94
|
return false if @credits.nil?
|
91
95
|
true
|
92
96
|
end
|
@@ -116,37 +120,30 @@ module ElasticEmail
|
|
116
120
|
# @param [Hash] attributes Model attributes in the form of hash
|
117
121
|
# @return [Object] Returns the model itself
|
118
122
|
def self.build_from_hash(attributes)
|
119
|
-
new.build_from_hash(attributes)
|
120
|
-
end
|
121
|
-
|
122
|
-
# Builds the object from hash
|
123
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
-
# @return [Object] Returns the model itself
|
125
|
-
def build_from_hash(attributes)
|
126
123
|
return nil unless attributes.is_a?(Hash)
|
127
124
|
attributes = attributes.transform_keys(&:to_sym)
|
128
|
-
|
129
|
-
|
130
|
-
|
125
|
+
transformed_hash = {}
|
126
|
+
openapi_types.each_pair do |key, type|
|
127
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = nil
|
131
129
|
elsif type =~ /\AArray<(.*)>/i
|
132
130
|
# check to ensure the input is an array given that the attribute
|
133
131
|
# is documented as an array but the input is not
|
134
|
-
if attributes[
|
135
|
-
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
136
134
|
end
|
137
|
-
elsif !attributes[
|
138
|
-
|
135
|
+
elsif !attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
139
137
|
end
|
140
138
|
end
|
141
|
-
|
142
|
-
self
|
139
|
+
new(transformed_hash)
|
143
140
|
end
|
144
141
|
|
145
142
|
# Deserializes the data based on type
|
146
143
|
# @param string type Data type
|
147
144
|
# @param string value Value to be deserialized
|
148
145
|
# @return [Object] Deserialized data
|
149
|
-
def _deserialize(type, value)
|
146
|
+
def self._deserialize(type, value)
|
150
147
|
case type.to_sym
|
151
148
|
when :Time
|
152
149
|
Time.parse(value)
|
@@ -181,7 +178,7 @@ module ElasticEmail
|
|
181
178
|
else # model
|
182
179
|
# models (e.g. Pet) or oneOf
|
183
180
|
klass = ElasticEmail.const_get(type)
|
184
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
181
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
185
182
|
end
|
186
183
|
end
|
187
184
|
|
@@ -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
|
|
@@ -130,6 +130,7 @@ module ElasticEmail
|
|
130
130
|
# Show invalid properties with the reasons. Usually used together with valid?
|
131
131
|
# @return Array for valid properties with the reasons
|
132
132
|
def list_invalid_properties
|
133
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
133
134
|
invalid_properties = Array.new
|
134
135
|
invalid_properties
|
135
136
|
end
|
@@ -137,6 +138,7 @@ module ElasticEmail
|
|
137
138
|
# Check to see if the all the properties in the model are valid
|
138
139
|
# @return true if the model is valid
|
139
140
|
def valid?
|
141
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
140
142
|
true
|
141
143
|
end
|
142
144
|
|
@@ -171,37 +173,30 @@ module ElasticEmail
|
|
171
173
|
# @param [Hash] attributes Model attributes in the form of hash
|
172
174
|
# @return [Object] Returns the model itself
|
173
175
|
def self.build_from_hash(attributes)
|
174
|
-
new.build_from_hash(attributes)
|
175
|
-
end
|
176
|
-
|
177
|
-
# Builds the object from hash
|
178
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
179
|
-
# @return [Object] Returns the model itself
|
180
|
-
def build_from_hash(attributes)
|
181
176
|
return nil unless attributes.is_a?(Hash)
|
182
177
|
attributes = attributes.transform_keys(&:to_sym)
|
183
|
-
|
184
|
-
|
185
|
-
|
178
|
+
transformed_hash = {}
|
179
|
+
openapi_types.each_pair do |key, type|
|
180
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
181
|
+
transformed_hash["#{key}"] = nil
|
186
182
|
elsif type =~ /\AArray<(.*)>/i
|
187
183
|
# check to ensure the input is an array given that the attribute
|
188
184
|
# is documented as an array but the input is not
|
189
|
-
if attributes[
|
190
|
-
|
185
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
186
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
191
187
|
end
|
192
|
-
elsif !attributes[
|
193
|
-
|
188
|
+
elsif !attributes[attribute_map[key]].nil?
|
189
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
194
190
|
end
|
195
191
|
end
|
196
|
-
|
197
|
-
self
|
192
|
+
new(transformed_hash)
|
198
193
|
end
|
199
194
|
|
200
195
|
# Deserializes the data based on type
|
201
196
|
# @param string type Data type
|
202
197
|
# @param string value Value to be deserialized
|
203
198
|
# @return [Object] Deserialized data
|
204
|
-
def _deserialize(type, value)
|
199
|
+
def self._deserialize(type, value)
|
205
200
|
case type.to_sym
|
206
201
|
when :Time
|
207
202
|
Time.parse(value)
|
@@ -236,7 +231,7 @@ module ElasticEmail
|
|
236
231
|
else # model
|
237
232
|
# models (e.g. Pet) or oneOf
|
238
233
|
klass = ElasticEmail.const_get(type)
|
239
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
234
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
240
235
|
end
|
241
236
|
end
|
242
237
|
|
@@ -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
|
|
@@ -121,6 +121,7 @@ module ElasticEmail
|
|
121
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
122
122
|
# @return Array for valid properties with the reasons
|
123
123
|
def list_invalid_properties
|
124
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
124
125
|
invalid_properties = Array.new
|
125
126
|
invalid_properties
|
126
127
|
end
|
@@ -128,6 +129,7 @@ module ElasticEmail
|
|
128
129
|
# Check to see if the all the properties in the model are valid
|
129
130
|
# @return true if the model is valid
|
130
131
|
def valid?
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
131
133
|
true
|
132
134
|
end
|
133
135
|
|
@@ -161,37 +163,30 @@ module ElasticEmail
|
|
161
163
|
# @param [Hash] attributes Model attributes in the form of hash
|
162
164
|
# @return [Object] Returns the model itself
|
163
165
|
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
166
|
return nil unless attributes.is_a?(Hash)
|
172
167
|
attributes = attributes.transform_keys(&:to_sym)
|
173
|
-
|
174
|
-
|
175
|
-
|
168
|
+
transformed_hash = {}
|
169
|
+
openapi_types.each_pair do |key, type|
|
170
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
171
|
+
transformed_hash["#{key}"] = nil
|
176
172
|
elsif type =~ /\AArray<(.*)>/i
|
177
173
|
# check to ensure the input is an array given that the attribute
|
178
174
|
# is documented as an array but the input is not
|
179
|
-
if attributes[
|
180
|
-
|
175
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
176
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
181
177
|
end
|
182
|
-
elsif !attributes[
|
183
|
-
|
178
|
+
elsif !attributes[attribute_map[key]].nil?
|
179
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
184
180
|
end
|
185
181
|
end
|
186
|
-
|
187
|
-
self
|
182
|
+
new(transformed_hash)
|
188
183
|
end
|
189
184
|
|
190
185
|
# Deserializes the data based on type
|
191
186
|
# @param string type Data type
|
192
187
|
# @param string value Value to be deserialized
|
193
188
|
# @return [Object] Deserialized data
|
194
|
-
def _deserialize(type, value)
|
189
|
+
def self._deserialize(type, value)
|
195
190
|
case type.to_sym
|
196
191
|
when :Time
|
197
192
|
Time.parse(value)
|
@@ -226,7 +221,7 @@ module ElasticEmail
|
|
226
221
|
else # model
|
227
222
|
# models (e.g. Pet) or oneOf
|
228
223
|
klass = ElasticEmail.const_get(type)
|
229
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
224
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
230
225
|
end
|
231
226
|
end
|
232
227
|
|
@@ -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
|
|
@@ -75,10 +75,14 @@ module ElasticEmail
|
|
75
75
|
|
76
76
|
if attributes.key?(:'email')
|
77
77
|
self.email = attributes[:'email']
|
78
|
+
else
|
79
|
+
self.email = nil
|
78
80
|
end
|
79
81
|
|
80
82
|
if attributes.key?(:'password')
|
81
83
|
self.password = attributes[:'password']
|
84
|
+
else
|
85
|
+
self.password = nil
|
82
86
|
end
|
83
87
|
|
84
88
|
if attributes.key?(:'send_activation')
|
@@ -93,6 +97,7 @@ module ElasticEmail
|
|
93
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
94
98
|
# @return Array for valid properties with the reasons
|
95
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
96
101
|
invalid_properties = Array.new
|
97
102
|
if @email.nil?
|
98
103
|
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
@@ -108,6 +113,7 @@ module ElasticEmail
|
|
108
113
|
# Check to see if the all the properties in the model are valid
|
109
114
|
# @return true if the model is valid
|
110
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
111
117
|
return false if @email.nil?
|
112
118
|
return false if @password.nil?
|
113
119
|
true
|
@@ -140,37 +146,30 @@ module ElasticEmail
|
|
140
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
141
147
|
# @return [Object] Returns the model itself
|
142
148
|
def self.build_from_hash(attributes)
|
143
|
-
new.build_from_hash(attributes)
|
144
|
-
end
|
145
|
-
|
146
|
-
# Builds the object from hash
|
147
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
148
|
-
# @return [Object] Returns the model itself
|
149
|
-
def build_from_hash(attributes)
|
150
149
|
return nil unless attributes.is_a?(Hash)
|
151
150
|
attributes = attributes.transform_keys(&:to_sym)
|
152
|
-
|
153
|
-
|
154
|
-
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
155
|
elsif type =~ /\AArray<(.*)>/i
|
156
156
|
# check to ensure the input is an array given that the attribute
|
157
157
|
# is documented as an array but the input is not
|
158
|
-
if attributes[
|
159
|
-
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
160
160
|
end
|
161
|
-
elsif !attributes[
|
162
|
-
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
163
|
end
|
164
164
|
end
|
165
|
-
|
166
|
-
self
|
165
|
+
new(transformed_hash)
|
167
166
|
end
|
168
167
|
|
169
168
|
# Deserializes the data based on type
|
170
169
|
# @param string type Data type
|
171
170
|
# @param string value Value to be deserialized
|
172
171
|
# @return [Object] Deserialized data
|
173
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
174
173
|
case type.to_sym
|
175
174
|
when :Time
|
176
175
|
Time.parse(value)
|
@@ -205,7 +204,7 @@ module ElasticEmail
|
|
205
204
|
else # model
|
206
205
|
# models (e.g. Pet) or oneOf
|
207
206
|
klass = ElasticEmail.const_get(type)
|
208
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
208
|
end
|
210
209
|
end
|
211
210
|
|
@@ -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
|
|
@@ -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.7.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.7.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
|
|