ElasticEmail 4.0.29 → 4.3.0

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 (249) hide show
  1. checksums.yaml +4 -4
  2. data/CODE_OF_CONDUCT.md +132 -0
  3. data/CONTRIBUTING.md +76 -0
  4. data/ElasticEmail.gemspec +2 -2
  5. data/LICENSE +21 -0
  6. data/README.md +171 -64
  7. data/SECURITY.md +31 -0
  8. data/VERSION +1 -1
  9. data/docs/Webhook.md +7 -1
  10. data/docs/WebhookApi.md +72 -0
  11. data/docs/WebhookCreatePayload.md +5 -1
  12. data/docs/WebhookDeliveryMethod.md +15 -0
  13. data/lib/ElasticEmail/api/campaigns_api.rb +1 -1
  14. data/lib/ElasticEmail/api/contacts_api.rb +1 -1
  15. data/lib/ElasticEmail/api/domains_api.rb +1 -1
  16. data/lib/ElasticEmail/api/emails_api.rb +1 -1
  17. data/lib/ElasticEmail/api/events_api.rb +1 -1
  18. data/lib/ElasticEmail/api/files_api.rb +1 -1
  19. data/lib/ElasticEmail/api/inbound_route_api.rb +1 -1
  20. data/lib/ElasticEmail/api/lists_api.rb +1 -1
  21. data/lib/ElasticEmail/api/security_api.rb +1 -1
  22. data/lib/ElasticEmail/api/segments_api.rb +1 -1
  23. data/lib/ElasticEmail/api/statistics_api.rb +1 -1
  24. data/lib/ElasticEmail/api/sub_accounts_api.rb +1 -1
  25. data/lib/ElasticEmail/api/suppressions_api.rb +1 -1
  26. data/lib/ElasticEmail/api/templates_api.rb +1 -1
  27. data/lib/ElasticEmail/api/verifications_api.rb +1 -1
  28. data/lib/ElasticEmail/api/webhook_api.rb +64 -1
  29. data/lib/ElasticEmail/api_client.rb +9 -8
  30. data/lib/ElasticEmail/api_error.rb +1 -1
  31. data/lib/ElasticEmail/configuration.rb +1 -1
  32. data/lib/ElasticEmail/models/access_level.rb +1 -1
  33. data/lib/ElasticEmail/models/account_status_enum.rb +1 -1
  34. data/lib/ElasticEmail/models/api_key.rb +4 -10
  35. data/lib/ElasticEmail/models/api_key_payload.rb +4 -30
  36. data/lib/ElasticEmail/models/body_content_type.rb +1 -1
  37. data/lib/ElasticEmail/models/body_part.rb +4 -20
  38. data/lib/ElasticEmail/models/campaign.rb +4 -30
  39. data/lib/ElasticEmail/models/campaign_options.rb +4 -10
  40. data/lib/ElasticEmail/models/campaign_recipient.rb +4 -10
  41. data/lib/ElasticEmail/models/campaign_status.rb +1 -1
  42. data/lib/ElasticEmail/models/campaign_template.rb +4 -20
  43. data/lib/ElasticEmail/models/certificate_validation_status.rb +1 -1
  44. data/lib/ElasticEmail/models/channel_log_status_summary.rb +4 -10
  45. data/lib/ElasticEmail/models/compression_format.rb +1 -1
  46. data/lib/ElasticEmail/models/consent_data.rb +4 -10
  47. data/lib/ElasticEmail/models/consent_tracking.rb +1 -1
  48. data/lib/ElasticEmail/models/contact.rb +4 -10
  49. data/lib/ElasticEmail/models/contact_activity.rb +4 -10
  50. data/lib/ElasticEmail/models/contact_payload.rb +4 -20
  51. data/lib/ElasticEmail/models/contact_source.rb +1 -1
  52. data/lib/ElasticEmail/models/contact_status.rb +1 -1
  53. data/lib/ElasticEmail/models/contact_update_payload.rb +4 -10
  54. data/lib/ElasticEmail/models/contacts_list.rb +4 -10
  55. data/lib/ElasticEmail/models/delivery_optimization_type.rb +1 -1
  56. data/lib/ElasticEmail/models/dkim_record.rb +4 -10
  57. data/lib/ElasticEmail/models/domain_data.rb +4 -10
  58. data/lib/ElasticEmail/models/domain_detail.rb +4 -10
  59. data/lib/ElasticEmail/models/domain_owner.rb +1 -1
  60. data/lib/ElasticEmail/models/domain_payload.rb +4 -10
  61. data/lib/ElasticEmail/models/domain_update_payload.rb +4 -10
  62. data/lib/ElasticEmail/models/email_content.rb +4 -20
  63. data/lib/ElasticEmail/models/email_data.rb +4 -10
  64. data/lib/ElasticEmail/models/email_job_failed_status.rb +4 -10
  65. data/lib/ElasticEmail/models/email_job_status.rb +4 -10
  66. data/lib/ElasticEmail/models/email_message_data.rb +4 -30
  67. data/lib/ElasticEmail/models/email_predicted_validation_status.rb +1 -1
  68. data/lib/ElasticEmail/models/email_recipient.rb +4 -20
  69. data/lib/ElasticEmail/models/email_send.rb +4 -10
  70. data/lib/ElasticEmail/models/email_status.rb +4 -10
  71. data/lib/ElasticEmail/models/email_transactional_message_data.rb +4 -30
  72. data/lib/ElasticEmail/models/email_validation_result.rb +4 -10
  73. data/lib/ElasticEmail/models/email_validation_status.rb +1 -1
  74. data/lib/ElasticEmail/models/email_view.rb +4 -10
  75. data/lib/ElasticEmail/models/emails_payload.rb +4 -10
  76. data/lib/ElasticEmail/models/encoding_type.rb +1 -1
  77. data/lib/ElasticEmail/models/event_type.rb +1 -1
  78. data/lib/ElasticEmail/models/events_order_by.rb +1 -1
  79. data/lib/ElasticEmail/models/export_file_formats.rb +1 -1
  80. data/lib/ElasticEmail/models/export_link.rb +4 -10
  81. data/lib/ElasticEmail/models/export_status.rb +1 -1
  82. data/lib/ElasticEmail/models/file_info.rb +4 -10
  83. data/lib/ElasticEmail/models/file_payload.rb +4 -20
  84. data/lib/ElasticEmail/models/file_upload_result.rb +4 -10
  85. data/lib/ElasticEmail/models/inbound_payload.rb +4 -50
  86. data/lib/ElasticEmail/models/inbound_route.rb +4 -10
  87. data/lib/ElasticEmail/models/inbound_route_action_type.rb +1 -1
  88. data/lib/ElasticEmail/models/inbound_route_filter_type.rb +1 -1
  89. data/lib/ElasticEmail/models/list_payload.rb +4 -20
  90. data/lib/ElasticEmail/models/list_update_payload.rb +4 -10
  91. data/lib/ElasticEmail/models/log_job_status.rb +1 -1
  92. data/lib/ElasticEmail/models/log_status_summary.rb +4 -10
  93. data/lib/ElasticEmail/models/merge_email_payload.rb +4 -30
  94. data/lib/ElasticEmail/models/message_attachment.rb +4 -30
  95. data/lib/ElasticEmail/models/message_category.rb +1 -1
  96. data/lib/ElasticEmail/models/message_category_enum.rb +1 -1
  97. data/lib/ElasticEmail/models/new_api_key.rb +4 -10
  98. data/lib/ElasticEmail/models/new_smtp_credentials.rb +4 -10
  99. data/lib/ElasticEmail/models/options.rb +4 -10
  100. data/lib/ElasticEmail/models/recipient_event.rb +4 -10
  101. data/lib/ElasticEmail/models/segment.rb +4 -10
  102. data/lib/ElasticEmail/models/segment_payload.rb +4 -30
  103. data/lib/ElasticEmail/models/smtp_credentials.rb +4 -10
  104. data/lib/ElasticEmail/models/smtp_credentials_payload.rb +4 -20
  105. data/lib/ElasticEmail/models/sort_order_item.rb +4 -30
  106. data/lib/ElasticEmail/models/split_optimization_type.rb +1 -1
  107. data/lib/ElasticEmail/models/split_options.rb +4 -10
  108. data/lib/ElasticEmail/models/sub_account_info.rb +4 -10
  109. data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +4 -20
  110. data/lib/ElasticEmail/models/subaccount_email_settings.rb +4 -10
  111. data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +4 -10
  112. data/lib/ElasticEmail/models/subaccount_payload.rb +4 -30
  113. data/lib/ElasticEmail/models/subaccount_settings_info.rb +4 -10
  114. data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +4 -10
  115. data/lib/ElasticEmail/models/suppression.rb +4 -10
  116. data/lib/ElasticEmail/models/template.rb +4 -10
  117. data/lib/ElasticEmail/models/template_payload.rb +4 -20
  118. data/lib/ElasticEmail/models/template_scope.rb +1 -1
  119. data/lib/ElasticEmail/models/template_type.rb +1 -1
  120. data/lib/ElasticEmail/models/tracking_type.rb +1 -1
  121. data/lib/ElasticEmail/models/tracking_validation_status.rb +1 -1
  122. data/lib/ElasticEmail/models/transactional_recipient.rb +4 -20
  123. data/lib/ElasticEmail/models/utm.rb +4 -10
  124. data/lib/ElasticEmail/models/verification_file_result.rb +4 -10
  125. data/lib/ElasticEmail/models/verification_file_result_details.rb +4 -10
  126. data/lib/ElasticEmail/models/verification_status.rb +1 -1
  127. data/lib/ElasticEmail/models/webhook.rb +61 -14
  128. data/lib/ElasticEmail/models/webhook_create_payload.rb +52 -34
  129. data/lib/ElasticEmail/models/webhook_delivery_method.rb +40 -0
  130. data/lib/ElasticEmail/models/webhook_update_payload.rb +4 -10
  131. data/lib/ElasticEmail/version.rb +2 -2
  132. data/lib/ElasticEmail.rb +2 -1
  133. data/spec/api/campaigns_api_spec.rb +1 -1
  134. data/spec/api/contacts_api_spec.rb +1 -1
  135. data/spec/api/domains_api_spec.rb +1 -1
  136. data/spec/api/emails_api_spec.rb +1 -1
  137. data/spec/api/events_api_spec.rb +1 -1
  138. data/spec/api/files_api_spec.rb +1 -1
  139. data/spec/api/inbound_route_api_spec.rb +1 -1
  140. data/spec/api/lists_api_spec.rb +1 -1
  141. data/spec/api/security_api_spec.rb +1 -1
  142. data/spec/api/segments_api_spec.rb +1 -1
  143. data/spec/api/statistics_api_spec.rb +1 -1
  144. data/spec/api/sub_accounts_api_spec.rb +1 -1
  145. data/spec/api/suppressions_api_spec.rb +1 -1
  146. data/spec/api/templates_api_spec.rb +1 -1
  147. data/spec/api/verifications_api_spec.rb +1 -1
  148. data/spec/api/webhook_api_spec.rb +13 -1
  149. data/spec/models/access_level_spec.rb +1 -1
  150. data/spec/models/account_status_enum_spec.rb +1 -1
  151. data/spec/models/api_key_payload_spec.rb +1 -1
  152. data/spec/models/api_key_spec.rb +1 -1
  153. data/spec/models/body_content_type_spec.rb +1 -1
  154. data/spec/models/body_part_spec.rb +1 -1
  155. data/spec/models/campaign_options_spec.rb +1 -1
  156. data/spec/models/campaign_recipient_spec.rb +1 -1
  157. data/spec/models/campaign_spec.rb +1 -1
  158. data/spec/models/campaign_status_spec.rb +1 -1
  159. data/spec/models/campaign_template_spec.rb +1 -1
  160. data/spec/models/certificate_validation_status_spec.rb +1 -1
  161. data/spec/models/channel_log_status_summary_spec.rb +1 -1
  162. data/spec/models/compression_format_spec.rb +1 -1
  163. data/spec/models/consent_data_spec.rb +1 -1
  164. data/spec/models/consent_tracking_spec.rb +1 -1
  165. data/spec/models/contact_activity_spec.rb +1 -1
  166. data/spec/models/contact_payload_spec.rb +1 -1
  167. data/spec/models/contact_source_spec.rb +1 -1
  168. data/spec/models/contact_spec.rb +1 -1
  169. data/spec/models/contact_status_spec.rb +1 -1
  170. data/spec/models/contact_update_payload_spec.rb +1 -1
  171. data/spec/models/contacts_list_spec.rb +1 -1
  172. data/spec/models/delivery_optimization_type_spec.rb +1 -1
  173. data/spec/models/dkim_record_spec.rb +1 -1
  174. data/spec/models/domain_data_spec.rb +1 -1
  175. data/spec/models/domain_detail_spec.rb +1 -1
  176. data/spec/models/domain_owner_spec.rb +1 -1
  177. data/spec/models/domain_payload_spec.rb +1 -1
  178. data/spec/models/domain_update_payload_spec.rb +1 -1
  179. data/spec/models/email_content_spec.rb +1 -1
  180. data/spec/models/email_data_spec.rb +1 -1
  181. data/spec/models/email_job_failed_status_spec.rb +1 -1
  182. data/spec/models/email_job_status_spec.rb +1 -1
  183. data/spec/models/email_message_data_spec.rb +1 -1
  184. data/spec/models/email_predicted_validation_status_spec.rb +1 -1
  185. data/spec/models/email_recipient_spec.rb +1 -1
  186. data/spec/models/email_send_spec.rb +1 -1
  187. data/spec/models/email_status_spec.rb +1 -1
  188. data/spec/models/email_transactional_message_data_spec.rb +1 -1
  189. data/spec/models/email_validation_result_spec.rb +1 -1
  190. data/spec/models/email_validation_status_spec.rb +1 -1
  191. data/spec/models/email_view_spec.rb +1 -1
  192. data/spec/models/emails_payload_spec.rb +1 -1
  193. data/spec/models/encoding_type_spec.rb +1 -1
  194. data/spec/models/event_type_spec.rb +1 -1
  195. data/spec/models/events_order_by_spec.rb +1 -1
  196. data/spec/models/export_file_formats_spec.rb +1 -1
  197. data/spec/models/export_link_spec.rb +1 -1
  198. data/spec/models/export_status_spec.rb +1 -1
  199. data/spec/models/file_info_spec.rb +1 -1
  200. data/spec/models/file_payload_spec.rb +1 -1
  201. data/spec/models/file_upload_result_spec.rb +1 -1
  202. data/spec/models/inbound_payload_spec.rb +1 -1
  203. data/spec/models/inbound_route_action_type_spec.rb +1 -1
  204. data/spec/models/inbound_route_filter_type_spec.rb +1 -1
  205. data/spec/models/inbound_route_spec.rb +1 -1
  206. data/spec/models/list_payload_spec.rb +1 -1
  207. data/spec/models/list_update_payload_spec.rb +1 -1
  208. data/spec/models/log_job_status_spec.rb +1 -1
  209. data/spec/models/log_status_summary_spec.rb +1 -1
  210. data/spec/models/merge_email_payload_spec.rb +1 -1
  211. data/spec/models/message_attachment_spec.rb +1 -1
  212. data/spec/models/message_category_enum_spec.rb +1 -1
  213. data/spec/models/message_category_spec.rb +1 -1
  214. data/spec/models/new_api_key_spec.rb +1 -1
  215. data/spec/models/new_smtp_credentials_spec.rb +1 -1
  216. data/spec/models/options_spec.rb +1 -1
  217. data/spec/models/recipient_event_spec.rb +1 -1
  218. data/spec/models/segment_payload_spec.rb +1 -1
  219. data/spec/models/segment_spec.rb +1 -1
  220. data/spec/models/smtp_credentials_payload_spec.rb +1 -1
  221. data/spec/models/smtp_credentials_spec.rb +1 -1
  222. data/spec/models/sort_order_item_spec.rb +1 -1
  223. data/spec/models/split_optimization_type_spec.rb +1 -1
  224. data/spec/models/split_options_spec.rb +1 -1
  225. data/spec/models/sub_account_info_spec.rb +1 -1
  226. data/spec/models/subaccount_email_credits_payload_spec.rb +1 -1
  227. data/spec/models/subaccount_email_settings_payload_spec.rb +1 -1
  228. data/spec/models/subaccount_email_settings_spec.rb +1 -1
  229. data/spec/models/subaccount_payload_spec.rb +1 -1
  230. data/spec/models/subaccount_settings_info_payload_spec.rb +1 -1
  231. data/spec/models/subaccount_settings_info_spec.rb +1 -1
  232. data/spec/models/suppression_spec.rb +1 -1
  233. data/spec/models/template_payload_spec.rb +1 -1
  234. data/spec/models/template_scope_spec.rb +1 -1
  235. data/spec/models/template_spec.rb +1 -1
  236. data/spec/models/template_type_spec.rb +1 -1
  237. data/spec/models/tracking_type_spec.rb +1 -1
  238. data/spec/models/tracking_validation_status_spec.rb +1 -1
  239. data/spec/models/transactional_recipient_spec.rb +1 -1
  240. data/spec/models/utm_spec.rb +1 -1
  241. data/spec/models/verification_file_result_details_spec.rb +1 -1
  242. data/spec/models/verification_file_result_spec.rb +1 -1
  243. data/spec/models/verification_status_spec.rb +1 -1
  244. data/spec/models/webhook_create_payload_spec.rb +13 -1
  245. data/spec/models/webhook_delivery_method_spec.rb +30 -0
  246. data/spec/models/webhook_spec.rb +19 -1
  247. data/spec/models/webhook_update_payload_spec.rb +1 -1
  248. data/spec/spec_helper.rb +1 -1
  249. metadata +110 -102
