mailslurp_client 15.4.1 → 15.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +42 -0
  3. data/lib/mailslurp_client/api/email_controller_api.rb +70 -0
  4. data/lib/mailslurp_client/api/inbox_controller_api.rb +70 -0
  5. data/lib/mailslurp_client/models/alias_projection.rb +13 -13
  6. data/lib/mailslurp_client/models/attachment_projection.rb +28 -28
  7. data/lib/mailslurp_client/models/contact_projection.rb +13 -13
  8. data/lib/mailslurp_client/models/create_inbox_dto.rb +1 -1
  9. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  10. data/lib/mailslurp_client/models/imap_flag_operation_options.rb +261 -0
  11. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  12. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  13. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  14. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  15. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  16. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  17. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  18. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  19. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  20. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  21. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  22. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +19 -19
  23. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  24. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  25. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  26. data/lib/mailslurp_client/models/page_thread_projection.rb +19 -19
  27. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  28. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  29. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  30. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  31. data/lib/mailslurp_client/models/send_smtp_envelope_options.rb +242 -0
  32. data/lib/mailslurp_client/models/sent_email_projection.rb +15 -15
  33. data/lib/mailslurp_client/models/template_projection.rb +15 -15
  34. data/lib/mailslurp_client/models/thread_projection.rb +10 -10
  35. data/lib/mailslurp_client/version.rb +1 -1
  36. data/lib/mailslurp_client.rb +2 -0
  37. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b39069566bfd8c5512682d31f0556a6175ce44f433ad2cbcef63faa7cf7efb33
4
- data.tar.gz: 674e71a7ec67d788b524e654c63bbeb6401c3a461400e29208591b3348626ba2
3
+ metadata.gz: 0c9171bccfe1e83210f450ee2e34045c36cd07b714206b36f100da039158dfa2
4
+ data.tar.gz: 00c12a8945b4bbc587fdb98432e619cc42211c9520b09e54f261d1068b3fba53
5
5
  SHA512:
