ElasticEmail 4.0.26 → 4.0.28

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 (263) hide show
  1. checksums.yaml +4 -4
  2. data/ElasticEmail.gemspec +2 -2
  3. data/README.md +24 -9
  4. data/VERSION +1 -1
  5. data/docs/Campaign.md +2 -0
  6. data/docs/CampaignOptions.md +3 -1
  7. data/docs/CampaignTemplate.md +2 -2
  8. data/docs/CampaignsApi.md +12 -12
  9. data/docs/Contact.md +2 -0
  10. data/docs/ContactsApi.md +18 -18
  11. data/docs/DomainsApi.md +16 -16
  12. data/docs/EmailContent.md +2 -2
  13. data/docs/EmailsApi.md +10 -10
  14. data/docs/EventsApi.md +14 -14
  15. data/docs/FilesApi.md +10 -10
  16. data/docs/InboundRouteApi.md +12 -12
  17. data/docs/ListsApi.md +16 -16
  18. data/docs/MessageAttachment.md +2 -2
  19. data/docs/RecipientEvent.md +2 -2
  20. data/docs/SecurityApi.md +30 -30
  21. data/docs/SegmentsApi.md +10 -10
  22. data/docs/StatisticsApi.md +10 -10
  23. data/docs/SubAccountsApi.md +12 -12
  24. data/docs/SuppressionsApi.md +24 -24
  25. data/docs/TemplatesApi.md +10 -10
  26. data/docs/VerificationsApi.md +25 -25
  27. data/docs/Webhook.md +42 -0
  28. data/docs/WebhookApi.md +372 -0
  29. data/docs/WebhookCreatePayload.md +34 -0
  30. data/docs/WebhookUpdatePayload.md +36 -0
  31. data/lib/ElasticEmail/api/campaigns_api.rb +6 -6
  32. data/lib/ElasticEmail/api/contacts_api.rb +8 -8
  33. data/lib/ElasticEmail/api/domains_api.rb +9 -9
  34. data/lib/ElasticEmail/api/emails_api.rb +7 -7
  35. data/lib/ElasticEmail/api/events_api.rb +9 -9
  36. data/lib/ElasticEmail/api/files_api.rb +6 -6
  37. data/lib/ElasticEmail/api/inbound_route_api.rb +7 -7
  38. data/lib/ElasticEmail/api/lists_api.rb +8 -8
  39. data/lib/ElasticEmail/api/security_api.rb +30 -30
  40. data/lib/ElasticEmail/api/segments_api.rb +6 -6
  41. data/lib/ElasticEmail/api/statistics_api.rb +7 -7
  42. data/lib/ElasticEmail/api/sub_accounts_api.rb +6 -6
  43. data/lib/ElasticEmail/api/suppressions_api.rb +10 -10
  44. data/lib/ElasticEmail/api/templates_api.rb +6 -6
  45. data/lib/ElasticEmail/api/verifications_api.rb +19 -19
  46. data/lib/ElasticEmail/api/webhook_api.rb +351 -0
  47. data/lib/ElasticEmail/api_client.rb +4 -4
  48. data/lib/ElasticEmail/api_error.rb +2 -2
  49. data/lib/ElasticEmail/configuration.rb +20 -3
  50. data/lib/ElasticEmail/models/access_level.rb +12 -3
  51. data/lib/ElasticEmail/models/account_status_enum.rb +2 -2
  52. data/lib/ElasticEmail/models/api_key.rb +2 -2
  53. data/lib/ElasticEmail/models/api_key_payload.rb +2 -2
  54. data/lib/ElasticEmail/models/body_content_type.rb +2 -2
  55. data/lib/ElasticEmail/models/body_part.rb +2 -2
  56. data/lib/ElasticEmail/models/campaign.rb +12 -3
  57. data/lib/ElasticEmail/models/campaign_options.rb +17 -6
  58. data/lib/ElasticEmail/models/campaign_recipient.rb +2 -2
  59. data/lib/ElasticEmail/models/campaign_status.rb +2 -2
  60. data/lib/ElasticEmail/models/campaign_template.rb +3 -3
  61. data/lib/ElasticEmail/models/certificate_validation_status.rb +2 -2
  62. data/lib/ElasticEmail/models/channel_log_status_summary.rb +2 -2
  63. data/lib/ElasticEmail/models/compression_format.rb +2 -2
  64. data/lib/ElasticEmail/models/consent_data.rb +2 -2
  65. data/lib/ElasticEmail/models/consent_tracking.rb +2 -2
  66. data/lib/ElasticEmail/models/contact.rb +12 -3
  67. data/lib/ElasticEmail/models/contact_activity.rb +2 -2
  68. data/lib/ElasticEmail/models/contact_payload.rb +2 -2
  69. data/lib/ElasticEmail/models/contact_source.rb +5 -3
  70. data/lib/ElasticEmail/models/contact_status.rb +2 -2
  71. data/lib/ElasticEmail/models/contact_update_payload.rb +2 -2
  72. data/lib/ElasticEmail/models/contacts_list.rb +2 -2
  73. data/lib/ElasticEmail/models/delivery_optimization_type.rb +2 -2
  74. data/lib/ElasticEmail/models/domain_data.rb +2 -2
  75. data/lib/ElasticEmail/models/domain_detail.rb +2 -2
  76. data/lib/ElasticEmail/models/domain_owner.rb +2 -2
  77. data/lib/ElasticEmail/models/domain_payload.rb +2 -2
  78. data/lib/ElasticEmail/models/domain_update_payload.rb +2 -2
  79. data/lib/ElasticEmail/models/email_content.rb +3 -3
  80. data/lib/ElasticEmail/models/email_data.rb +2 -2
  81. data/lib/ElasticEmail/models/email_job_failed_status.rb +2 -2
  82. data/lib/ElasticEmail/models/email_job_status.rb +2 -2
  83. data/lib/ElasticEmail/models/email_message_data.rb +2 -2
  84. data/lib/ElasticEmail/models/email_predicted_validation_status.rb +2 -2
  85. data/lib/ElasticEmail/models/email_recipient.rb +2 -2
  86. data/lib/ElasticEmail/models/email_send.rb +2 -2
  87. data/lib/ElasticEmail/models/email_status.rb +2 -2
  88. data/lib/ElasticEmail/models/email_transactional_message_data.rb +2 -2
  89. data/lib/ElasticEmail/models/email_validation_result.rb +2 -2
  90. data/lib/ElasticEmail/models/email_validation_status.rb +2 -2
  91. data/lib/ElasticEmail/models/email_view.rb +2 -2
  92. data/lib/ElasticEmail/models/emails_payload.rb +2 -2
  93. data/lib/ElasticEmail/models/encoding_type.rb +2 -2
  94. data/lib/ElasticEmail/models/event_type.rb +2 -2
  95. data/lib/ElasticEmail/models/events_order_by.rb +2 -2
  96. data/lib/ElasticEmail/models/export_file_formats.rb +2 -2
  97. data/lib/ElasticEmail/models/export_link.rb +2 -2
  98. data/lib/ElasticEmail/models/export_status.rb +2 -2
  99. data/lib/ElasticEmail/models/file_info.rb +2 -2
  100. data/lib/ElasticEmail/models/file_payload.rb +2 -2
  101. data/lib/ElasticEmail/models/file_upload_result.rb +2 -2
  102. data/lib/ElasticEmail/models/inbound_payload.rb +2 -2
  103. data/lib/ElasticEmail/models/inbound_route.rb +2 -2
  104. data/lib/ElasticEmail/models/inbound_route_action_type.rb +2 -2
  105. data/lib/ElasticEmail/models/inbound_route_filter_type.rb +2 -2
  106. data/lib/ElasticEmail/models/list_payload.rb +2 -2
  107. data/lib/ElasticEmail/models/list_update_payload.rb +2 -2
  108. data/lib/ElasticEmail/models/log_job_status.rb +2 -2
  109. data/lib/ElasticEmail/models/log_status_summary.rb +2 -2
  110. data/lib/ElasticEmail/models/merge_email_payload.rb +2 -2
  111. data/lib/ElasticEmail/models/message_attachment.rb +3 -3
  112. data/lib/ElasticEmail/models/message_category.rb +2 -2
  113. data/lib/ElasticEmail/models/message_category_enum.rb +2 -2
  114. data/lib/ElasticEmail/models/new_api_key.rb +2 -2
  115. data/lib/ElasticEmail/models/new_smtp_credentials.rb +2 -2
  116. data/lib/ElasticEmail/models/options.rb +2 -2
  117. data/lib/ElasticEmail/models/recipient_event.rb +3 -3
  118. data/lib/ElasticEmail/models/segment.rb +2 -2
  119. data/lib/ElasticEmail/models/segment_payload.rb +2 -2
  120. data/lib/ElasticEmail/models/smtp_credentials.rb +2 -2
  121. data/lib/ElasticEmail/models/smtp_credentials_payload.rb +2 -2
  122. data/lib/ElasticEmail/models/sort_order_item.rb +2 -2
  123. data/lib/ElasticEmail/models/split_optimization_type.rb +2 -2
  124. data/lib/ElasticEmail/models/split_options.rb +2 -2
  125. data/lib/ElasticEmail/models/sub_account_info.rb +2 -2
  126. data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +2 -2
  127. data/lib/ElasticEmail/models/subaccount_email_settings.rb +2 -2
  128. data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +2 -2
  129. data/lib/ElasticEmail/models/subaccount_payload.rb +2 -2
  130. data/lib/ElasticEmail/models/subaccount_settings_info.rb +2 -2
  131. data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +2 -2
  132. data/lib/ElasticEmail/models/suppression.rb +2 -2
  133. data/lib/ElasticEmail/models/template.rb +2 -2
  134. data/lib/ElasticEmail/models/template_payload.rb +2 -2
  135. data/lib/ElasticEmail/models/template_scope.rb +2 -2
  136. data/lib/ElasticEmail/models/template_type.rb +10 -3
  137. data/lib/ElasticEmail/models/tracking_type.rb +2 -2
  138. data/lib/ElasticEmail/models/tracking_validation_status.rb +2 -2
  139. data/lib/ElasticEmail/models/transactional_recipient.rb +2 -2
  140. data/lib/ElasticEmail/models/utm.rb +2 -2
  141. data/lib/ElasticEmail/models/verification_file_result.rb +2 -2
  142. data/lib/ElasticEmail/models/verification_file_result_details.rb +2 -2
  143. data/lib/ElasticEmail/models/verification_status.rb +2 -2
  144. data/lib/ElasticEmail/models/webhook.rb +330 -0
  145. data/lib/ElasticEmail/models/webhook_create_payload.rb +303 -0
  146. data/lib/ElasticEmail/models/webhook_update_payload.rb +306 -0
  147. data/lib/ElasticEmail/version.rb +3 -3
  148. data/lib/ElasticEmail.rb +6 -2
  149. data/spec/api/campaigns_api_spec.rb +2 -2
  150. data/spec/api/contacts_api_spec.rb +2 -2
  151. data/spec/api/domains_api_spec.rb +2 -2
  152. data/spec/api/emails_api_spec.rb +2 -2
  153. data/spec/api/events_api_spec.rb +2 -2
  154. data/spec/api/files_api_spec.rb +2 -2
  155. data/spec/api/inbound_route_api_spec.rb +2 -2
  156. data/spec/api/lists_api_spec.rb +2 -2
  157. data/spec/api/security_api_spec.rb +12 -12
  158. data/spec/api/segments_api_spec.rb +2 -2
  159. data/spec/api/statistics_api_spec.rb +2 -2
  160. data/spec/api/sub_accounts_api_spec.rb +2 -2
  161. data/spec/api/suppressions_api_spec.rb +2 -2
  162. data/spec/api/templates_api_spec.rb +2 -2
  163. data/spec/api/verifications_api_spec.rb +7 -7
  164. data/spec/api/webhook_api_spec.rb +97 -0
  165. data/spec/models/access_level_spec.rb +2 -2
  166. data/spec/models/account_status_enum_spec.rb +2 -2
  167. data/spec/models/api_key_payload_spec.rb +2 -2
  168. data/spec/models/api_key_spec.rb +2 -2
  169. data/spec/models/body_content_type_spec.rb +2 -2
  170. data/spec/models/body_part_spec.rb +2 -2
  171. data/spec/models/campaign_options_spec.rb +8 -2
  172. data/spec/models/campaign_recipient_spec.rb +2 -2
  173. data/spec/models/campaign_spec.rb +8 -2
  174. data/spec/models/campaign_status_spec.rb +2 -2
  175. data/spec/models/campaign_template_spec.rb +2 -2
  176. data/spec/models/certificate_validation_status_spec.rb +2 -2
  177. data/spec/models/channel_log_status_summary_spec.rb +2 -2
  178. data/spec/models/compression_format_spec.rb +2 -2
  179. data/spec/models/consent_data_spec.rb +2 -2
  180. data/spec/models/consent_tracking_spec.rb +2 -2
  181. data/spec/models/contact_activity_spec.rb +2 -2
  182. data/spec/models/contact_payload_spec.rb +2 -2
  183. data/spec/models/contact_source_spec.rb +2 -2
  184. data/spec/models/contact_spec.rb +8 -2
  185. data/spec/models/contact_status_spec.rb +2 -2
  186. data/spec/models/contact_update_payload_spec.rb +2 -2
  187. data/spec/models/contacts_list_spec.rb +2 -2
  188. data/spec/models/delivery_optimization_type_spec.rb +2 -2
  189. data/spec/models/domain_data_spec.rb +2 -2
  190. data/spec/models/domain_detail_spec.rb +2 -2
  191. data/spec/models/domain_owner_spec.rb +2 -2
  192. data/spec/models/domain_payload_spec.rb +2 -2
  193. data/spec/models/domain_update_payload_spec.rb +2 -2
  194. data/spec/models/email_content_spec.rb +2 -2
  195. data/spec/models/email_data_spec.rb +2 -2
  196. data/spec/models/email_job_failed_status_spec.rb +2 -2
  197. data/spec/models/email_job_status_spec.rb +2 -2
  198. data/spec/models/email_message_data_spec.rb +2 -2
  199. data/spec/models/email_predicted_validation_status_spec.rb +2 -2
  200. data/spec/models/email_recipient_spec.rb +2 -2
  201. data/spec/models/email_send_spec.rb +2 -2
  202. data/spec/models/email_status_spec.rb +2 -2
  203. data/spec/models/email_transactional_message_data_spec.rb +2 -2
  204. data/spec/models/email_validation_result_spec.rb +2 -2
  205. data/spec/models/email_validation_status_spec.rb +2 -2
  206. data/spec/models/email_view_spec.rb +2 -2
  207. data/spec/models/emails_payload_spec.rb +2 -2
  208. data/spec/models/encoding_type_spec.rb +2 -2
  209. data/spec/models/event_type_spec.rb +2 -2
  210. data/spec/models/events_order_by_spec.rb +2 -2
  211. data/spec/models/export_file_formats_spec.rb +2 -2
  212. data/spec/models/export_link_spec.rb +2 -2
  213. data/spec/models/export_status_spec.rb +2 -2
  214. data/spec/models/file_info_spec.rb +2 -2
  215. data/spec/models/file_payload_spec.rb +2 -2
  216. data/spec/models/file_upload_result_spec.rb +2 -2
  217. data/spec/models/inbound_payload_spec.rb +2 -2
  218. data/spec/models/inbound_route_action_type_spec.rb +2 -2
  219. data/spec/models/inbound_route_filter_type_spec.rb +2 -2
  220. data/spec/models/inbound_route_spec.rb +2 -2
  221. data/spec/models/list_payload_spec.rb +2 -2
  222. data/spec/models/list_update_payload_spec.rb +2 -2
  223. data/spec/models/log_job_status_spec.rb +2 -2
  224. data/spec/models/log_status_summary_spec.rb +2 -2
  225. data/spec/models/merge_email_payload_spec.rb +2 -2
  226. data/spec/models/message_attachment_spec.rb +2 -2
  227. data/spec/models/message_category_enum_spec.rb +2 -2
  228. data/spec/models/message_category_spec.rb +2 -2
  229. data/spec/models/new_api_key_spec.rb +2 -2
  230. data/spec/models/new_smtp_credentials_spec.rb +2 -2
  231. data/spec/models/options_spec.rb +2 -2
  232. data/spec/models/recipient_event_spec.rb +2 -2
  233. data/spec/models/segment_payload_spec.rb +2 -2
  234. data/spec/models/segment_spec.rb +2 -2
  235. data/spec/models/smtp_credentials_payload_spec.rb +2 -2
  236. data/spec/models/smtp_credentials_spec.rb +2 -2
  237. data/spec/models/sort_order_item_spec.rb +2 -2
  238. data/spec/models/split_optimization_type_spec.rb +2 -2
  239. data/spec/models/split_options_spec.rb +2 -2
  240. data/spec/models/sub_account_info_spec.rb +2 -2
  241. data/spec/models/subaccount_email_credits_payload_spec.rb +2 -2
  242. data/spec/models/subaccount_email_settings_payload_spec.rb +2 -2
  243. data/spec/models/subaccount_email_settings_spec.rb +2 -2
  244. data/spec/models/subaccount_payload_spec.rb +2 -2
  245. data/spec/models/subaccount_settings_info_payload_spec.rb +2 -2
  246. data/spec/models/subaccount_settings_info_spec.rb +2 -2
  247. data/spec/models/suppression_spec.rb +2 -2
  248. data/spec/models/template_payload_spec.rb +2 -2
  249. data/spec/models/template_scope_spec.rb +2 -2
  250. data/spec/models/template_spec.rb +2 -2
  251. data/spec/models/template_type_spec.rb +2 -2
  252. data/spec/models/tracking_type_spec.rb +2 -2
  253. data/spec/models/tracking_validation_status_spec.rb +2 -2
  254. data/spec/models/transactional_recipient_spec.rb +2 -2
  255. data/spec/models/utm_spec.rb +2 -2
  256. data/spec/models/verification_file_result_details_spec.rb +2 -2
  257. data/spec/models/verification_file_result_spec.rb +2 -2
  258. data/spec/models/verification_status_spec.rb +2 -2
  259. data/spec/models/webhook_create_payload_spec.rb +84 -0
  260. data/spec/models/webhook_spec.rb +108 -0
  261. data/spec/models/webhook_update_payload_spec.rb +90 -0
  262. data/spec/spec_helper.rb +2 -2
  263. metadata +110 -94