@@ -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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -25,14 +25,9 @@ module ElasticEmail
25
25
  }
26
26
  end
27
27
 
28
- # Returns attribute mapping this model knows about
29
- def self.acceptable_attribute_map
30
- attribute_map
31
- end
32
-
33
28
  # Returns all the JSON keys this model knows about
34
29
  def self.acceptable_attributes
35
- acceptable_attribute_map.values
30
+ attribute_map.values
36
31
  end
37
32
 
38
33
  # Attribute type mapping.
@@ -56,10 +51,9 @@ module ElasticEmail
56
51
  end
57
52
 
58
53
  # check to see if the attribute exists and convert string to symbol for hash key
59
- acceptable_attribute_map = self.class.acceptable_attribute_map
60
54
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
- if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::SubaccountSettingsInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::SubaccountSettingsInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
57
  end
64
58
  h[k.to_sym] = v
65
59
  }
@@ -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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -25,14 +25,9 @@ module ElasticEmail
25
25
  }
26
26
  end
27
27
 
28
- # Returns attribute mapping this model knows about
29
- def self.acceptable_attribute_map
30
- attribute_map
31
- end
32
-
33
28
  # Returns all the JSON keys this model knows about
34
29
  def self.acceptable_attributes
35
- acceptable_attribute_map.values
30
+ attribute_map.values
36
31
  end
