ElasticEmail 4.0.23 → 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 +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
 
@@ -105,6 +105,7 @@ module ElasticEmail
105
105
  # Show invalid properties with the reasons. Usually used together with valid?
106
106
  # @return Array for valid properties with the reasons
107
107
  def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
108
109
  invalid_properties = Array.new
109
110
  invalid_properties
110
111
  end
@@ -112,6 +113,7 @@ module ElasticEmail
112
113
  # Check to see if the all the properties in the model are valid
113
114
  # @return true if the model is valid
114
115
  def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
117
  true
116
118
  end
117
119
 
@@ -143,37 +145,30 @@ module ElasticEmail
143
145
  # @param [Hash] attributes Model attributes in the form of hash
144
146
  # @return [Object] Returns the model itself
145
147
  def self.build_from_hash(attributes)
146
- new.build_from_hash(attributes)
147
- end
148
-
149
- # Builds the object from hash
150
- # @param [Hash] attributes Model attributes in the form of hash
151
- # @return [Object] Returns the model itself
152
- def build_from_hash(attributes)
153
148
  return nil unless attributes.is_a?(Hash)
154
149
  attributes = attributes.transform_keys(&:to_sym)
155
- self.class.openapi_types.each_pair do |key, type|
156
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
157
- self.send("#{key}=", nil)
150
+ transformed_hash = {}
151
+ openapi_types.each_pair do |key, type|
152
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = nil
158
154
  elsif type =~ /\AArray<(.*)>/i
159
155
  # check to ensure the input is an array given that the attribute
160
156
  # is documented as an array but the input is not
161
- if attributes[self.class.attribute_map[key]].is_a?(Array)
162
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
157
+ if attributes[attribute_map[key]].is_a?(Array)
158
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
163
159
  end
164
- elsif !attributes[self.class.attribute_map[key]].nil?
165
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
+ elsif !attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
166
162
  end
167
163
  end
168
-
169
- self
164
+ new(transformed_hash)
170
165
  end
171
166
 
172
167
  # Deserializes the data based on type
173
168
  # @param string type Data type
174
169
  # @param string value Value to be deserialized
175
170
  # @return [Object] Deserialized data
176
- def _deserialize(type, value)
171
+ def self._deserialize(type, value)
177
172
  case type.to_sym
178
173
  when :Time
179
174
  Time.parse(value)
@@ -208,7 +203,7 @@ module ElasticEmail
208
203
  else # model
209
204
  # models (e.g. Pet) or oneOf
210
205
  klass = ElasticEmail.const_get(type)
211
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
212
207
  end
213
208
  end
214
209
 
@@ -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
 
@@ -70,6 +70,8 @@ module ElasticEmail
70
70
 
71
71
  if attributes.key?(:'binary_content')
72
72
  self.binary_content = attributes[:'binary_content']
73
+ else
74
+ self.binary_content = nil
73
75
  end
74
76
 
75
77
  if attributes.key?(:'name')
@@ -84,6 +86,7 @@ module ElasticEmail
84
86
  # Show invalid properties with the reasons. Usually used together with valid?
85
87
  # @return Array for valid properties with the reasons
86
88
  def list_invalid_properties
89
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
90
  invalid_properties = Array.new
88
91
  if @binary_content.nil?
89
92
  invalid_properties.push('invalid value for "binary_content", binary_content cannot be nil.')
@@ -95,6 +98,7 @@ module ElasticEmail
95
98
  # Check to see if the all the properties in the model are valid
96
99
  # @return true if the model is valid
97
100
  def valid?
101
+ warn '[DEPRECATED] the `valid?` method is obsolete'
98
102
  return false if @binary_content.nil?
99
103
  true
100
104
  end
@@ -125,37 +129,30 @@ module ElasticEmail
125
129
  # @param [Hash] attributes Model attributes in the form of hash
126
130
  # @return [Object] Returns the model itself
127
131
  def self.build_from_hash(attributes)