@@ -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
+
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. 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>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target='_blank' href='https://app.elasticemail.com/marketing/settings/new/manage-api'>here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target='_blank' href='https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme'>here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.5.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -112,7 +112,7 @@ module ElasticEmail
112
112
  # header parameters
113
113
  header_params = opts[:header_params] || {}
114
114
  # HTTP header 'Accept' (if needed)
115
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
116
116
 
117
117
  # form parameters
118
118
  form_params = opts[:form_params] || {}
@@ -242,7 +242,7 @@ module ElasticEmail
242
242
  # header parameters
243
243
  header_params = opts[:header_params] || {}
244
244
  # HTTP header 'Accept' (if needed)
245
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
245
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
246
246
  # HTTP header 'Content-Type'
247
247
  content_type = @api_client.select_header_content_type(['application/json'])
248
248
  if !content_type.nil?
@@ -313,7 +313,7 @@ module ElasticEmail
313
313
  # header parameters
314
314
  header_params = opts[:header_params] || {}
315
315
  # HTTP header 'Accept' (if needed)
316
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
316
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
317
317
 
318
318
  # form parameters
319
319
  form_params = opts[:form_params] || {}
@@ -376,7 +376,7 @@ module ElasticEmail
376
376
  # header parameters
377
377
  header_params = opts[:header_params] || {}
