ElasticEmail 4.0.22 → 4.0.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/ElasticEmail.gemspec +3 -2
  3. data/README.md +10 -4
  4. data/VERSION +1 -1
  5. data/docs/CampaignOptions.md +4 -0
  6. data/docs/CampaignTemplate.md +2 -2
  7. data/docs/EmailContent.md +2 -2
  8. data/docs/EmailJobFailedStatus.md +24 -0
  9. data/docs/EmailJobStatus.md +56 -0
  10. data/docs/EmailMessageData.md +1 -1
  11. data/docs/EmailTransactionalMessageData.md +1 -1
  12. data/docs/EmailValidationResult.md +2 -2
  13. data/docs/EmailsApi.md +97 -3
  14. data/docs/EmailsPayload.md +1 -1
  15. data/docs/ListPayload.md +1 -1
  16. data/docs/ListsApi.md +78 -0
  17. data/docs/MergeEmailPayload.md +1 -1
  18. data/lib/ElasticEmail/api/campaigns_api.rb +1 -1
  19. data/lib/ElasticEmail/api/contacts_api.rb +1 -1
  20. data/lib/ElasticEmail/api/emails_api.rb +94 -1
  21. data/lib/ElasticEmail/api/events_api.rb +1 -1
  22. data/lib/ElasticEmail/api/files_api.rb +1 -1
  23. data/lib/ElasticEmail/api/inbound_route_api.rb +1 -1
  24. data/lib/ElasticEmail/api/lists_api.rb +70 -1
  25. data/lib/ElasticEmail/api/security_api.rb +1 -1
  26. data/lib/ElasticEmail/api/segments_api.rb +1 -1
  27. data/lib/ElasticEmail/api/statistics_api.rb +1 -1
  28. data/lib/ElasticEmail/api/sub_accounts_api.rb +1 -1
  29. data/lib/ElasticEmail/api/suppressions_api.rb +1 -1
  30. data/lib/ElasticEmail/api/templates_api.rb +1 -1
  31. data/lib/ElasticEmail/api/verifications_api.rb +1 -1
  32. data/lib/ElasticEmail/api_client.rb +25 -23
  33. data/lib/ElasticEmail/api_error.rb +1 -1
  34. data/lib/ElasticEmail/configuration.rb +28 -10
  35. data/lib/ElasticEmail/models/access_level.rb +3 -3
  36. data/lib/ElasticEmail/models/account_status_enum.rb +1 -1
  37. data/lib/ElasticEmail/models/api_key.rb +14 -19
  38. data/lib/ElasticEmail/models/api_key_payload.rb +18 -19
  39. data/lib/ElasticEmail/models/body_content_type.rb +1 -1
  40. data/lib/ElasticEmail/models/body_part.rb +14 -19
  41. data/lib/ElasticEmail/models/campaign.rb +18 -19
  42. data/lib/ElasticEmail/models/campaign_options.rb +35 -20
  43. data/lib/ElasticEmail/models/campaign_recipient.rb +14 -19
  44. data/lib/ElasticEmail/models/campaign_status.rb +1 -1
  45. data/lib/ElasticEmail/models/campaign_template.rb +21 -19
  46. data/lib/ElasticEmail/models/channel_log_status_summary.rb +14 -19
  47. data/lib/ElasticEmail/models/compression_format.rb +1 -1
  48. data/lib/ElasticEmail/models/consent_data.rb +14 -19
  49. data/lib/ElasticEmail/models/consent_tracking.rb +1 -1
  50. data/lib/ElasticEmail/models/contact.rb +14 -19
  51. data/lib/ElasticEmail/models/contact_activity.rb +14 -19
  52. data/lib/ElasticEmail/models/contact_payload.rb +16 -19
  53. data/lib/ElasticEmail/models/contact_source.rb +1 -1
  54. data/lib/ElasticEmail/models/contact_status.rb +1 -1
  55. data/lib/ElasticEmail/models/contact_update_payload.rb +14 -19
  56. data/lib/ElasticEmail/models/contacts_list.rb +14 -19
  57. data/lib/ElasticEmail/models/delivery_optimization_type.rb +1 -1
  58. data/lib/ElasticEmail/models/email_content.rb +21 -19
  59. data/lib/ElasticEmail/models/email_data.rb +14 -19
  60. data/lib/ElasticEmail/models/{contact_history.rb → email_job_failed_status.rb} +44 -83
  61. data/lib/ElasticEmail/models/email_job_status.rb +415 -0
  62. data/lib/ElasticEmail/models/email_message_data.rb +23 -19
  63. data/lib/ElasticEmail/models/email_predicted_validation_status.rb +1 -1
  64. data/lib/ElasticEmail/models/email_recipient.rb +16 -19
  65. data/lib/ElasticEmail/models/email_send.rb +14 -19
  66. data/lib/ElasticEmail/models/email_status.rb +14 -19
  67. data/lib/ElasticEmail/models/email_transactional_message_data.rb +23 -19
  68. data/lib/ElasticEmail/models/email_validation_result.rb +16 -20
  69. data/lib/ElasticEmail/models/email_validation_status.rb +1 -1
  70. data/lib/ElasticEmail/models/email_view.rb +14 -19
  71. data/lib/ElasticEmail/models/emails_payload.rb +14 -19
  72. data/lib/ElasticEmail/models/encoding_type.rb +1 -1
  73. data/lib/ElasticEmail/models/event_type.rb +1 -1
  74. data/lib/ElasticEmail/models/events_order_by.rb +1 -1
  75. data/lib/ElasticEmail/models/export_file_formats.rb +1 -1
  76. data/lib/ElasticEmail/models/export_link.rb +14 -19
  77. data/lib/ElasticEmail/models/export_status.rb +1 -1
  78. data/lib/ElasticEmail/models/file_info.rb +14 -19
  79. data/lib/ElasticEmail/models/file_payload.rb +16 -19
  80. data/lib/ElasticEmail/models/file_upload_result.rb +14 -19
  81. data/lib/ElasticEmail/models/inbound_payload.rb +18 -19
  82. data/lib/ElasticEmail/models/inbound_route.rb +14 -19
  83. data/lib/ElasticEmail/models/inbound_route_action_type.rb +1 -1
  84. data/lib/ElasticEmail/models/inbound_route_filter_type.rb +1 -1
  85. data/lib/ElasticEmail/models/list_payload.rb +16 -19
  86. data/lib/ElasticEmail/models/list_update_payload.rb +14 -19
  87. data/lib/ElasticEmail/models/log_job_status.rb +1 -1
  88. data/lib/ElasticEmail/models/log_status_summary.rb +14 -19
  89. data/lib/ElasticEmail/models/merge_email_payload.rb +23 -19
  90. data/lib/ElasticEmail/models/message_attachment.rb +18 -19
  91. data/lib/ElasticEmail/models/message_category.rb +1 -1
  92. data/lib/ElasticEmail/models/new_api_key.rb +14 -19
  93. data/lib/ElasticEmail/models/new_smtp_credentials.rb +14 -19
  94. data/lib/ElasticEmail/models/options.rb +16 -19
  95. data/lib/ElasticEmail/models/recipient_event.rb +14 -19
  96. data/lib/ElasticEmail/models/segment.rb +14 -19
  97. data/lib/ElasticEmail/models/segment_payload.rb +18 -19
  98. data/lib/ElasticEmail/models/smtp_credentials.rb +14 -19
  99. data/lib/ElasticEmail/models/smtp_credentials_payload.rb +16 -19
  100. data/lib/ElasticEmail/models/sort_order_item.rb +18 -19
  101. data/lib/ElasticEmail/models/split_optimization_type.rb +1 -1
  102. data/lib/ElasticEmail/models/split_options.rb +14 -19
  103. data/lib/ElasticEmail/models/sub_account_info.rb +14 -19
  104. data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +16 -19
  105. data/lib/ElasticEmail/models/subaccount_email_settings.rb +14 -19
  106. data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +14 -19
  107. data/lib/ElasticEmail/models/subaccount_payload.rb +18 -19
  108. data/lib/ElasticEmail/models/subaccount_settings_info.rb +14 -19
  109. data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +14 -19
  110. data/lib/ElasticEmail/models/suppression.rb +14 -19
  111. data/lib/ElasticEmail/models/template.rb +14 -19
  112. data/lib/ElasticEmail/models/template_payload.rb +16 -19
  113. data/lib/ElasticEmail/models/template_scope.rb +1 -1
  114. data/lib/ElasticEmail/models/template_type.rb +3 -2
  115. data/lib/ElasticEmail/models/transactional_recipient.rb +16 -19
  116. data/lib/ElasticEmail/models/utm.rb +14 -19
  117. data/lib/ElasticEmail/models/verification_file_result.rb +14 -19
  118. data/lib/ElasticEmail/models/verification_file_result_details.rb +14 -19
  119. data/lib/ElasticEmail/models/verification_status.rb +1 -1
  120. data/lib/ElasticEmail/version.rb +2 -2
  121. data/lib/ElasticEmail.rb +3 -1
  122. data/spec/api/campaigns_api_spec.rb +7 -7
  123. data/spec/api/contacts_api_spec.rb +12 -25
  124. data/spec/api/emails_api_spec.rb +28 -6
  125. data/spec/api/events_api_spec.rb +9 -9
  126. data/spec/api/files_api_spec.rb +7 -7
  127. data/spec/api/inbound_route_api_spec.rb +8 -8
  128. data/spec/api/lists_api_spec.rb +23 -9
  129. data/spec/api/security_api_spec.rb +12 -12
  130. data/spec/api/segments_api_spec.rb +7 -7
  131. data/spec/api/statistics_api_spec.rb +7 -7
  132. data/spec/api/sub_accounts_api_spec.rb +8 -8
  133. data/spec/api/suppressions_api_spec.rb +26 -26
  134. data/spec/api/templates_api_spec.rb +7 -7
  135. data/spec/api/verifications_api_spec.rb +30 -18
  136. data/spec/models/access_level_spec.rb +5 -3
  137. data/spec/models/account_status_enum_spec.rb +5 -3
  138. data/spec/models/api_key_payload_spec.rb +10 -8
  139. data/spec/models/api_key_spec.rb +11 -9
  140. data/spec/models/body_content_type_spec.rb +5 -3
  141. data/spec/models/body_part_spec.rb +8 -6
  142. data/spec/models/campaign_options_spec.rb +22 -8
  143. data/spec/models/campaign_recipient_spec.rb +7 -5
  144. data/spec/models/campaign_spec.rb +10 -8
  145. data/spec/models/campaign_status_spec.rb +5 -3
  146. data/spec/models/campaign_template_spec.rb +12 -10
  147. data/spec/models/channel_log_status_summary_spec.rb +19 -17
  148. data/spec/models/compression_format_spec.rb +5 -3
  149. data/spec/models/consent_data_spec.rb +8 -6
  150. data/spec/models/consent_tracking_spec.rb +5 -3
  151. data/spec/models/contact_activity_spec.rb +16 -14
  152. data/spec/models/contact_payload_spec.rb +11 -9
  153. data/spec/models/contact_source_spec.rb +5 -3
  154. data/spec/models/contact_spec.rb +16 -14
  155. data/spec/models/contact_status_spec.rb +5 -3
  156. data/spec/models/contact_update_payload_spec.rb +8 -6
  157. data/spec/models/contacts_list_spec.rb +9 -7
  158. data/spec/models/delivery_optimization_type_spec.rb +5 -3
  159. data/spec/models/email_content_spec.rb +22 -14
  160. data/spec/models/email_data_spec.rb +8 -6
  161. data/spec/models/email_job_failed_status_spec.rb +54 -0
  162. data/spec/models/email_job_status_spec.rb +150 -0
  163. data/spec/models/email_message_data_spec.rb +8 -6
  164. data/spec/models/email_predicted_validation_status_spec.rb +4 -2
  165. data/spec/models/email_recipient_spec.rb +7 -5
  166. data/spec/models/email_send_spec.rb +7 -5
  167. data/spec/models/email_status_spec.rb +17 -15
  168. data/spec/models/email_transactional_message_data_spec.rb +8 -6
  169. data/spec/models/email_validation_result_spec.rb +26 -12
  170. data/spec/models/email_validation_status_spec.rb +5 -3
  171. data/spec/models/email_view_spec.rb +8 -6
  172. data/spec/models/emails_payload_spec.rb +7 -5
  173. data/spec/models/encoding_type_spec.rb +5 -3
  174. data/spec/models/event_type_spec.rb +5 -3
  175. data/spec/models/events_order_by_spec.rb +5 -3
  176. data/spec/models/export_file_formats_spec.rb +5 -3
  177. data/spec/models/export_link_spec.rb +7 -5
  178. data/spec/models/export_status_spec.rb +5 -3
  179. data/spec/models/file_info_spec.rb +10 -8
  180. data/spec/models/file_payload_spec.rb +8 -6
  181. data/spec/models/file_upload_result_spec.rb +7 -5
  182. data/spec/models/inbound_payload_spec.rb +11 -9
  183. data/spec/models/inbound_route_action_type_spec.rb +5 -3
  184. data/spec/models/inbound_route_filter_type_spec.rb +5 -3
  185. data/spec/models/inbound_route_spec.rb +12 -10
  186. data/spec/models/list_payload_spec.rb +8 -6
  187. data/spec/models/list_update_payload_spec.rb +7 -5
  188. data/spec/models/log_job_status_spec.rb +5 -3
  189. data/spec/models/log_status_summary_spec.rb +18 -16
  190. data/spec/models/merge_email_payload_spec.rb +8 -6
  191. data/spec/models/message_attachment_spec.rb +14 -6
  192. data/spec/models/message_category_spec.rb +5 -3
  193. data/spec/models/new_api_key_spec.rb +12 -10
  194. data/spec/models/new_smtp_credentials_spec.rb +12 -10
  195. data/spec/models/options_spec.rb +11 -9
  196. data/spec/models/recipient_event_spec.rb +18 -16
  197. data/spec/models/segment_payload_spec.rb +7 -5
  198. data/spec/models/segment_spec.rb +7 -5
  199. data/spec/models/smtp_credentials_payload_spec.rb +9 -7
  200. data/spec/models/smtp_credentials_spec.rb +11 -9
  201. data/spec/models/sort_order_item_spec.rb +7 -5
  202. data/spec/models/split_optimization_type_spec.rb +5 -3
  203. data/spec/models/split_options_spec.rb +7 -5
  204. data/spec/models/sub_account_info_spec.rb +14 -12
  205. data/spec/models/subaccount_email_credits_payload_spec.rb +7 -5
  206. data/spec/models/subaccount_email_settings_payload_spec.rb +17 -9
  207. data/spec/models/subaccount_email_settings_spec.rb +18 -10
  208. data/spec/models/subaccount_payload_spec.rb +9 -7
  209. data/spec/models/subaccount_settings_info_payload_spec.rb +6 -4
  210. data/spec/models/subaccount_settings_info_spec.rb +6 -4
  211. data/spec/models/suppression_spec.rb +9 -7
  212. data/spec/models/template_payload_spec.rb +9 -7
  213. data/spec/models/template_scope_spec.rb +5 -3
  214. data/spec/models/template_spec.rb +11 -9
  215. data/spec/models/template_type_spec.rb +5 -3
  216. data/spec/models/transactional_recipient_spec.rb +8 -6
  217. data/spec/models/utm_spec.rb +9 -7
  218. data/spec/models/verification_file_result_details_spec.rb +12 -10
  219. data/spec/models/verification_file_result_spec.rb +11 -9
  220. data/spec/models/verification_status_spec.rb +5 -3
  221. data/spec/spec_helper.rb +1 -1
  222. metadata +91 -99
  223. data/docs/ContactHistEventType.md +0 -15
  224. data/docs/ContactHistory.md +0 -30
  225. data/docs/TemplateScopeType.md +0 -15
  226. data/lib/ElasticEmail/models/contact_hist_event_type.rb +0 -49
  227. data/lib/ElasticEmail/models/template_scope_type.rb +0 -38
  228. data/spec/api_client_spec.rb +0 -226
  229. data/spec/configuration_spec.rb +0 -42
  230. data/spec/models/contact_hist_event_type_spec.rb +0 -28
  231. data/spec/models/contact_history_spec.rb +0 -70
  232. 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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -108,6 +108,7 @@ module ElasticEmail
