ElasticEmail 4.0.27 → 4.0.29

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 (253) hide show
  1. checksums.yaml +4 -4
  2. data/ElasticEmail.gemspec +1 -1
  3. data/README.md +21 -9
  4. data/VERSION +1 -1
  5. data/docs/CampaignOptions.md +3 -1
  6. data/docs/CampaignTemplate.md +2 -2
  7. data/docs/CampaignsApi.md +73 -0
  8. data/docs/DKIMRecord.md +26 -0
  9. data/docs/DomainData.md +7 -1
  10. data/docs/DomainDetail.md +7 -1
  11. data/docs/EmailContent.md +2 -2
  12. data/docs/MessageAttachment.md +2 -2
  13. data/docs/SecurityApi.md +4 -4
  14. data/docs/SubAccountsApi.md +73 -1
  15. data/docs/Webhook.md +42 -0
  16. data/docs/WebhookApi.md +372 -0
  17. data/docs/WebhookCreatePayload.md +34 -0
  18. data/docs/WebhookUpdatePayload.md +36 -0
  19. data/lib/ElasticEmail/api/campaigns_api.rb +69 -1
  20. data/lib/ElasticEmail/api/contacts_api.rb +1 -1
  21. data/lib/ElasticEmail/api/domains_api.rb +1 -1
  22. data/lib/ElasticEmail/api/emails_api.rb +1 -1
  23. data/lib/ElasticEmail/api/events_api.rb +1 -1
  24. data/lib/ElasticEmail/api/files_api.rb +1 -1
  25. data/lib/ElasticEmail/api/inbound_route_api.rb +1 -1
  26. data/lib/ElasticEmail/api/lists_api.rb +1 -1
  27. data/lib/ElasticEmail/api/security_api.rb +5 -5
  28. data/lib/ElasticEmail/api/segments_api.rb +1 -1
  29. data/lib/ElasticEmail/api/statistics_api.rb +1 -1
  30. data/lib/ElasticEmail/api/sub_accounts_api.rb +66 -3
  31. data/lib/ElasticEmail/api/suppressions_api.rb +1 -1
  32. data/lib/ElasticEmail/api/templates_api.rb +1 -1
  33. data/lib/ElasticEmail/api/verifications_api.rb +1 -1
  34. data/lib/ElasticEmail/api/webhook_api.rb +351 -0
  35. data/lib/ElasticEmail/api_client.rb +8 -9
  36. data/lib/ElasticEmail/api_error.rb +1 -1
  37. data/lib/ElasticEmail/configuration.rb +1 -1
  38. data/lib/ElasticEmail/models/access_level.rb +1 -1
  39. data/lib/ElasticEmail/models/account_status_enum.rb +1 -1
  40. data/lib/ElasticEmail/models/api_key.rb +10 -4
  41. data/lib/ElasticEmail/models/api_key_payload.rb +30 -4
  42. data/lib/ElasticEmail/models/body_content_type.rb +1 -1
  43. data/lib/ElasticEmail/models/body_part.rb +20 -4
  44. data/lib/ElasticEmail/models/campaign.rb +30 -4
  45. data/lib/ElasticEmail/models/campaign_options.rb +25 -8
  46. data/lib/ElasticEmail/models/campaign_recipient.rb +10 -4
  47. data/lib/ElasticEmail/models/campaign_status.rb +1 -1
  48. data/lib/ElasticEmail/models/campaign_template.rb +21 -5
  49. data/lib/ElasticEmail/models/certificate_validation_status.rb +3 -2
  50. data/lib/ElasticEmail/models/channel_log_status_summary.rb +10 -4
  51. data/lib/ElasticEmail/models/compression_format.rb +1 -1
  52. data/lib/ElasticEmail/models/consent_data.rb +10 -4
  53. data/lib/ElasticEmail/models/consent_tracking.rb +1 -1
  54. data/lib/ElasticEmail/models/contact.rb +10 -4
  55. data/lib/ElasticEmail/models/contact_activity.rb +10 -4
  56. data/lib/ElasticEmail/models/contact_payload.rb +20 -4
  57. data/lib/ElasticEmail/models/contact_source.rb +1 -1
  58. data/lib/ElasticEmail/models/contact_status.rb +1 -1
  59. data/lib/ElasticEmail/models/contact_update_payload.rb +10 -4
  60. data/lib/ElasticEmail/models/contacts_list.rb +10 -4
  61. data/lib/ElasticEmail/models/delivery_optimization_type.rb +1 -1
  62. data/lib/ElasticEmail/models/dkim_record.rb +258 -0
  63. data/lib/ElasticEmail/models/domain_data.rb +42 -8
  64. data/lib/ElasticEmail/models/domain_detail.rb +42 -8
  65. data/lib/ElasticEmail/models/domain_owner.rb +1 -1
  66. data/lib/ElasticEmail/models/domain_payload.rb +10 -4
  67. data/lib/ElasticEmail/models/domain_update_payload.rb +10 -4
  68. data/lib/ElasticEmail/models/email_content.rb +21 -5
  69. data/lib/ElasticEmail/models/email_data.rb +10 -4
  70. data/lib/ElasticEmail/models/email_job_failed_status.rb +10 -4
  71. data/lib/ElasticEmail/models/email_job_status.rb +10 -4
  72. data/lib/ElasticEmail/models/email_message_data.rb +30 -4
  73. data/lib/ElasticEmail/models/email_predicted_validation_status.rb +1 -1
  74. data/lib/ElasticEmail/models/email_recipient.rb +20 -4
  75. data/lib/ElasticEmail/models/email_send.rb +10 -4
  76. data/lib/ElasticEmail/models/email_status.rb +10 -4
  77. data/lib/ElasticEmail/models/email_transactional_message_data.rb +30 -4
  78. data/lib/ElasticEmail/models/email_validation_result.rb +10 -4
  79. data/lib/ElasticEmail/models/email_validation_status.rb +1 -1
  80. data/lib/ElasticEmail/models/email_view.rb +10 -4
  81. data/lib/ElasticEmail/models/emails_payload.rb +10 -4
  82. data/lib/ElasticEmail/models/encoding_type.rb +1 -1
  83. data/lib/ElasticEmail/models/event_type.rb +6 -3
  84. data/lib/ElasticEmail/models/events_order_by.rb +1 -1
  85. data/lib/ElasticEmail/models/export_file_formats.rb +1 -1
  86. data/lib/ElasticEmail/models/export_link.rb +10 -4
  87. data/lib/ElasticEmail/models/export_status.rb +1 -1
  88. data/lib/ElasticEmail/models/file_info.rb +10 -4
  89. data/lib/ElasticEmail/models/file_payload.rb +20 -4
  90. data/lib/ElasticEmail/models/file_upload_result.rb +10 -4
  91. data/lib/ElasticEmail/models/inbound_payload.rb +50 -4
  92. data/lib/ElasticEmail/models/inbound_route.rb +10 -4
  93. data/lib/ElasticEmail/models/inbound_route_action_type.rb +1 -1
  94. data/lib/ElasticEmail/models/inbound_route_filter_type.rb +1 -1
  95. data/lib/ElasticEmail/models/list_payload.rb +20 -4
  96. data/lib/ElasticEmail/models/list_update_payload.rb +10 -4
  97. data/lib/ElasticEmail/models/log_job_status.rb +1 -1
  98. data/lib/ElasticEmail/models/log_status_summary.rb +10 -4
  99. data/lib/ElasticEmail/models/merge_email_payload.rb +30 -4
  100. data/lib/ElasticEmail/models/message_attachment.rb +31 -5
  101. data/lib/ElasticEmail/models/message_category.rb +1 -1
  102. data/lib/ElasticEmail/models/message_category_enum.rb +1 -1
  103. data/lib/ElasticEmail/models/new_api_key.rb +10 -4
  104. data/lib/ElasticEmail/models/new_smtp_credentials.rb +10 -4
  105. data/lib/ElasticEmail/models/options.rb +10 -4
  106. data/lib/ElasticEmail/models/recipient_event.rb +10 -4
  107. data/lib/ElasticEmail/models/segment.rb +10 -4
  108. data/lib/ElasticEmail/models/segment_payload.rb +30 -4
  109. data/lib/ElasticEmail/models/smtp_credentials.rb +10 -4
  110. data/lib/ElasticEmail/models/smtp_credentials_payload.rb +20 -4
  111. data/lib/ElasticEmail/models/sort_order_item.rb +30 -4
  112. data/lib/ElasticEmail/models/split_optimization_type.rb +1 -1
  113. data/lib/ElasticEmail/models/split_options.rb +10 -4
  114. data/lib/ElasticEmail/models/sub_account_info.rb +10 -4
  115. data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +20 -4
  116. data/lib/ElasticEmail/models/subaccount_email_settings.rb +10 -4
  117. data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +10 -4
  118. data/lib/ElasticEmail/models/subaccount_payload.rb +30 -4
  119. data/lib/ElasticEmail/models/subaccount_settings_info.rb +10 -4
  120. data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +10 -4
  121. data/lib/ElasticEmail/models/suppression.rb +10 -4
  122. data/lib/ElasticEmail/models/template.rb +10 -4
  123. data/lib/ElasticEmail/models/template_payload.rb +20 -4
  124. data/lib/ElasticEmail/models/template_scope.rb +1 -1
  125. data/lib/ElasticEmail/models/template_type.rb +1 -1
  126. data/lib/ElasticEmail/models/tracking_type.rb +1 -1
  127. data/lib/ElasticEmail/models/tracking_validation_status.rb +1 -1
  128. data/lib/ElasticEmail/models/transactional_recipient.rb +20 -4
  129. data/lib/ElasticEmail/models/utm.rb +10 -4
  130. data/lib/ElasticEmail/models/verification_file_result.rb +10 -4
  131. data/lib/ElasticEmail/models/verification_file_result_details.rb +10 -4
  132. data/lib/ElasticEmail/models/verification_status.rb +1 -1
  133. data/lib/ElasticEmail/models/webhook.rb +336 -0
  134. data/lib/ElasticEmail/models/webhook_create_payload.rb +329 -0
  135. data/lib/ElasticEmail/models/webhook_update_payload.rb +312 -0
  136. data/lib/ElasticEmail/version.rb +2 -2
  137. data/lib/ElasticEmail.rb +6 -1
  138. data/spec/api/campaigns_api_spec.rb +14 -1
  139. data/spec/api/contacts_api_spec.rb +1 -1
  140. data/spec/api/domains_api_spec.rb +1 -1
  141. data/spec/api/emails_api_spec.rb +1 -1
  142. data/spec/api/events_api_spec.rb +1 -1
  143. data/spec/api/files_api_spec.rb +1 -1
  144. data/spec/api/inbound_route_api_spec.rb +1 -1
  145. data/spec/api/lists_api_spec.rb +1 -1
  146. data/spec/api/security_api_spec.rb +3 -3
  147. data/spec/api/segments_api_spec.rb +1 -1
  148. data/spec/api/statistics_api_spec.rb +1 -1
  149. data/spec/api/sub_accounts_api_spec.rb +14 -2
  150. data/spec/api/suppressions_api_spec.rb +1 -1
  151. data/spec/api/templates_api_spec.rb +1 -1
  152. data/spec/api/verifications_api_spec.rb +1 -1
  153. data/spec/api/webhook_api_spec.rb +97 -0
  154. data/spec/models/access_level_spec.rb +1 -1
  155. data/spec/models/account_status_enum_spec.rb +1 -1
  156. data/spec/models/api_key_payload_spec.rb +1 -1
  157. data/spec/models/api_key_spec.rb +1 -1
  158. data/spec/models/body_content_type_spec.rb +1 -1
  159. data/spec/models/body_part_spec.rb +1 -1
  160. data/spec/models/campaign_options_spec.rb +7 -1
  161. data/spec/models/campaign_recipient_spec.rb +1 -1
  162. data/spec/models/campaign_spec.rb +1 -1
  163. data/spec/models/campaign_status_spec.rb +1 -1
  164. data/spec/models/campaign_template_spec.rb +1 -1
  165. data/spec/models/certificate_validation_status_spec.rb +1 -1
  166. data/spec/models/channel_log_status_summary_spec.rb +1 -1
  167. data/spec/models/compression_format_spec.rb +1 -1
  168. data/spec/models/consent_data_spec.rb +1 -1
  169. data/spec/models/consent_tracking_spec.rb +1 -1
  170. data/spec/models/contact_activity_spec.rb +1 -1
  171. data/spec/models/contact_payload_spec.rb +1 -1
  172. data/spec/models/contact_source_spec.rb +1 -1
  173. data/spec/models/contact_spec.rb +1 -1
  174. data/spec/models/contact_status_spec.rb +1 -1
  175. data/spec/models/contact_update_payload_spec.rb +1 -1
  176. data/spec/models/contacts_list_spec.rb +1 -1
  177. data/spec/models/delivery_optimization_type_spec.rb +1 -1
  178. data/spec/models/dkim_record_spec.rb +60 -0
  179. data/spec/models/domain_data_spec.rb +19 -1
  180. data/spec/models/domain_detail_spec.rb +19 -1
  181. data/spec/models/domain_owner_spec.rb +1 -1
  182. data/spec/models/domain_payload_spec.rb +1 -1
  183. data/spec/models/domain_update_payload_spec.rb +1 -1
  184. data/spec/models/email_content_spec.rb +1 -1
  185. data/spec/models/email_data_spec.rb +1 -1
  186. data/spec/models/email_job_failed_status_spec.rb +1 -1
  187. data/spec/models/email_job_status_spec.rb +1 -1
  188. data/spec/models/email_message_data_spec.rb +1 -1
  189. data/spec/models/email_predicted_validation_status_spec.rb +1 -1
  190. data/spec/models/email_recipient_spec.rb +1 -1
  191. data/spec/models/email_send_spec.rb +1 -1
  192. data/spec/models/email_status_spec.rb +1 -1
  193. data/spec/models/email_transactional_message_data_spec.rb +1 -1
  194. data/spec/models/email_validation_result_spec.rb +1 -1
  195. data/spec/models/email_validation_status_spec.rb +1 -1
  196. data/spec/models/email_view_spec.rb +1 -1
  197. data/spec/models/emails_payload_spec.rb +1 -1
  198. data/spec/models/encoding_type_spec.rb +1 -1
  199. data/spec/models/event_type_spec.rb +1 -1
  200. data/spec/models/events_order_by_spec.rb +1 -1
  201. data/spec/models/export_file_formats_spec.rb +1 -1
  202. data/spec/models/export_link_spec.rb +1 -1
  203. data/spec/models/export_status_spec.rb +1 -1
  204. data/spec/models/file_info_spec.rb +1 -1
  205. data/spec/models/file_payload_spec.rb +1 -1
  206. data/spec/models/file_upload_result_spec.rb +1 -1
  207. data/spec/models/inbound_payload_spec.rb +1 -1
  208. data/spec/models/inbound_route_action_type_spec.rb +1 -1
  209. data/spec/models/inbound_route_filter_type_spec.rb +1 -1
  210. data/spec/models/inbound_route_spec.rb +1 -1
  211. data/spec/models/list_payload_spec.rb +1 -1
  212. data/spec/models/list_update_payload_spec.rb +1 -1
  213. data/spec/models/log_job_status_spec.rb +1 -1
  214. data/spec/models/log_status_summary_spec.rb +1 -1
  215. data/spec/models/merge_email_payload_spec.rb +1 -1
  216. data/spec/models/message_attachment_spec.rb +1 -1
  217. data/spec/models/message_category_enum_spec.rb +1 -1
  218. data/spec/models/message_category_spec.rb +1 -1
  219. data/spec/models/new_api_key_spec.rb +1 -1
  220. data/spec/models/new_smtp_credentials_spec.rb +1 -1
  221. data/spec/models/options_spec.rb +1 -1
  222. data/spec/models/recipient_event_spec.rb +1 -1
  223. data/spec/models/segment_payload_spec.rb +1 -1
  224. data/spec/models/segment_spec.rb +1 -1
  225. data/spec/models/smtp_credentials_payload_spec.rb +1 -1
  226. data/spec/models/smtp_credentials_spec.rb +1 -1
  227. data/spec/models/sort_order_item_spec.rb +1 -1
  228. data/spec/models/split_optimization_type_spec.rb +1 -1
  229. data/spec/models/split_options_spec.rb +1 -1
  230. data/spec/models/sub_account_info_spec.rb +1 -1
  231. data/spec/models/subaccount_email_credits_payload_spec.rb +1 -1
  232. data/spec/models/subaccount_email_settings_payload_spec.rb +1 -1
  233. data/spec/models/subaccount_email_settings_spec.rb +1 -1
  234. data/spec/models/subaccount_payload_spec.rb +1 -1
  235. data/spec/models/subaccount_settings_info_payload_spec.rb +1 -1
  236. data/spec/models/subaccount_settings_info_spec.rb +1 -1
  237. data/spec/models/suppression_spec.rb +1 -1
  238. data/spec/models/template_payload_spec.rb +1 -1
  239. data/spec/models/template_scope_spec.rb +1 -1
  240. data/spec/models/template_spec.rb +1 -1
  241. data/spec/models/template_type_spec.rb +1 -1
  242. data/spec/models/tracking_type_spec.rb +1 -1
  243. data/spec/models/tracking_validation_status_spec.rb +1 -1
  244. data/spec/models/transactional_recipient_spec.rb +1 -1
  245. data/spec/models/utm_spec.rb +1 -1
  246. data/spec/models/verification_file_result_details_spec.rb +1 -1
  247. data/spec/models/verification_file_result_spec.rb +1 -1
  248. data/spec/models/verification_status_spec.rb +1 -1
  249. data/spec/models/webhook_create_payload_spec.rb +84 -0
  250. data/spec/models/webhook_spec.rb +108 -0
  251. data/spec/models/webhook_update_payload_spec.rb +90 -0
  252. data/spec/spec_helper.rb +1 -1
  253. metadata +109 -89
