mailslurp_client 14.0.6 → 15.0.3

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: 67e68d10ad1abebea838d3a57c4d7e3b7768c3742841b5829549159812bd0303
4
- data.tar.gz: d320cf4e7582412bdbf6b1b89180dd4b2fe6978b8db14843538e8bab3dab9682
3
+ metadata.gz: e319264e2d85a835795d2c0668a860c47dbad08872e04ead5cee71e2d2a05b22
4
+ data.tar.gz: a09f16eb8503cf150e5106127a4442dbb1644a9873a48a39da9b2bd14b889909
5
5
  SHA512:
6
- metadata.gz: a742467215d2dec46d8d723b9524369e2ef1df06dfbfc159d76b1679d0ccf5235632fea74b8bdf416b0802edd7f0adf737514409dbc1397c36799245b5402219
7
- data.tar.gz: 04a89f423eecdc5bce45deaca139b6af45ea4bb97ec03605e300527b8799afccc1766b31e291d221b7660afca453c12dc7d3777acf39cfa65a84ad28ce72fc20
6
+ metadata.gz: f4f7018df7072061f8b4c0bcfbc3b88fe495f0d0d33faa9c2d2d32b613398d811c9295b585c93bbf3d1cfca47d3de2914bddc4dba6ff904ef8607e23bbff1ba9
7
+ data.tar.gz: 75e2f5d62f2921dbe17e03dd4e23f735e5c4d5bbf4f238f987c1bf6a991f07e7c5303ec221f610fa149d7021b3eaf4f778290dc8cefcb323bcad4fe0369c2aeb
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 = {
@@ -731,6 +731,60 @@ module MailSlurpClient
731
731
  return data, status_code, headers
732
732
  end
733
733
 
734
+ # Get email count
735
+ # @param [Hash] opts the optional parameters
736
+ # @return [CountDto]
737
+ def get_email_count(opts = {})
738
+ data, _status_code, _headers = get_email_count_with_http_info(opts)
739
+ data
740
+ end
741
+
742
+ # Get email count
743
+ # @param [Hash] opts the optional parameters
744
+ # @return [Array<(CountDto, Integer, Hash)>] CountDto data, response status code and response headers
745
+ def get_email_count_with_http_info(opts = {})
746
+ if @api_client.config.debugging
747
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_count ...'
748
+ end
749
+ # resource path
750
+ local_var_path = '/emails/emails/count'
751
+
752
+ # query parameters
753
+ query_params = opts[:query_params] || {}
754
+
755
+ # header parameters
756
+ header_params = opts[:header_params] || {}
757
+ # HTTP header 'Accept' (if needed)
758
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
759
+
760
+ # form parameters
761
+ form_params = opts[:form_params] || {}
762
+
763
+ # http body (model)
764
+ post_body = opts[:body]
765
+
766
+ # return_type
767
+ return_type = opts[:return_type] || 'CountDto'
768
+
769
+ # auth_names
770
+ auth_names = opts[:auth_names] || ['API_KEY']
771
+
772
+ new_options = opts.merge(
773
+ :header_params => header_params,
774
+ :query_params => query_params,
775
+ :form_params => form_params,
776
+ :body => post_body,
777
+ :auth_names => auth_names,
778
+ :return_type => return_type
779
+ )
780
+
781
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
782
+ if @api_client.config.debugging
783
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_email_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
784
+ end
785
+ return data, status_code, headers
786
+ end
787
+
734
788
  # Get email content as HTML. For displaying emails in browser context.
735
789
  # Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`
736
790
  # @param email_id [String] emailId
@@ -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 &#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.
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 &#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.
28
28
  # @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.
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 &#x60;mx.mailslurp.com&#x60;.
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 &#x60;mx.mailslurp.com&#x60;.
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.
@@ -775,6 +775,120 @@ module MailSlurpClient
775
775
  return data, status_code, headers
776
776
  end
777
777
 
778
+ # Get total inbox count
779
+ # @param [Hash] opts the optional parameters
780
+ # @return [CountDto]
781
+ def get_inbox_count(opts = {})
782
+ data, _status_code, _headers = get_inbox_count_with_http_info(opts)
783
+ data
784
+ end
785
+
786
+ # Get total inbox count
787
+ # @param [Hash] opts the optional parameters
788
+ # @return [Array<(CountDto, Integer, Hash)>] CountDto data, response status code and response headers
789
+ def get_inbox_count_with_http_info(opts = {})
790
+ if @api_client.config.debugging
791
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_count ...'
792
+ end
793
+ # resource path
794
+ local_var_path = '/inboxes/count'
795
+
796
+ # query parameters
797
+ query_params = opts[:query_params] || {}
798
+
799
+ # header parameters
800
+ header_params = opts[:header_params] || {}
801
+ # HTTP header 'Accept' (if needed)
802
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
803
+
804
+ # form parameters
805
+ form_params = opts[:form_params] || {}
806
+
807
+ # http body (model)
808
+ post_body = opts[:body]
809
+
810
+ # return_type
811
+ return_type = opts[:return_type] || 'CountDto'
812
+
813
+ # auth_names
814
+ auth_names = opts[:auth_names] || ['API_KEY']
815
+
816
+ new_options = opts.merge(
817
+ :header_params => header_params,
818
+ :query_params => query_params,
819
+ :form_params => form_params,
820
+ :body => post_body,
821
+ :auth_names => auth_names,
822
+ :return_type => return_type
823
+ )
824
+
825
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
826
+ if @api_client.config.debugging
827
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
828
+ end
829
+ return data, status_code, headers
830
+ end
831
+
832
+ # Get email count in inbox
833
+ # @param inbox_id [String] Id of inbox that emails belongs to
834
+ # @param [Hash] opts the optional parameters
835
+ # @return [CountDto]
836
+ def get_inbox_email_count(inbox_id, opts = {})
837
+ data, _status_code, _headers = get_inbox_email_count_with_http_info(inbox_id, opts)
838
+ data
839
+ end
840
+
841
+ # Get email count in inbox
842
+ # @param inbox_id [String] Id of inbox that emails belongs to
843
+ # @param [Hash] opts the optional parameters
844
+ # @return [Array<(CountDto, Integer, Hash)>] CountDto data, response status code and response headers
845
+ def get_inbox_email_count_with_http_info(inbox_id, opts = {})
846
+ if @api_client.config.debugging
847
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_email_count ...'
848
+ end
849
+ # verify the required parameter 'inbox_id' is set
850
+ if @api_client.config.client_side_validation && inbox_id.nil?
851
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_email_count"
852
+ end
853
+ # resource path
854
+ local_var_path = '/inboxes/{inboxId}/emails/count'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
855
+
856
+ # query parameters
857
+ query_params = opts[:query_params] || {}
858
+
859
+ # header parameters
860
+ header_params = opts[:header_params] || {}
861
+ # HTTP header 'Accept' (if needed)
862
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
863
+
864
+ # form parameters
865
+ form_params = opts[:form_params] || {}
866
+
867
+ # http body (model)
868
+ post_body = opts[:body]
869
+
870
+ # return_type
871
+ return_type = opts[:return_type] || 'CountDto'
872
+
873
+ # auth_names
874
+ auth_names = opts[:auth_names] || ['API_KEY']
875
+
876
+ new_options = opts.merge(
877
+ :header_params => header_params,
878
+ :query_params => query_params,
879
+ :form_params => form_params,
880
+ :body => post_body,
881
+ :auth_names => auth_names,
882
+ :return_type => return_type
883
+ )
884
+
885
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
886
+ if @api_client.config.debugging
887
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_email_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
888
+ end
889
+ return data, status_code, headers
890
+ end
891
+
778
892
  # Get inbox emails paginated
779
893
  # Get a paginated list of emails in an inbox. Does not hold connections open.
780
894
  # @param inbox_id [String] Id of inbox that emails belongs to
@@ -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 CountDto
17
+ attr_accessor :total_elements
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'total_elements' => :'totalElements'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'total_elements' => :'Integer'
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::CountDto` 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::CountDto`. 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?(:'total_elements')
55
+ self.total_elements = attributes[:'total_elements']
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 @total_elements.nil?
64
+ invalid_properties.push('invalid value for "total_elements", total_elements 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 @total_elements.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
+ total_elements == o.total_elements
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
+ [total_elements].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
@@ -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
@@ -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.6'
14
+ VERSION = '15.0.3'
15
15
  end
@@ -33,6 +33,7 @@ require 'mailslurp_client/models/condition_option'
33
33
  require 'mailslurp_client/models/contact_dto'
34
34
  require 'mailslurp_client/models/contact_projection'
35
35
  require 'mailslurp_client/models/content_match_options'
36
+ require 'mailslurp_client/models/count_dto'
36
37
  require 'mailslurp_client/models/create_alias_options'
37
38
  require 'mailslurp_client/models/create_contact_options'
38
39
  require 'mailslurp_client/models/create_domain_options'
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.6
4
+ version: 15.0.3
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-07 00:00:00.000000000 Z
11
+ date: 2021-11-01 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.
@@ -64,6 +64,7 @@ files:
64
64
  - lib/mailslurp_client/models/contact_dto.rb
65
65
  - lib/mailslurp_client/models/contact_projection.rb
66
66
  - lib/mailslurp_client/models/content_match_options.rb
67
+ - lib/mailslurp_client/models/count_dto.rb
67
68
  - lib/mailslurp_client/models/create_alias_options.rb
68
69
  - lib/mailslurp_client/models/create_contact_options.rb
69
70
  - lib/mailslurp_client/models/create_domain_options.rb