108
108
  # Show invalid properties with the reasons. Usually used together with valid?
109
109
  # @return Array for valid properties with the reasons
110
110
  def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
112
  invalid_properties = Array.new
112
113
  invalid_properties
113
114
  end
@@ -115,6 +116,7 @@ module ElasticEmail
115
116
  # Check to see if the all the properties in the model are valid
116
117
  # @return true if the model is valid
117
118
  def valid?
119
+ warn '[DEPRECATED] the `valid?` method is obsolete'
118
120
  true
119
121
  end
120
122
 
@@ -144,37 +146,30 @@ module ElasticEmail
144
146
  # @param [Hash] attributes Model attributes in the form of hash
145
147
  # @return [Object] Returns the model itself
146
148
  def self.build_from_hash(attributes)
147
- new.build_from_hash(attributes)
148
- end
149
-
150
- # Builds the object from hash
151
- # @param [Hash] attributes Model attributes in the form of hash
152
- # @return [Object] Returns the model itself
153
- def build_from_hash(attributes)
154
149
  return nil unless attributes.is_a?(Hash)
155
150
  attributes = attributes.transform_keys(&:to_sym)
156
- self.class.openapi_types.each_pair do |key, type|
157
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
158
- self.send("#{key}=", nil)
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
159
155
  elsif type =~ /\AArray<(.*)>/i