@@ -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
- Generator version: 7.11.0
9
+ Generator version: 7.14.0
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,258 @@
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.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ElasticEmail
17
+ # Content of the DKIM record to be added to DNS for the domain.
18
+ class DKIMRecord
19
+ attr_accessor :selector
20
+
21
+ attr_accessor :public_key
22
+
23
+ attr_accessor :host_name
24
+
25
+ attr_accessor :record_value
26
+
27
+ # Name of selected domain.
28
+ attr_accessor :domain
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'selector' => :'Selector',
34
+ :'public_key' => :'PublicKey',
35
+ :'host_name' => :'HostName',
36
+ :'record_value' => :'RecordValue',
37
+ :'domain' => :'Domain'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'selector' => :'String',
55
+ :'public_key' => :'String',
56
+ :'host_name' => :'String',
57
+ :'record_value' => :'String',
58
+ :'domain' => :'String'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ElasticEmail::DKIMRecord` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ acceptable_attribute_map = self.class.acceptable_attribute_map
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!acceptable_attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DKIMRecord`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'selector')
85
+ self.selector = attributes[:'selector']
86
+ end
87
+
88
+ if attributes.key?(:'public_key')
89
+ self.public_key = attributes[:'public_key']
90
+ end
91
+
92
+ if attributes.key?(:'host_name')
93
+ self.host_name = attributes[:'host_name']
94
+ end
95
+
96
+ if attributes.key?(:'record_value')
97
+ self.record_value = attributes[:'record_value']
98
+ end
99
+
100
+ if attributes.key?(:'domain')
101
+ self.domain = attributes[:'domain']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ selector == o.selector &&
126
+ public_key == o.public_key &&
127
+ host_name == o.host_name &&
128
+ record_value == o.record_value &&
129
+ domain == o.domain
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ def hash
141
+ [selector, public_key, host_name, record_value, domain].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def self.build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ attributes = attributes.transform_keys(&:to_sym)
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
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[attribute_map[key]].is_a?(Array)
158
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
+ end
160
+ elsif !attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
+ end
163
+ end
164
+ new(transformed_hash)
165
+ end
166
+
167
+ # Deserializes the data based on type
168
+ # @param string type Data type
169
+ # @param string value Value to be deserialized
170
+ # @return [Object] Deserialized data
171
+ def self._deserialize(type, value)
172
+ case type.to_sym
173
+ when :Time
174
+ Time.parse(value)
175
+ when :Date
176
+ Date.parse(value)
177
+ when :String
178
+ value.to_s
179
+ when :Integer
180
+ value.to_i
181
+ when :Float
182
+ value.to_f
183
+ when :Boolean
184
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
185
+ true
186
+ else
187
+ false
188
+ end
189
+ when :Object
190
+ # generic object (usually a Hash), return directly
191
+ value
192
+ when /\AArray<(?<inner_type>.+)>\z/
193
+ inner_type = Regexp.last_match[:inner_type]
194
+ value.map { |v| _deserialize(inner_type, v) }
195
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
196
+ k_type = Regexp.last_match[:k_type]
197
+ v_type = Regexp.last_match[:v_type]
198
+ {}.tap do |hash|
199
+ value.each do |k, v|
200
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
201
+ end
202
+ end
203
+ else # model
204
+ # models (e.g. Pet) or oneOf
205
+ klass = ElasticEmail.const_get(type)
206
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
207
+ end
208
+ end
209
+
210
+ # Returns the string representation of the object
211
+ # @return [String] String presentation of the object
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # to_body is an alias to to_hash (backward compatibility)
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_body
219
+ to_hash
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = self.send(attr)
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map { |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+
256
+ end
257
+
258
+ 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
- Generator version: 7.11.0
9
+ Generator version: 7.14.0
10
10
 
11
11
  =end
12
12
 
@@ -48,6 +48,8 @@ module ElasticEmail
48
48
 
49
49
  attr_accessor :certificate_status
50
50
 
51
+ attr_accessor :certificate_expiry_date
52
+
51
53
  attr_accessor :certificate_validation_error
52
54
 
53
55
  attr_accessor :tracking_type_user_request
@@ -58,10 +60,14 @@ module ElasticEmail
58
60
 
59
61
  attr_accessor :is_custom_bounces_domain_default
60
62
 
63
+ attr_accessor :was_ever_verified
64
+
61
65
  attr_accessor :is_marked_for_deletion
62
66
 
63
67
  attr_accessor :ownership
64
68
 
69
+ attr_accessor :dkim_record
70
+
65
71
  class EnumAttributeValidator
66
72
  attr_reader :datatype
67
73
  attr_reader :allowable_values
@@ -99,19 +105,27 @@ module ElasticEmail
99
105
  :'type' => :'Type',
100
106
  :'tracking_status' => :'TrackingStatus',
101
107
  :'certificate_status' => :'CertificateStatus',
108
+ :'certificate_expiry_date' => :'CertificateExpiryDate',
102
109
  :'certificate_validation_error' => :'CertificateValidationError',
103
110
  :'tracking_type_user_request' => :'TrackingTypeUserRequest',
104
111
  :'verp' => :'VERP',
105
112
  :'custom_bounces_domain' => :'CustomBouncesDomain',
106
113
  :'is_custom_bounces_domain_default' => :'IsCustomBouncesDomainDefault',
114
+ :'was_ever_verified' => :'WasEverVerified',
107
115
  :'is_marked_for_deletion' => :'IsMarkedForDeletion',
108
- :'ownership' => :'Ownership'
116
+ :'ownership' => :'Ownership',
117
+ :'dkim_record' => :'DKIMRecord'
109
118
  }
