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
|
|
@@ -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.7.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.7.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.7.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.7.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
|
|
@@ -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
|
|
@@ -99,6 +99,7 @@ module ElasticEmail
|
|
99
99
|
# Show invalid properties with the reasons. Usually used together with valid?
|
100
100
|
# @return Array for valid properties with the reasons
|
101
101
|
def list_invalid_properties
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
102
103
|
invalid_properties = Array.new
|
103
104
|
invalid_properties
|
104
105
|
end
|
@@ -106,6 +107,7 @@ module ElasticEmail
|
|
106
107
|
# Check to see if the all the properties in the model are valid
|
107
108
|
# @return true if the model is valid
|
108
109
|
def valid?
|
110
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
109
111
|
true
|
110
112
|
end
|
111
113
|
|
@@ -134,37 +136,30 @@ module ElasticEmail
|
|
134
136
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
137
|
# @return [Object] Returns the model itself
|
136
138
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
139
|
return nil unless attributes.is_a?(Hash)
|
145
140
|
attributes = attributes.transform_keys(&:to_sym)
|
146
|
-
|
147
|
-
|
148
|
-
|
141
|
+
transformed_hash = {}
|
142
|
+
openapi_types.each_pair do |key, type|
|
143
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = nil
|
149
145
|
elsif type =~ /\AArray<(.*)>/i
|
150
146
|
# check to ensure the input is an array given that the attribute
|
151
147
|
# is documented as an array but the input is not
|
152
|
-
if attributes[
|
153
|
-
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
149
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
154
150
|
end
|
155
|
-
elsif !attributes[
|
156
|
-
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
157
153
|
end
|
158
154
|
end
|
159
|
-
|
160
|
-
self
|
155
|
+
new(transformed_hash)
|
161
156
|
end
|
162
157
|
|
163
158
|
# Deserializes the data based on type
|
164
159
|
# @param string type Data type
|
165
160
|
# @param string value Value to be deserialized
|
166
161
|
# @return [Object] Deserialized data
|
167
|
-
def _deserialize(type, value)
|
162
|
+
def self._deserialize(type, value)
|
168
163
|
case type.to_sym
|
169
164
|
when :Time
|
170
165
|
Time.parse(value)
|
@@ -199,7 +194,7 @@ module ElasticEmail
|
|
199
194
|
else # model
|
200
195
|
# models (e.g. Pet) or oneOf
|
201
196
|
klass = ElasticEmail.const_get(type)
|
202
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
197
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
203
198
|
end
|
204
199
|
end
|
205
200
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -161,6 +161,7 @@ module ElasticEmail
|
|
161
161
|
# Show invalid properties with the reasons. Usually used together with valid?
|
162
162
|
# @return Array for valid properties with the reasons
|
163
163
|
def list_invalid_properties
|
164
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
164
165
|
invalid_properties = Array.new
|
165
166
|
invalid_properties
|
166
167
|
end
|
@@ -168,6 +169,7 @@ module ElasticEmail
|
|
168
169
|
# Check to see if the all the properties in the model are valid
|
169
170
|
# @return true if the model is valid
|
170
171
|
def valid?
|
172
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
171
173
|
true
|
172
174
|
end
|
173
175
|
|
@@ -203,37 +205,30 @@ module ElasticEmail
|
|
203
205
|
# @param [Hash] attributes Model attributes in the form of hash
|
204
206
|
# @return [Object] Returns the model itself
|
205
207
|
def self.build_from_hash(attributes)
|
206
|
-
new.build_from_hash(attributes)
|
207
|
-
end
|
208
|
-
|
209
|
-
# Builds the object from hash
|
210
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
211
|
-
# @return [Object] Returns the model itself
|
212
|
-
def build_from_hash(attributes)
|
213
208
|
return nil unless attributes.is_a?(Hash)
|
214
209
|
attributes = attributes.transform_keys(&:to_sym)
|
215
|
-
|
216
|
-
|
217
|
-
|
210
|
+
transformed_hash = {}
|
211
|
+
openapi_types.each_pair do |key, type|
|
212
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
213
|
+
transformed_hash["#{key}"] = nil
|
218
214
|
elsif type =~ /\AArray<(.*)>/i
|
219
215
|
# check to ensure the input is an array given that the attribute
|
220
216
|
# is documented as an array but the input is not
|
221
|
-
if attributes[
|
222
|
-
|
217
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
218
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
223
219
|
end
|
224
|
-
elsif !attributes[
|
225
|
-
|
220
|
+
elsif !attributes[attribute_map[key]].nil?
|
221
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
226
222
|
end
|
227
223
|
end
|
228
|
-
|
229
|
-
self
|
224
|
+
new(transformed_hash)
|
230
225
|
end
|
231
226
|
|
232
227
|
# Deserializes the data based on type
|
233
228
|
# @param string type Data type
|
234
229
|
# @param string value Value to be deserialized
|
235
230
|
# @return [Object] Deserialized data
|
236
|
-
def _deserialize(type, value)
|
231
|
+
def self._deserialize(type, value)
|
237
232
|
case type.to_sym
|
238
233
|
when :Time
|
239
234
|
Time.parse(value)
|
@@ -268,7 +263,7 @@ module ElasticEmail
|
|
268
263
|
else # model
|
269
264
|
# models (e.g. Pet) or oneOf
|
270
265
|
klass = ElasticEmail.const_get(type)
|
271
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
266
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
272
267
|
end
|
273
268
|
end
|
274
269
|
|