128
- new.build_from_hash(attributes)
129
- end
130
-
131
- # Builds the object from hash
132
- # @param [Hash] attributes Model attributes in the form of hash
133
- # @return [Object] Returns the model itself
134
- def build_from_hash(attributes)
135
132
  return nil unless attributes.is_a?(Hash)
136
133
  attributes = attributes.transform_keys(&:to_sym)
137
- self.class.openapi_types.each_pair do |key, type|
138
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
139
- self.send("#{key}=", nil)
134
+ transformed_hash = {}
135
+ openapi_types.each_pair do |key, type|
136
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = nil
140
138
  elsif type =~ /\AArray<(.*)>/i
141
139
  # check to ensure the input is an array given that the attribute
142
140
  # is documented as an array but the input is not
143
- if attributes[self.class.attribute_map[key]].is_a?(Array)
144
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
145
143
  end
146
- elsif !attributes[self.class.attribute_map[key]].nil?
147
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ elsif !attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
148
146
  end
149
147
  end
150
-
151
- self
148
+ new(transformed_hash)
152
149
  end
153
150
 
154
151
  # Deserializes the data based on type
155
152
  # @param string type Data type
156
153
  # @param string value Value to be deserialized
157
154
  # @return [Object] Deserialized data
158
- def _deserialize(type, value)
155
+ def self._deserialize(type, value)
159
156
  case type.to_sym
160
157
  when :Time
161
158
  Time.parse(value)
@@ -190,7 +187,7 @@ module ElasticEmail
190
187
  else # model
191
188
  # models (e.g. Pet) or oneOf
192
189
  klass = ElasticEmail.const_get(type)
193
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
194
191
  end
195
192
  end
196
193
 
@@ -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,6 +75,7 @@ module ElasticEmail
75
75
  # Show invalid properties with the reasons. Usually used together with valid?
76
76
  # @return Array for valid properties with the reasons
77
77
  def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
79
  invalid_properties = Array.new
79
80
  invalid_properties
80
81
  end
@@ -82,6 +83,7 @@ module ElasticEmail
82
83
  # Check to see if the all the properties in the model are valid
83
84
  # @return true if the model is valid
84
85
  def valid?
86
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
87
  true
86
88
  end
87
89
 
@@ -110,37 +112,30 @@ module ElasticEmail
110
112
  # @param [Hash] attributes Model attributes in the form of hash
111
113
  # @return [Object] Returns the model itself
112
114
  def self.build_from_hash(attributes)
113
- new.build_from_hash(attributes)
114
- end
115
-
116
- # Builds the object from hash
117
- # @param [Hash] attributes Model attributes in the form of hash
118
- # @return [Object] Returns the model itself
119
- def build_from_hash(attributes)
120
115
  return nil unless attributes.is_a?(Hash)
121
116
  attributes = attributes.transform_keys(&:to_sym)
122
- self.class.openapi_types.each_pair do |key, type|
123
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
117
+ transformed_hash = {}
118
+ openapi_types.each_pair do |key, type|
119
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = nil
125
121
  elsif type =~ /\AArray<(.*)>/i
126
122
  # check to ensure the input is an array given that the attribute
127
123
  # is documented as an array but the input is not
128
- if attributes[self.class.attribute_map[key]].is_a?(Array)
129
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ if attributes[attribute_map[key]].is_a?(Array)
125
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
126
  end
131
- elsif !attributes[self.class.attribute_map[key]].nil?
132
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ elsif !attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
129
  end
134
130
  end
135
-
136
- self
131
+ new(transformed_hash)
137
132
  end
138
133
 
139
134
  # Deserializes the data based on type
140
135
  # @param string type Data type
141
136
  # @param string value Value to be deserialized
142
137
  # @return [Object] Deserialized data
143
- def _deserialize(type, value)
138
+ def self._deserialize(type, value)
144
139
  case type.to_sym
145
140
  when :Time
146
141
  Time.parse(value)