160
156
  # check to ensure the input is an array given that the attribute
161
157
  # is documented as an array but the input is not
162
- if attributes[self.class.attribute_map[key]].is_a?(Array)
163
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
158
+ if attributes[attribute_map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
160
  end
165
- elsif !attributes[self.class.attribute_map[key]].nil?
166
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
161
+ elsif !attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
163
  end
168
164
  end
169
-
170
- self
165
+ new(transformed_hash)
171
166
  end
172
167
 
173
168
  # Deserializes the data based on type
174
169
  # @param string type Data type
175
170
  # @param string value Value to be deserialized
176
171
  # @return [Object] Deserialized data
177
- def _deserialize(type, value)
172
+ def self._deserialize(type, value)
178
173
  case type.to_sym
179
174
  when :Time
180
175
  Time.parse(value)
@@ -209,7 +204,7 @@ module ElasticEmail
209
204
  else # model
210
205
  # models (e.g. Pet) or oneOf
211
206
  klass = ElasticEmail.const_get(type)
212
- 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)
213
208
  end
214
209
  end
215
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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -183,6 +183,7 @@ module ElasticEmail
183
183
  # Show invalid properties with the reasons. Usually used together with valid?
184
184
  # @return Array for valid properties with the reasons
185
185
  def list_invalid_properties