37
32
 
38
33
  # Attribute type mapping.
@@ -56,10 +51,9 @@ module ElasticEmail
56
51
  end
57
52
 
58
53
  # check to see if the attribute exists and convert string to symbol for hash key
59
- acceptable_attribute_map = self.class.acceptable_attribute_map
60
54
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
- if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::SubaccountSettingsInfoPayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::SubaccountSettingsInfoPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
57
  end
64
58
  h[k.to_sym] = v
65
59
  }
@@ -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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -38,14 +38,9 @@ module ElasticEmail
38
38
  }
39
39
  end
40
40
 
41
- # Returns attribute mapping this model knows about
42
- def self.acceptable_attribute_map
43
- attribute_map
44
- end
45
-
46
41
  # Returns all the JSON keys this model knows about
47
42
  def self.acceptable_attributes
48
- acceptable_attribute_map.values
43
+ attribute_map.values
49
44
  end
50
45
 
51
46
  # Attribute type mapping.
@@ -74,10 +69,9 @@ module ElasticEmail
74
69
  end
75
70
 
76
71
  # check to see if the attribute exists and convert string to symbol for hash key
77
- acceptable_attribute_map = self.class.acceptable_attribute_map
78
72
  attributes = attributes.each_with_object({}) { |(k, v), h|
79
- if (!acceptable_attribute_map.key?(k.to_sym))
80
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Suppression`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ if (!self.class.attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Suppression`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
75
  end
82
76
  h[k.to_sym] = v
83
77
  }