378
378
  # HTTP header 'Accept' (if needed)
379
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
379
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
380
380
  # HTTP header 'Content-Type'
381
381
  content_type = @api_client.select_header_content_type(['application/json'])
382
382
  if !content_type.nil?
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. 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>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target='_blank' href='https://app.elasticemail.com/marketing/settings/new/manage-api'>here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target='_blank' href='https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme'>here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.5.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -112,7 +112,7 @@ module ElasticEmail
112
112
  # header parameters
113
113
  header_params = opts[:header_params] || {}
114
114
  # HTTP header 'Accept' (if needed)
115
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
116
116
 
117
117
  # form parameters
118
118
  form_params = opts[:form_params] || {}
@@ -181,7 +181,7 @@ module ElasticEmail
181
181
  # header parameters
182
182
  header_params = opts[:header_params] || {}
183
183
  # HTTP header 'Accept' (if needed)
184
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
184
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
185
185
  # HTTP header 'Content-Type'
186
186
  content_type = @api_client.select_header_content_type(['application/json'])
187
187
  if !content_type.nil?
@@ -315,7 +315,7 @@ module ElasticEmail
315
315
  # header parameters
316
316
  header_params = opts[:header_params] || {}
317
317
  # HTTP header 'Accept' (if needed)
318
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
319
319
 