110
119
  end
111
120
 
121
+ # Returns attribute mapping this model knows about
122
+ def self.acceptable_attribute_map
123
+ attribute_map
124
+ end
125
+
112
126
  # Returns all the JSON keys this model knows about
113
127
  def self.acceptable_attributes
114
- attribute_map.values
128
+ acceptable_attribute_map.values
115
129
  end
116
130
 
117
131
  # Attribute type mapping.
@@ -129,19 +143,23 @@ module ElasticEmail
129
143
  :'type' => :'TrackingType',
130
144
  :'tracking_status' => :'TrackingValidationStatus',
131
145
  :'certificate_status' => :'CertificateValidationStatus',
146
+ :'certificate_expiry_date' => :'Time',
132
147
  :'certificate_validation_error' => :'String',
133
148
  :'tracking_type_user_request' => :'TrackingType',
134
149
  :'verp' => :'Boolean',
135
150
  :'custom_bounces_domain' => :'String',
136
151
  :'is_custom_bounces_domain_default' => :'Boolean',
152
+ :'was_ever_verified' => :'Boolean',
137
153
  :'is_marked_for_deletion' => :'Boolean',
138
- :'ownership' => :'DomainOwner'
154
+ :'ownership' => :'DomainOwner',
155
+ :'dkim_record' => :'DKIMRecord'
139
156
  }
