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
@@ -0,0 +1,372 @@
1
+ # ElasticEmail::WebhookApi
2
+
3
+ All URIs are relative to *https://api.elasticemail.com/v4*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**webhook_by_publicid_delete**](WebhookApi.md#webhook_by_publicid_delete) | **DELETE** /webhook/{publicid} | Delete Webhook |
8
+ | [**webhook_by_publicid_get**](WebhookApi.md#webhook_by_publicid_get) | **GET** /webhook/{publicid} | Load Webhook |
9
+ | [**webhook_by_publicid_put**](WebhookApi.md#webhook_by_publicid_put) | **PUT** /webhook/{publicid} | Update Webhook |
10
+ | [**webhook_get**](WebhookApi.md#webhook_get) | **GET** /webhook | Load Webhooks |
11
+ | [**webhook_post**](WebhookApi.md#webhook_post) | **POST** /webhook | Add Webhook |
12
+
13
+
14
+ ## webhook_by_publicid_delete
15
+
16
+ > webhook_by_publicid_delete(publicid)
17
+
18
+ Delete Webhook
19
+
20
+ Delete the specified notifications webhook. Required Access Level: ModifyWebNotifications
21
+
22
+ ### Examples
23
+
24
+ ```ruby
25
+ require 'time'
26
+ require 'ElasticEmail'
27
+ # setup authorization
28
+ ElasticEmail.configure do |config|
29
+ # Configure API key authorization: apikey
30
+ config.api_key['X-ElasticEmail-ApiKey'] = 'YOUR API KEY'
31
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
32
+ # config.api_key_prefix['X-ElasticEmail-ApiKey'] = 'Bearer'
33
+ end
34
+
35
+ api_instance = ElasticEmail::WebhookApi.new
36
+ publicid = 'publicid_example' # String |
37
+
38
+ begin
39
+ # Delete Webhook
40
+ api_instance.webhook_by_publicid_delete(publicid)
41
+ rescue ElasticEmail::ApiError => e
42
+ puts "Error when calling WebhookApi->webhook_by_publicid_delete: #{e}"
43
+ end
44
+ ```
45
+
46
+ #### Using the webhook_by_publicid_delete_with_http_info variant
47
+
48
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
49
+
50
+ > <Array(nil, Integer, Hash)> webhook_by_publicid_delete_with_http_info(publicid)
51
+
52
+ ```ruby
53
+ begin
54
+ # Delete Webhook
55
+ data, status_code, headers = api_instance.webhook_by_publicid_delete_with_http_info(publicid)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => nil
59
+ rescue ElasticEmail::ApiError => e
60
+ puts "Error when calling WebhookApi->webhook_by_publicid_delete_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **publicid** | **String** | | |
69
+
70
+ ### Return type
71
+
72
+ nil (empty response body)
73
+
74
+ ### Authorization
75
+
76
+ [apikey](../README.md#apikey)
77
+
78
+ ### HTTP request headers
79
+
80
+ - **Content-Type**: Not defined
81
+ - **Accept**: Not defined
82
+
83
+
84
+ ## webhook_by_publicid_get
85
+
86
+ > <Webhook> webhook_by_publicid_get(publicid)
87
+
88
+ Load Webhook
89
+
90
+ Load notifications webhook details. Required Access Level: ViewWebNotifications
91
+
92
+ ### Examples
93
+
94
+ ```ruby
95
+ require 'time'
96
+ require 'ElasticEmail'
97
+ # setup authorization
98
+ ElasticEmail.configure do |config|
99
+ # Configure API key authorization: apikey
100
+ config.api_key['X-ElasticEmail-ApiKey'] = 'YOUR API KEY'
101
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
102
+ # config.api_key_prefix['X-ElasticEmail-ApiKey'] = 'Bearer'
103
+ end
104
+
105
+ api_instance = ElasticEmail::WebhookApi.new
106
+ publicid = 'publicid_example' # String |
107
+
108
+ begin
109
+ # Load Webhook
110
+ result = api_instance.webhook_by_publicid_get(publicid)
111
+ p result
112
+ rescue ElasticEmail::ApiError => e
113
+ puts "Error when calling WebhookApi->webhook_by_publicid_get: #{e}"
114
+ end
115
+ ```
116
+
117
+ #### Using the webhook_by_publicid_get_with_http_info variant
118
+
119
+ This returns an Array which contains the response data, status code and headers.
120
+
121
+ > <Array(<Webhook>, Integer, Hash)> webhook_by_publicid_get_with_http_info(publicid)
122
+
123
+ ```ruby
124
+ begin
125
+ # Load Webhook
126
+ data, status_code, headers = api_instance.webhook_by_publicid_get_with_http_info(publicid)
127
+ p status_code # => 2xx
128
+ p headers # => { ... }
129
+ p data # => <Webhook>
130
+ rescue ElasticEmail::ApiError => e
131
+ puts "Error when calling WebhookApi->webhook_by_publicid_get_with_http_info: #{e}"
132
+ end
133
+ ```
134
+
135
+ ### Parameters
136
+
137
+ | Name | Type | Description | Notes |
138
+ | ---- | ---- | ----------- | ----- |
139
+ | **publicid** | **String** | | |
140
+
141
+ ### Return type
142
+
143
+ [**Webhook**](Webhook.md)
144
+
145
+ ### Authorization
146
+
147
+ [apikey](../README.md#apikey)
148
+
149
+ ### HTTP request headers
150
+
151
+ - **Content-Type**: Not defined
152
+ - **Accept**: application/json
153
+
154
+
155
+ ## webhook_by_publicid_put
156
+
157
+ > <Webhook> webhook_by_publicid_put(publicid, webhook_update_payload)
158
+
159
+ Update Webhook
160
+
161
+ Update notification webhook. Required Access Level: ModifyWebNotifications
162
+
163
+ ### Examples
164
+
165
+ ```ruby
166
+ require 'time'
167
+ require 'ElasticEmail'
168
+ # setup authorization
169
+ ElasticEmail.configure do |config|
170
+ # Configure API key authorization: apikey
171
+ config.api_key['X-ElasticEmail-ApiKey'] = 'YOUR API KEY'
172
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
173
+ # config.api_key_prefix['X-ElasticEmail-ApiKey'] = 'Bearer'
174
+ end
175
+
176
+ api_instance = ElasticEmail::WebhookApi.new
177
+ publicid = 'publicid_example' # String |
178
+ webhook_update_payload = ElasticEmail::WebhookUpdatePayload.new # WebhookUpdatePayload |
179
+
180
+ begin
181
+ # Update Webhook
182
+ result = api_instance.webhook_by_publicid_put(publicid, webhook_update_payload)
183
+ p result
184
+ rescue ElasticEmail::ApiError => e
185
+ puts "Error when calling WebhookApi->webhook_by_publicid_put: #{e}"
186
+ end
187
+ ```
188
+
189
+ #### Using the webhook_by_publicid_put_with_http_info variant
190
+
191
+ This returns an Array which contains the response data, status code and headers.
192
+
193
+ > <Array(<Webhook>, Integer, Hash)> webhook_by_publicid_put_with_http_info(publicid, webhook_update_payload)
194
+
195
+ ```ruby
196
+ begin
197
+ # Update Webhook
198
+ data, status_code, headers = api_instance.webhook_by_publicid_put_with_http_info(publicid, webhook_update_payload)
199
+ p status_code # => 2xx
200
+ p headers # => { ... }
201
+ p data # => <Webhook>
202
+ rescue ElasticEmail::ApiError => e
203
+ puts "Error when calling WebhookApi->webhook_by_publicid_put_with_http_info: #{e}"
204
+ end
205
+ ```
206
+
207
+ ### Parameters
208
+
209
+ | Name | Type | Description | Notes |
210
+ | ---- | ---- | ----------- | ----- |
211
+ | **publicid** | **String** | | |
212
+ | **webhook_update_payload** | [**WebhookUpdatePayload**](WebhookUpdatePayload.md) | | |
213
+
214
+ ### Return type
215
+
216
+ [**Webhook**](Webhook.md)
217
+
218
+ ### Authorization
219
+
220
+ [apikey](../README.md#apikey)
221
+
222
+ ### HTTP request headers
223
+
224
+ - **Content-Type**: application/json
225
+ - **Accept**: application/json
226
+
227
+
228
+ ## webhook_get
229
+
230
+ > <Array<Webhook>> webhook_get(opts)
231
+
232
+ Load Webhooks
233
+
234
+ Returns a list of notification webhooks. Required Access Level: ViewWebNotifications
235
+
236
+ ### Examples
237
+
238
+ ```ruby
239
+ require 'time'
240
+ require 'ElasticEmail'
241
+ # setup authorization
242
+ ElasticEmail.configure do |config|
243
+ # Configure API key authorization: apikey
244
+ config.api_key['X-ElasticEmail-ApiKey'] = 'YOUR API KEY'
245
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
+ # config.api_key_prefix['X-ElasticEmail-ApiKey'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = ElasticEmail::WebhookApi.new
250
+ opts = {
251
+ limit: 100, # Integer | Maximum number of returned items.
252
+ offset: 20 # Integer | How many items should be returned ahead.
253
+ }
254
+
255
+ begin
256
+ # Load Webhooks
257
+ result = api_instance.webhook_get(opts)
258
+ p result
259
+ rescue ElasticEmail::ApiError => e
260
+ puts "Error when calling WebhookApi->webhook_get: #{e}"
261
+ end
262
+ ```
263
+
264
+ #### Using the webhook_get_with_http_info variant
265
+
266
+ This returns an Array which contains the response data, status code and headers.
267
+
268
+ > <Array(<Array<Webhook>>, Integer, Hash)> webhook_get_with_http_info(opts)
269
+
270
+ ```ruby
271
+ begin
272
+ # Load Webhooks
273
+ data, status_code, headers = api_instance.webhook_get_with_http_info(opts)
274
+ p status_code # => 2xx
275
+ p headers # => { ... }
276
+ p data # => <Array<Webhook>>
277
+ rescue ElasticEmail::ApiError => e
278
+ puts "Error when calling WebhookApi->webhook_get_with_http_info: #{e}"
279
+ end
280
+ ```
281
+
282
+ ### Parameters
283
+
284
+ | Name | Type | Description | Notes |
285
+ | ---- | ---- | ----------- | ----- |
286
+ | **limit** | **Integer** | Maximum number of returned items. | [optional] |
287
+ | **offset** | **Integer** | How many items should be returned ahead. | [optional] |
288
+
289
+ ### Return type
290
+
291
+ [**Array&lt;Webhook&gt;**](Webhook.md)
292
+
293
+ ### Authorization
294
+
295
+ [apikey](../README.md#apikey)
296
+
297
+ ### HTTP request headers
298
+
299
+ - **Content-Type**: Not defined
300
+ - **Accept**: application/json
301
+
302
+
303
+ ## webhook_post
304
+
305
+ > <Webhook> webhook_post(webhook_create_payload)
306
+
307
+ Add Webhook
308
+
309
+ Add a notification webhook. Required Access Level: ModifyWebNotifications
310
+
311
+ ### Examples
312
+
313
+ ```ruby
314
+ require 'time'
315
+ require 'ElasticEmail'
316
+ # setup authorization
317
+ ElasticEmail.configure do |config|
318
+ # Configure API key authorization: apikey
319
+ config.api_key['X-ElasticEmail-ApiKey'] = 'YOUR API KEY'
320
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
321
+ # config.api_key_prefix['X-ElasticEmail-ApiKey'] = 'Bearer'
322
+ end
323
+
324
+ api_instance = ElasticEmail::WebhookApi.new
325
+ webhook_create_payload = ElasticEmail::WebhookCreatePayload.new({name: 'attachment.txt', url: 'http://address.for.notification.com'}) # WebhookCreatePayload |
326
+
327
+ begin
328
+ # Add Webhook
329
+ result = api_instance.webhook_post(webhook_create_payload)
330
+ p result
331
+ rescue ElasticEmail::ApiError => e
332
+ puts "Error when calling WebhookApi->webhook_post: #{e}"
333
+ end
334
+ ```
335
+
336
+ #### Using the webhook_post_with_http_info variant
337
+
338
+ This returns an Array which contains the response data, status code and headers.
339
+
340
+ > <Array(<Webhook>, Integer, Hash)> webhook_post_with_http_info(webhook_create_payload)
341
+
342
+ ```ruby
343
+ begin
344
+ # Add Webhook
345
+ data, status_code, headers = api_instance.webhook_post_with_http_info(webhook_create_payload)
346
+ p status_code # => 2xx
347
+ p headers # => { ... }
348
+ p data # => <Webhook>
349
+ rescue ElasticEmail::ApiError => e
350
+ puts "Error when calling WebhookApi->webhook_post_with_http_info: #{e}"
351
+ end
352
+ ```
353
+
354
+ ### Parameters
355
+
356
+ | Name | Type | Description | Notes |
357
+ | ---- | ---- | ----------- | ----- |
358
+ | **webhook_create_payload** | [**WebhookCreatePayload**](WebhookCreatePayload.md) | | |
359
+
360
+ ### Return type
361
+
362
+ [**Webhook**](Webhook.md)
363
+
364
+ ### Authorization
365
+
366
+ [apikey](../README.md#apikey)
367
+
368
+ ### HTTP request headers
369
+
370
+ - **Content-Type**: application/json
371
+ - **Accept**: application/json
372
+
@@ -0,0 +1,34 @@
1
+ # ElasticEmail::WebhookCreatePayload
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Filename | |
8
+ | **url** | **String** | URL of notification. | |
9
+ | **notify_once_per_email** | **Boolean** | | [optional] |
10
+ | **notification_for_sent** | **Boolean** | | [optional] |
11
+ | **notification_for_opened** | **Boolean** | | [optional] |
12
+ | **notification_for_clicked** | **Boolean** | | [optional] |
13
+ | **notification_for_unsubscribed** | **Boolean** | | [optional] |
14
+ | **notification_for_abuse_report** | **Boolean** | | [optional] |
15
+ | **notification_for_error** | **Boolean** | | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ElasticEmail'
21
+
22
+ instance = ElasticEmail::WebhookCreatePayload.new(
23
+ name: attachment.txt,
24
+ url: http://address.for.notification.com,
25
+ notify_once_per_email: null,
26
+ notification_for_sent: null,
27
+ notification_for_opened: null,
28
+ notification_for_clicked: null,
29
+ notification_for_unsubscribed: null,
30
+ notification_for_abuse_report: null,
31
+ notification_for_error: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,36 @@
1
+ # ElasticEmail::WebhookUpdatePayload
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Filename | [optional] |
8
+ | **url** | **String** | URL of notification. | [optional] |
9
+ | **notify_once_per_email** | **Boolean** | | [optional] |
10
+ | **notification_for_sent** | **Boolean** | | [optional] |
11
+ | **notification_for_opened** | **Boolean** | | [optional] |
12
+ | **notification_for_clicked** | **Boolean** | | [optional] |
13
+ | **notification_for_unsubscribed** | **Boolean** | | [optional] |
14
+ | **notification_for_abuse_report** | **Boolean** | | [optional] |
15
+ | **notification_for_error** | **Boolean** | | [optional] |
16
+ | **is_enabled** | **Boolean** | | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'ElasticEmail'
22
+
23
+ instance = ElasticEmail::WebhookUpdatePayload.new(
24
+ name: attachment.txt,
25
+ url: http://address.for.notification.com,
26
+ notify_once_per_email: null,
27
+ notification_for_sent: null,
28
+ notification_for_opened: null,
29
+ notification_for_clicked: null,
30
+ notification_for_unsubscribed: null,
31
+ notification_for_abuse_report: null,
32
+ notification_for_error: null,
33
+ is_enabled: null
34
+ )
35
+ ```
36
+
@@ -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
 
@@ -19,6 +19,74 @@ module ElasticEmail
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Trigger Automation for Contact
23
+ # Manually trigger an Automation for a contact. Required Access Level: ModifyAutomations
24
+ # @param name [String]
25
+ # @param contact_email [String]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def campaigns_automation_by_name_trigger_post(name, contact_email, opts = {})
29
+ campaigns_automation_by_name_trigger_post_with_http_info(name, contact_email, opts)
30
+ nil
31
+ end
32
+
33
+ # Trigger Automation for Contact
34
+ # Manually trigger an Automation for a contact. Required Access Level: ModifyAutomations
35
+ # @param name [String]
36
+ # @param contact_email [String]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def campaigns_automation_by_name_trigger_post_with_http_info(name, contact_email, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.campaigns_automation_by_name_trigger_post ...'
42
+ end
43
+ # verify the required parameter 'name' is set
44
+ if @api_client.config.client_side_validation && name.nil?
45
+ fail ArgumentError, "Missing the required parameter 'name' when calling CampaignsApi.campaigns_automation_by_name_trigger_post"
46
+ end
47
+ # verify the required parameter 'contact_email' is set
48
+ if @api_client.config.client_side_validation && contact_email.nil?
49
+ fail ArgumentError, "Missing the required parameter 'contact_email' when calling CampaignsApi.campaigns_automation_by_name_trigger_post"
50
+ end
51
+ # resource path
52
+ local_var_path = '/campaigns/automation/{name}/trigger'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+ query_params[:'contactEmail'] = contact_email
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body]
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type]
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['apikey']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"CampaignsApi.campaigns_automation_by_name_trigger_post",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: CampaignsApi#campaigns_automation_by_name_trigger_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
22
90
  # Delete Campaign
23
91
  # Delete the specific campaign. This does not cancel in progress email, see Cancel In Progress. Required Access Level: ModifyCampaigns
24
92
  # @param name [String] Name of Campaign to delete
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -87,7 +87,7 @@ module ElasticEmail
87
87
  # Load your existing ApiKey info. Required Access Level: ViewAccessTokens
88
88
  # @param name [String] Name of the ApiKey
89
89
  # @param [Hash] opts the optional parameters
90
- # @option opts [String] :subaccount Email of the subaccount of which ApiKey should be loaded
90
+ # @option opts [String] :subaccount Email of the subaccount of which ApiKey should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
91
91
  # @return [ApiKey]
92
92
  def security_apikeys_by_name_get(name, opts = {})
93
93
  data, _status_code, _headers = security_apikeys_by_name_get_with_http_info(name, opts)
@@ -98,7 +98,7 @@ module ElasticEmail
98
98
  # Load your existing ApiKey info. Required Access Level: ViewAccessTokens
99
99
  # @param name [String] Name of the ApiKey
100
100
  # @param [Hash] opts the optional parameters
101
- # @option opts [String] :subaccount Email of the subaccount of which ApiKey should be loaded
101
+ # @option opts [String] :subaccount Email of the subaccount of which ApiKey should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
102
102
  # @return [Array<(ApiKey, Integer, Hash)>] ApiKey data, response status code and response headers
103
103
  def security_apikeys_by_name_get_with_http_info(name, opts = {})
104
104
  if @api_client.config.debugging
@@ -226,7 +226,7 @@ module ElasticEmail
226
226
  # List ApiKeys
227
227
  # List all your existing ApiKeys. Required Access Level: ViewAccessTokens
228
228
  # @param [Hash] opts the optional parameters
229
- # @option opts [String] :subaccount Email of the subaccount of which ApiKeys should be loaded
229
+ # @option opts [String] :subaccount Email of the subaccount of which ApiKeys should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
230
230
  # @return [Array<ApiKey>]
231
231
  def security_apikeys_get(opts = {})
232
232
  data, _status_code, _headers = security_apikeys_get_with_http_info(opts)
@@ -236,7 +236,7 @@ module ElasticEmail
236
236
  # List ApiKeys
237
237
  # List all your existing ApiKeys. Required Access Level: ViewAccessTokens
238
238
  # @param [Hash] opts the optional parameters
239
- # @option opts [String] :subaccount Email of the subaccount of which ApiKeys should be loaded
239
+ # @option opts [String] :subaccount Email of the subaccount of which ApiKeys should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
240
240
  # @return [Array<(Array<ApiKey>, Integer, Hash)>] Array<ApiKey> data, response status code and response headers
241
241
  def security_apikeys_get_with_http_info(opts = {})
242
242
  if @api_client.config.debugging
@@ -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