ElasticEmail 4.0.23 → 4.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/ElasticEmail.gemspec +2 -1
  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 +10 -18
  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
 
@@ -175,6 +175,7 @@ module ElasticEmail
175
175
  # Show invalid properties with the reasons. Usually used together with valid?
176
176
  # @return Array for valid properties with the reasons
177
177
  def list_invalid_properties
178
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
178
179
  invalid_properties = Array.new
179
180
  invalid_properties
180
181
  end
@@ -182,6 +183,7 @@ module ElasticEmail
182
183
  # Check to see if the all the properties in the model are valid
183
184
  # @return true if the model is valid
184
185
  def valid?
186
+ warn '[DEPRECATED] the `valid?` method is obsolete'
185
187
  true
186
188
  end
187
189
 
@@ -221,37 +223,30 @@ module ElasticEmail
221
223
  # @param [Hash] attributes Model attributes in the form of hash
222
224
  # @return [Object] Returns the model itself
223
225
  def self.build_from_hash(attributes)
224
- new.build_from_hash(attributes)
225
- end
226
-
227
- # Builds the object from hash
228
- # @param [Hash] attributes Model attributes in the form of hash
229
- # @return [Object] Returns the model itself
230
- def build_from_hash(attributes)
231
226
  return nil unless attributes.is_a?(Hash)
232
227
  attributes = attributes.transform_keys(&:to_sym)
233
- self.class.openapi_types.each_pair do |key, type|
234
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
235
- self.send("#{key}=", nil)
228
+ transformed_hash = {}
229
+ openapi_types.each_pair do |key, type|
230
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
231
+ transformed_hash["#{key}"] = nil
236
232
  elsif type =~ /\AArray<(.*)>/i
237
233
  # check to ensure the input is an array given that the attribute
238
234
  # is documented as an array but the input is not
239
- if attributes[self.class.attribute_map[key]].is_a?(Array)
240
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
235
+ if attributes[attribute_map[key]].is_a?(Array)
236
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
241
237
  end
242
- elsif !attributes[self.class.attribute_map[key]].nil?
243
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
238
+ elsif !attributes[attribute_map[key]].nil?
239
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
244
240
  end
245
241
  end
246
-
247
- self
242
+ new(transformed_hash)
248
243
  end
249
244
 
250
245
  # Deserializes the data based on type
251
246
  # @param string type Data type
252
247
  # @param string value Value to be deserialized
253
248
  # @return [Object] Deserialized data
254
- def _deserialize(type, value)
249
+ def self._deserialize(type, value)
255
250
  case type.to_sym
256
251
  when :Time
257
252
  Time.parse(value)
@@ -286,7 +281,7 @@ module ElasticEmail
286
281
  else # model
287
282
  # models (e.g. Pet) or oneOf
288
283
  klass = ElasticEmail.const_get(type)
289
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
284
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
290
285
  end
291
286
  end
292
287
 
@@ -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
 
@@ -67,10 +67,14 @@ module ElasticEmail
67
67
 
68
68
  if attributes.key?(:'merge_file')
69
69
  self.merge_file = attributes[:'merge_file']
70
+ else
71
+ self.merge_file = nil
70
72
  end
71
73
 
72
74
  if attributes.key?(:'content')
73
75
  self.content = attributes[:'content']
76
+ else
77
+ self.content = nil
74
78
  end
75
79
 
76
80
  if attributes.key?(:'options')
@@ -81,18 +85,25 @@ module ElasticEmail
81
85
  # Show invalid properties with the reasons. Usually used together with valid?
82
86
  # @return Array for valid properties with the reasons
83
87
  def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
89
  invalid_properties = Array.new
85
90
  if @merge_file.nil?
86
91
  invalid_properties.push('invalid value for "merge_file", merge_file cannot be nil.')
87
92
  end
88
93
 
94
+ if @content.nil?
95
+ invalid_properties.push('invalid value for "content", content cannot be nil.')
96
+ end
97
+
89
98
  invalid_properties
90
99
  end
91
100
 
92
101
  # Check to see if the all the properties in the model are valid
93
102
  # @return true if the model is valid
94
103
  def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
105
  return false if @merge_file.nil?
106
+ return false if @content.nil?
96
107
  true
97
108
  end
98
109
 
@@ -122,37 +133,30 @@ module ElasticEmail
122
133
  # @param [Hash] attributes Model attributes in the form of hash
123
134
  # @return [Object] Returns the model itself
124
135
  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