@@ -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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -66,14 +66,9 @@ module ElasticEmail
66
66
  }
67
67
  end
68
68
 
69
- # Returns attribute mapping this model knows about
70
- def self.acceptable_attribute_map
71
- attribute_map
72
- end
73
-
74
69
  # Returns all the JSON keys this model knows about
75
70
  def self.acceptable_attributes
76
- acceptable_attribute_map.values
71
+ attribute_map.values
77
72
  end
78
73
 
79
74
  # Attribute type mapping.
@@ -102,10 +97,9 @@ module ElasticEmail
102
97
  end
103
98
 
104
99
  # check to see if the attribute exists and convert string to symbol for hash key
105
- acceptable_attribute_map = self.class.acceptable_attribute_map
106
100
  attributes = attributes.each_with_object({}) { |(k, v), h|
107
- if (!acceptable_attribute_map.key?(k.to_sym))
108
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Template`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
101
+ if (!self.class.attribute_map.key?(k.to_sym))
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Template`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
103
  end
110
104
  h[k.to_sym] = v
111
105
  }
@@ -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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -59,14 +59,9 @@ module ElasticEmail
59
59
  }
60
60
  end
61
61
 
62
- # Returns attribute mapping this model knows about
63
- def self.acceptable_attribute_map
64
- attribute_map
65
- end
66
-
67
62
  # Returns all the JSON keys this model knows about
