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
 
@@ -138,6 +138,7 @@ module ElasticEmail
138
138
  # Show invalid properties with the reasons. Usually used together with valid?
139
139
  # @return Array for valid properties with the reasons
140
140
  def list_invalid_properties
141
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
141
142
  invalid_properties = Array.new
142
143
  invalid_properties
143
144
  end
@@ -145,6 +146,7 @@ module ElasticEmail
145
146
  # Check to see if the all the properties in the model are valid
146
147
  # @return true if the model is valid
147
148
  def valid?
149
+ warn '[DEPRECATED] the `valid?` method is obsolete'
148
150
  true
149
151
  end
150
152
 
@@ -177,37 +179,30 @@ module ElasticEmail
177
179
  # @param [Hash] attributes Model attributes in the form of hash
178
180
  # @return [Object] Returns the model itself
179
181
  def self.build_from_hash(attributes)
180
- new.build_from_hash(attributes)
181
- end
182
-
183
- # Builds the object from hash
184
- # @param [Hash] attributes Model attributes in the form of hash
185
- # @return [Object] Returns the model itself
186
- def build_from_hash(attributes)
187
182
  return nil unless attributes.is_a?(Hash)
188
183
  attributes = attributes.transform_keys(&:to_sym)
189
- self.class.openapi_types.each_pair do |key, type|
190
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
191
- 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
192
188
  elsif type =~ /\AArray<(.*)>/i
193
189
  # check to ensure the input is an array given that the attribute
194
190
  # is documented as an array but the input is not
195
- if attributes[self.class.attribute_map[key]].is_a?(Array)
196
- 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) }
197
193
  end
198
- elsif !attributes[self.class.attribute_map[key]].nil?
199
- 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]])
200
196
  end
201
197
  end
202
-
203
- self
198
+ new(transformed_hash)
204
199
  end
205
200
 
206
201
  # Deserializes the data based on type
207
202
  # @param string type Data type
208
203
  # @param string value Value to be deserialized
209
204
  # @return [Object] Deserialized data
210
- def _deserialize(type, value)
205
+ def self._deserialize(type, value)
211
206
  case type.to_sym
212
207
  when :Time
213
208
  Time.parse(value)
@@ -242,7 +237,7 @@ module ElasticEmail
242
237
  else # model
243
238
  # models (e.g. Pet) or oneOf
244
239
  klass = ElasticEmail.const_get(type)
245
- 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)
246
241
  end
247
242
  end
248
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
 
@@ -97,6 +97,8 @@ module ElasticEmail
97
97
 
98
98
  if attributes.key?(:'name')
99
99
  self.name = attributes[:'name']
100
+ else
101
+ self.name = nil
100
102
  end
101
103
 
102
104
  if attributes.key?(:'subject')
@@ -119,6 +121,7 @@ module ElasticEmail
119
121
  # Show invalid properties with the reasons. Usually used together with valid?
120
122
  # @return Array for valid properties with the reasons
121
123
  def list_invalid_properties
124
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
125
  invalid_properties = Array.new
123
126
  if @name.nil?
124
127
  invalid_properties.push('invalid value for "name", name cannot be nil.')
@@ -130,6 +133,7 @@ module ElasticEmail
130
133
  # Check to see if the all the properties in the model are valid
131
134
  # @return true if the model is valid
132
135
  def valid?
136
+ warn '[DEPRECATED] the `valid?` method is obsolete'
133
137
  return false if @name.nil?
134
138
  true
135
139
  end
@@ -161,37 +165,30 @@ module ElasticEmail
161
165
  # @param [Hash] attributes Model attributes in the form of hash
162
166
  # @return [Object] Returns the model itself
163
167
  def self.build_from_hash(attributes)
164
- new.build_from_hash(attributes)
165
- end
166
-
167
- # Builds the object from hash
168
- # @param [Hash] attributes Model attributes in the form of hash
169
- # @return [Object] Returns the model itself
170
- def build_from_hash(attributes)
171
168
  return nil unless attributes.is_a?(Hash)
172
169
  attributes = attributes.transform_keys(&:to_sym)
173
- self.class.openapi_types.each_pair do |key, type|
174
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
175
- self.send("#{key}=", nil)
170
+ transformed_hash = {}
171
+ openapi_types.each_pair do |key, type|
172
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
176
174
  elsif type =~ /\AArray<(.*)>/i
177
175
  # check to ensure the input is an array given that the attribute
178
176
  # is documented as an array but the input is not