140
157
  end
141
158
 
142
159
  # List of attributes with nullable: true
143
160
  def self.openapi_nullable
144
161
  Set.new([
162
+ :'certificate_expiry_date',
145
163
  ])
146
164
  end
147
165
 
@@ -153,9 +171,10 @@ module ElasticEmail
153
171
  end
154
172
 
155
173
  # check to see if the attribute exists and convert string to symbol for hash key
174
+ acceptable_attribute_map = self.class.acceptable_attribute_map
156
175
  attributes = attributes.each_with_object({}) { |(k, v), h|
157
- if (!self.class.attribute_map.key?(k.to_sym))
158
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
176
+ if (!acceptable_attribute_map.key?(k.to_sym))
177
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
159
178
  end
160
179
  h[k.to_sym] = v
161
180
  }
@@ -214,6 +233,10 @@ module ElasticEmail
214
233
  self.certificate_status = 'ErrorOccured'
215
234
  end
216
235
 
236
+ if attributes.key?(:'certificate_expiry_date')
237
+ self.certificate_expiry_date = attributes[:'certificate_expiry_date']
238
+ end
239
+
217
240
  if attributes.key?(:'certificate_validation_error')
218
241
  self.certificate_validation_error = attributes[:'certificate_validation_error']
219
242
  end