68
63
  def self.acceptable_attributes
69
- acceptable_attribute_map.values
64
+ attribute_map.values
70
65
  end
71
66
 
72
67
  # Attribute type mapping.
@@ -93,10 +88,9 @@ module ElasticEmail
93
88
  end
94
89
 
95
90
  # check to see if the attribute exists and convert string to symbol for hash key
96
- acceptable_attribute_map = self.class.acceptable_attribute_map
97
91
  attributes = attributes.each_with_object({}) { |(k, v), h|
98
- if (!acceptable_attribute_map.key?(k.to_sym))
99
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::TemplatePayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
+ if (!self.class.attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::TemplatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
100
94
  end
101
95
  h[k.to_sym] = v
102
96
  }
@@ -144,16 +138,6 @@ module ElasticEmail
144
138
  true
145
139
  end
146
140
 
147
- # Custom attribute writer method with validation
148
- # @param [Object] name Value to be assigned
149
- def name=(name)
150
- if name.nil?
151
- fail ArgumentError, 'name cannot be nil'
152
- end
153
-
154
- @name = name
155
- end
156
-
157
141
  # Checks equality by comparing each attribute.
158
142
  # @param [Object] Object to be compared
159
143
  def ==(o)
@@ -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.14.0
9
+ Generator version: 7.11.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.14.0
9
+ Generator version: 7.11.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.14.0
9
+ Generator version: 7.11.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.14.0
9
+ Generator version: 7.11.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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -34,14 +34,9 @@ module ElasticEmail
34
34
  }