320
320
  # form parameters
321
321
  form_params = opts[:form_params] || {}
@@ -387,7 +387,7 @@ module ElasticEmail
387
387
  # header parameters
388
388
  header_params = opts[:header_params] || {}
389
389
  # HTTP header 'Accept' (if needed)
390
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
390
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
391
391
 
392
392
  # form parameters
393
393
  form_params = opts[:form_params] || {}
@@ -450,7 +450,7 @@ module ElasticEmail
450
450
  # header parameters
451
451
  header_params = opts[:header_params] || {}
452
452
  # HTTP header 'Accept' (if needed)
453
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
453
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
454
454
 
455
455
  # form parameters
456
456
  form_params = opts[:form_params] || {}
@@ -588,7 +588,7 @@ module ElasticEmail
588
588
  # header parameters
589
589
  header_params = opts[:header_params] || {}
590
590
  # HTTP header 'Accept' (if needed)
591
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
591
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
592
592
  # HTTP header 'Content-Type'
593
593
  content_type = @api_client.select_header_content_type(['application/json'])
594
594
  if !content_type.nil?
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. 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>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target='_blank' href='https://app.elasticemail.com/marketing/settings/new/manage-api'>here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target='_blank' href='https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme'>here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.5.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -112,7 +112,7 @@ module ElasticEmail
112
112
  # header parameters
