mailslurp_client 15.3.0 → 15.3.1
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/models/attachment_projection.rb +15 -15
- data/lib/mailslurp_client/models/contact_projection.rb +13 -13
- data/lib/mailslurp_client/models/email_projection.rb +10 -10
- data/lib/mailslurp_client/models/inbox_id_item.rb +225 -0
- data/lib/mailslurp_client/models/inbox_ids_result.rb +1 -1
- data/lib/mailslurp_client/models/page_alias.rb +10 -10
- data/lib/mailslurp_client/models/page_attachment_entity.rb +10 -10
- data/lib/mailslurp_client/models/page_bounced_email.rb +10 -10
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +10 -10
- data/lib/mailslurp_client/models/page_contact_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_email_preview.rb +10 -10
- data/lib/mailslurp_client/models/page_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_group_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +10 -10
- data/lib/mailslurp_client/models/page_inbox_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +10 -10
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
- data/lib/mailslurp_client/models/page_template_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_thread_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_webhook_projection.rb +10 -10
- data/lib/mailslurp_client/models/page_webhook_result.rb +10 -10
- data/lib/mailslurp_client/models/sent_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/sort.rb +13 -13
- data/lib/mailslurp_client/models/thread_projection.rb +10 -10
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21e72a3ee33fa565422f090096636def02be09e38afc968e24c4cea688c2874a
|
4
|
+
data.tar.gz: 4d2abd4c4566c706f8e27939667ed733179a19209d9f69d315f895939b0801c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cecb496f895e56bcafa4e102d2739fba48a07e45f4521ad799f8d87139ff9c318a56f7208225c1adedd354c4d935b19fd3c2dbb22f68244acc44a4d8bea5533a
|
7
|
+
data.tar.gz: aaf21c47057b9448d2a1b26f844c9cdf9e3bba31de83fe54fb030893f32471bc98f599bf50bcbbf31464002c20352a7dc7532aa564f7e6f8b5cd7c789a5f700d
|
@@ -24,11 +24,11 @@ module MailSlurpClient
|
|
24
24
|
|
25
25
|
attr_accessor :user_id
|
26
26
|
|
27
|
+
attr_accessor :created_at
|
28
|
+
|
27
29
|
# Attachment ID
|
28
30
|
attr_accessor :attachment_id
|
29
31
|
|
30
|
-
attr_accessor :created_at
|
31
|
-
|
32
32
|
attr_accessor :updated_at
|
33
33
|
|
34
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -38,8 +38,8 @@ module MailSlurpClient
|
|
38
38
|
:'content_length' => :'contentLength',
|
39
39
|
:'content_type' => :'contentType',
|
40
40
|
:'user_id' => :'userId',
|
41
|
-
:'attachment_id' => :'attachmentId',
|
42
41
|
:'created_at' => :'createdAt',
|
42
|
+
:'attachment_id' => :'attachmentId',
|
43
43
|
:'updated_at' => :'updatedAt'
|
44
44
|
}
|
45
45
|
end
|
@@ -51,8 +51,8 @@ module MailSlurpClient
|
|
51
51
|
:'content_length' => :'Integer',
|
52
52
|
:'content_type' => :'String',
|
53
53
|
:'user_id' => :'String',
|
54
|
-
:'attachment_id' => :'String',
|
55
54
|
:'created_at' => :'DateTime',
|
55
|
+
:'attachment_id' => :'String',
|
56
56
|
:'updated_at' => :'DateTime'
|
57
57
|
}
|
58
58
|
end
|
@@ -94,14 +94,14 @@ module MailSlurpClient
|
|
94
94
|
self.user_id = attributes[:'user_id']
|
95
95
|
end
|
96
96
|
|
97
|
-
if attributes.key?(:'attachment_id')
|
98
|
-
self.attachment_id = attributes[:'attachment_id']
|
99
|
-
end
|
100
|
-
|
101
97
|
if attributes.key?(:'created_at')
|
102
98
|
self.created_at = attributes[:'created_at']
|
103
99
|
end
|
104
100
|
|
101
|
+
if attributes.key?(:'attachment_id')
|
102
|
+
self.attachment_id = attributes[:'attachment_id']
|
103
|
+
end
|
104
|
+
|
105
105
|
if attributes.key?(:'updated_at')
|
106
106
|
self.updated_at = attributes[:'updated_at']
|
107
107
|
end
|
@@ -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 @attachment_id.nil?
|
119
|
-
invalid_properties.push('invalid value for "attachment_id", attachment_id cannot be nil.')
|
120
|
-
end
|
121
|
-
|
122
118
|
if @created_at.nil?
|
123
119
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
124
120
|
end
|
125
121
|
|
122
|
+
if @attachment_id.nil?
|
123
|
+
invalid_properties.push('invalid value for "attachment_id", attachment_id 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 @attachment_id.nil?
|
138
137
|
return false if @created_at.nil?
|
138
|
+
return false if @attachment_id.nil?
|
139
139
|
return false if @updated_at.nil?
|
140
140
|
true
|
141
141
|
end
|
@@ -149,8 +149,8 @@ module MailSlurpClient
|
|
149
149
|
content_length == o.content_length &&
|
150
150
|
content_type == o.content_type &&
|
151
151
|
user_id == o.user_id &&
|
152
|
-
attachment_id == o.attachment_id &&
|
153
152
|
created_at == o.created_at &&
|
153
|
+
attachment_id == o.attachment_id &&
|
154
154
|
updated_at == o.updated_at
|
155
155
|
end
|
156
156
|
|
@@ -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, content_type, user_id,
|
166
|
+
[name, content_length, content_type, user_id, created_at, attachment_id, updated_at].hash
|
167
167
|
end
|
168
168
|
|
169
169
|
# Builds the object from hash
|
@@ -18,6 +18,8 @@ module MailSlurpClient
|
|
18
18
|
|
19
19
|
attr_accessor :group_id
|
20
20
|
|
21
|
+
attr_accessor :created_at
|
22
|
+
|
21
23
|
attr_accessor :first_name
|
22
24
|
|
23
25
|
attr_accessor :last_name
|
@@ -28,19 +30,17 @@ module MailSlurpClient
|
|
28
30
|
|
29
31
|
attr_accessor :opt_out
|
30
32
|
|
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',
|
38
39
|
:'first_name' => :'firstName',
|
39
40
|
:'last_name' => :'lastName',
|
40
41
|
:'company' => :'company',
|
41
42
|
:'email_addresses' => :'emailAddresses',
|
42
|
-
:'opt_out' => :'optOut'
|
43
|
-
:'created_at' => :'createdAt'
|
43
|
+
:'opt_out' => :'optOut'
|
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',
|
52
53
|
:'first_name' => :'String',
|
53
54
|
:'last_name' => :'String',
|
54
55
|
:'company' => :'String',
|
55
56
|
:'email_addresses' => :'Array<String>',
|
56
|
-
:'opt_out' => :'Boolean'
|
57
|
-
:'created_at' => :'DateTime'
|
57
|
+
:'opt_out' => :'Boolean'
|
58
58
|
}
|
59
59
|
end
|
60
60
|
|
@@ -87,6 +87,10 @@ 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
|
+
|
90
94
|
if attributes.key?(:'first_name')
|
91
95
|
self.first_name = attributes[:'first_name']
|
92
96
|
end
|
@@ -108,10 +112,6 @@ module MailSlurpClient
|
|
108
112
|
if attributes.key?(:'opt_out')
|
109
113
|
self.opt_out = attributes[:'opt_out']
|
110
114
|
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 &&
|
147
148
|
first_name == o.first_name &&
|
148
149
|
last_name == o.last_name &&
|
149
150
|
company == o.company &&
|
150
151
|
email_addresses == o.email_addresses &&
|
151
|
-
opt_out == o.opt_out
|
152
|
-
created_at == o.created_at
|
152
|
+
opt_out == o.opt_out
|
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, first_name, last_name, company, email_addresses, opt_out
|
164
|
+
[id, group_id, created_at, first_name, last_name, company, email_addresses, opt_out].hash
|
165
165
|
end
|
166
166
|
|
167
167
|
# Builds the object from hash
|
@@ -27,12 +27,12 @@ module MailSlurpClient
|
|
27
27
|
|
28
28
|
attr_accessor :attachments
|
29
29
|
|
30
|
+
attr_accessor :created_at
|
31
|
+
|
30
32
|
attr_accessor :bcc
|
31
33
|
|
32
34
|
attr_accessor :cc
|
33
35
|
|
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',
|
53
54
|
:'bcc' => :'bcc',
|
54
55
|
:'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',
|
72
73
|
:'bcc' => :'Array<String>',
|
73
74
|
:'cc' => :'Array<String>',
|
74
|
-
:'created_at' => :'DateTime',
|
75
75
|
:'team_access' => :'Boolean',
|
76
76
|
:'read' => :'Boolean',
|
77
77
|
:'body_md5_hash' => :'String',
|
@@ -128,6 +128,10 @@ 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
|
+
|
131
135
|
if attributes.key?(:'bcc')
|
132
136
|
if (value = attributes[:'bcc']).is_a?(Array)
|
133
137
|
self.bcc = value
|
@@ -140,10 +144,6 @@ module MailSlurpClient
|
|
140
144
|
end
|
141
145
|
end
|
142
146
|
|
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 &&
|
208
209
|
bcc == o.bcc &&
|
209
210
|
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, bcc, cc,
|
226
|
+
[id, from, subject, inbox_id, to, attachments, created_at, bcc, cc, team_access, read, body_md5_hash, body_excerpt].hash
|
227
227
|
end
|
228
228
|
|
229
229
|
# Builds the object from hash
|
@@ -0,0 +1,225 @@
|
|
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
|
+
class InboxIdItem
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
attr_accessor :email_address
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'id' => :'id',
|
25
|
+
:'email_address' => :'emailAddress'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute type mapping.
|
30
|
+
def self.openapi_types
|
31
|
+
{
|
32
|
+
:'id' => :'String',
|
33
|
+
:'email_address' => :'String'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# List of attributes with nullable: true
|
38
|
+
def self.openapi_nullable
|
39
|
+
Set.new([
|
40
|
+
])
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
45
|
+
def initialize(attributes = {})
|
46
|
+
if (!attributes.is_a?(Hash))
|
47
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InboxIdItem` initialize method"
|
48
|
+
end
|
49
|
+
|
50
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
52
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
53
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InboxIdItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
54
|
+
end
|
55
|
+
h[k.to_sym] = v
|
56
|
+
}
|
57
|
+
|
58
|
+
if attributes.key?(:'id')
|
59
|
+
self.id = attributes[:'id']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.key?(:'email_address')
|
63
|
+
self.email_address = attributes[:'email_address']
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
68
|
+
# @return Array for valid properties with the reasons
|
69
|
+
def list_invalid_properties
|
70
|
+
invalid_properties = Array.new
|
71
|
+
if @id.nil?
|
72
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
73
|
+
end
|
74
|
+
|
75
|
+
if @email_address.nil?
|
76
|
+
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
77
|
+
end
|
78
|
+
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
return false if @id.nil?
|
86
|
+
return false if @email_address.nil?
|
87
|
+
true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks equality by comparing each attribute.
|
91
|
+
# @param [Object] Object to be compared
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
id == o.id &&
|
96
|
+
email_address == o.email_address
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Integer] Hash code
|
107
|
+
def hash
|
108
|
+
[id, email_address].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def self.build_from_hash(attributes)
|
115
|
+
new.build_from_hash(attributes)
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
self.class.openapi_types.each_pair do |key, type|
|
124
|
+
if type =~ /\AArray<(.*)>/i
|
125
|
+
# check to ensure the input is an array given that the attribute
|
126
|
+
# is documented as an array but the input is not
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
129
|
+
end
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
133
|
+
end
|
134
|
+
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
# Deserializes the data based on type
|
139
|
+
# @param string type Data type
|
140
|
+
# @param string value Value to be deserialized
|
141
|
+
# @return [Object] Deserialized data
|
142
|
+
def _deserialize(type, value)
|
143
|
+
case type.to_sym
|
144
|
+
when :DateTime
|
145
|
+
DateTime.parse(value)
|
146
|
+
when :Date
|
147
|
+
Date.parse(value)
|
148
|
+
when :String
|
149
|
+
value.to_s
|
150
|
+
when :Integer
|
151
|
+
value.to_i
|
152
|
+
when :Float
|
153
|
+
value.to_f
|
154
|
+
when :Boolean
|
155
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
156
|
+
true
|
157
|
+
else
|
158
|
+
false
|
159
|
+
end
|
160
|
+
when :Object
|
161
|
+
# generic object (usually a Hash), return directly
|
162
|
+
value
|
163
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
164
|
+
inner_type = Regexp.last_match[:inner_type]
|
165
|
+
value.map { |v| _deserialize(inner_type, v) }
|
166
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
167
|
+
k_type = Regexp.last_match[:k_type]
|
168
|
+
v_type = Regexp.last_match[:v_type]
|
169
|
+
{}.tap do |hash|
|
170
|
+
value.each do |k, v|
|
171
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
else # model
|
175
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
if value.nil?
|
198
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
|
+
end
|
201
|
+
|
202
|
+
hash[param] = _to_hash(value)
|
203
|
+
end
|
204
|
+
hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Outputs non-array value in the form of hash
|
208
|
+
# For object, use to_hash. Otherwise, just return the value
|
209
|
+
# @param [Object] value Any valid value
|
210
|
+
# @return [Hash] Returns the value in the form of hash
|
211
|
+
def _to_hash(value)
|
212
|
+
if value.is_a?(Array)
|
213
|
+
value.compact.map { |v| _to_hash(v) }
|
214
|
+
elsif value.is_a?(Hash)
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
217
|
+
end
|
218
|
+
elsif value.respond_to? :to_hash
|
219
|
+
value.to_hash
|
220
|
+
else
|
221
|
+
value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
@@ -23,10 +23,10 @@ module MailSlurpClient
|
|
23
23
|
|
24
24
|
attr_accessor :last
|
25
25
|
|
26
|
-
attr_accessor :total_pages
|
27
|
-
|
28
26
|
attr_accessor :total_elements
|
29
27
|
|
28
|
+
attr_accessor :total_pages
|
29
|
+
|
30
30
|
attr_accessor :size
|
31
31
|
|
32
32
|
attr_accessor :number
|
@@ -46,8 +46,8 @@ module MailSlurpClient
|
|
46
46
|
:'pageable' => :'pageable',
|
47
47
|
:'total' => :'total',
|
48
48
|
:'last' => :'last',
|
49
|
-
:'total_pages' => :'totalPages',
|
50
49
|
:'total_elements' => :'totalElements',
|
50
|
+
:'total_pages' => :'totalPages',
|
51
51
|
:'size' => :'size',
|
52
52
|
:'number' => :'number',
|
53
53
|
:'sort' => :'sort',
|
@@ -64,8 +64,8 @@ module MailSlurpClient
|
|
64
64
|
:'pageable' => :'PageableObject',
|
65
65
|
:'total' => :'Integer',
|
66
66
|
:'last' => :'Boolean',
|
67
|
-
:'total_pages' => :'Integer',
|
68
67
|
:'total_elements' => :'Integer',
|
68
|
+
:'total_pages' => :'Integer',
|
69
69
|
:'size' => :'Integer',
|
70
70
|
:'number' => :'Integer',
|
71
71
|
:'sort' => :'Sort',
|
@@ -114,14 +114,14 @@ module MailSlurpClient
|
|
114
114
|
self.last = attributes[:'last']
|
115
115
|
end
|
116
116
|
|
117
|
-
if attributes.key?(:'total_pages')
|
118
|
-
self.total_pages = attributes[:'total_pages']
|
119
|
-
end
|
120
|
-
|
121
117
|
if attributes.key?(:'total_elements')
|
122
118
|
self.total_elements = attributes[:'total_elements']
|
123
119
|
end
|
124
120
|
|
121
|
+
if attributes.key?(:'total_pages')
|
122
|
+
self.total_pages = attributes[:'total_pages']
|
123
|
+
end
|
124
|
+
|
125
125
|
if attributes.key?(:'size')
|
126
126
|
self.size = attributes[:'size']
|
127
127
|
end
|
@@ -169,8 +169,8 @@ module MailSlurpClient
|
|
169
169
|
pageable == o.pageable &&
|
170
170
|
total == o.total &&
|
171
171
|
last == o.last &&
|
172
|
-
total_pages == o.total_pages &&
|
173
172
|
total_elements == o.total_elements &&
|
173
|
+
total_pages == o.total_pages &&
|
174
174
|
size == o.size &&
|
175
175
|
number == o.number &&
|
176
176
|
sort == o.sort &&
|
@@ -188,7 +188,7 @@ module MailSlurpClient
|
|
188
188
|
# Calculates hash code according to all attributes.
|
189
189
|
# @return [Integer] Hash code
|
190
190
|
def hash
|
191
|
-
[content, pageable, total, last,
|
191
|
+
[content, pageable, total, last, total_elements, total_pages, size, number, sort, first, number_of_elements, empty].hash
|
192
192
|
end
|
193
193
|
|
194
194
|
# Builds the object from hash
|
@@ -23,10 +23,10 @@ module MailSlurpClient
|
|
23
23
|
|
24
24
|
attr_accessor :last
|
25
25
|
|
26
|
-
attr_accessor :total_pages
|
27
|
-
|
28
26
|
attr_accessor :total_elements
|
29
27
|
|
28
|
+
attr_accessor :total_pages
|
29
|
+
|
30
30
|
attr_accessor :size
|
31
31
|
|
32
32
|
attr_accessor :number
|
@@ -46,8 +46,8 @@ module MailSlurpClient
|
|
46
46
|
:'pageable' => :'pageable',
|
47
47
|
:'total' => :'total',
|
48
48
|
:'last' => :'last',
|
49
|
-
:'total_pages' => :'totalPages',
|
50
49
|
:'total_elements' => :'totalElements',
|
50
|
+
:'total_pages' => :'totalPages',
|
51
51
|
:'size' => :'size',
|
52
52
|
:'number' => :'number',
|
53
53
|
:'sort' => :'sort',
|
@@ -64,8 +64,8 @@ module MailSlurpClient
|
|
64
64
|
:'pageable' => :'PageableObject',
|
65
65
|
:'total' => :'Integer',
|
66
66
|
:'last' => :'Boolean',
|
67
|
-
:'total_pages' => :'Integer',
|
68
67
|
:'total_elements' => :'Integer',
|
68
|
+
:'total_pages' => :'Integer',
|
69
69
|
:'size' => :'Integer',
|
70
70
|
:'number' => :'Integer',
|
71
71
|
:'sort' => :'Sort',
|
@@ -114,14 +114,14 @@ module MailSlurpClient
|
|
114
114
|
self.last = attributes[:'last']
|
115
115
|
end
|
116
116
|
|
117
|
-
if attributes.key?(:'total_pages')
|
118
|
-
self.total_pages = attributes[:'total_pages']
|
119
|
-
end
|
120
|
-
|
121
117
|
if attributes.key?(:'total_elements')
|
122
118
|
self.total_elements = attributes[:'total_elements']
|
123
119
|
end
|
124
120
|
|
121
|
+
if attributes.key?(:'total_pages')
|
122
|
+
self.total_pages = attributes[:'total_pages']
|
123
|
+
end
|
124
|
+
|
125
125
|
if attributes.key?(:'size')
|
126
126
|
self.size = attributes[:'size']
|
127
127
|
end
|
@@ -169,8 +169,8 @@ module MailSlurpClient
|
|
169
169
|
pageable == o.pageable &&
|
170
170
|
total == o.total &&
|
171
171
|
last == o.last &&
|
172
|
-
total_pages == o.total_pages &&
|
173
172
|
total_elements == o.total_elements &&
|
173
|
+
total_pages == o.total_pages &&
|
174
174
|
size == o.size &&
|
175
175
|
number == o.number &&
|
176
176
|
sort == o.sort &&
|
@@ -188,7 +188,7 @@ module MailSlurpClient
|
|
188
188
|
# Calculates hash code according to all attributes.
|
189
189
|
# @return [Integer] Hash code
|
190
190
|
def hash
|
191
|
-
[content, pageable, total, last,
|
191
|
+
[content, pageable, total, last, total_elements, total_pages, size, number, sort, first, number_of_elements, empty].hash
|
192
192
|
end
|
193
193
|
|
194
194
|
# Builds the object from hash
|