@@ -175,7 +170,7 @@ module ElasticEmail
175
170
  else # model
176
171
  # models (e.g. Pet) or oneOf
177
172
  klass = ElasticEmail.const_get(type)
178
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
174
  end
180
175
  end
181
176
 
@@ -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,10 +105,14 @@ module ElasticEmail
105
105
 
106
106
  if attributes.key?(:'filter')
107
107
  self.filter = attributes[:'filter']
108
+ else
109
+ self.filter = nil
108
110
  end
109
111
 
110
112
  if attributes.key?(:'name')
111
113
  self.name = attributes[:'name']
114
+ else
115
+ self.name = nil
112
116
  end
113
117
 
114
118
  if attributes.key?(:'filter_type')
@@ -135,6 +139,7 @@ module ElasticEmail
135
139
  # Show invalid properties with the reasons. Usually used together with valid?
136
140
  # @return Array for valid properties with the reasons
137
141
  def list_invalid_properties
142
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
138
143
  invalid_properties = Array.new
139
144
  if @filter.nil?
140
145
  invalid_properties.push('invalid value for "filter", filter cannot be nil.')
@@ -158,6 +163,7 @@ module ElasticEmail
158
163
  # Check to see if the all the properties in the model are valid
159
164
  # @return true if the model is valid
160
165
  def valid?
166
+ warn '[DEPRECATED] the `valid?` method is obsolete'
161
167
  return false if @filter.nil?
162
168
  return false if @name.nil?
163
169
  return false if @filter_type.nil?
@@ -194,37 +200,30 @@ module ElasticEmail
194
200
  # @param [Hash] attributes Model attributes in the form of hash
195
201
  # @return [Object] Returns the model itself
196
202
  def self.build_from_hash(attributes)
197
- new.build_from_hash(attributes)
198
- end
199
-
200
- # Builds the object from hash
201
- # @param [Hash] attributes Model attributes in the form of hash
202
- # @return [Object] Returns the model itself
203
- def build_from_hash(attributes)
204
203
  return nil unless attributes.is_a?(Hash)
205
204
  attributes = attributes.transform_keys(&:to_sym)
206
- self.class.openapi_types.each_pair do |key, type|
207
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
208
- self.send("#{key}=", nil)
205
+ transformed_hash = {}
206
+ openapi_types.each_pair do |key, type|
207
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = nil
209
209
  elsif type =~ /\AArray<(.*)>/i
210
210
  # check to ensure the input is an array given that the attribute
211
211
  # is documented as an array but the input is not
212
- if attributes[self.class.attribute_map[key]].is_a?(Array)
213
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
212
+ if attributes[attribute_map[key]].is_a?(Array)
213
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
214
214
  end
215
- elsif !attributes[self.class.attribute_map[key]].nil?
216
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
215
+ elsif !attributes[attribute_map[key]].nil?
216
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
217
217
  end
218
218
  end
219
-
220
- self
219
+ new(transformed_hash)
221
220
  end
222
221
 
223
222
  # Deserializes the data based on type
224
223
  # @param string type Data type
225
224
  # @param string value Value to be deserialized
226
225
  # @return [Object] Deserialized data
227
- def _deserialize(type, value)
226
+ def self._deserialize(type, value)
228
227
  case type.to_sym
229
228
  when :Time
230
229
  Time.parse(value)
@@ -259,7 +258,7 @@ module ElasticEmail
259
258
  else # model
260
259
  # models (e.g. Pet) or oneOf
261
260
  klass = ElasticEmail.const_get(type)
262
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
261
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
263
262
  end
264
263
  end
265
264
 
@@ -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
 
@@ -143,6 +143,7 @@ module ElasticEmail
143
143
  # Show invalid properties with the reasons. Usually used together with valid?
144
144
  # @return Array for valid properties with the reasons
145
145
  def list_invalid_properties
146
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
146
147
  invalid_properties = Array.new
147
148
  invalid_properties
148
149
  end