186
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
186
187
  invalid_properties = Array.new
187
188
  invalid_properties
188
189
  end
@@ -190,6 +191,7 @@ module ElasticEmail
190
191
  # Check to see if the all the properties in the model are valid
191
192
  # @return true if the model is valid
192
193
  def valid?
194
+ warn '[DEPRECATED] the `valid?` method is obsolete'
193
195
  true
194
196
  end
195
197
 
@@ -227,37 +229,30 @@ module ElasticEmail
227
229
  # @param [Hash] attributes Model attributes in the form of hash
228
230
  # @return [Object] Returns the model itself
229
231
  def self.build_from_hash(attributes)
230
- new.build_from_hash(attributes)
231
- end
232
-
233
- # Builds the object from hash
234
- # @param [Hash] attributes Model attributes in the form of hash
235
- # @return [Object] Returns the model itself
236
- def build_from_hash(attributes)
237
232
  return nil unless attributes.is_a?(Hash)
238
233
  attributes = attributes.transform_keys(&:to_sym)
239
- self.class.openapi_types.each_pair do |key, type|
240
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
241
- self.send("#{key}=", nil)
234
+ transformed_hash = {}
235
+ openapi_types.each_pair do |key, type|
236
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
237
+ transformed_hash["#{key}"] = nil
242
238
  elsif type =~ /\AArray<(.*)>/i
