ElasticEmail 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. checksums.yaml +7 -0
  2. data/DIFF +0 -0
  3. data/ElasticEmail.gemspec +38 -0
  4. data/Gemfile +9 -0
  5. data/README.md +286 -0
  6. data/Rakefile +10 -0
  7. data/VERSION +1 -0
  8. data/docs/AccessLevel.md +15 -0
  9. data/docs/AccountStatusEnum.md +15 -0
  10. data/docs/ApiKey.md +28 -0
  11. data/docs/ApiKeyPayload.md +26 -0
  12. data/docs/BodyContentType.md +15 -0
  13. data/docs/BodyPart.md +22 -0
  14. data/docs/Campaign.md +26 -0
  15. data/docs/CampaignOptions.md +26 -0
  16. data/docs/CampaignRecipient.md +20 -0
  17. data/docs/CampaignStatus.md +15 -0
  18. data/docs/CampaignTemplate.md +30 -0
  19. data/docs/CampaignsApi.md +374 -0
  20. data/docs/ChannelLogStatusSummary.md +44 -0
  21. data/docs/CompressionFormat.md +15 -0
  22. data/docs/ConsentData.md +22 -0
  23. data/docs/ConsentTracking.md +15 -0
  24. data/docs/Contact.md +38 -0
  25. data/docs/ContactActivity.md +38 -0
  26. data/docs/ContactHistEventType.md +15 -0
  27. data/docs/ContactHistory.md +30 -0
  28. data/docs/ContactPayload.md +28 -0
  29. data/docs/ContactSource.md +15 -0
  30. data/docs/ContactStatus.md +15 -0
  31. data/docs/ContactUpdatePayload.md +22 -0
  32. data/docs/ContactsApi.md +756 -0
  33. data/docs/ContactsList.md +24 -0
  34. data/docs/DeliveryOptimizationType.md +15 -0
  35. data/docs/EmailContent.md +38 -0
  36. data/docs/EmailData.md +22 -0
  37. data/docs/EmailMessageData.md +22 -0
  38. data/docs/EmailRecipient.md +20 -0
  39. data/docs/EmailSend.md +20 -0
  40. data/docs/EmailStatus.md +40 -0
  41. data/docs/EmailTransactionalMessageData.md +22 -0
  42. data/docs/EmailValidationResult.md +34 -0
  43. data/docs/EmailValidationStatus.md +15 -0
  44. data/docs/EmailView.md +22 -0
  45. data/docs/EmailsApi.md +295 -0
  46. data/docs/EmailsPayload.md +20 -0
  47. data/docs/EncodingType.md +15 -0
  48. data/docs/EventType.md +15 -0
  49. data/docs/EventsApi.md +575 -0
  50. data/docs/EventsOrderBy.md +15 -0
  51. data/docs/ExportFileFormats.md +15 -0
  52. data/docs/ExportLink.md +20 -0
  53. data/docs/ExportStatus.md +15 -0
  54. data/docs/FileInfo.md +26 -0
  55. data/docs/FilePayload.md +22 -0
  56. data/docs/FileUploadResult.md +20 -0
  57. data/docs/FilesApi.md +374 -0
  58. data/docs/InboundPayload.md +28 -0
  59. data/docs/InboundRoute.md +30 -0
  60. data/docs/InboundRouteActionType.md +15 -0
  61. data/docs/InboundRouteApi.md +437 -0
  62. data/docs/InboundRouteFilterType.md +15 -0
  63. data/docs/ListPayload.md +22 -0
  64. data/docs/ListUpdatePayload.md +20 -0
  65. data/docs/ListsApi.md +519 -0
  66. data/docs/LogJobStatus.md +15 -0
  67. data/docs/LogStatusSummary.md +42 -0
  68. data/docs/MergeEmailPayload.md +22 -0
  69. data/docs/MessageAttachment.md +22 -0
  70. data/docs/MessageCategory.md +15 -0
  71. data/docs/NewApiKey.md +30 -0
  72. data/docs/NewSmtpCredentials.md +30 -0
  73. data/docs/Options.md +28 -0
  74. data/docs/RecipientEvent.md +42 -0
  75. data/docs/SecurityApi.md +749 -0
  76. data/docs/Segment.md +20 -0
  77. data/docs/SegmentPayload.md +20 -0
  78. data/docs/SegmentsApi.md +372 -0
  79. data/docs/SmtpCredentials.md +28 -0
  80. data/docs/SmtpCredentialsPayload.md +24 -0
  81. data/docs/SortOrderItem.md +20 -0
  82. data/docs/SplitOptimizationType.md +15 -0
  83. data/docs/SplitOptions.md +20 -0
  84. data/docs/StatisticsApi.md +379 -0
  85. data/docs/SubAccountInfo.md +34 -0
  86. data/docs/SubAccountsApi.md +445 -0
  87. data/docs/SubaccountEmailCreditsPayload.md +20 -0
  88. data/docs/SubaccountEmailSettings.md +30 -0
  89. data/docs/SubaccountEmailSettingsPayload.md +28 -0
  90. data/docs/SubaccountPayload.md +24 -0
  91. data/docs/SubaccountSettingsInfo.md +18 -0
  92. data/docs/SubaccountSettingsInfoPayload.md +18 -0
  93. data/docs/Suppression.md +24 -0
  94. data/docs/SuppressionsApi.md +895 -0
  95. data/docs/Template.md +28 -0
  96. data/docs/TemplatePayload.md +24 -0
  97. data/docs/TemplateScopeType.md +15 -0
  98. data/docs/TemplateType.md +15 -0
  99. data/docs/TemplatesApi.md +376 -0
  100. data/docs/TransactionalRecipient.md +22 -0
  101. data/docs/Utm.md +24 -0
  102. data/docs/VerificationFileResult.md +28 -0
  103. data/docs/VerificationFileResultDetails.md +30 -0
  104. data/docs/VerificationStatus.md +15 -0
  105. data/docs/VerificationsApi.md +662 -0
  106. data/lib/ElasticEmail.rb +137 -0
  107. data/lib/ElasticEmail/api/campaigns_api.rb +348 -0
  108. data/lib/ElasticEmail/api/contacts_api.rb +681 -0
  109. data/lib/ElasticEmail/api/emails_api.rb +280 -0
  110. data/lib/ElasticEmail/api/events_api.rb +538 -0
  111. data/lib/ElasticEmail/api/files_api.rb +340 -0
  112. data/lib/ElasticEmail/api/inbound_route_api.rb +404 -0
  113. data/lib/ElasticEmail/api/lists_api.rb +485 -0
  114. data/lib/ElasticEmail/api/security_api.rb +674 -0
  115. data/lib/ElasticEmail/api/segments_api.rb +345 -0
  116. data/lib/ElasticEmail/api/statistics_api.rb +341 -0
  117. data/lib/ElasticEmail/api/sub_accounts_api.rb +414 -0
  118. data/lib/ElasticEmail/api/suppressions_api.rb +782 -0
  119. data/lib/ElasticEmail/api/templates_api.rb +355 -0
  120. data/lib/ElasticEmail/api/verifications_api.rb +584 -0
  121. data/lib/ElasticEmail/api_client.rb +390 -0
  122. data/lib/ElasticEmail/api_error.rb +57 -0
  123. data/lib/ElasticEmail/configuration.rb +277 -0
  124. data/lib/ElasticEmail/models/access_level.rb +79 -0
  125. data/lib/ElasticEmail/models/account_status_enum.rb +40 -0
  126. data/lib/ElasticEmail/models/api_key.rb +276 -0
  127. data/lib/ElasticEmail/models/api_key_payload.rb +265 -0
  128. data/lib/ElasticEmail/models/body_content_type.rb +39 -0
  129. data/lib/ElasticEmail/models/body_part.rb +240 -0
  130. data/lib/ElasticEmail/models/campaign.rb +261 -0
  131. data/lib/ElasticEmail/models/campaign_options.rb +263 -0
  132. data/lib/ElasticEmail/models/campaign_recipient.rb +234 -0
  133. data/lib/ElasticEmail/models/campaign_status.rb +43 -0
  134. data/lib/ElasticEmail/models/campaign_template.rb +282 -0
  135. data/lib/ElasticEmail/models/channel_log_status_summary.rb +350 -0
  136. data/lib/ElasticEmail/models/compression_format.rb +37 -0
  137. data/lib/ElasticEmail/models/consent_data.rb +240 -0
  138. data/lib/ElasticEmail/models/consent_tracking.rb +38 -0
  139. data/lib/ElasticEmail/models/contact.rb +323 -0
  140. data/lib/ElasticEmail/models/contact_activity.rb +324 -0
  141. data/lib/ElasticEmail/models/contact_hist_event_type.rb +49 -0
  142. data/lib/ElasticEmail/models/contact_history.rb +279 -0
  143. data/lib/ElasticEmail/models/contact_payload.rb +270 -0
  144. data/lib/ElasticEmail/models/contact_source.rb +42 -0
  145. data/lib/ElasticEmail/models/contact_status.rb +44 -0
  146. data/lib/ElasticEmail/models/contact_update_payload.rb +241 -0
  147. data/lib/ElasticEmail/models/contacts_list.rb +251 -0
  148. data/lib/ElasticEmail/models/delivery_optimization_type.rb +38 -0
  149. data/lib/ElasticEmail/models/email_content.rb +330 -0
  150. data/lib/ElasticEmail/models/email_data.rb +241 -0
  151. data/lib/ElasticEmail/models/email_message_data.rb +242 -0
  152. data/lib/ElasticEmail/models/email_recipient.rb +232 -0
  153. data/lib/ElasticEmail/models/email_send.rb +229 -0
  154. data/lib/ElasticEmail/models/email_status.rb +332 -0
  155. data/lib/ElasticEmail/models/email_transactional_message_data.rb +240 -0
  156. data/lib/ElasticEmail/models/email_validation_result.rb +300 -0
  157. data/lib/ElasticEmail/models/email_validation_status.rb +40 -0
  158. data/lib/ElasticEmail/models/email_view.rb +240 -0
  159. data/lib/ElasticEmail/models/emails_payload.rb +232 -0
  160. data/lib/ElasticEmail/models/encoding_type.rb +42 -0
  161. data/lib/ElasticEmail/models/event_type.rb +43 -0
  162. data/lib/ElasticEmail/models/events_order_by.rb +37 -0
  163. data/lib/ElasticEmail/models/export_file_formats.rb +38 -0
  164. data/lib/ElasticEmail/models/export_link.rb +229 -0
  165. data/lib/ElasticEmail/models/export_status.rb +39 -0
  166. data/lib/ElasticEmail/models/file_info.rb +262 -0
  167. data/lib/ElasticEmail/models/file_payload.rb +239 -0
  168. data/lib/ElasticEmail/models/file_upload_result.rb +229 -0
  169. data/lib/ElasticEmail/models/inbound_payload.rb +269 -0
  170. data/lib/ElasticEmail/models/inbound_route.rb +278 -0
  171. data/lib/ElasticEmail/models/inbound_route_action_type.rb +38 -0
  172. data/lib/ElasticEmail/models/inbound_route_filter_type.rb +37 -0
  173. data/lib/ElasticEmail/models/list_payload.rb +241 -0
  174. data/lib/ElasticEmail/models/list_update_payload.rb +229 -0
  175. data/lib/ElasticEmail/models/log_job_status.rb +45 -0
  176. data/lib/ElasticEmail/models/log_status_summary.rb +340 -0
  177. data/lib/ElasticEmail/models/merge_email_payload.rb +239 -0
  178. data/lib/ElasticEmail/models/message_attachment.rb +237 -0
  179. data/lib/ElasticEmail/models/message_category.rb +52 -0
  180. data/lib/ElasticEmail/models/new_api_key.rb +286 -0
  181. data/lib/ElasticEmail/models/new_smtp_credentials.rb +284 -0
  182. data/lib/ElasticEmail/models/options.rb +271 -0
  183. data/lib/ElasticEmail/models/recipient_event.rb +341 -0
  184. data/lib/ElasticEmail/models/segment.rb +230 -0
  185. data/lib/ElasticEmail/models/segment_payload.rb +229 -0
  186. data/lib/ElasticEmail/models/smtp_credentials.rb +274 -0
  187. data/lib/ElasticEmail/models/smtp_credentials_payload.rb +253 -0
  188. data/lib/ElasticEmail/models/sort_order_item.rb +229 -0
  189. data/lib/ElasticEmail/models/split_optimization_type.rb +37 -0
  190. data/lib/ElasticEmail/models/split_options.rb +230 -0
  191. data/lib/ElasticEmail/models/sub_account_info.rb +300 -0
  192. data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +230 -0
  193. data/lib/ElasticEmail/models/subaccount_email_settings.rb +280 -0
  194. data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +270 -0
  195. data/lib/ElasticEmail/models/subaccount_payload.rb +250 -0
  196. data/lib/ElasticEmail/models/subaccount_settings_info.rb +220 -0
  197. data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +220 -0
  198. data/lib/ElasticEmail/models/suppression.rb +252 -0
  199. data/lib/ElasticEmail/models/template.rb +272 -0
  200. data/lib/ElasticEmail/models/template_payload.rb +252 -0
  201. data/lib/ElasticEmail/models/template_scope_type.rb +38 -0
  202. data/lib/ElasticEmail/models/template_type.rb +38 -0
  203. data/lib/ElasticEmail/models/transactional_recipient.rb +246 -0
  204. data/lib/ElasticEmail/models/utm.rb +250 -0
  205. data/lib/ElasticEmail/models/verification_file_result.rb +270 -0
  206. data/lib/ElasticEmail/models/verification_file_result_details.rb +282 -0
  207. data/lib/ElasticEmail/models/verification_status.rb +40 -0
  208. data/lib/ElasticEmail/version.rb +15 -0
  209. data/spec/api/campaigns_api_spec.rb +98 -0
  210. data/spec/api/contacts_api_spec.rb +166 -0
  211. data/spec/api/emails_api_spec.rb +83 -0
  212. data/spec/api/events_api_spec.rb +146 -0
  213. data/spec/api/files_api_spec.rb +97 -0
  214. data/spec/api/inbound_route_api_spec.rb +107 -0
  215. data/spec/api/lists_api_spec.rb +123 -0
  216. data/spec/api/security_api_spec.rb +161 -0
  217. data/spec/api/segments_api_spec.rb +97 -0
  218. data/spec/api/statistics_api_spec.rb +98 -0
  219. data/spec/api/sub_accounts_api_spec.rb +110 -0
  220. data/spec/api/suppressions_api_spec.rb +186 -0
  221. data/spec/api/templates_api_spec.rb +99 -0
  222. data/spec/api/verifications_api_spec.rb +145 -0
  223. data/spec/api_client_spec.rb +226 -0
  224. data/spec/configuration_spec.rb +42 -0
  225. data/spec/models/access_level_spec.rb +28 -0
  226. data/spec/models/account_status_enum_spec.rb +28 -0
  227. data/spec/models/api_key_payload_spec.rb +58 -0
  228. data/spec/models/api_key_spec.rb +64 -0
  229. data/spec/models/body_content_type_spec.rb +28 -0
  230. data/spec/models/body_part_spec.rb +46 -0
  231. data/spec/models/campaign_options_spec.rb +58 -0
  232. data/spec/models/campaign_recipient_spec.rb +40 -0
  233. data/spec/models/campaign_spec.rb +58 -0
  234. data/spec/models/campaign_status_spec.rb +28 -0
  235. data/spec/models/campaign_template_spec.rb +70 -0
  236. data/spec/models/channel_log_status_summary_spec.rb +112 -0
  237. data/spec/models/compression_format_spec.rb +28 -0
  238. data/spec/models/consent_data_spec.rb +46 -0
  239. data/spec/models/consent_tracking_spec.rb +28 -0
  240. data/spec/models/contact_activity_spec.rb +94 -0
  241. data/spec/models/contact_hist_event_type_spec.rb +28 -0
  242. data/spec/models/contact_history_spec.rb +70 -0
  243. data/spec/models/contact_payload_spec.rb +64 -0
  244. data/spec/models/contact_source_spec.rb +28 -0
  245. data/spec/models/contact_spec.rb +94 -0
  246. data/spec/models/contact_status_spec.rb +28 -0
  247. data/spec/models/contact_update_payload_spec.rb +46 -0
  248. data/spec/models/contacts_list_spec.rb +52 -0
  249. data/spec/models/delivery_optimization_type_spec.rb +28 -0
  250. data/spec/models/email_content_spec.rb +94 -0
  251. data/spec/models/email_data_spec.rb +46 -0
  252. data/spec/models/email_message_data_spec.rb +46 -0
  253. data/spec/models/email_recipient_spec.rb +40 -0
  254. data/spec/models/email_send_spec.rb +40 -0
  255. data/spec/models/email_status_spec.rb +100 -0
  256. data/spec/models/email_transactional_message_data_spec.rb +46 -0
  257. data/spec/models/email_validation_result_spec.rb +82 -0
  258. data/spec/models/email_validation_status_spec.rb +28 -0
  259. data/spec/models/email_view_spec.rb +46 -0
  260. data/spec/models/emails_payload_spec.rb +40 -0
  261. data/spec/models/encoding_type_spec.rb +28 -0
  262. data/spec/models/event_type_spec.rb +28 -0
  263. data/spec/models/events_order_by_spec.rb +28 -0
  264. data/spec/models/export_file_formats_spec.rb +28 -0
  265. data/spec/models/export_link_spec.rb +40 -0
  266. data/spec/models/export_status_spec.rb +28 -0
  267. data/spec/models/file_info_spec.rb +58 -0
  268. data/spec/models/file_payload_spec.rb +46 -0
  269. data/spec/models/file_upload_result_spec.rb +40 -0
  270. data/spec/models/inbound_payload_spec.rb +64 -0
  271. data/spec/models/inbound_route_action_type_spec.rb +28 -0
  272. data/spec/models/inbound_route_filter_type_spec.rb +28 -0
  273. data/spec/models/inbound_route_spec.rb +70 -0
  274. data/spec/models/list_payload_spec.rb +46 -0
  275. data/spec/models/list_update_payload_spec.rb +40 -0
  276. data/spec/models/log_job_status_spec.rb +28 -0
  277. data/spec/models/log_status_summary_spec.rb +106 -0
  278. data/spec/models/merge_email_payload_spec.rb +46 -0
  279. data/spec/models/message_attachment_spec.rb +46 -0
  280. data/spec/models/message_category_spec.rb +28 -0
  281. data/spec/models/new_api_key_spec.rb +70 -0
  282. data/spec/models/new_smtp_credentials_spec.rb +70 -0
  283. data/spec/models/options_spec.rb +64 -0
  284. data/spec/models/recipient_event_spec.rb +106 -0
  285. data/spec/models/segment_payload_spec.rb +40 -0
  286. data/spec/models/segment_spec.rb +40 -0
  287. data/spec/models/smtp_credentials_payload_spec.rb +52 -0
  288. data/spec/models/smtp_credentials_spec.rb +64 -0
  289. data/spec/models/sort_order_item_spec.rb +40 -0
  290. data/spec/models/split_optimization_type_spec.rb +28 -0
  291. data/spec/models/split_options_spec.rb +40 -0
  292. data/spec/models/sub_account_info_spec.rb +82 -0
  293. data/spec/models/subaccount_email_credits_payload_spec.rb +40 -0
  294. data/spec/models/subaccount_email_settings_payload_spec.rb +64 -0
  295. data/spec/models/subaccount_email_settings_spec.rb +70 -0
  296. data/spec/models/subaccount_payload_spec.rb +52 -0
  297. data/spec/models/subaccount_settings_info_payload_spec.rb +34 -0
  298. data/spec/models/subaccount_settings_info_spec.rb +34 -0
  299. data/spec/models/suppression_spec.rb +52 -0
  300. data/spec/models/template_payload_spec.rb +52 -0
  301. data/spec/models/template_scope_type_spec.rb +28 -0
  302. data/spec/models/template_spec.rb +64 -0
  303. data/spec/models/template_type_spec.rb +28 -0
  304. data/spec/models/transactional_recipient_spec.rb +46 -0
  305. data/spec/models/utm_spec.rb +52 -0
  306. data/spec/models/verification_file_result_details_spec.rb +70 -0
  307. data/spec/models/verification_file_result_spec.rb +64 -0
  308. data/spec/models/verification_status_spec.rb +28 -0
  309. data/spec/spec_helper.rb +111 -0
  310. metadata +498 -0