@@ -236,6 +259,10 @@ module ElasticEmail
236
259
  self.is_custom_bounces_domain_default = attributes[:'is_custom_bounces_domain_default']
237
260
  end
238
261
 
262
+ if attributes.key?(:'was_ever_verified')
263
+ self.was_ever_verified = attributes[:'was_ever_verified']
264
+ end
265
+
239
266
  if attributes.key?(:'is_marked_for_deletion')
240
267
  self.is_marked_for_deletion = attributes[:'is_marked_for_deletion']
241
268
  end
@@ -245,6 +272,10 @@ module ElasticEmail
245
272
  else
246
273
  self.ownership = 'Current'
247
274
  end
275
+
276
+ if attributes.key?(:'dkim_record')
277
+ self.dkim_record = attributes[:'dkim_record']
278
+ end
248
279
  end
249
280
 
250
281
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -279,13 +310,16 @@ module ElasticEmail
279
310
  type == o.type &&
280
311
  tracking_status == o.tracking_status &&
281
312
  certificate_status == o.certificate_status &&
313
+ certificate_expiry_date == o.certificate_expiry_date &&
282
314
  certificate_validation_error == o.certificate_validation_error &&
283
315
  tracking_type_user_request == o.tracking_type_user_request &&
284
316
  verp == o.verp &&