243
239
  # check to ensure the input is an array given that the attribute
244
240
  # is documented as an array but the input is not
245
- if attributes[self.class.attribute_map[key]].is_a?(Array)
246
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
241
+ if attributes[attribute_map[key]].is_a?(Array)
242
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
247
243
  end
248
- elsif !attributes[self.class.attribute_map[key]].nil?
249
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
244
+ elsif !attributes[attribute_map[key]].nil?
245
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
250
246
  end
251
247
  end
252
-
253
- self
248
+ new(transformed_hash)
254
249
  end
255
250
 
256
251
  # Deserializes the data based on type
257
252
  # @param string type Data type
258
253
  # @param string value Value to be deserialized
259
254
  # @return [Object] Deserialized data
260
- def _deserialize(type, value)
255
+ def self._deserialize(type, value)
261
256
  case type.to_sym
262
257
  when :Time
263
258
  Time.parse(value)
@@ -292,7 +287,7 @@ module ElasticEmail
292
287
  else # model
293
288
  # models (e.g. Pet) or oneOf
294
289
  klass = ElasticEmail.const_get(type)
295
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
290
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
296
291
  end
297
292
  end
298
293
 
@@ -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
- OpenAPI Generator version: 6.3.0
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
 
@@ -205,37 +207,30 @@ module ElasticEmail
205
207
  # @param [Hash] attributes Model attributes in the form of hash