136
  return nil unless attributes.is_a?(Hash)
133
137
  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)
138
+ transformed_hash = {}
139
+ openapi_types.each_pair do |key, type|
140
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
137
142
  elsif type =~ /\AArray<(.*)>/i
138
143
  # check to ensure the input is an array given that the attribute
139
144
  # 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) })
145
+ if attributes[attribute_map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
147
  end
143
- elsif !attributes[self.class.attribute_map[key]].nil?
144
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
+ elsif !attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
150
  end
146
151
  end
147
-
148
- self
152
+ new(transformed_hash)
149
153
  end
150
154
 
151
155
  # Deserializes the data based on type
152
156
  # @param string type Data type
153
157
  # @param string value Value to be deserialized
154
158
  # @return [Object] Deserialized data
155
- def _deserialize(type, value)
159
+ def self._deserialize(type, value)
156
160
  case type.to_sym
157
161
  when :Time
158
162
  Time.parse(value)
@@ -187,7 +191,7 @@ module ElasticEmail
187
191
  else # model
188
192
  # models (e.g. Pet) or oneOf
189
193
  klass = ElasticEmail.const_get(type)
190
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
194
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
191
195
  end
192
196
  end
193
197
 
@@ -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
 
@@ -75,10 +75,14 @@ module ElasticEmail
75
75
 
76
76
  if attributes.key?(:'binary_content')
77
77
  self.binary_content = attributes[:'binary_content']
78
+ else
79
+ self.binary_content = nil
78
80
  end
79
81
 
80
82
  if attributes.key?(:'name')
81
83
  self.name = attributes[:'name']
84
+ else
85
+ self.name = nil
82
86
  end
83
87
 
84
88
  if attributes.key?(:'content_type')
@@ -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 @binary_content.nil?
98
103
  invalid_properties.push('invalid value for "binary_content", binary_content 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 @binary_content.nil?
112
118
  return false if @name.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
- self.class.openapi_types.each_pair do |key, type|
153
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
- 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
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[self.class.attribute_map[key]].is_a?(Array)
159
- 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) }
160
160
  end
161
- elsif !attributes[self.class.attribute_map[key]].nil?
162
- 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]])
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
- 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
 
@@ -127,6 +127,7 @@ module ElasticEmail
127
127
  # Show invalid properties with the reasons. Usually used together with valid?
128
128
  # @return Array for valid properties with the reasons
129
129
  def list_invalid_properties
130
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
130
131
  invalid_properties = Array.new
131
132
  invalid_properties
132
133
  end
@@ -134,6 +135,7 @@ module ElasticEmail
134
135
  # Check to see if the all the properties in the model are valid
135
136
  # @return true if the model is valid
136
137
  def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
137
139
  true
138
140
  end
139
141
 
@@ -167,37 +169,30 @@ module ElasticEmail
167
169
  # @param [Hash] attributes Model attributes in the form of hash
168
170
  # @return [Object] Returns the model itself
169
171
  def self.build_from_hash(attributes)
170
- new.build_from_hash(attributes)
171
- end
172
-
173
- # Builds the object from hash
174
- # @param [Hash] attributes Model attributes in the form of hash
175
- # @return [Object] Returns the model itself
176
- def build_from_hash(attributes)
177
172
  return nil unless attributes.is_a?(Hash)
178
173
  attributes = attributes.transform_keys(&:to_sym)
179
- self.class.openapi_types.each_pair do |key, type|
180
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
181
- self.send("#{key}=", nil)
174
+ transformed_hash = {}
175
+ openapi_types.each_pair do |key, type|
176
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = nil
182
178
  elsif type =~ /\AArray<(.*)>/i
183
179
  # check to ensure the input is an array given that the attribute
184
180
  # is documented as an array but the input is not
185
- if attributes[self.class.attribute_map[key]].is_a?(Array)
186
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
181
+ if attributes[attribute_map[key]].is_a?(Array)
182
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
187
183
  end
188
- elsif !attributes[self.class.attribute_map[key]].nil?
189
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
184
+ elsif !attributes[attribute_map[key]].nil?
185
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
190
186
  end
191
187
  end
192
-
193
- self
188
+ new(transformed_hash)
194
189
  end
195
190
 
196
191
  # Deserializes the data based on type
197
192
  # @param string type Data type
198
193
  # @param string value Value to be deserialized
199
194
  # @return [Object] Deserialized data
200
- def _deserialize(type, value)
195
+ def self._deserialize(type, value)
201
196
  case type.to_sym
