mailslurp_client 11.15.0 → 12.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client.rb +2 -1
- data/lib/mailslurp_client/api/attachment_controller_api.rb +3 -0
- data/lib/mailslurp_client/api/email_controller_api.rb +10 -10
- data/lib/mailslurp_client/api/inbox_controller_api.rb +17 -10
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +2 -2
- data/lib/mailslurp_client/models/{attachment_entity.rb → attachment_projection.rb} +7 -18
- data/lib/mailslurp_client/models/condition_option.rb +264 -0
- data/lib/mailslurp_client/models/create_domain_options.rb +2 -2
- data/lib/mailslurp_client/models/create_inbox_dto.rb +6 -6
- data/lib/mailslurp_client/models/domain_dto.rb +45 -1
- data/lib/mailslurp_client/models/domain_name_record.rb +1 -1
- data/lib/mailslurp_client/models/forward_email_options.rb +24 -4
- data/lib/mailslurp_client/models/inbox.rb +48 -4
- data/lib/mailslurp_client/models/inbox_projection.rb +44 -1
- data/lib/mailslurp_client/models/match_options.rb +15 -3
- data/lib/mailslurp_client/models/organization_inbox_projection.rb +47 -3
- data/lib/mailslurp_client/models/page_attachment_entity.rb +1 -1
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +6 -0
- data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +14 -4
- data/lib/mailslurp_client/models/reply_to_email_options.rb +14 -4
- data/lib/mailslurp_client/models/send_email_options.rb +27 -7
- data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +1 -1
- data/lib/mailslurp_client/models/update_inbox_options.rb +2 -2
- data/lib/mailslurp_client/models/upload_attachment_options.rb +5 -0
- data/lib/mailslurp_client/models/wait_for_conditions.rb +1 -1
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +4 -3
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
|
-
# Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not
|
16
|
+
# Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not function correctly until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. Domains can be either `HTTP` or `SMTP` type. The type of domain determines which inboxes can be used with it. `SMTP` inboxes use a mail server running `mx.mailslurp.com` while `HTTP` inboxes are handled by AWS SES.
|
17
17
|
class CreateDomainOptions
|
18
18
|
# Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID.
|
19
19
|
attr_accessor :created_catch_all_inbox
|
@@ -24,7 +24,7 @@ module MailSlurpClient
|
|
24
24
|
# The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain.
|
25
25
|
attr_accessor :domain
|
26
26
|
|
27
|
-
# Domain type to create. HTTP or SMTP domain. HTTP domain uses MailSlurps SES MX records. SMTP uses a custom SMTP server MX record
|
27
|
+
# Domain type to create. HTTP or SMTP domain. HTTP domain uses MailSlurps SES MX records. SMTP uses a custom SMTP server MX record. SMTP domains can only be used with SMTP inboxes. SMTP inboxes are more reliable for public inbound emails while HTTP inboxes are more suitable for testing.
|
28
28
|
attr_accessor :domain_type
|
29
29
|
|
30
30
|
class EnumAttributeValidator
|
@@ -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.
|
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).
|
17
17
|
class CreateInboxDto
|
18
18
|
# 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. 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. 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.
|
@@ -30,19 +30,19 @@ module MailSlurpClient
|
|
30
30
|
# Number of milliseconds that inbox should exist for
|
31
31
|
attr_accessor :expires_in
|
32
32
|
|
33
|
-
# Is the inbox
|
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 or SMTP inbox
|
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`.
|
37
37
|
attr_accessor :inbox_type
|
38
38
|
|
39
|
-
# Optional name of the inbox. Displayed in the dashboard for easier search
|
39
|
+
# Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.
|
40
40
|
attr_accessor :name
|
41
41
|
|
42
42
|
# 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.
|
43
43
|
attr_accessor :tags
|
44
44
|
|
45
|
-
# 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 `@mailslurp.com` 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 `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field.
|
45
|
+
# 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 `@mailslurp.com` 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 `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types.
|
46
46
|
attr_accessor :use_domain_pool
|
47
47
|
|
48
48
|
class EnumAttributeValidator
|
@@ -29,6 +29,9 @@ module MailSlurpClient
|
|
29
29
|
# List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider.
|
30
30
|
attr_accessor :domain_name_records
|
31
31
|
|
32
|
+
# The type of domain. SMTP or HTTP domains differ in what inboxes can be used with them.
|
33
|
+
attr_accessor :domain_type
|
34
|
+
|
32
35
|
attr_accessor :id
|
33
36
|
|
34
37
|
# Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records.
|
@@ -41,6 +44,28 @@ module MailSlurpClient
|
|
41
44
|
# Verification tokens
|
42
45
|
attr_accessor :verification_token
|
43
46
|
|
47
|
+
class EnumAttributeValidator
|
48
|
+
attr_reader :datatype
|
49
|
+
attr_reader :allowable_values
|
50
|
+
|
51
|
+
def initialize(datatype, allowable_values)
|
52
|
+
@allowable_values = allowable_values.map do |value|
|
53
|
+
case datatype.to_s
|
54
|
+
when /Integer/i
|
55
|
+
value.to_i
|
56
|
+
when /Float/i
|
57
|
+
value.to_f
|
58
|
+
else
|
59
|
+
value
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def valid?(value)
|
65
|
+
!value || allowable_values.include?(value)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
44
69
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
70
|
def self.attribute_map
|
46
71
|
{
|
@@ -49,6 +74,7 @@ module MailSlurpClient
|
|
49
74
|
:'dkim_tokens' => :'dkimTokens',
|
50
75
|
:'domain' => :'domain',
|
51
76
|
:'domain_name_records' => :'domainNameRecords',
|
77
|
+
:'domain_type' => :'domainType',
|
52
78
|
:'id' => :'id',
|
53
79
|
:'is_verified' => :'isVerified',
|
54
80
|
:'updated_at' => :'updatedAt',
|
@@ -65,6 +91,7 @@ module MailSlurpClient
|
|
65
91
|
:'dkim_tokens' => :'Array<String>',
|
66
92
|
:'domain' => :'String',
|
67
93
|
:'domain_name_records' => :'Array<DomainNameRecord>',
|
94
|
+
:'domain_type' => :'String',
|
68
95
|
:'id' => :'String',
|
69
96
|
:'is_verified' => :'Boolean',
|
70
97
|
:'updated_at' => :'DateTime',
|
@@ -118,6 +145,10 @@ module MailSlurpClient
|
|
118
145
|
end
|
119
146
|
end
|
120
147
|
|
148
|
+
if attributes.key?(:'domain_type')
|
149
|
+
self.domain_type = attributes[:'domain_type']
|
150
|
+
end
|
151
|
+
|
121
152
|
if attributes.key?(:'id')
|
122
153
|
self.id = attributes[:'id']
|
123
154
|
end
|
@@ -166,12 +197,24 @@ module MailSlurpClient
|
|
166
197
|
# @return true if the model is valid
|
167
198
|
def valid?
|
168
199
|
return false if @created_at.nil?
|
200
|
+
domain_type_validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_DOMAIN"])
|
201
|
+
return false unless domain_type_validator.valid?(@domain_type)
|
169
202
|
return false if @id.nil?
|
170
203
|
return false if @updated_at.nil?
|
171
204
|
return false if @user_id.nil?
|
172
205
|
true
|
173
206
|
end
|
174
207
|
|
208
|
+
# Custom attribute writer method checking allowed values (enum).
|
209
|
+
# @param [Object] domain_type Object to be assigned
|
210
|
+
def domain_type=(domain_type)
|
211
|
+
validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_DOMAIN"])
|
212
|
+
unless validator.valid?(domain_type)
|
213
|
+
fail ArgumentError, "invalid value for \"domain_type\", must be one of #{validator.allowable_values}."
|
214
|
+
end
|
215
|
+
@domain_type = domain_type
|
216
|
+
end
|
217
|
+
|
175
218
|
# Checks equality by comparing each attribute.
|
176
219
|
# @param [Object] Object to be compared
|
177
220
|
def ==(o)
|
@@ -182,6 +225,7 @@ module MailSlurpClient
|
|
182
225
|
dkim_tokens == o.dkim_tokens &&
|
183
226
|
domain == o.domain &&
|
184
227
|
domain_name_records == o.domain_name_records &&
|
228
|
+
domain_type == o.domain_type &&
|
185
229
|
id == o.id &&
|
186
230
|
is_verified == o.is_verified &&
|
187
231
|
updated_at == o.updated_at &&
|
@@ -198,7 +242,7 @@ module MailSlurpClient
|
|
198
242
|
# Calculates hash code according to all attributes.
|
199
243
|
# @return [Integer] Hash code
|
200
244
|
def hash
|
201
|
-
[catch_all_inbox_id, created_at, dkim_tokens, domain, domain_name_records, id, is_verified, updated_at, user_id, verification_token].hash
|
245
|
+
[catch_all_inbox_id, created_at, dkim_tokens, domain, domain_name_records, domain_type, id, is_verified, updated_at, user_id, verification_token].hash
|
202
246
|
end
|
203
247
|
|
204
248
|
# 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
|
-
# DNS Record required for verification of a domain
|
16
|
+
# DNS Record required for verification of a domain. Record vary depending on domain type.
|
17
17
|
class DomainNameRecord
|
18
18
|
attr_accessor :name
|
19
19
|
|
@@ -21,19 +21,27 @@ module MailSlurpClient
|
|
21
21
|
# Optional cc recipients
|
22
22
|
attr_accessor :cc
|
23
23
|
|
24
|
+
# Optional from override
|
25
|
+
attr_accessor :from
|
26
|
+
|
24
27
|
# Subject for forwarded email
|
25
28
|
attr_accessor :subject
|
26
29
|
|
27
30
|
# To recipients for forwarded email
|
28
31
|
attr_accessor :to
|
29
32
|
|
33
|
+
# Optionally use inbox name as display name for sender email address
|
34
|
+
attr_accessor :use_inbox_name
|
35
|
+
|
30
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
37
|
def self.attribute_map
|
32
38
|
{
|
33
39
|
:'bcc' => :'bcc',
|
34
40
|
:'cc' => :'cc',
|
41
|
+
:'from' => :'from',
|
35
42
|
:'subject' => :'subject',
|
36
|
-
:'to' => :'to'
|
43
|
+
:'to' => :'to',
|
44
|
+
:'use_inbox_name' => :'useInboxName'
|
37
45
|
}
|
38
46
|
end
|
39
47
|
|
@@ -42,8 +50,10 @@ module MailSlurpClient
|
|
42
50
|
{
|
43
51
|
:'bcc' => :'Array<String>',
|
44
52
|
:'cc' => :'Array<String>',
|
53
|
+
:'from' => :'String',
|
45
54
|
:'subject' => :'String',
|
46
|
-
:'to' => :'Array<String>'
|
55
|
+
:'to' => :'Array<String>',
|
56
|
+
:'use_inbox_name' => :'Boolean'
|
47
57
|
}
|
48
58
|
end
|
49
59
|
|
@@ -80,6 +90,10 @@ module MailSlurpClient
|
|
80
90
|
end
|
81
91
|
end
|
82
92
|
|
93
|
+
if attributes.key?(:'from')
|
94
|
+
self.from = attributes[:'from']
|
95
|
+
end
|
96
|
+
|
83
97
|
if attributes.key?(:'subject')
|
84
98
|
self.subject = attributes[:'subject']
|
85
99
|
end
|
@@ -89,6 +103,10 @@ module MailSlurpClient
|
|
89
103
|
self.to = value
|
90
104
|
end
|
91
105
|
end
|
106
|
+
|
107
|
+
if attributes.key?(:'use_inbox_name')
|
108
|
+
self.use_inbox_name = attributes[:'use_inbox_name']
|
109
|
+
end
|
92
110
|
end
|
93
111
|
|
94
112
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -111,8 +129,10 @@ module MailSlurpClient
|
|
111
129
|
self.class == o.class &&
|
112
130
|
bcc == o.bcc &&
|
113
131
|
cc == o.cc &&
|
132
|
+
from == o.from &&
|
114
133
|
subject == o.subject &&
|
115
|
-
to == o.to
|
134
|
+
to == o.to &&
|
135
|
+
use_inbox_name == o.use_inbox_name
|
116
136
|
end
|
117
137
|
|
118
138
|
# @see the `==` method
|
@@ -124,7 +144,7 @@ module MailSlurpClient
|
|
124
144
|
# Calculates hash code according to all attributes.
|
125
145
|
# @return [Integer] Hash code
|
126
146
|
def hash
|
127
|
-
[bcc, cc, subject, to].hash
|
147
|
+
[bcc, cc, from, subject, to, use_inbox_name].hash
|
128
148
|
end
|
129
149
|
|
130
150
|
# 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
|
-
# 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. Use the `EmailController` or the `InboxController` methods to send and receive emails and attachments.
|
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.
|
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
|
@@ -27,13 +27,16 @@ module MailSlurpClient
|
|
27
27
|
# Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.
|
28
28
|
attr_accessor :expires_at
|
29
29
|
|
30
|
-
# Is the inbox
|
30
|
+
# Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering
|
31
31
|
attr_accessor :favourite
|
32
32
|
|
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
|
-
#
|
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.
|
37
|
+
attr_accessor :inbox_type
|
38
|
+
|
39
|
+
# Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
|
37
40
|
attr_accessor :name
|
38
41
|
|
39
42
|
# Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes.
|
@@ -48,6 +51,28 @@ module MailSlurpClient
|
|
48
51
|
# ID of user that inbox belongs to
|
49
52
|
attr_accessor :user_id
|
50
53
|
|
54
|
+
class EnumAttributeValidator
|
55
|
+
attr_reader :datatype
|
56
|
+
attr_reader :allowable_values
|
57
|
+
|
58
|
+
def initialize(datatype, allowable_values)
|
59
|
+
@allowable_values = allowable_values.map do |value|
|
60
|
+
case datatype.to_s
|
61
|
+
when /Integer/i
|
62
|
+
value.to_i
|
63
|
+
when /Float/i
|
64
|
+
value.to_f
|
65
|
+
else
|
66
|
+
value
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def valid?(value)
|
72
|
+
!value || allowable_values.include?(value)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
51
76
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
77
|
def self.attribute_map
|
53
78
|
{
|
@@ -57,6 +82,7 @@ module MailSlurpClient
|
|
57
82
|
:'expires_at' => :'expiresAt',
|
58
83
|
:'favourite' => :'favourite',
|
59
84
|
:'id' => :'id',
|
85
|
+
:'inbox_type' => :'inboxType',
|
60
86
|
:'name' => :'name',
|
61
87
|
:'read_only' => :'readOnly',
|
62
88
|
:'tags' => :'tags',
|
@@ -74,6 +100,7 @@ module MailSlurpClient
|
|
74
100
|
:'expires_at' => :'String',
|
75
101
|
:'favourite' => :'Boolean',
|
76
102
|
:'id' => :'String',
|
103
|
+
:'inbox_type' => :'String',
|
77
104
|
:'name' => :'String',
|
78
105
|
:'read_only' => :'Boolean',
|
79
106
|
:'tags' => :'Array<String>',
|
@@ -127,6 +154,10 @@ module MailSlurpClient
|
|
127
154
|
self.id = attributes[:'id']
|
128
155
|
end
|
129
156
|
|
157
|
+
if attributes.key?(:'inbox_type')
|
158
|
+
self.inbox_type = attributes[:'inbox_type']
|
159
|
+
end
|
160
|
+
|
130
161
|
if attributes.key?(:'name')
|
131
162
|
self.name = attributes[:'name']
|
132
163
|
end
|
@@ -160,9 +191,21 @@ module MailSlurpClient
|
|
160
191
|
# Check to see if the all the properties in the model are valid
|
161
192
|
# @return true if the model is valid
|
162
193
|
def valid?
|
194
|
+
inbox_type_validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_INBOX"])
|
195
|
+
return false unless inbox_type_validator.valid?(@inbox_type)
|
163
196
|
true
|
164
197
|
end
|
165
198
|
|
199
|
+
# Custom attribute writer method checking allowed values (enum).
|
200
|
+
# @param [Object] inbox_type Object to be assigned
|
201
|
+
def inbox_type=(inbox_type)
|
202
|
+
validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_INBOX"])
|
203
|
+
unless validator.valid?(inbox_type)
|
204
|
+
fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{validator.allowable_values}."
|
205
|
+
end
|
206
|
+
@inbox_type = inbox_type
|
207
|
+
end
|
208
|
+
|
166
209
|
# Checks equality by comparing each attribute.
|
167
210
|
# @param [Object] Object to be compared
|
168
211
|
def ==(o)
|
@@ -174,6 +217,7 @@ module MailSlurpClient
|
|
174
217
|
expires_at == o.expires_at &&
|
175
218
|
favourite == o.favourite &&
|
176
219
|
id == o.id &&
|
220
|
+
inbox_type == o.inbox_type &&
|
177
221
|
name == o.name &&
|
178
222
|
read_only == o.read_only &&
|
179
223
|
tags == o.tags &&
|
@@ -190,7 +234,7 @@ module MailSlurpClient
|
|
190
234
|
# Calculates hash code according to all attributes.
|
191
235
|
# @return [Integer] Hash code
|
192
236
|
def hash
|
193
|
-
[created_at, description, email_address, expires_at, favourite, id, name, read_only, tags, team_access, user_id].hash
|
237
|
+
[created_at, description, email_address, expires_at, favourite, id, inbox_type, name, read_only, tags, team_access, user_id].hash
|
194
238
|
end
|
195
239
|
|
196
240
|
# Builds the object from hash
|
@@ -22,12 +22,36 @@ module MailSlurpClient
|
|
22
22
|
|
23
23
|
attr_accessor :id
|
24
24
|
|
25
|
+
attr_accessor :inbox_type
|
26
|
+
|
25
27
|
attr_accessor :name
|
26
28
|
|
27
29
|
attr_accessor :tags
|
28
30
|
|
29
31
|
attr_accessor :team_access
|
30
32
|
|
33
|
+
class EnumAttributeValidator
|
34
|
+
attr_reader :datatype
|
35
|
+
attr_reader :allowable_values
|
36
|
+
|
37
|
+
def initialize(datatype, allowable_values)
|
38
|
+
@allowable_values = allowable_values.map do |value|
|
39
|
+
case datatype.to_s
|
40
|
+
when /Integer/i
|
41
|
+
value.to_i
|
42
|
+
when /Float/i
|
43
|
+
value.to_f
|
44
|
+
else
|
45
|
+
value
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def valid?(value)
|
51
|
+
!value || allowable_values.include?(value)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
31
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
56
|
def self.attribute_map
|
33
57
|
{
|
@@ -35,6 +59,7 @@ module MailSlurpClient
|
|
35
59
|
:'email_address' => :'emailAddress',
|
36
60
|
:'favourite' => :'favourite',
|
37
61
|
:'id' => :'id',
|
62
|
+
:'inbox_type' => :'inboxType',
|
38
63
|
:'name' => :'name',
|
39
64
|
:'tags' => :'tags',
|
40
65
|
:'team_access' => :'teamAccess'
|
@@ -48,6 +73,7 @@ module MailSlurpClient
|
|
48
73
|
:'email_address' => :'String',
|
49
74
|
:'favourite' => :'Boolean',
|
50
75
|
:'id' => :'String',
|
76
|
+
:'inbox_type' => :'String',
|
51
77
|
:'name' => :'String',
|
52
78
|
:'tags' => :'Array<String>',
|
53
79
|
:'team_access' => :'Boolean'
|
@@ -91,6 +117,10 @@ module MailSlurpClient
|
|
91
117
|
self.id = attributes[:'id']
|
92
118
|
end
|
93
119
|
|
120
|
+
if attributes.key?(:'inbox_type')
|
121
|
+
self.inbox_type = attributes[:'inbox_type']
|
122
|
+
end
|
123
|
+
|
94
124
|
if attributes.key?(:'name')
|
95
125
|
self.name = attributes[:'name']
|
96
126
|
end
|
@@ -135,10 +165,22 @@ module MailSlurpClient
|
|
135
165
|
return false if @created_at.nil?
|
136
166
|
return false if @favourite.nil?
|
137
167
|
return false if @id.nil?
|
168
|
+
inbox_type_validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_INBOX"])
|
169
|
+
return false unless inbox_type_validator.valid?(@inbox_type)
|
138
170
|
return false if @team_access.nil?
|
139
171
|
true
|
140
172
|
end
|
141
173
|
|
174
|
+
# Custom attribute writer method checking allowed values (enum).
|
175
|
+
# @param [Object] inbox_type Object to be assigned
|
176
|
+
def inbox_type=(inbox_type)
|
177
|
+
validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_INBOX"])
|
178
|
+
unless validator.valid?(inbox_type)
|
179
|
+
fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{validator.allowable_values}."
|
180
|
+
end
|
181
|
+
@inbox_type = inbox_type
|
182
|
+
end
|
183
|
+
|
142
184
|
# Checks equality by comparing each attribute.
|
143
185
|
# @param [Object] Object to be compared
|
144
186
|
def ==(o)
|
@@ -148,6 +190,7 @@ module MailSlurpClient
|
|
148
190
|
email_address == o.email_address &&
|
149
191
|
favourite == o.favourite &&
|
150
192
|
id == o.id &&
|
193
|
+
inbox_type == o.inbox_type &&
|
151
194
|
name == o.name &&
|
152
195
|
tags == o.tags &&
|
153
196
|
team_access == o.team_access
|
@@ -162,7 +205,7 @@ module MailSlurpClient
|
|
162
205
|
# Calculates hash code according to all attributes.
|
163
206
|
# @return [Integer] Hash code
|
164
207
|
def hash
|
165
|
-
[created_at, email_address, favourite, id, name, tags, team_access].hash
|
208
|
+
[created_at, email_address, favourite, id, inbox_type, name, tags, team_access].hash
|
166
209
|
end
|
167
210
|
|
168
211
|
# Builds the object from hash
|