206
208
  # @return [Object] Returns the model itself
207
209
  def self.build_from_hash(attributes)
208
- new.build_from_hash(attributes)
209
- end
210
-
211
- # Builds the object from hash
212
- # @param [Hash] attributes Model attributes in the form of hash
213
- # @return [Object] Returns the model itself
214
- def build_from_hash(attributes)
215
210
  return nil unless attributes.is_a?(Hash)
216
211
  attributes = attributes.transform_keys(&:to_sym)
217
- self.class.openapi_types.each_pair do |key, type|
218
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
219
- self.send("#{key}=", nil)
212
+ transformed_hash = {}
213
+ openapi_types.each_pair do |key, type|
214
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
215
+ transformed_hash["#{key}"] = nil
220
216
  elsif type =~ /\AArray<(.*)>/i
221
217
  # check to ensure the input is an array given that the attribute
222
218
  # is documented as an array but the input is not
223
- if attributes[self.class.attribute_map[key]].is_a?(Array)
224
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
219
+ if attributes[attribute_map[key]].is_a?(Array)
220
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
225
221
  end
226
- elsif !attributes[self.class.attribute_map[key]].nil?
227
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
222
+ elsif !attributes[attribute_map[key]].nil?
223
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
228
224
  end
229
225
  end
230
-
231
- self
226
+ new(transformed_hash)
232
227
  end
233
228
 
234
229
  # Deserializes the data based on type
235
230
  # @param string type Data type
236
231
  # @param string value Value to be deserialized
237
232
  # @return [Object] Deserialized data
238
- def _deserialize(type, value)
233
+ def self._deserialize(type, value)
239
234
  case type.to_sym
240
235
  when :Time
241
236
  Time.parse(value)
@@ -270,7 +265,7 @@ module ElasticEmail
270
265
  else # model
271
266
  # models (e.g. Pet) or oneOf
272
267
  klass = ElasticEmail.const_get(type)
273
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
268
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
274
269
  end
275
270
  end
276
271
 
@@ -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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -105,6 +105,8 @@ module ElasticEmail
105
105
 
106
106
  if attributes.key?(:'email')
107
107
  self.email = attributes[:'email']
108
+ else
109
+ self.email = nil
108
110
  end
109
111
 
110
112
  if attributes.key?(:'status')
@@ -135,6 +137,7 @@ module ElasticEmail
135
137
  # Show invalid properties with the reasons. Usually used together with valid?
136
138
  # @return Array for valid properties with the reasons
137
139
  def list_invalid_properties
140
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
138
141
  invalid_properties = Array.new
139
142
  if @email.nil?
140
143
  invalid_properties.push('invalid value for "email", email cannot be nil.')
@@ -146,6 +149,7 @@ module ElasticEmail
146
149
  # Check to see if the all the properties in the model are valid
147
150
  # @return true if the model is valid
148
151
  def valid?
152
+ warn '[DEPRECATED] the `valid?` method is obsolete'
149
153
  return false if @email.nil?
150
154
  true
151
155
  end
@@ -179,37 +183,30 @@ module ElasticEmail
179
183
  # @param [Hash] attributes Model attributes in the form of hash
180
184
  # @return [Object] Returns the model itself
181
185
  def self.build_from_hash(attributes)
182
- new.build_from_hash(attributes)
183
- end
184
-
185
- # Builds the object from hash
186
- # @param [Hash] attributes Model attributes in the form of hash
187
- # @return [Object] Returns the model itself
188
- def build_from_hash(attributes)
189
186
  return nil unless attributes.is_a?(Hash)
190
187
  attributes = attributes.transform_keys(&:to_sym)
191
- self.class.openapi_types.each_pair do |key, type|
192
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
193
- self.send("#{key}=", nil)
188
+ transformed_hash = {}
189
+ openapi_types.each_pair do |key, type|
190
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
191
+ transformed_hash["#{key}"] = nil
194
192
  elsif type =~ /\AArray<(.*)>/i
195
193
  # check to ensure the input is an array given that the attribute
196
194
  # is documented as an array but the input is not
197
- if attributes[self.class.attribute_map[key]].is_a?(Array)
198
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
195
+ if attributes[attribute_map[key]].is_a?(Array)
196
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
199
197
  end
