mailslurp_client 15.2.8 → 15.3.0
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/api/inbox_controller_api.rb +56 -0
- data/lib/mailslurp_client/models/alias_projection.rb +15 -15
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
- data/lib/mailslurp_client/models/inbox_ids_result.rb +213 -0
- 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 +15 -15
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e8f762eab0c9bf606cc5404b0f46a25612abe978c69fe65490dd6bc2ad59fa9
|
4
|
+
data.tar.gz: 42478b862c0f3df7d6a1df0fd6ff555f8295706c70dd45cdb80095a9e40e6671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5731ab58c4d5e60bbdcfefebde9cd5841887a9959c7d9b726d6d6879489a3f0c826d5ec399950bacef40741516b710bd7c572aed39cddd8890a62d5669a2c095
|
7
|
+
data.tar.gz: 8bcd0af7395b58601c49a4781f53a3bea26472ea960c9769f902ccccad35d010487c36b80012def2ba12e47d75f8776e8f4b6c8be1586a015ae57efbdbb58702
|
@@ -978,6 +978,62 @@ module MailSlurpClient
|
|
978
978
|
return data, status_code, headers
|
979
979
|
end
|
980
980
|
|
981
|
+
# Get all inbox IDs
|
982
|
+
# Get list of inbox IDs
|
983
|
+
# @param [Hash] opts the optional parameters
|
984
|
+
# @return [InboxIdsResult]
|
985
|
+
def get_inbox_ids(opts = {})
|
986
|
+
data, _status_code, _headers = get_inbox_ids_with_http_info(opts)
|
987
|
+
data
|
988
|
+
end
|
989
|
+
|
990
|
+
# Get all inbox IDs
|
991
|
+
# Get list of inbox IDs
|
992
|
+
# @param [Hash] opts the optional parameters
|
993
|
+
# @return [Array<(InboxIdsResult, Integer, Hash)>] InboxIdsResult data, response status code and response headers
|
994
|
+
def get_inbox_ids_with_http_info(opts = {})
|
995
|
+
if @api_client.config.debugging
|
996
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_ids ...'
|
997
|
+
end
|
998
|
+
# resource path
|
999
|
+
local_var_path = '/inboxes/ids'
|
1000
|
+
|
1001
|
+
# query parameters
|
1002
|
+
query_params = opts[:query_params] || {}
|
1003
|
+
|
1004
|
+
# header parameters
|
1005
|
+
header_params = opts[:header_params] || {}
|
1006
|
+
# HTTP header 'Accept' (if needed)
|
1007
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
1008
|
+
|
1009
|
+
# form parameters
|
1010
|
+
form_params = opts[:form_params] || {}
|
1011
|
+
|
1012
|
+
# http body (model)
|
1013
|
+
post_body = opts[:body]
|
1014
|
+
|
1015
|
+
# return_type
|
1016
|
+
return_type = opts[:return_type] || 'InboxIdsResult'
|
1017
|
+
|
1018
|
+
# auth_names
|
1019
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
1020
|
+
|
1021
|
+
new_options = opts.merge(
|
1022
|
+
:header_params => header_params,
|
1023
|
+
:query_params => query_params,
|
1024
|
+
:form_params => form_params,
|
1025
|
+
:body => post_body,
|
1026
|
+
:auth_names => auth_names,
|
1027
|
+
:return_type => return_type
|
1028
|
+
)
|
1029
|
+
|
1030
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1031
|
+
if @api_client.config.debugging
|
1032
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1033
|
+
end
|
1034
|
+
return data, status_code, headers
|
1035
|
+
end
|
1036
|
+
|
981
1037
|
# Get Inbox Sent Emails
|
982
1038
|
# Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead.
|
983
1039
|
# @param inbox_id [String]
|
@@ -19,12 +19,12 @@ module MailSlurpClient
|
|
19
19
|
|
20
20
|
attr_accessor :id
|
21
21
|
|
22
|
+
attr_accessor :user_id
|
23
|
+
|
22
24
|
attr_accessor :email_address
|
23
25
|
|
24
26
|
attr_accessor :inbox_id
|
25
27
|
|
26
|
-
attr_accessor :user_id
|
27
|
-
|
28
28
|
attr_accessor :created_at
|
29
29
|
|
30
30
|
attr_accessor :use_threads
|
@@ -36,9 +36,9 @@ module MailSlurpClient
|
|
36
36
|
{
|
37
37
|
:'name' => :'name',
|
38
38
|
:'id' => :'id',
|
39
|
+
:'user_id' => :'userId',
|
39
40
|
:'email_address' => :'emailAddress',
|
40
41
|
:'inbox_id' => :'inboxId',
|
41
|
-
:'user_id' => :'userId',
|
42
42
|
:'created_at' => :'createdAt',
|
43
43
|
:'use_threads' => :'useThreads',
|
44
44
|
:'updated_at' => :'updatedAt'
|
@@ -50,9 +50,9 @@ module MailSlurpClient
|
|
50
50
|
{
|
51
51
|
:'name' => :'String',
|
52
52
|
:'id' => :'String',
|
53
|
+
:'user_id' => :'String',
|
53
54
|
:'email_address' => :'String',
|
54
55
|
:'inbox_id' => :'String',
|
55
|
-
:'user_id' => :'String',
|
56
56
|
:'created_at' => :'DateTime',
|
57
57
|
:'use_threads' => :'Boolean',
|
58
58
|
:'updated_at' => :'DateTime'
|
@@ -88,6 +88,10 @@ module MailSlurpClient
|
|
88
88
|
self.id = attributes[:'id']
|
89
89
|
end
|
90
90
|
|
91
|
+
if attributes.key?(:'user_id')
|
92
|
+
self.user_id = attributes[:'user_id']
|
93
|
+
end
|
94
|
+
|
91
95
|
if attributes.key?(:'email_address')
|
92
96
|
self.email_address = attributes[:'email_address']
|
93
97
|
end
|
@@ -96,10 +100,6 @@ module MailSlurpClient
|
|
96
100
|
self.inbox_id = attributes[:'inbox_id']
|
97
101
|
end
|
98
102
|
|
99
|
-
if attributes.key?(:'user_id')
|
100
|
-
self.user_id = attributes[:'user_id']
|
101
|
-
end
|
102
|
-
|
103
103
|
if attributes.key?(:'created_at')
|
104
104
|
self.created_at = attributes[:'created_at']
|
105
105
|
end
|
@@ -121,6 +121,10 @@ module MailSlurpClient
|
|
121
121
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
122
122
|
end
|
123
123
|
|
124
|
+
if @user_id.nil?
|
125
|
+
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
126
|
+
end
|
127
|
+
|
124
128
|
if @email_address.nil?
|
125
129
|
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
126
130
|
end
|
@@ -129,10 +133,6 @@ module MailSlurpClient
|
|
129
133
|
invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
|
130
134
|
end
|
131
135
|
|
132
|
-
if @user_id.nil?
|
133
|
-
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
134
|
-
end
|
135
|
-
|
136
136
|
if @created_at.nil?
|
137
137
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
138
138
|
end
|
@@ -148,9 +148,9 @@ module MailSlurpClient
|
|
148
148
|
# @return true if the model is valid
|
149
149
|
def valid?
|
150
150
|
return false if @id.nil?
|
151
|
+
return false if @user_id.nil?
|
151
152
|
return false if @email_address.nil?
|
152
153
|
return false if @inbox_id.nil?
|
153
|
-
return false if @user_id.nil?
|
154
154
|
return false if @created_at.nil?
|
155
155
|
return false if @updated_at.nil?
|
156
156
|
true
|
@@ -163,9 +163,9 @@ module MailSlurpClient
|
|
163
163
|
self.class == o.class &&
|
164
164
|
name == o.name &&
|
165
165
|
id == o.id &&
|
166
|
+
user_id == o.user_id &&
|
166
167
|
email_address == o.email_address &&
|
167
168
|
inbox_id == o.inbox_id &&
|
168
|
-
user_id == o.user_id &&
|
169
169
|
created_at == o.created_at &&
|
170
170
|
use_threads == o.use_threads &&
|
171
171
|
updated_at == o.updated_at
|
@@ -180,7 +180,7 @@ module MailSlurpClient
|
|
180
180
|
# Calculates hash code according to all attributes.
|
181
181
|
# @return [Integer] Hash code
|
182
182
|
def hash
|
183
|
-
[name, id, email_address, inbox_id,
|
183
|
+
[name, id, user_id, email_address, inbox_id, created_at, use_threads, updated_at].hash
|
184
184
|
end
|
185
185
|
|
186
186
|
# Builds the object from hash
|
@@ -16,18 +16,18 @@ module MailSlurpClient
|
|
16
16
|
class ExpiredInboxRecordProjection
|
17
17
|
attr_accessor :id
|
18
18
|
|
19
|
-
attr_accessor :email_address
|
20
|
-
|
21
19
|
attr_accessor :user_id
|
22
20
|
|
21
|
+
attr_accessor :email_address
|
22
|
+
|
23
23
|
attr_accessor :created_at
|
24
24
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
26
|
def self.attribute_map
|
27
27
|
{
|
28
28
|
:'id' => :'id',
|
29
|
-
:'email_address' => :'emailAddress',
|
30
29
|
:'user_id' => :'userId',
|
30
|
+
:'email_address' => :'emailAddress',
|
31
31
|
:'created_at' => :'createdAt'
|
32
32
|
}
|
33
33
|
end
|
@@ -36,8 +36,8 @@ module MailSlurpClient
|
|
36
36
|
def self.openapi_types
|
37
37
|
{
|
38
38
|
:'id' => :'String',
|
39
|
-
:'email_address' => :'String',
|
40
39
|
:'user_id' => :'String',
|
40
|
+
:'email_address' => :'String',
|
41
41
|
:'created_at' => :'DateTime'
|
42
42
|
}
|
43
43
|
end
|
@@ -67,14 +67,14 @@ module MailSlurpClient
|
|
67
67
|
self.id = attributes[:'id']
|
68
68
|
end
|
69
69
|
|
70
|
-
if attributes.key?(:'email_address')
|
71
|
-
self.email_address = attributes[:'email_address']
|
72
|
-
end
|
73
|
-
|
74
70
|
if attributes.key?(:'user_id')
|
75
71
|
self.user_id = attributes[:'user_id']
|
76
72
|
end
|
77
73
|
|
74
|
+
if attributes.key?(:'email_address')
|
75
|
+
self.email_address = attributes[:'email_address']
|
76
|
+
end
|
77
|
+
|
78
78
|
if attributes.key?(:'created_at')
|
79
79
|
self.created_at = attributes[:'created_at']
|
80
80
|
end
|
@@ -88,14 +88,14 @@ module MailSlurpClient
|
|
88
88
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
89
89
|
end
|
90
90
|
|
91
|
-
if @email_address.nil?
|
92
|
-
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
93
|
-
end
|
94
|
-
|
95
91
|
if @user_id.nil?
|
96
92
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
97
93
|
end
|
98
94
|
|
95
|
+
if @email_address.nil?
|
96
|
+
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
97
|
+
end
|
98
|
+
|
99
99
|
if @created_at.nil?
|
100
100
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
101
101
|
end
|
@@ -107,8 +107,8 @@ module MailSlurpClient
|
|
107
107
|
# @return true if the model is valid
|
108
108
|
def valid?
|
109
109
|
return false if @id.nil?
|
110
|
-
return false if @email_address.nil?
|
111
110
|
return false if @user_id.nil?
|
111
|
+
return false if @email_address.nil?
|
112
112
|
return false if @created_at.nil?
|
113
113
|
true
|
114
114
|
end
|
@@ -119,8 +119,8 @@ module MailSlurpClient
|
|
119
119
|
return true if self.equal?(o)
|
120
120
|
self.class == o.class &&
|
121
121
|
id == o.id &&
|
122
|
-
email_address == o.email_address &&
|
123
122
|
user_id == o.user_id &&
|
123
|
+
email_address == o.email_address &&
|
124
124
|
created_at == o.created_at
|
125
125
|
end
|
126
126
|
|
@@ -133,7 +133,7 @@ module MailSlurpClient
|
|
133
133
|
# Calculates hash code according to all attributes.
|
134
134
|
# @return [Integer] Hash code
|
135
135
|
def hash
|
136
|
-
[id,
|
136
|
+
[id, user_id, email_address, created_at].hash
|
137
137
|
end
|
138
138
|
|
139
139
|
# Builds the object from hash
|
@@ -0,0 +1,213 @@
|
|
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 InboxIdsResult
|
17
|
+
attr_accessor :inbox_ids
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'inbox_ids' => :'inboxIds'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'inbox_ids' => :'Array<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::InboxIdsResult` 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::InboxIdsResult`. 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?(:'inbox_ids')
|
55
|
+
if (value = attributes[:'inbox_ids']).is_a?(Array)
|
56
|
+
self.inbox_ids = value
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
if @inbox_ids.nil?
|
66
|
+
invalid_properties.push('invalid value for "inbox_ids", inbox_ids cannot be nil.')
|
67
|
+
end
|
68
|
+
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
return false if @inbox_ids.nil?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
inbox_ids == o.inbox_ids
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Integer] Hash code
|
95
|
+
def hash
|
96
|
+
[inbox_ids].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def self.build_from_hash(attributes)
|
103
|
+
new.build_from_hash(attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if type =~ /\AArray<(.*)>/i
|
113
|
+
# check to ensure the input is an array given that the attribute
|
114
|
+
# is documented as an array but the input is not
|
115
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
116
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
117
|
+
end
|
118
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
119
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
120
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
121
|
+
end
|
122
|
+
|
123
|
+
self
|
124
|
+
end
|
125
|
+
|
126
|
+
# Deserializes the data based on type
|
127
|
+
# @param string type Data type
|
128
|
+
# @param string value Value to be deserialized
|
129
|
+
# @return [Object] Deserialized data
|
130
|
+
def _deserialize(type, value)
|
131
|
+
case type.to_sym
|
132
|
+
when :DateTime
|
133
|
+
DateTime.parse(value)
|
134
|
+
when :Date
|
135
|
+
Date.parse(value)
|
136
|
+
when :String
|
137
|
+
value.to_s
|
138
|
+
when :Integer
|
139
|
+
value.to_i
|
140
|
+
when :Float
|
141
|
+
value.to_f
|
142
|
+
when :Boolean
|
143
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
144
|
+
true
|
145
|
+
else
|
146
|
+
false
|
147
|
+
end
|
148
|
+
when :Object
|
149
|
+
# generic object (usually a Hash), return directly
|
150
|
+
value
|
151
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
152
|
+
inner_type = Regexp.last_match[:inner_type]
|
153
|
+
value.map { |v| _deserialize(inner_type, v) }
|
154
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
155
|
+
k_type = Regexp.last_match[:k_type]
|
156
|
+
v_type = Regexp.last_match[:v_type]
|
157
|
+
{}.tap do |hash|
|
158
|
+
value.each do |k, v|
|
159
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
else # model
|
163
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the string representation of the object
|
168
|
+
# @return [String] String presentation of the object
|
169
|
+
def to_s
|
170
|
+
to_hash.to_s
|
171
|
+
end
|
172
|
+
|
173
|
+
# to_body is an alias to to_hash (backward compatibility)
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_body
|
176
|
+
to_hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the object in the form of hash
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_hash
|
182
|
+
hash = {}
|
183
|
+
self.class.attribute_map.each_pair do |attr, param|
|
184
|
+
value = self.send(attr)
|
185
|
+
if value.nil?
|
186
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
|
+
end
|
189
|
+
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map { |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
@@ -23,10 +23,10 @@ module MailSlurpClient
|
|
23
23
|
|
24
24
|
attr_accessor :last
|
25
25
|
|
26
|
-
attr_accessor :total_elements
|
27
|
-
|
28
26
|
attr_accessor :total_pages
|
29
27
|
|
28
|
+
attr_accessor :total_elements
|
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_elements' => :'totalElements',
|
50
49
|
:'total_pages' => :'totalPages',
|
50
|
+
:'total_elements' => :'totalElements',
|
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_elements' => :'Integer',
|
68
67
|
:'total_pages' => :'Integer',
|
68
|
+
:'total_elements' => :'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_elements')
|
118
|
-
self.total_elements = attributes[:'total_elements']
|
119
|
-
end
|
120
|
-
|
121
117
|
if attributes.key?(:'total_pages')
|
122
118
|
self.total_pages = attributes[:'total_pages']
|
123
119
|
end
|
124
120
|
|
121
|
+
if attributes.key?(:'total_elements')
|
122
|
+
self.total_elements = attributes[:'total_elements']
|
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_elements == o.total_elements &&
|
173
172
|
total_pages == o.total_pages &&
|
173
|
+
total_elements == o.total_elements &&
|
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_pages, total_elements, 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_elements
|
27
|
-
|
28
26
|
attr_accessor :total_pages
|
29
27
|
|
28
|
+
attr_accessor :total_elements
|
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_elements' => :'totalElements',
|
50
49
|
:'total_pages' => :'totalPages',
|
50
|
+
:'total_elements' => :'totalElements',
|
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_elements' => :'Integer',
|
68
67
|
:'total_pages' => :'Integer',
|
68
|
+
:'total_elements' => :'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_elements')
|
118
|
-
self.total_elements = attributes[:'total_elements']
|
119
|
-
end
|
120
|
-
|
121
117
|
if attributes.key?(:'total_pages')
|
122
118
|
self.total_pages = attributes[:'total_pages']
|
123
119
|
end
|
124
120
|
|
121
|
+
if attributes.key?(:'total_elements')
|
122
|
+
self.total_elements = attributes[:'total_elements']
|
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_elements == o.total_elements &&
|
173
172
|
total_pages == o.total_pages &&
|
173
|
+
total_elements == o.total_elements &&
|
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_pages, total_elements, size, number, sort, first, number_of_elements, empty].hash
|
192
192
|
end
|
193
193
|
|
194
194
|
# Builds the object from hash
|