mailslurp_client 14.0.3 → 15.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 941465ac119d1e37f7e180e657312f72f658caf95ed19f1a1c44d7a74cf591da
4
- data.tar.gz: 6dd25e870a6a373240112cf9e89d8bc8f09c172d441fa0ccd0a129ff4fef9259
3
+ metadata.gz: '0969d5bf6d66a9ff9bfe7a726942ff7978c6b635f476ddeaaca8faf0752d8fd5'
4
+ data.tar.gz: a1a1573765dd139e9230e922779973679eecce394f2c19a8607b582dcf6bd2ff
5
5
  SHA512:
6
- metadata.gz: 7e0b3334c4da4855c4158b78fb6b123863f648fb8800637da4d11e1f2e094f178ce39cae1b2f9b64bc38984881a4defccea6d121ff9bc967c207134442539c33
7
- data.tar.gz: 4a78ebcf9abb4169da3afd1983b468e3afdbb3f8ba5e3baba62a01f9b2c512922ce3411289bd15392f417e100cbd58e1d43e889a23e03d4e98ff3b9a2db14e10
6
+ metadata.gz: 07ca78d0c65d3574794c563703088c2151d6496ba06c7e0c373ee9721684a4183b33bc90a45f3321eeab249f58766efef2725ec22c3a539795eb0f98003243d8
7
+ data.tar.gz: 7c86a07f2486b16dcdc1c93133ac54dee5972a440fec4a3acdd6f41639bdf3fc102283c746ddbf70ccc48e170edcd34b6c3909ed7b48f1cee3a5e16f62bdea8b
data/README.md CHANGED
@@ -11,6 +11,7 @@ MailSlurp is an email API service that lets you create real email addresses in c
11
11
  - [Github Source](https://github.com/mailslurp/mailslurp-client-ruby)
12
12
 
13
13
  ### Common controllers
14
+
14
15
  - [Email controller](https://www.mailslurp.com/docs/ruby/docs/EmailControllerApi/) send and receive emails
15
16
  - [Inbox controller](https://www.mailslurp.com/docs/ruby/docs/InboxControllerApi/) create and manage email addresses
16
17
  - [WaitFor controller](https://www.mailslurp.com/docs/ruby/docs/WaitForControllerApi/) wait for expected emails to arrive
@@ -56,6 +57,7 @@ bundle install
56
57
  ```
57
58
 
58
59
  #### Libcurl requirements
60
+
59
61
  You may need to install `typhoeus` if you encounter libcurl errors.
60
62
 
61
63
 
@@ -98,6 +100,7 @@ end
98
100
  ```
99
101
 
100
102
  #### More options
103
+
101
104
  The `create_inbox` method has some limitations in the Ruby client. To create inboxes with more options use the alternative
102
105
  `create_inbox_with_options` method. (This uses a request body instead of query parameters.)
103
106
 
@@ -127,6 +130,7 @@ end
127
130
  ```
128
131
 
129
132
  #### Inbox types
133
+
130
134
  Inboxes can be either `SMTP` or `HTTP` type. Set the inbox type using the `inboxType` property. SMTP inboxes are handled by a custom mailserver and support a wide range of clients while HTTP inboxes use Amazon SES and don't support some older clients like Outlook. SMTP inboxes are recommended for public facing email addresses while HTTP inboxes are best for application testing. Please see the guide on [types of inboxes](https://www.mailslurp.com/guides/smtp-vs-http-email-inboxes/) for more information.
131
135
 
132
136
  ### List inboxes
@@ -191,7 +195,9 @@ opts = {
191
195
  }
192
196
  inbox_controller.send_email(inbox_1.id, opts)
193
197
  ```
198
+
194
199
  ### Receive emails
200
+
195
201
  To read already existing emails use the [Email Controller](https://www.mailslurp.com/docs/ruby/docs/EmailControllerApi/). To wait for expected emails to arrive use the [WaitFor Controller](https://www.mailslurp.com/docs/ruby/docs/WaitForControllerApi/).
196
202
  You can use MailSlurp to wait for at least 1 unread email in an inbox and return it.
197
203
  If a timeout is exceeded it will throw an error instead:
@@ -206,6 +212,7 @@ expect(email.body).to include("Your email body")
206
212
  ```
207
213
 
208
214
  ### Extract email content
215
+
209
216
  To parse an email and extract content use regex patterns like so:
210
217
 
211
218
  ```ruby
@@ -276,6 +283,7 @@ inbox_controller.send_email(inbox_1.id, opts)
276
283
  ```
277
284
 
278
285
  #### Download received attachments
286
+
279
287
  ```ruby
280
288
  # wait for the email to arrive (or fetch directly using email controller if you know it is there)
281
289
  wait_opts = {
@@ -24,11 +24,11 @@ module MailSlurpClient
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [Boolean] :allow_team_access 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.
26
26
  # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
27
- # @option opts [String] :email_address 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 `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. 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 `SMTP` inboxes will only work with `SMTP` type domains. 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.
27
+ # @option opts [String] :email_address 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 `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. 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 `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` 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.
28
28
  # @option opts [DateTime] :expires_at Optional inbox expiration date. If null then this inbox is permanent and the emails in it won'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'T'HH:mm:ss.SSSXXX.
29
29
  # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
30
30
  # @option opts [Boolean] :favourite Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering
31
- # @option opts [String] :inbox_type HTTP (default) or SMTP inbox type. HTTP inboxes are best for testing while SMTP inboxes are more reliable for public inbound email consumption. 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 `mx.mailslurp.com`.
31
+ # @option opts [String] :inbox_type 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 `mx.mailslurp.com`.
32
32
  # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.
33
33
  # @option opts [Array<String>] :tags 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.
34
34
  # @option opts [Boolean] :use_domain_pool 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.
@@ -43,11 +43,11 @@ module MailSlurpClient
43
43
  # @param [Hash] opts the optional parameters
44
44
  # @option opts [Boolean] :allow_team_access 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.
45
45
  # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
46
- # @option opts [String] :email_address 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. 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.
46
+ # @option opts [String] :email_address 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.
47
47
  # @option opts [DateTime] :expires_at 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.
48
48
  # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
49
49
  # @option opts [Boolean] :favourite Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering
50
- # @option opts [String] :inbox_type HTTP (default) or SMTP inbox type. HTTP inboxes are best for testing while SMTP inboxes are more reliable for public inbound email consumption. 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;mx.mailslurp.com&#x60;.
50
+ # @option opts [String] :inbox_type 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;mx.mailslurp.com&#x60;.
51
51
  # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.
52
52
  # @option opts [Array<String>] :tags 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.
53
53
  # @option opts [Boolean] :use_domain_pool 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.
@@ -411,6 +411,69 @@ module MailSlurpClient
411
411
  return data, status_code, headers
412
412
  end
413
413
 
414
+ # Does inbox exist
415
+ # Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses
416
+ # @param email_address [String] Email address
417
+ # @param [Hash] opts the optional parameters
418
+ # @return [InboxExistsDto]
419
+ def does_inbox_exist(email_address, opts = {})
420
+ data, _status_code, _headers = does_inbox_exist_with_http_info(email_address, opts)
421
+ data
422
+ end
423
+
424
+ # Does inbox exist
425
+ # Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses
426
+ # @param email_address [String] Email address
427
+ # @param [Hash] opts the optional parameters
428
+ # @return [Array<(InboxExistsDto, Integer, Hash)>] InboxExistsDto data, response status code and response headers
429
+ def does_inbox_exist_with_http_info(email_address, opts = {})
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.does_inbox_exist ...'
432
+ end
433
+ # verify the required parameter 'email_address' is set
434
+ if @api_client.config.client_side_validation && email_address.nil?
435
+ fail ArgumentError, "Missing the required parameter 'email_address' when calling InboxControllerApi.does_inbox_exist"
436
+ end
437
+ # resource path
438
+ local_var_path = '/inboxes/exists'
439
+
440
+ # query parameters
441
+ query_params = opts[:query_params] || {}
442
+ query_params[:'emailAddress'] = email_address
443
+
444
+ # header parameters
445
+ header_params = opts[:header_params] || {}
446
+ # HTTP header 'Accept' (if needed)
447
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
448
+
449
+ # form parameters
450
+ form_params = opts[:form_params] || {}
451
+
452
+ # http body (model)
453
+ post_body = opts[:body]
454
+
455
+ # return_type
456
+ return_type = opts[:return_type] || 'InboxExistsDto'
457
+
458
+ # auth_names
459
+ auth_names = opts[:auth_names] || ['API_KEY']
460
+
461
+ new_options = opts.merge(
462
+ :header_params => header_params,
463
+ :query_params => query_params,
464
+ :form_params => form_params,
465
+ :body => post_body,
466
+ :auth_names => auth_names,
467
+ :return_type => return_type
468
+ )
469
+
470
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
471
+ if @api_client.config.debugging
472
+ @api_client.config.logger.debug "API called: InboxControllerApi#does_inbox_exist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
473
+ end
474
+ return data, status_code, headers
475
+ end
476
+
414
477
  # Remove expired inboxes
415
478
  # Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)
416
479
  # @param [Hash] opts the optional parameters
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. Inboxes are either `SMTP` or `HTTP` mailboxes. Use `SMTP` for public facing mailboxes and `HTTP` for test email accounts. `SMTP` inboxes are processed by a mail server running at `mx.mailslurp.com` while `HTTP` inboxes are processed by AWS SES. Inboxes can use a custom email address (by verifying your own domain) or a randomly assigned email ending in either `mailslurp.com` or (if `useDomainPool` is enabled) ending in a similar domain such as `mailslurp.xyz` (selected at random).
16
+ # Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. Inboxes are either `SMTP` or `HTTP` mailboxes. `SMTP` inboxes are receive only and processed by a mail server running at `mx.mailslurp.com` while `HTTP` inboxes can send and receive and are processed by AWS SES. Inboxes can use a custom email address (by verifying your own domain) or a randomly assigned email ending in either `mailslurp.com` or (if `useDomainPool` is enabled) ending in a similar domain such as `mailslurp.xyz` (selected at random).
17
17
  class CreateInboxDto
18
18
  # 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.
19
19
  attr_accessor :allow_team_access
@@ -21,7 +21,7 @@ module MailSlurpClient
21
21
  # Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
22
22
  attr_accessor :description
23
23
 
24
- # 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 `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. 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 `SMTP` inboxes will only work with `SMTP` type domains. 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.
24
+ # 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 `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. 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 `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` 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.
25
25
  attr_accessor :email_address
26
26
 
27
27
  # Optional inbox expiration date. If null then this inbox is permanent and the emails in it won'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'T'HH:mm:ss.SSSXXX.
@@ -33,7 +33,7 @@ module MailSlurpClient
33
33
  # Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering
34
34
  attr_accessor :favourite
35
35
 
36
- # HTTP (default) or SMTP inbox type. HTTP inboxes are best for testing while SMTP inboxes are more reliable for public inbound email consumption. 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 `mx.mailslurp.com`.
36
+ # 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 `mx.mailslurp.com`.
37
37
  attr_accessor :inbox_type
38
38
 
39
39
  # Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Representation of a MailSlurp inbox. An inbox has an ID and a real email address. Emails can be sent to or from this email address. Inboxes are either `SMTP` or `HTTP` mailboxes. The default, `HTTP` inboxes, use AWS SES to process emails and are best suited as test email accounts. `SMTP` inboxes use a custom mail server at `mx.mailslurp.com` and are best used for public facing email addresses. Use the `EmailController` or the `InboxController` methods to send and receive emails and attachments. Inboxes may have a description, name, and tags for display purposes. You can also favourite an inbox for easier searching. Inboxes can be private or allow team access. Team access enabled inboxes can be seen by other members of an organization.
16
+ # Representation of a MailSlurp inbox. An inbox has an ID and a real email address. Emails can be sent to or from this email address. Inboxes are either `SMTP` or `HTTP` mailboxes. The default, `HTTP` inboxes, use AWS SES to process emails and are best suited as test email accounts. `SMTP` inboxes use a custom mail server at `mx.mailslurp.com` and can only receive emails - they are best used for public facing email addresses. Use the `EmailController` or the `InboxController` methods to send and receive emails and attachments. Inboxes may have a description, name, and tags for display purposes. You can also favourite an inbox for easier searching. Inboxes can be private or allow team access. Team access enabled inboxes can be seen by other members of an organization.
17
17
  class Inbox
18
18
  # When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`.
19
19
  attr_accessor :created_at
@@ -33,7 +33,7 @@ module MailSlurpClient
33
33
  # ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically.
34
34
  attr_accessor :id
35
35
 
36
- # Type of inbox - either HTTP (default) or SMTP. HTTP inboxes are great for testing. SMTP inboxes are processed by a custom SMTP mail server and are better for public facing inboxes that receive emails from Gmail and other large providers. If using a custom domain the domain type must match the inbox type. Use an SMTP domain for SMTP inboxes that includes an MX record pointing to `10 mx.mailslurp.com` for inbound messages.
36
+ # Type of inbox - either HTTP (default) or SMTP. HTTP inboxes are great most cases. SMTP inboxes are receive only (cannot send) and are processed by a custom SMTP mail server and are better for public facing inboxes that receive emails from Gmail and other large providers. If using a custom domain the domain type must match the inbox type. Use an SMTP domain for SMTP inboxes that includes an MX record pointing to `10 mx.mailslurp.com` for inbound messages.
37
37
  attr_accessor :inbox_type
38
38
 
39
39
  # Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
@@ -0,0 +1,211 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MailSlurpClient
16
+ class InboxExistsDto
17
+ attr_accessor :exists
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'exists' => :'exists'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'exists' => :'Boolean'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InboxExistsDto` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InboxExistsDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'exists')
55
+ self.exists = attributes[:'exists']
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ if @exists.nil?
64
+ invalid_properties.push('invalid value for "exists", exists cannot be nil.')
65
+ end
66
+
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ return false if @exists.nil?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ exists == o.exists
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [exists].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def self.build_from_hash(attributes)
101
+ new.build_from_hash(attributes)
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.openapi_types.each_pair do |key, type|
110
+ if type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ MailSlurpClient.const_get(type).build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ if value.nil?
184
+ is_nullable = self.class.openapi_nullable.include?(attr)
185
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
+ end
187
+
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ # Outputs non-array value in the form of hash
194
+ # For object, use to_hash. Otherwise, just return the value
195
+ # @param [Object] value Any valid value
196
+ # @return [Hash] Returns the value in the form of hash
197
+ def _to_hash(value)
198
+ if value.is_a?(Array)
199
+ value.compact.map { |v| _to_hash(v) }
200
+ elsif value.is_a?(Hash)
201
+ {}.tap do |hash|
202
+ value.each { |k, v| hash[k] = _to_hash(v) }
203
+ end
204
+ elsif value.respond_to? :to_hash
205
+ value.to_hash
206
+ else
207
+ value
208
+ end
209
+ end
210
+ end
211
+ end
@@ -29,7 +29,7 @@ module MailSlurpClient
29
29
  # ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically.
30
30
  attr_accessor :id
31
31
 
32
- # Type of inbox - either HTTP (default) or SMTP. HTTP inboxes are great for testing. SMTP inboxes are processed by a custom SMTP mail server and are better for public facing inboxes that receive emails from Gmail and other large providers. If using a custom domain the domain type must match the inbox type. Use an SMTP domain for SMTP inboxes that includes an MX record pointing to `10 mx.mailslurp.com` for inbound messages.
32
+ # Type of inbox - either HTTP (default) or SMTP. HTTP inboxes are great most cases. SMTP inboxes are receive only (cannot send) and are processed by a custom SMTP mail server and are better for public facing inboxes that receive emails from Gmail and other large providers. If using a custom domain the domain type must match the inbox type. Use an SMTP domain for SMTP inboxes that includes an MX record pointing to `10 mx.mailslurp.com` for inbound messages.
33
33
  attr_accessor :inbox_type
34
34
 
35
35
  # Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
@@ -26,7 +26,7 @@ module MailSlurpClient
26
26
  # ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically.
27
27
  attr_accessor :id
28
28
 
29
- # Type of inbox - either HTTP (default) or SMTP. HTTP inboxes are great for testing. SMTP inboxes are processed by a custom SMTP mail server and are better for public facing inboxes that receive emails from Gmail and other large providers. If using a custom domain the domain type must match the inbox type. Use an SMTP domain for SMTP inboxes that includes an MX record pointing to `10 mx.mailslurp.com` for inbound messages.
29
+ # Type of inbox - either HTTP (default) or SMTP. HTTP inboxes are great most cases. SMTP inboxes are receive only (cannot send) and are processed by a custom SMTP mail server and are better for public facing inboxes that receive emails from Gmail and other large providers. If using a custom domain the domain type must match the inbox type. Use an SMTP domain for SMTP inboxes that includes an MX record pointing to `10 mx.mailslurp.com` for inbound messages.
30
30
  attr_accessor :inbox_type
31
31
 
32
32
  # Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '14.0.3'
14
+ VERSION = '15.0.1'
15
15
  end
@@ -75,6 +75,7 @@ require 'mailslurp_client/models/group_projection'
75
75
  require 'mailslurp_client/models/html_validation_result'
76
76
  require 'mailslurp_client/models/ip_address_result'
77
77
  require 'mailslurp_client/models/inbox'
78
+ require 'mailslurp_client/models/inbox_exists_dto'
78
79
  require 'mailslurp_client/models/inbox_forwarder_dto'
79
80
  require 'mailslurp_client/models/inbox_forwarder_test_options'
80
81
  require 'mailslurp_client/models/inbox_forwarder_test_result'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailslurp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.0.3
4
+ version: 15.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-05 00:00:00.000000000 Z
11
+ date: 2021-10-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Create emails addresses in Ruby then send and receive real emails and
14
14
  attachments. See https://www.mailslurp.com/docs/ruby/ for full Ruby documentation.
@@ -105,6 +105,7 @@ files:
105
105
  - lib/mailslurp_client/models/group_projection.rb
106
106
  - lib/mailslurp_client/models/html_validation_result.rb
107
107
  - lib/mailslurp_client/models/inbox.rb
108
+ - lib/mailslurp_client/models/inbox_exists_dto.rb
108
109
  - lib/mailslurp_client/models/inbox_forwarder_dto.rb
109
110
  - lib/mailslurp_client/models/inbox_forwarder_test_options.rb
110
111
  - lib/mailslurp_client/models/inbox_forwarder_test_result.rb