200
- elsif !attributes[self.class.attribute_map[key]].nil?
201
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
198
+ elsif !attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
202
200
  end
203
201
  end
204
-
205
- self
202
+ new(transformed_hash)
206
203
  end
207
204
 
208
205
  # Deserializes the data based on type
209
206
  # @param string type Data type
210
207
  # @param string value Value to be deserialized
211
208
  # @return [Object] Deserialized data
212
- def _deserialize(type, value)
209
+ def self._deserialize(type, value)
213
210
  case type.to_sym
214
211
  when :Time
215
212
  Time.parse(value)
@@ -244,7 +241,7 @@ module ElasticEmail
244
241
  else # model
245
242
  # models (e.g. Pet) or oneOf
246
243
  klass = ElasticEmail.const_get(type)
247
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
244
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
245
  end
249
246
  end
250
247
 
@@ -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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -86,6 +86,7 @@ module ElasticEmail
86
86
  # Show invalid properties with the reasons. Usually used together with valid?
87
87
  # @return Array for valid properties with the reasons
88
88
  def list_invalid_properties
89
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
90
  invalid_properties = Array.new
90
91
  invalid_properties
91
92
  end
@@ -93,6 +94,7 @@ module ElasticEmail
93
94
  # Check to see if the all the properties in the model are valid
94
95
  # @return true if the model is valid
95
96
  def valid?
97
+ warn '[DEPRECATED] the `valid?` method is obsolete'
96
98
  true
97
99
  end
98
100
 
@@ -122,37 +124,30 @@ module ElasticEmail
122
124
  # @param [Hash] attributes Model attributes in the form of hash
123
125
  # @return [Object] Returns the model itself
124
126
  def self.build_from_hash(attributes)
125
- new.build_from_hash(attributes)
126
- end
127
-
128
- # Builds the object from hash
129
- # @param [Hash] attributes Model attributes in the form of hash
130
- # @return [Object] Returns the model itself
131
- def build_from_hash(attributes)
132
127
  return nil unless attributes.is_a?(Hash)
133
128
  attributes = attributes.transform_keys(&:to_sym)
134
- self.class.openapi_types.each_pair do |key, type|
135
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
136
- self.send("#{key}=", nil)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
137
133
  elsif type =~ /\AArray<(.*)>/i
138
134
  # check to ensure the input is an array given that the attribute
139
135
  # is documented as an array but the input is not
140
- if attributes[self.class.attribute_map[key]].is_a?(Array)
141
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
138
  end
143
- elsif !attributes[self.class.attribute_map[key]].nil?
144
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
141
  end
146
142
  end
147
-
148
- self
143
+ new(transformed_hash)
149
144
  end
150
145
 
151
146
  # Deserializes the data based on type
152
147
  # @param string type Data type
153
148
  # @param string value Value to be deserialized
154
149
  # @return [Object] Deserialized data
155
- def _deserialize(type, value)
150
+ def self._deserialize(type, value)
156
151
  case type.to_sym
157
152
  when :Time
158
153
  Time.parse(value)
@@ -187,7 +182,7 @@ module ElasticEmail
187
182
  else # model
188
183
  # models (e.g. Pet) or oneOf
189
184
  klass = ElasticEmail.const_get(type)
190
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
191
186
  end
192
187
  end
193
188
 
@@ -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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -95,6 +95,7 @@ module ElasticEmail
95
95
  # Show invalid properties with the reasons. Usually used together with valid?
96
96
  # @return Array for valid properties with the reasons
97
97
  def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
99
  invalid_properties = Array.new
99
100
  invalid_properties
100
101
  end
@@ -102,6 +103,7 @@ module ElasticEmail
102
103
  # Check to see if the all the properties in the model are valid
103
104
  # @return true if the model is valid
104
105
  def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
107
  true
106
108
  end
107
109
 
@@ -132,37 +134,30 @@ module ElasticEmail
132
134
  # @param [Hash] attributes Model attributes in the form of hash
133
135
  # @return [Object] Returns the model itself
134
136
  def self.build_from_hash(attributes)
135
- new.build_from_hash(attributes)
136
- end
137
-
138
- # Builds the object from hash
139
- # @param [Hash] attributes Model attributes in the form of hash
140
- # @return [Object] Returns the model itself
141
- def build_from_hash(attributes)
142
137
  return nil unless attributes.is_a?(Hash)
143
138
  attributes = attributes.transform_keys(&:to_sym)