285
317
  custom_bounces_domain == o.custom_bounces_domain &&
286
318
  is_custom_bounces_domain_default == o.is_custom_bounces_domain_default &&
319
+ was_ever_verified == o.was_ever_verified &&
287
320
  is_marked_for_deletion == o.is_marked_for_deletion &&
288
- ownership == o.ownership
321
+ ownership == o.ownership &&
322
+ dkim_record == o.dkim_record
289
323
  end
290
324
 
291
325
  # @see the `==` method
@@ -297,7 +331,7 @@ module ElasticEmail
297
331
  # Calculates hash code according to all attributes.
298
332
  # @return [Integer] Hash code
299
333
  def hash
300
- [validation_log, domain, default_domain, spf, dkim, mx, dmarc, is_rewrite_domain_valid, verify, type, tracking_status, certificate_status, certificate_validation_error, tracking_type_user_request, verp, custom_bounces_domain, is_custom_bounces_domain_default, is_marked_for_deletion, ownership].hash
334
+ [validation_log, domain, default_domain, spf, dkim, mx, dmarc, is_rewrite_domain_valid, verify, type, tracking_status, certificate_status, certificate_expiry_date, certificate_validation_error, tracking_type_user_request, verp, custom_bounces_domain, is_custom_bounces_domain_default, was_ever_verified, is_marked_for_deletion, ownership, dkim_record].hash
301
335
  end