179
- if attributes[self.class.attribute_map[key]].is_a?(Array)
180
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
177
+ if attributes[attribute_map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
181
179
  end
182
- elsif !attributes[self.class.attribute_map[key]].nil?
183
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
180
+ elsif !attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
184
182
  end
185
183
  end
186
-
187
- self
184
+ new(transformed_hash)
188
185
  end
189
186
 
190
187
  # Deserializes the data based on type
191
188
  # @param string type Data type
192
189
  # @param string value Value to be deserialized
193
190
  # @return [Object] Deserialized data
194
- def _deserialize(type, value)
191
+ def self._deserialize(type, value)
195
192
  case type.to_sym
196
193
  when :Time
197
194
  Time.parse(value)
@@ -226,7 +223,7 @@ module ElasticEmail
226
223
  else # model
227
224
  # models (e.g. Pet) or oneOf
228
225
  klass = ElasticEmail.const_get(type)
229
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
226
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
230
227
  end
231
228
  end
232
229
 
@@ -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
 
@@ -19,9 +19,10 @@ module ElasticEmail
19
19
  DRAG_DROP_EDITOR = "DragDropEditor".freeze
20
20
  LANDING_PAGE_EDITOR = "LandingPageEditor".freeze
21
21
  TEMPLATE_EDITOR = "TemplateEditor".freeze
22
+ FORM_TEMPLATE = "FormTemplate".freeze
22
23
 
23
24
  def self.all_vars
24
- @all_vars ||= [RAW_HTML, DRAG_DROP_EDITOR, LANDING_PAGE_EDITOR, TEMPLATE_EDITOR].freeze
25
+ @all_vars ||= [RAW_HTML, DRAG_DROP_EDITOR, LANDING_PAGE_EDITOR, TEMPLATE_EDITOR, FORM_TEMPLATE].freeze
25
26
  end
26
27
 
27
28
  # Builds the enum from string
@@ -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
 
@@ -73,6 +73,8 @@ module ElasticEmail
73
73
  if (value = attributes[:'to']).is_a?(Array)
74
74
  self.to = value
75
75
  end
76
+ else
77
+ self.to = nil
76
78
  end
77
79
 
78
80
  if attributes.key?(:'cc')
@@ -91,6 +93,7 @@ module ElasticEmail
91
93
  # Show invalid properties with the reasons. Usually used together with valid?
92
94
  # @return Array for valid properties with the reasons
93
95
  def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
97
  invalid_properties = Array.new
95
98
  if @to.nil?
96
99
  invalid_properties.push('invalid value for "to", to cannot be nil.')
@@ -102,6 +105,7 @@ module ElasticEmail
102
105
  # Check to see if the all the properties in the model are valid
103
106
  # @return true if the model is valid
104
107
  def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
109
  return false if @to.nil?
106
110
  true
107
111
  end
@@ -132,37 +136,30 @@ module ElasticEmail
132
136
  # @param [Hash] attributes Model attributes in the form of hash
133
137
  # @return [Object] Returns the model itself
134
138
  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
139
  return nil unless attributes.is_a?(Hash)
143
140
  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)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
147
145
  elsif type =~ /\AArray<(.*)>/i
148
146
  # check to ensure the input is an array given that the attribute
149
147
  # 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) })
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
152
150
  end
153
- elsif !attributes[self.class.attribute_map[key]].nil?
154
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
155
153
  end
156
154
  end
157
-
158
- self
155
+ new(transformed_hash)
159
156
  end
160
157
 
161
158
  # Deserializes the data based on type
162
159
  # @param string type Data type
163
160
  # @param string value Value to be deserialized
164
161
  # @return [Object] Deserialized data
165
- def _deserialize(type, value)
162
+ def self._deserialize(type, value)
166
163
  case type.to_sym
167
164
  when :Time
168
165
  Time.parse(value)
@@ -197,7 +194,7 @@ module ElasticEmail
197
194
  else # model
198
195
  # models (e.g. Pet) or oneOf
199
196
  klass = ElasticEmail.const_get(type)
200
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
197
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
198
  end
202
199
  end
203
200
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.3.0
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -94,6 +94,7 @@ module ElasticEmail
94
94
  # Show invalid properties with the reasons. Usually used together with valid?
95
95
  # @return Array for valid properties with the reasons
96
96
  def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
98
  invalid_properties = Array.new
98
99
  invalid_properties
99
100
  end
@@ -101,6 +102,7 @@ module ElasticEmail
101
102
  # Check to see if the all the properties in the model are valid
102
103
  # @return true if the model is valid
103
104
  def valid?
105
+ warn '[DEPRECATED] the `valid?` method is obsolete'
104
106
  true
105
107
  end
106
108
 
@@ -131,37 +133,30 @@ module ElasticEmail
131
133
  # @param [Hash] attributes Model attributes in the form of hash
132
134
  # @return [Object] Returns the model itself
133
135
  def self.build_from_hash(attributes)
