ElasticEmail 4.0.23 → 4.0.25

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 (261) hide show
  1. checksums.yaml +4 -4
  2. data/ElasticEmail.gemspec +2 -1
  3. data/README.md +28 -4
  4. data/VERSION +1 -1
  5. data/docs/CampaignOptions.md +4 -0
  6. data/docs/CampaignTemplate.md +2 -2
  7. data/docs/CampaignsApi.md +71 -0
  8. data/docs/CertificateValidationStatus.md +15 -0
  9. data/docs/DomainData.md +54 -0
  10. data/docs/DomainDetail.md +52 -0
  11. data/docs/{TemplateScopeType.md → DomainOwner.md} +2 -2
  12. data/docs/DomainPayload.md +20 -0
  13. data/docs/DomainUpdatePayload.md +24 -0
  14. data/docs/DomainsApi.md +583 -0
  15. data/docs/EmailContent.md +2 -2
  16. data/docs/EmailJobFailedStatus.md +24 -0
  17. data/docs/EmailJobStatus.md +56 -0
  18. data/docs/EmailMessageData.md +1 -1
  19. data/docs/EmailStatus.md +3 -1
  20. data/docs/EmailTransactionalMessageData.md +1 -1
  21. data/docs/EmailValidationResult.md +2 -2
  22. data/docs/EmailsApi.md +98 -4
  23. data/docs/EmailsPayload.md +1 -1
  24. data/docs/ListPayload.md +1 -1
  25. data/docs/ListsApi.md +78 -0
  26. data/docs/MergeEmailPayload.md +1 -1
  27. data/docs/{ContactHistEventType.md → MessageCategoryEnum.md} +2 -2
  28. data/docs/TrackingType.md +15 -0
  29. data/docs/TrackingValidationStatus.md +15 -0
  30. data/lib/ElasticEmail/api/campaigns_api.rb +62 -1
  31. data/lib/ElasticEmail/api/contacts_api.rb +1 -1
  32. data/lib/ElasticEmail/api/domains_api.rb +545 -0
  33. data/lib/ElasticEmail/api/emails_api.rb +96 -3
  34. data/lib/ElasticEmail/api/events_api.rb +1 -1
  35. data/lib/ElasticEmail/api/files_api.rb +1 -1
  36. data/lib/ElasticEmail/api/inbound_route_api.rb +1 -1
  37. data/lib/ElasticEmail/api/lists_api.rb +70 -1
  38. data/lib/ElasticEmail/api/security_api.rb +1 -1
  39. data/lib/ElasticEmail/api/segments_api.rb +1 -1
  40. data/lib/ElasticEmail/api/statistics_api.rb +1 -1
  41. data/lib/ElasticEmail/api/sub_accounts_api.rb +1 -1
  42. data/lib/ElasticEmail/api/suppressions_api.rb +1 -1
  43. data/lib/ElasticEmail/api/templates_api.rb +1 -1
  44. data/lib/ElasticEmail/api/verifications_api.rb +1 -1
  45. data/lib/ElasticEmail/api_client.rb +23 -21
  46. data/lib/ElasticEmail/api_error.rb +1 -1
  47. data/lib/ElasticEmail/configuration.rb +18 -10
  48. data/lib/ElasticEmail/models/access_level.rb +4 -3
  49. data/lib/ElasticEmail/models/account_status_enum.rb +1 -1
  50. data/lib/ElasticEmail/models/api_key.rb +14 -19
  51. data/lib/ElasticEmail/models/api_key_payload.rb +18 -19
  52. data/lib/ElasticEmail/models/body_content_type.rb +1 -1
  53. data/lib/ElasticEmail/models/body_part.rb +14 -19
  54. data/lib/ElasticEmail/models/campaign.rb +18 -19
  55. data/lib/ElasticEmail/models/campaign_options.rb +35 -20
  56. data/lib/ElasticEmail/models/campaign_recipient.rb +14 -19
  57. data/lib/ElasticEmail/models/campaign_status.rb +1 -1
  58. data/lib/ElasticEmail/models/campaign_template.rb +21 -19
  59. data/lib/ElasticEmail/models/certificate_validation_status.rb +42 -0
  60. data/lib/ElasticEmail/models/channel_log_status_summary.rb +14 -19
  61. data/lib/ElasticEmail/models/compression_format.rb +1 -1
  62. data/lib/ElasticEmail/models/consent_data.rb +14 -19
  63. data/lib/ElasticEmail/models/consent_tracking.rb +1 -1
  64. data/lib/ElasticEmail/models/contact.rb +14 -19
  65. data/lib/ElasticEmail/models/contact_activity.rb +14 -19
  66. data/lib/ElasticEmail/models/contact_payload.rb +16 -19
  67. data/lib/ElasticEmail/models/contact_source.rb +1 -1
  68. data/lib/ElasticEmail/models/contact_status.rb +1 -1
  69. data/lib/ElasticEmail/models/contact_update_payload.rb +14 -19
  70. data/lib/ElasticEmail/models/contacts_list.rb +14 -19
  71. data/lib/ElasticEmail/models/delivery_optimization_type.rb +1 -1
  72. data/lib/ElasticEmail/models/domain_data.rb +417 -0
  73. data/lib/ElasticEmail/models/domain_detail.rb +407 -0
  74. data/lib/ElasticEmail/models/domain_owner.rb +40 -0
  75. data/lib/ElasticEmail/models/domain_payload.rb +224 -0
  76. data/lib/ElasticEmail/models/{contact_history.rb → domain_update_payload.rb} +63 -79
  77. data/lib/ElasticEmail/models/email_content.rb +21 -19
  78. data/lib/ElasticEmail/models/email_data.rb +14 -19
  79. data/lib/ElasticEmail/models/email_job_failed_status.rb +242 -0
  80. data/lib/ElasticEmail/models/email_job_status.rb +415 -0
  81. data/lib/ElasticEmail/models/email_message_data.rb +23 -19
  82. data/lib/ElasticEmail/models/email_predicted_validation_status.rb +1 -1
  83. data/lib/ElasticEmail/models/email_recipient.rb +16 -19
  84. data/lib/ElasticEmail/models/email_send.rb +14 -19
  85. data/lib/ElasticEmail/models/email_status.rb +29 -23
  86. data/lib/ElasticEmail/models/email_transactional_message_data.rb +23 -19
  87. data/lib/ElasticEmail/models/email_validation_result.rb +16 -20
  88. data/lib/ElasticEmail/models/email_validation_status.rb +1 -1
  89. data/lib/ElasticEmail/models/email_view.rb +14 -19
  90. data/lib/ElasticEmail/models/emails_payload.rb +14 -19
  91. data/lib/ElasticEmail/models/encoding_type.rb +1 -1
  92. data/lib/ElasticEmail/models/event_type.rb +1 -1
  93. data/lib/ElasticEmail/models/events_order_by.rb +1 -1
  94. data/lib/ElasticEmail/models/export_file_formats.rb +1 -1
  95. data/lib/ElasticEmail/models/export_link.rb +14 -19
  96. data/lib/ElasticEmail/models/export_status.rb +1 -1
  97. data/lib/ElasticEmail/models/file_info.rb +14 -19
  98. data/lib/ElasticEmail/models/file_payload.rb +16 -19
  99. data/lib/ElasticEmail/models/file_upload_result.rb +14 -19
  100. data/lib/ElasticEmail/models/inbound_payload.rb +18 -19
  101. data/lib/ElasticEmail/models/inbound_route.rb +14 -19
  102. data/lib/ElasticEmail/models/inbound_route_action_type.rb +1 -1
  103. data/lib/ElasticEmail/models/inbound_route_filter_type.rb +1 -1
  104. data/lib/ElasticEmail/models/list_payload.rb +16 -19
  105. data/lib/ElasticEmail/models/list_update_payload.rb +14 -19
  106. data/lib/ElasticEmail/models/log_job_status.rb +1 -1
  107. data/lib/ElasticEmail/models/log_status_summary.rb +14 -19
  108. data/lib/ElasticEmail/models/merge_email_payload.rb +23 -19
  109. data/lib/ElasticEmail/models/message_attachment.rb +18 -19
  110. data/lib/ElasticEmail/models/message_category.rb +1 -1
  111. data/lib/ElasticEmail/models/message_category_enum.rb +55 -0
  112. data/lib/ElasticEmail/models/new_api_key.rb +14 -19
  113. data/lib/ElasticEmail/models/new_smtp_credentials.rb +14 -19
  114. data/lib/ElasticEmail/models/options.rb +16 -19
  115. data/lib/ElasticEmail/models/recipient_event.rb +14 -19
  116. data/lib/ElasticEmail/models/segment.rb +14 -19
  117. data/lib/ElasticEmail/models/segment_payload.rb +18 -19
  118. data/lib/ElasticEmail/models/smtp_credentials.rb +14 -19
  119. data/lib/ElasticEmail/models/smtp_credentials_payload.rb +16 -19
  120. data/lib/ElasticEmail/models/sort_order_item.rb +18 -19
  121. data/lib/ElasticEmail/models/split_optimization_type.rb +1 -1
  122. data/lib/ElasticEmail/models/split_options.rb +14 -19
  123. data/lib/ElasticEmail/models/sub_account_info.rb +14 -19
  124. data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +16 -19
  125. data/lib/ElasticEmail/models/subaccount_email_settings.rb +14 -19
  126. data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +14 -19
  127. data/lib/ElasticEmail/models/subaccount_payload.rb +18 -19
  128. data/lib/ElasticEmail/models/subaccount_settings_info.rb +14 -19
  129. data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +14 -19
  130. data/lib/ElasticEmail/models/suppression.rb +14 -19
  131. data/lib/ElasticEmail/models/template.rb +14 -19
  132. data/lib/ElasticEmail/models/template_payload.rb +16 -19
  133. data/lib/ElasticEmail/models/template_scope.rb +1 -1
  134. data/lib/ElasticEmail/models/template_type.rb +4 -2
  135. data/lib/ElasticEmail/models/tracking_type.rb +44 -0
  136. data/lib/ElasticEmail/models/tracking_validation_status.rb +42 -0
  137. data/lib/ElasticEmail/models/transactional_recipient.rb +16 -19
  138. data/lib/ElasticEmail/models/utm.rb +14 -19
  139. data/lib/ElasticEmail/models/verification_file_result.rb +14 -19
  140. data/lib/ElasticEmail/models/verification_file_result_details.rb +14 -19
  141. data/lib/ElasticEmail/models/verification_status.rb +1 -1
  142. data/lib/ElasticEmail/version.rb +2 -2
  143. data/lib/ElasticEmail.rb +13 -1
  144. data/spec/api/campaigns_api_spec.rb +19 -7
  145. data/spec/api/contacts_api_spec.rb +12 -25
  146. data/spec/api/domains_api_spec.rb +132 -0
  147. data/spec/api/emails_api_spec.rb +29 -7
  148. data/spec/api/events_api_spec.rb +9 -9
  149. data/spec/api/files_api_spec.rb +7 -7
  150. data/spec/api/inbound_route_api_spec.rb +8 -8
  151. data/spec/api/lists_api_spec.rb +23 -9
  152. data/spec/api/security_api_spec.rb +12 -12
  153. data/spec/api/segments_api_spec.rb +7 -7
  154. data/spec/api/statistics_api_spec.rb +7 -7
  155. data/spec/api/sub_accounts_api_spec.rb +8 -8
  156. data/spec/api/suppressions_api_spec.rb +26 -26
  157. data/spec/api/templates_api_spec.rb +7 -7
  158. data/spec/api/verifications_api_spec.rb +30 -18
  159. data/spec/models/access_level_spec.rb +5 -3
  160. data/spec/models/account_status_enum_spec.rb +5 -3
  161. data/spec/models/api_key_payload_spec.rb +10 -8
  162. data/spec/models/api_key_spec.rb +11 -9
  163. data/spec/models/body_content_type_spec.rb +5 -3
  164. data/spec/models/body_part_spec.rb +8 -6
  165. data/spec/models/campaign_options_spec.rb +22 -8
  166. data/spec/models/campaign_recipient_spec.rb +7 -5
  167. data/spec/models/campaign_spec.rb +10 -8
  168. data/spec/models/campaign_status_spec.rb +5 -3
  169. data/spec/models/campaign_template_spec.rb +12 -10
  170. data/spec/{configuration_spec.rb → models/certificate_validation_status_spec.rb} +15 -27
  171. data/spec/models/channel_log_status_summary_spec.rb +19 -17
  172. data/spec/models/compression_format_spec.rb +5 -3
  173. data/spec/models/consent_data_spec.rb +8 -6
  174. data/spec/models/consent_tracking_spec.rb +5 -3
  175. data/spec/models/contact_activity_spec.rb +16 -14
  176. data/spec/models/contact_payload_spec.rb +11 -9
  177. data/spec/models/contact_source_spec.rb +5 -3
  178. data/spec/models/contact_spec.rb +16 -14
  179. data/spec/models/contact_status_spec.rb +5 -3
  180. data/spec/models/contact_update_payload_spec.rb +8 -6
  181. data/spec/models/contacts_list_spec.rb +9 -7
  182. data/spec/models/delivery_optimization_type_spec.rb +5 -3
  183. data/spec/models/domain_data_spec.rb +144 -0
  184. data/spec/models/domain_detail_spec.rb +138 -0
  185. data/spec/models/domain_owner_spec.rb +30 -0
  186. data/spec/models/domain_payload_spec.rb +42 -0
  187. data/spec/models/domain_update_payload_spec.rb +54 -0
  188. data/spec/models/email_content_spec.rb +22 -14
  189. data/spec/models/email_data_spec.rb +8 -6
  190. data/spec/models/email_job_failed_status_spec.rb +54 -0
  191. data/spec/models/email_job_status_spec.rb +150 -0
  192. data/spec/models/email_message_data_spec.rb +8 -6
  193. data/spec/models/email_predicted_validation_status_spec.rb +4 -2
  194. data/spec/models/email_recipient_spec.rb +7 -5
  195. data/spec/models/email_send_spec.rb +7 -5
  196. data/spec/models/email_status_spec.rb +23 -15
  197. data/spec/models/email_transactional_message_data_spec.rb +8 -6
  198. data/spec/models/email_validation_result_spec.rb +26 -12
  199. data/spec/models/email_validation_status_spec.rb +5 -3
  200. data/spec/models/email_view_spec.rb +8 -6
  201. data/spec/models/emails_payload_spec.rb +7 -5
  202. data/spec/models/encoding_type_spec.rb +5 -3
  203. data/spec/models/event_type_spec.rb +5 -3
  204. data/spec/models/events_order_by_spec.rb +5 -3
  205. data/spec/models/export_file_formats_spec.rb +5 -3
  206. data/spec/models/export_link_spec.rb +7 -5
  207. data/spec/models/export_status_spec.rb +5 -3
  208. data/spec/models/file_info_spec.rb +10 -8
  209. data/spec/models/file_payload_spec.rb +8 -6
  210. data/spec/models/file_upload_result_spec.rb +7 -5
  211. data/spec/models/inbound_payload_spec.rb +11 -9
  212. data/spec/models/inbound_route_action_type_spec.rb +5 -3
  213. data/spec/models/inbound_route_filter_type_spec.rb +5 -3
  214. data/spec/models/inbound_route_spec.rb +12 -10
  215. data/spec/models/list_payload_spec.rb +8 -6
  216. data/spec/models/list_update_payload_spec.rb +7 -5
  217. data/spec/models/log_job_status_spec.rb +5 -3
  218. data/spec/models/log_status_summary_spec.rb +18 -16
  219. data/spec/models/merge_email_payload_spec.rb +8 -6
  220. data/spec/models/message_attachment_spec.rb +14 -6
  221. data/spec/models/message_category_enum_spec.rb +30 -0
  222. data/spec/models/message_category_spec.rb +5 -3
  223. data/spec/models/new_api_key_spec.rb +12 -10
  224. data/spec/models/new_smtp_credentials_spec.rb +12 -10
  225. data/spec/models/options_spec.rb +11 -9
  226. data/spec/models/recipient_event_spec.rb +18 -16
  227. data/spec/models/segment_payload_spec.rb +7 -5
  228. data/spec/models/segment_spec.rb +7 -5
  229. data/spec/models/smtp_credentials_payload_spec.rb +9 -7
  230. data/spec/models/smtp_credentials_spec.rb +11 -9
  231. data/spec/models/sort_order_item_spec.rb +7 -5
  232. data/spec/models/split_optimization_type_spec.rb +5 -3
  233. data/spec/models/split_options_spec.rb +7 -5
  234. data/spec/models/sub_account_info_spec.rb +14 -12
  235. data/spec/models/subaccount_email_credits_payload_spec.rb +7 -5
  236. data/spec/models/subaccount_email_settings_payload_spec.rb +17 -9
  237. data/spec/models/subaccount_email_settings_spec.rb +18 -10
  238. data/spec/models/subaccount_payload_spec.rb +9 -7
  239. data/spec/models/subaccount_settings_info_payload_spec.rb +6 -4
  240. data/spec/models/subaccount_settings_info_spec.rb +6 -4
  241. data/spec/models/suppression_spec.rb +9 -7
  242. data/spec/models/template_payload_spec.rb +9 -7
  243. data/spec/models/template_scope_spec.rb +5 -3
  244. data/spec/models/template_spec.rb +11 -9
  245. data/spec/models/template_type_spec.rb +5 -3
  246. data/spec/models/tracking_type_spec.rb +30 -0
  247. data/spec/models/tracking_validation_status_spec.rb +30 -0
  248. data/spec/models/transactional_recipient_spec.rb +8 -6
  249. data/spec/models/utm_spec.rb +9 -7
  250. data/spec/models/verification_file_result_details_spec.rb +12 -10
  251. data/spec/models/verification_file_result_spec.rb +11 -9
  252. data/spec/models/verification_status_spec.rb +5 -3
  253. data/spec/spec_helper.rb +1 -1
  254. metadata +126 -94
  255. data/docs/ContactHistory.md +0 -30
  256. data/lib/ElasticEmail/models/contact_hist_event_type.rb +0 -49
  257. data/lib/ElasticEmail/models/template_scope_type.rb +0 -38
  258. data/spec/api_client_spec.rb +0 -226
  259. data/spec/models/contact_hist_event_type_spec.rb +0 -28
  260. data/spec/models/contact_history_spec.rb +0 -70
  261. 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.5.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.5.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.5.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.5.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.5.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.5.0
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,55 @@
1
+ =begin
2
+ #Elastic Email REST API
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. 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
+
6
+ The version of the OpenAPI document: 4.0.0
7
+ Contact: support@elasticemail.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ElasticEmail
17
+ class MessageCategoryEnum
18
+ UNKNOWN = "Unknown".freeze
19
+ IGNORE = "Ignore".freeze
20
+ SPAM = "Spam".freeze
21
+ BLACK_LISTED = "BlackListed".freeze
22
+ NO_MAILBOX = "NoMailbox".freeze
23
+ GREY_LISTED = "GreyListed".freeze
24
+ THROTTLED = "Throttled".freeze
25
+ TIMEOUT = "Timeout".freeze
26
+ CONNECTION_PROBLEM = "ConnectionProblem".freeze
27
+ SPF_PROBLEM = "SPFProblem".freeze
28
+ ACCOUNT_PROBLEM = "AccountProblem".freeze
29
+ DNS_PROBLEM = "DNSProblem".freeze
30
+ NOT_DELIVERED_CANCELLED = "NotDeliveredCancelled".freeze
31
+ CODE_ERROR = "CodeError".freeze
32
+ MANUAL_CANCEL = "ManualCancel".freeze
33
+ CONNECTION_TERMINATED = "ConnectionTerminated".freeze
34
+ NOT_DELIVERED = "NotDelivered".freeze
35
+
36
+ def self.all_vars
37
+ @all_vars ||= [UNKNOWN, IGNORE, SPAM, BLACK_LISTED, NO_MAILBOX, GREY_LISTED, THROTTLED, TIMEOUT, CONNECTION_PROBLEM, SPF_PROBLEM, ACCOUNT_PROBLEM, DNS_PROBLEM, NOT_DELIVERED_CANCELLED, CODE_ERROR, MANUAL_CANCEL, CONNECTION_TERMINATED, NOT_DELIVERED].freeze
38
+ end
39
+
40
+ # Builds the enum from string
41
+ # @param [String] The enum value in the form of the string
42
+ # @return [String] The enum value
43
+ def self.build_from_hash(value)
44
+ new.build_from_hash(value)
45
+ end
46
+
47
+ # Builds the enum from string
48
+ # @param [String] The enum value in the form of the string
49
+ # @return [String] The enum value
50
+ def build_from_hash(value)
51
+ return value if MessageCategoryEnum.all_vars.include?(value)
52
+ raise "Invalid ENUM value #{value} for class #MessageCategoryEnum"
53
+ end
54
+ end
55
+ end
@@ -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.5.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.5.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