302
336
 
303
337
  # Builds the object from hash
@@ -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
- Generator version: 7.11.0
9
+ Generator version: 7.14.0
10
10
 
11
11
  =end
12
12
 
@@ -45,6 +45,8 @@ module ElasticEmail
45
45
 
46
46
  attr_accessor :certificate_status
47
47
 
48
+ attr_accessor :certificate_expiry_date
49
+
48
50
  attr_accessor :certificate_validation_error
49
51
 
50
52
  attr_accessor :tracking_type_user_request
@@ -55,10 +57,14 @@ module ElasticEmail
55
57
 
56
58
  attr_accessor :is_custom_bounces_domain_default
57
59
 
60
+ attr_accessor :was_ever_verified
61
+
58
62
  attr_accessor :is_marked_for_deletion
59
63
 
60
64
  attr_accessor :ownership
61
65
 
66
+ attr_accessor :dkim_record
67
+
62
68
  class EnumAttributeValidator
63
69
  attr_reader :datatype
64
70
  attr_reader :allowable_values
@@ -95,19 +101,27 @@ module ElasticEmail
95
101
  :'type' => :'Type',
96
102
  :'tracking_status' => :'TrackingStatus',
97
103
  :'certificate_status' => :'CertificateStatus',
104
+ :'certificate_expiry_date' => :'CertificateExpiryDate',
98
105
  :'certificate_validation_error' => :'CertificateValidationError',
99
106
  :'tracking_type_user_request' => :'TrackingTypeUserRequest',
100
107
  :'verp' => :'VERP',
101
108
  :'custom_bounces_domain' => :'CustomBouncesDomain',
102
109
  :'is_custom_bounces_domain_default' => :'IsCustomBouncesDomainDefault',
110
+ :'was_ever_verified' => :'WasEverVerified',
103
111
  :'is_marked_for_deletion' => :'IsMarkedForDeletion',
104
- :'ownership' => :'Ownership'
112
+ :'ownership' => :'Ownership',
113
+ :'dkim_record' => :'DKIMRecord'
105
114
  }
106
115
  end
107
116
 
117
+ # Returns attribute mapping this model knows about
118
+ def self.acceptable_attribute_map
119
+ attribute_map
120
+ end
121
+
108
122
  # Returns all the JSON keys this model knows about
109
123
  def self.acceptable_attributes
110
- attribute_map.values
124
+ acceptable_attribute_map.values
111
125
  end
112
126
 
113
127
  # Attribute type mapping.
@@ -124,19 +138,23 @@ module ElasticEmail
124
138
  :'type' => :'TrackingType',
125
139
  :'tracking_status' => :'TrackingValidationStatus',
126
140
  :'certificate_status' => :'CertificateValidationStatus',
141
+ :'certificate_expiry_date' => :'Time',
127
142
  :'certificate_validation_error' => :'String',
128
143
  :'tracking_type_user_request' => :'TrackingType',
129
144
  :'verp' => :'Boolean',
130
145
  :'custom_bounces_domain' => :'String',
131
146
  :'is_custom_bounces_domain_default' => :'Boolean',
147
+ :'was_ever_verified' => :'Boolean',
132
148
  :'is_marked_for_deletion' => :'Boolean',
133
- :'ownership' => :'DomainOwner'
149
+ :'ownership' => :'DomainOwner',
150
+ :'dkim_record' => :'DKIMRecord'
134
151
  }
135
152
  end
136
153
 
137
154
  # List of attributes with nullable: true
138
155
  def self.openapi_nullable
139
156
  Set.new([
157
+ :'certificate_expiry_date',
140
158
  ])
141
159
  end
142
160
 
@@ -148,9 +166,10 @@ module ElasticEmail
148
166
  end
149
167
 
150
168
  # check to see if the attribute exists and convert string to symbol for hash key
169
+ acceptable_attribute_map = self.class.acceptable_attribute_map
151
170
  attributes = attributes.each_with_object({}) { |(k, v), h|
152
- if (!self.class.attribute_map.key?(k.to_sym))
153
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
171
+ if (!acceptable_attribute_map.key?(k.to_sym))
172
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
154
173
  end
155
174
  h[k.to_sym] = v
156
175
  }
@@ -205,6 +224,10 @@ module ElasticEmail
205
224
  self.certificate_status = 'ErrorOccured'
