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,340 @@
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 FilesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete File
23
+ # Permanently deletes the file from your Account. Required Access Level: ModifyFiles
24
+ # @param name [String] Name of your file including extension.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def files_by_name_delete(name, opts = {})
28
+ files_by_name_delete_with_http_info(name, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete File
33
+ # Permanently deletes the file from your Account. Required Access Level: ModifyFiles
34
+ # @param name [String] Name of your file including extension.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def files_by_name_delete_with_http_info(name, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: FilesApi.files_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 FilesApi.files_by_name_delete"
44
+ end
45
+ # resource path
46
+ local_var_path = '/files/{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 => :"FilesApi.files_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: FilesApi#files_by_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Download File
84
+ # Gets content of the specified File. Required Access Level: ViewFiles
85
+ # @param name [String] Name of your file including extension.
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [File]
88
+ def files_by_name_get(name, opts = {})
89
+ data, _status_code, _headers = files_by_name_get_with_http_info(name, opts)
90
+ data
91
+ end
92
+
93
+ # Download File
94
+ # Gets content of the specified File. Required Access Level: ViewFiles
95
+ # @param name [String] Name of your file including extension.
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
98
+ def files_by_name_get_with_http_info(name, opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: FilesApi.files_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 FilesApi.files_by_name_get"
105
+ end
106
+ # resource path
107
+ local_var_path = '/files/{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/*'])
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] || 'File'
125
+
126
+ # auth_names
127
+ auth_names = opts[:debug_auth_names] || ['apikey']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"FilesApi.files_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: FilesApi#files_by_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # Load File Details
147
+ # Returns the specified File's details. Required Access Level: ViewFiles
148
+ # @param name [String] Name of your file including extension.
149
+ # @param [Hash] opts the optional parameters
150
+ # @return [FileInfo]
151
+ def files_by_name_info_get(name, opts = {})
152
+ data, _status_code, _headers = files_by_name_info_get_with_http_info(name, opts)
153
+ data
154
+ end
155
+
156
+ # Load File Details
157
+ # Returns the specified File&#39;s details. Required Access Level: ViewFiles
158
+ # @param name [String] Name of your file including extension.
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [Array<(FileInfo, Integer, Hash)>] FileInfo data, response status code and response headers
161
+ def files_by_name_info_get_with_http_info(name, opts = {})
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug 'Calling API: FilesApi.files_by_name_info_get ...'
164
+ end
165
+ # verify the required parameter 'name' is set
166
+ if @api_client.config.client_side_validation && name.nil?
167
+ fail ArgumentError, "Missing the required parameter 'name' when calling FilesApi.files_by_name_info_get"
168
+ end
169
+ # resource path
170
+ local_var_path = '/files/{name}/info'.sub('{' + 'name' + '}', CGI.escape(name.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] || 'FileInfo'
188
+
189
+ # auth_names
190
+ auth_names = opts[:debug_auth_names] || ['apikey']
191
+
192
+ new_options = opts.merge(
193
+ :operation => :"FilesApi.files_by_name_info_get",
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(:GET, local_var_path, new_options)
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug "API called: FilesApi#files_by_name_info_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
205
+ end
206
+ return data, status_code, headers
207
+ end
208
+
209
+ # List Files
210
+ # Returns a list of all your available files. Required Access Level: ViewFiles
211
+ # @param [Hash] opts the optional parameters
212
+ # @option opts [Integer] :limit Maximum number of returned items.
213
+ # @option opts [Integer] :offset How many items should be returned ahead.
214
+ # @return [Array<FileInfo>]
215
+ def files_get(opts = {})
216
+ data, _status_code, _headers = files_get_with_http_info(opts)
217
+ data
218
+ end
219
+
220
+ # List Files
221
+ # Returns a list of all your available files. Required Access Level: ViewFiles
222
+ # @param [Hash] opts the optional parameters
223
+ # @option opts [Integer] :limit Maximum number of returned items.
224
+ # @option opts [Integer] :offset How many items should be returned ahead.
225
+ # @return [Array<(Array<FileInfo>, Integer, Hash)>] Array<FileInfo> data, response status code and response headers
226
+ def files_get_with_http_info(opts = {})
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug 'Calling API: FilesApi.files_get ...'
229
+ end
230
+ # resource path
231
+ local_var_path = '/files'
232
+
233
+ # query parameters
234
+ query_params = opts[:query_params] || {}
235
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
236
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
237
+
238
+ # header parameters
239
+ header_params = opts[:header_params] || {}
240
+ # HTTP header 'Accept' (if needed)
241
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
242
+
243
+ # form parameters
244
+ form_params = opts[:form_params] || {}
245
+
246
+ # http body (model)
247
+ post_body = opts[:debug_body]
248
+
249
+ # return_type
250
+ return_type = opts[:debug_return_type] || 'Array<FileInfo>'
251
+
252
+ # auth_names
253
+ auth_names = opts[:debug_auth_names] || ['apikey']
254
+
255
+ new_options = opts.merge(
256
+ :operation => :"FilesApi.files_get",
257
+ :header_params => header_params,
258
+ :query_params => query_params,
259
+ :form_params => form_params,
260
+ :body => post_body,
261
+ :auth_names => auth_names,
262
+ :return_type => return_type
263
+ )
264
+
265
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug "API called: FilesApi#files_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
268
+ end
269
+ return data, status_code, headers
270
+ end
271
+
272
+ # Upload File
273
+ # Uploads selected file to the server. Required Access Level: ModifyFiles
274
+ # @param file_payload [FilePayload]
275
+ # @param [Hash] opts the optional parameters
276
+ # @option opts [Integer] :expires_after_days After how many days should the file be deleted.
277
+ # @return [FileInfo]
278
+ def files_post(file_payload, opts = {})
279
+ data, _status_code, _headers = files_post_with_http_info(file_payload, opts)
280
+ data
281
+ end
282
+
283
+ # Upload File
284
+ # Uploads selected file to the server. Required Access Level: ModifyFiles
285
+ # @param file_payload [FilePayload]
286
+ # @param [Hash] opts the optional parameters
287
+ # @option opts [Integer] :expires_after_days After how many days should the file be deleted.
288
+ # @return [Array<(FileInfo, Integer, Hash)>] FileInfo data, response status code and response headers
289
+ def files_post_with_http_info(file_payload, opts = {})
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug 'Calling API: FilesApi.files_post ...'
292
+ end
293
+ # verify the required parameter 'file_payload' is set
294
+ if @api_client.config.client_side_validation && file_payload.nil?
295
+ fail ArgumentError, "Missing the required parameter 'file_payload' when calling FilesApi.files_post"
296
+ end
297
+ # resource path
298
+ local_var_path = '/files'
299
+
300
+ # query parameters
301
+ query_params = opts[:query_params] || {}
302
+ query_params[:'expiresAfterDays'] = opts[:'expires_after_days'] if !opts[:'expires_after_days'].nil?
303
+
304
+ # header parameters
305
+ header_params = opts[:header_params] || {}
306
+ # HTTP header 'Accept' (if needed)
307
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
308
+ # HTTP header 'Content-Type'
309
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
310
+
311
+ # form parameters
312
+ form_params = opts[:form_params] || {}
313
+
314
+ # http body (model)
315
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(file_payload)
316
+
317
+ # return_type
318
+ return_type = opts[:debug_return_type] || 'FileInfo'
319
+
320
+ # auth_names
321
+ auth_names = opts[:debug_auth_names] || ['apikey']
322
+
323
+ new_options = opts.merge(
324
+ :operation => :"FilesApi.files_post",
325
+ :header_params => header_params,
326
+ :query_params => query_params,
327
+ :form_params => form_params,
328
+ :body => post_body,
329
+ :auth_names => auth_names,
330
+ :return_type => return_type
331
+ )
332
+
333
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
334
+ if @api_client.config.debugging
335
+ @api_client.config.logger.debug "API called: FilesApi#files_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
336
+ end
337
+ return data, status_code, headers
338
+ end
339
+ end
340
+ end
@@ -0,0 +1,404 @@
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 InboundRouteApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete Route
23
+ # Deletes the Inbound Route. Required Access Level: ModifySettings
24
+ # @param id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def inboundroute_by_id_delete(id, opts = {})
28
+ inboundroute_by_id_delete_with_http_info(id, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete Route
33
+ # Deletes the Inbound Route. Required Access Level: ModifySettings
34
+ # @param id [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def inboundroute_by_id_delete_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: InboundRouteApi.inboundroute_by_id_delete ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling InboundRouteApi.inboundroute_by_id_delete"
44
+ end
45
+ # resource path
46
+ local_var_path = '/inboundroute/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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 => :"InboundRouteApi.inboundroute_by_id_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: InboundRouteApi#inboundroute_by_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Get Route
84
+ # Load an Inbound Route. Required Access Level: ViewSettings
85
+ # @param id [String] ID number of your attachment
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [InboundRoute]
88
+ def inboundroute_by_id_get(id, opts = {})
89
+ data, _status_code, _headers = inboundroute_by_id_get_with_http_info(id, opts)
90
+ data
91
+ end
92
+
93
+ # Get Route
94
+ # Load an Inbound Route. Required Access Level: ViewSettings
95
+ # @param id [String] ID number of your attachment
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Array<(InboundRoute, Integer, Hash)>] InboundRoute data, response status code and response headers
98
+ def inboundroute_by_id_get_with_http_info(id, opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: InboundRouteApi.inboundroute_by_id_get ...'
101
+ end
102
+ # verify the required parameter 'id' is set
103
+ if @api_client.config.client_side_validation && id.nil?
104
+ fail ArgumentError, "Missing the required parameter 'id' when calling InboundRouteApi.inboundroute_by_id_get"
105
+ end
106
+ # resource path
107
+ local_var_path = '/inboundroute/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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] || 'InboundRoute'
125
+
126
+ # auth_names
127
+ auth_names = opts[:debug_auth_names] || ['apikey']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"InboundRouteApi.inboundroute_by_id_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: InboundRouteApi#inboundroute_by_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # Update Route
147
+ # Update the Inbound Route. Required Access Level: ModifySettings
148
+ # @param id [String]
149
+ # @param inbound_payload [InboundPayload]
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [InboundRoute]
152
+ def inboundroute_by_id_put(id, inbound_payload, opts = {})
153
+ data, _status_code, _headers = inboundroute_by_id_put_with_http_info(id, inbound_payload, opts)
154
+ data
155
+ end
156
+
157
+ # Update Route
158
+ # Update the Inbound Route. Required Access Level: ModifySettings
159
+ # @param id [String]
160
+ # @param inbound_payload [InboundPayload]
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(InboundRoute, Integer, Hash)>] InboundRoute data, response status code and response headers
163
+ def inboundroute_by_id_put_with_http_info(id, inbound_payload, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: InboundRouteApi.inboundroute_by_id_put ...'
166
+ end
167
+ # verify the required parameter 'id' is set
168
+ if @api_client.config.client_side_validation && id.nil?
169
+ fail ArgumentError, "Missing the required parameter 'id' when calling InboundRouteApi.inboundroute_by_id_put"
170
+ end
171
+ # verify the required parameter 'inbound_payload' is set
172
+ if @api_client.config.client_side_validation && inbound_payload.nil?
173
+ fail ArgumentError, "Missing the required parameter 'inbound_payload' when calling InboundRouteApi.inboundroute_by_id_put"
174
+ end
175
+ # resource path
176
+ local_var_path = '/inboundroute/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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(inbound_payload)
193
+
194
+ # return_type
195
+ return_type = opts[:debug_return_type] || 'InboundRoute'
196
+
197
+ # auth_names
198
+ auth_names = opts[:debug_auth_names] || ['apikey']
199
+
200
+ new_options = opts.merge(
201
+ :operation => :"InboundRouteApi.inboundroute_by_id_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: InboundRouteApi#inboundroute_by_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
213
+ end
214
+ return data, status_code, headers
215
+ end
216
+
217
+ # Get Routes
218
+ # Get all your Inbound Routes. Required Access Level: ViewSettings
219
+ # @param [Hash] opts the optional parameters
220
+ # @return [Array<InboundRoute>]
221
+ def inboundroute_get(opts = {})
222
+ data, _status_code, _headers = inboundroute_get_with_http_info(opts)
223
+ data
224
+ end
225
+
226
+ # Get Routes
227
+ # Get all your Inbound Routes. Required Access Level: ViewSettings
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [Array<(Array<InboundRoute>, Integer, Hash)>] Array<InboundRoute> data, response status code and response headers
230
+ def inboundroute_get_with_http_info(opts = {})
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug 'Calling API: InboundRouteApi.inboundroute_get ...'
233
+ end
234
+ # resource path
235
+ local_var_path = '/inboundroute'
236
+
237
+ # query parameters
238
+ query_params = opts[:query_params] || {}
239
+
240
+ # header parameters
241
+ header_params = opts[:header_params] || {}
242
+ # HTTP header 'Accept' (if needed)
243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
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] || 'Array<InboundRoute>'
253
+
254
+ # auth_names
255
+ auth_names = opts[:debug_auth_names] || ['apikey']
256
+
257
+ new_options = opts.merge(
258
+ :operation => :"InboundRouteApi.inboundroute_get",
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(:GET, local_var_path, new_options)
268
+ if @api_client.config.debugging
269
+ @api_client.config.logger.debug "API called: InboundRouteApi#inboundroute_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
+ end
271
+ return data, status_code, headers
272
+ end
273
+
274
+ # Update Sorting
275
+ # Required Access Level: ViewSettings
276
+ # @param sort_order_item [Array<SortOrderItem>] Change the ordering of inbound routes for when matching the inbound
277
+ # @param [Hash] opts the optional parameters
278
+ # @return [Array<InboundRoute>]
279
+ def inboundroute_order_put(sort_order_item, opts = {})
280
+ data, _status_code, _headers = inboundroute_order_put_with_http_info(sort_order_item, opts)
281
+ data
282
+ end
283
+
284
+ # Update Sorting
285
+ # Required Access Level: ViewSettings
286
+ # @param sort_order_item [Array<SortOrderItem>] Change the ordering of inbound routes for when matching the inbound
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [Array<(Array<InboundRoute>, Integer, Hash)>] Array<InboundRoute> data, response status code and response headers
289
+ def inboundroute_order_put_with_http_info(sort_order_item, opts = {})
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug 'Calling API: InboundRouteApi.inboundroute_order_put ...'
292
+ end
293
+ # verify the required parameter 'sort_order_item' is set
294
+ if @api_client.config.client_side_validation && sort_order_item.nil?
295
+ fail ArgumentError, "Missing the required parameter 'sort_order_item' when calling InboundRouteApi.inboundroute_order_put"
296
+ end
297
+ # resource path
298
+ local_var_path = '/inboundroute/order'
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
+ # HTTP header 'Content-Type'
308
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
309
+
310
+ # form parameters
311
+ form_params = opts[:form_params] || {}
312
+
313
+ # http body (model)
314
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sort_order_item)
315
+
316
+ # return_type
317
+ return_type = opts[:debug_return_type] || 'Array<InboundRoute>'
318
+
319
+ # auth_names
320
+ auth_names = opts[:debug_auth_names] || ['apikey']
321
+
322
+ new_options = opts.merge(
323
+ :operation => :"InboundRouteApi.inboundroute_order_put",
324
+ :header_params => header_params,
325
+ :query_params => query_params,
326
+ :form_params => form_params,
327
+ :body => post_body,
328
+ :auth_names => auth_names,
329
+ :return_type => return_type
330
+ )
331
+
332
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug "API called: InboundRouteApi#inboundroute_order_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
335
+ end
336
+ return data, status_code, headers
337
+ end
338
+
339
+ # Create Route
340
+ # Create new Inbound Route. Required Access Level: ModifySettings
341
+ # @param inbound_payload [InboundPayload]
342
+ # @param [Hash] opts the optional parameters
343
+ # @return [InboundRoute]
344
+ def inboundroute_post(inbound_payload, opts = {})
345
+ data, _status_code, _headers = inboundroute_post_with_http_info(inbound_payload, opts)
346
+ data
347
+ end
348
+
349
+ # Create Route
350
+ # Create new Inbound Route. Required Access Level: ModifySettings
351
+ # @param inbound_payload [InboundPayload]
352
+ # @param [Hash] opts the optional parameters
353
+ # @return [Array<(InboundRoute, Integer, Hash)>] InboundRoute data, response status code and response headers
354
+ def inboundroute_post_with_http_info(inbound_payload, opts = {})
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug 'Calling API: InboundRouteApi.inboundroute_post ...'
357
+ end
358
+ # verify the required parameter 'inbound_payload' is set
359
+ if @api_client.config.client_side_validation && inbound_payload.nil?
360
+ fail ArgumentError, "Missing the required parameter 'inbound_payload' when calling InboundRouteApi.inboundroute_post"
361
+ end
362
+ # resource path
363
+ local_var_path = '/inboundroute'
364
+
365
+ # query parameters
366
+ query_params = opts[:query_params] || {}
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
+ # HTTP header 'Content-Type'
373
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
374
+
375
+ # form parameters
376
+ form_params = opts[:form_params] || {}
377
+
378
+ # http body (model)
379
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(inbound_payload)
380
+
381
+ # return_type
382
+ return_type = opts[:debug_return_type] || 'InboundRoute'
383
+
384
+ # auth_names
385
+ auth_names = opts[:debug_auth_names] || ['apikey']
386
+
387
+ new_options = opts.merge(
388
+ :operation => :"InboundRouteApi.inboundroute_post",
389
+ :header_params => header_params,
390
+ :query_params => query_params,
391
+ :form_params => form_params,
392
+ :body => post_body,
393
+ :auth_names => auth_names,
394
+ :return_type => return_type
395
+ )
396
+
397
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
398
+ if @api_client.config.debugging
399
+ @api_client.config.logger.debug "API called: InboundRouteApi#inboundroute_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
400
+ end
401
+ return data, status_code, headers
402
+ end
403
+ end
404
+ end