Class: MailSlurpClient::InboxControllerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/mailslurp_client/api/inbox_controller_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ InboxControllerApi

Returns a new instance of InboxControllerApi.



19
20
21
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#cancel_scheduled_job(job_id, opts = {}) ⇒ ScheduledJobDto

Cancel a scheduled email job Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete.

Parameters:

  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 27

def cancel_scheduled_job(job_id, opts = {})
  data, _status_code, _headers = cancel_scheduled_job_with_http_info(job_id, opts)
  data
end

#cancel_scheduled_job_with_http_info(job_id, opts = {}) ⇒ Array<(ScheduledJobDto, Integer, Hash)>

Cancel a scheduled email job Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete.

Parameters:

  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScheduledJobDto, Integer, Hash)>)

    ScheduledJobDto data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 37

def cancel_scheduled_job_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.cancel_scheduled_job ...'
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling InboxControllerApi.cancel_scheduled_job"
  end
  # resource path
  local_var_path = '/inboxes/scheduled-jobs/{jobId}'.sub('{' + 'jobId' + '}', CGI.escape(job_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'ScheduledJobDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#cancel_scheduled_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_inbox(opts = {}) ⇒ InboxDto

Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :email_address (String)

    A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as &#x60;123@mailslurp.com&#x60;. If you use the &#x60;useDomainPool&#x60; option when the email address is null it will generate an email address with a more varied domain ending such as &#x60;123@mailslurp.info&#x60; or &#x60;123@mailslurp.biz&#x60;. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so &#x60;SMTP&#x60; inboxes will only work with &#x60;SMTP&#x60; type domains. Avoid &#x60;SMTP&#x60; inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.

  • :tags (Array<String>)

    Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.

  • :name (String)

    Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.

  • :description (String)

    Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with

  • :use_domain_pool (Boolean)

    Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.world,info,xyz,…&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field. Note this feature is only available for &#x60;HTTP&#x60; inbox types.

  • :favourite (Boolean)

    Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering

  • :expires_at (DateTime)

    Optional inbox expiration date. If null then this inbox is permanent and the emails in it won&#39;t be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSXXX.

  • :expires_in (Integer)

    Number of milliseconds that inbox should exist for

  • :allow_team_access (Boolean)

    DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.

  • :inbox_type (String)

    HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at &#x60;mxslurp.click&#x60;.

  • :virtual_inbox (Boolean)

    Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending.

  • :use_short_address (Boolean)

    Use a shorter email address under 31 characters

  • :domain_id (String)

    ID of custom domain to use for email address.

  • :domain_name (String)

    FQDN domain name for the domain you have verified. Will be appended with a randomly assigned recipient name. Use the &#x60;emailAddress&#x60; option instead to specify the full custom inbox.

  • :prefix (String)

    Prefix to add before the email address for easier labelling or identification.

Returns:



103
104
105
106
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 103

def create_inbox(opts = {})
  data, _status_code, _headers = create_inbox_with_http_info(opts)
  data
end

#create_inbox_ruleset(inbox_id, create_inbox_ruleset_options, opts = {}) ⇒ InboxRulesetDto

Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Parameters:

  • inbox_id (String)

    inboxId

  • create_inbox_ruleset_options (CreateInboxRulesetOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



195
196
197
198
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 195

def create_inbox_ruleset(inbox_id, create_inbox_ruleset_options, opts = {})
  data, _status_code, _headers = create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts)
  data
end

#create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts = {}) ⇒ Array<(InboxRulesetDto, Integer, Hash)>

Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Parameters:

  • inbox_id (String)

    inboxId

  • create_inbox_ruleset_options (CreateInboxRulesetOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InboxRulesetDto, Integer, Hash)>)

    InboxRulesetDto data, response status code and response headers



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 206

def create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox_ruleset ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.create_inbox_ruleset"
  end
  # verify the required parameter 'create_inbox_ruleset_options' is set
  if @api_client.config.client_side_validation && create_inbox_ruleset_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_inbox_ruleset_options' when calling InboxControllerApi.create_inbox_ruleset"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/rulesets'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_ruleset_options) 

  # return_type
  return_type = opts[:return_type] || 'InboxRulesetDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#create_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_inbox_with_defaults(opts = {}) ⇒ InboxDto

Create an inbox with default options. Uses MailSlurp domain pool address and is private.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



262
263
264
265
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 262

def create_inbox_with_defaults(opts = {})
  data, _status_code, _headers = create_inbox_with_defaults_with_http_info(opts)
  data
end

#create_inbox_with_defaults_with_http_info(opts = {}) ⇒ Array<(InboxDto, Integer, Hash)>

Create an inbox with default options. Uses MailSlurp domain pool address and is private.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InboxDto, Integer, Hash)>)

    InboxDto data, response status code and response headers



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 270

def create_inbox_with_defaults_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox_with_defaults ...'
  end
  # resource path
  local_var_path = '/inboxes/withDefaults'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'InboxDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#create_inbox_with_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_inbox_with_http_info(opts = {}) ⇒ Array<(InboxDto, Integer, Hash)>

Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either &#x60;SMTP&#x60; or &#x60;HTTP&#x60; inboxes. Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :email_address (String)

    A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as &#x60;123@mailslurp.com&#x60;. If you use the &#x60;useDomainPool&#x60; option when the email address is null it will generate an email address with a more varied domain ending such as &#x60;123@mailslurp.info&#x60; or &#x60;123@mailslurp.biz&#x60;. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so &#x60;SMTP&#x60; inboxes will only work with &#x60;SMTP&#x60; type domains. Avoid &#x60;SMTP&#x60; inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.

  • :tags (Array<String>)

    Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.

  • :name (String)

    Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.

  • :description (String)

    Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with

  • :use_domain_pool (Boolean)

    Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.world,info,xyz,…&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field. Note this feature is only available for &#x60;HTTP&#x60; inbox types.

  • :favourite (Boolean)

    Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering

  • :expires_at (DateTime)

    Optional inbox expiration date. If null then this inbox is permanent and the emails in it won&#39;t be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSXXX.

  • :expires_in (Integer)

    Number of milliseconds that inbox should exist for

  • :allow_team_access (Boolean)

    DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.

  • :inbox_type (String)

    HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at &#x60;mxslurp.click&#x60;.

  • :virtual_inbox (Boolean)

    Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending.

  • :use_short_address (Boolean)

    Use a shorter email address under 31 characters

  • :domain_id (String)

    ID of custom domain to use for email address.

  • :domain_name (String)

    FQDN domain name for the domain you have verified. Will be appended with a randomly assigned recipient name. Use the &#x60;emailAddress&#x60; option instead to specify the full custom inbox.

  • :prefix (String)

    Prefix to add before the email address for easier labelling or identification.

Returns:

  • (Array<(InboxDto, Integer, Hash)>)

    InboxDto data, response status code and response headers



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 127

def create_inbox_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox ...'
  end
  allowable_values = ["HTTP_INBOX", "SMTP_INBOX"]
  if @api_client.config.client_side_validation && opts[:'inbox_type'] && !allowable_values.include?(opts[:'inbox_type'])
    fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'emailAddress'] = opts[:'email_address'] if !opts[:'email_address'].nil?
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil?
  query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
  query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
  query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
  query_params[:'allowTeamAccess'] = opts[:'allow_team_access'] if !opts[:'allow_team_access'].nil?
  query_params[:'inboxType'] = opts[:'inbox_type'] if !opts[:'inbox_type'].nil?
  query_params[:'virtualInbox'] = opts[:'virtual_inbox'] if !opts[:'virtual_inbox'].nil?
  query_params[:'useShortAddress'] = opts[:'use_short_address'] if !opts[:'use_short_address'].nil?
  query_params[:'domainId'] = opts[:'domain_id'] if !opts[:'domain_id'].nil?
  query_params[:'domainName'] = opts[:'domain_name'] if !opts[:'domain_name'].nil?
  query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'InboxDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#create_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_inbox_with_options(create_inbox_dto, opts = {}) ⇒ InboxDto

Create an inbox with options. Extended options for inbox creation. Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.

Parameters:

  • create_inbox_dto (CreateInboxDto)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



318
319
320
321
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 318

def create_inbox_with_options(create_inbox_dto, opts = {})
  data, _status_code, _headers = create_inbox_with_options_with_http_info(create_inbox_dto, opts)
  data
end

#create_inbox_with_options_with_http_info(create_inbox_dto, opts = {}) ⇒ Array<(InboxDto, Integer, Hash)>

Create an inbox with options. Extended options for inbox creation. Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.

Parameters:

  • create_inbox_dto (CreateInboxDto)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InboxDto, Integer, Hash)>)

    InboxDto data, response status code and response headers



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 328

def create_inbox_with_options_with_http_info(create_inbox_dto, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox_with_options ...'
  end
  # verify the required parameter 'create_inbox_dto' is set
  if @api_client.config.client_side_validation && create_inbox_dto.nil?
    fail ArgumentError, "Missing the required parameter 'create_inbox_dto' when calling InboxControllerApi.create_inbox_with_options"
  end
  # resource path
  local_var_path = '/inboxes/withOptions'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_dto) 

  # return_type
  return_type = opts[:return_type] || 'InboxDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#create_inbox_with_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_all_inbox_emails(inbox_id, opts = {}) ⇒ nil

Delete all emails in a given inboxes. Deletes all emails in an inbox. Be careful as emails cannot be recovered

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


382
383
384
385
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 382

def delete_all_inbox_emails(inbox_id, opts = {})
  delete_all_inbox_emails_with_http_info(inbox_id, opts)
  nil
end