35
35
  end
36
36
 
37
- # Returns attribute mapping this model knows about
38
- def self.acceptable_attribute_map
39
- attribute_map
40
- end
41
-
42
37
  # Returns all the JSON keys this model knows about
43
38
  def self.acceptable_attributes
44
- acceptable_attribute_map.values
39
+ attribute_map.values
45
40
  end
46
41
 
47
42
  # Attribute type mapping.
@@ -67,10 +62,9 @@ module ElasticEmail
67
62
  end
68
63
 
69
64
  # check to see if the attribute exists and convert string to symbol for hash key
70
- acceptable_attribute_map = self.class.acceptable_attribute_map
71
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
72
- if (!acceptable_attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::TransactionalRecipient`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::TransactionalRecipient`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
68
  end
75
69
  h[k.to_sym] = v
76
70
  }
@@ -116,16 +110,6 @@ module ElasticEmail
116
110
  true
117
111
  end
118
112
 
119
- # Custom attribute writer method with validation
120
- # @param [Object] to Value to be assigned
121
- def to=(to)
122
- if to.nil?
123
- fail ArgumentError, 'to cannot be nil'
124
- end
125
-
126
- @to = to
127
- end
128
-
129
113
  # Checks equality by comparing each attribute.
130
114
  # @param [Object] Object to be compared
131
115
  def ==(o)
@@ -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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -38,14 +38,9 @@ module ElasticEmail
38
38
  }
39
39
  end
40
40
 