@@ -150,6 +151,7 @@ module ElasticEmail
150
151
  # Check to see if the all the properties in the model are valid
151
152
  # @return true if the model is valid
152
153
  def valid?
154
+ warn '[DEPRECATED] the `valid?` method is obsolete'
153
155
  true
154
156
  end
155
157
 
@@ -183,37 +185,30 @@ module ElasticEmail
183
185
  # @param [Hash] attributes Model attributes in the form of hash
184
186
  # @return [Object] Returns the model itself
185
187
  def self.build_from_hash(attributes)
186
- new.build_from_hash(attributes)
187
- end
188
-
189
- # Builds the object from hash
190
- # @param [Hash] attributes Model attributes in the form of hash
191
- # @return [Object] Returns the model itself
192
- def build_from_hash(attributes)
193
188
  return nil unless attributes.is_a?(Hash)
194
189
  attributes = attributes.transform_keys(&:to_sym)
195
- self.class.openapi_types.each_pair do |key, type|
196
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
197
- self.send("#{key}=", nil)
190
+ transformed_hash = {}
191
+ openapi_types.each_pair do |key, type|
192
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
193
+ transformed_hash["#{key}"] = nil
198
194
  elsif type =~ /\AArray<(.*)>/i
199
195
  # check to ensure the input is an array given that the attribute
200
196
  # is documented as an array but the input is not
201
- if attributes[self.class.attribute_map[key]].is_a?(Array)
202
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
197
+ if attributes[attribute_map[key]].is_a?(Array)
198
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
203
199
  end
204
- elsif !attributes[self.class.attribute_map[key]].nil?
205
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
200
+ elsif !attributes[attribute_map[key]].nil?
201
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
206
202
  end
207
203
  end
208
-
209
- self
204
+ new(transformed_hash)
210
205
  end
211
206
 
212
207
  # Deserializes the data based on type
213
208
  # @param string type Data type
214
209
  # @param string value Value to be deserialized
215
210
  # @return [Object] Deserialized data
216
- def _deserialize(type, value)
211
+ def self._deserialize(type, value)
217
212
  case type.to_sym
218
213
  when :Time
219
214
  Time.parse(value)
@@ -248,7 +243,7 @@ module ElasticEmail
248
243
  else # model
249
244
  # models (e.g. Pet) or oneOf
250
245
  klass = ElasticEmail.const_get(type)
251
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
246
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
252
247
  end
253
248
  end
254
249
 
@@ -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
 
@@ -70,6 +70,8 @@ module ElasticEmail
70
70
 
71
71
  if attributes.key?(:'list_name')
72
72
  self.list_name = attributes[:'list_name']
73
+ else
74
+ self.list_name = nil
73
75
  end
74
76
 
75
77
  if attributes.key?(:'allow_unsubscribe')
@@ -86,6 +88,7 @@ module ElasticEmail
86
88
  # Show invalid properties with the reasons. Usually used together with valid?
87
89
  # @return Array for valid properties with the reasons
88
90
  def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
92
  invalid_properties = Array.new
90
93
  if @list_name.nil?
91
94
  invalid_properties.push('invalid value for "list_name", list_name cannot be nil.')
@@ -97,6 +100,7 @@ module ElasticEmail
97
100
  # Check to see if the all the properties in the model are valid
98
101
  # @return true if the model is valid
99
102
  def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
104
  return false if @list_name.nil?
101
105
  true
102
106
  end
@@ -127,37 +131,30 @@ module ElasticEmail
127
131
  # @param [Hash] attributes Model attributes in the form of hash
128
132
  # @return [Object] Returns the model itself
129
133
  def self.build_from_hash(attributes)
130
- new.build_from_hash(attributes)
131
- end
132
-
133
- # Builds the object from hash
134
- # @param [Hash] attributes Model attributes in the form of hash
135
- # @return [Object] Returns the model itself
136
- def build_from_hash(attributes)
137
134
  return nil unless attributes.is_a?(Hash)
