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,355 @@
1
+ =begin
2
+ #Elastic Email REST API
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. To start using this API, you will need your Access Token (available <a href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. This is the documentation for REST API. If you’d like to read our legacy documentation regarding Web API v2 click <a href=\"https://api.elasticemail.com/public/help\">here</a>.
5
+
6
+ The version of the OpenAPI document: 4.0.0
7
+ Contact: support@elasticemail.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module ElasticEmail
16
+ class TemplatesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete Template
23
+ # Delete template with the specified name. Required Access Level: ModifyTemplates
24
+ # @param name [String] Name of template.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def templates_by_name_delete(name, opts = {})
28
+ templates_by_name_delete_with_http_info(name, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete Template
33
+ # Delete template with the specified name. Required Access Level: ModifyTemplates
34
+ # @param name [String] Name of template.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def templates_by_name_delete_with_http_info(name, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: TemplatesApi.templates_by_name_delete ...'
40
+ end
41
+ # verify the required parameter 'name' is set
42
+ if @api_client.config.client_side_validation && name.nil?
43
+ fail ArgumentError, "Missing the required parameter 'name' when calling TemplatesApi.templates_by_name_delete"
44
+ end
45
+ # resource path
46
+ local_var_path = '/templates/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type]
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['apikey']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"TemplatesApi.templates_by_name_delete",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: TemplatesApi#templates_by_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Load Template
84
+ # Load detailed information of the specified template. Required Access Level: ViewTemplates
85
+ # @param name [String] Name of template.
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [Template]
88
+ def templates_by_name_get(name, opts = {})
89
+ data, _status_code, _headers = templates_by_name_get_with_http_info(name, opts)
90
+ data
91
+ end
92
+
93
+ # Load Template
94
+ # Load detailed information of the specified template. Required Access Level: ViewTemplates
95
+ # @param name [String] Name of template.
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
98
+ def templates_by_name_get_with_http_info(name, opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: TemplatesApi.templates_by_name_get ...'
101
+ end
102
+ # verify the required parameter 'name' is set
103
+ if @api_client.config.client_side_validation && name.nil?
104
+ fail ArgumentError, "Missing the required parameter 'name' when calling TemplatesApi.templates_by_name_get"
105
+ end
106
+ # resource path
107
+ local_var_path = '/templates/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
108
+
109
+ # query parameters
110
+ query_params = opts[:query_params] || {}
111
+
112
+ # header parameters
113
+ header_params = opts[:header_params] || {}
114
+ # HTTP header 'Accept' (if needed)
115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
116
+
117
+ # form parameters
118
+ form_params = opts[:form_params] || {}
119
+
120
+ # http body (model)
121
+ post_body = opts[:debug_body]
122
+
123
+ # return_type
124
+ return_type = opts[:debug_return_type] || 'Template'
125
+
126
+ # auth_names
127
+ auth_names = opts[:debug_auth_names] || ['apikey']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"TemplatesApi.templates_by_name_get",
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: TemplatesApi#templates_by_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # Update Template
147
+ # Update existing template, overwriting existing data. Required Access Level: ModifyTemplates
148
+ # @param name [String] Name of template.
149
+ # @param template_payload [TemplatePayload]
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [Template]
152
+ def templates_by_name_put(name, template_payload, opts = {})
153
+ data, _status_code, _headers = templates_by_name_put_with_http_info(name, template_payload, opts)
154
+ data
155
+ end
156
+
157
+ # Update Template
158
+ # Update existing template, overwriting existing data. Required Access Level: ModifyTemplates
159
+ # @param name [String] Name of template.
160
+ # @param template_payload [TemplatePayload]
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
163
+ def templates_by_name_put_with_http_info(name, template_payload, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: TemplatesApi.templates_by_name_put ...'
166
+ end
167
+ # verify the required parameter 'name' is set
168
+ if @api_client.config.client_side_validation && name.nil?
169
+ fail ArgumentError, "Missing the required parameter 'name' when calling TemplatesApi.templates_by_name_put"
170
+ end
171
+ # verify the required parameter 'template_payload' is set
172
+ if @api_client.config.client_side_validation && template_payload.nil?
173
+ fail ArgumentError, "Missing the required parameter 'template_payload' when calling TemplatesApi.templates_by_name_put"
174
+ end
175
+ # resource path
176
+ local_var_path = '/templates/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
177
+
178
+ # query parameters
179
+ query_params = opts[:query_params] || {}
180
+
181
+ # header parameters
182
+ header_params = opts[:header_params] || {}
183
+ # HTTP header 'Accept' (if needed)
184
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
185
+ # HTTP header 'Content-Type'
186
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
187
+
188
+ # form parameters
189
+ form_params = opts[:form_params] || {}
190
+
191
+ # http body (model)
192
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(template_payload)
193
+
194
+ # return_type
195
+ return_type = opts[:debug_return_type] || 'Template'
196
+
197
+ # auth_names
198
+ auth_names = opts[:debug_auth_names] || ['apikey']
199
+
200
+ new_options = opts.merge(
201
+ :operation => :"TemplatesApi.templates_by_name_put",
202
+ :header_params => header_params,
203
+ :query_params => query_params,
204
+ :form_params => form_params,
205
+ :body => post_body,
206
+ :auth_names => auth_names,
207
+ :return_type => return_type
208
+ )
209
+
210
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
211
+ if @api_client.config.debugging
212
+ @api_client.config.logger.debug "API called: TemplatesApi#templates_by_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
213
+ end
214
+ return data, status_code, headers
215
+ end
216
+
217
+ # Load Templates
218
+ # Returns a list of templates for the specified type. Required Access Level: ViewTemplates
219
+ # @param scope_type [Array<TemplateScopeType>] Return templates with specified scope only
220
+ # @param [Hash] opts the optional parameters
221
+ # @option opts [Array<TemplateType>] :template_types Return templates with specified type only
222
+ # @option opts [Integer] :limit Maximum number of returned items.
223
+ # @option opts [Integer] :offset How many items should be returned ahead.
224
+ # @return [Array<Template>]
225
+ def templates_get(scope_type, opts = {})
226
+ data, _status_code, _headers = templates_get_with_http_info(scope_type, opts)
227
+ data
228
+ end
229
+
230
+ # Load Templates
231
+ # Returns a list of templates for the specified type. Required Access Level: ViewTemplates
232
+ # @param scope_type [Array<TemplateScopeType>] Return templates with specified scope only
233
+ # @param [Hash] opts the optional parameters
234
+ # @option opts [Array<TemplateType>] :template_types Return templates with specified type only
235
+ # @option opts [Integer] :limit Maximum number of returned items.
236
+ # @option opts [Integer] :offset How many items should be returned ahead.
237
+ # @return [Array<(Array<Template>, Integer, Hash)>] Array<Template> data, response status code and response headers
238
+ def templates_get_with_http_info(scope_type, opts = {})
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug 'Calling API: TemplatesApi.templates_get ...'
241
+ end
242
+ # verify the required parameter 'scope_type' is set
243
+ if @api_client.config.client_side_validation && scope_type.nil?
244
+ fail ArgumentError, "Missing the required parameter 'scope_type' when calling TemplatesApi.templates_get"
245
+ end
246
+ # resource path
247
+ local_var_path = '/templates'
248
+
249
+ # query parameters
250
+ query_params = opts[:query_params] || {}
251
+ query_params[:'scopeType'] = @api_client.build_collection_param(scope_type, :multi)
252
+ query_params[:'templateTypes'] = @api_client.build_collection_param(opts[:'template_types'], :multi) if !opts[:'template_types'].nil?
253
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
254
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
255
+
256
+ # header parameters
257
+ header_params = opts[:header_params] || {}
258
+ # HTTP header 'Accept' (if needed)
259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
260
+
261
+ # form parameters
262
+ form_params = opts[:form_params] || {}
263
+
264
+ # http body (model)
265
+ post_body = opts[:debug_body]
266
+
267
+ # return_type
268
+ return_type = opts[:debug_return_type] || 'Array<Template>'
269
+
270
+ # auth_names
271
+ auth_names = opts[:debug_auth_names] || ['apikey']
272
+
273
+ new_options = opts.merge(
274
+ :operation => :"TemplatesApi.templates_get",
275
+ :header_params => header_params,
276
+ :query_params => query_params,
277
+ :form_params => form_params,
278
+ :body => post_body,
279
+ :auth_names => auth_names,
280
+ :return_type => return_type
281
+ )
282
+
283
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "API called: TemplatesApi#templates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
+ end
287
+ return data, status_code, headers
288
+ end
289
+
290
+ # Add Template
291
+ # Add a new Template. Required Access Level: ModifyTemplates
292
+ # @param template_payload [TemplatePayload]
293
+ # @param [Hash] opts the optional parameters
294
+ # @return [Template]
295
+ def templates_post(template_payload, opts = {})
296
+ data, _status_code, _headers = templates_post_with_http_info(template_payload, opts)
297
+ data
298
+ end
299
+
300
+ # Add Template
301
+ # Add a new Template. Required Access Level: ModifyTemplates
302
+ # @param template_payload [TemplatePayload]
303
+ # @param [Hash] opts the optional parameters
304
+ # @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
305
+ def templates_post_with_http_info(template_payload, opts = {})
306
+ if @api_client.config.debugging
307
+ @api_client.config.logger.debug 'Calling API: TemplatesApi.templates_post ...'
308
+ end
309
+ # verify the required parameter 'template_payload' is set
310
+ if @api_client.config.client_side_validation && template_payload.nil?
311
+ fail ArgumentError, "Missing the required parameter 'template_payload' when calling TemplatesApi.templates_post"
312
+ end
313
+ # resource path
314
+ local_var_path = '/templates'
315
+
316
+ # query parameters
317
+ query_params = opts[:query_params] || {}
318
+
319
+ # header parameters
320
+ header_params = opts[:header_params] || {}
321
+ # HTTP header 'Accept' (if needed)
322
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
323
+ # HTTP header 'Content-Type'
324
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
325
+
326
+ # form parameters
327
+ form_params = opts[:form_params] || {}
328
+
329
+ # http body (model)
330
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(template_payload)
331
+
332
+ # return_type
333
+ return_type = opts[:debug_return_type] || 'Template'
334
+
335
+ # auth_names
336
+ auth_names = opts[:debug_auth_names] || ['apikey']
337
+
338
+ new_options = opts.merge(
339
+ :operation => :"TemplatesApi.templates_post",
340
+ :header_params => header_params,
341
+ :query_params => query_params,
342
+ :form_params => form_params,
343
+ :body => post_body,
344
+ :auth_names => auth_names,
345
+ :return_type => return_type
346
+ )
347
+
348
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
349
+ if @api_client.config.debugging
350
+ @api_client.config.logger.debug "API called: TemplatesApi#templates_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
351
+ end
352
+ return data, status_code, headers
353
+ end
354
+ end
355
+ end
@@ -0,0 +1,584 @@
1
+ =begin
2
+ #Elastic Email REST API
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. To start using this API, you will need your Access Token (available <a href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. This is the documentation for REST API. If you’d like to read our legacy documentation regarding Web API v2 click <a href=\"https://api.elasticemail.com/public/help\">here</a>.
5
+
6
+ The version of the OpenAPI document: 4.0.0
7
+ Contact: support@elasticemail.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module ElasticEmail
16
+ class VerificationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete Email Verification Result
23
+ # Delete a result with given email if exists. Required Access Level: VerifyEmails
24
+ # @param email [String] Email address to verification
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def verifications_by_email_delete(email, opts = {})
28
+ verifications_by_email_delete_with_http_info(email, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete Email Verification Result
33
+ # Delete a result with given email if exists. Required Access Level: VerifyEmails
34
+ # @param email [String] Email address to verification
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def verifications_by_email_delete_with_http_info(email, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verifications_by_email_delete ...'
40
+ end
41
+ # verify the required parameter 'email' is set
42
+ if @api_client.config.client_side_validation && email.nil?
43
+ fail ArgumentError, "Missing the required parameter 'email' when calling VerificationsApi.verifications_by_email_delete"
44
+ end
45
+ # resource path
46
+ local_var_path = '/verifications/{email}'.sub('{' + 'email' + '}', CGI.escape(email.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type]
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['apikey']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"VerificationsApi.verifications_by_email_delete",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: VerificationsApi#verifications_by_email_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Get Email Verification Result
84
+ # Returns a result of verified email. Required Access Level: ViewEmailVerifications
85
+ # @param email [String] Email address to view verification result of
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [EmailValidationResult]
88
+ def verifications_by_email_get(email, opts = {})
89
+ data, _status_code, _headers = verifications_by_email_get_with_http_info(email, opts)
90
+ data
91
+ end
92
+
93
+ # Get Email Verification Result
94
+ # Returns a result of verified email. Required Access Level: ViewEmailVerifications
95
+ # @param email [String] Email address to view verification result of
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Array<(EmailValidationResult, Integer, Hash)>] EmailValidationResult data, response status code and response headers
98
+ def verifications_by_email_get_with_http_info(email, opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verifications_by_email_get ...'
101
+ end
102
+ # verify the required parameter 'email' is set
103
+ if @api_client.config.client_side_validation && email.nil?
104
+ fail ArgumentError, "Missing the required parameter 'email' when calling VerificationsApi.verifications_by_email_get"
105
+ end
106
+ # resource path
107
+ local_var_path = '/verifications/{email}'.sub('{' + 'email' + '}', CGI.escape(email.to_s))
108
+
109
+ # query parameters
110
+ query_params = opts[:query_params] || {}
111
+
112
+ # header parameters
113
+ header_params = opts[:header_params] || {}
114
+ # HTTP header 'Accept' (if needed)
115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
116
+
117
+ # form parameters
118
+ form_params = opts[:form_params] || {}
119
+
120
+ # http body (model)
121
+ post_body = opts[:debug_body]
122
+
123
+ # return_type
124
+ return_type = opts[:debug_return_type] || 'EmailValidationResult'
125
+
126
+ # auth_names
127
+ auth_names = opts[:debug_auth_names] || ['apikey']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"VerificationsApi.verifications_by_email_get",
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: VerificationsApi#verifications_by_email_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # Verify Email
147
+ # Verify single email address and returns result of verification. Required Access Level: VerifyEmails
148
+ # @param email [String] Email address to verify
149
+ # @param [Hash] opts the optional parameters
150
+ # @return [EmailValidationResult]
151
+ def verifications_by_email_post(email, opts = {})
152
+ data, _status_code, _headers = verifications_by_email_post_with_http_info(email, opts)
153
+ data
154
+ end
155
+
156
+ # Verify Email
157
+ # Verify single email address and returns result of verification. Required Access Level: VerifyEmails
158
+ # @param email [String] Email address to verify
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [Array<(EmailValidationResult, Integer, Hash)>] EmailValidationResult data, response status code and response headers
161
+ def verifications_by_email_post_with_http_info(email, opts = {})
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verifications_by_email_post ...'
164
+ end
165
+ # verify the required parameter 'email' is set
166
+ if @api_client.config.client_side_validation && email.nil?
167
+ fail ArgumentError, "Missing the required parameter 'email' when calling VerificationsApi.verifications_by_email_post"
168
+ end
169
+ # resource path
170
+ local_var_path = '/verifications/{email}'.sub('{' + 'email' + '}', CGI.escape(email.to_s))
171
+
172
+ # query parameters
173
+ query_params = opts[:query_params] || {}
174
+
175
+ # header parameters
176
+ header_params = opts[:header_params] || {}
177
+ # HTTP header 'Accept' (if needed)
178
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
+
180
+ # form parameters
181
+ form_params = opts[:form_params] || {}
182
+
183
+ # http body (model)
184
+ post_body = opts[:debug_body]
185
+
186
+ # return_type
187
+ return_type = opts[:debug_return_type] || 'EmailValidationResult'
188
+
189
+ # auth_names
190
+ auth_names = opts[:debug_auth_names] || ['apikey']
191
+
192
+ new_options = opts.merge(
193
+ :operation => :"VerificationsApi.verifications_by_email_post",
194
+ :header_params => header_params,
195
+ :query_params => query_params,
196
+ :form_params => form_params,
197
+ :body => post_body,
198
+ :auth_names => auth_names,
199
+ :return_type => return_type
200
+ )
201
+
202
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug "API called: VerificationsApi#verifications_by_email_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
205
+ end
206
+ return data, status_code, headers
207
+ end
208
+
209
+ # Delete File Verification Result
210
+ # Delete Verification Results if they exist. Required Access Level: VerifyEmails
211
+ # @param id [String] ID of the exported file
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [nil]
214
+ def verifications_files_by_id_delete(id, opts = {})
215
+ verifications_files_by_id_delete_with_http_info(id, opts)
216
+ nil
217
+ end
218
+
219
+ # Delete File Verification Result
220
+ # Delete Verification Results if they exist. Required Access Level: VerifyEmails
221
+ # @param id [String] ID of the exported file
222
+ # @param [Hash] opts the optional parameters
223
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
224
+ def verifications_files_by_id_delete_with_http_info(id, opts = {})
225
+ if @api_client.config.debugging
226
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verifications_files_by_id_delete ...'
227
+ end
228
+ # verify the required parameter 'id' is set
229
+ if @api_client.config.client_side_validation && id.nil?
230
+ fail ArgumentError, "Missing the required parameter 'id' when calling VerificationsApi.verifications_files_by_id_delete"
231
+ end
232
+ # resource path
233
+ local_var_path = '/verifications/files/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
234
+
235
+ # query parameters
236
+ query_params = opts[:query_params] || {}
237
+
238
+ # header parameters
239
+ header_params = opts[:header_params] || {}
240
+
241
+ # form parameters
242
+ form_params = opts[:form_params] || {}
243
+
244
+ # http body (model)
245
+ post_body = opts[:debug_body]
246
+
247
+ # return_type
248
+ return_type = opts[:debug_return_type]
249
+
250
+ # auth_names
251
+ auth_names = opts[:debug_auth_names] || ['apikey']
252
+
253
+ new_options = opts.merge(
254
+ :operation => :"VerificationsApi.verifications_files_by_id_delete",
255
+ :header_params => header_params,
256
+ :query_params => query_params,
257
+ :form_params => form_params,
258
+ :body => post_body,
259
+ :auth_names => auth_names,
260
+ :return_type => return_type
261
+ )
262
+
263
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
264
+ if @api_client.config.debugging
265
+ @api_client.config.logger.debug "API called: VerificationsApi#verifications_files_by_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
+ end
267
+ return data, status_code, headers
268
+ end
269
+
270
+ # Download File Verification Result
271
+ # Download verification results as a ZIP file. Required Access Level: VerifyEmails
272
+ # @param id [String] Verification ID to download
273
+ # @param [Hash] opts the optional parameters
274
+ # @return [File]
275
+ def verifications_files_by_id_result_download_get(id, opts = {})
276
+ data, _status_code, _headers = verifications_files_by_id_result_download_get_with_http_info(id, opts)
277
+ data
278
+ end
279
+
280
+ # Download File Verification Result
281
+ # Download verification results as a ZIP file. Required Access Level: VerifyEmails
282
+ # @param id [String] Verification ID to download
283
+ # @param [Hash] opts the optional parameters
284
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
285
+ def verifications_files_by_id_result_download_get_with_http_info(id, opts = {})
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verifications_files_by_id_result_download_get ...'
288
+ end
289
+ # verify the required parameter 'id' is set
290
+ if @api_client.config.client_side_validation && id.nil?
291
+ fail ArgumentError, "Missing the required parameter 'id' when calling VerificationsApi.verifications_files_by_id_result_download_get"
292
+ end
293
+ # resource path
294
+ local_var_path = '/verifications/files/{id}/result/download'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
295
+
296
+ # query parameters
297
+ query_params = opts[:query_params] || {}
298
+
299
+ # header parameters
300
+ header_params = opts[:header_params] || {}
301
+ # HTTP header 'Accept' (if needed)
302
+ header_params['Accept'] = @api_client.select_header_accept(['application/*'])
303
+
304
+ # form parameters
305
+ form_params = opts[:form_params] || {}
306
+
307
+ # http body (model)
308
+ post_body = opts[:debug_body]
309
+
310
+ # return_type
311
+ return_type = opts[:debug_return_type] || 'File'
312
+
313
+ # auth_names
314
+ auth_names = opts[:debug_auth_names] || ['apikey']
315
+
316
+ new_options = opts.merge(
317
+ :operation => :"VerificationsApi.verifications_files_by_id_result_download_get",
318
+ :header_params => header_params,
319
+ :query_params => query_params,
320
+ :form_params => form_params,
321
+ :body => post_body,
322
+ :auth_names => auth_names,
323
+ :return_type => return_type
324
+ )
325
+
326
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug "API called: VerificationsApi#verifications_files_by_id_result_download_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
329
+ end
330
+ return data, status_code, headers
331
+ end
332
+
333
+ # Get Detailed File Verification Result
334
+ # Returns status and results (if verified) of file with given ID. Required Access Level: ViewEmailVerifications
335
+ # @param id [String] ID of the Verification to display status of
336
+ # @param [Hash] opts the optional parameters
337
+ # @option opts [Integer] :limit Maximum number of returned email verification results
338
+ # @option opts [Integer] :offset How many result items should be returned ahead
339
+ # @return [VerificationFileResultDetails]
340
+ def verifications_files_by_id_result_get(id, opts = {})
341
+ data, _status_code, _headers = verifications_files_by_id_result_get_with_http_info(id, opts)
342
+ data
343
+ end
344
+
345
+ # Get Detailed File Verification Result
346
+ # Returns status and results (if verified) of file with given ID. Required Access Level: ViewEmailVerifications
347
+ # @param id [String] ID of the Verification to display status of
348
+ # @param [Hash] opts the optional parameters
349
+ # @option opts [Integer] :limit Maximum number of returned email verification results
350
+ # @option opts [Integer] :offset How many result items should be returned ahead
351
+ # @return [Array<(VerificationFileResultDetails, Integer, Hash)>] VerificationFileResultDetails data, response status code and response headers
352
+ def verifications_files_by_id_result_get_with_http_info(id, opts = {})
353
+ if @api_client.config.debugging
354
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verifications_files_by_id_result_get ...'
355
+ end
356
+ # verify the required parameter 'id' is set
357
+ if @api_client.config.client_side_validation && id.nil?
358
+ fail ArgumentError, "Missing the required parameter 'id' when calling VerificationsApi.verifications_files_by_id_result_get"
359
+ end
360
+ # resource path
361
+ local_var_path = '/verifications/files/{id}/result'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
362
+
363
+ # query parameters
364
+ query_params = opts[:query_params] || {}
365
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
366
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
367
+
368
+ # header parameters
369
+ header_params = opts[:header_params] || {}
370
+ # HTTP header 'Accept' (if needed)
371
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
372
+
373
+ # form parameters
374
+ form_params = opts[:form_params] || {}
375
+
376
+ # http body (model)
377
+ post_body = opts[:debug_body]
378
+
379
+ # return_type
380
+ return_type = opts[:debug_return_type] || 'VerificationFileResultDetails'
381
+
382
+ # auth_names
383
+ auth_names = opts[:debug_auth_names] || ['apikey']
384
+
385
+ new_options = opts.merge(
386
+ :operation => :"VerificationsApi.verifications_files_by_id_result_get",
387
+ :header_params => header_params,
388
+ :query_params => query_params,
389
+ :form_params => form_params,
390
+ :body => post_body,
391
+ :auth_names => auth_names,
392
+ :return_type => return_type
393
+ )
394
+
395
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
396
+ if @api_client.config.debugging
397
+ @api_client.config.logger.debug "API called: VerificationsApi#verifications_files_by_id_result_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
398
+ end
399
+ return data, status_code, headers
400
+ end
401
+
402
+ # Verify From File
403
+ # Uploads a CSV file with list of emails to verify. An 'email' column is required. Required Access Level: VerifyEmails
404
+ # @param [Hash] opts the optional parameters
405
+ # @option opts [File] :file
406
+ # @return [VerificationFileResult]
407
+ def verifications_files_post(opts = {})
408
+ data, _status_code, _headers = verifications_files_post_with_http_info(opts)
409
+ data
410
+ end
411
+
412
+ # Verify From File
413
+ # Uploads a CSV file with list of emails to verify. An &#39;email&#39; column is required. Required Access Level: VerifyEmails
414
+ # @param [Hash] opts the optional parameters
415
+ # @option opts [File] :file
416
+ # @return [Array<(VerificationFileResult, Integer, Hash)>] VerificationFileResult data, response status code and response headers
417
+ def verifications_files_post_with_http_info(opts = {})
418
+ if @api_client.config.debugging
419
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verifications_files_post ...'
420
+ end
421
+ # resource path
422
+ local_var_path = '/verifications/files'
423
+
424
+ # query parameters
425
+ query_params = opts[:query_params] || {}
426
+
427
+ # header parameters
428
+ header_params = opts[:header_params] || {}
429
+ # HTTP header 'Accept' (if needed)
430
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
431
+ # HTTP header 'Content-Type'
432
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
433
+
434
+ # form parameters
435
+ form_params = opts[:form_params] || {}
436
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
437
+
438
+ # http body (model)
439
+ post_body = opts[:debug_body]
440
+
441
+ # return_type
442
+ return_type = opts[:debug_return_type] || 'VerificationFileResult'
443
+
444
+ # auth_names
445
+ auth_names = opts[:debug_auth_names] || ['apikey']
446
+
447
+ new_options = opts.merge(
448
+ :operation => :"VerificationsApi.verifications_files_post",
449
+ :header_params => header_params,
450
+ :query_params => query_params,
451
+ :form_params => form_params,
452
+ :body => post_body,
453
+ :auth_names => auth_names,
454
+ :return_type => return_type
455
+ )
456
+
457
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
458
+ if @api_client.config.debugging
459
+ @api_client.config.logger.debug "API called: VerificationsApi#verifications_files_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
460
+ end
461
+ return data, status_code, headers
462
+ end
463
+
464
+ # Get Simple Files Verification Results
465
+ # Returns a list of uploaded files, their statuses and results. Required Access Level: ViewEmailVerifications
466
+ # @param [Hash] opts the optional parameters
467
+ # @return [Array<VerificationFileResult>]
468
+ def verifications_files_result_get(opts = {})
469
+ data, _status_code, _headers = verifications_files_result_get_with_http_info(opts)
470
+ data
471
+ end
472
+
473
+ # Get Simple Files Verification Results
474
+ # Returns a list of uploaded files, their statuses and results. Required Access Level: ViewEmailVerifications
475
+ # @param [Hash] opts the optional parameters
476
+ # @return [Array<(Array<VerificationFileResult>, Integer, Hash)>] Array<VerificationFileResult> data, response status code and response headers
477
+ def verifications_files_result_get_with_http_info(opts = {})
478
+ if @api_client.config.debugging
479
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verifications_files_result_get ...'
480
+ end
481
+ # resource path
482
+ local_var_path = '/verifications/files/result'
483
+
484
+ # query parameters
485
+ query_params = opts[:query_params] || {}
486
+
487
+ # header parameters
488
+ header_params = opts[:header_params] || {}
489
+ # HTTP header 'Accept' (if needed)
490
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
491
+
492
+ # form parameters
493
+ form_params = opts[:form_params] || {}
494
+
495
+ # http body (model)
496
+ post_body = opts[:debug_body]
497
+
498
+ # return_type
499
+ return_type = opts[:debug_return_type] || 'Array<VerificationFileResult>'
500
+
501
+ # auth_names
502
+ auth_names = opts[:debug_auth_names] || ['apikey']
503
+
504
+ new_options = opts.merge(
505
+ :operation => :"VerificationsApi.verifications_files_result_get",
506
+ :header_params => header_params,
507
+ :query_params => query_params,
508
+ :form_params => form_params,
509
+ :body => post_body,
510
+ :auth_names => auth_names,
511
+ :return_type => return_type
512
+ )
513
+
514
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
515
+ if @api_client.config.debugging
516
+ @api_client.config.logger.debug "API called: VerificationsApi#verifications_files_result_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
517
+ end
518
+ return data, status_code, headers
519
+ end
520
+
521
+ # Get Emails Verification Results
522
+ # Returns a results of all verified single emails. Required Access Level: ViewEmailVerifications
523
+ # @param [Hash] opts the optional parameters
524
+ # @option opts [Integer] :limit Maximum number of returned items.
525
+ # @option opts [Integer] :offset How many items should be returned ahead.
526
+ # @return [Array<EmailValidationResult>]
527
+ def verifications_get(opts = {})
528
+ data, _status_code, _headers = verifications_get_with_http_info(opts)
529
+ data
530
+ end
531
+
532
+ # Get Emails Verification Results
533
+ # Returns a results of all verified single emails. Required Access Level: ViewEmailVerifications
534
+ # @param [Hash] opts the optional parameters
535
+ # @option opts [Integer] :limit Maximum number of returned items.
536
+ # @option opts [Integer] :offset How many items should be returned ahead.
537
+ # @return [Array<(Array<EmailValidationResult>, Integer, Hash)>] Array<EmailValidationResult> data, response status code and response headers
538
+ def verifications_get_with_http_info(opts = {})
539
+ if @api_client.config.debugging
540
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verifications_get ...'
541
+ end
542
+ # resource path
543
+ local_var_path = '/verifications'
544
+
545
+ # query parameters
546
+ query_params = opts[:query_params] || {}
547
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
548
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
549
+
550
+ # header parameters
551
+ header_params = opts[:header_params] || {}
552
+ # HTTP header 'Accept' (if needed)
553
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
554
+
555
+ # form parameters
556
+ form_params = opts[:form_params] || {}
557
+
558
+ # http body (model)
559
+ post_body = opts[:debug_body]
560
+
561
+ # return_type
562
+ return_type = opts[:debug_return_type] || 'Array<EmailValidationResult>'
563
+
564
+ # auth_names
565
+ auth_names = opts[:debug_auth_names] || ['apikey']
566
+
567
+ new_options = opts.merge(
568
+ :operation => :"VerificationsApi.verifications_get",
569
+ :header_params => header_params,
570
+ :query_params => query_params,
571
+ :form_params => form_params,
572
+ :body => post_body,
573
+ :auth_names => auth_names,
574
+ :return_type => return_type
575
+ )
576
+
577
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
578
+ if @api_client.config.debugging
579
+ @api_client.config.logger.debug "API called: VerificationsApi#verifications_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
580
+ end
581
+ return data, status_code, headers
582
+ end
583
+ end
584
+ end