mailslurp_client 15.17.40 → 15.18.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 +23 -22
- data/lib/mailslurp_client/api/email_controller_api.rb +62 -0
- data/lib/mailslurp_client/api/tools_controller_api.rb +175 -0
- data/lib/mailslurp_client/models/alias_projection.rb +39 -39
- data/lib/mailslurp_client/models/attachment_projection.rb +29 -29
- data/lib/mailslurp_client/models/bounce_projection.rb +15 -15
- data/lib/mailslurp_client/models/bounce_recipient_projection.rb +15 -15
- data/lib/mailslurp_client/models/check_email_body_results.rb +259 -0
- data/lib/mailslurp_client/models/connector_projection.rb +24 -24
- data/lib/mailslurp_client/models/connector_sync_event_projection.rb +15 -15
- data/lib/mailslurp_client/models/contact_projection.rb +10 -10
- data/lib/mailslurp_client/models/email_projection.rb +21 -21
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +19 -19
- data/lib/mailslurp_client/models/fake_email_dto.rb +305 -0
- data/lib/mailslurp_client/models/fake_email_preview.rb +291 -0
- data/lib/mailslurp_client/models/fake_email_result.rb +206 -0
- data/lib/mailslurp_client/models/image_issue.rb +282 -0
- data/lib/mailslurp_client/models/imap_smtp_access_details.rb +15 -4
- data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +20 -20
- data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +20 -20
- data/lib/mailslurp_client/models/link_issue.rb +282 -0
- data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +15 -15
- data/lib/mailslurp_client/models/missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/new_fake_email_address_result.rb +211 -0
- data/lib/mailslurp_client/models/phone_number_projection.rb +15 -15
- data/lib/mailslurp_client/models/sent_email_projection.rb +44 -44
- data/lib/mailslurp_client/models/sms_projection.rb +29 -29
- data/lib/mailslurp_client/models/spelling_issue.rb +287 -0
- data/lib/mailslurp_client/models/template_projection.rb +17 -17
- data/lib/mailslurp_client/models/thread_projection.rb +41 -41
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +27 -27
- data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/webhook_projection.rb +25 -25
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +8 -0
- metadata +10 -2
@@ -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://docs.mailslurp.com/) - [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
|
+
class NewFakeEmailAddressResult
|
17
|
+
attr_accessor :email_address
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'email_address' => :'emailAddress'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'email_address' => :'String'
|
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::NewFakeEmailAddressResult` 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::NewFakeEmailAddressResult`. 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?(:'email_address')
|
55
|
+
self.email_address = attributes[:'email_address']
|
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 @email_address.nil?
|
64
|
+
invalid_properties.push('invalid value for "email_address", email_address 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 @email_address.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
|
+
email_address == o.email_address
|
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
|
+
[email_address].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
|
@@ -15,14 +15,14 @@ require 'date'
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# Phone number projection
|
17
17
|
class PhoneNumberProjection
|
18
|
-
attr_accessor :created_at
|
19
|
-
|
20
18
|
attr_accessor :user_id
|
21
19
|
|
22
20
|
attr_accessor :phone_number
|
23
21
|
|
24
22
|
attr_accessor :phone_country
|
25
23
|
|
24
|
+
attr_accessor :created_at
|
25
|
+
|
26
26
|
attr_accessor :id
|
27
27
|
|
28
28
|
class EnumAttributeValidator
|
@@ -50,10 +50,10 @@ module MailSlurpClient
|
|
50
50
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
51
|
def self.attribute_map
|
52
52
|
{
|
53
|
-
:'created_at' => :'createdAt',
|
54
53
|
:'user_id' => :'userId',
|
55
54
|
:'phone_number' => :'phoneNumber',
|
56
55
|
:'phone_country' => :'phoneCountry',
|
56
|
+
:'created_at' => :'createdAt',
|
57
57
|
:'id' => :'id'
|
58
58
|
}
|
59
59
|
end
|
@@ -61,10 +61,10 @@ module MailSlurpClient
|
|
61
61
|
# Attribute type mapping.
|
62
62
|
def self.openapi_types
|
63
63
|
{
|
64
|
-
:'created_at' => :'DateTime',
|
65
64
|
:'user_id' => :'String',
|
66
65
|
:'phone_number' => :'String',
|
67
66
|
:'phone_country' => :'String',
|
67
|
+
:'created_at' => :'DateTime',
|
68
68
|
:'id' => :'String'
|
69
69
|
}
|
70
70
|
end
|
@@ -90,10 +90,6 @@ module MailSlurpClient
|
|
90
90
|
h[k.to_sym] = v
|
91
91
|
}
|
92
92
|
|
93
|
-
if attributes.key?(:'created_at')
|
94
|
-
self.created_at = attributes[:'created_at']
|
95
|
-
end
|
96
|
-
|
97
93
|
if attributes.key?(:'user_id')
|
98
94
|
self.user_id = attributes[:'user_id']
|
99
95
|
end
|
@@ -106,6 +102,10 @@ module MailSlurpClient
|
|
106
102
|
self.phone_country = attributes[:'phone_country']
|
107
103
|
end
|
108
104
|
|
105
|
+
if attributes.key?(:'created_at')
|
106
|
+
self.created_at = attributes[:'created_at']
|
107
|
+
end
|
108
|
+
|
109
109
|
if attributes.key?(:'id')
|
110
110
|
self.id = attributes[:'id']
|
111
111
|
end
|
@@ -115,10 +115,6 @@ module MailSlurpClient
|
|
115
115
|
# @return Array for valid properties with the reasons
|
116
116
|
def list_invalid_properties
|
117
117
|
invalid_properties = Array.new
|
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 @user_id.nil?
|
123
119
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
124
120
|
end
|
@@ -131,6 +127,10 @@ module MailSlurpClient
|
|
131
127
|
invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
|
132
128
|
end
|
133
129
|
|
130
|
+
if @created_at.nil?
|
131
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
132
|
+
end
|
133
|
+
|
134
134
|
if @id.nil?
|
135
135
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
136
136
|
end
|
@@ -141,12 +141,12 @@ module MailSlurpClient
|
|
141
141
|
# Check to see if the all the properties in the model are valid
|
142
142
|
# @return true if the model is valid
|
143
143
|
def valid?
|
144
|
-
return false if @created_at.nil?
|
145
144
|
return false if @user_id.nil?
|
146
145
|
return false if @phone_number.nil?
|
147
146
|
return false if @phone_country.nil?
|
148
147
|
phone_country_validator = EnumAttributeValidator.new('String', ["US", "GB", "AU"])
|
149
148
|
return false unless phone_country_validator.valid?(@phone_country)
|
149
|
+
return false if @created_at.nil?
|
150
150
|
return false if @id.nil?
|
151
151
|
true
|
152
152
|
end
|
@@ -166,10 +166,10 @@ module MailSlurpClient
|
|
166
166
|
def ==(o)
|
167
167
|
return true if self.equal?(o)
|
168
168
|
self.class == o.class &&
|
169
|
-
created_at == o.created_at &&
|
170
169
|
user_id == o.user_id &&
|
171
170
|
phone_number == o.phone_number &&
|
172
171
|
phone_country == o.phone_country &&
|
172
|
+
created_at == o.created_at &&
|
173
173
|
id == o.id
|
174
174
|
end
|
175
175
|
|
@@ -182,7 +182,7 @@ module MailSlurpClient
|
|
182
182
|
# Calculates hash code according to all attributes.
|
183
183
|
# @return [Integer] Hash code
|
184
184
|
def hash
|
185
|
-
[
|
185
|
+
[user_id, phone_number, phone_country, created_at, id].hash
|
186
186
|
end
|
187
187
|
|
188
188
|
# Builds the object from hash
|
@@ -14,19 +14,17 @@ require 'date'
|
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
16
|
class SentEmailProjection
|
17
|
-
attr_accessor :created_at
|
18
|
-
|
19
17
|
attr_accessor :id
|
20
18
|
|
21
|
-
attr_accessor :subject
|
22
|
-
|
23
19
|
attr_accessor :from
|
24
20
|
|
25
|
-
attr_accessor :
|
21
|
+
attr_accessor :subject
|
22
|
+
|
23
|
+
attr_accessor :inbox_id
|
26
24
|
|
27
25
|
attr_accessor :user_id
|
28
26
|
|
29
|
-
attr_accessor :
|
27
|
+
attr_accessor :attachments
|
30
28
|
|
31
29
|
attr_accessor :to
|
32
30
|
|
@@ -34,6 +32,8 @@ module MailSlurpClient
|
|
34
32
|
|
35
33
|
attr_accessor :cc
|
36
34
|
|
35
|
+
attr_accessor :created_at
|
36
|
+
|
37
37
|
attr_accessor :body_md5_hash
|
38
38
|
|
39
39
|
attr_accessor :virtual_send
|
@@ -41,16 +41,16 @@ module MailSlurpClient
|
|
41
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
42
|
def self.attribute_map
|
43
43
|
{
|
44
|
-
:'created_at' => :'createdAt',
|
45
44
|
:'id' => :'id',
|
46
|
-
:'subject' => :'subject',
|
47
45
|
:'from' => :'from',
|
48
|
-
:'
|
49
|
-
:'user_id' => :'userId',
|
46
|
+
:'subject' => :'subject',
|
50
47
|
:'inbox_id' => :'inboxId',
|
48
|
+
:'user_id' => :'userId',
|
49
|
+
:'attachments' => :'attachments',
|
51
50
|
:'to' => :'to',
|
52
51
|
:'bcc' => :'bcc',
|
53
52
|
:'cc' => :'cc',
|
53
|
+
:'created_at' => :'createdAt',
|
54
54
|
:'body_md5_hash' => :'bodyMD5Hash',
|
55
55
|
:'virtual_send' => :'virtualSend'
|
56
56
|
}
|
@@ -59,16 +59,16 @@ module MailSlurpClient
|
|
59
59
|
# Attribute type mapping.
|
60
60
|
def self.openapi_types
|
61
61
|
{
|
62
|
-
:'created_at' => :'DateTime',
|
63
62
|
:'id' => :'String',
|
64
|
-
:'subject' => :'String',
|
65
63
|
:'from' => :'String',
|
66
|
-
:'
|
67
|
-
:'user_id' => :'String',
|
64
|
+
:'subject' => :'String',
|
68
65
|
:'inbox_id' => :'String',
|
66
|
+
:'user_id' => :'String',
|
67
|
+
:'attachments' => :'Array<String>',
|
69
68
|
:'to' => :'Array<String>',
|
70
69
|
:'bcc' => :'Array<String>',
|
71
70
|
:'cc' => :'Array<String>',
|
71
|
+
:'created_at' => :'DateTime',
|
72
72
|
:'body_md5_hash' => :'String',
|
73
73
|
:'virtual_send' => :'Boolean'
|
74
74
|
}
|
@@ -95,34 +95,30 @@ module MailSlurpClient
|
|
95
95
|
h[k.to_sym] = v
|
96
96
|
}
|
97
97
|
|
98
|
-
if attributes.key?(:'created_at')
|
99
|
-
self.created_at = attributes[:'created_at']
|
100
|
-
end
|
101
|
-
|
102
98
|
if attributes.key?(:'id')
|
103
99
|
self.id = attributes[:'id']
|
104
100
|
end
|
105
101
|
|
106
|
-
if attributes.key?(:'subject')
|
107
|
-
self.subject = attributes[:'subject']
|
108
|
-
end
|
109
|
-
|
110
102
|
if attributes.key?(:'from')
|
111
103
|
self.from = attributes[:'from']
|
112
104
|
end
|
113
105
|
|
114
|
-
if attributes.key?(:'
|
115
|
-
|
116
|
-
|
117
|
-
|
106
|
+
if attributes.key?(:'subject')
|
107
|
+
self.subject = attributes[:'subject']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'inbox_id')
|
111
|
+
self.inbox_id = attributes[:'inbox_id']
|
118
112
|
end
|
119
113
|
|
120
114
|
if attributes.key?(:'user_id')
|
121
115
|
self.user_id = attributes[:'user_id']
|
122
116
|
end
|
123
117
|
|
124
|
-
if attributes.key?(:'
|
125
|
-
|
118
|
+
if attributes.key?(:'attachments')
|
119
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
120
|
+
self.attachments = value
|
121
|
+
end
|
126
122
|
end
|
127
123
|
|
128
124
|
if attributes.key?(:'to')
|
@@ -143,6 +139,10 @@ module MailSlurpClient
|
|
143
139
|
end
|
144
140
|
end
|
145
141
|
|
142
|
+
if attributes.key?(:'created_at')
|
143
|
+
self.created_at = attributes[:'created_at']
|
144
|
+
end
|
145
|
+
|
146
146
|
if attributes.key?(:'body_md5_hash')
|
147
147
|
self.body_md5_hash = attributes[:'body_md5_hash']
|
148
148
|
end
|
@@ -156,24 +156,20 @@ module MailSlurpClient
|
|
156
156
|
# @return Array for valid properties with the reasons
|
157
157
|
def list_invalid_properties
|
158
158
|
invalid_properties = Array.new
|
159
|
-
if @created_at.nil?
|
160
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
161
|
-
end
|
162
|
-
|
163
159
|
if @id.nil?
|
164
160
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
165
161
|
end
|
166
162
|
|
167
|
-
if @
|
168
|
-
invalid_properties.push('invalid value for "
|
163
|
+
if @inbox_id.nil?
|
164
|
+
invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
|
169
165
|
end
|
170
166
|
|
171
167
|
if @user_id.nil?
|
172
168
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
173
169
|
end
|
174
170
|
|
175
|
-
if @
|
176
|
-
invalid_properties.push('invalid value for "
|
171
|
+
if @attachments.nil?
|
172
|
+
invalid_properties.push('invalid value for "attachments", attachments cannot be nil.')
|
177
173
|
end
|
178
174
|
|
179
175
|
if @to.nil?
|
@@ -188,6 +184,10 @@ module MailSlurpClient
|
|
188
184
|
invalid_properties.push('invalid value for "cc", cc cannot be nil.')
|
189
185
|
end
|
190
186
|
|
187
|
+
if @created_at.nil?
|
188
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
189
|
+
end
|
190
|
+
|
191
191
|
if @virtual_send.nil?
|
192
192
|
invalid_properties.push('invalid value for "virtual_send", virtual_send cannot be nil.')
|
193
193
|
end
|
@@ -198,14 +198,14 @@ module MailSlurpClient
|
|
198
198
|
# Check to see if the all the properties in the model are valid
|
199
199
|
# @return true if the model is valid
|
200
200
|
def valid?
|
201
|
-
return false if @created_at.nil?
|
202
201
|
return false if @id.nil?
|
203
|
-
return false if @attachments.nil?
|
204
|
-
return false if @user_id.nil?
|
205
202
|
return false if @inbox_id.nil?
|
203
|
+
return false if @user_id.nil?
|
204
|
+
return false if @attachments.nil?
|
206
205
|
return false if @to.nil?
|
207
206
|
return false if @bcc.nil?
|
208
207
|
return false if @cc.nil?
|
208
|
+
return false if @created_at.nil?
|
209
209
|
return false if @virtual_send.nil?
|
210
210
|
true
|
211
211
|
end
|
@@ -215,16 +215,16 @@ module MailSlurpClient
|
|
215
215
|
def ==(o)
|
216
216
|
return true if self.equal?(o)
|
217
217
|
self.class == o.class &&
|
218
|
-
created_at == o.created_at &&
|
219
218
|
id == o.id &&
|
220
|
-
subject == o.subject &&
|
221
219
|
from == o.from &&
|
222
|
-
|
223
|
-
user_id == o.user_id &&
|
220
|
+
subject == o.subject &&
|
224
221
|
inbox_id == o.inbox_id &&
|
222
|
+
user_id == o.user_id &&
|
223
|
+
attachments == o.attachments &&
|
225
224
|
to == o.to &&
|
226
225
|
bcc == o.bcc &&
|
227
226
|
cc == o.cc &&
|
227
|
+
created_at == o.created_at &&
|
228
228
|
body_md5_hash == o.body_md5_hash &&
|
229
229
|
virtual_send == o.virtual_send
|
230
230
|
end
|
@@ -238,7 +238,7 @@ module MailSlurpClient
|
|
238
238
|
# Calculates hash code according to all attributes.
|
239
239
|
# @return [Integer] Hash code
|
240
240
|
def hash
|
241
|
-
[
|
241
|
+
[id, from, subject, inbox_id, user_id, attachments, to, bcc, cc, created_at, body_md5_hash, virtual_send].hash
|
242
242
|
end
|
243
243
|
|
244
244
|
# Builds the object from hash
|
@@ -15,10 +15,6 @@ require 'date'
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# SMS projection
|
17
17
|
class SmsProjection
|
18
|
-
attr_accessor :body
|
19
|
-
|
20
|
-
attr_accessor :created_at
|
21
|
-
|
22
18
|
attr_accessor :user_id
|
23
19
|
|
24
20
|
attr_accessor :phone_number
|
@@ -27,17 +23,21 @@ module MailSlurpClient
|
|
27
23
|
|
28
24
|
attr_accessor :read
|
29
25
|
|
26
|
+
attr_accessor :body
|
27
|
+
|
28
|
+
attr_accessor :created_at
|
29
|
+
|
30
30
|
attr_accessor :id
|
31
31
|
|
32
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
33
|
def self.attribute_map
|
34
34
|
{
|
35
|
-
:'body' => :'body',
|
36
|
-
:'created_at' => :'createdAt',
|
37
35
|
:'user_id' => :'userId',
|
38
36
|
:'phone_number' => :'phoneNumber',
|
39
37
|
:'from_number' => :'fromNumber',
|
40
38
|
:'read' => :'read',
|
39
|
+
:'body' => :'body',
|
40
|
+
:'created_at' => :'createdAt',
|
41
41
|
:'id' => :'id'
|
42
42
|
}
|
43
43
|
end
|
@@ -45,12 +45,12 @@ module MailSlurpClient
|
|
45
45
|
# Attribute type mapping.
|
46
46
|
def self.openapi_types
|
47
47
|
{
|
48
|
-
:'body' => :'String',
|
49
|
-
:'created_at' => :'DateTime',
|
50
48
|
:'user_id' => :'String',
|
51
49
|
:'phone_number' => :'String',
|
52
50
|
:'from_number' => :'String',
|
53
51
|
:'read' => :'Boolean',
|
52
|
+
:'body' => :'String',
|
53
|
+
:'created_at' => :'DateTime',
|
54
54
|
:'id' => :'String'
|
55
55
|
}
|
56
56
|
end
|
@@ -76,14 +76,6 @@ module MailSlurpClient
|
|
76
76
|
h[k.to_sym] = v
|
77
77
|
}
|
78
78
|
|
79
|
-
if attributes.key?(:'body')
|
80
|
-
self.body = attributes[:'body']
|
81
|
-
end
|
82
|
-
|
83
|
-
if attributes.key?(:'created_at')
|
84
|
-
self.created_at = attributes[:'created_at']
|
85
|
-
end
|
86
|
-
|
87
79
|
if attributes.key?(:'user_id')
|
88
80
|
self.user_id = attributes[:'user_id']
|
89
81
|
end
|
@@ -100,6 +92,14 @@ module MailSlurpClient
|
|
100
92
|
self.read = attributes[:'read']
|
101
93
|
end
|
102
94
|
|
95
|
+
if attributes.key?(:'body')
|
96
|
+
self.body = attributes[:'body']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'created_at')
|
100
|
+
self.created_at = attributes[:'created_at']
|
101
|
+
end
|
102
|
+
|
103
103
|
if attributes.key?(:'id')
|
104
104
|
self.id = attributes[:'id']
|
105
105
|
end
|
@@ -109,14 +109,6 @@ module MailSlurpClient
|
|
109
109
|
# @return Array for valid properties with the reasons
|
110
110
|
def list_invalid_properties
|
111
111
|
invalid_properties = Array.new
|
112
|
-
if @body.nil?
|
113
|
-
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
114
|
-
end
|
115
|
-
|
116
|
-
if @created_at.nil?
|
117
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
118
|
-
end
|
119
|
-
|
120
112
|
if @user_id.nil?
|
121
113
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
122
114
|
end
|
@@ -133,6 +125,14 @@ module MailSlurpClient
|
|
133
125
|
invalid_properties.push('invalid value for "read", read cannot be nil.')
|
134
126
|
end
|
135
127
|
|
128
|
+
if @body.nil?
|
129
|
+
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if @created_at.nil?
|
133
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
134
|
+
end
|
135
|
+
|
136
136
|
if @id.nil?
|
137
137
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
138
138
|
end
|
@@ -143,12 +143,12 @@ module MailSlurpClient
|
|
143
143
|
# Check to see if the all the properties in the model are valid
|
144
144
|
# @return true if the model is valid
|
145
145
|
def valid?
|
146
|
-
return false if @body.nil?
|
147
|
-
return false if @created_at.nil?
|
148
146
|
return false if @user_id.nil?
|
149
147
|
return false if @phone_number.nil?
|
150
148
|
return false if @from_number.nil?
|
151
149
|
return false if @read.nil?
|
150
|
+
return false if @body.nil?
|
151
|
+
return false if @created_at.nil?
|
152
152
|
return false if @id.nil?
|
153
153
|
true
|
154
154
|
end
|
@@ -158,12 +158,12 @@ module MailSlurpClient
|
|
158
158
|
def ==(o)
|
159
159
|
return true if self.equal?(o)
|
160
160
|
self.class == o.class &&
|
161
|
-
body == o.body &&
|
162
|
-
created_at == o.created_at &&
|
163
161
|
user_id == o.user_id &&
|
164
162
|
phone_number == o.phone_number &&
|
165
163
|
from_number == o.from_number &&
|
166
164
|
read == o.read &&
|
165
|
+
body == o.body &&
|
166
|
+
created_at == o.created_at &&
|
167
167
|
id == o.id
|
168
168
|
end
|
169
169
|
|
@@ -176,7 +176,7 @@ module MailSlurpClient
|
|
176
176
|
# Calculates hash code according to all attributes.
|
177
177
|
# @return [Integer] Hash code
|
178
178
|
def hash
|
179
|
-
[
|
179
|
+
[user_id, phone_number, from_number, read, body, created_at, id].hash
|
180
180
|
end
|
181
181
|
|
182
182
|
# Builds the object from hash
|