mailslurp_client 15.5.4 → 15.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -11
- data/lib/mailslurp_client/api/api_internal_controller_api.rb +89 -0
- data/lib/mailslurp_client/api/attachment_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/bounce_controller_api.rb +64 -0
- data/lib/mailslurp_client/api/email_verification_controller_api.rb +179 -0
- data/lib/mailslurp_client/api/mail_server_controller_api.rb +2 -2
- data/lib/mailslurp_client/models/alias_projection.rb +13 -13
- data/lib/mailslurp_client/models/attachment_projection.rb +28 -28
- data/lib/mailslurp_client/models/bounce_recipient.rb +0 -5
- data/lib/mailslurp_client/models/bounced_recipient_dto.rb +0 -5
- data/lib/mailslurp_client/models/contact_projection.rb +13 -13
- data/lib/mailslurp_client/models/email_projection.rb +23 -23
- data/lib/mailslurp_client/models/email_validation_request.rb +276 -0
- data/lib/mailslurp_client/models/filter_bounced_recipients_options.rb +213 -0
- data/lib/mailslurp_client/models/filter_bounced_recipients_result.rb +213 -0
- data/lib/mailslurp_client/models/get_or_create_saml_user_options.rb +234 -0
- data/lib/mailslurp_client/models/page_alias.rb +19 -19
- data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
- data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
- data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
- data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_email_validation_request.rb +308 -0
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +19 -19
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_thread_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
- data/lib/mailslurp_client/models/send_email_options.rb +36 -4
- data/lib/mailslurp_client/models/sent_email_dto.rb +13 -4
- data/lib/mailslurp_client/models/sent_email_projection.rb +26 -26
- data/lib/mailslurp_client/models/template_projection.rb +18 -18
- data/lib/mailslurp_client/models/thread_projection.rb +15 -15
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
- data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +13 -13
- data/lib/mailslurp_client/models/user_dto.rb +438 -0
- data/lib/mailslurp_client/models/validate_email_address_list_options.rb +213 -0
- data/lib/mailslurp_client/models/validate_email_address_list_result.rb +245 -0
- data/lib/mailslurp_client/models/webhook_projection.rb +12 -12
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +10 -0
- metadata +12 -2
@@ -25,14 +25,14 @@ module MailSlurpClient
|
|
25
25
|
|
26
26
|
attr_accessor :inbox_id
|
27
27
|
|
28
|
-
attr_accessor :created_at
|
29
|
-
|
30
28
|
attr_accessor :to
|
31
29
|
|
32
30
|
attr_accessor :bcc
|
33
31
|
|
34
32
|
attr_accessor :cc
|
35
33
|
|
34
|
+
attr_accessor :created_at
|
35
|
+
|
36
36
|
attr_accessor :updated_at
|
37
37
|
|
38
38
|
attr_accessor :alias_id
|
@@ -45,10 +45,10 @@ module MailSlurpClient
|
|
45
45
|
:'subject' => :'subject',
|
46
46
|
:'user_id' => :'userId',
|
47
47
|
:'inbox_id' => :'inboxId',
|
48
|
-
:'created_at' => :'createdAt',
|
49
48
|
:'to' => :'to',
|
50
49
|
:'bcc' => :'bcc',
|
51
50
|
:'cc' => :'cc',
|
51
|
+
:'created_at' => :'createdAt',
|
52
52
|
:'updated_at' => :'updatedAt',
|
53
53
|
:'alias_id' => :'aliasId'
|
54
54
|
}
|
@@ -62,10 +62,10 @@ module MailSlurpClient
|
|
62
62
|
:'subject' => :'String',
|
63
63
|
:'user_id' => :'String',
|
64
64
|
:'inbox_id' => :'String',
|
65
|
-
:'created_at' => :'DateTime',
|
66
65
|
:'to' => :'Array<String>',
|
67
66
|
:'bcc' => :'Array<String>',
|
68
67
|
:'cc' => :'Array<String>',
|
68
|
+
:'created_at' => :'DateTime',
|
69
69
|
:'updated_at' => :'DateTime',
|
70
70
|
:'alias_id' => :'String'
|
71
71
|
}
|
@@ -112,10 +112,6 @@ module MailSlurpClient
|
|
112
112
|
self.inbox_id = attributes[:'inbox_id']
|
113
113
|
end
|
114
114
|
|
115
|
-
if attributes.key?(:'created_at')
|
116
|
-
self.created_at = attributes[:'created_at']
|
117
|
-
end
|
118
|
-
|
119
115
|
if attributes.key?(:'to')
|
120
116
|
if (value = attributes[:'to']).is_a?(Array)
|
121
117
|
self.to = value
|
@@ -134,6 +130,10 @@ module MailSlurpClient
|
|
134
130
|
end
|
135
131
|
end
|
136
132
|
|
133
|
+
if attributes.key?(:'created_at')
|
134
|
+
self.created_at = attributes[:'created_at']
|
135
|
+
end
|
136
|
+
|
137
137
|
if attributes.key?(:'updated_at')
|
138
138
|
self.updated_at = attributes[:'updated_at']
|
139
139
|
end
|
@@ -159,14 +159,14 @@ module MailSlurpClient
|
|
159
159
|
invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
|
160
160
|
end
|
161
161
|
|
162
|
-
if @created_at.nil?
|
163
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
164
|
-
end
|
165
|
-
|
166
162
|
if @to.nil?
|
167
163
|
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
168
164
|
end
|
169
165
|
|
166
|
+
if @created_at.nil?
|
167
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
168
|
+
end
|
169
|
+
|
170
170
|
if @updated_at.nil?
|
171
171
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
172
172
|
end
|
@@ -184,8 +184,8 @@ module MailSlurpClient
|
|
184
184
|
return false if @id.nil?
|
185
185
|
return false if @user_id.nil?
|
186
186
|
return false if @inbox_id.nil?
|
187
|
-
return false if @created_at.nil?
|
188
187
|
return false if @to.nil?
|
188
|
+
return false if @created_at.nil?
|
189
189
|
return false if @updated_at.nil?
|
190
190
|
return false if @alias_id.nil?
|
191
191
|
true
|
@@ -201,10 +201,10 @@ module MailSlurpClient
|
|
201
201
|
subject == o.subject &&
|
202
202
|
user_id == o.user_id &&
|
203
203
|
inbox_id == o.inbox_id &&
|
204
|
-
created_at == o.created_at &&
|
205
204
|
to == o.to &&
|
206
205
|
bcc == o.bcc &&
|
207
206
|
cc == o.cc &&
|
207
|
+
created_at == o.created_at &&
|
208
208
|
updated_at == o.updated_at &&
|
209
209
|
alias_id == o.alias_id
|
210
210
|
end
|
@@ -218,7 +218,7 @@ module MailSlurpClient
|
|
218
218
|
# Calculates hash code according to all attributes.
|
219
219
|
# @return [Integer] Hash code
|
220
220
|
def hash
|
221
|
-
[name, id, subject, user_id, inbox_id,
|
221
|
+
[name, id, subject, user_id, inbox_id, to, bcc, cc, created_at, updated_at, alias_id].hash
|
222
222
|
end
|
223
223
|
|
224
224
|
# Builds the object from hash
|
@@ -24,10 +24,10 @@ module MailSlurpClient
|
|
24
24
|
|
25
25
|
attr_accessor :created_at
|
26
26
|
|
27
|
-
attr_accessor :seen
|
28
|
-
|
29
27
|
attr_accessor :recipient
|
30
28
|
|
29
|
+
attr_accessor :seen
|
30
|
+
|
31
31
|
attr_accessor :seen_at
|
32
32
|
|
33
33
|
attr_accessor :sent_email_id
|
@@ -40,8 +40,8 @@ module MailSlurpClient
|
|
40
40
|
:'user_id' => :'userId',
|
41
41
|
:'inbox_id' => :'inboxId',
|
42
42
|
:'created_at' => :'createdAt',
|
43
|
-
:'seen' => :'seen',
|
44
43
|
:'recipient' => :'recipient',
|
44
|
+
:'seen' => :'seen',
|
45
45
|
:'seen_at' => :'seenAt',
|
46
46
|
:'sent_email_id' => :'sentEmailId'
|
47
47
|
}
|
@@ -55,8 +55,8 @@ module MailSlurpClient
|
|
55
55
|
:'user_id' => :'String',
|
56
56
|
:'inbox_id' => :'String',
|
57
57
|
:'created_at' => :'DateTime',
|
58
|
-
:'seen' => :'Boolean',
|
59
58
|
:'recipient' => :'String',
|
59
|
+
:'seen' => :'Boolean',
|
60
60
|
:'seen_at' => :'DateTime',
|
61
61
|
:'sent_email_id' => :'String'
|
62
62
|
}
|
@@ -103,14 +103,14 @@ module MailSlurpClient
|
|
103
103
|
self.created_at = attributes[:'created_at']
|
104
104
|
end
|
105
105
|
|
106
|
-
if attributes.key?(:'seen')
|
107
|
-
self.seen = attributes[:'seen']
|
108
|
-
end
|
109
|
-
|
110
106
|
if attributes.key?(:'recipient')
|
111
107
|
self.recipient = attributes[:'recipient']
|
112
108
|
end
|
113
109
|
|
110
|
+
if attributes.key?(:'seen')
|
111
|
+
self.seen = attributes[:'seen']
|
112
|
+
end
|
113
|
+
|
114
114
|
if attributes.key?(:'seen_at')
|
115
115
|
self.seen_at = attributes[:'seen_at']
|
116
116
|
end
|
@@ -163,8 +163,8 @@ module MailSlurpClient
|
|
163
163
|
user_id == o.user_id &&
|
164
164
|
inbox_id == o.inbox_id &&
|
165
165
|
created_at == o.created_at &&
|
166
|
-
seen == o.seen &&
|
167
166
|
recipient == o.recipient &&
|
167
|
+
seen == o.seen &&
|
168
168
|
seen_at == o.seen_at &&
|
169
169
|
sent_email_id == o.sent_email_id
|
170
170
|
end
|
@@ -178,7 +178,7 @@ module MailSlurpClient
|
|
178
178
|
# Calculates hash code according to all attributes.
|
179
179
|
# @return [Integer] Hash code
|
180
180
|
def hash
|
181
|
-
[name, id, user_id, inbox_id, created_at,
|
181
|
+
[name, id, user_id, inbox_id, created_at, recipient, seen, seen_at, sent_email_id].hash
|
182
182
|
end
|
183
183
|
|
184
184
|
# Builds the object from hash
|
@@ -20,18 +20,18 @@ module MailSlurpClient
|
|
20
20
|
|
21
21
|
attr_accessor :subject
|
22
22
|
|
23
|
-
attr_accessor :created_at
|
24
|
-
|
25
23
|
attr_accessor :to
|
26
24
|
|
25
|
+
attr_accessor :created_at
|
26
|
+
|
27
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
28
|
def self.attribute_map
|
29
29
|
{
|
30
30
|
:'id' => :'id',
|
31
31
|
:'from' => :'from',
|
32
32
|
:'subject' => :'subject',
|
33
|
-
:'
|
34
|
-
:'
|
33
|
+
:'to' => :'to',
|
34
|
+
:'created_at' => :'createdAt'
|
35
35
|
}
|
36
36
|
end
|
37
37
|
|
@@ -41,8 +41,8 @@ module MailSlurpClient
|
|
41
41
|
:'id' => :'String',
|
42
42
|
:'from' => :'String',
|
43
43
|
:'subject' => :'String',
|
44
|
-
:'
|
45
|
-
:'
|
44
|
+
:'to' => :'Array<String>',
|
45
|
+
:'created_at' => :'DateTime'
|
46
46
|
}
|
47
47
|
end
|
48
48
|
|
@@ -79,15 +79,15 @@ module MailSlurpClient
|
|
79
79
|
self.subject = attributes[:'subject']
|
80
80
|
end
|
81
81
|
|
82
|
-
if attributes.key?(:'created_at')
|
83
|
-
self.created_at = attributes[:'created_at']
|
84
|
-
end
|
85
|
-
|
86
82
|
if attributes.key?(:'to')
|
87
83
|
if (value = attributes[:'to']).is_a?(Array)
|
88
84
|
self.to = value
|
89
85
|
end
|
90
86
|
end
|
87
|
+
|
88
|
+
if attributes.key?(:'created_at')
|
89
|
+
self.created_at = attributes[:'created_at']
|
90
|
+
end
|
91
91
|
end
|
92
92
|
|
93
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -121,8 +121,8 @@ module MailSlurpClient
|
|
121
121
|
id == o.id &&
|
122
122
|
from == o.from &&
|
123
123
|
subject == o.subject &&
|
124
|
-
|
125
|
-
|
124
|
+
to == o.to &&
|
125
|
+
created_at == o.created_at
|
126
126
|
end
|
127
127
|
|
128
128
|
# @see the `==` method
|
@@ -134,7 +134,7 @@ module MailSlurpClient
|
|
134
134
|
# Calculates hash code according to all attributes.
|
135
135
|
# @return [Integer] Hash code
|
136
136
|
def hash
|
137
|
-
[id, from, subject,
|
137
|
+
[id, from, subject, to, created_at].hash
|
138
138
|
end
|
139
139
|
|
140
140
|
# Builds the object from hash
|
@@ -0,0 +1,438 @@
|
|
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
|
+
Contact: contact@mailslurp.dev
|
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
|
+
# Representation a user's account
|
17
|
+
class UserDto
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
attr_accessor :api_key
|
21
|
+
|
22
|
+
attr_accessor :email_address
|
23
|
+
|
24
|
+
attr_accessor :email_address_md5
|
25
|
+
|
26
|
+
attr_accessor :created
|
27
|
+
|
28
|
+
attr_accessor :user_type
|
29
|
+
|
30
|
+
# Does user belong to an organization
|
31
|
+
attr_accessor :organization
|
32
|
+
|
33
|
+
# Has user accepted an organization invite
|
34
|
+
attr_accessor :verified
|
35
|
+
|
36
|
+
attr_accessor :has_password
|
37
|
+
|
38
|
+
attr_accessor :is_frozen
|
39
|
+
|
40
|
+
attr_accessor :add_new_contacts
|
41
|
+
|
42
|
+
attr_accessor :sso_provider
|
43
|
+
|
44
|
+
attr_accessor :customer_id
|
45
|
+
|
46
|
+
attr_accessor :has_onboarded
|
47
|
+
|
48
|
+
attr_accessor :imap_username
|
49
|
+
|
50
|
+
attr_accessor :imap_password
|
51
|
+
|
52
|
+
attr_accessor :smtp_username
|
53
|
+
|
54
|
+
attr_accessor :smtp_password
|
55
|
+
|
56
|
+
class EnumAttributeValidator
|
57
|
+
attr_reader :datatype
|
58
|
+
attr_reader :allowable_values
|
59
|
+
|
60
|
+
def initialize(datatype, allowable_values)
|
61
|
+
@allowable_values = allowable_values.map do |value|
|
62
|
+
case datatype.to_s
|
63
|
+
when /Integer/i
|
64
|
+
value.to_i
|
65
|
+
when /Float/i
|
66
|
+
value.to_f
|
67
|
+
else
|
68
|
+
value
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def valid?(value)
|
74
|
+
!value || allowable_values.include?(value)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
79
|
+
def self.attribute_map
|
80
|
+
{
|
81
|
+
:'id' => :'id',
|
82
|
+
:'api_key' => :'apiKey',
|
83
|
+
:'email_address' => :'emailAddress',
|
84
|
+
:'email_address_md5' => :'emailAddressMd5',
|
85
|
+
:'created' => :'created',
|
86
|
+
:'user_type' => :'userType',
|
87
|
+
:'organization' => :'organization',
|
88
|
+
:'verified' => :'verified',
|
89
|
+
:'has_password' => :'hasPassword',
|
90
|
+
:'is_frozen' => :'isFrozen',
|
91
|
+
:'add_new_contacts' => :'addNewContacts',
|
92
|
+
:'sso_provider' => :'ssoProvider',
|
93
|
+
:'customer_id' => :'customerId',
|
94
|
+
:'has_onboarded' => :'hasOnboarded',
|
95
|
+
:'imap_username' => :'imapUsername',
|
96
|
+
:'imap_password' => :'imapPassword',
|
97
|
+
:'smtp_username' => :'smtpUsername',
|
98
|
+
:'smtp_password' => :'smtpPassword'
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# Attribute type mapping.
|
103
|
+
def self.openapi_types
|
104
|
+
{
|
105
|
+
:'id' => :'String',
|
106
|
+
:'api_key' => :'String',
|
107
|
+
:'email_address' => :'String',
|
108
|
+
:'email_address_md5' => :'String',
|
109
|
+
:'created' => :'DateTime',
|
110
|
+
:'user_type' => :'String',
|
111
|
+
:'organization' => :'String',
|
112
|
+
:'verified' => :'String',
|
113
|
+
:'has_password' => :'Boolean',
|
114
|
+
:'is_frozen' => :'Boolean',
|
115
|
+
:'add_new_contacts' => :'Boolean',
|
116
|
+
:'sso_provider' => :'String',
|
117
|
+
:'customer_id' => :'String',
|
118
|
+
:'has_onboarded' => :'Boolean',
|
119
|
+
:'imap_username' => :'String',
|
120
|
+
:'imap_password' => :'String',
|
121
|
+
:'smtp_username' => :'String',
|
122
|
+
:'smtp_password' => :'String'
|
123
|
+
}
|
124
|
+
end
|
125
|
+
|
126
|
+
# List of attributes with nullable: true
|
127
|
+
def self.openapi_nullable
|
128
|
+
Set.new([
|
129
|
+
])
|
130
|
+
end
|
131
|
+
|
132
|
+
# Initializes the object
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
+
def initialize(attributes = {})
|
135
|
+
if (!attributes.is_a?(Hash))
|
136
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::UserDto` initialize method"
|
137
|
+
end
|
138
|
+
|
139
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
140
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
141
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
142
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::UserDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
143
|
+
end
|
144
|
+
h[k.to_sym] = v
|
145
|
+
}
|
146
|
+
|
147
|
+
if attributes.key?(:'id')
|
148
|
+
self.id = attributes[:'id']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.key?(:'api_key')
|
152
|
+
self.api_key = attributes[:'api_key']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.key?(:'email_address')
|
156
|
+
self.email_address = attributes[:'email_address']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'email_address_md5')
|
160
|
+
self.email_address_md5 = attributes[:'email_address_md5']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.key?(:'created')
|
164
|
+
self.created = attributes[:'created']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.key?(:'user_type')
|
168
|
+
self.user_type = attributes[:'user_type']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.key?(:'organization')
|
172
|
+
self.organization = attributes[:'organization']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.key?(:'verified')
|
176
|
+
self.verified = attributes[:'verified']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.key?(:'has_password')
|
180
|
+
self.has_password = attributes[:'has_password']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.key?(:'is_frozen')
|
184
|
+
self.is_frozen = attributes[:'is_frozen']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.key?(:'add_new_contacts')
|
188
|
+
self.add_new_contacts = attributes[:'add_new_contacts']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.key?(:'sso_provider')
|
192
|
+
self.sso_provider = attributes[:'sso_provider']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.key?(:'customer_id')
|
196
|
+
self.customer_id = attributes[:'customer_id']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.key?(:'has_onboarded')
|
200
|
+
self.has_onboarded = attributes[:'has_onboarded']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.key?(:'imap_username')
|
204
|
+
self.imap_username = attributes[:'imap_username']
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.key?(:'imap_password')
|
208
|
+
self.imap_password = attributes[:'imap_password']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.key?(:'smtp_username')
|
212
|
+
self.smtp_username = attributes[:'smtp_username']
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.key?(:'smtp_password')
|
216
|
+
self.smtp_password = attributes[:'smtp_password']
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
221
|
+
# @return Array for valid properties with the reasons
|
222
|
+
def list_invalid_properties
|
223
|
+
invalid_properties = Array.new
|
224
|
+
if @id.nil?
|
225
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
226
|
+
end
|
227
|
+
|
228
|
+
if @api_key.nil?
|
229
|
+
invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
|
230
|
+
end
|
231
|
+
|
232
|
+
if @email_address.nil?
|
233
|
+
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
234
|
+
end
|
235
|
+
|
236
|
+
if @email_address_md5.nil?
|
237
|
+
invalid_properties.push('invalid value for "email_address_md5", email_address_md5 cannot be nil.')
|
238
|
+
end
|
239
|
+
|
240
|
+
if @has_password.nil?
|
241
|
+
invalid_properties.push('invalid value for "has_password", has_password cannot be nil.')
|
242
|
+
end
|
243
|
+
|
244
|
+
if @is_frozen.nil?
|
245
|
+
invalid_properties.push('invalid value for "is_frozen", is_frozen cannot be nil.')
|
246
|
+
end
|
247
|
+
|
248
|
+
invalid_properties
|
249
|
+
end
|
250
|
+
|
251
|
+
# Check to see if the all the properties in the model are valid
|
252
|
+
# @return true if the model is valid
|
253
|
+
def valid?
|
254
|
+
return false if @id.nil?
|
255
|
+
return false if @api_key.nil?
|
256
|
+
return false if @email_address.nil?
|
257
|
+
return false if @email_address_md5.nil?
|
258
|
+
user_type_validator = EnumAttributeValidator.new('String', ["SOLO", "CHILD_SOLO", "CHILD_TEAM"])
|
259
|
+
return false unless user_type_validator.valid?(@user_type)
|
260
|
+
verified_validator = EnumAttributeValidator.new('String', ["VERIFIED", "PENDING"])
|
261
|
+
return false unless verified_validator.valid?(@verified)
|
262
|
+
return false if @has_password.nil?
|
263
|
+
return false if @is_frozen.nil?
|
264
|
+
true
|
265
|
+
end
|
266
|
+
|
267
|
+
# Custom attribute writer method checking allowed values (enum).
|
268
|
+
# @param [Object] user_type Object to be assigned
|
269
|
+
def user_type=(user_type)
|
270
|
+
validator = EnumAttributeValidator.new('String', ["SOLO", "CHILD_SOLO", "CHILD_TEAM"])
|
271
|
+
unless validator.valid?(user_type)
|
272
|
+
fail ArgumentError, "invalid value for \"user_type\", must be one of #{validator.allowable_values}."
|
273
|
+
end
|
274
|
+
@user_type = user_type
|
275
|
+
end
|
276
|
+
|
277
|
+
# Custom attribute writer method checking allowed values (enum).
|
278
|
+
# @param [Object] verified Object to be assigned
|
279
|
+
def verified=(verified)
|
280
|
+
validator = EnumAttributeValidator.new('String', ["VERIFIED", "PENDING"])
|
281
|
+
unless validator.valid?(verified)
|
282
|
+
fail ArgumentError, "invalid value for \"verified\", must be one of #{validator.allowable_values}."
|
283
|
+
end
|
284
|
+
@verified = verified
|
285
|
+
end
|
286
|
+
|
287
|
+
# Checks equality by comparing each attribute.
|
288
|
+
# @param [Object] Object to be compared
|
289
|
+
def ==(o)
|
290
|
+
return true if self.equal?(o)
|
291
|
+
self.class == o.class &&
|
292
|
+
id == o.id &&
|
293
|
+
api_key == o.api_key &&
|
294
|
+
email_address == o.email_address &&
|
295
|
+
email_address_md5 == o.email_address_md5 &&
|
296
|
+
created == o.created &&
|
297
|
+
user_type == o.user_type &&
|
298
|
+
organization == o.organization &&
|
299
|
+
verified == o.verified &&
|
300
|
+
has_password == o.has_password &&
|
301
|
+
is_frozen == o.is_frozen &&
|
302
|
+
add_new_contacts == o.add_new_contacts &&
|
303
|
+
sso_provider == o.sso_provider &&
|
304
|
+
customer_id == o.customer_id &&
|
305
|
+
has_onboarded == o.has_onboarded &&
|
306
|
+
imap_username == o.imap_username &&
|
307
|
+
imap_password == o.imap_password &&
|
308
|
+
smtp_username == o.smtp_username &&
|
309
|
+
smtp_password == o.smtp_password
|
310
|
+
end
|
311
|
+
|
312
|
+
# @see the `==` method
|
313
|
+
# @param [Object] Object to be compared
|
314
|
+
def eql?(o)
|
315
|
+
self == o
|
316
|
+
end
|
317
|
+
|
318
|
+
# Calculates hash code according to all attributes.
|
319
|
+
# @return [Integer] Hash code
|
320
|
+
def hash
|
321
|
+
[id, api_key, email_address, email_address_md5, created, user_type, organization, verified, has_password, is_frozen, add_new_contacts, sso_provider, customer_id, has_onboarded, imap_username, imap_password, smtp_username, smtp_password].hash
|
322
|
+
end
|
323
|
+
|
324
|
+
# Builds the object from hash
|
325
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
326
|
+
# @return [Object] Returns the model itself
|
327
|
+
def self.build_from_hash(attributes)
|
328
|
+
new.build_from_hash(attributes)
|
329
|
+
end
|
330
|
+
|
331
|
+
# Builds the object from hash
|
332
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
333
|
+
# @return [Object] Returns the model itself
|
334
|
+
def build_from_hash(attributes)
|
335
|
+
return nil unless attributes.is_a?(Hash)
|
336
|
+
self.class.openapi_types.each_pair do |key, type|
|
337
|
+
if type =~ /\AArray<(.*)>/i
|
338
|
+
# check to ensure the input is an array given that the attribute
|
339
|
+
# is documented as an array but the input is not
|
340
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
341
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
342
|
+
end
|
343
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
344
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
345
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
346
|
+
end
|
347
|
+
|
348
|
+
self
|
349
|
+
end
|
350
|
+
|
351
|
+
# Deserializes the data based on type
|
352
|
+
# @param string type Data type
|
353
|
+
# @param string value Value to be deserialized
|
354
|
+
# @return [Object] Deserialized data
|
355
|
+
def _deserialize(type, value)
|
356
|
+
case type.to_sym
|
357
|
+
when :DateTime
|
358
|
+
DateTime.parse(value)
|
359
|
+
when :Date
|
360
|
+
Date.parse(value)
|
361
|
+
when :String
|
362
|
+
value.to_s
|
363
|
+
when :Integer
|
364
|
+
value.to_i
|
365
|
+
when :Float
|
366
|
+
value.to_f
|
367
|
+
when :Boolean
|
368
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
369
|
+
true
|
370
|
+
else
|
371
|
+
false
|
372
|
+
end
|
373
|
+
when :Object
|
374
|
+
# generic object (usually a Hash), return directly
|
375
|
+
value
|
376
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
377
|
+
inner_type = Regexp.last_match[:inner_type]
|
378
|
+
value.map { |v| _deserialize(inner_type, v) }
|
379
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
380
|
+
k_type = Regexp.last_match[:k_type]
|
381
|
+
v_type = Regexp.last_match[:v_type]
|
382
|
+
{}.tap do |hash|
|
383
|
+
value.each do |k, v|
|
384
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
385
|
+
end
|
386
|
+
end
|
387
|
+
else # model
|
388
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
# Returns the string representation of the object
|
393
|
+
# @return [String] String presentation of the object
|
394
|
+
def to_s
|
395
|
+
to_hash.to_s
|
396
|
+
end
|
397
|
+
|
398
|
+
# to_body is an alias to to_hash (backward compatibility)
|
399
|
+
# @return [Hash] Returns the object in the form of hash
|
400
|
+
def to_body
|
401
|
+
to_hash
|
402
|
+
end
|
403
|
+
|
404
|
+
# Returns the object in the form of hash
|
405
|
+
# @return [Hash] Returns the object in the form of hash
|
406
|
+
def to_hash
|
407
|
+
hash = {}
|
408
|
+
self.class.attribute_map.each_pair do |attr, param|
|
409
|
+
value = self.send(attr)
|
410
|
+
if value.nil?
|
411
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
412
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
413
|
+
end
|
414
|
+
|
415
|
+
hash[param] = _to_hash(value)
|
416
|
+
end
|
417
|
+
hash
|
418
|
+
end
|
419
|
+
|
420
|
+
# Outputs non-array value in the form of hash
|
421
|
+
# For object, use to_hash. Otherwise, just return the value
|
422
|
+
# @param [Object] value Any valid value
|
423
|
+
# @return [Hash] Returns the value in the form of hash
|
424
|
+
def _to_hash(value)
|
425
|
+
if value.is_a?(Array)
|
426
|
+
value.compact.map { |v| _to_hash(v) }
|
427
|
+
elsif value.is_a?(Hash)
|
428
|
+
{}.tap do |hash|
|
429
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
430
|
+
end
|
431
|
+
elsif value.respond_to? :to_hash
|
432
|
+
value.to_hash
|
433
|
+
else
|
434
|
+
value
|
435
|
+
end
|
436
|
+
end
|
437
|
+
end
|
438
|
+
end
|