138
135
  attributes = attributes.transform_keys(&:to_sym)
139
- self.class.openapi_types.each_pair do |key, type|
140
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
141
- self.send("#{key}=", nil)
136
+ transformed_hash = {}
137
+ openapi_types.each_pair do |key, type|
138
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = nil
142
140
  elsif type =~ /\AArray<(.*)>/i
143
141
  # check to ensure the input is an array given that the attribute
144
142
  # is documented as an array but the input is not
145
- if attributes[self.class.attribute_map[key]].is_a?(Array)
146
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
143
+ if attributes[attribute_map[key]].is_a?(Array)
144
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
145
  end
148
- elsif !attributes[self.class.attribute_map[key]].nil?
149
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
+ elsif !attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
148
  end
151
149
  end
152
-
153
- self
150
+ new(transformed_hash)
154
151
  end
155
152
 
156
153
  # Deserializes the data based on type
157
154
  # @param string type Data type
158
155
  # @param string value Value to be deserialized
159
156
  # @return [Object] Deserialized data
160
- def _deserialize(type, value)
157
+ def self._deserialize(type, value)
161
158
  case type.to_sym
162
159
  when :Time
163
160
  Time.parse(value)
@@ -192,7 +189,7 @@ module ElasticEmail
192
189
  else # model
193
190
  # models (e.g. Pet) or oneOf
194
191
  klass = ElasticEmail.const_get(type)
195
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
192
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
196
193
  end
197
194
  end
198
195
 
@@ -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,6 +75,7 @@ module ElasticEmail
75
75
  # Show invalid properties with the reasons. Usually used together with valid?
76
76
  # @return Array for valid properties with the reasons
77
77
  def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
79
  invalid_properties = Array.new
79
80
  invalid_properties
80
81
  end
@@ -82,6 +83,7 @@ module ElasticEmail
82
83
  # Check to see if the all the properties in the model are valid
83
84
  # @return true if the model is valid
84
85
  def valid?
86
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
87
  true
86
88
  end
87
89
 
@@ -110,37 +112,30 @@ module ElasticEmail
110
112
  # @param [Hash] attributes Model attributes in the form of hash
111
113
  # @return [Object] Returns the model itself
112
114
  def self.build_from_hash(attributes)
113
- new.build_from_hash(attributes)
114
- end
115
-
116
- # Builds the object from hash
117
- # @param [Hash] attributes Model attributes in the form of hash
118
- # @return [Object] Returns the model itself
119
- def build_from_hash(attributes)
120
115
  return nil unless attributes.is_a?(Hash)
121
116
  attributes = attributes.transform_keys(&:to_sym)
122
- self.class.openapi_types.each_pair do |key, type|
123
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
117
+ transformed_hash = {}
118
+ openapi_types.each_pair do |key, type|
119
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = nil
125
121
  elsif type =~ /\AArray<(.*)>/i
126
122
  # check to ensure the input is an array given that the attribute
127
123
  # is documented as an array but the input is not
128
- if attributes[self.class.attribute_map[key]].is_a?(Array)
129
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ if attributes[attribute_map[key]].is_a?(Array)
125
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
126
  end
131
- elsif !attributes[self.class.attribute_map[key]].nil?
132
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ elsif !attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
129
  end
134
130
  end
135
-
136
- self
131
+ new(transformed_hash)
137
132
  end
138
133
 
139
134
  # Deserializes the data based on type
140
135
  # @param string type Data type
141
136
  # @param string value Value to be deserialized
142
137
  # @return [Object] Deserialized data
143
- def _deserialize(type, value)
138
+ def self._deserialize(type, value)
144
139
  case type.to_sym
145
140
  when :Time
146
141
  Time.parse(value)
@@ -175,7 +170,7 @@ module ElasticEmail
175
170
  else # model
176
171
  # models (e.g. Pet) or oneOf
177
172
  klass = ElasticEmail.const_get(type)
178
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
174
  end
180
175
  end
181
176
 
@@ -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