134
- new.build_from_hash(attributes)
135
- end
136
-
137
- # Builds the object from hash
138
- # @param [Hash] attributes Model attributes in the form of hash
139
- # @return [Object] Returns the model itself
140
- def build_from_hash(attributes)
141
136
  return nil unless attributes.is_a?(Hash)
142
137
  attributes = attributes.transform_keys(&:to_sym)
143
- self.class.openapi_types.each_pair do |key, type|
144
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
145
- 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
146
142
  elsif type =~ /\AArray<(.*)>/i
147
143
  # check to ensure the input is an array given that the attribute
148
144
  # is documented as an array but the input is not
149
- if attributes[self.class.attribute_map[key]].is_a?(Array)
150
- 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) }
151
147
  end
152
- elsif !attributes[self.class.attribute_map[key]].nil?
153
- 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]])
154
150
  end
155
151
  end
156
-
157
- self
152
+ new(transformed_hash)
158
153
  end
159
154
 
160
155
  # Deserializes the data based on type
161
156
  # @param string type Data type
162
157
  # @param string value Value to be deserialized
163
158
  # @return [Object] Deserialized data
164
- def _deserialize(type, value)
159
+ def self._deserialize(type, value)
165
160
  case type.to_sym
166
161
  when :Time
167
162
  Time.parse(value)
@@ -196,7 +191,7 @@ module ElasticEmail
196
191
  else # model
197
192
  # models (e.g. Pet) or oneOf
198
193
  klass = ElasticEmail.const_get(type)
199
- 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)
200
195
  end
201
196
  end
202
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
 
@@ -134,6 +134,7 @@ module ElasticEmail
134
134
  # Show invalid properties with the reasons. Usually used together with valid?
135
135
  # @return Array for valid properties with the reasons
136
136
  def list_invalid_properties
137
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
137
138
  invalid_properties = Array.new
138
139
  invalid_properties
139
140
  end
@@ -141,6 +142,7 @@ module ElasticEmail
141
142
  # Check to see if the all the properties in the model are valid
142
143
  # @return true if the model is valid
143
144
  def valid?
145
+ warn '[DEPRECATED] the `valid?` method is obsolete'
144
146
  true
145
147
  end
146
148
 
@@ -173,37 +175,30 @@ module ElasticEmail
173
175
  # @param [Hash] attributes Model attributes in the form of hash
174
176
  # @return [Object] Returns the model itself
175
177
  def self.build_from_hash(attributes)
176
- new.build_from_hash(attributes)
177
- end
178
-
179
- # Builds the object from hash
180
- # @param [Hash] attributes Model attributes in the form of hash
181
- # @return [Object] Returns the model itself
182
- def build_from_hash(attributes)
183
178
  return nil unless attributes.is_a?(Hash)
184
179
  attributes = attributes.transform_keys(&:to_sym)
185
- self.class.openapi_types.each_pair do |key, type|
186
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
187
- self.send("#{key}=", nil)
180
+ transformed_hash = {}
181
+ openapi_types.each_pair do |key, type|
182
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
183
+ transformed_hash["#{key}"] = nil
188
184
  elsif type =~ /\AArray<(.*)>/i
189
185
  # check to ensure the input is an array given that the attribute
190
186
  # is documented as an array but the input is not
191
- if attributes[self.class.attribute_map[key]].is_a?(Array)
192
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
187
+ if attributes[attribute_map[key]].is_a?(Array)
188
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
193
189
  end
194
- elsif !attributes[self.class.attribute_map[key]].nil?
195
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
190
+ elsif !attributes[attribute_map[key]].nil?
191
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
196
192
  end
197
193
  end
198
-
199
- self
194
+ new(transformed_hash)
200
195
  end
201
196
 
202
197
  # Deserializes the data based on type
203
198
  # @param string type Data type
204
199
  # @param string value Value to be deserialized
205
200
  # @return [Object] Deserialized data
206
- def _deserialize(type, value)
201
+ def self._deserialize(type, value)
207
202
  case type.to_sym
208
203
  when :Time
209
204
  Time.parse(value)
@@ -238,7 +233,7 @@ module ElasticEmail
238
233
  else # model
239
234
  # models (e.g. Pet) or oneOf
240
235
  klass = ElasticEmail.const_get(type)
241
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
236
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
242
237
  end
243
238
  end
244
239
 
@@ -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
 
@@ -145,6 +145,7 @@ module ElasticEmail
145
145
  # Show invalid properties with the reasons. Usually used together with valid?
146
146
  # @return Array for valid properties with the reasons
147
147
  def list_invalid_properties
148
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
148
149
  invalid_properties = Array.new
149
150
  invalid_properties
150
151
  end
@@ -152,6 +153,7 @@ module ElasticEmail
152
153
  # Check to see if the all the properties in the model are valid
153
154
  # @return true if the model is valid