6
- metadata.gz: f67b88c92b9d33609da3514e326a68b166afcaa07102845def2bb9e8b962c472400ecce35af17939861e9677c5113f3680bf6809414efe3da2dc9e328a0dedc2
7
- data.tar.gz: 46b82430fe7a25e3bef0eb511a850b091962d3d2056f623d87252d0cf7cdda2040116fc16eaa9b7618e01f7deddbde476868d3f5d4c994dd7e8155d0d39ec5f4
6
+ metadata.gz: 45c2815742a9e44046e3d1d60fa0a6906cdc5ac64455c13a2d2d5113d600cc8fde423fcb7a55dd61c4e530fa08e62c72bf39c7a96fe88d9e8e4e9e2f3832d1e6
7
+ data.tar.gz: 05a457424af810de2ed703aaeb67e2ec1bad3bbb07116e5283f84829c6724d7df26dfcfe179b39f32fcf41f8ddc16ebe4a10948bc3ecd44b65dddbaa7afdafb6
data/README.md CHANGED
@@ -9,6 +9,8 @@ MailSlurp is an email API service that lets you create real email addresses in c
9
9
  - [Method Documentation](https://www.mailslurp.com/docs/ruby/docs/)
10
10
  - [Gem Package](https://rubygems.org/gems/mailslurp_client)
11
11
  - [Github Source](https://github.com/mailslurp/mailslurp-client-ruby)
12
+ - [SMTP access details](https://www.mailslurp.com/guides/smtp-imap/)
13
+ - [Send email in Ruby with SMTP](https://www.mailslurp.com/smtp/ruby-send-email-smtp/)
12
14
 
13
15
  ### Common controllers
14
16
 
@@ -133,6 +135,46 @@ end
133
135
 
134
136
  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.
135
137
 
138
+
139
+ ### Configure NET/SMTP access
140
+ SMTP type inboxes allow SMTP and IMAP access using unique host, port, password, and username. Use the `inbox_controller.get_imap_smtp_access` method to access SMTP credentials. Then configure `net/smtp` in Ruby to send email using SMTP.
141
+
142
+ ```ruby
143
+ it 'can send email using SMTP' do
144
+ inbox_controller = MailSlurpClient::InboxControllerApi.new
145
+
146
+ # create two inboxes
147
+ inbox1 = inbox_controller.create_inbox_with_options({ inboxType: 'SMTP_INBOX' })
148
+ inbox2 = inbox_controller.create_inbox
149
+
150
+ expect(inbox1.email_address).to include('@mailslurp.mx')
151
+
152
+ # get smtp access for inbox
153
+ smtp_access = inbox_controller.get_imap_smtp_access({ inbox_id: inbox1.id })
154
+
155
+ # compose email
156
+ message = <<~MESSAGE_END
157
+ From: #{inbox1.email_address}
158
+ To: #{inbox2.email_address}
159
+ Subject: Test smtp email
160
+
161
+ This is a test
162
+ MESSAGE_END
163
+
164
+ # configure SMTP with host port and "PLAIN" authentication
165
+ Net::SMTP.start(smtp_access.smtp_server_host, smtp_access.smtp_server_port, 'greeting.your.domain',
166
+ smtp_access.smtp_username, smtp_access.smtp_password, :plain) do |smtp|
167
+ # send email
168
+ smtp.send_message message, inbox1.email_address, inbox2.email_address
169
+ end
170
+
171
+ # now confirm email was sent
172
+ wait_for_controller = MailSlurpClient::WaitForControllerApi.new
173
+ email = wait_for_controller.wait_for_latest_email({ inbox_id: inbox2.id })
174
+ expect(email.subject).to include("Test smtp email")
175
+ end
176
+ ```
177
+
136
178
  ### List inboxes
137
179
 
138
180
  Inboxes you create can be listed in a paginated way using the [InboxController](https://www.mailslurp.com/docs/ruby/docs/InboxControllerApi/)).
@@ -19,6 +19,76 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Set IMAP flags associated with a message. Only supports '\\Seen' flag.
23
+ # Apply RFC3501 section-2.3.2 IMAP flag operations on an email
24
+ # @param email_id [String]
25
+ # @param imap_flag_operation_options [ImapFlagOperationOptions]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [EmailPreview]
28
+ def apply_imap_flag_operation(email_id, imap_flag_operation_options, opts = {})
29
+ data, _status_code, _headers = apply_imap_flag_operation_with_http_info(email_id, imap_flag_operation_options, opts)
30
+ data
31
+ end
32
+
33
+ # Set IMAP flags associated with a message. Only supports &#39;\\Seen&#39; flag.
34
+ # Apply RFC3501 section-2.3.2 IMAP flag operations on an email
35
+ # @param email_id [String]
36
+ # @param imap_flag_operation_options [ImapFlagOperationOptions]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(EmailPreview, Integer, Hash)>] EmailPreview data, response status code and response headers
39
+ def apply_imap_flag_operation_with_http_info(email_id, imap_flag_operation_options, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.apply_imap_flag_operation ...'
42
+ end
43
+ # verify the required parameter 'email_id' is set
44
+ if @api_client.config.client_side_validation && email_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.apply_imap_flag_operation"
46
+ end
47
+ # verify the required parameter 'imap_flag_operation_options' is set
48
+ if @api_client.config.client_side_validation && imap_flag_operation_options.nil?
49
+ fail ArgumentError, "Missing the required parameter 'imap_flag_operation_options' when calling EmailControllerApi.apply_imap_flag_operation"
50
+ end
51
+ # resource path
52
+ local_var_path = '/emails/{emailId}/imap-flag-operation'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
61
+ # HTTP header 'Content-Type'
62
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:body] || @api_client.object_to_http_body(imap_flag_operation_options)
69
+
70
+ # return_type
71
+ return_type = opts[:return_type] || 'EmailPreview'
72
+
73
+ # auth_names
74
+ auth_names = opts[:auth_names] || ['API_KEY']
75
+
76
+ new_options = opts.merge(
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: EmailControllerApi#apply_imap_flag_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
22
92
  # Delete all emails in all inboxes.
23
93
  # Deletes all emails in your account. Be careful as emails cannot be recovered
24
94
  # @param [Hash] opts the optional parameters
@@ -1754,6 +1754,76 @@ module MailSlurpClient
1754
1754
  return data, status_code, headers
1755
1755
  end
1756
1756
 
1757
+ # Send email using an SMTP mail envelope and message body and return sent confirmation
1758
+ # Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.
1759
+ # @param inbox_id [String] ID of the inbox you want to send the email from
1760
+ # @param send_smtp_envelope_options [SendSMTPEnvelopeOptions]
1761
+ # @param [Hash] opts the optional parameters
1762
+ # @return [SentEmailDto]
1763
+ def send_smtp_envelope(inbox_id, send_smtp_envelope_options, opts = {})
1764
+ data, _status_code, _headers = send_smtp_envelope_with_http_info(inbox_id, send_smtp_envelope_options, opts)
1765
+ data
1766
+ end
1767
+
1768
+ # Send email using an SMTP mail envelope and message body and return sent confirmation
1769
+ # Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.
1770
+ # @param inbox_id [String] ID of the inbox you want to send the email from
1771
+ # @param send_smtp_envelope_options [SendSMTPEnvelopeOptions]
1772
+ # @param [Hash] opts the optional parameters
1773
+ # @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
1774
+ def send_smtp_envelope_with_http_info(inbox_id, send_smtp_envelope_options, opts = {})
1775
+ if @api_client.config.debugging
1776
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_smtp_envelope ...'
1777
+ end
1778
+ # verify the required parameter 'inbox_id' is set
1779
+ if @api_client.config.client_side_validation && inbox_id.nil?
1780
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_smtp_envelope"
1781
+ end
1782
+ # verify the required parameter 'send_smtp_envelope_options' is set
1783
+ if @api_client.config.client_side_validation && send_smtp_envelope_options.nil?
1784
+ fail ArgumentError, "Missing the required parameter 'send_smtp_envelope_options' when calling InboxControllerApi.send_smtp_envelope"
1785
+ end
1786
+ # resource path
1787
+ local_var_path = '/inboxes/{inboxId}/smtp-envelope'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1788
+
1789
+ # query parameters
1790
+ query_params = opts[:query_params] || {}
1791
+
1792
+ # header parameters
1793
+ header_params = opts[:header_params] || {}
1794
+ # HTTP header 'Accept' (if needed)
1795
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1796
+ # HTTP header 'Content-Type'
1797
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1798
+
1799
+ # form parameters
1800
+ form_params = opts[:form_params] || {}
1801
+
1802
+ # http body (model)
1803
+ post_body = opts[:body] || @api_client.object_to_http_body(send_smtp_envelope_options)
1804
+
1805
+ # return_type
1806
+ return_type = opts[:return_type] || 'SentEmailDto'
1807
+
1808
+ # auth_names
1809
+ auth_names = opts[:auth_names] || ['API_KEY']
1810
+
1811
+ new_options = opts.merge(
1812
+ :header_params => header_params,
1813
+ :query_params => query_params,
1814
+ :form_params => form_params,
1815
+ :body => post_body,
1816
+ :auth_names => auth_names,
1817
+ :return_type => return_type
1818
+ )
1819
+
1820
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1821
+ if @api_client.config.debugging
1822
+ @api_client.config.logger.debug "API called: InboxControllerApi#send_smtp_envelope\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1823
+ end
1824
+ return data, status_code, headers
1825
+ end
1826
+
1757
1827
  # Send a test email to inbox
1758
1828
  # Send an inbox a test email to test email receiving is working
1759
1829
  # @param inbox_id [String]
@@ -27,10 +27,10 @@ module MailSlurpClient
27
27
 
28
28
  attr_accessor :created_at
29
29
 
30
- attr_accessor :use_threads
31
-
32
30
  attr_accessor :updated_at
33
31
 
32
+ attr_accessor :use_threads
33
+
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
36
36
  {
@@ -40,8 +40,8 @@ module MailSlurpClient
40
40
  :'email_address' => :'emailAddress',
41
41
  :'inbox_id' => :'inboxId',
42
42
  :'created_at' => :'createdAt',
43
- :'use_threads' => :'useThreads',
44
- :'updated_at' => :'updatedAt'
43
+ :'updated_at' => :'updatedAt',
44
+ :'use_threads' => :'useThreads'
45
45
  }
46
46
  end
47
47
 
@@ -54,8 +54,8 @@ module MailSlurpClient
54
54
  :'email_address' => :'String',
55
55
  :'inbox_id' => :'String',
56
56
  :'created_at' => :'DateTime',
57
- :'use_threads' => :'Boolean',
58
- :'updated_at' => :'DateTime'
57
+ :'updated_at' => :'DateTime',
58
+ :'use_threads' => :'Boolean'
59
59
  }
60
60
  end
61
61
 
@@ -104,13 +104,13 @@ module MailSlurpClient
104
104
  self.created_at = attributes[:'created_at']
105
105
  end
106
106
 
107
- if attributes.key?(:'use_threads')
108
- self.use_threads = attributes[:'use_threads']
109
- end
110
-
111
107
  if attributes.key?(:'updated_at')
112
108
  self.updated_at = attributes[:'updated_at']
113
109
  end
110
+
111
+ if attributes.key?(:'use_threads')
112
+ self.use_threads = attributes[:'use_threads']
113
+ end
114
114
  end
115
115
 
116
116
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -167,8 +167,8 @@ module MailSlurpClient
167
167
  email_address == o.email_address &&
168
168
  inbox_id == o.inbox_id &&
169
169
  created_at == o.created_at &&
170
- use_threads == o.use_threads &&
171
- updated_at == o.updated_at
170
+ updated_at == o.updated_at &&
171
+ use_threads == o.use_threads
172
172
  end
173
173
 
174
174
  # @see the `==` method
@@ -180,7 +180,7 @@ module MailSlurpClient
180
180
  # Calculates hash code according to all attributes.
181
181
  # @return [Integer] Hash code
182
182
  def hash
183
- [name, id, user_id, email_address, inbox_id, created_at, use_threads, updated_at].hash
183
+ [name, id, user_id, email_address, inbox_id, created_at, updated_at, use_threads].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash
@@ -19,28 +19,28 @@ module MailSlurpClient
19
19
  # Content length of attachment in bytes
20
20
  attr_accessor :content_length
21
21
 
22
- attr_accessor :user_id
22
+ # Content type of attachment.
23
+ attr_accessor :content_type
23
24
 
24
- attr_accessor :created_at
25
+ attr_accessor :user_id
25
26
 
26
27
  # Attachment ID
27
28
  attr_accessor :attachment_id
28
29
 
29
- attr_accessor :updated_at
30
+ attr_accessor :created_at
30
31
 
31
- # Content type of attachment.
32
- attr_accessor :content_type
32
+ attr_accessor :updated_at
33
33
 
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
36
36
  {
37
37
  :'name' => :'name',
38
38
  :'content_length' => :'contentLength',
39
+ :'content_type' => :'contentType',
39
40
  :'user_id' => :'userId',
40
- :'created_at' => :'createdAt',
41
41
  :'attachment_id' => :'attachmentId',
42
- :'updated_at' => :'updatedAt',
43
- :'content_type' => :'contentType'
42
+ :'created_at' => :'createdAt',
43
+ :'updated_at' => :'updatedAt'
44
44
  }
45
45
  end
46
46
 
@@ -49,11 +49,11 @@ module MailSlurpClient
49
49
  {
50
50
  :'name' => :'String',
51
51
  :'content_length' => :'Integer',
52
+ :'content_type' => :'String',
52
53
  :'user_id' => :'String',
53
- :'created_at' => :'DateTime',
54
54
  :'attachment_id' => :'String',
55
- :'updated_at' => :'DateTime',
56
- :'content_type' => :'String'
55
+ :'created_at' => :'DateTime',
56
+ :'updated_at' => :'DateTime'
57
57
  }
58
58
  end
59
59
 
@@ -86,24 +86,24 @@ module MailSlurpClient
86
86
  self.content_length = attributes[:'content_length']
87
87
  end
88
88
 
89
- if attributes.key?(:'user_id')
90
- self.user_id = attributes[:'user_id']
89
+ if attributes.key?(:'content_type')
90
+ self.content_type = attributes[:'content_type']
91
91
  end
92
92
 
93
- if attributes.key?(:'created_at')
94
- self.created_at = attributes[:'created_at']
93
+ if attributes.key?(:'user_id')
94
+ self.user_id = attributes[:'user_id']
95
95
  end
96
96
 
97
97
  if attributes.key?(:'attachment_id')
98
98
  self.attachment_id = attributes[:'attachment_id']
99
99
  end
100
100
 
101
- if attributes.key?(:'updated_at')
102
- self.updated_at = attributes[:'updated_at']
101
+ if attributes.key?(:'created_at')
102
+ self.created_at = attributes[:'created_at']
103
103
  end
104
104
 
105
- if attributes.key?(:'content_type')
106
- self.content_type = attributes[:'content_type']
105
+ if attributes.key?(:'updated_at')
106
+ self.updated_at = attributes[:'updated_at']
107
107
  end
108
108
  end
109
109
 
@@ -115,14 +115,14 @@ module MailSlurpClient
115
115
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
116
116
  end
117
117
 
118
- if @created_at.nil?
119
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
120
- end
121
-
122
118
  if @attachment_id.nil?
123
119
  invalid_properties.push('invalid value for "attachment_id", attachment_id cannot be nil.')
124
120
  end
125
121
 
122
+ if @created_at.nil?
123
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
124
+ end
125
+
126
126
  if @updated_at.nil?
127
127
  invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
128
128
  end
@@ -134,8 +134,8 @@ module MailSlurpClient
134
134
  # @return true if the model is valid
135
135
  def valid?
136
136
  return false if @user_id.nil?
137
- return false if @created_at.nil?
138
137
  return false if @attachment_id.nil?
138
+ return false if @created_at.nil?
139
139
  return false if @updated_at.nil?
140
140
  true
141
141
  end
@@ -147,11 +147,11 @@ module MailSlurpClient
147
147
  self.class == o.class &&
148
148
  name == o.name &&
149
149
  content_length == o.content_length &&
150
+ content_type == o.content_type &&
150
151
  user_id == o.user_id &&
151
- created_at == o.created_at &&
152
152
  attachment_id == o.attachment_id &&
153
- updated_at == o.updated_at &&
154
- content_type == o.content_type
153
+ created_at == o.created_at &&
154
+ updated_at == o.updated_at
155
155
  end
156
156
 
157
157
  # @see the `==` method
@@ -163,7 +163,7 @@ module MailSlurpClient
163
163
  # Calculates hash code according to all attributes.
164
164
  # @return [Integer] Hash code
165
165
  def hash
166
- [name, content_length, user_id, created_at, attachment_id, updated_at, content_type].hash
166
+ [name, content_length, content_type, user_id, attachment_id, created_at, updated_at].hash
167
167
  end
168
168
 
169
169
  # Builds the object from hash
@@ -18,8 +18,6 @@ module MailSlurpClient
18
18
 
19
19
  attr_accessor :group_id
20
20
 
21
- attr_accessor :created_at
22
-
23
21
  attr_accessor :first_name
24
22
 
25
23
  attr_accessor :last_name
@@ -30,17 +28,19 @@ module MailSlurpClient
30
28
 
31
29
  attr_accessor :opt_out
32
30
 
31
+ attr_accessor :created_at
32
+
33
33
  # Attribute mapping from ruby-style variable name to JSON key.
34
34
  def self.attribute_map
35
35
  {
36
36
  :'id' => :'id',
37
37
  :'group_id' => :'groupId',
38
- :'created_at' => :'createdAt',
39
38
  :'first_name' => :'firstName',
40
39
  :'last_name' => :'lastName',
41
40
  :'company' => :'company',
42
41
  :'email_addresses' => :'emailAddresses',
43
- :'opt_out' => :'optOut'
42
+ :'opt_out' => :'optOut',
43
+ :'created_at' => :'createdAt'
44
44
  }
45
45
  end
46
46
 
@@ -49,12 +49,12 @@ module MailSlurpClient
49
49
  {
50
50
  :'id' => :'String',
51
51
  :'group_id' => :'String',
52
- :'created_at' => :'DateTime',
53
52
  :'first_name' => :'String',
54
53
  :'last_name' => :'String',
55
54
  :'company' => :'String',
56
55
  :'email_addresses' => :'Array<String>',
57
- :'opt_out' => :'Boolean'
56
+ :'opt_out' => :'Boolean',
57
+ :'created_at' => :'DateTime'
58
58
  }
59
59
  end
60
60
 
@@ -87,10 +87,6 @@ module MailSlurpClient
87
87
  self.group_id = attributes[:'group_id']
88
88
  end
89
89
 
90
- if attributes.key?(:'created_at')
91
- self.created_at = attributes[:'created_at']
92
- end
93
-
94
90
  if attributes.key?(:'first_name')
95
91
  self.first_name = attributes[:'first_name']
96
92
  end
@@ -112,6 +108,10 @@ module MailSlurpClient
112
108
  if attributes.key?(:'opt_out')
113
109
  self.opt_out = attributes[:'opt_out']
114
110
  end
111
+
112
+ if attributes.key?(:'created_at')
113
+ self.created_at = attributes[:'created_at']
114
+ end
115
115
  end
116
116
 
117
117
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -144,12 +144,12 @@ module MailSlurpClient
144
144
  self.class == o.class &&
145
145
  id == o.id &&
146
146
  group_id == o.group_id &&
147
- created_at == o.created_at &&
148
147
  first_name == o.first_name &&
149
148
  last_name == o.last_name &&
150
149
  company == o.company &&
151
150
  email_addresses == o.email_addresses &&
152
- opt_out == o.opt_out
151
+ opt_out == o.opt_out &&
152
+ created_at == o.created_at
153
153
  end
154
154
 
155
155
  # @see the `==` method
@@ -161,7 +161,7 @@ module MailSlurpClient
161
161
  # Calculates hash code according to all attributes.
162
162
  # @return [Integer] Hash code
163
163
  def hash
164
- [id, group_id, created_at, first_name, last_name, company, email_addresses, opt_out].hash
164
+ [id, group_id, first_name, last_name, company, email_addresses, opt_out, created_at].hash
165
165
  end
166
166
 
167
167
  # Builds the object from hash
@@ -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. `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).
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 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).
17
17
  class CreateInboxDto
18
18
  # 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.
19
19
  attr_accessor :email_address
@@ -27,12 +27,12 @@ module MailSlurpClient
27
27
 
28
28
  attr_accessor :attachments
29
29
 
30
- attr_accessor :created_at
31
-
32
30
  attr_accessor :bcc
33
31
 
34
32
  attr_accessor :cc
35
33
 
34
+ attr_accessor :created_at
35
+
36
36
  attr_accessor :team_access
37
37
 
38
38
  attr_accessor :read
@@ -50,9 +50,9 @@ module MailSlurpClient
50
50
  :'inbox_id' => :'inboxId',
51
51
  :'to' => :'to',
52
52
  :'attachments' => :'attachments',
53
- :'created_at' => :'createdAt',
54
53
  :'bcc' => :'bcc',
55
54
  :'cc' => :'cc',
55
+ :'created_at' => :'createdAt',
56
56
  :'team_access' => :'teamAccess',
57
57
  :'read' => :'read',
58
58
  :'body_md5_hash' => :'bodyMD5Hash',
@@ -69,9 +69,9 @@ module MailSlurpClient
69
69
  :'inbox_id' => :'String',
70
70
  :'to' => :'Array<String>',
71
71
  :'attachments' => :'Array<String>',
72
- :'created_at' => :'DateTime',
73
72
  :'bcc' => :'Array<String>',
74
73
  :'cc' => :'Array<String>',
74
+ :'created_at' => :'DateTime',
75
75
  :'team_access' => :'Boolean',
76
76
  :'read' => :'Boolean',
77
77
  :'body_md5_hash' => :'String',
@@ -128,10 +128,6 @@ module MailSlurpClient
128
128
  end
129
129
  end
130
130
 
131
- if attributes.key?(:'created_at')
132
- self.created_at = attributes[:'created_at']
133
- end
134
-
135
131
  if attributes.key?(:'bcc')
136
132
  if (value = attributes[:'bcc']).is_a?(Array)
137
133
  self.bcc = value
@@ -144,6 +140,10 @@ module MailSlurpClient
144
140
  end
145
141
  end
146
142
 
143
+ if attributes.key?(:'created_at')
144
+ self.created_at = attributes[:'created_at']
145
+ end
146
+
147
147
  if attributes.key?(:'team_access')
148
148
  self.team_access = attributes[:'team_access']
149
149
  end
@@ -205,9 +205,9 @@ module MailSlurpClient
205
205
  inbox_id == o.inbox_id &&
206
206
  to == o.to &&
207
207
  attachments == o.attachments &&
208
- created_at == o.created_at &&
209
208
  bcc == o.bcc &&
210
209
  cc == o.cc &&
210
+ created_at == o.created_at &&
211
211
  team_access == o.team_access &&
212
212
  read == o.read &&
213
213
  body_md5_hash == o.body_md5_hash &&
@@ -223,7 +223,7 @@ module MailSlurpClient
223
223
  # Calculates hash code according to all attributes.
224
224
  # @return [Integer] Hash code
225
225
  def hash
226
- [id, from, subject, inbox_id, to, attachments, created_at, bcc, cc, team_access, read, body_md5_hash, body_excerpt].hash
226
+ [id, from, subject, inbox_id, to, attachments, bcc, cc, created_at, team_access, read, body_md5_hash, body_excerpt].hash
227
227
  end
228
228
 
229
229
  # Builds the object from hash