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,414 @@
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 SubAccountsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add, Subtract Email Credits
23
+ # Update email credits of a subaccount by the given amount. Required Access Level: ModifySubAccounts
24
+ # @param email [String] Email address of Sub-Account
25
+ # @param subaccount_email_credits_payload [SubaccountEmailCreditsPayload] Amount of email credits to add or subtract from the current SubAccount email credits pool (positive or negative value)
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def subaccounts_by_email_credits_patch(email, subaccount_email_credits_payload, opts = {})
29
+ subaccounts_by_email_credits_patch_with_http_info(email, subaccount_email_credits_payload, opts)
30
+ nil
31
+ end
32
+
33
+ # Add, Subtract Email Credits
34
+ # Update email credits of a subaccount by the given amount. Required Access Level: ModifySubAccounts
35
+ # @param email [String] Email address of Sub-Account
36
+ # @param subaccount_email_credits_payload [SubaccountEmailCreditsPayload] Amount of email credits to add or subtract from the current SubAccount email credits pool (positive or negative value)
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def subaccounts_by_email_credits_patch_with_http_info(email, subaccount_email_credits_payload, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: SubAccountsApi.subaccounts_by_email_credits_patch ...'
42
+ end
43
+ # verify the required parameter 'email' is set
44
+ if @api_client.config.client_side_validation && email.nil?
45
+ fail ArgumentError, "Missing the required parameter 'email' when calling SubAccountsApi.subaccounts_by_email_credits_patch"
46
+ end
47
+ # verify the required parameter 'subaccount_email_credits_payload' is set
48
+ if @api_client.config.client_side_validation && subaccount_email_credits_payload.nil?
49
+ fail ArgumentError, "Missing the required parameter 'subaccount_email_credits_payload' when calling SubAccountsApi.subaccounts_by_email_credits_patch"
50
+ end
51
+ # resource path
52
+ local_var_path = '/subaccounts/{email}/credits'.sub('{' + 'email' + '}', CGI.escape(email.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Content-Type'
60
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(subaccount_email_credits_payload)
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type]
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['apikey']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"SubAccountsApi.subaccounts_by_email_credits_patch",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: SubAccountsApi#subaccounts_by_email_credits_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ # Delete SubAccount
92
+ # Deletes specified SubAccount. An email will be sent to confirm this change. Required Access Level: ModifySubAccounts
93
+ # @param email [String] Email address of Sub-Account
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [nil]
96
+ def subaccounts_by_email_delete(email, opts = {})
97
+ subaccounts_by_email_delete_with_http_info(email, opts)
98
+ nil
99
+ end
100
+
101
+ # Delete SubAccount
102
+ # Deletes specified SubAccount. An email will be sent to confirm this change. Required Access Level: ModifySubAccounts
103
+ # @param email [String] Email address of Sub-Account
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
106
+ def subaccounts_by_email_delete_with_http_info(email, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug 'Calling API: SubAccountsApi.subaccounts_by_email_delete ...'
109
+ end
110
+ # verify the required parameter 'email' is set
111
+ if @api_client.config.client_side_validation && email.nil?
112
+ fail ArgumentError, "Missing the required parameter 'email' when calling SubAccountsApi.subaccounts_by_email_delete"
113
+ end
114
+ # resource path
115
+ local_var_path = '/subaccounts/{email}'.sub('{' + 'email' + '}', CGI.escape(email.to_s))
116
+
117
+ # query parameters
118
+ query_params = opts[:query_params] || {}
119
+
120
+ # header parameters
121
+ header_params = opts[:header_params] || {}
122
+
123
+ # form parameters
124
+ form_params = opts[:form_params] || {}
125
+
126
+ # http body (model)
127
+ post_body = opts[:debug_body]
128
+
129
+ # return_type
130
+ return_type = opts[:debug_return_type]
131
+
132
+ # auth_names
133
+ auth_names = opts[:debug_auth_names] || ['apikey']
134
+
135
+ new_options = opts.merge(
136
+ :operation => :"SubAccountsApi.subaccounts_by_email_delete",
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => return_type
143
+ )
144
+
145
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug "API called: SubAccountsApi#subaccounts_by_email_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+
152
+ # Load SubAccount
153
+ # Returns details for the specified SubAccount. Required Access Level: ViewSubAccounts
154
+ # @param email [String] Email address of Sub-Account
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [SubAccountInfo]
157
+ def subaccounts_by_email_get(email, opts = {})
158
+ data, _status_code, _headers = subaccounts_by_email_get_with_http_info(email, opts)
159
+ data
160
+ end
161
+
162
+ # Load SubAccount
163
+ # Returns details for the specified SubAccount. Required Access Level: ViewSubAccounts
164
+ # @param email [String] Email address of Sub-Account
165
+ # @param [Hash] opts the optional parameters
166
+ # @return [Array<(SubAccountInfo, Integer, Hash)>] SubAccountInfo data, response status code and response headers
167
+ def subaccounts_by_email_get_with_http_info(email, opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug 'Calling API: SubAccountsApi.subaccounts_by_email_get ...'
170
+ end
171
+ # verify the required parameter 'email' is set
172
+ if @api_client.config.client_side_validation && email.nil?
173
+ fail ArgumentError, "Missing the required parameter 'email' when calling SubAccountsApi.subaccounts_by_email_get"
174
+ end
175
+ # resource path
176
+ local_var_path = '/subaccounts/{email}'.sub('{' + 'email' + '}', CGI.escape(email.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
+
186
+ # form parameters
187
+ form_params = opts[:form_params] || {}
188
+
189
+ # http body (model)
190
+ post_body = opts[:debug_body]
191
+
192
+ # return_type
193
+ return_type = opts[:debug_return_type] || 'SubAccountInfo'
194
+
195
+ # auth_names
196
+ auth_names = opts[:debug_auth_names] || ['apikey']
197
+
198
+ new_options = opts.merge(
199
+ :operation => :"SubAccountsApi.subaccounts_by_email_get",
200
+ :header_params => header_params,
201
+ :query_params => query_params,
202
+ :form_params => form_params,
203
+ :body => post_body,
204
+ :auth_names => auth_names,
205
+ :return_type => return_type
206
+ )
207
+
208
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
209
+ if @api_client.config.debugging
210
+ @api_client.config.logger.debug "API called: SubAccountsApi#subaccounts_by_email_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
211
+ end
212
+ return data, status_code, headers
213
+ end
214
+
215
+ # Update SubAccount Email Settings
216
+ # Update SubAccount email settings. Required Access Level: ModifySubAccounts
217
+ # @param email [String]
218
+ # @param subaccount_email_settings [SubaccountEmailSettings] Updated Email Settings
219
+ # @param [Hash] opts the optional parameters
220
+ # @return [SubaccountEmailSettings]
221
+ def subaccounts_by_email_settings_email_put(email, subaccount_email_settings, opts = {})
222
+ data, _status_code, _headers = subaccounts_by_email_settings_email_put_with_http_info(email, subaccount_email_settings, opts)
223
+ data
224
+ end
225
+
226
+ # Update SubAccount Email Settings
227
+ # Update SubAccount email settings. Required Access Level: ModifySubAccounts
228
+ # @param email [String]
229
+ # @param subaccount_email_settings [SubaccountEmailSettings] Updated Email Settings
230
+ # @param [Hash] opts the optional parameters
231
+ # @return [Array<(SubaccountEmailSettings, Integer, Hash)>] SubaccountEmailSettings data, response status code and response headers
232
+ def subaccounts_by_email_settings_email_put_with_http_info(email, subaccount_email_settings, opts = {})
233
+ if @api_client.config.debugging
234
+ @api_client.config.logger.debug 'Calling API: SubAccountsApi.subaccounts_by_email_settings_email_put ...'
235
+ end
236
+ # verify the required parameter 'email' is set
237
+ if @api_client.config.client_side_validation && email.nil?
238
+ fail ArgumentError, "Missing the required parameter 'email' when calling SubAccountsApi.subaccounts_by_email_settings_email_put"
239
+ end
240
+ # verify the required parameter 'subaccount_email_settings' is set
241
+ if @api_client.config.client_side_validation && subaccount_email_settings.nil?
242
+ fail ArgumentError, "Missing the required parameter 'subaccount_email_settings' when calling SubAccountsApi.subaccounts_by_email_settings_email_put"
243
+ end
244
+ # resource path
245
+ local_var_path = '/subaccounts/{email}/settings/email'.sub('{' + 'email' + '}', CGI.escape(email.to_s))
246
+
247
+ # query parameters
248
+ query_params = opts[:query_params] || {}
249
+
250
+ # header parameters
251
+ header_params = opts[:header_params] || {}
252
+ # HTTP header 'Accept' (if needed)
253
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
254
+ # HTTP header 'Content-Type'
255
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(subaccount_email_settings)
262
+
263
+ # return_type
264
+ return_type = opts[:debug_return_type] || 'SubaccountEmailSettings'
265
+
266
+ # auth_names
267
+ auth_names = opts[:debug_auth_names] || ['apikey']
268
+
269
+ new_options = opts.merge(
270
+ :operation => :"SubAccountsApi.subaccounts_by_email_settings_email_put",
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => return_type
277
+ )
278
+
279
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: SubAccountsApi#subaccounts_by_email_settings_email_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
285
+
286
+ # Load SubAccounts
287
+ # Returns a list of all your SubAccounts. Required Access Level: ViewSubAccounts
288
+ # @param [Hash] opts the optional parameters
289
+ # @option opts [Integer] :limit Maximum number of returned items.
290
+ # @option opts [Integer] :offset How many items should be returned ahead.
291
+ # @return [Array<SubAccountInfo>]
292
+ def subaccounts_get(opts = {})
293
+ data, _status_code, _headers = subaccounts_get_with_http_info(opts)
294
+ data
295
+ end
296
+
297
+ # Load SubAccounts
298
+ # Returns a list of all your SubAccounts. Required Access Level: ViewSubAccounts
299
+ # @param [Hash] opts the optional parameters
300
+ # @option opts [Integer] :limit Maximum number of returned items.
301
+ # @option opts [Integer] :offset How many items should be returned ahead.
302
+ # @return [Array<(Array<SubAccountInfo>, Integer, Hash)>] Array<SubAccountInfo> data, response status code and response headers
303
+ def subaccounts_get_with_http_info(opts = {})
304
+ if @api_client.config.debugging
305
+ @api_client.config.logger.debug 'Calling API: SubAccountsApi.subaccounts_get ...'
306
+ end
307
+ # resource path
308
+ local_var_path = '/subaccounts'
309
+
310
+ # query parameters
311
+ query_params = opts[:query_params] || {}
312
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
313
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
314
+
315
+ # header parameters
316
+ header_params = opts[:header_params] || {}
317
+ # HTTP header 'Accept' (if needed)
318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
319
+
320
+ # form parameters
321
+ form_params = opts[:form_params] || {}
322
+
323
+ # http body (model)
324
+ post_body = opts[:debug_body]
325
+
326
+ # return_type
327
+ return_type = opts[:debug_return_type] || 'Array<SubAccountInfo>'
328
+
329
+ # auth_names
330
+ auth_names = opts[:debug_auth_names] || ['apikey']
331
+
332
+ new_options = opts.merge(
333
+ :operation => :"SubAccountsApi.subaccounts_get",
334
+ :header_params => header_params,
335
+ :query_params => query_params,
336
+ :form_params => form_params,
337
+ :body => post_body,
338
+ :auth_names => auth_names,
339
+ :return_type => return_type
340
+ )
341
+
342
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
343
+ if @api_client.config.debugging
344
+ @api_client.config.logger.debug "API called: SubAccountsApi#subaccounts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
345
+ end
346
+ return data, status_code, headers
347
+ end
348
+
349
+ # Add SubAccount
350
+ # Add a new SubAccount to your Account. To receive an access token for this SubAccount, make a POST security/apikeys request using the 'subaccount' parameter. Required Access Level: ModifySubAccounts
351
+ # @param subaccount_payload [SubaccountPayload]
352
+ # @param [Hash] opts the optional parameters
353
+ # @return [SubAccountInfo]
354
+ def subaccounts_post(subaccount_payload, opts = {})
355
+ data, _status_code, _headers = subaccounts_post_with_http_info(subaccount_payload, opts)
356
+ data
357
+ end
358
+
359
+ # Add SubAccount
360
+ # Add a new SubAccount to your Account. To receive an access token for this SubAccount, make a POST security/apikeys request using the &#39;subaccount&#39; parameter. Required Access Level: ModifySubAccounts
361
+ # @param subaccount_payload [SubaccountPayload]
362
+ # @param [Hash] opts the optional parameters
363
+ # @return [Array<(SubAccountInfo, Integer, Hash)>] SubAccountInfo data, response status code and response headers
364
+ def subaccounts_post_with_http_info(subaccount_payload, opts = {})
365
+ if @api_client.config.debugging
366
+ @api_client.config.logger.debug 'Calling API: SubAccountsApi.subaccounts_post ...'
367
+ end
368
+ # verify the required parameter 'subaccount_payload' is set
369
+ if @api_client.config.client_side_validation && subaccount_payload.nil?
370
+ fail ArgumentError, "Missing the required parameter 'subaccount_payload' when calling SubAccountsApi.subaccounts_post"
371
+ end
372
+ # resource path
373
+ local_var_path = '/subaccounts'
374
+
375
+ # query parameters
376
+ query_params = opts[:query_params] || {}
377
+
378
+ # header parameters
379
+ header_params = opts[:header_params] || {}
380
+ # HTTP header 'Accept' (if needed)
381
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
382
+ # HTTP header 'Content-Type'
383
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
384
+
385
+ # form parameters
386
+ form_params = opts[:form_params] || {}
387
+
388
+ # http body (model)
389
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(subaccount_payload)
390
+
391
+ # return_type
392
+ return_type = opts[:debug_return_type] || 'SubAccountInfo'
393
+
394
+ # auth_names
395
+ auth_names = opts[:debug_auth_names] || ['apikey']
396
+
397
+ new_options = opts.merge(
398
+ :operation => :"SubAccountsApi.subaccounts_post",
399
+ :header_params => header_params,
400
+ :query_params => query_params,
401
+ :form_params => form_params,
402
+ :body => post_body,
403
+ :auth_names => auth_names,
404
+ :return_type => return_type
405
+ )
406
+
407
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
408
+ if @api_client.config.debugging
409
+ @api_client.config.logger.debug "API called: SubAccountsApi#subaccounts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
410
+ end
411
+ return data, status_code, headers
412
+ end
413
+ end
414
+ end
@@ -0,0 +1,782 @@
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 SuppressionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get Bounce List
23
+ # Retrieve your list of bounced emails. Required Access Level: ViewContacts
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :search Text fragment used for searching.
26
+ # @option opts [Integer] :limit Maximum number of returned items.
27
+ # @option opts [Integer] :offset How many items should be returned ahead.
28
+ # @return [Array<Suppression>]
29
+ def suppressions_bounces_get(opts = {})
30
+ data, _status_code, _headers = suppressions_bounces_get_with_http_info(opts)
31
+ data
32
+ end
33
+
34
+ # Get Bounce List
35
+ # Retrieve your list of bounced emails. Required Access Level: ViewContacts
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :search Text fragment used for searching.
38
+ # @option opts [Integer] :limit Maximum number of returned items.
39
+ # @option opts [Integer] :offset How many items should be returned ahead.
40
+ # @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
41
+ def suppressions_bounces_get_with_http_info(opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_bounces_get ...'
44
+ end
45
+ # resource path
46
+ local_var_path = '/suppressions/bounces'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
51
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
52
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body]
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type] || 'Array<Suppression>'
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['apikey']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"SuppressionsApi.suppressions_bounces_get",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_bounces_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Add Bounces Async
89
+ # Add Bounced. Required Access Level: ModifyContacts
90
+ # @param [Hash] opts the optional parameters
91
+ # @option opts [File] :file
92
+ # @return [nil]
93
+ def suppressions_bounces_import_post(opts = {})
94
+ suppressions_bounces_import_post_with_http_info(opts)
95
+ nil
96
+ end
97
+
98
+ # Add Bounces Async
99
+ # Add Bounced. Required Access Level: ModifyContacts
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [File] :file
102
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
103
+ def suppressions_bounces_import_post_with_http_info(opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_bounces_import_post ...'
106
+ end
107
+ # resource path
108
+ local_var_path = '/suppressions/bounces/import'
109
+
110
+ # query parameters
111
+ query_params = opts[:query_params] || {}
112
+
113
+ # header parameters
114
+ header_params = opts[:header_params] || {}
115
+ # HTTP header 'Content-Type'
116
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
121
+
122
+ # http body (model)
123
+ post_body = opts[:debug_body]
124
+
125
+ # return_type
126
+ return_type = opts[:debug_return_type]
127
+
128
+ # auth_names
129
+ auth_names = opts[:debug_auth_names] || ['apikey']
130
+
131
+ new_options = opts.merge(
132
+ :operation => :"SuppressionsApi.suppressions_bounces_import_post",
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_bounces_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Add Bounces
149
+ # Add Bounced. Required Access Level: ModifyContacts
150
+ # @param request_body [Array<String>] Emails to add as bounces. Limited to 1000 per request
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [Array<Suppression>]
153
+ def suppressions_bounces_post(request_body, opts = {})
154
+ data, _status_code, _headers = suppressions_bounces_post_with_http_info(request_body, opts)
155
+ data
156
+ end
157
+
158
+ # Add Bounces
159
+ # Add Bounced. Required Access Level: ModifyContacts
160
+ # @param request_body [Array<String>] Emails to add as bounces. Limited to 1000 per request
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
163
+ def suppressions_bounces_post_with_http_info(request_body, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_bounces_post ...'
166
+ end
167
+ # verify the required parameter 'request_body' is set
168
+ if @api_client.config.client_side_validation && request_body.nil?
169
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling SuppressionsApi.suppressions_bounces_post"
170
+ end
171
+ # resource path
172
+ local_var_path = '/suppressions/bounces'
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+
177
+ # header parameters
178
+ header_params = opts[:header_params] || {}
179
+ # HTTP header 'Accept' (if needed)
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
+ # HTTP header 'Content-Type'
182
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
183
+
184
+ # form parameters
185
+ form_params = opts[:form_params] || {}
186
+
187
+ # http body (model)
188
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
189
+
190
+ # return_type
191
+ return_type = opts[:debug_return_type] || 'Array<Suppression>'
192
+
193
+ # auth_names
194
+ auth_names = opts[:debug_auth_names] || ['apikey']
195
+
196
+ new_options = opts.merge(
197
+ :operation => :"SuppressionsApi.suppressions_bounces_post",
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names,
203
+ :return_type => return_type
204
+ )
205
+
206
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_bounces_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+
213
+ # Delete Suppression
214
+ # Delete Suppression. Required Access Level: ViewContacts
215
+ # @param email [String] Proper email address.
216
+ # @param [Hash] opts the optional parameters
217
+ # @return [nil]
218
+ def suppressions_by_email_delete(email, opts = {})
219
+ suppressions_by_email_delete_with_http_info(email, opts)
220
+ nil
221
+ end
222
+
223
+ # Delete Suppression
224
+ # Delete Suppression. Required Access Level: ViewContacts
225
+ # @param email [String] Proper email address.
226
+ # @param [Hash] opts the optional parameters
227
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
228
+ def suppressions_by_email_delete_with_http_info(email, opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_by_email_delete ...'
231
+ end
232
+ # verify the required parameter 'email' is set
233
+ if @api_client.config.client_side_validation && email.nil?
234
+ fail ArgumentError, "Missing the required parameter 'email' when calling SuppressionsApi.suppressions_by_email_delete"
235
+ end
236
+ # resource path
237
+ local_var_path = '/suppressions/{email}'.sub('{' + 'email' + '}', CGI.escape(email.to_s))
238
+
239
+ # query parameters
240
+ query_params = opts[:query_params] || {}
241
+
242
+ # header parameters
243
+ header_params = opts[:header_params] || {}
244
+
245
+ # form parameters
246
+ form_params = opts[:form_params] || {}
247
+
248
+ # http body (model)
249
+ post_body = opts[:debug_body]
250
+
251
+ # return_type
252
+ return_type = opts[:debug_return_type]
253
+
254
+ # auth_names
255
+ auth_names = opts[:debug_auth_names] || ['apikey']
256
+
257
+ new_options = opts.merge(
258
+ :operation => :"SuppressionsApi.suppressions_by_email_delete",
259
+ :header_params => header_params,
260
+ :query_params => query_params,
261
+ :form_params => form_params,
262
+ :body => post_body,
263
+ :auth_names => auth_names,
264
+ :return_type => return_type
265
+ )
266
+
267
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
268
+ if @api_client.config.debugging
269
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_by_email_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
+ end
271
+ return data, status_code, headers
272
+ end
273
+
274
+ # Get Suppression
275
+ # Retrieve your suppression. Required Access Level: ViewContacts
276
+ # @param email [String] Proper email address.
277
+ # @param [Hash] opts the optional parameters
278
+ # @return [Suppression]
279
+ def suppressions_by_email_get(email, opts = {})
280
+ data, _status_code, _headers = suppressions_by_email_get_with_http_info(email, opts)
281
+ data
282
+ end
283
+
284
+ # Get Suppression
285
+ # Retrieve your suppression. Required Access Level: ViewContacts
286
+ # @param email [String] Proper email address.
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [Array<(Suppression, Integer, Hash)>] Suppression data, response status code and response headers
289
+ def suppressions_by_email_get_with_http_info(email, opts = {})
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_by_email_get ...'
292
+ end
293
+ # verify the required parameter 'email' is set
294
+ if @api_client.config.client_side_validation && email.nil?
295
+ fail ArgumentError, "Missing the required parameter 'email' when calling SuppressionsApi.suppressions_by_email_get"
296
+ end
297
+ # resource path
298
+ local_var_path = '/suppressions/{email}'.sub('{' + 'email' + '}', CGI.escape(email.to_s))
299
+
300
+ # query parameters
301
+ query_params = opts[:query_params] || {}
302
+
303
+ # header parameters
304
+ header_params = opts[:header_params] || {}
305
+ # HTTP header 'Accept' (if needed)
306
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
307
+
308
+ # form parameters
309
+ form_params = opts[:form_params] || {}
310
+
311
+ # http body (model)
312
+ post_body = opts[:debug_body]
313
+
314
+ # return_type
315
+ return_type = opts[:debug_return_type] || 'Suppression'
316
+
317
+ # auth_names
318
+ auth_names = opts[:debug_auth_names] || ['apikey']
319
+
320
+ new_options = opts.merge(
321
+ :operation => :"SuppressionsApi.suppressions_by_email_get",
322
+ :header_params => header_params,
323
+ :query_params => query_params,
324
+ :form_params => form_params,
325
+ :body => post_body,
326
+ :auth_names => auth_names,
327
+ :return_type => return_type
328
+ )
329
+
330
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
331
+ if @api_client.config.debugging
332
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_by_email_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
333
+ end
334
+ return data, status_code, headers
335
+ end
336
+
337
+ # Get Complaints List
338
+ # Retrieve your list of complaints. Required Access Level: ViewContacts
339
+ # @param [Hash] opts the optional parameters
340
+ # @option opts [String] :search Text fragment used for searching.
341
+ # @option opts [Integer] :limit Maximum number of returned items.
342
+ # @option opts [Integer] :offset How many items should be returned ahead.
343
+ # @return [Array<Suppression>]
344
+ def suppressions_complaints_get(opts = {})
345
+ data, _status_code, _headers = suppressions_complaints_get_with_http_info(opts)
346
+ data
347
+ end
348
+
349
+ # Get Complaints List
350
+ # Retrieve your list of complaints. Required Access Level: ViewContacts
351
+ # @param [Hash] opts the optional parameters
352
+ # @option opts [String] :search Text fragment used for searching.
353
+ # @option opts [Integer] :limit Maximum number of returned items.
354
+ # @option opts [Integer] :offset How many items should be returned ahead.
355
+ # @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
356
+ def suppressions_complaints_get_with_http_info(opts = {})
357
+ if @api_client.config.debugging
358
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_complaints_get ...'
359
+ end
360
+ # resource path
361
+ local_var_path = '/suppressions/complaints'
362
+
363
+ # query parameters
364
+ query_params = opts[:query_params] || {}
365
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
366
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
367
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
368
+
369
+ # header parameters
370
+ header_params = opts[:header_params] || {}
371
+ # HTTP header 'Accept' (if needed)
372
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
373
+
374
+ # form parameters
375
+ form_params = opts[:form_params] || {}
376
+
377
+ # http body (model)
378
+ post_body = opts[:debug_body]
379
+
380
+ # return_type
381
+ return_type = opts[:debug_return_type] || 'Array<Suppression>'
382
+
383
+ # auth_names
384
+ auth_names = opts[:debug_auth_names] || ['apikey']
385
+
386
+ new_options = opts.merge(
387
+ :operation => :"SuppressionsApi.suppressions_complaints_get",
388
+ :header_params => header_params,
389
+ :query_params => query_params,
390
+ :form_params => form_params,
391
+ :body => post_body,
392
+ :auth_names => auth_names,
393
+ :return_type => return_type
394
+ )
395
+
396
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
397
+ if @api_client.config.debugging
398
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_complaints_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
399
+ end
400
+ return data, status_code, headers
401
+ end
402
+
403
+ # Add Complaints Async
404
+ # Add Complaints. Required Access Level: ModifyContacts
405
+ # @param [Hash] opts the optional parameters
406
+ # @option opts [File] :file
407
+ # @return [nil]
408
+ def suppressions_complaints_import_post(opts = {})
409
+ suppressions_complaints_import_post_with_http_info(opts)
410
+ nil
411
+ end
412
+
413
+ # Add Complaints Async
414
+ # Add Complaints. Required Access Level: ModifyContacts
415
+ # @param [Hash] opts the optional parameters
416
+ # @option opts [File] :file
417
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
418
+ def suppressions_complaints_import_post_with_http_info(opts = {})
419
+ if @api_client.config.debugging
420
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_complaints_import_post ...'
421
+ end
422
+ # resource path
423
+ local_var_path = '/suppressions/complaints/import'
424
+
425
+ # query parameters
426
+ query_params = opts[:query_params] || {}
427
+
428
+ # header parameters
429
+ header_params = opts[:header_params] || {}
430
+ # HTTP header 'Content-Type'
431
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
432
+
433
+ # form parameters
434
+ form_params = opts[:form_params] || {}
435
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
436
+
437
+ # http body (model)
438
+ post_body = opts[:debug_body]
439
+
440
+ # return_type
441
+ return_type = opts[:debug_return_type]
442
+
443
+ # auth_names
444
+ auth_names = opts[:debug_auth_names] || ['apikey']
445
+
446
+ new_options = opts.merge(
447
+ :operation => :"SuppressionsApi.suppressions_complaints_import_post",
448
+ :header_params => header_params,
449
+ :query_params => query_params,
450
+ :form_params => form_params,
451
+ :body => post_body,
452
+ :auth_names => auth_names,
453
+ :return_type => return_type
454
+ )
455
+
456
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
457
+ if @api_client.config.debugging
458
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_complaints_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
459
+ end
460
+ return data, status_code, headers
461
+ end
462
+
463
+ # Add Complaints
464
+ # Add Complaints. Required Access Level: ModifyContacts
465
+ # @param request_body [Array<String>] Emails to add as complaints. Limited to 1000 per request
466
+ # @param [Hash] opts the optional parameters
467
+ # @return [Array<Suppression>]
468
+ def suppressions_complaints_post(request_body, opts = {})
469
+ data, _status_code, _headers = suppressions_complaints_post_with_http_info(request_body, opts)
470
+ data
471
+ end
472
+
473
+ # Add Complaints
474
+ # Add Complaints. Required Access Level: ModifyContacts
475
+ # @param request_body [Array<String>] Emails to add as complaints. Limited to 1000 per request
476
+ # @param [Hash] opts the optional parameters
477
+ # @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
478
+ def suppressions_complaints_post_with_http_info(request_body, opts = {})
479
+ if @api_client.config.debugging
480
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_complaints_post ...'
481
+ end
482
+ # verify the required parameter 'request_body' is set
483
+ if @api_client.config.client_side_validation && request_body.nil?
484
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling SuppressionsApi.suppressions_complaints_post"
485
+ end
486
+ # resource path
487
+ local_var_path = '/suppressions/complaints'
488
+
489
+ # query parameters
490
+ query_params = opts[:query_params] || {}
491
+
492
+ # header parameters
493
+ header_params = opts[:header_params] || {}
494
+ # HTTP header 'Accept' (if needed)
495
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
496
+ # HTTP header 'Content-Type'
497
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
498
+
499
+ # form parameters
500
+ form_params = opts[:form_params] || {}
501
+
502
+ # http body (model)
503
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
504
+
505
+ # return_type
506
+ return_type = opts[:debug_return_type] || 'Array<Suppression>'
507
+
508
+ # auth_names
509
+ auth_names = opts[:debug_auth_names] || ['apikey']
510
+
511
+ new_options = opts.merge(
512
+ :operation => :"SuppressionsApi.suppressions_complaints_post",
513
+ :header_params => header_params,
514
+ :query_params => query_params,
515
+ :form_params => form_params,
516
+ :body => post_body,
517
+ :auth_names => auth_names,
518
+ :return_type => return_type
519
+ )
520
+
521
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
522
+ if @api_client.config.debugging
523
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_complaints_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
524
+ end
525
+ return data, status_code, headers
526
+ end
527
+
528
+ # Get Suppressions
529
+ # Retrieve your suppressions. Required Access Level: ViewContacts
530
+ # @param [Hash] opts the optional parameters
531
+ # @option opts [Integer] :limit Maximum number of returned items.
532
+ # @option opts [Integer] :offset How many items should be returned ahead.
533
+ # @return [Array<Suppression>]
534
+ def suppressions_get(opts = {})
535
+ data, _status_code, _headers = suppressions_get_with_http_info(opts)
536
+ data
537
+ end
538
+
539
+ # Get Suppressions
540
+ # Retrieve your suppressions. Required Access Level: ViewContacts
541
+ # @param [Hash] opts the optional parameters
542
+ # @option opts [Integer] :limit Maximum number of returned items.
543
+ # @option opts [Integer] :offset How many items should be returned ahead.
544
+ # @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
545
+ def suppressions_get_with_http_info(opts = {})
546
+ if @api_client.config.debugging
547
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_get ...'
548
+ end
549
+ # resource path
550
+ local_var_path = '/suppressions'
551
+
552
+ # query parameters
553
+ query_params = opts[:query_params] || {}
554
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
555
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
556
+
557
+ # header parameters
558
+ header_params = opts[:header_params] || {}
559
+ # HTTP header 'Accept' (if needed)
560
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
561
+
562
+ # form parameters
563
+ form_params = opts[:form_params] || {}
564
+
565
+ # http body (model)
566
+ post_body = opts[:debug_body]
567
+
568
+ # return_type
569
+ return_type = opts[:debug_return_type] || 'Array<Suppression>'
570
+
571
+ # auth_names
572
+ auth_names = opts[:debug_auth_names] || ['apikey']
573
+
574
+ new_options = opts.merge(
575
+ :operation => :"SuppressionsApi.suppressions_get",
576
+ :header_params => header_params,
577
+ :query_params => query_params,
578
+ :form_params => form_params,
579
+ :body => post_body,
580
+ :auth_names => auth_names,
581
+ :return_type => return_type
582
+ )
583
+
584
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
585
+ if @api_client.config.debugging
586
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
587
+ end
588
+ return data, status_code, headers
589
+ end
590
+
591
+ # Get Unsubscribes List
592
+ # Retrieve your list of unsubscribes. Required Access Level: ViewContacts
593
+ # @param [Hash] opts the optional parameters
594
+ # @option opts [String] :search Text fragment used for searching.
595
+ # @option opts [Integer] :limit Maximum number of returned items.
596
+ # @option opts [Integer] :offset How many items should be returned ahead.
597
+ # @return [Array<Suppression>]
598
+ def suppressions_unsubscribes_get(opts = {})
599
+ data, _status_code, _headers = suppressions_unsubscribes_get_with_http_info(opts)
600
+ data
601
+ end
602
+
603
+ # Get Unsubscribes List
604
+ # Retrieve your list of unsubscribes. Required Access Level: ViewContacts
605
+ # @param [Hash] opts the optional parameters
606
+ # @option opts [String] :search Text fragment used for searching.
607
+ # @option opts [Integer] :limit Maximum number of returned items.
608
+ # @option opts [Integer] :offset How many items should be returned ahead.
609
+ # @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
610
+ def suppressions_unsubscribes_get_with_http_info(opts = {})
611
+ if @api_client.config.debugging
612
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_unsubscribes_get ...'
613
+ end
614
+ # resource path
615
+ local_var_path = '/suppressions/unsubscribes'
616
+
617
+ # query parameters
618
+ query_params = opts[:query_params] || {}
619
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
620
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
621
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
622
+
623
+ # header parameters
624
+ header_params = opts[:header_params] || {}
625
+ # HTTP header 'Accept' (if needed)
626
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
627
+
628
+ # form parameters
629
+ form_params = opts[:form_params] || {}
630
+
631
+ # http body (model)
632
+ post_body = opts[:debug_body]
633
+
634
+ # return_type
635
+ return_type = opts[:debug_return_type] || 'Array<Suppression>'
636
+
637
+ # auth_names
638
+ auth_names = opts[:debug_auth_names] || ['apikey']
639
+
640
+ new_options = opts.merge(
641
+ :operation => :"SuppressionsApi.suppressions_unsubscribes_get",
642
+ :header_params => header_params,
643
+ :query_params => query_params,
644
+ :form_params => form_params,
645
+ :body => post_body,
646
+ :auth_names => auth_names,
647
+ :return_type => return_type
648
+ )
649
+
650
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
651
+ if @api_client.config.debugging
652
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_unsubscribes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
653
+ end
654
+ return data, status_code, headers
655
+ end
656
+
657
+ # Add Unsubscribes Async
658
+ # Add Unsubscribes. Required Access Level: ModifyContacts
659
+ # @param [Hash] opts the optional parameters
660
+ # @option opts [File] :file
661
+ # @return [nil]
662
+ def suppressions_unsubscribes_import_post(opts = {})
663
+ suppressions_unsubscribes_import_post_with_http_info(opts)
664
+ nil
665
+ end
666
+
667
+ # Add Unsubscribes Async
668
+ # Add Unsubscribes. Required Access Level: ModifyContacts
669
+ # @param [Hash] opts the optional parameters
670
+ # @option opts [File] :file
671
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
672
+ def suppressions_unsubscribes_import_post_with_http_info(opts = {})
673
+ if @api_client.config.debugging
674
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_unsubscribes_import_post ...'
675
+ end
676
+ # resource path
677
+ local_var_path = '/suppressions/unsubscribes/import'
678
+
679
+ # query parameters
680
+ query_params = opts[:query_params] || {}
681
+
682
+ # header parameters
683
+ header_params = opts[:header_params] || {}
684
+ # HTTP header 'Content-Type'
685
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
686
+
687
+ # form parameters
688
+ form_params = opts[:form_params] || {}
689
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
690
+
691
+ # http body (model)
692
+ post_body = opts[:debug_body]
693
+
694
+ # return_type
695
+ return_type = opts[:debug_return_type]
696
+
697
+ # auth_names
698
+ auth_names = opts[:debug_auth_names] || ['apikey']
699
+
700
+ new_options = opts.merge(
701
+ :operation => :"SuppressionsApi.suppressions_unsubscribes_import_post",
702
+ :header_params => header_params,
703
+ :query_params => query_params,
704
+ :form_params => form_params,
705
+ :body => post_body,
706
+ :auth_names => auth_names,
707
+ :return_type => return_type
708
+ )
709
+
710
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
711
+ if @api_client.config.debugging
712
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_unsubscribes_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
713
+ end
714
+ return data, status_code, headers
715
+ end
716
+
717
+ # Add Unsubscribes
718
+ # Add Unsubscribes. Required Access Level: ModifyContacts
719
+ # @param request_body [Array<String>] Emails to add as unsubscribes. Limited to 1000 per request
720
+ # @param [Hash] opts the optional parameters
721
+ # @return [Array<Suppression>]
722
+ def suppressions_unsubscribes_post(request_body, opts = {})
723
+ data, _status_code, _headers = suppressions_unsubscribes_post_with_http_info(request_body, opts)
724
+ data
725
+ end
726
+
727
+ # Add Unsubscribes
728
+ # Add Unsubscribes. Required Access Level: ModifyContacts
729
+ # @param request_body [Array<String>] Emails to add as unsubscribes. Limited to 1000 per request
730
+ # @param [Hash] opts the optional parameters
731
+ # @return [Array<(Array<Suppression>, Integer, Hash)>] Array<Suppression> data, response status code and response headers
732
+ def suppressions_unsubscribes_post_with_http_info(request_body, opts = {})
733
+ if @api_client.config.debugging
734
+ @api_client.config.logger.debug 'Calling API: SuppressionsApi.suppressions_unsubscribes_post ...'
735
+ end
736
+ # verify the required parameter 'request_body' is set
737
+ if @api_client.config.client_side_validation && request_body.nil?
738
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling SuppressionsApi.suppressions_unsubscribes_post"
739
+ end
740
+ # resource path
741
+ local_var_path = '/suppressions/unsubscribes'
742
+
743
+ # query parameters
744
+ query_params = opts[:query_params] || {}
745
+
746
+ # header parameters
747
+ header_params = opts[:header_params] || {}
748
+ # HTTP header 'Accept' (if needed)
749
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
750
+ # HTTP header 'Content-Type'
751
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
752
+
753
+ # form parameters
754
+ form_params = opts[:form_params] || {}
755
+
756
+ # http body (model)
757
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
758
+
759
+ # return_type
760
+ return_type = opts[:debug_return_type] || 'Array<Suppression>'
761
+
762
+ # auth_names
763
+ auth_names = opts[:debug_auth_names] || ['apikey']
764
+
765
+ new_options = opts.merge(
766
+ :operation => :"SuppressionsApi.suppressions_unsubscribes_post",
767
+ :header_params => header_params,
768
+ :query_params => query_params,
769
+ :form_params => form_params,
770
+ :body => post_body,
771
+ :auth_names => auth_names,
772
+ :return_type => return_type
773
+ )
774
+
775
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
776
+ if @api_client.config.debugging
777
+ @api_client.config.logger.debug "API called: SuppressionsApi#suppressions_unsubscribes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
778
+ end
779
+ return data, status_code, headers
780
+ end
781
+ end
782
+ end