202
197
  when :Time
203
198
  Time.parse(value)
@@ -232,7 +227,7 @@ module ElasticEmail
232
227
  else # model
233
228
  # models (e.g. Pet) or oneOf
234
229
  klass = ElasticEmail.const_get(type)
235
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
230
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
236
231
  end
237
232
  end
238
233
 
@@ -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
 
@@ -148,6 +148,7 @@ module ElasticEmail
148
148
  # Show invalid properties with the reasons. Usually used together with valid?
149
149
  # @return Array for valid properties with the reasons
150
150
  def list_invalid_properties
151
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
151
152
  invalid_properties = Array.new
152
153
  invalid_properties
153
154
  end
@@ -155,6 +156,7 @@ module ElasticEmail
155
156
  # Check to see if the all the properties in the model are valid
156
157
  # @return true if the model is valid
157
158
  def valid?
159
+ warn '[DEPRECATED] the `valid?` method is obsolete'
158
160
  true
159
161
  end
160
162
 
@@ -188,37 +190,30 @@ module ElasticEmail
188
190
  # @param [Hash] attributes Model attributes in the form of hash
189
191
  # @return [Object] Returns the model itself
190
192
  def self.build_from_hash(attributes)
191
- new.build_from_hash(attributes)
192
- end
193
-
194
- # Builds the object from hash
195
- # @param [Hash] attributes Model attributes in the form of hash
196
- # @return [Object] Returns the model itself
197
- def build_from_hash(attributes)
198
193
  return nil unless attributes.is_a?(Hash)
199
194
  attributes = attributes.transform_keys(&:to_sym)
200
- self.class.openapi_types.each_pair do |key, type|
201
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
202
- self.send("#{key}=", nil)
195
+ transformed_hash = {}
196
+ openapi_types.each_pair do |key, type|
197
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
198
+ transformed_hash["#{key}"] = nil
203
199
  elsif type =~ /\AArray<(.*)>/i
204
200
  # check to ensure the input is an array given that the attribute
205
201
  # is documented as an array but the input is not
206
- if attributes[self.class.attribute_map[key]].is_a?(Array)
207
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
202
+ if attributes[attribute_map[key]].is_a?(Array)
203
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
208
204
  end
209
- elsif !attributes[self.class.attribute_map[key]].nil?
210
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
205
+ elsif !attributes[attribute_map[key]].nil?
206
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
211
207
  end
212
208
  end
213
-
214
- self
209
+ new(transformed_hash)
215
210
  end
216
211
 
217
212
  # Deserializes the data based on type
218
213
  # @param string type Data type
219
214
  # @param string value Value to be deserialized
220
215
  # @return [Object] Deserialized data
221
- def _deserialize(type, value)
216
+ def self._deserialize(type, value)
222
217
  case type.to_sym
223
218
  when :Time
224
219
  Time.parse(value)
@@ -253,7 +248,7 @@ module ElasticEmail
253
248
  else # model
254
249
  # models (e.g. Pet) or oneOf
255
250
  klass = ElasticEmail.const_get(type)
256
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
251
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
257
252
  end
258
253
  end
259
254
 
@@ -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
 
@@ -88,6 +88,8 @@ module ElasticEmail
88
88
  def self.openapi_nullable
89
89
  Set.new([
90
90
  :'time_offset',
91
+ :'track_opens',
92
+ :'track_clicks'
91
93
  ])
92
94
  end
93
95
 
@@ -136,6 +138,7 @@ module ElasticEmail
136
138
  # Show invalid properties with the reasons. Usually used together with valid?
137
139
  # @return Array for valid properties with the reasons
138
140
  def list_invalid_properties
141
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
139
142
  invalid_properties = Array.new
140
143
  invalid_properties
141
144
  end
@@ -143,6 +146,7 @@ module ElasticEmail
143
146
  # Check to see if the all the properties in the model are valid
144
147
  # @return true if the model is valid
145
148
  def valid?
149
+ warn '[DEPRECATED] the `valid?` method is obsolete'
146
150
  true
147
151
  end
148
152
 
@@ -175,37 +179,30 @@ module ElasticEmail
175
179
  # @param [Hash] attributes Model attributes in the form of hash
176
180
  # @return [Object] Returns the model itself
177
181
  def self.build_from_hash(attributes)
178
- new.build_from_hash(attributes)
179
- end
180
-
181
- # Builds the object from hash
182
- # @param [Hash] attributes Model attributes in the form of hash
183
- # @return [Object] Returns the model itself
184
- def build_from_hash(attributes)
185
182
  return nil unless attributes.is_a?(Hash)
