mailslurp_client 4.3.3 → 7.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +5 -5
  2. data/lib/mailslurp_client.rb +76 -7
  3. metadata +14 -255
  4. data/Gemfile +0 -8
  5. data/Gemfile.lock +0 -79
  6. data/LICENSE +0 -22
  7. data/README.md +0 -126
  8. data/Rakefile +0 -10
  9. data/docs/BasicAuthOptions.md +0 -9
  10. data/docs/BulkSendEmailOptions.md +0 -9
  11. data/docs/CommonOperationsApi.md +0 -166
  12. data/docs/CreateWebhookOptions.md +0 -10
  13. data/docs/Email.md +0 -22
  14. data/docs/EmailAnalysis.md +0 -12
  15. data/docs/EmailPreview.md +0 -9
  16. data/docs/ExtraOperationsApi.md +0 -855
  17. data/docs/Inbox.md +0 -11
  18. data/docs/SendEmailOptions.md +0 -16
  19. data/docs/Webhook.md +0 -13
  20. data/git_push.sh +0 -55
  21. data/lib/mailslurp_client/api/common_operations_api.rb +0 -175
  22. data/lib/mailslurp_client/api/extra_operations_api.rb +0 -879
  23. data/lib/mailslurp_client/api_client.rb +0 -389
  24. data/lib/mailslurp_client/api_error.rb +0 -38
  25. data/lib/mailslurp_client/configuration.rb +0 -251
  26. data/lib/mailslurp_client/models/basic_auth_options.rb +0 -202
  27. data/lib/mailslurp_client/models/bulk_send_email_options.rb +0 -201
  28. data/lib/mailslurp_client/models/create_webhook_options.rb +0 -202
  29. data/lib/mailslurp_client/models/email.rb +0 -350
  30. data/lib/mailslurp_client/models/email_analysis.rb +0 -245
  31. data/lib/mailslurp_client/models/email_preview.rb +0 -203
  32. data/lib/mailslurp_client/models/inbox.rb +0 -212
  33. data/lib/mailslurp_client/models/send_email_options.rb +0 -275
  34. data/lib/mailslurp_client/models/webhook.rb +0 -242
  35. data/lib/mailslurp_client/version.rb +0 -15
  36. data/mailslurp_client.gemspec +0 -45
  37. data/spec/api/common_operations_api_spec.rb +0 -71
  38. data/spec/api/extra_operations_api_spec.rb +0 -231
  39. data/spec/api_client_spec.rb +0 -226
  40. data/spec/configuration_spec.rb +0 -42
  41. data/spec/models/basic_auth_options_spec.rb +0 -47
  42. data/spec/models/bulk_send_email_options_spec.rb +0 -47
  43. data/spec/models/create_webhook_options_spec.rb +0 -53
  44. data/spec/models/email_analysis_spec.rb +0 -65
  45. data/spec/models/email_preview_spec.rb +0 -47
  46. data/spec/models/email_spec.rb +0 -125
  47. data/spec/models/inbox_spec.rb +0 -59
  48. data/spec/models/send_email_options_spec.rb +0 -89
  49. data/spec/models/webhook_spec.rb +0 -71
  50. data/spec/spec_helper.rb +0 -111