#delete_all_inbox_emails_with_http_info(inbox_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete all emails in a given inboxes. Deletes all emails in an inbox. Be careful as emails cannot be recovered

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 392

def delete_all_inbox_emails_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.delete_all_inbox_emails ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.delete_all_inbox_emails"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/deleteAllInboxEmails'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#delete_all_inbox_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_all_inboxes(opts = {}) ⇒ nil

Delete all inboxes Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


441
442
443
444
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 441

def delete_all_inboxes(opts = {})
  delete_all_inboxes_with_http_info(opts)
  nil
end

#delete_all_inboxes_by_description(description, opts = {}) ⇒ nil

Delete inboxes by description Permanently delete all inboxes by description

Parameters:

  • description (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


496
497
498
499
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 496

def delete_all_inboxes_by_description(description, opts = {})
  delete_all_inboxes_by_description_with_http_info(description, opts)
  nil
end

#delete_all_inboxes_by_description_with_http_info(description, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete inboxes by description Permanently delete all inboxes by description

Parameters:

  • description (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 506

def delete_all_inboxes_by_description_with_http_info(description, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.delete_all_inboxes_by_description ...'
  end
  # verify the required parameter 'description' is set
  if @api_client.config.client_side_validation && description.nil?
    fail ArgumentError, "Missing the required parameter 'description' when calling InboxControllerApi.delete_all_inboxes_by_description"
  end
  if @api_client.config.client_side_validation && description.to_s.length < 1
    fail ArgumentError, 'invalid value for "description" when calling InboxControllerApi.delete_all_inboxes_by_description, the character length must be great than or equal to 1.'
  end

  # resource path
  local_var_path = '/inboxes/by-description'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'description'] = description

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#delete_all_inboxes_by_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_all_inboxes_by_name(name, opts = {}) ⇒ nil

Delete inboxes by name Permanently delete all inboxes by name

Parameters:

  • name (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


561
562
563
564
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 561

def delete_all_inboxes_by_name(name, opts = {})
  delete_all_inboxes_by_name_with_http_info(name, opts)
  nil
end

#delete_all_inboxes_by_name_with_http_info(name, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete inboxes by name Permanently delete all inboxes by name

Parameters:

  • name (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 571

def delete_all_inboxes_by_name_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.delete_all_inboxes_by_name ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling InboxControllerApi.delete_all_inboxes_by_name"
  end
  if @api_client.config.client_side_validation && name.to_s.length < 1
    fail ArgumentError, 'invalid value for "name" when calling InboxControllerApi.delete_all_inboxes_by_name, the character length must be great than or equal to 1.'
  end

  # resource path
  local_var_path = '/inboxes/by-name'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'name'] = name

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#delete_all_inboxes_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_all_inboxes_by_tag(tag, opts = {}) ⇒ nil

Delete inboxes by tag Permanently delete all inboxes by tag

Parameters:

  • tag (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


626
627
628
629
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 626

def delete_all_inboxes_by_tag(tag, opts = {})
  delete_all_inboxes_by_tag_with_http_info(tag, opts)
  nil
end

#delete_all_inboxes_by_tag_with_http_info(tag, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete inboxes by tag Permanently delete all inboxes by tag

Parameters:

  • tag (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 636

def delete_all_inboxes_by_tag_with_http_info(tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.delete_all_inboxes_by_tag ...'
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling InboxControllerApi.delete_all_inboxes_by_tag"
  end
  if @api_client.config.client_side_validation && tag.to_s.length < 1
    fail ArgumentError, 'invalid value for "tag" when calling InboxControllerApi.delete_all_inboxes_by_tag, the character length must be great than or equal to 1.'
  end

  # resource path
  local_var_path = '/inboxes/by-tag'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tag'] = tag

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#delete_all_inboxes_by_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_all_inboxes_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete all inboxes Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 450

def delete_all_inboxes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.delete_all_inboxes ...'
  end
  # resource path
  local_var_path = '/inboxes'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#delete_all_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_inbox(inbox_id, opts = {}) ⇒ nil

Delete inbox Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


691
692
693
694
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 691

def delete_inbox(inbox_id, opts = {})
  delete_inbox_with_http_info(inbox_id, opts)
  nil
end

#delete_inbox_with_http_info(inbox_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete inbox Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 701

def delete_inbox_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.delete_inbox ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.delete_inbox"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#delete_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#does_inbox_exist(email_address, opts = {}) ⇒ InboxExistsDto

Does inbox exist Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses

Parameters:

  • email_address (String)

    Email address

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :allow_catch_all (Boolean)

    Allow catch all

  • :ip_address (String)

    IP address

  • :sender (String)

    Sender

Returns:



754
755
756
757
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 754

def does_inbox_exist(email_address, opts = {})
  data, _status_code, _headers = does_inbox_exist_with_http_info(email_address, opts)
  data
end

#does_inbox_exist_with_http_info(email_address, opts = {}) ⇒ Array<(InboxExistsDto, Integer, Hash)>

Does inbox exist Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses

Parameters:

  • email_address (String)

    Email address

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :allow_catch_all (Boolean)

    Allow catch all

  • :ip_address (String)

    IP address

  • :sender (String)

    Sender

Returns:

  • (Array<(InboxExistsDto, Integer, Hash)>)

    InboxExistsDto data, response status code and response headers



767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 767

def does_inbox_exist_with_http_info(email_address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.does_inbox_exist ...'
  end
  # verify the required parameter 'email_address' is set
  if @api_client.config.client_side_validation && email_address.nil?
    fail ArgumentError, "Missing the required parameter 'email_address' when calling InboxControllerApi.does_inbox_exist"
  end
  # resource path
  local_var_path = '/inboxes/exists'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'emailAddress'] = email_address
  query_params[:'allowCatchAll'] = opts[:'allow_catch_all'] if !opts[:'allow_catch_all'].nil?
  query_params[:'ipAddress'] = opts[:'ip_address'] if !opts[:'ip_address'].nil?
  query_params[:'sender'] = opts[:'sender'] if !opts[:'sender'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'InboxExistsDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#does_inbox_exist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#does_inbox_have_automations(opts = {}) ⇒ nil

Does inbox have automations Check if an inbox has automations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


822
823
824
825
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 822

def does_inbox_have_automations(opts = {})
  does_inbox_have_automations_with_http_info(opts)
  nil
end

#does_inbox_have_automations_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Does inbox have automations Check if an inbox has automations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 831

def does_inbox_have_automations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.does_inbox_have_automations ...'
  end
  # resource path
  local_var_path = '/inboxes/automations'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#does_inbox_have_automations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#flush_expired(opts = {}) ⇒ FlushExpiredInboxesResult

Remove expired inboxes Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :before (DateTime)

    Optional expired at before flag to flush expired inboxes that have expired before the given time

Returns:



877
878
879
880
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 877

def flush_expired(opts = {})
  data, _status_code, _headers = flush_expired_with_http_info(opts)
  data
end

#flush_expired_with_http_info(opts = {}) ⇒ Array<(FlushExpiredInboxesResult, Integer, Hash)>

Remove expired inboxes Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :before (DateTime)

    Optional expired at before flag to flush expired inboxes that have expired before the given time

Returns:

  • (Array<(FlushExpiredInboxesResult, Integer, Hash)>)

    FlushExpiredInboxesResult data, response status code and response headers



887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 887

def flush_expired_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.flush_expired ...'
  end
  # resource path
  local_var_path = '/inboxes/expired'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'FlushExpiredInboxesResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#flush_expired\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_inboxes(opts = {}) ⇒ PageInboxProjection

List All Inboxes Paginated List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :favourite (Boolean)

    Optionally filter results for favourites only (default to false)

  • :search (String)

    Optionally filter by search words partial matching ID, tags, name, and email address

  • :tag (String)

    Optionally filter by tags. Will return inboxes that include given tags

  • :team_access (Boolean)

    DEPRECATED. Optionally filter by team access.

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

  • :inbox_type (String)

    Optional filter by inbox type

  • :inbox_function (String)

    Optional filter by inbox function

  • :domain_id (String)

    Optional domain ID filter

Returns:



947
948
949
950
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 947

def get_all_inboxes(opts = {})
  data, _status_code, _headers = get_all_inboxes_with_http_info(opts)
  data
end

#get_all_inboxes_offset_paginated(opts = {}) ⇒ PageInboxProjection

List All Inboxes Offset Paginated List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :favourite (Boolean)

    Optionally filter results for favourites only (default to false)

  • :search (String)

    Optionally filter by search words partial matching ID, tags, name, and email address

  • :tag (String)

    Optionally filter by tags. Will return inboxes that include given tags

  • :team_access (Boolean)

    DEPRECATED. Optionally filter by team access.

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

  • :inbox_type (String)

    Optional filter by inbox type

  • :inbox_function (String)

    Optional filter by inbox function

  • :domain_id (String)

    Optional domain ID filter

Returns:



1051
1052
1053
1054
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1051

def get_all_inboxes_offset_paginated(opts = {})
  data, _status_code, _headers = get_all_inboxes_offset_paginated_with_http_info(opts)
  data
end

#get_all_inboxes_offset_paginated_with_http_info(opts = {}) ⇒ Array<(PageInboxProjection, Integer, Hash)>

List All Inboxes Offset Paginated List inboxes in paginated form. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative &#x60;getInboxes&#x60; method returns a full list of inboxes but is limited to 100 results.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :favourite (Boolean)

    Optionally filter results for favourites only

  • :search (String)

    Optionally filter by search words partial matching ID, tags, name, and email address

  • :tag (String)

    Optionally filter by tags. Will return inboxes that include given tags

  • :team_access (Boolean)

    DEPRECATED. Optionally filter by team access.

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

  • :inbox_type (String)

    Optional filter by inbox type

  • :inbox_function (String)

    Optional filter by inbox function

  • :domain_id (String)

    Optional domain ID filter

Returns:

  • (Array<(PageInboxProjection, Integer, Hash)>)

    PageInboxProjection data, response status code and response headers



1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1072

def get_all_inboxes_offset_paginated_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_all_inboxes_offset_paginated ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  allowable_values = ["HTTP_INBOX", "SMTP_INBOX"]
  if @api_client.config.client_side_validation && opts[:'inbox_type'] && !allowable_values.include?(opts[:'inbox_type'])
    fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST", "OAUTH_CONNECTION_GMAIL"]
  if @api_client.config.client_side_validation && opts[:'inbox_function'] && !allowable_values.include?(opts[:'inbox_function'])
    fail ArgumentError, "invalid value for \"inbox_function\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/offset-paginated'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
  query_params[:'teamAccess'] = opts[:'team_access'] if !opts[:'team_access'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'inboxType'] = opts[:'inbox_type'] if !opts[:'inbox_type'].nil?
  query_params[:'inboxFunction'] = opts[:'inbox_function'] if !opts[:'inbox_function'].nil?
  query_params[:'domainId'] = opts[:'domain_id'] if !opts[:'domain_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageInboxProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_all_inboxes_offset_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_inboxes_with_http_info(opts = {}) ⇒ Array<(PageInboxProjection, Integer, Hash)>

List All Inboxes Paginated List inboxes in paginated form. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative &#x60;getInboxes&#x60; method returns a full list of inboxes but is limited to 100 results.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :favourite (Boolean)

    Optionally filter results for favourites only

  • :search (String)

    Optionally filter by search words partial matching ID, tags, name, and email address

  • :tag (String)

    Optionally filter by tags. Will return inboxes that include given tags

  • :team_access (Boolean)

    DEPRECATED. Optionally filter by team access.

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

  • :inbox_type (String)

    Optional filter by inbox type

  • :inbox_function (String)

    Optional filter by inbox function

  • :domain_id (String)

    Optional domain ID filter

Returns:

  • (Array<(PageInboxProjection, Integer, Hash)>)

    PageInboxProjection data, response status code and response headers



968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 968

def get_all_inboxes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_all_inboxes ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  allowable_values = ["HTTP_INBOX", "SMTP_INBOX"]
  if @api_client.config.client_side_validation && opts[:'inbox_type'] && !allowable_values.include?(opts[:'inbox_type'])
    fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST", "OAUTH_CONNECTION_GMAIL"]
  if @api_client.config.client_side_validation && opts[:'inbox_function'] && !allowable_values.include?(opts[:'inbox_function'])
    fail ArgumentError, "invalid value for \"inbox_function\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/paginated'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
  query_params[:'teamAccess'] = opts[:'team_access'] if !opts[:'team_access'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'inboxType'] = opts[:'inbox_type'] if !opts[:'inbox_type'].nil?
  query_params[:'inboxFunction'] = opts[:'inbox_function'] if !opts[:'inbox_function'].nil?
  query_params[:'domainId'] = opts[:'domain_id'] if !opts[:'domain_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageInboxProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_all_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_plus_addresses(opts = {}) ⇒ PagePlusAddressProjection

Get all sub address plus address aliases for an inbox Returns paginated list of all plus alias addresses found for in account based on received emails that used the inbox address with a +xyz alias.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :inbox_id (String)

    Optional inboxId filter

Returns:



1147
1148
1149
1150
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1147

def get_all_plus_addresses(opts = {})
  data, _status_code, _headers = get_all_plus_addresses_with_http_info(opts)
  data
end

#get_all_plus_addresses_with_http_info(opts = {}) ⇒ Array<(PagePlusAddressProjection, Integer, Hash)>

Get all sub address plus address aliases for an inbox Returns paginated list of all plus alias addresses found for in account based on received emails that used the inbox address with a +xyz alias.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :inbox_id (String)

    Optional inboxId filter

Returns:

  • (Array<(PagePlusAddressProjection, Integer, Hash)>)

    PagePlusAddressProjection data, response status code and response headers



1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1160

def get_all_plus_addresses_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_all_plus_addresses ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/plus-addresses'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PagePlusAddressProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_all_plus_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_scheduled_jobs(opts = {}) ⇒ PageScheduledJobs

Get all scheduled email sending jobs for account Schedule sending of emails using scheduled jobs. These can be inbox or account level.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in scheduled job list pagination (default to 0)

  • :size (Integer)

    Optional page size in scheduled job list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :inbox_id (String)

Returns:



1221
1222
1223
1224
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1221

def get_all_scheduled_jobs(opts = {})
  data, _status_code, _headers = get_all_scheduled_jobs_with_http_info(opts)
  data
end

#get_all_scheduled_jobs_with_http_info(opts = {}) ⇒ Array<(PageScheduledJobs, Integer, Hash)>

Get all scheduled email sending jobs for account Schedule sending of emails using scheduled jobs. These can be inbox or account level.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in scheduled job list pagination

  • :size (Integer)

    Optional page size in scheduled job list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

  • :inbox_id (String)

Returns:

  • (Array<(PageScheduledJobs, Integer, Hash)>)

    PageScheduledJobs data, response status code and response headers



1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1236

def get_all_scheduled_jobs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_all_scheduled_jobs ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/scheduled-jobs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageScheduledJobs' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_all_scheduled_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_delivery_statuses_by_inbox_id(inbox_id, opts = {}) ⇒ PageDeliveryStatus

Get all email delivery statuses for an inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in delivery status list pagination (default to 0)

  • :size (Integer)

    Optional page size in delivery status list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

Returns:



1298
1299
1300
1301
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1298

def get_delivery_statuses_by_inbox_id(inbox_id, opts = {})
  data, _status_code, _headers = get_delivery_statuses_by_inbox_id_with_http_info(inbox_id, opts)
  data
end

#get_delivery_statuses_by_inbox_id_with_http_info(inbox_id, opts = {}) ⇒ Array<(PageDeliveryStatus, Integer, Hash)>

Get all email delivery statuses for an inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in delivery status list pagination

  • :size (Integer)

    Optional page size in delivery status list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

Returns:

  • (Array<(PageDeliveryStatus, Integer, Hash)>)

    PageDeliveryStatus data, response status code and response headers



1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1312

def get_delivery_statuses_by_inbox_id_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_delivery_statuses_by_inbox_id ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_delivery_statuses_by_inbox_id"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/delivery-status'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageDeliveryStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_delivery_statuses_by_inbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_emails(inbox_id, opts = {}) ⇒ Array<EmailPreview>

Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. 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

Parameters:

  • inbox_id (String)

    Id of inbox that emails belongs to

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :size (Integer)

    Alias for limit. Assessed first before assessing any passed limit.

  • :limit (Integer)

    Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller

  • :sort (String)

    Sort the results by received date and direction ASC or DESC

  • :retry_timeout (Integer)

    Maximum milliseconds to spend retrying inbox database until minCount emails are returned

  • :delay_timeout (Integer)
  • :min_count (Integer)

    Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.

  • :unread_only (Boolean)
  • :before (DateTime)

    Exclude emails received after this ISO 8601 date time

  • :since (DateTime)

    Exclude emails received before this ISO 8601 date time

Returns:



1382
1383
1384
1385
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1382

def get_emails(inbox_id, opts = {})
  data, _status_code, _headers = get_emails_with_http_info(inbox_id, opts)
  data
end

#get_emails_with_http_info(inbox_id, opts = {}) ⇒ Array<(Array<EmailPreview>, Integer, Hash)>

Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. 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

Parameters:

  • inbox_id (String)

    Id of inbox that emails belongs to

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :size (Integer)

    Alias for limit. Assessed first before assessing any passed limit.

  • :limit (Integer)

    Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller

  • :sort (String)

    Sort the results by received date and direction ASC or DESC

  • :retry_timeout (Integer)

    Maximum milliseconds to spend retrying inbox database until minCount emails are returned

  • :delay_timeout (Integer)
  • :min_count (Integer)

    Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.

  • :unread_only (Boolean)
  • :before (DateTime)

    Exclude emails received after this ISO 8601 date time

  • :since (DateTime)

    Exclude emails received before this ISO 8601 date time

Returns:

  • (Array<(Array<EmailPreview>, Integer, Hash)>)

    Array<EmailPreview> data, response status code and response headers



1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1401

def get_emails_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_emails ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_emails"
  end
  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling InboxControllerApi.get_emails, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InboxControllerApi.get_emails, must be smaller than or equal to 100.'
  end

  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/emails'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'retryTimeout'] = opts[:'retry_timeout'] if !opts[:'retry_timeout'].nil?
  query_params[:'delayTimeout'] = opts[:'delay_timeout'] if !opts[:'delay_timeout'].nil?
  query_params[:'minCount'] = opts[:'min_count'] if !opts[:'min_count'].nil?
  query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Array<EmailPreview>' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_imap_access(opts = {}) ⇒ ImapAccessDetails

Get IMAP access usernames and passwords

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:



1473
1474
1475
1476
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1473

def get_imap_access(opts = {})
  data, _status_code, _headers = get_imap_access_with_http_info(opts)
  data
end

#get_imap_access_with_http_info(opts = {}) ⇒ Array<(ImapAccessDetails, Integer, Hash)>

Get IMAP access usernames and passwords

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:

  • (Array<(ImapAccessDetails, Integer, Hash)>)

    ImapAccessDetails data, response status code and response headers



1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1482

def get_imap_access_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_imap_access ...'
  end
  # resource path
  local_var_path = '/inboxes/imap-access'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'ImapAccessDetails' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_imap_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_imap_smtp_access(opts = {}) ⇒ ImapSmtpAccessDetails

Get IMAP and SMTP access usernames and passwords

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:



1530
1531
1532
1533
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1530

def get_imap_smtp_access(opts = {})
  data, _status_code, _headers = get_imap_smtp_access_with_http_info(opts)
  data
end

#get_imap_smtp_access_env(opts = {}) ⇒ String

Get IMAP and SMTP access details in .env format

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:

  • (String)


1587
1588
1589
1590
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1587

def get_imap_smtp_access_env(opts = {})
  data, _status_code, _headers = get_imap_smtp_access_env_with_http_info(opts)
  data
end

#get_imap_smtp_access_env_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>

Get IMAP and SMTP access details in .env format

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:

  • (Array<(String, Integer, Hash)>)

    String data, response status code and response headers



1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1596

def get_imap_smtp_access_env_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_imap_smtp_access_env ...'
  end
  # resource path
  local_var_path = '/inboxes/imap-smtp-access/env'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'String' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_imap_smtp_access_env\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_imap_smtp_access_servers(opts = {}) ⇒ ImapSmtpAccessServers

Get IMAP and SMTP server hosts

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1643
1644
1645
1646
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1643

def get_imap_smtp_access_servers(opts = {})
  data, _status_code, _headers = get_imap_smtp_access_servers_with_http_info(opts)
  data
end

#get_imap_smtp_access_servers_with_http_info(opts = {}) ⇒ Array<(ImapSmtpAccessServers, Integer, Hash)>

Get IMAP and SMTP server hosts

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ImapSmtpAccessServers, Integer, Hash)>)

    ImapSmtpAccessServers data, response status code and response headers



1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1651

def get_imap_smtp_access_servers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_imap_smtp_access_servers ...'
  end
  # resource path
  local_var_path = '/inboxes/imap-smtp-access/servers'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'ImapSmtpAccessServers' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_imap_smtp_access_servers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_imap_smtp_access_with_http_info(opts = {}) ⇒ Array<(ImapSmtpAccessDetails, Integer, Hash)>

Get IMAP and SMTP access usernames and passwords

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:

  • (Array<(ImapSmtpAccessDetails, Integer, Hash)>)

    ImapSmtpAccessDetails data, response status code and response headers



1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1539

def get_imap_smtp_access_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_imap_smtp_access ...'
  end
  # resource path
  local_var_path = '/inboxes/imap-smtp-access'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'ImapSmtpAccessDetails' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_imap_smtp_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox(inbox_id, opts = {}) ⇒ InboxDto

Get Inbox. Returns properties of an inbox. Returns an inbox's properties, including its email address and ID.

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1699
1700
1701
1702
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1699

def get_inbox(inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_with_http_info(inbox_id, opts)
  data
end

#get_inbox_by_email_address(email_address, opts = {}) ⇒ InboxByEmailAddressResult

Search for an inbox with the provided email address Get a inbox result by email address

Parameters:

  • email_address (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1761
1762
1763
1764
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1761

def get_inbox_by_email_address(email_address, opts = {})
  data, _status_code, _headers = get_inbox_by_email_address_with_http_info(email_address, opts)
  data
end

#get_inbox_by_email_address_with_http_info(email_address, opts = {}) ⇒ Array<(InboxByEmailAddressResult, Integer, Hash)>

Search for an inbox with the provided email address Get a inbox result by email address

Parameters:

  • email_address (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InboxByEmailAddressResult, Integer, Hash)>)

    InboxByEmailAddressResult data, response status code and response headers



1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1771

def get_inbox_by_email_address_with_http_info(email_address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_by_email_address ...'
  end
  # verify the required parameter 'email_address' is set
  if @api_client.config.client_side_validation && email_address.nil?
    fail ArgumentError, "Missing the required parameter 'email_address' when calling InboxControllerApi.get_inbox_by_email_address"
  end
  if @api_client.config.client_side_validation && email_address.to_s.length < 1
    fail ArgumentError, 'invalid value for "email_address" when calling InboxControllerApi.get_inbox_by_email_address, the character length must be great than or equal to 1.'
  end

  # resource path
  local_var_path = '/inboxes/byEmailAddress'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'emailAddress'] = email_address

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'InboxByEmailAddressResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_by_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_by_name(name, opts = {}) ⇒ InboxByNameResult

Search for an inbox with the given name Get a inbox result by name

Parameters:

  • name (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1828
1829
1830
1831
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1828

def get_inbox_by_name(name, opts = {})
  data, _status_code, _headers = get_inbox_by_name_with_http_info(name, opts)
  data
end

#get_inbox_by_name_with_http_info(name, opts = {}) ⇒ Array<(InboxByNameResult, Integer, Hash)>

Search for an inbox with the given name Get a inbox result by name

Parameters:

  • name (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InboxByNameResult, Integer, Hash)>)

    InboxByNameResult data, response status code and response headers



1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1838

def get_inbox_by_name_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_by_name ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling InboxControllerApi.get_inbox_by_name"
  end
  if @api_client.config.client_side_validation && name.to_s.length < 1
    fail ArgumentError, 'invalid value for "name" when calling InboxControllerApi.get_inbox_by_name, the character length must be great than or equal to 1.'
  end

  # resource path
  local_var_path = '/inboxes/byName'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'name'] = name

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'InboxByNameResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_count(opts = {}) ⇒ CountDto

Get total inbox count

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1893
1894
1895
1896
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1893

def get_inbox_count(opts = {})
  data, _status_code, _headers = get_inbox_count_with_http_info(opts)
  data
end

#get_inbox_count_with_http_info(opts = {}) ⇒ Array<(CountDto, Integer, Hash)>

Get total inbox count

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CountDto, Integer, Hash)>)

    CountDto data, response status code and response headers



1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1901

def get_inbox_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_count ...'
  end
  # resource path
  local_var_path = '/inboxes/count'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'CountDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_email_count(inbox_id, opts = {}) ⇒ CountDto

Get email count in inbox

Parameters:

  • inbox_id (String)

    Id of inbox that emails belongs to

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1948
1949
1950
1951
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1948

def get_inbox_email_count(inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_email_count_with_http_info(inbox_id, opts)
  data
end

#get_inbox_email_count_with_http_info(inbox_id, opts = {}) ⇒ Array<(CountDto, Integer, Hash)>

Get email count in inbox

Parameters:

  • inbox_id (String)

    Id of inbox that emails belongs to

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CountDto, Integer, Hash)>)

    CountDto data, response status code and response headers



1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1957

def get_inbox_email_count_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_email_count ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_email_count"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/emails/count'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'CountDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_email_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_emails_paginated(inbox_id, opts = {}) ⇒ PageEmailPreview

Get inbox emails paginated Get a paginated list of emails in an inbox. Does not hold connections open.

Parameters:

  • inbox_id (String)

    Id of inbox that emails belongs to

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox emails list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox emails list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :since (DateTime)

    Optional filter by received after given date time

  • :before (DateTime)

    Optional filter by received before given date time

  • :sync_connectors (Boolean)

    Sync connectors before fetching emails

Returns:



2015
2016
2017
2018
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2015

def get_inbox_emails_paginated(inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_emails_paginated_with_http_info(inbox_id, opts)
  data
end

#get_inbox_emails_paginated_with_http_info(inbox_id, opts = {}) ⇒ Array<(PageEmailPreview, Integer, Hash)>

Get inbox emails paginated Get a paginated list of emails in an inbox. Does not hold connections open.

Parameters:

  • inbox_id (String)

    Id of inbox that emails belongs to

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox emails list pagination

  • :size (Integer)

    Optional page size in inbox emails list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Optional filter by received after given date time

  • :before (DateTime)

    Optional filter by received before given date time

  • :sync_connectors (Boolean)

    Sync connectors before fetching emails

Returns:

  • (Array<(PageEmailPreview, Integer, Hash)>)

    PageEmailPreview data, response status code and response headers



2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2031

def get_inbox_emails_paginated_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_emails_paginated ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_emails_paginated"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/emails/paginated'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'syncConnectors'] = opts[:'sync_connectors'] if !opts[:'sync_connectors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageEmailPreview' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_emails_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_ids(opts = {}) ⇒ InboxIdsResult

Get all inbox IDs Get list of inbox IDs

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2092
2093
2094
2095
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2092

def get_inbox_ids(opts = {})
  data, _status_code, _headers = get_inbox_ids_with_http_info(opts)
  data
end

#get_inbox_ids_with_http_info(opts = {}) ⇒ Array<(InboxIdsResult, Integer, Hash)>

Get all inbox IDs Get list of inbox IDs

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InboxIdsResult, Integer, Hash)>)

    InboxIdsResult data, response status code and response headers



2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2101

def get_inbox_ids_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_ids ...'
  end
  # resource path
  local_var_path = '/inboxes/ids'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'InboxIdsResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_plus_address(plus_address_id, inbox_id, opts = {}) ⇒ PlusAddressDto

Get sub address plus address for an inbox Returns a plus address object based on emails that used the inbox address with a +xyz alias.

Parameters:

  • plus_address_id (String)

    ID of the plus address you want to fetch

  • inbox_id (String)

    ID of the inbox you want to fetch

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2150
2151
2152
2153
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2150

def get_inbox_plus_address(plus_address_id, inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_plus_address_with_http_info(plus_address_id, inbox_id, opts)
  data
end

#get_inbox_plus_address_by_id(plus_address_id, opts = {}) ⇒ PlusAddressDto

Get sub address plus address by ID Returns a plus address object based on emails that used the inbox address with a +xyz alias.

Parameters:

  • plus_address_id (String)

    ID of the plus address you want to fetch

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    ID of the inbox you want to filter for

Returns:



2218
2219
2220
2221
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2218

def get_inbox_plus_address_by_id(plus_address_id, opts = {})
  data, _status_code, _headers = get_inbox_plus_address_by_id_with_http_info(plus_address_id, opts)
  data
end

#get_inbox_plus_address_by_id_with_http_info(plus_address_id, opts = {}) ⇒ Array<(PlusAddressDto, Integer, Hash)>

Get sub address plus address by ID Returns a plus address object based on emails that used the inbox address with a +xyz alias.

Parameters:

  • plus_address_id (String)

    ID of the plus address you want to fetch

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    ID of the inbox you want to filter for

Returns:

  • (Array<(PlusAddressDto, Integer, Hash)>)

    PlusAddressDto data, response status code and response headers



2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2229

def get_inbox_plus_address_by_id_with_http_info(plus_address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_plus_address_by_id ...'
  end
  # verify the required parameter 'plus_address_id' is set
  if @api_client.config.client_side_validation && plus_address_id.nil?
    fail ArgumentError, "Missing the required parameter 'plus_address_id' when calling InboxControllerApi.get_inbox_plus_address_by_id"
  end
  # resource path
  local_var_path = '/inboxes/plus-addresses/{plusAddressId}'.sub('{' + 'plusAddressId' + '}', CGI.escape(plus_address_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PlusAddressDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_plus_address_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_plus_address_emails(plus_address, inbox_id, opts = {}) ⇒ PageEmailPreview

Get emails for a given inbox plus address Returns paginated list of all emails for a given plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.

Parameters:

  • plus_address (String)

    The plus address to fetch emails for. If your inbox address is &#x60;123@test.com&#x60; and the email was sent to &#x60;123+abc@test.com&#x60; then the plus address is &#x60;abc&#x60;

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:



2288
2289
2290
2291
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2288

def get_inbox_plus_address_emails(plus_address, inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_plus_address_emails_with_http_info(plus_address, inbox_id, opts)
  data
end

#get_inbox_plus_address_emails_for_plus_address_id(plus_address_id, inbox_id, opts = {}) ⇒ PageEmailPreview

Get emails for a given inbox plus address Returns paginated list of all emails for a given plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.

Parameters:

  • plus_address_id (String)

    The plus address ID to fetch emails for.

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:



2376
2377
2378
2379
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2376

def get_inbox_plus_address_emails_for_plus_address_id(plus_address_id, inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_plus_address_emails_for_plus_address_id_with_http_info(plus_address_id, inbox_id, opts)
  data
end

#get_inbox_plus_address_emails_for_plus_address_id_with_http_info(plus_address_id, inbox_id, opts = {}) ⇒ Array<(PageEmailPreview, Integer, Hash)>

Get emails for a given inbox plus address Returns paginated list of all emails for a given plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.

Parameters:

  • plus_address_id (String)

    The plus address ID to fetch emails for.

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:

  • (Array<(PageEmailPreview, Integer, Hash)>)

    PageEmailPreview data, response status code and response headers



2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2392

def get_inbox_plus_address_emails_for_plus_address_id_with_http_info(plus_address_id, inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_plus_address_emails_for_plus_address_id ...'
  end
  # verify the required parameter 'plus_address_id' is set
  if @api_client.config.client_side_validation && plus_address_id.nil?
    fail ArgumentError, "Missing the required parameter 'plus_address_id' when calling InboxControllerApi.get_inbox_plus_address_emails_for_plus_address_id"
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_plus_address_emails_for_plus_address_id"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/plus-addresses/{plusAddressId}/emails'.sub('{' + 'plusAddressId' + '}', CGI.escape(plus_address_id.to_s)).sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageEmailPreview' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_plus_address_emails_for_plus_address_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_plus_address_emails_with_http_info(plus_address, inbox_id, opts = {}) ⇒ Array<(PageEmailPreview, Integer, Hash)>

Get emails for a given inbox plus address Returns paginated list of all emails for a given plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.

Parameters:

  • plus_address (String)

    The plus address to fetch emails for. If your inbox address is &#x60;123@test.com&#x60; and the email was sent to &#x60;123+abc@test.com&#x60; then the plus address is &#x60;abc&#x60;

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:

  • (Array<(PageEmailPreview, Integer, Hash)>)

    PageEmailPreview data, response status code and response headers



2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2304

def get_inbox_plus_address_emails_with_http_info(plus_address, inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_plus_address_emails ...'
  end
  # verify the required parameter 'plus_address' is set
  if @api_client.config.client_side_validation && plus_address.nil?
    fail ArgumentError, "Missing the required parameter 'plus_address' when calling InboxControllerApi.get_inbox_plus_address_emails"
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_plus_address_emails"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/plus-addresses/emails'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'plusAddress'] = plus_address
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageEmailPreview' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_plus_address_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_plus_address_with_http_info(plus_address_id, inbox_id, opts = {}) ⇒ Array<(PlusAddressDto, Integer, Hash)>

Get sub address plus address for an inbox Returns a plus address object based on emails that used the inbox address with a +xyz alias.

Parameters:

  • plus_address_id (String)

    ID of the plus address you want to fetch

  • inbox_id (String)

    ID of the inbox you want to fetch

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PlusAddressDto, Integer, Hash)>)

    PlusAddressDto data, response status code and response headers



2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2161

def get_inbox_plus_address_with_http_info(plus_address_id, inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_plus_address ...'
  end
  # verify the required parameter 'plus_address_id' is set
  if @api_client.config.client_side_validation && plus_address_id.nil?
    fail ArgumentError, "Missing the required parameter 'plus_address_id' when calling InboxControllerApi.get_inbox_plus_address"
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_plus_address"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/plus-addresses/{plusAddressId}'.sub('{' + 'plusAddressId' + '}', CGI.escape(plus_address_id.to_s)).sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PlusAddressDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_plus_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_plus_addresses(inbox_id, opts = {}) ⇒ PagePlusAddressProjection

Get sub address plus address aliases for an inbox Returns paginated list of all plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

Returns:



2460
2461
2462
2463
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2460

def get_inbox_plus_addresses(inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_plus_addresses_with_http_info(inbox_id, opts)
  data
end

#get_inbox_plus_addresses_with_http_info(inbox_id, opts = {}) ⇒ Array<(PagePlusAddressProjection, Integer, Hash)>

Get sub address plus address aliases for an inbox Returns paginated list of all plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

Returns:

  • (Array<(PagePlusAddressProjection, Integer, Hash)>)

    PagePlusAddressProjection data, response status code and response headers



2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2473

def get_inbox_plus_addresses_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_plus_addresses ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_plus_addresses"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/plus-addresses'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PagePlusAddressProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_plus_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_sent_count(inbox_id, opts = {}) ⇒ CountDto

Get sent email count in inbox

Parameters:

  • inbox_id (String)

    Id of inbox that emails were sent from

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2531
2532
2533
2534
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2531

def get_inbox_sent_count(inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_sent_count_with_http_info(inbox_id, opts)
  data
end

#get_inbox_sent_count_with_http_info(inbox_id, opts = {}) ⇒ Array<(CountDto, Integer, Hash)>

Get sent email count in inbox

Parameters:

  • inbox_id (String)

    Id of inbox that emails were sent from

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CountDto, Integer, Hash)>)

    CountDto data, response status code and response headers



2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2540

def get_inbox_sent_count_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_sent_count ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_sent_count"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/sent/count'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'CountDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_sent_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_sent_emails(inbox_id, opts = {}) ⇒ PageSentEmailProjection

Get Inbox Sent Emails Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead.

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox sent email list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox sent email list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :search_filter (String)

    Optional sent email search

  • :since (DateTime)

    Optional filter by sent after given date time

  • :before (DateTime)

    Optional filter by sent before given date time

Returns:



2598
2599
2600
2601
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2598

def get_inbox_sent_emails(inbox_id, opts = {})
  data, _status_code, _headers = get_inbox_sent_emails_with_http_info(inbox_id, opts)
  data
end

#get_inbox_sent_emails_with_http_info(inbox_id, opts = {}) ⇒ Array<(PageSentEmailProjection, Integer, Hash)>

Get Inbox Sent Emails Returns an inbox&#39;s sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead.

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox sent email list pagination

  • :size (Integer)

    Optional page size in inbox sent email list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional sent email search

  • :since (DateTime)

    Optional filter by sent after given date time

  • :before (DateTime)

    Optional filter by sent before given date time

Returns:

  • (Array<(PageSentEmailProjection, Integer, Hash)>)

    PageSentEmailProjection data, response status code and response headers



2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2614

def get_inbox_sent_emails_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_sent_emails ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_sent_emails"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/sent'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageSentEmailProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_sent_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_tags(opts = {}) ⇒ Array<String>

Get inbox tags Get all inbox tags

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :search_filter (String)

    Optional search filter

Returns:

  • (Array<String>)


2679
2680
2681
2682
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2679

def get_inbox_tags(opts = {})
  data, _status_code, _headers = get_inbox_tags_with_http_info(opts)
  data
end

#get_inbox_tags_paginated(opts = {}) ⇒ PageInboxTags

Get inbox tags paginated Get all inbox tags paginated

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :search_filter (String)

    Optional search filter

Returns:



2751
2752
2753
2754
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2751

def get_inbox_tags_paginated(opts = {})
  data, _status_code, _headers = get_inbox_tags_paginated_with_http_info(opts)
  data
end

#get_inbox_tags_paginated_with_http_info(opts = {}) ⇒ Array<(PageInboxTags, Integer, Hash)>

Get inbox tags paginated Get all inbox tags paginated

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

Returns:

  • (Array<(PageInboxTags, Integer, Hash)>)

    PageInboxTags data, response status code and response headers



2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2764

def get_inbox_tags_paginated_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_tags_paginated ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/tags/paginated'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageInboxTags' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_tags_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_tags_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>

Get inbox tags Get all inbox tags

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

Returns:

  • (Array<(Array<String>, Integer, Hash)>)

    Array<String> data, response status code and response headers



2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2692

def get_inbox_tags_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_tags ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/tags'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Array<String>' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inbox_with_http_info(inbox_id, opts = {}) ⇒ Array<(InboxDto, Integer, Hash)>

Get Inbox. Returns properties of an inbox. Returns an inbox&#39;s properties, including its email address and ID.

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InboxDto, Integer, Hash)>)

    InboxDto data, response status code and response headers



1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 1709

def get_inbox_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'InboxDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inboxes(opts = {}) ⇒ Array<InboxDto>

List Inboxes and email addresses List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :size (Integer)

    Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated &#x60;getAllEmails&#x60; for larger queries. (default to 100)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :since (DateTime)

    Optional filter by created after given date time

  • :exclude_catch_all_inboxes (Boolean)

    Optional exclude catch all inboxes

  • :before (DateTime)

    Optional filter by created before given date time

  • :include (Array<String>)

    Optional inboxIds to include in result

Returns:



2825
2826
2827
2828
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2825

def get_inboxes(opts = {})
  data, _status_code, _headers = get_inboxes_with_http_info(opts)
  data
end

#get_inboxes_by_tag(tag, opts = {}) ⇒ PageInboxProjection

Get inboxes for a tag Get all inboxes for a given inbox tag

Parameters:

  • tag (String)

    Tag to filter by

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :search_filter (String)

    Optional search filter

Returns:



2906
2907
2908
2909
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2906

def get_inboxes_by_tag(tag, opts = {})
  data, _status_code, _headers = get_inboxes_by_tag_with_http_info(tag, opts)
  data
end

#get_inboxes_by_tag_with_http_info(tag, opts = {}) ⇒ Array<(PageInboxProjection, Integer, Hash)>

Get inboxes for a tag Get all inboxes for a given inbox tag

Parameters:

  • tag (String)

    Tag to filter by

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

Returns:

  • (Array<(PageInboxProjection, Integer, Hash)>)

    PageInboxProjection data, response status code and response headers



2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2920

def get_inboxes_by_tag_with_http_info(tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inboxes_by_tag ...'
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling InboxControllerApi.get_inboxes_by_tag"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/tags/inboxes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tag'] = tag
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageInboxProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inboxes_by_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_inboxes_with_http_info(opts = {}) ⇒ Array<(Array<InboxDto>, Integer, Hash)>

List Inboxes and email addresses List the inboxes you have created. Note use of the more advanced &#x60;getAllInboxes&#x60; is recommended and allows paginated access using a limit and sort parameter.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :size (Integer)

    Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated &#x60;getAllEmails&#x60; for larger queries.

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Optional filter by created after given date time

  • :exclude_catch_all_inboxes (Boolean)

    Optional exclude catch all inboxes

  • :before (DateTime)

    Optional filter by created before given date time

  • :include (Array<String>)

    Optional inboxIds to include in result

Returns:

  • (Array<(Array<InboxDto>, Integer, Hash)>)

    Array<InboxDto> data, response status code and response headers



2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2840

def get_inboxes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inboxes ...'
  end
  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling InboxControllerApi.get_inboxes, must be smaller than or equal to 100.'
  end

  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'excludeCatchAllInboxes'] = opts[:'exclude_catch_all_inboxes'] if !opts[:'exclude_catch_all_inboxes'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Array<InboxDto>' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_latest_email_in_inbox(inbox_id, timeout_millis, opts = {}) ⇒ Email

Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. Get the newest email in an inbox or wait for one to arrive

Parameters:

  • inbox_id (String)

    ID of the inbox you want to get the latest email from

  • timeout_millis (Integer)

    Timeout milliseconds to wait for latest email

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2982
2983
2984
2985
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2982

def get_latest_email_in_inbox(inbox_id, timeout_millis, opts = {})
  data, _status_code, _headers = get_latest_email_in_inbox_with_http_info(inbox_id, timeout_millis, opts)
  data
end

#get_latest_email_in_inbox_with_http_info(inbox_id, timeout_millis, opts = {}) ⇒ Array<(Email, Integer, Hash)>

Get latest email in an inbox. Use &#x60;WaitForController&#x60; to get emails that may not have arrived yet. Get the newest email in an inbox or wait for one to arrive

Parameters:

  • inbox_id (String)

    ID of the inbox you want to get the latest email from

  • timeout_millis (Integer)

    Timeout milliseconds to wait for latest email

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Email, Integer, Hash)>)

    Email data, response status code and response headers



2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 2993

def get_latest_email_in_inbox_with_http_info(inbox_id, timeout_millis, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_latest_email_in_inbox ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_latest_email_in_inbox"
  end
  # verify the required parameter 'timeout_millis' is set
  if @api_client.config.client_side_validation && timeout_millis.nil?
    fail ArgumentError, "Missing the required parameter 'timeout_millis' when calling InboxControllerApi.get_latest_email_in_inbox"
  end
  # resource path
  local_var_path = '/inboxes/getLatestEmail'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = inbox_id
  query_params[:'timeoutMillis'] = timeout_millis

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Email' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_latest_email_in_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_organization_inboxes(opts = {}) ⇒ PageOrganizationInboxProjection

List Organization Inboxes Paginated List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:



3056
3057
3058
3059
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3056

def get_organization_inboxes(opts = {})
  data, _status_code, _headers = get_organization_inboxes_with_http_info(opts)
  data
end

#get_organization_inboxes_with_http_info(opts = {}) ⇒ Array<(PageOrganizationInboxProjection, Integer, Hash)>

List Organization Inboxes Paginated List organization inboxes in paginated form. These are inboxes created with &#x60;allowTeamAccess&#x60; flag enabled. Organization inboxes are &#x60;readOnly&#x60; for non-admin users. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:



3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3071

def get_organization_inboxes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_organization_inboxes ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/organization'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageOrganizationInboxProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_organization_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_outboxes(opts = {}) ⇒ PageInboxProjection

List all inboxes with sent emails List inboxes that have sent emails

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination (default to 0)

  • :size (Integer)

    Optional page size in list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

Returns:



3131
3132
3133
3134
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3131

def get_outboxes(opts = {})
  data, _status_code, _headers = get_outboxes_with_http_info(opts)
  data
end

#get_outboxes_with_http_info(opts = {}) ⇒ Array<(PageInboxProjection, Integer, Hash)>

List all inboxes with sent emails List inboxes that have sent emails

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in list pagination

  • :size (Integer)

    Optional page size in list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

Returns:

  • (Array<(PageInboxProjection, Integer, Hash)>)

    PageInboxProjection data, response status code and response headers



3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3143

def get_outboxes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_outboxes ...'
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/outboxes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageInboxProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_outboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_scheduled_job(job_id, opts = {}) ⇒ ScheduledJobDto

Get a scheduled email job Get a scheduled email job details.

Parameters:

  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3198
3199
3200
3201
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3198

def get_scheduled_job(job_id, opts = {})
  data, _status_code, _headers = get_scheduled_job_with_http_info(job_id, opts)
  data
end

#get_scheduled_job_with_http_info(job_id, opts = {}) ⇒ Array<(ScheduledJobDto, Integer, Hash)>

Get a scheduled email job Get a scheduled email job details.

Parameters:

  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ScheduledJobDto, Integer, Hash)>)

    ScheduledJobDto data, response status code and response headers



3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3208

def get_scheduled_job_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_scheduled_job ...'
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling InboxControllerApi.get_scheduled_job"
  end
  # resource path
  local_var_path = '/inboxes/scheduled-jobs/{jobId}'.sub('{' + 'jobId' + '}', CGI.escape(job_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'ScheduledJobDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_scheduled_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_scheduled_jobs_by_inbox_id(inbox_id, opts = {}) ⇒ PageScheduledJobs

Get all scheduled email sending jobs for the inbox Schedule sending of emails using scheduled jobs.

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in scheduled job list pagination (default to 0)

  • :size (Integer)

    Optional page size in scheduled job list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

Returns:



3265
3266
3267
3268
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3265

def get_scheduled_jobs_by_inbox_id(inbox_id, opts = {})
  data, _status_code, _headers = get_scheduled_jobs_by_inbox_id_with_http_info(inbox_id, opts)
  data
end

#get_scheduled_jobs_by_inbox_id_with_http_info(inbox_id, opts = {}) ⇒ Array<(PageScheduledJobs, Integer, Hash)>

Get all scheduled email sending jobs for the inbox Schedule sending of emails using scheduled jobs.

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in scheduled job list pagination

  • :size (Integer)

    Optional page size in scheduled job list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :since (DateTime)

    Filter by created at after the given timestamp

  • :before (DateTime)

    Filter by created at before the given timestamp

Returns:

  • (Array<(PageScheduledJobs, Integer, Hash)>)

    PageScheduledJobs data, response status code and response headers



3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3280

def get_scheduled_jobs_by_inbox_id_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_scheduled_jobs_by_inbox_id ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_scheduled_jobs_by_inbox_id"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/scheduled-jobs'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageScheduledJobs' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_scheduled_jobs_by_inbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_smtp_access(opts = {}) ⇒ SmtpAccessDetails

Get SMTP access usernames and passwords

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:



3340
3341
3342
3343
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3340

def get_smtp_access(opts = {})
  data, _status_code, _headers = get_smtp_access_with_http_info(opts)
  data
end

#get_smtp_access_with_http_info(opts = {}) ⇒ Array<(SmtpAccessDetails, Integer, Hash)>

Get SMTP access usernames and passwords

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:

  • (Array<(SmtpAccessDetails, Integer, Hash)>)

    SmtpAccessDetails data, response status code and response headers



3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3349

def get_smtp_access_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_smtp_access ...'
  end
  # resource path
  local_var_path = '/inboxes/smtp-access'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SmtpAccessDetails' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#get_smtp_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#is_email_address_available(email_address, opts = {}) ⇒ EmailAvailableResult

Is email address available Returns whether an email address is available

Parameters:

  • email_address (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3398
3399
3400
3401
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3398

def is_email_address_available(email_address, opts = {})
  data, _status_code, _headers = is_email_address_available_with_http_info(email_address, opts)
  data
end

#is_email_address_available_with_http_info(email_address, opts = {}) ⇒ Array<(EmailAvailableResult, Integer, Hash)>

Is email address available Returns whether an email address is available

Parameters:

  • email_address (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(EmailAvailableResult, Integer, Hash)>)

    EmailAvailableResult data, response status code and response headers



3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3408

def is_email_address_available_with_http_info(email_address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.is_email_address_available ...'
  end
  # verify the required parameter 'email_address' is set
  if @api_client.config.client_side_validation && email_address.nil?
    fail ArgumentError, "Missing the required parameter 'email_address' when calling InboxControllerApi.is_email_address_available"
  end
  # resource path
  local_var_path = '/inboxes/available'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'emailAddress'] = email_address

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'EmailAvailableResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#is_email_address_available\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_inbox_rulesets(inbox_id, opts = {}) ⇒ PageInboxRulesetDto

List inbox rulesets List all rulesets attached to an inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox ruleset list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox ruleset list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:



3467
3468
3469
3470
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3467

def list_inbox_rulesets(inbox_id, opts = {})
  data, _status_code, _headers = list_inbox_rulesets_with_http_info(inbox_id, opts)
  data
end

#list_inbox_rulesets_with_http_info(inbox_id, opts = {}) ⇒ Array<(PageInboxRulesetDto, Integer, Hash)>

List inbox rulesets List all rulesets attached to an inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox ruleset list pagination

  • :size (Integer)

    Optional page size in inbox ruleset list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:

  • (Array<(PageInboxRulesetDto, Integer, Hash)>)

    PageInboxRulesetDto data, response status code and response headers



3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3483

def list_inbox_rulesets_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.list_inbox_rulesets ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.list_inbox_rulesets"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/rulesets'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageInboxRulesetDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#list_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_inbox_tracking_pixels(inbox_id, opts = {}) ⇒ PageTrackingPixelProjection

List inbox tracking pixels List all tracking pixels sent from an inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination (default to 0)

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination (default to 20)

  • :sort (String)

    Optional createdAt sort direction ASC or DESC (default to 'ASC')

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:



3551
3552
3553
3554
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3551

def list_inbox_tracking_pixels(inbox_id, opts = {})
  data, _status_code, _headers = list_inbox_tracking_pixels_with_http_info(inbox_id, opts)
  data
end

#list_inbox_tracking_pixels_with_http_info(inbox_id, opts = {}) ⇒ Array<(PageTrackingPixelProjection, Integer, Hash)>

List inbox tracking pixels List all tracking pixels sent from an inbox

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Optional page index in inbox tracking pixel list pagination

  • :size (Integer)

    Optional page size in inbox tracking pixel list pagination

  • :sort (String)

    Optional createdAt sort direction ASC or DESC

  • :search_filter (String)

    Optional search filter

  • :since (DateTime)

    Optional filter by created after given date time

  • :before (DateTime)

    Optional filter by created before given date time

Returns:

  • (Array<(PageTrackingPixelProjection, Integer, Hash)>)

    PageTrackingPixelProjection data, response status code and response headers



3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3567

def list_inbox_tracking_pixels_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.list_inbox_tracking_pixels ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.list_inbox_tracking_pixels"
  end
  allowable_values = ["ASC", "DESC"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/tracking-pixels'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PageTrackingPixelProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#list_inbox_tracking_pixels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_inboxes(search_inboxes_options, opts = {}) ⇒ PageInboxProjection

Search all inboxes and return matching inboxes Search inboxes and return in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.

Parameters:

  • search_inboxes_options (SearchInboxesOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3629
3630
3631
3632
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3629

def search_inboxes(search_inboxes_options, opts = {})
  data, _status_code, _headers = search_inboxes_with_http_info(search_inboxes_options, opts)
  data
end

#search_inboxes_with_http_info(search_inboxes_options, opts = {}) ⇒ Array<(PageInboxProjection, Integer, Hash)>

Search all inboxes and return matching inboxes Search inboxes and return in paginated form. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative &#x60;getInboxes&#x60; method returns a full list of inboxes but is limited to 100 results.

Parameters:

  • search_inboxes_options (SearchInboxesOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PageInboxProjection, Integer, Hash)>)

    PageInboxProjection data, response status code and response headers



3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3639

def search_inboxes_with_http_info(search_inboxes_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.search_inboxes ...'
  end
  # verify the required parameter 'search_inboxes_options' is set
  if @api_client.config.client_side_validation && search_inboxes_options.nil?
    fail ArgumentError, "Missing the required parameter 'search_inboxes_options' when calling InboxControllerApi.search_inboxes"
  end
  # resource path
  local_var_path = '/inboxes/search'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(search_inboxes_options) 

  # return_type
  return_type = opts[:return_type] || 'PageInboxProjection' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#search_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_email(inbox_id, send_email_options, opts = {}) ⇒ nil

Send Email Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


3694
3695
3696
3697
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3694

def send_email(inbox_id, send_email_options, opts = {})
  send_email_with_http_info(inbox_id, send_email_options, opts)
  nil
end

#send_email_and_confirm(inbox_id, send_email_options, opts = {}) ⇒ SentEmailDto

Send email and return sent confirmation Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3762
3763
3764
3765
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3762

def send_email_and_confirm(inbox_id, send_email_options, opts = {})
  data, _status_code, _headers = send_email_and_confirm_with_http_info(inbox_id, send_email_options, opts)
  data
end

#send_email_and_confirm_with_http_info(inbox_id, send_email_options, opts = {}) ⇒ Array<(SentEmailDto, Integer, Hash)>

Send email and return sent confirmation Sister method for standard &#x60;sendEmail&#x60; method with the benefit of returning a &#x60;SentEmail&#x60; entity confirming the successful sending of the email with a link to the sent object created for it.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SentEmailDto, Integer, Hash)>)

    SentEmailDto data, response status code and response headers



3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3773

def send_email_and_confirm_with_http_info(inbox_id, send_email_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_email_and_confirm ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_email_and_confirm"
  end
  # verify the required parameter 'send_email_options' is set
  if @api_client.config.client_side_validation && send_email_options.nil?
    fail ArgumentError, "Missing the required parameter 'send_email_options' when calling InboxControllerApi.send_email_and_confirm"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/confirm'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(send_email_options) 

  # return_type
  return_type = opts[:return_type] || 'SentEmailDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#send_email_and_confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_email_with_http_info(inbox_id, send_email_options, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Send Email Send an email from an inbox&#39;s email address. The request body should contain the &#x60;SendEmailOptions&#x60; that include recipients, attachments, body etc. See &#x60;SendEmailOptions&#x60; for all available properties. Note the &#x60;inboxId&#x60; refers to the inbox&#39;s id not the inbox&#39;s email address. See www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method &#x60;sendEmailAndConfirm&#x60;.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3705

def send_email_with_http_info(inbox_id, send_email_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_email ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_email"
  end
  # verify the required parameter 'send_email_options' is set
  if @api_client.config.client_side_validation && send_email_options.nil?
    fail ArgumentError, "Missing the required parameter 'send_email_options' when calling InboxControllerApi.send_email"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(send_email_options) 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_email_with_queue(inbox_id, validate_before_enqueue, send_email_options, opts = {}) ⇒ nil

Send email with queue Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • validate_before_enqueue (Boolean)

    Validate before adding to queue

  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


3833
3834
3835
3836
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3833

def send_email_with_queue(inbox_id, validate_before_enqueue, send_email_options, opts = {})
  send_email_with_queue_with_http_info(inbox_id, validate_before_enqueue, send_email_options, opts)
  nil
end

#send_email_with_queue_with_http_info(inbox_id, validate_before_enqueue, send_email_options, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Send email with queue Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • validate_before_enqueue (Boolean)

    Validate before adding to queue

  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3845

def send_email_with_queue_with_http_info(inbox_id, validate_before_enqueue, send_email_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_email_with_queue ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_email_with_queue"
  end
  # verify the required parameter 'validate_before_enqueue' is set
  if @api_client.config.client_side_validation && validate_before_enqueue.nil?
    fail ArgumentError, "Missing the required parameter 'validate_before_enqueue' when calling InboxControllerApi.send_email_with_queue"
  end
  # verify the required parameter 'send_email_options' is set
  if @api_client.config.client_side_validation && send_email_options.nil?
    fail ArgumentError, "Missing the required parameter 'send_email_options' when calling InboxControllerApi.send_email_with_queue"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/with-queue'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'validateBeforeEnqueue'] = validate_before_enqueue

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(send_email_options) 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#send_email_with_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_smtp_envelope(inbox_id, send_smtp_envelope_options, opts = {}) ⇒ SentEmailDto

Send email using an SMTP mail envelope and message body and return sent confirmation Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • send_smtp_envelope_options (SendSMTPEnvelopeOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3907
3908
3909
3910
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3907

def send_smtp_envelope(inbox_id, send_smtp_envelope_options, opts = {})
  data, _status_code, _headers = send_smtp_envelope_with_http_info(inbox_id, send_smtp_envelope_options, opts)
  data
end

#send_smtp_envelope_with_http_info(inbox_id, send_smtp_envelope_options, opts = {}) ⇒ Array<(SentEmailDto, Integer, Hash)>

Send email using an SMTP mail envelope and message body and return sent confirmation Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • send_smtp_envelope_options (SendSMTPEnvelopeOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SentEmailDto, Integer, Hash)>)

    SentEmailDto data, response status code and response headers



3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3918

def send_smtp_envelope_with_http_info(inbox_id, send_smtp_envelope_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_smtp_envelope ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_smtp_envelope"
  end
  # verify the required parameter 'send_smtp_envelope_options' is set
  if @api_client.config.client_side_validation && send_smtp_envelope_options.nil?
    fail ArgumentError, "Missing the required parameter 'send_smtp_envelope_options' when calling InboxControllerApi.send_smtp_envelope"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/smtp-envelope'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(send_smtp_envelope_options) 

  # return_type
  return_type = opts[:return_type] || 'SentEmailDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#send_smtp_envelope\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_test_email(inbox_id, opts = {}) ⇒ nil

Send a test email to inbox Send an inbox a test email to test email receiving is working

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


3976
3977
3978
3979
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3976

def send_test_email(inbox_id, opts = {})
  send_test_email_with_http_info(inbox_id, opts)
  nil
end

#send_test_email_with_http_info(inbox_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Send a test email to inbox Send an inbox a test email to test email receiving is working

Parameters:

  • inbox_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 3986

def send_test_email_with_http_info(inbox_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_test_email ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_test_email"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/send-test-email'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#send_test_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_with_schedule(inbox_id, send_email_options, opts = {}) ⇒ ScheduledJobDto

Send email with with delay or schedule Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :send_at_timestamp (DateTime)

    Sending timestamp

  • :send_at_now_plus_seconds (Integer)

    Send after n seconds

  • :validate_before_enqueue (Boolean)

    Validate before adding to queue

Returns:



4040
4041
4042
4043
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4040

def send_with_schedule(inbox_id, send_email_options, opts = {})
  data, _status_code, _headers = send_with_schedule_with_http_info(inbox_id, send_email_options, opts)
  data
end

#send_with_schedule_with_http_info(inbox_id, send_email_options, opts = {}) ⇒ Array<(ScheduledJobDto, Integer, Hash)>

Send email with with delay or schedule Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending.

Parameters:

  • inbox_id (String)

    ID of the inbox you want to send the email from

  • send_email_options (SendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :send_at_timestamp (DateTime)

    Sending timestamp

  • :send_at_now_plus_seconds (Integer)

    Send after n seconds

  • :validate_before_enqueue (Boolean)

    Validate before adding to queue

Returns:

  • (Array<(ScheduledJobDto, Integer, Hash)>)

    ScheduledJobDto data, response status code and response headers



4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4054

def send_with_schedule_with_http_info(inbox_id, send_email_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_with_schedule ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_with_schedule"
  end
  # verify the required parameter 'send_email_options' is set
  if @api_client.config.client_side_validation && send_email_options.nil?
    fail ArgumentError, "Missing the required parameter 'send_email_options' when calling InboxControllerApi.send_with_schedule"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/with-schedule'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'sendAtTimestamp'] = opts[:'send_at_timestamp'] if !opts[:'send_at_timestamp'].nil?
  query_params[:'sendAtNowPlusSeconds'] = opts[:'send_at_now_plus_seconds'] if !opts[:'send_at_now_plus_seconds'].nil?
  query_params[:'validateBeforeEnqueue'] = opts[:'validate_before_enqueue'] if !opts[:'validate_before_enqueue'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(send_email_options) 

  # return_type
  return_type = opts[:return_type] || 'ScheduledJobDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#send_with_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_inbox_favourited(inbox_id, set_inbox_favourited_options, opts = {}) ⇒ InboxDto

Set inbox favourited state Set and return new favorite state for an inbox

Parameters:

  • inbox_id (String)

    ID of inbox to set favourite state

  • set_inbox_favourited_options (SetInboxFavouritedOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4116
4117
4118
4119
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4116

def set_inbox_favourited(inbox_id, set_inbox_favourited_options, opts = {})
  data, _status_code, _headers = set_inbox_favourited_with_http_info(inbox_id, set_inbox_favourited_options, opts)
  data
end

#set_inbox_favourited_with_http_info(inbox_id, set_inbox_favourited_options, opts = {}) ⇒ Array<(InboxDto, Integer, Hash)>

Set inbox favourited state Set and return new favorite state for an inbox

Parameters:

  • inbox_id (String)

    ID of inbox to set favourite state

  • set_inbox_favourited_options (SetInboxFavouritedOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InboxDto, Integer, Hash)>)

    InboxDto data, response status code and response headers



4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4127

def set_inbox_favourited_with_http_info(inbox_id, set_inbox_favourited_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.set_inbox_favourited ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.set_inbox_favourited"
  end
  # verify the required parameter 'set_inbox_favourited_options' is set
  if @api_client.config.client_side_validation && set_inbox_favourited_options.nil?
    fail ArgumentError, "Missing the required parameter 'set_inbox_favourited_options' when calling InboxControllerApi.set_inbox_favourited"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}/favourite'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(set_inbox_favourited_options) 

  # return_type
  return_type = opts[:return_type] || 'InboxDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#set_inbox_favourited\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_imap_access(update_imap_access_options, opts = {}) ⇒ nil

Update IMAP access usernames and passwords

Parameters:

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:

  • (nil)


4185
4186
4187
4188
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4185

def update_imap_access(update_imap_access_options, opts = {})
  update_imap_access_with_http_info(update_imap_access_options, opts)
  nil
end

#update_imap_access_with_http_info(update_imap_access_options, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update IMAP access usernames and passwords

Parameters:

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4195

def update_imap_access_with_http_info(update_imap_access_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.update_imap_access ...'
  end
  # verify the required parameter 'update_imap_access_options' is set
  if @api_client.config.client_side_validation && update_imap_access_options.nil?
    fail ArgumentError, "Missing the required parameter 'update_imap_access_options' when calling InboxControllerApi.update_imap_access"
  end
  # resource path
  local_var_path = '/inboxes/imap-access'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(update_imap_access_options) 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#update_imap_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_inbox(inbox_id, update_inbox_options, opts = {}) ⇒ InboxDto

Update Inbox. Change name and description. Email address is not editable. Update editable fields on an inbox

Parameters:

  • inbox_id (String)
  • update_inbox_options (UpdateInboxOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4249
4250
4251
4252
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4249

def update_inbox(inbox_id, update_inbox_options, opts = {})
  data, _status_code, _headers = update_inbox_with_http_info(inbox_id, update_inbox_options, opts)
  data
end

#update_inbox_with_http_info(inbox_id, update_inbox_options, opts = {}) ⇒ Array<(InboxDto, Integer, Hash)>

Update Inbox. Change name and description. Email address is not editable. Update editable fields on an inbox

Parameters:

  • inbox_id (String)
  • update_inbox_options (UpdateInboxOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InboxDto, Integer, Hash)>)

    InboxDto data, response status code and response headers



4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4260

def update_inbox_with_http_info(inbox_id, update_inbox_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.update_inbox ...'
  end
  # verify the required parameter 'inbox_id' is set
  if @api_client.config.client_side_validation && inbox_id.nil?
    fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.update_inbox"
  end
  # verify the required parameter 'update_inbox_options' is set
  if @api_client.config.client_side_validation && update_inbox_options.nil?
    fail ArgumentError, "Missing the required parameter 'update_inbox_options' when calling InboxControllerApi.update_inbox"
  end
  # resource path
  local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(update_inbox_options) 

  # return_type
  return_type = opts[:return_type] || 'InboxDto' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#update_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_smtp_access(update_smtp_access_options, opts = {}) ⇒ nil

Update SMTP access usernames and passwords

Parameters:

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:

  • (nil)


4318
4319
4320
4321
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4318

def update_smtp_access(update_smtp_access_options, opts = {})
  update_smtp_access_with_http_info(update_smtp_access_options, opts)
  nil
end

#update_smtp_access_with_http_info(update_smtp_access_options, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update SMTP access usernames and passwords

Parameters:

Options Hash (opts):

  • :inbox_id (String)

    Inbox ID

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
# File 'lib/mailslurp_client/api/inbox_controller_api.rb', line 4328

def update_smtp_access_with_http_info(update_smtp_access_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InboxControllerApi.update_smtp_access ...'
  end
  # verify the required parameter 'update_smtp_access_options' is set
  if @api_client.config.client_side_validation && update_smtp_access_options.nil?
    fail ArgumentError, "Missing the required parameter 'update_smtp_access_options' when calling InboxControllerApi.update_smtp_access"
  end
  # resource path
  local_var_path = '/inboxes/smtp-access'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(update_smtp_access_options) 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InboxControllerApi#update_smtp_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end