186
183
  attributes = attributes.transform_keys(&:to_sym)
187
- self.class.openapi_types.each_pair do |key, type|
188
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
189
- self.send("#{key}=", nil)
184
+ transformed_hash = {}
185
+ openapi_types.each_pair do |key, type|
186
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
187
+ transformed_hash["#{key}"] = nil
190
188
  elsif type =~ /\AArray<(.*)>/i
191
189
  # check to ensure the input is an array given that the attribute
192
190
  # is documented as an array but the input is not
193
- if attributes[self.class.attribute_map[key]].is_a?(Array)
194
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
191
+ if attributes[attribute_map[key]].is_a?(Array)
192
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
195
193
  end
196
- elsif !attributes[self.class.attribute_map[key]].nil?
197
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
194
+ elsif !attributes[attribute_map[key]].nil?
195
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
198
196
  end
199
197
  end
200
-
201
- self
198
+ new(transformed_hash)
202
199
  end
203
200
 
204
201
  # Deserializes the data based on type
205
202
  # @param string type Data type
206
203
  # @param string value Value to be deserialized
207
204
  # @return [Object] Deserialized data
208
- def _deserialize(type, value)
205
+ def self._deserialize(type, value)
209
206
  case type.to_sym
210
207
  when :Time
211
208
  Time.parse(value)
@@ -240,7 +237,7 @@ module ElasticEmail
240
237
  else # model
241
238
  # models (e.g. Pet) or oneOf
242
239
  klass = ElasticEmail.const_get(type)
243
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
240
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
244
241
  end
245
242
  end
246
243
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -200,6 +200,7 @@ module ElasticEmail
200
200
  # Show invalid properties with the reasons. Usually used together with valid?
201
201
  # @return Array for valid properties with the reasons
202
202
  def list_invalid_properties
203
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
203
204
  invalid_properties = Array.new
204
205
  invalid_properties
205
206
  end
@@ -207,6 +208,7 @@ module ElasticEmail
207
208
  # Check to see if the all the properties in the model are valid
208
209
  # @return true if the model is valid
209
210
  def valid?
211
+ warn '[DEPRECATED] the `valid?` method is obsolete'
210
212
  true
211
213
  end
212
214
 
@@ -246,37 +248,30 @@ module ElasticEmail
246
248
  # @param [Hash] attributes Model attributes in the form of hash
247
249
  # @return [Object] Returns the model itself
248
250
  def self.build_from_hash(attributes)
249
- new.build_from_hash(attributes)
250
- end
251
-
252
- # Builds the object from hash
253
- # @param [Hash] attributes Model attributes in the form of hash
254
- # @return [Object] Returns the model itself
255
- def build_from_hash(attributes)
256
251
  return nil unless attributes.is_a?(Hash)
257
252
  attributes = attributes.transform_keys(&:to_sym)
258
- self.class.openapi_types.each_pair do |key, type|
259
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
260
- self.send("#{key}=", nil)
253
+ transformed_hash = {}
254
+ openapi_types.each_pair do |key, type|
255
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
256
+ transformed_hash["#{key}"] = nil
261
257
  elsif type =~ /\AArray<(.*)>/i
262
258
  # check to ensure the input is an array given that the attribute
263
259
  # is documented as an array but the input is not
264
- if attributes[self.class.attribute_map[key]].is_a?(Array)
265
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
260
+ if attributes[attribute_map[key]].is_a?(Array)
261
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
266
262
  end
267
- elsif !attributes[self.class.attribute_map[key]].nil?
268
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
263
+ elsif !attributes[attribute_map[key]].nil?
264
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
269
265
  end
270
266
  end
271
-
272
- self
267
+ new(transformed_hash)
273
268
  end
274
269
 
275
270
  # Deserializes the data based on type
276
271
  # @param string type Data type
277
272
  # @param string value Value to be deserialized
278
273
  # @return [Object] Deserialized data
279
- def _deserialize(type, value)
274
+ def self._deserialize(type, value)
280
275
  case type.to_sym
281
276
  when :Time
282
277
  Time.parse(value)
@@ -311,7 +306,7 @@ module ElasticEmail
311
306
  else # model
312
307
  # models (e.g. Pet) or oneOf
313
308
  klass = ElasticEmail.const_get(type)
314
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
309
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
315
310
  end
316
311
  end
317
312