@@ -0,0 +1,15 @@
1
+ # ElasticEmail::LogJobStatus
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'ElasticEmail'
12
+
13
+ instance = ElasticEmail::LogJobStatus.new()
14
+ ```
15
+
@@ -0,0 +1,42 @@
1
+ # ElasticEmail::LogStatusSummary
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **recipients** | **Integer** | Number of recipients | [optional] |
8
+ | **email_total** | **Integer** | Number of emails | [optional] |
9
+ | **sms_total** | **Integer** | Number of SMS | [optional] |
10
+ | **delivered** | **Integer** | Number of delivered messages | [optional] |
11
+ | **bounced** | **Integer** | Number of bounced messages | [optional] |
12
+ | **in_progress** | **Integer** | Number of messages in progress | [optional] |
13
+ | **opened** | **Integer** | Number of opened messages | [optional] |
14
+ | **clicked** | **Integer** | Number of clicked messages | [optional] |
15
+ | **unsubscribed** | **Integer** | Number of unsubscribed messages | [optional] |
16
+ | **complaints** | **Integer** | Number of complaint messages | [optional] |
17
+ | **inbound** | **Integer** | Number of inbound messages | [optional] |
18
+ | **manual_cancel** | **Integer** | Number of manually cancelled messages | [optional] |
19
+ | **not_delivered** | **Integer** | Number of messages flagged with 'Not Delivered' | [optional] |
20
+
21
+ ## Example
22
+
23
+ ```ruby
24
+ require 'ElasticEmail'
25
+
26
+ instance = ElasticEmail::LogStatusSummary.new(
27
+ recipients: 1234,
28
+ email_total: 1234,
29
+ sms_total: 12,
30
+ delivered: 1000,
31
+ bounced: 1000,
32
+ in_progress: 1234,
33
+ opened: 1000,
34
+ clicked: 1000,
35
+ unsubscribed: 1000,
36
+ complaints: 1000,
37
+ inbound: 1000,
38
+ manual_cancel: 1000,
39
+ not_delivered: 0
40
+ )
41
+ ```
42
+
@@ -0,0 +1,22 @@
1
+ # ElasticEmail::MergeEmailPayload
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **merge_file** | [**MessageAttachment**](MessageAttachment.md) | CSV file containing recipients with optional merge fields | [optional] |
8
+ | **content** | [**EmailContent**](EmailContent.md) | Proper e-mail content | [optional] |
9
+ | **options** | [**Options**](Options.md) | E-mail configuration | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ElasticEmail'
15
+
16
+ instance = ElasticEmail::MergeEmailPayload.new(
17
+ merge_file: null,
18
+ content: null,
19
+ options: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # ElasticEmail::MessageAttachment
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **binary_content** | **String** | | [optional] |
8
+ | **name** | **String** | Filename | [optional] |
9
+ | **content_type** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ElasticEmail'
15
+
16
+ instance = ElasticEmail::MessageAttachment.new(
17
+ binary_content: null,
18
+ name: attachment.txt,
19
+ content_type: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,15 @@
1
+ # ElasticEmail::MessageCategory
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'ElasticEmail'
12
+
13
+ instance = ElasticEmail::MessageCategory.new()
14
+ ```
15
+
data/docs/NewApiKey.md ADDED
@@ -0,0 +1,30 @@
1
+ # ElasticEmail::NewApiKey
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **token** | **String** | Unique token to be used in the system | [optional] |
8
+ | **access_level** | [**Array<AccessLevel>**](AccessLevel.md) | Access level or permission to be assigned to this ApiKey. | [optional] |
9
+ | **name** | **String** | Name of the ApiKey. | [optional] |
10
+ | **date_created** | **Time** | Date this ApiKey was created. | [optional] |
11
+ | **last_use** | **Time** | Date this ApiKey was last used. | [optional] |
12
+ | **expires** | **Time** | Date this ApiKey expires. | [optional] |
13
+ | **restrict_access_to_ip_range** | **Array<String>** | Which IPs can use this ApiKey | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'ElasticEmail'
19
+
20
+ instance = ElasticEmail::NewApiKey.new(
21
+ token: null,
22
+ access_level: null,
23
+ name: null,
24
+ date_created: null,
25
+ last_use: null,
26
+ expires: null,
27
+ restrict_access_to_ip_range: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,30 @@
1
+ # ElasticEmail::NewSmtpCredentials
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **token** | **String** | Unique token to be used in the system | [optional] |
8
+ | **access_level** | [**AccessLevel**](AccessLevel.md) | Access level of this Smtp Credential. | [optional] |
9
+ | **name** | **String** | Name of the key. | [optional] |
10
+ | **date_created** | **Time** | Date this SmtpCredential was created. | [optional] |
11
+ | **last_use** | **Time** | Date this SmtpCredential was last used. | [optional] |
12
+ | **expires** | **Time** | Date this SmtpCredential expires. | [optional] |
13
+ | **restrict_access_to_ip_range** | **Array<String>** | Which IPs can use this SmtpCredential | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'ElasticEmail'
19
+
20
+ instance = ElasticEmail::NewSmtpCredentials.new(
21
+ token: null,
22
+ access_level: null,
23
+ name: null,
24
+ date_created: null,
25
+ last_use: null,
26
+ expires: null,
27
+ restrict_access_to_ip_range: null
28
+ )
29
+ ```
30
+
data/docs/Options.md ADDED
@@ -0,0 +1,28 @@
1
+ # ElasticEmail::Options
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **time_offset** | **Integer** | By how long should an e-mail be delayed (in minutes). Maximum is 35 days. | [optional] |
8
+ | **pool_name** | **String** | Name of your custom IP Pool to be used in the sending process | [optional] |
9
+ | **channel_name** | **String** | Name of selected channel. | [optional] |
10
+ | **encoding** | [**EncodingType**](EncodingType.md) | 0 for None, 1 for Raw7Bit, 2 for Raw8Bit, 3 for QuotedPrintable, 4 for Base64 (Default), 5 for Uue note that you can also provide the text version such as \"Raw7Bit\" for value 1. NOTE: Base64 or QuotedPrintable is recommended if you are validating your domain(s) with DKIM. | [optional] |
11
+ | **track_opens** | **Boolean** | Should the opens be tracked? If no value has been provided, Account's default setting will be used. | [optional] |
12
+ | **track_clicks** | **Boolean** | Should the clicks be tracked? If no value has been provided, Account's default setting will be used. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'ElasticEmail'
18
+
19
+ instance = ElasticEmail::Options.new(
20
+ time_offset: null,
21
+ pool_name: My Custom Pool,
22
+ channel_name: Channel01,
23
+ encoding: null,
24
+ track_opens: true,
25
+ track_clicks: true
26
+ )
27
+ ```
28
+
@@ -0,0 +1,42 @@
1
+ # ElasticEmail::RecipientEvent
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **transaction_id** | **String** | ID number of transaction | [optional] |
8
+ | **msg_id** | **String** | ID number of selected message. | [optional] |
9
+ | **from_email** | **String** | Default From: email address. | [optional] |
10
+ | **to** | **String** | Ending date for search in YYYY-MM-DDThh:mm:ss format. | [optional] |
11
+ | **subject** | **String** | Default subject of email. | [optional] |
12
+ | **event_type** | [**EventType**](EventType.md) | Type of an Event | [optional] |
13
+ | **event_date** | **Time** | Creation date | [optional] |
14
+ | **channel_name** | **String** | Name of selected channel. | [optional] |
15
+ | **message_category** | [**MessageCategory**](MessageCategory.md) | Message category | [optional] |
16
+ | **next_try_on** | **Time** | Date of next try | [optional] |
17
+ | **message** | **String** | Content of message, HTML encoded | [optional] |
18
+ | **ip_address** | **String** | IP which this email was sent through | [optional] |
19
+ | **pool_name** | **String** | Name of an IP pool this email was sent through | [optional] |
20
+
21
+ ## Example
22
+
23
+ ```ruby
24
+ require 'ElasticEmail'
25
+
26
+ instance = ElasticEmail::RecipientEvent.new(
27
+ transaction_id: TransactionID,
28
+ msg_id: ABCDE_9RPhSWiaJq_ab1g1,
29
+ from_email: sender@yourdomain.com,
30
+ to: 2001-01-01T01:01:01,
31
+ subject: Hello!,
32
+ event_type: null,
33
+ event_date: null,
34
+ channel_name: Channel01,
35
+ message_category: null,
36
+ next_try_on: null,
37
+ message: Lorem ipsum,
38
+ ip_address: null,
39
+ pool_name: null
40
+ )
41
+ ```
42
+
@@ -0,0 +1,749 @@
1
+ # ElasticEmail::SecurityApi
2
+
3
+ All URIs are relative to *https://api.elasticemail.com/v4*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**security_apikeys_by_name_delete**](SecurityApi.md#security_apikeys_by_name_delete) | **DELETE** /security/apikeys/{name} | Delete ApiKey |
8
+ | [**security_apikeys_by_name_get**](SecurityApi.md#security_apikeys_by_name_get) | **GET** /security/apikeys/{name} | Load ApiKey |
9
+ | [**security_apikeys_by_name_put**](SecurityApi.md#security_apikeys_by_name_put) | **PUT** /security/apikeys/{name} | Update ApiKey |
10
+ | [**security_apikeys_get**](SecurityApi.md#security_apikeys_get) | **GET** /security/apikeys | List ApiKeys |
11
+ | [**security_apikeys_post**](SecurityApi.md#security_apikeys_post) | **POST** /security/apikeys | Add ApiKey |
12
+ | [**security_smtp_by_name_delete**](SecurityApi.md#security_smtp_by_name_delete) | **DELETE** /security/smtp/{name} | Delete SMTP Credential |
13
+ | [**security_smtp_by_name_get**](SecurityApi.md#security_smtp_by_name_get) | **GET** /security/smtp/{name} | Load SMTP Credential |
14
+ | [**security_smtp_by_name_put**](SecurityApi.md#security_smtp_by_name_put) | **PUT** /security/smtp/{name} | Update SMTP Credential |
15
+ | [**security_smtp_get**](SecurityApi.md#security_smtp_get) | **GET** /security/smtp | List SMTP Credentials |
16
+ | [**security_smtp_post**](SecurityApi.md#security_smtp_post) | **POST** /security/smtp | Add SMTP Credential |
17
+
18
+
19
+ ## security_apikeys_by_name_delete
20
+
21
+ > security_apikeys_by_name_delete(name, opts)
22
+
23
+ Delete ApiKey
24
+
25
+ Delete your existing ApiKey. Required Access Level: Security
26
+
27
+ ### Examples
28
+
29
+ ```ruby
30
+ require 'time'
31
+ require 'ElasticEmail'
32
+ # setup authorization
33
+ ElasticEmail.configure do |config|
34
+ # Configure API key authorization: apikey
35
+ config.api_key['apikey'] = 'YOUR API KEY'
36
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
37
+ # config.api_key_prefix['apikey'] = 'Bearer'
38
+ end
39
+
40
+ api_instance = ElasticEmail::SecurityApi.new
41
+ name = 'name_example' # String | Name of the ApiKey
42
+ opts = {
43
+ subaccount: 'subaccount_example' # String | Email of the subaccount of which ApiKey should be deleted
44
+ }
45
+
46
+ begin
47
+ # Delete ApiKey
48
+ api_instance.security_apikeys_by_name_delete(name, opts)
49
+ rescue ElasticEmail::ApiError => e
50
+ puts "Error when calling SecurityApi->security_apikeys_by_name_delete: #{e}"
51
+ end
52
+ ```
53
+
54
+ #### Using the security_apikeys_by_name_delete_with_http_info variant
55
+
56
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
57
+
58
+ > <Array(nil, Integer, Hash)> security_apikeys_by_name_delete_with_http_info(name, opts)
59
+
60
+ ```ruby
61
+ begin
62
+ # Delete ApiKey
63
+ data, status_code, headers = api_instance.security_apikeys_by_name_delete_with_http_info(name, opts)
64
+ p status_code # => 2xx
65
+ p headers # => { ... }
66
+ p data # => nil
67
+ rescue ElasticEmail::ApiError => e
68
+ puts "Error when calling SecurityApi->security_apikeys_by_name_delete_with_http_info: #{e}"
69
+ end
70
+ ```
71
+
72
+ ### Parameters
73
+
74
+ | Name | Type | Description | Notes |
75
+ | ---- | ---- | ----------- | ----- |
76
+ | **name** | **String** | Name of the ApiKey | |
77
+ | **subaccount** | **String** | Email of the subaccount of which ApiKey should be deleted | [optional] |
78
+
79
+ ### Return type
80
+
81
+ nil (empty response body)
82
+
83
+ ### Authorization
84
+
85
+ [apikey](../README.md#apikey)
86
+
87
+ ### HTTP request headers
88
+
89
+ - **Content-Type**: Not defined
90
+ - **Accept**: Not defined
91
+
92
+
93
+ ## security_apikeys_by_name_get
94
+
95
+ > <ApiKey> security_apikeys_by_name_get(name, opts)
96
+
97
+ Load ApiKey
98
+
99
+ Load your existing ApiKey info. Required Access Level: Security
100
+
101
+ ### Examples
102
+
103
+ ```ruby
104
+ require 'time'
105
+ require 'ElasticEmail'
106
+ # setup authorization
107
+ ElasticEmail.configure do |config|
108
+ # Configure API key authorization: apikey
109
+ config.api_key['apikey'] = 'YOUR API KEY'
110
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
111
+ # config.api_key_prefix['apikey'] = 'Bearer'
112
+ end
113
+
114
+ api_instance = ElasticEmail::SecurityApi.new
115
+ name = 'name_example' # String | Name of the ApiKey
116
+ opts = {
117
+ subaccount: 'subaccount_example' # String | Email of the subaccount of which ApiKey should be loaded
118
+ }
119
+
120
+ begin
121
+ # Load ApiKey
122
+ result = api_instance.security_apikeys_by_name_get(name, opts)
123
+ p result
124
+ rescue ElasticEmail::ApiError => e
125
+ puts "Error when calling SecurityApi->security_apikeys_by_name_get: #{e}"
126
+ end
127
+ ```
128
+
129
+ #### Using the security_apikeys_by_name_get_with_http_info variant
130
+
131
+ This returns an Array which contains the response data, status code and headers.
132
+
133
+ > <Array(<ApiKey>, Integer, Hash)> security_apikeys_by_name_get_with_http_info(name, opts)
134
+
135
+ ```ruby
136
+ begin
137
+ # Load ApiKey
138
+ data, status_code, headers = api_instance.security_apikeys_by_name_get_with_http_info(name, opts)
139
+ p status_code # => 2xx
140
+ p headers # => { ... }
141
+ p data # => <ApiKey>
142
+ rescue ElasticEmail::ApiError => e
143
+ puts "Error when calling SecurityApi->security_apikeys_by_name_get_with_http_info: #{e}"
144
+ end
145
+ ```
146
+
147
+ ### Parameters
148
+
149
+ | Name | Type | Description | Notes |
150
+ | ---- | ---- | ----------- | ----- |
151
+ | **name** | **String** | Name of the ApiKey | |
152
+ | **subaccount** | **String** | Email of the subaccount of which ApiKey should be loaded | [optional] |
153
+
154
+ ### Return type
155
+
156
+ [**ApiKey**](ApiKey.md)
157
+
158
+ ### Authorization
159
+
160
+ [apikey](../README.md#apikey)
161
+
162
+ ### HTTP request headers
163
+
164
+ - **Content-Type**: Not defined
165
+ - **Accept**: application/json
166
+
167
+
168
+ ## security_apikeys_by_name_put
169
+
170
+ > <ApiKey> security_apikeys_by_name_put(name, api_key_payload)
171
+
172
+ Update ApiKey
173
+
174
+ Update your existing ApiKey. Required Access Level: Security
175
+
176
+ ### Examples
177
+
178
+ ```ruby
179
+ require 'time'
180
+ require 'ElasticEmail'
181
+ # setup authorization
182
+ ElasticEmail.configure do |config|
183
+ # Configure API key authorization: apikey
184
+ config.api_key['apikey'] = 'YOUR API KEY'
185
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
186
+ # config.api_key_prefix['apikey'] = 'Bearer'
187
+ end
188
+
189
+ api_instance = ElasticEmail::SecurityApi.new
190
+ name = 'name_example' # String | Name of the ApiKey
191
+ api_key_payload = ElasticEmail::ApiKeyPayload.new # ApiKeyPayload |
192
+
193
+ begin
194
+ # Update ApiKey
195
+ result = api_instance.security_apikeys_by_name_put(name, api_key_payload)
196
+ p result
197
+ rescue ElasticEmail::ApiError => e
198
+ puts "Error when calling SecurityApi->security_apikeys_by_name_put: #{e}"
199
+ end
200
+ ```
201
+
202
+ #### Using the security_apikeys_by_name_put_with_http_info variant
203
+
204
+ This returns an Array which contains the response data, status code and headers.
205
+
206
+ > <Array(<ApiKey>, Integer, Hash)> security_apikeys_by_name_put_with_http_info(name, api_key_payload)
207
+
208
+ ```ruby
209
+ begin
210
+ # Update ApiKey
211
+ data, status_code, headers = api_instance.security_apikeys_by_name_put_with_http_info(name, api_key_payload)
212
+ p status_code # => 2xx
213
+ p headers # => { ... }
214
+ p data # => <ApiKey>
215
+ rescue ElasticEmail::ApiError => e
216
+ puts "Error when calling SecurityApi->security_apikeys_by_name_put_with_http_info: #{e}"
217
+ end
218
+ ```
219
+
220
+ ### Parameters
221
+
222
+ | Name | Type | Description | Notes |
223
+ | ---- | ---- | ----------- | ----- |
224
+ | **name** | **String** | Name of the ApiKey | |
225
+ | **api_key_payload** | [**ApiKeyPayload**](ApiKeyPayload.md) | | |
226
+
227
+ ### Return type
228
+
229
+ [**ApiKey**](ApiKey.md)
230
+
231
+ ### Authorization
232
+
233
+ [apikey](../README.md#apikey)
234
+
235
+ ### HTTP request headers
236
+
237
+ - **Content-Type**: application/json
238
+ - **Accept**: application/json
239
+
240
+
241
+ ## security_apikeys_get
242
+
243
+ > <Array<ApiKey>> security_apikeys_get(opts)
244
+
245
+ List ApiKeys
246
+
247
+ List all your existing ApiKeys. Required Access Level: Security
248
+
249
+ ### Examples
250
+
251
+ ```ruby
252
+ require 'time'
253
+ require 'ElasticEmail'
254
+ # setup authorization
255
+ ElasticEmail.configure do |config|
256
+ # Configure API key authorization: apikey
257
+ config.api_key['apikey'] = 'YOUR API KEY'
258
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
259
+ # config.api_key_prefix['apikey'] = 'Bearer'
260
+ end
261
+
262
+ api_instance = ElasticEmail::SecurityApi.new
263
+ opts = {
264
+ subaccount: 'subaccount_example' # String | Email of the subaccount of which ApiKeys should be loaded
265
+ }
266
+
267
+ begin
268
+ # List ApiKeys
269
+ result = api_instance.security_apikeys_get(opts)
270
+ p result
271
+ rescue ElasticEmail::ApiError => e
272
+ puts "Error when calling SecurityApi->security_apikeys_get: #{e}"
273
+ end
274
+ ```
275
+
276
+ #### Using the security_apikeys_get_with_http_info variant
277
+
278
+ This returns an Array which contains the response data, status code and headers.
279
+
280
+ > <Array(<Array<ApiKey>>, Integer, Hash)> security_apikeys_get_with_http_info(opts)
281
+
282
+ ```ruby
283
+ begin
284
+ # List ApiKeys
285
+ data, status_code, headers = api_instance.security_apikeys_get_with_http_info(opts)
286
+ p status_code # => 2xx
287
+ p headers # => { ... }
288
+ p data # => <Array<ApiKey>>
289
+ rescue ElasticEmail::ApiError => e
290
+ puts "Error when calling SecurityApi->security_apikeys_get_with_http_info: #{e}"
291
+ end
292
+ ```
293
+
294
+ ### Parameters
295
+
296
+ | Name | Type | Description | Notes |
297
+ | ---- | ---- | ----------- | ----- |
298
+ | **subaccount** | **String** | Email of the subaccount of which ApiKeys should be loaded | [optional] |
299
+
300
+ ### Return type
301
+
302
+ [**Array&lt;ApiKey&gt;**](ApiKey.md)
303
+
304
+ ### Authorization
305
+
306
+ [apikey](../README.md#apikey)
307
+
308
+ ### HTTP request headers
309
+
310
+ - **Content-Type**: Not defined
311
+ - **Accept**: application/json
312
+
313
+
314
+ ## security_apikeys_post
315
+
316
+ > <NewApiKey> security_apikeys_post(api_key_payload)
317
+
318
+ Add ApiKey
319
+
320
+ Add a new ApiKey. Required Access Level: Security
321
+
322
+ ### Examples
323
+
324
+ ```ruby
325
+ require 'time'
326
+ require 'ElasticEmail'
327
+ # setup authorization
328
+ ElasticEmail.configure do |config|
329
+ # Configure API key authorization: apikey
330
+ config.api_key['apikey'] = 'YOUR API KEY'
331
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
332
+ # config.api_key_prefix['apikey'] = 'Bearer'
333
+ end
334
+
335
+ api_instance = ElasticEmail::SecurityApi.new
336
+ api_key_payload = ElasticEmail::ApiKeyPayload.new # ApiKeyPayload |
337
+
338
+ begin
339
+ # Add ApiKey
340
+ result = api_instance.security_apikeys_post(api_key_payload)
341
+ p result
342
+ rescue ElasticEmail::ApiError => e
343
+ puts "Error when calling SecurityApi->security_apikeys_post: #{e}"
344
+ end
345
+ ```
346
+
347
+ #### Using the security_apikeys_post_with_http_info variant
348
+
349
+ This returns an Array which contains the response data, status code and headers.
350
+
351
+ > <Array(<NewApiKey>, Integer, Hash)> security_apikeys_post_with_http_info(api_key_payload)
352
+
353
+ ```ruby
354
+ begin
355
+ # Add ApiKey
356
+ data, status_code, headers = api_instance.security_apikeys_post_with_http_info(api_key_payload)
357
+ p status_code # => 2xx
358
+ p headers # => { ... }
359
+ p data # => <NewApiKey>
360
+ rescue ElasticEmail::ApiError => e
361
+ puts "Error when calling SecurityApi->security_apikeys_post_with_http_info: #{e}"
362
+ end
363
+ ```
364
+
365
+ ### Parameters
366
+
367
+ | Name | Type | Description | Notes |
368
+ | ---- | ---- | ----------- | ----- |
369
+ | **api_key_payload** | [**ApiKeyPayload**](ApiKeyPayload.md) | | |
370
+
371
+ ### Return type
372
+
373
+ [**NewApiKey**](NewApiKey.md)
374
+
375
+ ### Authorization
376
+
377
+ [apikey](../README.md#apikey)
378
+
379
+ ### HTTP request headers
380
+
381
+ - **Content-Type**: application/json
382
+ - **Accept**: application/json
383
+
384
+
385
+ ## security_smtp_by_name_delete
386
+
387
+ > security_smtp_by_name_delete(name, opts)
388
+
389
+ Delete SMTP Credential
390
+
391
+ Delete your existing SMTP Credentials. Required Access Level: Security
392
+
393
+ ### Examples
394
+
395
+ ```ruby
396
+ require 'time'
397
+ require 'ElasticEmail'
398
+ # setup authorization
399
+ ElasticEmail.configure do |config|
400
+ # Configure API key authorization: apikey
401
+ config.api_key['apikey'] = 'YOUR API KEY'
402
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
403
+ # config.api_key_prefix['apikey'] = 'Bearer'
404
+ end
405
+
406
+ api_instance = ElasticEmail::SecurityApi.new
407
+ name = 'name_example' # String | Name of the SMTP Credential
408
+ opts = {
409
+ subaccount: 'subaccount_example' # String | Email of the subaccount of which credential should be deleted
410
+ }
411
+
412
+ begin
413
+ # Delete SMTP Credential
414
+ api_instance.security_smtp_by_name_delete(name, opts)
415
+ rescue ElasticEmail::ApiError => e
416
+ puts "Error when calling SecurityApi->security_smtp_by_name_delete: #{e}"
417
+ end
418
+ ```
419
+
420
+ #### Using the security_smtp_by_name_delete_with_http_info variant
421
+
422
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
423
+
424
+ > <Array(nil, Integer, Hash)> security_smtp_by_name_delete_with_http_info(name, opts)
425
+
426
+ ```ruby
427
+ begin
428
+ # Delete SMTP Credential
429
+ data, status_code, headers = api_instance.security_smtp_by_name_delete_with_http_info(name, opts)
430
+ p status_code # => 2xx
431
+ p headers # => { ... }
432
+ p data # => nil
433
+ rescue ElasticEmail::ApiError => e
434
+ puts "Error when calling SecurityApi->security_smtp_by_name_delete_with_http_info: #{e}"
435
+ end
436
+ ```
437
+
438
+ ### Parameters
439
+
440
+ | Name | Type | Description | Notes |
441
+ | ---- | ---- | ----------- | ----- |
442
+ | **name** | **String** | Name of the SMTP Credential | |
443
+ | **subaccount** | **String** | Email of the subaccount of which credential should be deleted | [optional] |
444
+
445
+ ### Return type
446
+
447
+ nil (empty response body)
448
+
449
+ ### Authorization
450
+
451
+ [apikey](../README.md#apikey)
452
+
453
+ ### HTTP request headers
454
+
455
+ - **Content-Type**: Not defined
456
+ - **Accept**: Not defined
457
+
458
+
459
+ ## security_smtp_by_name_get
460
+
461
+ > <SmtpCredentials> security_smtp_by_name_get(name, opts)
462
+
463
+ Load SMTP Credential
464
+
465
+ Load your existing SMTP Credential info. Required Access Level: Security
466
+
467
+ ### Examples
468
+
469
+ ```ruby
470
+ require 'time'
471
+ require 'ElasticEmail'
472
+ # setup authorization
473
+ ElasticEmail.configure do |config|
474
+ # Configure API key authorization: apikey
475
+ config.api_key['apikey'] = 'YOUR API KEY'
476
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
477
+ # config.api_key_prefix['apikey'] = 'Bearer'
478
+ end
479
+
480
+ api_instance = ElasticEmail::SecurityApi.new
481
+ name = 'name_example' # String | Name of the SMTP Credential
482
+ opts = {
483
+ subaccount: 'subaccount_example' # String | Email of the subaccount of which credential should be loaded
484
+ }
485
+
486
+ begin
487
+ # Load SMTP Credential
488
+ result = api_instance.security_smtp_by_name_get(name, opts)
489
+ p result
490
+ rescue ElasticEmail::ApiError => e
491
+ puts "Error when calling SecurityApi->security_smtp_by_name_get: #{e}"
492
+ end
493
+ ```
494
+
495
+ #### Using the security_smtp_by_name_get_with_http_info variant
496
+
497
+ This returns an Array which contains the response data, status code and headers.
498
+
499
+ > <Array(<SmtpCredentials>, Integer, Hash)> security_smtp_by_name_get_with_http_info(name, opts)
500
+
501
+ ```ruby
502
+ begin
503
+ # Load SMTP Credential
504
+ data, status_code, headers = api_instance.security_smtp_by_name_get_with_http_info(name, opts)
505
+ p status_code # => 2xx
506
+ p headers # => { ... }
507
+ p data # => <SmtpCredentials>
508
+ rescue ElasticEmail::ApiError => e
509
+ puts "Error when calling SecurityApi->security_smtp_by_name_get_with_http_info: #{e}"
510
+ end
511
+ ```
512
+
513
+ ### Parameters
514
+
515
+ | Name | Type | Description | Notes |
516
+ | ---- | ---- | ----------- | ----- |
517
+ | **name** | **String** | Name of the SMTP Credential | |
518
+ | **subaccount** | **String** | Email of the subaccount of which credential should be loaded | [optional] |
519
+
520
+ ### Return type
521
+
522
+ [**SmtpCredentials**](SmtpCredentials.md)
523
+
524
+ ### Authorization
525
+
526
+ [apikey](../README.md#apikey)
527
+
528
+ ### HTTP request headers
529
+
530
+ - **Content-Type**: Not defined
531
+ - **Accept**: application/json
532
+
533
+
534
+ ## security_smtp_by_name_put
535
+
536
+ > <SmtpCredentials> security_smtp_by_name_put(name, smtp_credentials_payload)
537
+
538
+ Update SMTP Credential
539
+
540
+ Update your existing SMTP Credentials. Required Access Level: Security
541
+
542
+ ### Examples
543
+
544
+ ```ruby
545
+ require 'time'
546
+ require 'ElasticEmail'
547
+ # setup authorization
548
+ ElasticEmail.configure do |config|
549
+ # Configure API key authorization: apikey
550
+ config.api_key['apikey'] = 'YOUR API KEY'
551
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
552
+ # config.api_key_prefix['apikey'] = 'Bearer'
553
+ end
554
+
555
+ api_instance = ElasticEmail::SecurityApi.new
556
+ name = 'name_example' # String | Name of the SMTP Credential
557
+ smtp_credentials_payload = ElasticEmail::SmtpCredentialsPayload.new # SmtpCredentialsPayload |
558
+
559
+ begin
560
+ # Update SMTP Credential
561
+ result = api_instance.security_smtp_by_name_put(name, smtp_credentials_payload)
562
+ p result
563
+ rescue ElasticEmail::ApiError => e
564
+ puts "Error when calling SecurityApi->security_smtp_by_name_put: #{e}"
565
+ end
566
+ ```
567
+
568
+ #### Using the security_smtp_by_name_put_with_http_info variant
569
+
570
+ This returns an Array which contains the response data, status code and headers.
571
+
572
+ > <Array(<SmtpCredentials>, Integer, Hash)> security_smtp_by_name_put_with_http_info(name, smtp_credentials_payload)
573
+
574
+ ```ruby
575
+ begin
576
+ # Update SMTP Credential
577
+ data, status_code, headers = api_instance.security_smtp_by_name_put_with_http_info(name, smtp_credentials_payload)
578
+ p status_code # => 2xx
579
+ p headers # => { ... }
580
+ p data # => <SmtpCredentials>
581
+ rescue ElasticEmail::ApiError => e
582
+ puts "Error when calling SecurityApi->security_smtp_by_name_put_with_http_info: #{e}"
583
+ end
584
+ ```
585
+
586
+ ### Parameters
587
+
588
+ | Name | Type | Description | Notes |
589
+ | ---- | ---- | ----------- | ----- |
590
+ | **name** | **String** | Name of the SMTP Credential | |
591
+ | **smtp_credentials_payload** | [**SmtpCredentialsPayload**](SmtpCredentialsPayload.md) | | |
592
+
593
+ ### Return type
594
+
595
+ [**SmtpCredentials**](SmtpCredentials.md)
596
+
597
+ ### Authorization
598
+
599
+ [apikey](../README.md#apikey)
600
+
601
+ ### HTTP request headers
602
+
603
+ - **Content-Type**: application/json
604
+ - **Accept**: application/json
605
+
606
+
607
+ ## security_smtp_get
608
+
609
+ > <Array<SmtpCredentials>> security_smtp_get(opts)
610
+
611
+ List SMTP Credentials
612
+
613
+ List all your existing SMTP Credentials. Required Access Level: Security
614
+
615
+ ### Examples
616
+
617
+ ```ruby
618
+ require 'time'
619
+ require 'ElasticEmail'
620
+ # setup authorization
621
+ ElasticEmail.configure do |config|
622
+ # Configure API key authorization: apikey
623
+ config.api_key['apikey'] = 'YOUR API KEY'
624
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
625
+ # config.api_key_prefix['apikey'] = 'Bearer'
626
+ end
627
+
628
+ api_instance = ElasticEmail::SecurityApi.new
629
+ opts = {
630
+ subaccount: 'subaccount_example' # String | Email of the subaccount of which credentials should be listed
631
+ }
632
+
633
+ begin
634
+ # List SMTP Credentials
635
+ result = api_instance.security_smtp_get(opts)
636
+ p result
637
+ rescue ElasticEmail::ApiError => e
638
+ puts "Error when calling SecurityApi->security_smtp_get: #{e}"
639
+ end
640
+ ```
641
+
642
+ #### Using the security_smtp_get_with_http_info variant
643
+
644
+ This returns an Array which contains the response data, status code and headers.
645
+
646
+ > <Array(<Array<SmtpCredentials>>, Integer, Hash)> security_smtp_get_with_http_info(opts)
647
+
648
+ ```ruby
649
+ begin
650
+ # List SMTP Credentials
651
+ data, status_code, headers = api_instance.security_smtp_get_with_http_info(opts)
652
+ p status_code # => 2xx
653
+ p headers # => { ... }
654
+ p data # => <Array<SmtpCredentials>>
655
+ rescue ElasticEmail::ApiError => e
656
+ puts "Error when calling SecurityApi->security_smtp_get_with_http_info: #{e}"
657
+ end
658
+ ```
659
+
660
+ ### Parameters
661
+
662
+ | Name | Type | Description | Notes |
663
+ | ---- | ---- | ----------- | ----- |
664
+ | **subaccount** | **String** | Email of the subaccount of which credentials should be listed | [optional] |
665
+
666
+ ### Return type
667
+
668
+ [**Array&lt;SmtpCredentials&gt;**](SmtpCredentials.md)
669
+
670
+ ### Authorization
671
+
672
+ [apikey](../README.md#apikey)
673
+
674
+ ### HTTP request headers
675
+
676
+ - **Content-Type**: Not defined
677
+ - **Accept**: application/json
678
+
679
+
680
+ ## security_smtp_post
681
+
682
+ > <NewSmtpCredentials> security_smtp_post(smtp_credentials_payload)
683
+
684
+ Add SMTP Credential
685
+
686
+ Add new SMTP Credential. Required Access Level: Security
687
+
688
+ ### Examples
689
+
690
+ ```ruby
691
+ require 'time'
692
+ require 'ElasticEmail'
693
+ # setup authorization
694
+ ElasticEmail.configure do |config|
695
+ # Configure API key authorization: apikey
696
+ config.api_key['apikey'] = 'YOUR API KEY'
697
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
698
+ # config.api_key_prefix['apikey'] = 'Bearer'
699
+ end
700
+
701
+ api_instance = ElasticEmail::SecurityApi.new
702
+ smtp_credentials_payload = ElasticEmail::SmtpCredentialsPayload.new # SmtpCredentialsPayload |
703
+
704
+ begin
705
+ # Add SMTP Credential
706
+ result = api_instance.security_smtp_post(smtp_credentials_payload)
707
+ p result
708
+ rescue ElasticEmail::ApiError => e
709
+ puts "Error when calling SecurityApi->security_smtp_post: #{e}"
710
+ end
711
+ ```
712
+
713
+ #### Using the security_smtp_post_with_http_info variant
714
+
715
+ This returns an Array which contains the response data, status code and headers.
716
+
717
+ > <Array(<NewSmtpCredentials>, Integer, Hash)> security_smtp_post_with_http_info(smtp_credentials_payload)
718
+
719
+ ```ruby
720
+ begin
721
+ # Add SMTP Credential
722
+ data, status_code, headers = api_instance.security_smtp_post_with_http_info(smtp_credentials_payload)
723
+ p status_code # => 2xx
724
+ p headers # => { ... }
725
+ p data # => <NewSmtpCredentials>
726
+ rescue ElasticEmail::ApiError => e
727
+ puts "Error when calling SecurityApi->security_smtp_post_with_http_info: #{e}"
728
+ end
729
+ ```
730
+
731
+ ### Parameters
732
+
733
+ | Name | Type | Description | Notes |
734
+ | ---- | ---- | ----------- | ----- |
735
+ | **smtp_credentials_payload** | [**SmtpCredentialsPayload**](SmtpCredentialsPayload.md) | | |
736
+
737
+ ### Return type
738
+
739
+ [**NewSmtpCredentials**](NewSmtpCredentials.md)
740
+
741
+ ### Authorization
742
+
743
+ [apikey](../README.md#apikey)
744
+
745
+ ### HTTP request headers
746
+
747
+ - **Content-Type**: application/json
748
+ - **Accept**: application/json
749
+