154
155
  def valid?
156
+ warn '[DEPRECATED] the `valid?` method is obsolete'
155
157
  true
156
158
  end
157
159
 
@@ -185,37 +187,30 @@ module ElasticEmail
185
187
  # @param [Hash] attributes Model attributes in the form of hash
186
188
  # @return [Object] Returns the model itself
187
189
  def self.build_from_hash(attributes)
188
- new.build_from_hash(attributes)
189
- end
190
-
191
- # Builds the object from hash
192
- # @param [Hash] attributes Model attributes in the form of hash
193
- # @return [Object] Returns the model itself
194
- def build_from_hash(attributes)
195
190
  return nil unless attributes.is_a?(Hash)
196
191
  attributes = attributes.transform_keys(&:to_sym)
197
- self.class.openapi_types.each_pair do |key, type|
198
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
199
- self.send("#{key}=", nil)
192
+ transformed_hash = {}
193
+ openapi_types.each_pair do |key, type|
194
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
195
+ transformed_hash["#{key}"] = nil
200
196
  elsif type =~ /\AArray<(.*)>/i
201
197
  # check to ensure the input is an array given that the attribute
202
198
  # is documented as an array but the input is not
203
- if attributes[self.class.attribute_map[key]].is_a?(Array)
204
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
199
+ if attributes[attribute_map[key]].is_a?(Array)
200
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
205
201
  end
206
- elsif !attributes[self.class.attribute_map[key]].nil?
207
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
202
+ elsif !attributes[attribute_map[key]].nil?
203
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
208
204
  end
209
205
  end
210
-
211
- self
206
+ new(transformed_hash)
212
207
  end
213
208
 
214
209
  # Deserializes the data based on type
215
210
  # @param string type Data type
216
211
  # @param string value Value to be deserialized
217
212
  # @return [Object] Deserialized data
218
- def _deserialize(type, value)
213
+ def self._deserialize(type, value)
219
214
  case type.to_sym
220
215
  when :Time
221
216
  Time.parse(value)
@@ -250,7 +245,7 @@ module ElasticEmail
250
245
  else # model
251
246
  # models (e.g. Pet) or oneOf
252
247
  klass = ElasticEmail.const_get(type)
253
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
254
249
  end
255
250
  end
256
251
 
@@ -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,10 +6,10 @@
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
 
13
13
  module ElasticEmail
14
- VERSION = '4.0.22'
14
+ VERSION = '4.0.24'
15
15
  end
data/lib/ElasticEmail.rb CHANGED
@@ -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
 
@@ -42,6 +42,8 @@ require 'ElasticEmail/models/contacts_list'
42
42
  require 'ElasticEmail/models/delivery_optimization_type'
43
43
  require 'ElasticEmail/models/email_content'
44
44
  require 'ElasticEmail/models/email_data'
45
+ require 'ElasticEmail/models/email_job_failed_status'
46
+ require 'ElasticEmail/models/email_job_status'
45
47
  require 'ElasticEmail/models/email_message_data'
46
48
  require 'ElasticEmail/models/email_predicted_validation_status'
47
49
  require 'ElasticEmail/models/email_recipient'
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. To start using this API, you will need your Access Token (available <a href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. This is the documentation for REST API. If you’d like to read our legacy documentation regarding Web API v2 click <a href=\"https://api.elasticemail.com/public/help\">here</a>.
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
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: 5.0.1
9
+ Generator version: 7.7.0
10
10
 
11
11
  =end
12
12
 
@@ -40,7 +40,7 @@ describe 'CampaignsApi' do
40
40
  # @return [nil]
41
41
  describe 'campaigns_by_name_delete test' do
42
42
  it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
44
  end
45
45
  end
46
46
 
@@ -52,7 +52,7 @@ describe 'CampaignsApi' do
52
52
  # @return [Campaign]
53
53
  describe 'campaigns_by_name_get test' do
54
54
  it 'should work' do
55
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
56
56
  end
57
57
  end
58
58
 
@@ -65,7 +65,7 @@ describe 'CampaignsApi' do
65
65
  # @return [Campaign]
66
66
  describe 'campaigns_by_name_put test' do
67
67
  it 'should work' do
68
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
69
  end
70
70
  end
71
71
 
@@ -79,7 +79,7 @@ describe 'CampaignsApi' do
79
79
  # @return [Array<Campaign>]
80
80
  describe 'campaigns_get test' do
81
81
  it 'should work' do
82
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
83
83
  end
84
84
  end
85
85
 
@@ -91,7 +91,7 @@ describe 'CampaignsApi' do
91
91
  # @return [Campaign]
92
92
  describe 'campaigns_post test' do
93
93
  it 'should work' do
94
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
94
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
95
95
  end
96
96
  end
97
97