41
- # Returns attribute mapping this model knows about
42
- def self.acceptable_attribute_map
43
- attribute_map
44
- end
45
-
46
41
  # Returns all the JSON keys this model knows about
47
42
  def self.acceptable_attributes
48
- acceptable_attribute_map.values
43
+ attribute_map.values
49
44
  end
50
45
 
51
46
  # Attribute type mapping.
@@ -72,10 +67,9 @@ module ElasticEmail
72
67
  end
73
68
 
74
69
  # check to see if the attribute exists and convert string to symbol for hash key
75
- acceptable_attribute_map = self.class.acceptable_attribute_map
76
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
77
- if (!acceptable_attribute_map.key?(k.to_sym))
78
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Utm`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Utm`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
73
  end
80
74
  h[k.to_sym] = v
81
75
  }
@@ -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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -66,14 +66,9 @@ module ElasticEmail
66
66
  }
67
67
  end
68
68
 
69
- # Returns attribute mapping this model knows about
70
- def self.acceptable_attribute_map
71
- attribute_map
72
- end
73
-
74
69
  # Returns all the JSON keys this model knows about
75
70
  def self.acceptable_attributes
76
- acceptable_attribute_map.values
71
+ attribute_map.values
77
72
  end
78
73
 
79
74
  # Attribute type mapping.
@@ -102,10 +97,9 @@ module ElasticEmail
102
97
  end
103
98
 
104
99
  # check to see if the attribute exists and convert string to symbol for hash key
105
- acceptable_attribute_map = self.class.acceptable_attribute_map
106
100
  attributes = attributes.each_with_object({}) { |(k, v), h|
107
- if (!acceptable_attribute_map.key?(k.to_sym))
108
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::VerificationFileResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
101
+ if (!self.class.attribute_map.key?(k.to_sym))
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::VerificationFileResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
103
  end
110
104
  h[k.to_sym] = v
111
105
  }
@@ -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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -70,14 +70,9 @@ module ElasticEmail
70
70
  }
71
71
  end
72
72
 
73
- # Returns attribute mapping this model knows about
74
- def self.acceptable_attribute_map
75
- attribute_map
76
- end
77
-
78
73
  # Returns all the JSON keys this model knows about
79
74
  def self.acceptable_attributes
80
- acceptable_attribute_map.values
75
+ attribute_map.values
81
76
  end
82
77
 
83
78
  # Attribute type mapping.
@@ -107,10 +102,9 @@ module ElasticEmail
107
102
  end
108
103
 
109
104
  # check to see if the attribute exists and convert string to symbol for hash key
110
- acceptable_attribute_map = self.class.acceptable_attribute_map
111
105
  attributes = attributes.each_with_object({}) { |(k, v), h|
112
- if (!acceptable_attribute_map.key?(k.to_sym))
113
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::VerificationFileResultDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
106
+ if (!self.class.attribute_map.key?(k.to_sym))
107
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::VerificationFileResultDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
114
108
  end
115
109
  h[k.to_sym] = v
116
110
  }
@@ -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.14.0
9
+ Generator version: 7.11.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.14.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -47,6 +47,36 @@ module ElasticEmail
47
47
 
48
48
  attr_accessor :is_enabled
49
49
 
50
+ # Requests carry an HMAC-SHA256 signature. Chosen when the webhook is created and can't be changed.
51
+ attr_accessor :signing_enabled
52
+
53
+ attr_accessor :delivery_method
54
+
55
+ # Signing secret - returned only once, when a webhook is created with signing or its secret is rotated. Store it safely.
56
+ attr_accessor :signing_secret
57
+
58
+ class EnumAttributeValidator
59
+ attr_reader :datatype
60
+ attr_reader :allowable_values
61
+
62
+ def initialize(datatype, allowable_values)
63
+ @allowable_values = allowable_values.map do |value|
64
+ case datatype.to_s
65
+ when /Integer/i
66
+ value.to_i
67
+ when /Float/i
68
+ value.to_f
69
+ else
70
+ value
71
+ end
72
+ end
73
+ end
74
+
75
+ def valid?(value)
76
+ !value || allowable_values.include?(value)
77
+ end
78
+ end
79
+
50
80
  # Attribute mapping from ruby-style variable name to JSON key.
51
81
  def self.attribute_map
