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::InboundRouteFilterType
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'ElasticEmail'
12
+
13
+ instance = ElasticEmail::InboundRouteFilterType.new()
14
+ ```
15
+
@@ -0,0 +1,22 @@
1
+ # ElasticEmail::ListPayload
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **list_name** | **String** | Name of your list. | [optional] |
8
+ | **allow_unsubscribe** | **Boolean** | True: Allow unsubscribing from this list. Otherwise, false | [optional] |
9
+ | **emails** | **Array<String>** | Comma delimited list of existing contact emails that should be added to this list | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ElasticEmail'
15
+
16
+ instance = ElasticEmail::ListPayload.new(
17
+ list_name: My List 1,
18
+ allow_unsubscribe: false,
19
+ emails: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # ElasticEmail::ListUpdatePayload
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **new_list_name** | **String** | Name of your list if you want to change it. | [optional] |
8
+ | **allow_unsubscribe** | **Boolean** | True: Allow unsubscribing from this list. Otherwise, false | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ElasticEmail'
14
+
15
+ instance = ElasticEmail::ListUpdatePayload.new(
16
+ new_list_name: My List 2,
17
+ allow_unsubscribe: false
18
+ )
19
+ ```
20
+
data/docs/ListsApi.md ADDED
@@ -0,0 +1,519 @@
1
+ # ElasticEmail::ListsApi
2
+
3
+ All URIs are relative to *https://api.elasticemail.com/v4*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**lists_by_name_contacts_post**](ListsApi.md#lists_by_name_contacts_post) | **POST** /lists/{name}/contacts | Add Contacts to List |
8
+ | [**lists_by_name_contacts_remove_post**](ListsApi.md#lists_by_name_contacts_remove_post) | **POST** /lists/{name}/contacts/remove | Remove Contacts from List |
9
+ | [**lists_by_name_delete**](ListsApi.md#lists_by_name_delete) | **DELETE** /lists/{name} | Delete List |
10
+ | [**lists_by_name_get**](ListsApi.md#lists_by_name_get) | **GET** /lists/{name} | Load List |
11
+ | [**lists_by_name_put**](ListsApi.md#lists_by_name_put) | **PUT** /lists/{name} | Update List |
12
+ | [**lists_get**](ListsApi.md#lists_get) | **GET** /lists | Load Lists |
13
+ | [**lists_post**](ListsApi.md#lists_post) | **POST** /lists | Add List |
14
+
15
+
16
+ ## lists_by_name_contacts_post
17
+
18
+ > <ContactsList> lists_by_name_contacts_post(name, emails_payload)
19
+
20
+ Add Contacts to List
21
+
22
+ Add existing Contacts to specified list. Required Access Level: ModifyContacts
23
+
24
+ ### Examples
25
+
26
+ ```ruby
27
+ require 'time'
28
+ require 'ElasticEmail'
29
+ # setup authorization
30
+ ElasticEmail.configure do |config|
31
+ # Configure API key authorization: apikey
32
+ config.api_key['apikey'] = 'YOUR API KEY'
33
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
34
+ # config.api_key_prefix['apikey'] = 'Bearer'
35
+ end
36
+
37
+ api_instance = ElasticEmail::ListsApi.new
38
+ name = 'My List 1' # String | Name of your list.
39
+ emails_payload = ElasticEmail::EmailsPayload.new # EmailsPayload | Provide either rule or a list of emails, not both.
40
+
41
+ begin
42
+ # Add Contacts to List
43
+ result = api_instance.lists_by_name_contacts_post(name, emails_payload)
44
+ p result
45
+ rescue ElasticEmail::ApiError => e
46
+ puts "Error when calling ListsApi->lists_by_name_contacts_post: #{e}"
47
+ end
48
+ ```
49
+
50
+ #### Using the lists_by_name_contacts_post_with_http_info variant
51
+
52
+ This returns an Array which contains the response data, status code and headers.
53
+
54
+ > <Array(<ContactsList>, Integer, Hash)> lists_by_name_contacts_post_with_http_info(name, emails_payload)
55
+
56
+ ```ruby
57
+ begin
58
+ # Add Contacts to List
59
+ data, status_code, headers = api_instance.lists_by_name_contacts_post_with_http_info(name, emails_payload)
60
+ p status_code # => 2xx
61
+ p headers # => { ... }
62
+ p data # => <ContactsList>
63
+ rescue ElasticEmail::ApiError => e
64
+ puts "Error when calling ListsApi->lists_by_name_contacts_post_with_http_info: #{e}"
65
+ end
66
+ ```
67
+
68
+ ### Parameters
69
+
70
+ | Name | Type | Description | Notes |
71
+ | ---- | ---- | ----------- | ----- |
72
+ | **name** | **String** | Name of your list. | |
73
+ | **emails_payload** | [**EmailsPayload**](EmailsPayload.md) | Provide either rule or a list of emails, not both. | |
74
+
75
+ ### Return type
76
+
77
+ [**ContactsList**](ContactsList.md)
78
+
79
+ ### Authorization
80
+
81
+ [apikey](../README.md#apikey)
82
+
83
+ ### HTTP request headers
84
+
85
+ - **Content-Type**: application/json
86
+ - **Accept**: application/json
87
+
88
+
89
+ ## lists_by_name_contacts_remove_post
90
+
91
+ > lists_by_name_contacts_remove_post(name, emails_payload)
92
+
93
+ Remove Contacts from List
94
+
95
+ Remove specified Contacts from your list. Required Access Level: ModifyContacts
96
+
97
+ ### Examples
98
+
99
+ ```ruby
100
+ require 'time'
101
+ require 'ElasticEmail'
102
+ # setup authorization
103
+ ElasticEmail.configure do |config|
104
+ # Configure API key authorization: apikey
105
+ config.api_key['apikey'] = 'YOUR API KEY'
106
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
107
+ # config.api_key_prefix['apikey'] = 'Bearer'
108
+ end
109
+
110
+ api_instance = ElasticEmail::ListsApi.new
111
+ name = 'My List 1' # String | Name of your list.
112
+ emails_payload = ElasticEmail::EmailsPayload.new # EmailsPayload | Provide either rule or a list of emails, not both.
113
+
114
+ begin
115
+ # Remove Contacts from List
116
+ api_instance.lists_by_name_contacts_remove_post(name, emails_payload)
117
+ rescue ElasticEmail::ApiError => e
118
+ puts "Error when calling ListsApi->lists_by_name_contacts_remove_post: #{e}"
119
+ end
120
+ ```
121
+
122
+ #### Using the lists_by_name_contacts_remove_post_with_http_info variant
123
+
124
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
125
+
126
+ > <Array(nil, Integer, Hash)> lists_by_name_contacts_remove_post_with_http_info(name, emails_payload)
127
+
128
+ ```ruby
129
+ begin
130
+ # Remove Contacts from List
131
+ data, status_code, headers = api_instance.lists_by_name_contacts_remove_post_with_http_info(name, emails_payload)
132
+ p status_code # => 2xx
133
+ p headers # => { ... }
134
+ p data # => nil
135
+ rescue ElasticEmail::ApiError => e
136
+ puts "Error when calling ListsApi->lists_by_name_contacts_remove_post_with_http_info: #{e}"
137
+ end
138
+ ```
139
+
140
+ ### Parameters
141
+
142
+ | Name | Type | Description | Notes |
143
+ | ---- | ---- | ----------- | ----- |
144
+ | **name** | **String** | Name of your list. | |
145
+ | **emails_payload** | [**EmailsPayload**](EmailsPayload.md) | Provide either rule or a list of emails, not both. | |
146
+
147
+ ### Return type
148
+
149
+ nil (empty response body)
150
+
151
+ ### Authorization
152
+
153
+ [apikey](../README.md#apikey)
154
+
155
+ ### HTTP request headers
156
+
157
+ - **Content-Type**: application/json
158
+ - **Accept**: Not defined
159
+
160
+
161
+ ## lists_by_name_delete
162
+
163
+ > lists_by_name_delete(name)
164
+
165
+ Delete List
166
+
167
+ Deletes List and removes all the Contacts from it (does not delete Contacts). Required Access Level: ModifyContacts
168
+
169
+ ### Examples
170
+
171
+ ```ruby
172
+ require 'time'
173
+ require 'ElasticEmail'
174
+ # setup authorization
175
+ ElasticEmail.configure do |config|
176
+ # Configure API key authorization: apikey
177
+ config.api_key['apikey'] = 'YOUR API KEY'
178
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
179
+ # config.api_key_prefix['apikey'] = 'Bearer'
180
+ end
181
+
182
+ api_instance = ElasticEmail::ListsApi.new
183
+ name = 'My List 1' # String | Name of your list.
184
+
185
+ begin
186
+ # Delete List
187
+ api_instance.lists_by_name_delete(name)
188
+ rescue ElasticEmail::ApiError => e
189
+ puts "Error when calling ListsApi->lists_by_name_delete: #{e}"
190
+ end
191
+ ```
192
+
193
+ #### Using the lists_by_name_delete_with_http_info variant
194
+
195
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
196
+
197
+ > <Array(nil, Integer, Hash)> lists_by_name_delete_with_http_info(name)
198
+
199
+ ```ruby
200
+ begin
201
+ # Delete List
202
+ data, status_code, headers = api_instance.lists_by_name_delete_with_http_info(name)
203
+ p status_code # => 2xx
204
+ p headers # => { ... }
205
+ p data # => nil
206
+ rescue ElasticEmail::ApiError => e
207
+ puts "Error when calling ListsApi->lists_by_name_delete_with_http_info: #{e}"
208
+ end
209
+ ```
210
+
211
+ ### Parameters
212
+
213
+ | Name | Type | Description | Notes |
214
+ | ---- | ---- | ----------- | ----- |
215
+ | **name** | **String** | Name of your list. | |
216
+
217
+ ### Return type
218
+
219
+ nil (empty response body)
220
+
221
+ ### Authorization
222
+
223
+ [apikey](../README.md#apikey)
224
+
225
+ ### HTTP request headers
226
+
227
+ - **Content-Type**: Not defined
228
+ - **Accept**: Not defined
229
+
230
+
231
+ ## lists_by_name_get
232
+
233
+ > <ContactsList> lists_by_name_get(name)
234
+
235
+ Load List
236
+
237
+ Returns detailed information about specified list. Required Access Level: ViewContacts
238
+
239
+ ### Examples
240
+
241
+ ```ruby
242
+ require 'time'
243
+ require 'ElasticEmail'
244
+ # setup authorization
245
+ ElasticEmail.configure do |config|
246
+ # Configure API key authorization: apikey
247
+ config.api_key['apikey'] = 'YOUR API KEY'
248
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
249
+ # config.api_key_prefix['apikey'] = 'Bearer'
250
+ end
251
+
252
+ api_instance = ElasticEmail::ListsApi.new
253
+ name = 'My List 1' # String | Name of your list.
254
+
255
+ begin
256
+ # Load List
257
+ result = api_instance.lists_by_name_get(name)
258
+ p result
259
+ rescue ElasticEmail::ApiError => e
260
+ puts "Error when calling ListsApi->lists_by_name_get: #{e}"
261
+ end
262
+ ```
263
+
264
+ #### Using the lists_by_name_get_with_http_info variant
265
+
266
+ This returns an Array which contains the response data, status code and headers.
267
+
268
+ > <Array(<ContactsList>, Integer, Hash)> lists_by_name_get_with_http_info(name)
269
+
270
+ ```ruby
271
+ begin
272
+ # Load List
273
+ data, status_code, headers = api_instance.lists_by_name_get_with_http_info(name)
274
+ p status_code # => 2xx
275
+ p headers # => { ... }
276
+ p data # => <ContactsList>
277
+ rescue ElasticEmail::ApiError => e
278
+ puts "Error when calling ListsApi->lists_by_name_get_with_http_info: #{e}"
279
+ end
280
+ ```
281
+
282
+ ### Parameters
283
+
284
+ | Name | Type | Description | Notes |
285
+ | ---- | ---- | ----------- | ----- |
286
+ | **name** | **String** | Name of your list. | |
287
+
288
+ ### Return type
289
+
290
+ [**ContactsList**](ContactsList.md)
291
+
292
+ ### Authorization
293
+
294
+ [apikey](../README.md#apikey)
295
+
296
+ ### HTTP request headers
297
+
298
+ - **Content-Type**: Not defined
299
+ - **Accept**: application/json
300
+
301
+
302
+ ## lists_by_name_put
303
+
304
+ > <ContactsList> lists_by_name_put(name, list_update_payload)
305
+
306
+ Update List
307
+
308
+ Update existing list. Required Access Level: ModifyContacts
309
+
310
+ ### Examples
311
+
312
+ ```ruby
313
+ require 'time'
314
+ require 'ElasticEmail'
315
+ # setup authorization
316
+ ElasticEmail.configure do |config|
317
+ # Configure API key authorization: apikey
318
+ config.api_key['apikey'] = 'YOUR API KEY'
319
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
320
+ # config.api_key_prefix['apikey'] = 'Bearer'
321
+ end
322
+
323
+ api_instance = ElasticEmail::ListsApi.new
324
+ name = 'My List 1' # String | Name of your list.
325
+ list_update_payload = ElasticEmail::ListUpdatePayload.new # ListUpdatePayload |
326
+
327
+ begin
328
+ # Update List
329
+ result = api_instance.lists_by_name_put(name, list_update_payload)
330
+ p result
331
+ rescue ElasticEmail::ApiError => e
332
+ puts "Error when calling ListsApi->lists_by_name_put: #{e}"
333
+ end
334
+ ```
335
+
336
+ #### Using the lists_by_name_put_with_http_info variant
337
+
338
+ This returns an Array which contains the response data, status code and headers.
339
+
340
+ > <Array(<ContactsList>, Integer, Hash)> lists_by_name_put_with_http_info(name, list_update_payload)
341
+
342
+ ```ruby
343
+ begin
344
+ # Update List
345
+ data, status_code, headers = api_instance.lists_by_name_put_with_http_info(name, list_update_payload)
346
+ p status_code # => 2xx
347
+ p headers # => { ... }
348
+ p data # => <ContactsList>
349
+ rescue ElasticEmail::ApiError => e
350
+ puts "Error when calling ListsApi->lists_by_name_put_with_http_info: #{e}"
351
+ end
352
+ ```
353
+
354
+ ### Parameters
355
+
356
+ | Name | Type | Description | Notes |
357
+ | ---- | ---- | ----------- | ----- |
358
+ | **name** | **String** | Name of your list. | |
359
+ | **list_update_payload** | [**ListUpdatePayload**](ListUpdatePayload.md) | | |
360
+
361
+ ### Return type
362
+
363
+ [**ContactsList**](ContactsList.md)
364
+
365
+ ### Authorization
366
+
367
+ [apikey](../README.md#apikey)
368
+
369
+ ### HTTP request headers
370
+
371
+ - **Content-Type**: application/json
372
+ - **Accept**: application/json
373
+
374
+
375
+ ## lists_get
376
+
377
+ > <Array<ContactsList>> lists_get(opts)
378
+
379
+ Load Lists
380
+
381
+ Returns all your existing lists. Required Access Level: ViewContacts
382
+
383
+ ### Examples
384
+
385
+ ```ruby
386
+ require 'time'
387
+ require 'ElasticEmail'
388
+ # setup authorization
389
+ ElasticEmail.configure do |config|
390
+ # Configure API key authorization: apikey
391
+ config.api_key['apikey'] = 'YOUR API KEY'
392
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
393
+ # config.api_key_prefix['apikey'] = 'Bearer'
394
+ end
395
+
396
+ api_instance = ElasticEmail::ListsApi.new
397
+ opts = {
398
+ limit: 100, # Integer | Maximum number of returned items.
399
+ offset: 20 # Integer | How many items should be returned ahead.
400
+ }
401
+
402
+ begin
403
+ # Load Lists
404
+ result = api_instance.lists_get(opts)
405
+ p result
406
+ rescue ElasticEmail::ApiError => e
407
+ puts "Error when calling ListsApi->lists_get: #{e}"
408
+ end
409
+ ```
410
+
411
+ #### Using the lists_get_with_http_info variant
412
+
413
+ This returns an Array which contains the response data, status code and headers.
414
+
415
+ > <Array(<Array<ContactsList>>, Integer, Hash)> lists_get_with_http_info(opts)
416
+
417
+ ```ruby
418
+ begin
419
+ # Load Lists
420
+ data, status_code, headers = api_instance.lists_get_with_http_info(opts)
421
+ p status_code # => 2xx
422
+ p headers # => { ... }
423
+ p data # => <Array<ContactsList>>
424
+ rescue ElasticEmail::ApiError => e
425
+ puts "Error when calling ListsApi->lists_get_with_http_info: #{e}"
426
+ end
427
+ ```
428
+
429
+ ### Parameters
430
+
431
+ | Name | Type | Description | Notes |
432
+ | ---- | ---- | ----------- | ----- |
433
+ | **limit** | **Integer** | Maximum number of returned items. | [optional] |
434
+ | **offset** | **Integer** | How many items should be returned ahead. | [optional] |
435
+
436
+ ### Return type
437
+
438
+ [**Array&lt;ContactsList&gt;**](ContactsList.md)
439
+
440
+ ### Authorization
441
+
442
+ [apikey](../README.md#apikey)
443
+
444
+ ### HTTP request headers
445
+
446
+ - **Content-Type**: Not defined
447
+ - **Accept**: application/json
448
+
449
+
450
+ ## lists_post
451
+
452
+ > <ContactsList> lists_post(list_payload)
453
+
454
+ Add List
455
+
456
+ Add a new list. Required Access Level: ModifyContacts
457
+
458
+ ### Examples
459
+
460
+ ```ruby
461
+ require 'time'
462
+ require 'ElasticEmail'
463
+ # setup authorization
464
+ ElasticEmail.configure do |config|
465
+ # Configure API key authorization: apikey
466
+ config.api_key['apikey'] = 'YOUR API KEY'
467
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
468
+ # config.api_key_prefix['apikey'] = 'Bearer'
469
+ end
470
+
471
+ api_instance = ElasticEmail::ListsApi.new
472
+ list_payload = ElasticEmail::ListPayload.new # ListPayload |
473
+
474
+ begin
475
+ # Add List
476
+ result = api_instance.lists_post(list_payload)
477
+ p result
478
+ rescue ElasticEmail::ApiError => e
479
+ puts "Error when calling ListsApi->lists_post: #{e}"
480
+ end
481
+ ```
482
+
483
+ #### Using the lists_post_with_http_info variant
484
+
485
+ This returns an Array which contains the response data, status code and headers.
486
+
487
+ > <Array(<ContactsList>, Integer, Hash)> lists_post_with_http_info(list_payload)
488
+
489
+ ```ruby
490
+ begin
491
+ # Add List
492
+ data, status_code, headers = api_instance.lists_post_with_http_info(list_payload)
493
+ p status_code # => 2xx
494
+ p headers # => { ... }
495
+ p data # => <ContactsList>
496
+ rescue ElasticEmail::ApiError => e
497
+ puts "Error when calling ListsApi->lists_post_with_http_info: #{e}"
498
+ end
499
+ ```
500
+
501
+ ### Parameters
502
+
503
+ | Name | Type | Description | Notes |
504
+ | ---- | ---- | ----------- | ----- |
505
+ | **list_payload** | [**ListPayload**](ListPayload.md) | | |
506
+
507
+ ### Return type
508
+
509
+ [**ContactsList**](ContactsList.md)
510
+
511
+ ### Authorization
512
+
513
+ [apikey](../README.md#apikey)
514
+
515
+ ### HTTP request headers
516
+
517
+ - **Content-Type**: application/json
518
+ - **Accept**: application/json
519
+