113
113
  header_params = opts[:header_params] || {}
114
114
  # HTTP header 'Accept' (if needed)
115
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
116
116
 
117
117
  # form parameters
118
118
  form_params = opts[:form_params] || {}
@@ -181,7 +181,7 @@ module ElasticEmail
181
181
  # header parameters
182
182
  header_params = opts[:header_params] || {}
183
183
  # HTTP header 'Accept' (if needed)
184
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
184
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
185
185
  # HTTP header 'Content-Type'
186
186
  content_type = @api_client.select_header_content_type(['application/json'])
187
187
  if !content_type.nil?
@@ -249,7 +249,7 @@ module ElasticEmail
249
249
  # header parameters
250
250
  header_params = opts[:header_params] || {}
251
251
  # HTTP header 'Accept' (if needed)
252
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
253
253
 
254
254
  # form parameters
255
255
  form_params = opts[:form_params] || {}
@@ -318,7 +318,7 @@ module ElasticEmail
318
318
  # header parameters
319
319
  header_params = opts[:header_params] || {}
320
320
  # HTTP header 'Accept' (if needed)
321
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
321
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
322
322
  # HTTP header 'Content-Type'
323
323
  content_type = @api_client.select_header_content_type(['application/json'])
324
324
  if !content_type.nil?
@@ -386,7 +386,7 @@ module ElasticEmail
386
386
  # header parameters
387
387
  header_params = opts[:header_params] || {}
388
388
  # HTTP header 'Accept' (if needed)
389
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
389
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
390
390
 
391
391
  # form parameters
392
392
  form_params = opts[:form_params] || {}
@@ -443,7 +443,7 @@ module ElasticEmail
443
443
  # header parameters
444
444
  header_params = opts[:header_params] || {}
445
445
  # HTTP header 'Accept' (if needed)
446
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
446
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
447
447
 
448
448
  # form parameters
449
449
  form_params = opts[:form_params] || {}
@@ -506,7 +506,7 @@ module ElasticEmail
506
506
  # header parameters
507
507
  header_params = opts[:header_params] || {}
508
508
  # HTTP header 'Accept' (if needed)
509
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
509
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
510
510
  # HTTP header 'Content-Type'
511
511
  content_type = @api_client.select_header_content_type(['application/json'])
512
512
  if !content_type.nil?