52
82
  {
@@ -62,18 +92,16 @@ module ElasticEmail
62
92
  :'notification_for_unsubscribed' => :'NotificationForUnsubscribed',
63
93
  :'notification_for_abuse_report' => :'NotificationForAbuseReport',
64
94
  :'notification_for_error' => :'NotificationForError',
65
- :'is_enabled' => :'IsEnabled'
95
+ :'is_enabled' => :'IsEnabled',
96
+ :'signing_enabled' => :'SigningEnabled',
97
+ :'delivery_method' => :'DeliveryMethod',
98
+ :'signing_secret' => :'SigningSecret'
66
99
  }
67
100
  end
68
101
 
69
- # Returns attribute mapping this model knows about
70
- def self.acceptable_attribute_map
71
- attribute_map
72
- end
73
-
74
102
  # Returns all the JSON keys this model knows about
75
103
  def self.acceptable_attributes
76
- acceptable_attribute_map.values
104
+ attribute_map.values
77
105
  end
78
106
 
79
107
  # Attribute type mapping.
@@ -91,7 +119,10 @@ module ElasticEmail
91
119
  :'notification_for_unsubscribed' => :'Boolean',
92
120
  :'notification_for_abuse_report' => :'Boolean',
93
121
  :'notification_for_error' => :'Boolean',
94
- :'is_enabled' => :'Boolean'
122
+ :'is_enabled' => :'Boolean',
123
+ :'signing_enabled' => :'Boolean',
124
+ :'delivery_method' => :'WebhookDeliveryMethod',
125
+ :'signing_secret' => :'String'
95
126
  }
96
127
  end
97
128
 
@@ -111,10 +142,9 @@ module ElasticEmail
111
142
  end
112
143
 
113
144
  # check to see if the attribute exists and convert string to symbol for hash key
114
- acceptable_attribute_map = self.class.acceptable_attribute_map
115
145
  attributes = attributes.each_with_object({}) { |(k, v), h|
116
- if (!acceptable_attribute_map.key?(k.to_sym))
117
- fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Webhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
146
+ if (!self.class.attribute_map.key?(k.to_sym))
147
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Webhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
118
148
  end
119
149
  h[k.to_sym] = v
120
150
  }
@@ -170,6 +200,20 @@ module ElasticEmail
170
200
  if attributes.key?(:'is_enabled')
171
201
  self.is_enabled = attributes[:'is_enabled']
172
202
  end
203
+
204
+ if attributes.key?(:'signing_enabled')
205
+ self.signing_enabled = attributes[:'signing_enabled']
206
+ end
207
+
208
+ if attributes.key?(:'delivery_method')
209
+ self.delivery_method = attributes[:'delivery_method']
210
+ else
211
+ self.delivery_method = 'Get'
212
+ end
213
+
214
+ if attributes.key?(:'signing_secret')
215
+ self.signing_secret = attributes[:'signing_secret']
216
+ end
173
217
  end
174
218
 
175
219
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -204,7 +248,10 @@ module ElasticEmail
204
248
  notification_for_unsubscribed == o.notification_for_unsubscribed &&
205
249
  notification_for_abuse_report == o.notification_for_abuse_report &&
206
250
  notification_for_error == o.notification_for_error &&
207
- is_enabled == o.is_enabled
251
+ is_enabled == o.is_enabled &&
252
+ signing_enabled == o.signing_enabled &&
253
+ delivery_method == o.delivery_method &&
254
+ signing_secret == o.signing_secret
208
255
  end
209
256
 
210
257
  # @see the `==` method
@@ -216,7 +263,7 @@ module ElasticEmail
216
263
  # Calculates hash code according to all attributes.
217
264
  # @return [Integer] Hash code
218
265
  def hash
219
- [webhook_id, name, date_created, date_updated, url, notify_once_per_email, notification_for_sent, notification_for_opened, notification_for_clicked, notification_for_unsubscribed, notification_for_abuse_report, notification_for_error, is_enabled].hash
266
+ [webhook_id, name, date_created, date_updated, url, notify_once_per_email, notification_for_sent, notification_for_opened, notification_for_clicked, notification_for_unsubscribed, notification_for_abuse_report, notification_for_error, is_enabled, signing_enabled, delivery_method, signing_secret].hash
220
267
  end
221
268
 
222
269
  # Builds the object from hash