206
225
  end
207
226
 
227
+ if attributes.key?(:'certificate_expiry_date')
228
+ self.certificate_expiry_date = attributes[:'certificate_expiry_date']
229
+ end
230
+
208
231
  if attributes.key?(:'certificate_validation_error')
209
232
  self.certificate_validation_error = attributes[:'certificate_validation_error']
210
233
  end
@@ -227,6 +250,10 @@ module ElasticEmail
227
250
  self.is_custom_bounces_domain_default = attributes[:'is_custom_bounces_domain_default']
228
251
  end
229
252
 
253
+ if attributes.key?(:'was_ever_verified')
254
+ self.was_ever_verified = attributes[:'was_ever_verified']
255
+ end
256
+
230
257
  if attributes.key?(:'is_marked_for_deletion')
231
258
  self.is_marked_for_deletion = attributes[:'is_marked_for_deletion']
232
259
  end
@@ -236,6 +263,10 @@ module ElasticEmail
236
263
  else
237
264
  self.ownership = 'Current'
238
265
  end
266
+
267
+ if attributes.key?(:'dkim_record')
268
+ self.dkim_record = attributes[:'dkim_record']
269
+ end
239
270
  end
240
271
 
241
272
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -269,13 +300,16 @@ module ElasticEmail
269
300
  type == o.type &&
270
301
  tracking_status == o.tracking_status &&
271
302
  certificate_status == o.certificate_status &&
303
+ certificate_expiry_date == o.certificate_expiry_date &&
272
304
  certificate_validation_error == o.certificate_validation_error &&
273
305
  tracking_type_user_request == o.tracking_type_user_request &&
274
306
  verp == o.verp &&
275
307
  custom_bounces_domain == o.custom_bounces_domain &&
276
308
  is_custom_bounces_domain_default == o.is_custom_bounces_domain_default &&
309
+ was_ever_verified == o.was_ever_verified &&
277
310
  is_marked_for_deletion == o.is_marked_for_deletion &&
278
- ownership == o.ownership
311
+ ownership == o.ownership &&
312
+ dkim_record == o.dkim_record
279
313
  end
280
314
 
281
315
  # @see the `==` method
@@ -287,7 +321,7 @@ module ElasticEmail
287
321
  # Calculates hash code according to all attributes.
288
322
  # @return [Integer] Hash code
289
323
  def hash
290
- [domain, default_domain, spf, dkim, mx, dmarc, is_rewrite_domain_valid, verify, type, tracking_status, certificate_status, certificate_validation_error, tracking_type_user_request, verp, custom_bounces_domain, is_custom_bounces_domain_default, is_marked_for_deletion, ownership].hash
324
+ [domain, default_domain, spf, dkim, mx, dmarc, is_rewrite_domain_valid, verify, type, tracking_status, certificate_status, certificate_expiry_date, certificate_validation_error, tracking_type_user_request, verp, custom_bounces_domain, is_custom_bounces_domain_default, was_ever_verified, is_marked_for_deletion, ownership, dkim_record].hash
291
325
  end
292
326
 
293
327
  # Builds the object from hash
@@ -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
- Generator version: 7.11.0
9
+ Generator version: 7.14.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
- Generator version: 7.11.0
9
+ Generator version: 7.14.0
10
10
 
11
11
  =end
12
12
 
@@ -28,9 +28,14 @@ module ElasticEmail
28
28
  }
29
29
  end
30
30
 
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
31
36
  # Returns all the JSON keys this model knows about
32
37
  def self.acceptable_attributes
33
- attribute_map.values
38
+ acceptable_attribute_map.values
34
39
  end
35
40
 
36
41
  # Attribute type mapping.
@@ -55,9 +60,10 @@ module ElasticEmail
55
60
  end
56
61
 
57
62
  # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
58
64
  attributes = attributes.each_with_object({}) { |(k, v), h|
59
- if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainPayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
67
  end
62
68
  h[k.to_sym] = v
63
69
  }
@@ -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
- Generator version: 7.11.0
9
+ Generator version: 7.14.0
10
10
 
11
11
  =end
12
12
 
@@ -55,9 +55,14 @@ module ElasticEmail
55
55
  }
56
56
  end
57
57
 
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
58
63
  # Returns all the JSON keys this model knows about
59
64
  def self.acceptable_attributes
60
- attribute_map.values
65
+ acceptable_attribute_map.values
61
66
  end
62
67
 
63
68
  # Attribute type mapping.
@@ -84,9 +89,10 @@ module ElasticEmail
84
89
  end
85
90
 
86
91
  # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
93
  attributes = attributes.each_with_object({}) { |(k, v), h|
88
- if (!self.class.attribute_map.key?(k.to_sym))
89
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainUpdatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainUpdatePayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
96
  end
91
97
  h[k.to_sym] = v
92
98
  }