@@ -1,11 +0,0 @@
1
- # MailSlurpClient::Inbox
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **created** | **DateTime** | | [optional]
7
- **email_address** | **String** | The inbox's email address. Send an email to this address and the inbox will receive it | [optional]
8
- **id** | **String** | | [optional]
9
- **user_id** | **String** | | [optional]
10
-
11
-
@@ -1,16 +0,0 @@
1
- # MailSlurpClient::SendEmailOptions
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **bcc** | **Array<String>** | Optional list of bcc destination email addresses | [optional]
7
- **body** | **String** | Contents of email | [optional]
8
- **cc** | **Array<String>** | Optional list of cc destination email addresses | [optional]
9
- **charset** | **String** | Optional charset | [optional]
10
- **from** | **String** | Optional from address. If not set source inbox address will be used | [optional]
11
- **html** | **BOOLEAN** | | [optional]
12
- **reply_to** | **String** | Optional replyTo header | [optional]
13
- **subject** | **String** | Optional email subject line | [optional]
14
- **to** | **Array<String>** | List of destination email addresses. Even single recipients must be in array form. |
15
-
16
-
@@ -1,13 +0,0 @@
1
- # MailSlurpClient::Webhook
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **basic_auth** | **BOOLEAN** | Does Webhook expect basic authentication | [optional]
7
- **created_at** | **DateTime** | |
8
- **id** | **String** | ID of the Webhook | [optional]
9
- **inbox_id** | **String** | The inbox that the Webhook will be triggered by | [optional]
10
- **name** | **String** | | [optional]
11
- **updated_at** | **DateTime** | |
12
-
13
-
@@ -1,55 +0,0 @@
1
- #!/bin/sh
2
- #
3
- # Generated by: https://openapi-generator.tech
4
- #
5
- # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
- #
7
- # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
8
-
9
- git_user_id=$1
10
- git_repo_id=$2
11
- release_note=$3
12
-
13
- if [ "$git_user_id" = "" ]; then
14
- git_user_id="GIT_USER_ID"
15
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
- fi
17
-
18
- if [ "$git_repo_id" = "" ]; then
19
- git_repo_id="GIT_REPO_ID"
20
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
- fi
22
-
23
- if [ "$release_note" = "" ]; then
24
- release_note="Minor update"
25
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
- fi
27
-
28
- # Initialize the local directory as a Git repository
29
- git init
30
-
31
- # Adds the files in the local repository and stages them for commit.
32
- git add .
33
-
34
- # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
- git commit -m "$release_note"
36
-
37
- # Sets the new remote
38
- git_remote=`git remote`
39
- if [ "$git_remote" = "" ]; then # git remote not defined
40
-
41
- if [ "$GIT_TOKEN" = "" ]; then
42
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
- git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
- else
45
- git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
- fi
47
-
48
- fi
49
-
50
- git pull origin master
51
-
52
- # Pushes (Forces) the changes in the local repository up to the remote repository
53
- echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
- git push origin master 2>&1 | grep -v 'To https'
55
-
@@ -1,175 +0,0 @@
1
- =begin
2
- #MailSlurp API
3
-
4
- #For documentation see [developer guide](https://www.mailslurp.com/developers). [Create an account](https://app.mailslurp.com) in the MailSlurp Dashboard to [view your API Key](https://app). For all bugs, feature requests, or help please [see support](https://www.mailslurp.com/support/).
5
-
6
- OpenAPI spec version: 0.0.1-alpha
7
- Contact: contact@mailslurp.dev
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.4
10
-
11
- =end
12
-
13
- require 'uri'
14
-
15
- module MailSlurpClient
16
- class CommonOperationsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create new email address
23
- # Returns an Inbox with an `id` and an `emailAddress`
24
- # @param [Hash] opts the optional parameters
25
- # @return [Inbox]
26
- def create_new_email_address(opts = {})
27
- data, _status_code, _headers = create_new_email_address_with_http_info(opts)
28
- data
29
- end
30
-
31
- # Create new email address
32
- # Returns an Inbox with an `id` and an `emailAddress`
33
- # @param [Hash] opts the optional parameters
34
- # @return [Array<(Inbox, Fixnum, Hash)>] Inbox data, response status code and response headers
35
- def create_new_email_address_with_http_info(opts = {})
36
- if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.create_new_email_address ...'
38
- end
39
- # resource path
40
- local_var_path = '/newEmailAddress'
41
-
42
- # query parameters
43
- query_params = {}
44
-
45
- # header parameters
46
- header_params = {}
47
- # HTTP header 'Accept' (if needed)
48
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
-
50
- # form parameters
51
- form_params = {}
52
-
53
- # http body (model)
54
- post_body = nil
55
- auth_names = ['API_KEY']
56
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
57
- :header_params => header_params,
58
- :query_params => query_params,
59
- :form_params => form_params,
60
- :body => post_body,
61
- :auth_names => auth_names,
62
- :return_type => 'Inbox')
63
- if @api_client.config.debugging
64
- @api_client.config.logger.debug "API called: CommonOperationsApi#create_new_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
- end
66
- return data, status_code, headers
67
- end
68
-
69
- # Send an email from a random email address
70
- # To specify an email address first create an inbox and use that with the other send email methods
71
- # @param send_email_options sendEmailOptions
72
- # @param [Hash] opts the optional parameters
73
- # @return [nil]
74
- def send_email_simple(send_email_options, opts = {})
75
- send_email_simple_with_http_info(send_email_options, opts)
76
- nil
77
- end
78
-
79
- # Send an email from a random email address
80
- # To specify an email address first create an inbox and use that with the other send email methods
81
- # @param send_email_options sendEmailOptions
82
- # @param [Hash] opts the optional parameters
83
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
84
- def send_email_simple_with_http_info(send_email_options, opts = {})
85
- if @api_client.config.debugging
86
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.send_email_simple ...'
87
- end
88
- # verify the required parameter 'send_email_options' is set
89
- if @api_client.config.client_side_validation && send_email_options.nil?
90
- fail ArgumentError, "Missing the required parameter 'send_email_options' when calling CommonOperationsApi.send_email_simple"
91
- end
92
- # resource path
93
- local_var_path = '/sendEmail'
94
-
95
- # query parameters
96
- query_params = {}
97
-
98
- # header parameters
99
- header_params = {}
100
- # HTTP header 'Content-Type'
101
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
102
-
103
- # form parameters
104
- form_params = {}
105
-
106
- # http body (model)
107
- post_body = @api_client.object_to_http_body(send_email_options)
108
- auth_names = ['API_KEY']
109
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
110
- :header_params => header_params,
111
- :query_params => query_params,
112
- :form_params => form_params,
113
- :body => post_body,
114
- :auth_names => auth_names)
115
- if @api_client.config.debugging
116
- @api_client.config.logger.debug "API called: CommonOperationsApi#send_email_simple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
117
- end
118
- return data, status_code, headers
119
- end
120
-
121
- # Fetch inbox's latest email or if empty wait for email to arrive
122
- # Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox see the other receive methods.
123
- # @param [Hash] opts the optional parameters
124
- # @option opts [String] :inbox_email_address Email address of the inbox we are fetching emails from
125
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
126
- # @return [Email]
127
- def wait_for_latest_email(opts = {})
128
- data, _status_code, _headers = wait_for_latest_email_with_http_info(opts)
129
- data
130
- end
131
-
132
- # Fetch inbox&#39;s latest email or if empty wait for email to arrive
133
- # Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox see the other receive methods.
134
- # @param [Hash] opts the optional parameters
135
- # @option opts [String] :inbox_email_address Email address of the inbox we are fetching emails from
136
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
137
- # @return [Array<(Email, Fixnum, Hash)>] Email data, response status code and response headers
138
- def wait_for_latest_email_with_http_info(opts = {})
139
- if @api_client.config.debugging
140
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.wait_for_latest_email ...'
141
- end
142
- # resource path
143
- local_var_path = '/fetchLatestEmail'
144
-
145
- # query parameters
146
- query_params = {}
147
- query_params[:'inboxEmailAddress'] = opts[:'inbox_email_address'] if !opts[:'inbox_email_address'].nil?
148
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
149
-
150
- # header parameters
151
- header_params = {}
152
- # HTTP header 'Accept' (if needed)
153
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
154
-
155
- # form parameters
156
- form_params = {}
157
-
158
- # http body (model)
159
- post_body = nil
160
- auth_names = ['API_KEY']
161
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
162
- :header_params => header_params,
163
- :query_params => query_params,
164
- :form_params => form_params,
165
- :body => post_body,
166
- :auth_names => auth_names,
167
- :return_type => 'Email')
168
- if @api_client.config.debugging
169
- @api_client.config.logger.debug "API called: CommonOperationsApi#wait_for_latest_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
170
- end
171
- return data, status_code, headers
172
- end
173
-
174
- end
175
- end
@@ -1,879 +0,0 @@
1
- =begin
2
- #MailSlurp API
3
-
4
- #For documentation see [developer guide](https://www.mailslurp.com/developers). [Create an account](https://app.mailslurp.com) in the MailSlurp Dashboard to [view your API Key](https://app). For all bugs, feature requests, or help please [see support](https://www.mailslurp.com/support/).
5
-
6
- OpenAPI spec version: 0.0.1-alpha
7
- Contact: contact@mailslurp.dev
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.4
10
-
11
- =end
12
-
13
- require 'uri'
14
-
15
- module MailSlurpClient
16
- class ExtraOperationsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Bulk create Inboxes (email addresses)
23
- # Enterprise Plan Required
24
- # @param count Number of inboxes to be created in bulk
25
- # @param [Hash] opts the optional parameters
26
- # @return [Array<Inbox>]
27
- def bulk_create_inboxes(count, opts = {})
28
- data, _status_code, _headers = bulk_create_inboxes_with_http_info(count, opts)
29
- data
30
- end
31
-
32
- # Bulk create Inboxes (email addresses)
33
- # Enterprise Plan Required
34
- # @param count Number of inboxes to be created in bulk
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(Array<Inbox>, Fixnum, Hash)>] Array<Inbox> data, response status code and response headers
37
- def bulk_create_inboxes_with_http_info(count, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.bulk_create_inboxes ...'
40
- end
41
- # verify the required parameter 'count' is set
42
- if @api_client.config.client_side_validation && count.nil?
43
- fail ArgumentError, "Missing the required parameter 'count' when calling ExtraOperationsApi.bulk_create_inboxes"
44
- end
45
- # resource path
46
- local_var_path = '/bulk/inboxes'
47
-
48
- # query parameters
49
- query_params = {}
50
- query_params[:'count'] = count
51
-
52
- # header parameters
53
- header_params = {}
54
- # HTTP header 'Accept' (if needed)
55
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
-
57
- # form parameters
58
- form_params = {}
59
-
60
- # http body (model)
61
- post_body = nil
62
- auth_names = ['API_KEY']
63
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
64
- :header_params => header_params,
65
- :query_params => query_params,
66
- :form_params => form_params,
67
- :body => post_body,
68
- :auth_names => auth_names,
69
- :return_type => 'Array<Inbox>')
70
- if @api_client.config.debugging
71
- @api_client.config.logger.debug "API called: ExtraOperationsApi#bulk_create_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
- end
73
- return data, status_code, headers
74
- end
75
-
76
- # Bulk Delete Inboxes
77
- # Enterprise Plan Required
78
- # @param request_body ids
79
- # @param [Hash] opts the optional parameters
80
- # @return [nil]
81
- def bulk_delete_inboxes(request_body, opts = {})
82
- bulk_delete_inboxes_with_http_info(request_body, opts)
83
- nil
84
- end
85
-
86
- # Bulk Delete Inboxes
87
- # Enterprise Plan Required
88
- # @param request_body ids
89
- # @param [Hash] opts the optional parameters
90
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
91
- def bulk_delete_inboxes_with_http_info(request_body, opts = {})
92
- if @api_client.config.debugging
93
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.bulk_delete_inboxes ...'
94
- end
95
- # verify the required parameter 'request_body' is set
96
- if @api_client.config.client_side_validation && request_body.nil?
97
- fail ArgumentError, "Missing the required parameter 'request_body' when calling ExtraOperationsApi.bulk_delete_inboxes"
98
- end
99
- # resource path
100
- local_var_path = '/bulk/inboxes'
101
-
102
- # query parameters
103
- query_params = {}
104
-
105
- # header parameters
106
- header_params = {}
107
- # HTTP header 'Content-Type'
108
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
109
-
110
- # form parameters
111
- form_params = {}
112
-
113
- # http body (model)
114
- post_body = @api_client.object_to_http_body(request_body)
115
- auth_names = ['API_KEY']
116
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
117
- :header_params => header_params,
118
- :query_params => query_params,
119
- :form_params => form_params,
120
- :body => post_body,
121
- :auth_names => auth_names)
122
- if @api_client.config.debugging
123
- @api_client.config.logger.debug "API called: ExtraOperationsApi#bulk_delete_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
124
- end
125
- return data, status_code, headers
126
- end
127
-
128
- # Bulk Send Emails
129
- # Enterprise Plan Required
130
- # @param bulk_send_email_options bulkSendEmailOptions
131
- # @param [Hash] opts the optional parameters
132
- # @return [nil]
133
- def bulk_send_emails(bulk_send_email_options, opts = {})
134
- bulk_send_emails_with_http_info(bulk_send_email_options, opts)
135
- nil
136
- end
137
-
138
- # Bulk Send Emails
139
- # Enterprise Plan Required
140
- # @param bulk_send_email_options bulkSendEmailOptions
141
- # @param [Hash] opts the optional parameters
142
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
143
- def bulk_send_emails_with_http_info(bulk_send_email_options, opts = {})
144
- if @api_client.config.debugging
145
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.bulk_send_emails ...'
146
- end
147
- # verify the required parameter 'bulk_send_email_options' is set
148
- if @api_client.config.client_side_validation && bulk_send_email_options.nil?
149
- fail ArgumentError, "Missing the required parameter 'bulk_send_email_options' when calling ExtraOperationsApi.bulk_send_emails"
150
- end
151
- # resource path
152
- local_var_path = '/bulk/send'
153
-
154
- # query parameters
155
- query_params = {}
156
-
157
- # header parameters
158
- header_params = {}
159
- # HTTP header 'Content-Type'
160
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
161
-
162
- # form parameters
163
- form_params = {}
164
-
165
- # http body (model)
166
- post_body = @api_client.object_to_http_body(bulk_send_email_options)
167
- auth_names = ['API_KEY']
168
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
169
- :header_params => header_params,
170
- :query_params => query_params,
171
- :form_params => form_params,
172
- :body => post_body,
173
- :auth_names => auth_names)
174
- if @api_client.config.debugging
175
- @api_client.config.logger.debug "API called: ExtraOperationsApi#bulk_send_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
- end
177
- return data, status_code, headers
178
- end
179
-
180
- # Create an Inbox (email address)
181
- # Create a new inbox and ephemeral email address to send and receive from. This is a necessary step before sending or receiving emails. The response contains the inbox's ID and its associated email address. It is recommended that you create a new inbox during each test method so that it is unique and empty
182
- # @param [Hash] opts the optional parameters
183
- # @return [Inbox]
184
- def create_inbox(opts = {})
185
- data, _status_code, _headers = create_inbox_with_http_info(opts)
186
- data
187
- end
188
-
189
- # Create an Inbox (email address)
190
- # Create a new inbox and ephemeral email address to send and receive from. This is a necessary step before sending or receiving emails. The response contains the inbox&#39;s ID and its associated email address. It is recommended that you create a new inbox during each test method so that it is unique and empty
191
- # @param [Hash] opts the optional parameters
192
- # @return [Array<(Inbox, Fixnum, Hash)>] Inbox data, response status code and response headers
193
- def create_inbox_with_http_info(opts = {})
194
- if @api_client.config.debugging
195
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.create_inbox ...'
196
- end
197
- # resource path
198
- local_var_path = '/inboxes'
199
-
200
- # query parameters
201
- query_params = {}
202
-
203
- # header parameters
204
- header_params = {}
205
- # HTTP header 'Accept' (if needed)
206
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
207
-
208
- # form parameters
209
- form_params = {}
210
-
211
- # http body (model)
212
- post_body = nil
213
- auth_names = ['API_KEY']
214
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
215
- :header_params => header_params,
216
- :query_params => query_params,
217
- :form_params => form_params,
218
- :body => post_body,
219
- :auth_names => auth_names,
220
- :return_type => 'Inbox')
221
- if @api_client.config.debugging
222
- @api_client.config.logger.debug "API called: ExtraOperationsApi#create_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
- end
224
- return data, status_code, headers
225
- end
226
-
227
- # Attach a WebHook URL to an inbox
228
- # Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
229
- # @param inbox_id inboxId
230
- # @param create_webhook_options options
231
- # @param [Hash] opts the optional parameters
232
- # @return [Webhook]
233
- def create_webhook(inbox_id, create_webhook_options, opts = {})
234
- data, _status_code, _headers = create_webhook_with_http_info(inbox_id, create_webhook_options, opts)
235
- data
236
- end
237
-
238
- # Attach a WebHook URL to an inbox
239
- # Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
240
- # @param inbox_id inboxId
241
- # @param create_webhook_options options
242
- # @param [Hash] opts the optional parameters
243
- # @return [Array<(Webhook, Fixnum, Hash)>] Webhook data, response status code and response headers
244
- def create_webhook_with_http_info(inbox_id, create_webhook_options, opts = {})
245
- if @api_client.config.debugging
246
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.create_webhook ...'
247
- end
248
- # verify the required parameter 'inbox_id' is set
249
- if @api_client.config.client_side_validation && inbox_id.nil?
250
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.create_webhook"
251
- end
252
- # verify the required parameter 'create_webhook_options' is set
253
- if @api_client.config.client_side_validation && create_webhook_options.nil?
254
- fail ArgumentError, "Missing the required parameter 'create_webhook_options' when calling ExtraOperationsApi.create_webhook"
255
- end
256
- # resource path
257
- local_var_path = '/inboxes/{inboxId}/webhooks'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
258
-
259
- # query parameters
260
- query_params = {}
261
-
262
- # header parameters
263
- header_params = {}
264
- # HTTP header 'Accept' (if needed)
265
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
266
- # HTTP header 'Content-Type'
267
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
268
-
269
- # form parameters
270
- form_params = {}
271
-
272
- # http body (model)
273
- post_body = @api_client.object_to_http_body(create_webhook_options)
274
- auth_names = ['API_KEY']
275
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
276
- :header_params => header_params,
277
- :query_params => query_params,
278
- :form_params => form_params,
279
- :body => post_body,
280
- :auth_names => auth_names,
281
- :return_type => 'Webhook')
282
- if @api_client.config.debugging
283
- @api_client.config.logger.debug "API called: ExtraOperationsApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
284
- end
285
- return data, status_code, headers
286
- end
287
-
288
- # Delete Email
289
- # Deletes an email and removes it from the inbox
290
- # @param email_id emailId
291
- # @param [Hash] opts the optional parameters
292
- # @return [nil]
293
- def delete_email(email_id, opts = {})
294
- delete_email_with_http_info(email_id, opts)
295
- nil
296
- end
297
-
298
- # Delete Email
299
- # Deletes an email and removes it from the inbox
300
- # @param email_id emailId
301
- # @param [Hash] opts the optional parameters
302
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
303
- def delete_email_with_http_info(email_id, opts = {})
304
- if @api_client.config.debugging
305
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.delete_email ...'
306
- end
307
- # verify the required parameter 'email_id' is set
308
- if @api_client.config.client_side_validation && email_id.nil?
309
- fail ArgumentError, "Missing the required parameter 'email_id' when calling ExtraOperationsApi.delete_email"
310
- end
311
- # resource path
312
- local_var_path = '/emails/{emailId}'.sub('{' + 'emailId' + '}', email_id.to_s)
313
-
314
- # query parameters
315
- query_params = {}
316
-
317
- # header parameters
318
- header_params = {}
319
-
320
- # form parameters
321
- form_params = {}
322
-
323
- # http body (model)
324
- post_body = nil
325
- auth_names = ['API_KEY']
326
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
327
- :header_params => header_params,
328
- :query_params => query_params,
329
- :form_params => form_params,
330
- :body => post_body,
331
- :auth_names => auth_names)
332
- if @api_client.config.debugging
333
- @api_client.config.logger.debug "API called: ExtraOperationsApi#delete_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
334
- end
335
- return data, status_code, headers
336
- end
337
-
338
- # Delete Inbox / Email Address
339
- # Permanently delete an inbox and associated email address
340
- # @param inbox_id inboxId
341
- # @param [Hash] opts the optional parameters
342
- # @return [nil]
343
- def delete_inbox(inbox_id, opts = {})
344
- delete_inbox_with_http_info(inbox_id, opts)
345
- nil
346
- end
347
-
348
- # Delete Inbox / Email Address
349
- # Permanently delete an inbox and associated email address
350
- # @param inbox_id inboxId
351
- # @param [Hash] opts the optional parameters
352
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
353
- def delete_inbox_with_http_info(inbox_id, opts = {})
354
- if @api_client.config.debugging
355
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.delete_inbox ...'
356
- end
357
- # verify the required parameter 'inbox_id' is set
358
- if @api_client.config.client_side_validation && inbox_id.nil?
359
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.delete_inbox"
360
- end
361
- # resource path
362
- local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
363
-
364
- # query parameters
365
- query_params = {}
366
-
367
- # header parameters
368
- header_params = {}
369
-
370
- # form parameters
371
- form_params = {}
372
-
373
- # http body (model)
374
- post_body = nil
375
- auth_names = ['API_KEY']
376
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
377
- :header_params => header_params,
378
- :query_params => query_params,
379
- :form_params => form_params,
380
- :body => post_body,
381
- :auth_names => auth_names)
382
- if @api_client.config.debugging
383
- @api_client.config.logger.debug "API called: ExtraOperationsApi#delete_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
384
- end
385
- return data, status_code, headers
386
- end
387
-
388
- # Delete and disable a WebHook for an Inbox
389
- # @param inbox_id inboxId
390
- # @param webhook_id webhookId
391
- # @param [Hash] opts the optional parameters
392
- # @return [nil]
393
- def delete_webhook(inbox_id, webhook_id, opts = {})
394
- delete_webhook_with_http_info(inbox_id, webhook_id, opts)
395
- nil
396
- end
397
-
398
- # Delete and disable a WebHook for an Inbox
399
- # @param inbox_id inboxId
400
- # @param webhook_id webhookId
401
- # @param [Hash] opts the optional parameters
402
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
403
- def delete_webhook_with_http_info(inbox_id, webhook_id, opts = {})
404
- if @api_client.config.debugging
405
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.delete_webhook ...'
406
- end
407
- # verify the required parameter 'inbox_id' is set
408
- if @api_client.config.client_side_validation && inbox_id.nil?
409
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.delete_webhook"
410
- end
411
- # verify the required parameter 'webhook_id' is set
412
- if @api_client.config.client_side_validation && webhook_id.nil?
413
- fail ArgumentError, "Missing the required parameter 'webhook_id' when calling ExtraOperationsApi.delete_webhook"
414
- end
415
- # resource path
416
- local_var_path = '/inboxes/{inboxId}/webhooks/{webhookId}'.sub('{' + 'inboxId' + '}', inbox_id.to_s).sub('{' + 'webhookId' + '}', webhook_id.to_s)
417
-
418
- # query parameters
419
- query_params = {}
420
-
421
- # header parameters
422
- header_params = {}
423
-
424
- # form parameters
425
- form_params = {}
426
-
427
- # http body (model)
428
- post_body = nil
429
- auth_names = ['API_KEY']
430
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
431
- :header_params => header_params,
432
- :query_params => query_params,
433
- :form_params => form_params,
434
- :body => post_body,
435
- :auth_names => auth_names)
436
- if @api_client.config.debugging
437
- @api_client.config.logger.debug "API called: ExtraOperationsApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
438
- end
439
- return data, status_code, headers
440
- end
441
-
442
- # Get email attachment
443
- # Returns the specified attachment for a given email as a byte stream (file download). Get the attachmentId from the email response. Requires enterprise account.
444
- # @param attachment_id attachmentId
445
- # @param email_id emailId
446
- # @param [Hash] opts the optional parameters
447
- # @return [nil]
448
- def download_attachment(attachment_id, email_id, opts = {})
449
- download_attachment_with_http_info(attachment_id, email_id, opts)
450
- nil
451
- end
452
-
453
- # Get email attachment
454
- # Returns the specified attachment for a given email as a byte stream (file download). Get the attachmentId from the email response. Requires enterprise account.
455
- # @param attachment_id attachmentId
456
- # @param email_id emailId
457
- # @param [Hash] opts the optional parameters
458
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
459
- def download_attachment_with_http_info(attachment_id, email_id, opts = {})
460
- if @api_client.config.debugging
461
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.download_attachment ...'
462
- end
463
- # verify the required parameter 'attachment_id' is set
464
- if @api_client.config.client_side_validation && attachment_id.nil?
465
- fail ArgumentError, "Missing the required parameter 'attachment_id' when calling ExtraOperationsApi.download_attachment"
466
- end
467
- # verify the required parameter 'email_id' is set
468
- if @api_client.config.client_side_validation && email_id.nil?
469
- fail ArgumentError, "Missing the required parameter 'email_id' when calling ExtraOperationsApi.download_attachment"
470
- end
471
- # resource path
472
- local_var_path = '/emails/{emailId}/attachments/{attachmentId}'.sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'emailId' + '}', email_id.to_s)
473
-
474
- # query parameters
475
- query_params = {}
476
-
477
- # header parameters
478
- header_params = {}
479
-
480
- # form parameters
481
- form_params = {}
482
-
483
- # http body (model)
484
- post_body = nil
485
- auth_names = ['API_KEY']
486
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
487
- :header_params => header_params,
488
- :query_params => query_params,
489
- :form_params => form_params,
490
- :body => post_body,
491
- :auth_names => auth_names)
492
- if @api_client.config.debugging
493
- @api_client.config.logger.debug "API called: ExtraOperationsApi#download_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
- end
495
- return data, status_code, headers
496
- end
497
-
498
- # Get Email Content
499
- # Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawMessage endpoint
500
- # @param email_id emailId
501
- # @param [Hash] opts the optional parameters
502
- # @return [Email]
503
- def get_email(email_id, opts = {})
504
- data, _status_code, _headers = get_email_with_http_info(email_id, opts)
505
- data
506
- end
507
-
508
- # Get Email Content
509
- # Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawMessage endpoint
510
- # @param email_id emailId
511
- # @param [Hash] opts the optional parameters
512
- # @return [Array<(Email, Fixnum, Hash)>] Email data, response status code and response headers
513
- def get_email_with_http_info(email_id, opts = {})
514
- if @api_client.config.debugging
515
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_email ...'
516
- end
517
- # verify the required parameter 'email_id' is set
518
- if @api_client.config.client_side_validation && email_id.nil?
519
- fail ArgumentError, "Missing the required parameter 'email_id' when calling ExtraOperationsApi.get_email"
520
- end
521
- # resource path
522
- local_var_path = '/emails/{emailId}'.sub('{' + 'emailId' + '}', email_id.to_s)
523
-
524
- # query parameters
525
- query_params = {}
526
-
527
- # header parameters
528
- header_params = {}
529
- # HTTP header 'Accept' (if needed)
530
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
531
-
532
- # form parameters
533
- form_params = {}
534
-
535
- # http body (model)
536
- post_body = nil
537
- auth_names = ['API_KEY']
538
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
539
- :header_params => header_params,
540
- :query_params => query_params,
541
- :form_params => form_params,
542
- :body => post_body,
543
- :auth_names => auth_names,
544
- :return_type => 'Email')
545
- if @api_client.config.debugging
546
- @api_client.config.logger.debug "API called: ExtraOperationsApi#get_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
547
- end
548
- return data, status_code, headers
549
- end
550
-
551
- # List Emails in an Inbox / EmailAddress
552
- # List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
553
- # @param inbox_id Id of inbox that emails belongs to
554
- # @param [Hash] opts the optional parameters
555
- # @option opts [Integer] :limit Limit the result set, ordered by descending received date time
556
- # @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
557
- # @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
558
- # @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
559
- # @return [Array<EmailPreview>]
560
- def get_emails(inbox_id, opts = {})
561
- data, _status_code, _headers = get_emails_with_http_info(inbox_id, opts)
562
- data
563
- end
564
-
565
- # List Emails in an Inbox / EmailAddress
566
- # List emails that an inbox has received. Only emails that are sent to the inbox&#39;s email address will appear in the inbox. It may take several seconds for any email you send to an inbox&#39;s email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the &#x60;minCount&#x60; parameter. The server will retry the inbox database until the &#x60;minCount&#x60; is satisfied or the &#x60;retryTimeout&#x60; is reached
567
- # @param inbox_id Id of inbox that emails belongs to
568
- # @param [Hash] opts the optional parameters
569
- # @option opts [Integer] :limit Limit the result set, ordered by descending received date time
570
- # @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
571
- # @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
572
- # @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
573
- # @return [Array<(Array<EmailPreview>, Fixnum, Hash)>] Array<EmailPreview> data, response status code and response headers
574
- def get_emails_with_http_info(inbox_id, opts = {})
575
- if @api_client.config.debugging
576
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_emails ...'
577
- end
578
- # verify the required parameter 'inbox_id' is set
579
- if @api_client.config.client_side_validation && inbox_id.nil?
580
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.get_emails"
581
- end
582
- # resource path
583
- local_var_path = '/inboxes/{inboxId}/emails'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
584
-
585
- # query parameters
586
- query_params = {}
587
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
588
- query_params[:'minCount'] = opts[:'min_count'] if !opts[:'min_count'].nil?
589
- query_params[:'retryTimeout'] = opts[:'retry_timeout'] if !opts[:'retry_timeout'].nil?
590
- query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
591
-
592
- # header parameters
593
- header_params = {}
594
- # HTTP header 'Accept' (if needed)
595
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
596
-
597
- # form parameters
598
- form_params = {}
599
-
600
- # http body (model)
601
- post_body = nil
602
- auth_names = ['API_KEY']
603
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
604
- :header_params => header_params,
605
- :query_params => query_params,
606
- :form_params => form_params,
607
- :body => post_body,
608
- :auth_names => auth_names,
609
- :return_type => 'Array<EmailPreview>')
610
- if @api_client.config.debugging
611
- @api_client.config.logger.debug "API called: ExtraOperationsApi#get_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
612
- end
613
- return data, status_code, headers
614
- end
615
-
616
- # Get Inbox / EmailAddress
617
- # Returns an inbox's properties, including its email address and ID.
618
- # @param inbox_id inboxId
619
- # @param [Hash] opts the optional parameters
620
- # @return [Inbox]
621
- def get_inbox(inbox_id, opts = {})
622
- data, _status_code, _headers = get_inbox_with_http_info(inbox_id, opts)
623
- data
624
- end
625
-
626
- # Get Inbox / EmailAddress
627
- # Returns an inbox&#39;s properties, including its email address and ID.
628
- # @param inbox_id inboxId
629
- # @param [Hash] opts the optional parameters
630
- # @return [Array<(Inbox, Fixnum, Hash)>] Inbox data, response status code and response headers
631
- def get_inbox_with_http_info(inbox_id, opts = {})
632
- if @api_client.config.debugging
633
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_inbox ...'
634
- end
635
- # verify the required parameter 'inbox_id' is set
636
- if @api_client.config.client_side_validation && inbox_id.nil?
637
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.get_inbox"
638
- end
639
- # resource path
640
- local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
641
-
642
- # query parameters
643
- query_params = {}
644
-
645
- # header parameters
646
- header_params = {}
647
- # HTTP header 'Accept' (if needed)
648
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
649
-
650
- # form parameters
651
- form_params = {}
652
-
653
- # http body (model)
654
- post_body = nil
655
- auth_names = ['API_KEY']
656
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
657
- :header_params => header_params,
658
- :query_params => query_params,
659
- :form_params => form_params,
660
- :body => post_body,
661
- :auth_names => auth_names,
662
- :return_type => 'Inbox')
663
- if @api_client.config.debugging
664
- @api_client.config.logger.debug "API called: ExtraOperationsApi#get_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
665
- end
666
- return data, status_code, headers
667
- end
668
-
669
- # List Inboxes / Email Addresses
670
- # List the inboxes you have created
671
- # @param [Hash] opts the optional parameters
672
- # @return [Array<Inbox>]
673
- def get_inboxes(opts = {})
674
- data, _status_code, _headers = get_inboxes_with_http_info(opts)
675
- data
676
- end
677
-
678
- # List Inboxes / Email Addresses
679
- # List the inboxes you have created
680
- # @param [Hash] opts the optional parameters
681
- # @return [Array<(Array<Inbox>, Fixnum, Hash)>] Array<Inbox> data, response status code and response headers
682
- def get_inboxes_with_http_info(opts = {})
683
- if @api_client.config.debugging
684
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_inboxes ...'
685
- end
686
- # resource path
687
- local_var_path = '/inboxes'
688
-
689
- # query parameters
690
- query_params = {}
691
-
692
- # header parameters
693
- header_params = {}
694
- # HTTP header 'Accept' (if needed)
695
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
696
-
697
- # form parameters
698
- form_params = {}
699
-
700
- # http body (model)
701
- post_body = nil
702
- auth_names = ['API_KEY']
703
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
704
- :header_params => header_params,
705
- :query_params => query_params,
706
- :form_params => form_params,
707
- :body => post_body,
708
- :auth_names => auth_names,
709
- :return_type => 'Array<Inbox>')
710
- if @api_client.config.debugging
711
- @api_client.config.logger.debug "API called: ExtraOperationsApi#get_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
712
- end
713
- return data, status_code, headers
714
- end
715
-
716
- # Get Raw Email Content
717
- # Returns a raw, unparsed and unprocessed email
718
- # @param email_id emailId
719
- # @param [Hash] opts the optional parameters
720
- # @return [String]
721
- def get_raw_email_contents(email_id, opts = {})
722
- data, _status_code, _headers = get_raw_email_contents_with_http_info(email_id, opts)
723
- data
724
- end
725
-
726
- # Get Raw Email Content
727
- # Returns a raw, unparsed and unprocessed email
728
- # @param email_id emailId
729
- # @param [Hash] opts the optional parameters
730
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
731
- def get_raw_email_contents_with_http_info(email_id, opts = {})
732
- if @api_client.config.debugging
733
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_raw_email_contents ...'
734
- end
735
- # verify the required parameter 'email_id' is set
736
- if @api_client.config.client_side_validation && email_id.nil?
737
- fail ArgumentError, "Missing the required parameter 'email_id' when calling ExtraOperationsApi.get_raw_email_contents"
738
- end
739
- # resource path
740
- local_var_path = '/emails/{emailId}/raw'.sub('{' + 'emailId' + '}', email_id.to_s)
741
-
742
- # query parameters
743
- query_params = {}
744
-
745
- # header parameters
746
- header_params = {}
747
- # HTTP header 'Accept' (if needed)
748
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
749
-
750
- # form parameters
751
- form_params = {}
752
-
753
- # http body (model)
754
- post_body = nil
755
- auth_names = ['API_KEY']
756
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
757
- :header_params => header_params,
758
- :query_params => query_params,
759
- :form_params => form_params,
760
- :body => post_body,
761
- :auth_names => auth_names,
762
- :return_type => 'String')
763
- if @api_client.config.debugging
764
- @api_client.config.logger.debug "API called: ExtraOperationsApi#get_raw_email_contents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
765
- end
766
- return data, status_code, headers
767
- end
768
-
769
- # Get all WebHooks for an Inbox
770
- # @param inbox_id inboxId
771
- # @param [Hash] opts the optional parameters
772
- # @return [Array<Webhook>]
773
- def get_webhooks(inbox_id, opts = {})
774
- data, _status_code, _headers = get_webhooks_with_http_info(inbox_id, opts)
775
- data
776
- end
777
-
778
- # Get all WebHooks for an Inbox
779
- # @param inbox_id inboxId
780
- # @param [Hash] opts the optional parameters
781
- # @return [Array<(Array<Webhook>, Fixnum, Hash)>] Array<Webhook> data, response status code and response headers
782
- def get_webhooks_with_http_info(inbox_id, opts = {})
783
- if @api_client.config.debugging
784
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.get_webhooks ...'
785
- end
786
- # verify the required parameter 'inbox_id' is set
787
- if @api_client.config.client_side_validation && inbox_id.nil?
788
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.get_webhooks"
789
- end
790
- # resource path
791
- local_var_path = '/inboxes/{inboxId}/webhooks'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
792
-
793
- # query parameters
794
- query_params = {}
795
-
796
- # header parameters
797
- header_params = {}
798
- # HTTP header 'Accept' (if needed)
799
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
800
-
801
- # form parameters
802
- form_params = {}
803
-
804
- # http body (model)
805
- post_body = nil
806
- auth_names = ['API_KEY']
807
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
808
- :header_params => header_params,
809
- :query_params => query_params,
810
- :form_params => form_params,
811
- :body => post_body,
812
- :auth_names => auth_names,
813
- :return_type => 'Array<Webhook>')
814
- if @api_client.config.debugging
815
- @api_client.config.logger.debug "API called: ExtraOperationsApi#get_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
816
- end
817
- return data, status_code, headers
818
- end
819
-
820
- # Send Email
821
- # Send an email from the inbox's email address. Specify the email recipients and contents in the request body. See the `SendEmailOptions` for more information. Note the `inboxId` refers to the inbox's id NOT its email address
822
- # @param inbox_id inboxId
823
- # @param send_email_options sendEmailOptions
824
- # @param [Hash] opts the optional parameters
825
- # @return [nil]
826
- def send_email(inbox_id, send_email_options, opts = {})
827
- send_email_with_http_info(inbox_id, send_email_options, opts)
828
- nil
829
- end
830
-
831
- # Send Email
832
- # Send an email from the inbox&#39;s email address. Specify the email recipients and contents in the request body. See the &#x60;SendEmailOptions&#x60; for more information. Note the &#x60;inboxId&#x60; refers to the inbox&#39;s id NOT its email address
833
- # @param inbox_id inboxId
834
- # @param send_email_options sendEmailOptions
835
- # @param [Hash] opts the optional parameters
836
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
837
- def send_email_with_http_info(inbox_id, send_email_options, opts = {})
838
- if @api_client.config.debugging
839
- @api_client.config.logger.debug 'Calling API: ExtraOperationsApi.send_email ...'
840
- end
841
- # verify the required parameter 'inbox_id' is set
842
- if @api_client.config.client_side_validation && inbox_id.nil?
843
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExtraOperationsApi.send_email"
844
- end
845
- # verify the required parameter 'send_email_options' is set
846
- if @api_client.config.client_side_validation && send_email_options.nil?
847
- fail ArgumentError, "Missing the required parameter 'send_email_options' when calling ExtraOperationsApi.send_email"
848
- end
849
- # resource path
850
- local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', inbox_id.to_s)
851
-
852
- # query parameters
853
- query_params = {}
854
-
855
- # header parameters
856
- header_params = {}
857
- # HTTP header 'Content-Type'
858
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
859
-
860
- # form parameters
861
- form_params = {}
862
-
863
- # http body (model)
864
- post_body = @api_client.object_to_http_body(send_email_options)
865
- auth_names = ['API_KEY']
866
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
867
- :header_params => header_params,
868
- :query_params => query_params,
869
- :form_params => form_params,
870
- :body => post_body,
871
- :auth_names => auth_names)
872
- if @api_client.config.debugging
873
- @api_client.config.logger.debug "API called: ExtraOperationsApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
874
- end
875
- return data, status_code, headers
876
- end
877
-
878
- end
879
- end