144
- self.class.openapi_types.each_pair do |key, type|
145
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
146
- self.send("#{key}=", nil)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
147
143
  elsif type =~ /\AArray<(.*)>/i
148
144
  # check to ensure the input is an array given that the attribute
149
145
  # is documented as an array but the input is not
150
- if attributes[self.class.attribute_map[key]].is_a?(Array)
151
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
152
148
  end
153
- elsif !attributes[self.class.attribute_map[key]].nil?
154
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
155
151
  end
156
152
  end
157
-
158
- self
153
+ new(transformed_hash)
159
154
  end
160
155
 
161
156
  # Deserializes the data based on type
162
157
  # @param string type Data type
163
158
  # @param string value Value to be deserialized
164
159
  # @return [Object] Deserialized data
165
- def _deserialize(type, value)
160
+ def self._deserialize(type, value)
166
161
  case type.to_sym
167
162
  when :Time
168
163
  Time.parse(value)
@@ -197,7 +192,7 @@ module ElasticEmail
197
192
  else # model
198
193
  # models (e.g. Pet) or oneOf
199
194
  klass = ElasticEmail.const_get(type)
200
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
195
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
196
  end
202
197
  end
203
198
 
@@ -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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -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
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -147,6 +147,8 @@ module ElasticEmail
147
147
 
148
148
  if attributes.key?(:'from')
149
149
  self.from = attributes[:'from']
150
+ else
151
+ self.from = nil
150
152
  end
151
153
 
152
154
  if attributes.key?(:'reply_to')
@@ -175,13 +177,20 @@ module ElasticEmail
175
177
  # Show invalid properties with the reasons. Usually used together with valid?
176
178
  # @return Array for valid properties with the reasons
177
179
  def list_invalid_properties
180
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
178
181
  invalid_properties = Array.new
182
+ if @from.nil?
183
+ invalid_properties.push('invalid value for "from", from cannot be nil.')
184
+ end
185
+
179
186
  invalid_properties
180
187
  end
181
188
 
182
189
  # Check to see if the all the properties in the model are valid
183
190
  # @return true if the model is valid
184
191
  def valid?
192
+ warn '[DEPRECATED] the `valid?` method is obsolete'
193
+ return false if @from.nil?
185
194
  true
186
195
  end
187
196
 
@@ -220,37 +229,30 @@ module ElasticEmail
220
229
  # @param [Hash] attributes Model attributes in the form of hash
221
230
  # @return [Object] Returns the model itself
222
231
  def self.build_from_hash(attributes)
223
- new.build_from_hash(attributes)
224
- end
225
-
226
- # Builds the object from hash
227
- # @param [Hash] attributes Model attributes in the form of hash
228
- # @return [Object] Returns the model itself
229
- def build_from_hash(attributes)
230
232
  return nil unless attributes.is_a?(Hash)
231
233
  attributes = attributes.transform_keys(&:to_sym)
232
- self.class.openapi_types.each_pair do |key, type|
233
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
234
- self.send("#{key}=", nil)
234
+ transformed_hash = {}
235
+ openapi_types.each_pair do |key, type|
236
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
237
+ transformed_hash["#{key}"] = nil
235
238
  elsif type =~ /\AArray<(.*)>/i
236
239
  # check to ensure the input is an array given that the attribute
237
240
  # is documented as an array but the input is not
238
- if attributes[self.class.attribute_map[key]].is_a?(Array)
239
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
241
+ if attributes[attribute_map[key]].is_a?(Array)
242
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
240
243
  end
241
- elsif !attributes[self.class.attribute_map[key]].nil?
242
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
244
+ elsif !attributes[attribute_map[key]].nil?
245
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
243
246
  end
244
247
  end
245
-
246
- self
248
+ new(transformed_hash)
247
249
  end
248
250
 
249
251
  # Deserializes the data based on type
250
252
  # @param string type Data type
251
253
  # @param string value Value to be deserialized
252
254
  # @return [Object] Deserialized data
253
- def _deserialize(type, value)
255
+ def self._deserialize(type, value)
254
256
  case type.to_sym
255
257
  when :Time
256
258
  Time.parse(value)
@@ -285,7 +287,7 @@ module ElasticEmail
285
287
  else # model
286
288
  # models (e.g. Pet) or oneOf
287
289
  klass = ElasticEmail.const_get(type)
288
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
290
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
289
291
  end
290
292
  end
291
293