mailslurp_client 15.20.0 → 15.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -0
- data/lib/mailslurp_client/api/bounce_controller_api.rb +79 -0
- data/lib/mailslurp_client/api/inbox_controller_api.rb +56 -2
- data/lib/mailslurp_client/api/o_auth_connection_api.rb +170 -0
- data/lib/mailslurp_client/api/phone_controller_api.rb +381 -1
- data/lib/mailslurp_client/api/user_controller_api.rb +267 -0
- data/lib/mailslurp_client/models/alias_projection.rb +29 -29
- data/lib/mailslurp_client/models/alias_thread_projection.rb +39 -39
- data/lib/mailslurp_client/models/attachment_projection.rb +25 -25
- data/lib/mailslurp_client/models/bounce_projection.rb +22 -22
- data/lib/mailslurp_client/models/bounce_recipient_projection.rb +10 -10
- data/lib/mailslurp_client/models/connector_event_projection.rb +15 -15
- data/lib/mailslurp_client/models/connector_projection.rb +15 -15
- data/lib/mailslurp_client/models/contact_projection.rb +10 -10
- data/lib/mailslurp_client/models/create_emergency_address_options.rb +2 -2
- data/lib/mailslurp_client/models/create_o_auth_connection_result.rb +211 -0
- data/lib/mailslurp_client/models/create_o_auth_exchange_result.rb +229 -0
- data/lib/mailslurp_client/models/create_phone_number_options.rb +284 -0
- data/lib/mailslurp_client/models/domain_dto.rb +27 -1
- data/lib/mailslurp_client/models/email.rb +12 -1
- data/lib/mailslurp_client/models/email_preview.rb +15 -5
- data/lib/mailslurp_client/models/email_projection.rb +35 -25
- data/lib/mailslurp_client/models/email_thread_projection.rb +52 -52
- data/lib/mailslurp_client/models/emergency_address.rb +2 -2
- data/lib/mailslurp_client/models/emergency_address_dto.rb +2 -2
- data/lib/mailslurp_client/models/entity_automation_item_projection.rb +295 -0
- data/lib/mailslurp_client/models/entity_event_item_projection.rb +303 -0
- data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +296 -0
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
- data/lib/mailslurp_client/models/guest_portal_user_projection.rb +39 -39
- data/lib/mailslurp_client/models/inbox_dto.rb +2 -2
- data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +10 -10
- data/lib/mailslurp_client/models/inbox_preview.rb +2 -2
- data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +10 -10
- data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +15 -15
- data/lib/mailslurp_client/models/missed_email_projection.rb +14 -14
- data/lib/mailslurp_client/models/opt_in_identity_projection.rb +29 -29
- data/lib/mailslurp_client/models/organization_inbox_projection.rb +2 -2
- data/lib/mailslurp_client/models/page_entity_automation_items.rb +309 -0
- data/lib/mailslurp_client/models/page_entity_event_items.rb +309 -0
- data/lib/mailslurp_client/models/page_entity_favourite_items.rb +309 -0
- data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +309 -0
- data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +309 -0
- data/lib/mailslurp_client/models/page_reputation_items.rb +309 -0
- data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +315 -0
- data/lib/mailslurp_client/models/phone_message_thread_projection.rb +315 -0
- data/lib/mailslurp_client/models/phone_number_dto.rb +2 -2
- data/lib/mailslurp_client/models/phone_number_projection.rb +17 -17
- data/lib/mailslurp_client/models/phone_plan_availability_item.rb +2 -2
- data/lib/mailslurp_client/models/phone_plan_dto.rb +2 -2
- data/lib/mailslurp_client/models/plus_address_projection.rb +29 -29
- data/lib/mailslurp_client/models/reputation_item_projection.rb +317 -0
- data/lib/mailslurp_client/models/search_inboxes_options.rb +2 -2
- data/lib/mailslurp_client/models/sent_email_dto.rb +12 -1
- data/lib/mailslurp_client/models/sent_email_projection.rb +25 -25
- data/lib/mailslurp_client/models/sent_sms_projection.rb +15 -15
- data/lib/mailslurp_client/models/sms_preview.rb +15 -1
- data/lib/mailslurp_client/models/sms_projection.rb +15 -15
- data/lib/mailslurp_client/models/template_projection.rb +15 -15
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +15 -15
- data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/wait_for_sms_conditions.rb +1 -1
- data/lib/mailslurp_client/models/webhook_projection.rb +47 -47
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +16 -0
- metadata +18 -2
@@ -15,10 +15,10 @@ 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
|
|
20
|
+
attr_accessor :created_at
|
21
|
+
|
22
22
|
attr_accessor :phone_number
|
23
23
|
|
24
24
|
attr_accessor :phone_country
|
@@ -52,8 +52,8 @@ module MailSlurpClient
|
|
52
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
53
53
|
def self.attribute_map
|
54
54
|
{
|
55
|
-
:'created_at' => :'createdAt',
|
56
55
|
:'user_id' => :'userId',
|
56
|
+
:'created_at' => :'createdAt',
|
57
57
|
:'phone_number' => :'phoneNumber',
|
58
58
|
:'phone_country' => :'phoneCountry',
|
59
59
|
:'name' => :'name',
|
@@ -64,8 +64,8 @@ module MailSlurpClient
|
|
64
64
|
# Attribute type mapping.
|
65
65
|
def self.openapi_types
|
66
66
|
{
|
67
|
-
:'created_at' => :'DateTime',
|
68
67
|
:'user_id' => :'String',
|
68
|
+
:'created_at' => :'DateTime',
|
69
69
|
:'phone_number' => :'String',
|
70
70
|
:'phone_country' => :'String',
|
71
71
|
:'name' => :'String',
|
@@ -94,14 +94,14 @@ module MailSlurpClient
|
|
94
94
|
h[k.to_sym] = v
|
95
95
|
}
|
96
96
|
|
97
|
-
if attributes.key?(:'created_at')
|
98
|
-
self.created_at = attributes[:'created_at']
|
99
|
-
end
|
100
|
-
|
101
97
|
if attributes.key?(:'user_id')
|
102
98
|
self.user_id = attributes[:'user_id']
|
103
99
|
end
|
104
100
|
|
101
|
+
if attributes.key?(:'created_at')
|
102
|
+
self.created_at = attributes[:'created_at']
|
103
|
+
end
|
104
|
+
|
105
105
|
if attributes.key?(:'phone_number')
|
106
106
|
self.phone_number = attributes[:'phone_number']
|
107
107
|
end
|
@@ -123,14 +123,14 @@ module MailSlurpClient
|
|
123
123
|
# @return Array for valid properties with the reasons
|
124
124
|
def list_invalid_properties
|
125
125
|
invalid_properties = Array.new
|
126
|
-
if @created_at.nil?
|
127
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
128
|
-
end
|
129
|
-
|
130
126
|
if @user_id.nil?
|
131
127
|
invalid_properties.push('invalid value for "user_id", user_id 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 @phone_number.nil?
|
135
135
|
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
136
136
|
end
|
@@ -149,11 +149,11 @@ module MailSlurpClient
|
|
149
149
|
# Check to see if the all the properties in the model are valid
|
150
150
|
# @return true if the model is valid
|
151
151
|
def valid?
|
152
|
-
return false if @created_at.nil?
|
153
152
|
return false if @user_id.nil?
|
153
|
+
return false if @created_at.nil?
|
154
154
|
return false if @phone_number.nil?
|
155
155
|
return false if @phone_country.nil?
|
156
|
-
phone_country_validator = EnumAttributeValidator.new('String', ["US", "GB", "AU"])
|
156
|
+
phone_country_validator = EnumAttributeValidator.new('String', ["US", "GB", "AU", "CA", "EE", "HK", "PL", "CH", "PT", "NL", "IL", "SE"])
|
157
157
|
return false unless phone_country_validator.valid?(@phone_country)
|
158
158
|
return false if @id.nil?
|
159
159
|
true
|
@@ -162,7 +162,7 @@ module MailSlurpClient
|
|
162
162
|
# Custom attribute writer method checking allowed values (enum).
|
163
163
|
# @param [Object] phone_country Object to be assigned
|
164
164
|
def phone_country=(phone_country)
|
165
|
-
validator = EnumAttributeValidator.new('String', ["US", "GB", "AU"])
|
165
|
+
validator = EnumAttributeValidator.new('String', ["US", "GB", "AU", "CA", "EE", "HK", "PL", "CH", "PT", "NL", "IL", "SE"])
|
166
166
|
unless validator.valid?(phone_country)
|
167
167
|
fail ArgumentError, "invalid value for \"phone_country\", must be one of #{validator.allowable_values}."
|
168
168
|
end
|
@@ -174,8 +174,8 @@ module MailSlurpClient
|
|
174
174
|
def ==(o)
|
175
175
|
return true if self.equal?(o)
|
176
176
|
self.class == o.class &&
|
177
|
-
created_at == o.created_at &&
|
178
177
|
user_id == o.user_id &&
|
178
|
+
created_at == o.created_at &&
|
179
179
|
phone_number == o.phone_number &&
|
180
180
|
phone_country == o.phone_country &&
|
181
181
|
name == o.name &&
|
@@ -191,7 +191,7 @@ module MailSlurpClient
|
|
191
191
|
# Calculates hash code according to all attributes.
|
192
192
|
# @return [Integer] Hash code
|
193
193
|
def hash
|
194
|
-
[
|
194
|
+
[user_id, created_at, phone_number, phone_country, name, id].hash
|
195
195
|
end
|
196
196
|
|
197
197
|
# Builds the object from hash
|
@@ -105,7 +105,7 @@ module MailSlurpClient
|
|
105
105
|
# @return true if the model is valid
|
106
106
|
def valid?
|
107
107
|
return false if @phone_country.nil?
|
108
|
-
phone_country_validator = EnumAttributeValidator.new('String', ["US", "GB", "AU"])
|
108
|
+
phone_country_validator = EnumAttributeValidator.new('String', ["US", "GB", "AU", "CA", "EE", "HK", "PL", "CH", "PT", "NL", "IL", "SE"])
|
109
109
|
return false unless phone_country_validator.valid?(@phone_country)
|
110
110
|
return false if @availability_status.nil?
|
111
111
|
availability_status_validator = EnumAttributeValidator.new('String', ["AVAILABLE", "NON_MATCHING_SUBSCRIPTION_CURRENCY", "NON_MATCHING_SUBSCRIPTION_TYPE", "ALREADY_ASSIGNED"])
|
@@ -116,7 +116,7 @@ module MailSlurpClient
|
|
116
116
|
# Custom attribute writer method checking allowed values (enum).
|
117
117
|
# @param [Object] phone_country Object to be assigned
|
118
118
|
def phone_country=(phone_country)
|
119
|
-
validator = EnumAttributeValidator.new('String', ["US", "GB", "AU"])
|
119
|
+
validator = EnumAttributeValidator.new('String', ["US", "GB", "AU", "CA", "EE", "HK", "PL", "CH", "PT", "NL", "IL", "SE"])
|
120
120
|
unless validator.valid?(phone_country)
|
121
121
|
fail ArgumentError, "invalid value for \"phone_country\", must be one of #{validator.allowable_values}."
|
122
122
|
end
|
@@ -131,7 +131,7 @@ module MailSlurpClient
|
|
131
131
|
return false if @id.nil?
|
132
132
|
return false if @user_id.nil?
|
133
133
|
return false if @phone_country.nil?
|
134
|
-
phone_country_validator = EnumAttributeValidator.new('String', ["US", "GB", "AU"])
|
134
|
+
phone_country_validator = EnumAttributeValidator.new('String', ["US", "GB", "AU", "CA", "EE", "HK", "PL", "CH", "PT", "NL", "IL", "SE"])
|
135
135
|
return false unless phone_country_validator.valid?(@phone_country)
|
136
136
|
return false if @created_at.nil?
|
137
137
|
true
|
@@ -140,7 +140,7 @@ module MailSlurpClient
|
|
140
140
|
# Custom attribute writer method checking allowed values (enum).
|
141
141
|
# @param [Object] phone_country Object to be assigned
|
142
142
|
def phone_country=(phone_country)
|
143
|
-
validator = EnumAttributeValidator.new('String', ["US", "GB", "AU"])
|
143
|
+
validator = EnumAttributeValidator.new('String', ["US", "GB", "AU", "CA", "EE", "HK", "PL", "CH", "PT", "NL", "IL", "SE"])
|
144
144
|
unless validator.valid?(phone_country)
|
145
145
|
fail ArgumentError, "invalid value for \"phone_country\", must be one of #{validator.allowable_values}."
|
146
146
|
end
|
@@ -14,14 +14,14 @@ require 'date'
|
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
16
|
class PlusAddressProjection
|
17
|
-
attr_accessor :created_at
|
18
|
-
|
19
|
-
attr_accessor :updated_at
|
20
|
-
|
21
17
|
attr_accessor :user_id
|
22
18
|
|
23
19
|
attr_accessor :inbox_id
|
24
20
|
|
21
|
+
attr_accessor :updated_at
|
22
|
+
|
23
|
+
attr_accessor :created_at
|
24
|
+
|
25
25
|
attr_accessor :plus_address
|
26
26
|
|
27
27
|
attr_accessor :full_address
|
@@ -31,10 +31,10 @@ module MailSlurpClient
|
|
31
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
32
|
def self.attribute_map
|
33
33
|
{
|
34
|
-
:'created_at' => :'createdAt',
|
35
|
-
:'updated_at' => :'updatedAt',
|
36
34
|
:'user_id' => :'userId',
|
37
35
|
:'inbox_id' => :'inboxId',
|
36
|
+
:'updated_at' => :'updatedAt',
|
37
|
+
:'created_at' => :'createdAt',
|
38
38
|
:'plus_address' => :'plusAddress',
|
39
39
|
:'full_address' => :'fullAddress',
|
40
40
|
:'id' => :'id'
|
@@ -44,10 +44,10 @@ module MailSlurpClient
|
|
44
44
|
# Attribute type mapping.
|
45
45
|
def self.openapi_types
|
46
46
|
{
|
47
|
-
:'created_at' => :'DateTime',
|
48
|
-
:'updated_at' => :'DateTime',
|
49
47
|
:'user_id' => :'String',
|
50
48
|
:'inbox_id' => :'String',
|
49
|
+
:'updated_at' => :'DateTime',
|
50
|
+
:'created_at' => :'DateTime',
|
51
51
|
:'plus_address' => :'String',
|
52
52
|
:'full_address' => :'String',
|
53
53
|
:'id' => :'String'
|
@@ -75,14 +75,6 @@ module MailSlurpClient
|
|
75
75
|
h[k.to_sym] = v
|
76
76
|
}
|
77
77
|
|
78
|
-
if attributes.key?(:'created_at')
|
79
|
-
self.created_at = attributes[:'created_at']
|
80
|
-
end
|
81
|
-
|
82
|
-
if attributes.key?(:'updated_at')
|
83
|
-
self.updated_at = attributes[:'updated_at']
|
84
|
-
end
|
85
|
-
|
86
78
|
if attributes.key?(:'user_id')
|
87
79
|
self.user_id = attributes[:'user_id']
|
88
80
|
end
|
@@ -91,6 +83,14 @@ module MailSlurpClient
|
|
91
83
|
self.inbox_id = attributes[:'inbox_id']
|
92
84
|
end
|
93
85
|
|
86
|
+
if attributes.key?(:'updated_at')
|
87
|
+
self.updated_at = attributes[:'updated_at']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'created_at')
|
91
|
+
self.created_at = attributes[:'created_at']
|
92
|
+
end
|
93
|
+
|
94
94
|
if attributes.key?(:'plus_address')
|
95
95
|
self.plus_address = attributes[:'plus_address']
|
96
96
|
end
|
@@ -108,14 +108,6 @@ module MailSlurpClient
|
|
108
108
|
# @return Array for valid properties with the reasons
|
109
109
|
def list_invalid_properties
|
110
110
|
invalid_properties = Array.new
|
111
|
-
if @created_at.nil?
|
112
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
113
|
-
end
|
114
|
-
|
115
|
-
if @updated_at.nil?
|
116
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
117
|
-
end
|
118
|
-
|
119
111
|
if @user_id.nil?
|
120
112
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
121
113
|
end
|
@@ -124,6 +116,14 @@ module MailSlurpClient
|
|
124
116
|
invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
|
125
117
|
end
|
126
118
|
|
119
|
+
if @updated_at.nil?
|
120
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
121
|
+
end
|
122
|
+
|
123
|
+
if @created_at.nil?
|
124
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
125
|
+
end
|
126
|
+
|
127
127
|
if @plus_address.nil?
|
128
128
|
invalid_properties.push('invalid value for "plus_address", plus_address cannot be nil.')
|
129
129
|
end
|
@@ -142,10 +142,10 @@ module MailSlurpClient
|
|
142
142
|
# Check to see if the all the properties in the model are valid
|
143
143
|
# @return true if the model is valid
|
144
144
|
def valid?
|
145
|
-
return false if @created_at.nil?
|
146
|
-
return false if @updated_at.nil?
|
147
145
|
return false if @user_id.nil?
|
148
146
|
return false if @inbox_id.nil?
|
147
|
+
return false if @updated_at.nil?
|
148
|
+
return false if @created_at.nil?
|
149
149
|
return false if @plus_address.nil?
|
150
150
|
return false if @full_address.nil?
|
151
151
|
return false if @id.nil?
|
@@ -157,10 +157,10 @@ module MailSlurpClient
|
|
157
157
|
def ==(o)
|
158
158
|
return true if self.equal?(o)
|
159
159
|
self.class == o.class &&
|
160
|
-
created_at == o.created_at &&
|
161
|
-
updated_at == o.updated_at &&
|
162
160
|
user_id == o.user_id &&
|
163
161
|
inbox_id == o.inbox_id &&
|
162
|
+
updated_at == o.updated_at &&
|
163
|
+
created_at == o.created_at &&
|
164
164
|
plus_address == o.plus_address &&
|
165
165
|
full_address == o.full_address &&
|
166
166
|
id == o.id
|
@@ -175,7 +175,7 @@ module MailSlurpClient
|
|
175
175
|
# Calculates hash code according to all attributes.
|
176
176
|
# @return [Integer] Hash code
|
177
177
|
def hash
|
178
|
-
[
|
178
|
+
[user_id, inbox_id, updated_at, created_at, plus_address, full_address, id].hash
|
179
179
|
end
|
180
180
|
|
181
181
|
# Builds the object from hash
|
@@ -0,0 +1,317 @@
|
|
1
|
+
=begin
|
2
|
+
#MailSlurp API
|
3
|
+
|
4
|
+
#MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. 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 ReputationItemProjection
|
17
|
+
attr_accessor :created_at
|
18
|
+
|
19
|
+
attr_accessor :recipient
|
20
|
+
|
21
|
+
attr_accessor :reputation_type
|
22
|
+
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
attr_accessor :severity
|
26
|
+
|
27
|
+
attr_accessor :source
|
28
|
+
|
29
|
+
class EnumAttributeValidator
|
30
|
+
attr_reader :datatype
|
31
|
+
attr_reader :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'created_at' => :'createdAt',
|
55
|
+
:'recipient' => :'recipient',
|
56
|
+
:'reputation_type' => :'reputationType',
|
57
|
+
:'id' => :'id',
|
58
|
+
:'severity' => :'severity',
|
59
|
+
:'source' => :'source'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.openapi_types
|
65
|
+
{
|
66
|
+
:'created_at' => :'DateTime',
|
67
|
+
:'recipient' => :'String',
|
68
|
+
:'reputation_type' => :'String',
|
69
|
+
:'id' => :'String',
|
70
|
+
:'severity' => :'String',
|
71
|
+
:'source' => :'String'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# List of attributes with nullable: true
|
76
|
+
def self.openapi_nullable
|
77
|
+
Set.new([
|
78
|
+
])
|
79
|
+
end
|
80
|
+
|
81
|
+
# Initializes the object
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
def initialize(attributes = {})
|
84
|
+
if (!attributes.is_a?(Hash))
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::ReputationItemProjection` initialize method"
|
86
|
+
end
|
87
|
+
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::ReputationItemProjection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
92
|
+
end
|
93
|
+
h[k.to_sym] = v
|
94
|
+
}
|
95
|
+
|
96
|
+
if attributes.key?(:'created_at')
|
97
|
+
self.created_at = attributes[:'created_at']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.key?(:'recipient')
|
101
|
+
self.recipient = attributes[:'recipient']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'reputation_type')
|
105
|
+
self.reputation_type = attributes[:'reputation_type']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'id')
|
109
|
+
self.id = attributes[:'id']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'severity')
|
113
|
+
self.severity = attributes[:'severity']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'source')
|
117
|
+
self.source = attributes[:'source']
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
122
|
+
# @return Array for valid properties with the reasons
|
123
|
+
def list_invalid_properties
|
124
|
+
invalid_properties = Array.new
|
125
|
+
if @created_at.nil?
|
126
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
127
|
+
end
|
128
|
+
|
129
|
+
if @reputation_type.nil?
|
130
|
+
invalid_properties.push('invalid value for "reputation_type", reputation_type cannot be nil.')
|
131
|
+
end
|
132
|
+
|
133
|
+
if @id.nil?
|
134
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
135
|
+
end
|
136
|
+
|
137
|
+
if @severity.nil?
|
138
|
+
invalid_properties.push('invalid value for "severity", severity cannot be nil.')
|
139
|
+
end
|
140
|
+
|
141
|
+
invalid_properties
|
142
|
+
end
|
143
|
+
|
144
|
+
# Check to see if the all the properties in the model are valid
|
145
|
+
# @return true if the model is valid
|
146
|
+
def valid?
|
147
|
+
return false if @created_at.nil?
|
148
|
+
return false if @reputation_type.nil?
|
149
|
+
reputation_type_validator = EnumAttributeValidator.new('String', ["COMPLAINT", "BOUNCE"])
|
150
|
+
return false unless reputation_type_validator.valid?(@reputation_type)
|
151
|
+
return false if @id.nil?
|
152
|
+
return false if @severity.nil?
|
153
|
+
severity_validator = EnumAttributeValidator.new('String', ["INFO", "WARNING", "DANGER"])
|
154
|
+
return false unless severity_validator.valid?(@severity)
|
155
|
+
true
|
156
|
+
end
|
157
|
+
|
158
|
+
# Custom attribute writer method checking allowed values (enum).
|
159
|
+
# @param [Object] reputation_type Object to be assigned
|
160
|
+
def reputation_type=(reputation_type)
|
161
|
+
validator = EnumAttributeValidator.new('String', ["COMPLAINT", "BOUNCE"])
|
162
|
+
unless validator.valid?(reputation_type)
|
163
|
+
fail ArgumentError, "invalid value for \"reputation_type\", must be one of #{validator.allowable_values}."
|
164
|
+
end
|
165
|
+
@reputation_type = reputation_type
|
166
|
+
end
|
167
|
+
|
168
|
+
# Custom attribute writer method checking allowed values (enum).
|
169
|
+
# @param [Object] severity Object to be assigned
|
170
|
+
def severity=(severity)
|
171
|
+
validator = EnumAttributeValidator.new('String', ["INFO", "WARNING", "DANGER"])
|
172
|
+
unless validator.valid?(severity)
|
173
|
+
fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}."
|
174
|
+
end
|
175
|
+
@severity = severity
|
176
|
+
end
|
177
|
+
|
178
|
+
# Checks equality by comparing each attribute.
|
179
|
+
# @param [Object] Object to be compared
|
180
|
+
def ==(o)
|
181
|
+
return true if self.equal?(o)
|
182
|
+
self.class == o.class &&
|
183
|
+
created_at == o.created_at &&
|
184
|
+
recipient == o.recipient &&
|
185
|
+
reputation_type == o.reputation_type &&
|
186
|
+
id == o.id &&
|
187
|
+
severity == o.severity &&
|
188
|
+
source == o.source
|
189
|
+
end
|
190
|
+
|
191
|
+
# @see the `==` method
|
192
|
+
# @param [Object] Object to be compared
|
193
|
+
def eql?(o)
|
194
|
+
self == o
|
195
|
+
end
|
196
|
+
|
197
|
+
# Calculates hash code according to all attributes.
|
198
|
+
# @return [Integer] Hash code
|
199
|
+
def hash
|
200
|
+
[created_at, recipient, reputation_type, id, severity, source].hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Builds the object from hash
|
204
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
205
|
+
# @return [Object] Returns the model itself
|
206
|
+
def self.build_from_hash(attributes)
|
207
|
+
new.build_from_hash(attributes)
|
208
|
+
end
|
209
|
+
|
210
|
+
# Builds the object from hash
|
211
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
212
|
+
# @return [Object] Returns the model itself
|
213
|
+
def build_from_hash(attributes)
|
214
|
+
return nil unless attributes.is_a?(Hash)
|
215
|
+
self.class.openapi_types.each_pair do |key, type|
|
216
|
+
if type =~ /\AArray<(.*)>/i
|
217
|
+
# check to ensure the input is an array given that the attribute
|
218
|
+
# is documented as an array but the input is not
|
219
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
220
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
221
|
+
end
|
222
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
223
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
224
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
225
|
+
end
|
226
|
+
|
227
|
+
self
|
228
|
+
end
|
229
|
+
|
230
|
+
# Deserializes the data based on type
|
231
|
+
# @param string type Data type
|
232
|
+
# @param string value Value to be deserialized
|
233
|
+
# @return [Object] Deserialized data
|
234
|
+
def _deserialize(type, value)
|
235
|
+
case type.to_sym
|
236
|
+
when :DateTime
|
237
|
+
DateTime.parse(value)
|
238
|
+
when :Date
|
239
|
+
Date.parse(value)
|
240
|
+
when :String
|
241
|
+
value.to_s
|
242
|
+
when :Integer
|
243
|
+
value.to_i
|
244
|
+
when :Float
|
245
|
+
value.to_f
|
246
|
+
when :Boolean
|
247
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
248
|
+
true
|
249
|
+
else
|
250
|
+
false
|
251
|
+
end
|
252
|
+
when :Object
|
253
|
+
# generic object (usually a Hash), return directly
|
254
|
+
value
|
255
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
256
|
+
inner_type = Regexp.last_match[:inner_type]
|
257
|
+
value.map { |v| _deserialize(inner_type, v) }
|
258
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
259
|
+
k_type = Regexp.last_match[:k_type]
|
260
|
+
v_type = Regexp.last_match[:v_type]
|
261
|
+
{}.tap do |hash|
|
262
|
+
value.each do |k, v|
|
263
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
else # model
|
267
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
# Returns the string representation of the object
|
272
|
+
# @return [String] String presentation of the object
|
273
|
+
def to_s
|
274
|
+
to_hash.to_s
|
275
|
+
end
|
276
|
+
|
277
|
+
# to_body is an alias to to_hash (backward compatibility)
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
279
|
+
def to_body
|
280
|
+
to_hash
|
281
|
+
end
|
282
|
+
|
283
|
+
# Returns the object in the form of hash
|
284
|
+
# @return [Hash] Returns the object in the form of hash
|
285
|
+
def to_hash
|
286
|
+
hash = {}
|
287
|
+
self.class.attribute_map.each_pair do |attr, param|
|
288
|
+
value = self.send(attr)
|
289
|
+
if value.nil?
|
290
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
291
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
292
|
+
end
|
293
|
+
|
294
|
+
hash[param] = _to_hash(value)
|
295
|
+
end
|
296
|
+
hash
|
297
|
+
end
|
298
|
+
|
299
|
+
# Outputs non-array value in the form of hash
|
300
|
+
# For object, use to_hash. Otherwise, just return the value
|
301
|
+
# @param [Object] value Any valid value
|
302
|
+
# @return [Hash] Returns the value in the form of hash
|
303
|
+
def _to_hash(value)
|
304
|
+
if value.is_a?(Array)
|
305
|
+
value.compact.map { |v| _to_hash(v) }
|
306
|
+
elsif value.is_a?(Hash)
|
307
|
+
{}.tap do |hash|
|
308
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
309
|
+
end
|
310
|
+
elsif value.respond_to? :to_hash
|
311
|
+
value.to_hash
|
312
|
+
else
|
313
|
+
value
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|
@@ -194,7 +194,7 @@ module MailSlurpClient
|
|
194
194
|
return false unless sort_direction_validator.valid?(@sort_direction)
|
195
195
|
inbox_type_validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_INBOX"])
|
196
196
|
return false unless inbox_type_validator.valid?(@inbox_type)
|
197
|
-
inbox_function_validator = EnumAttributeValidator.new('String', ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST"])
|
197
|
+
inbox_function_validator = EnumAttributeValidator.new('String', ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST", "OAUTH_CONNECTION_GMAIL"])
|
198
198
|
return false unless inbox_function_validator.valid?(@inbox_function)
|
199
199
|
true
|
200
200
|
end
|
@@ -222,7 +222,7 @@ module MailSlurpClient
|
|
222
222
|
# Custom attribute writer method checking allowed values (enum).
|
223
223
|
# @param [Object] inbox_function Object to be assigned
|
224
224
|
def inbox_function=(inbox_function)
|
225
|
-
validator = EnumAttributeValidator.new('String', ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST"])
|
225
|
+
validator = EnumAttributeValidator.new('String', ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST", "OAUTH_CONNECTION_GMAIL"])
|
226
226
|
unless validator.valid?(inbox_function)
|
227
227
|
fail ArgumentError, "invalid value for \"inbox_function\", must be one of #{validator.allowable_values}."
|
228
228
|
end
|
@@ -96,6 +96,9 @@ module MailSlurpClient
|
|
96
96
|
# Is email favourited
|
97
97
|
attr_accessor :favourite
|
98
98
|
|
99
|
+
# Size of raw email message in bytes
|
100
|
+
attr_accessor :size_bytes
|
101
|
+
|
99
102
|
attr_accessor :html
|
100
103
|
|
101
104
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -134,6 +137,7 @@ module MailSlurpClient
|
|
134
137
|
:'text_excerpt' => :'textExcerpt',
|
135
138
|
:'in_reply_to' => :'inReplyTo',
|
136
139
|
:'favourite' => :'favourite',
|
140
|
+
:'size_bytes' => :'sizeBytes',
|
137
141
|
:'html' => :'html'
|
138
142
|
}
|
139
143
|
end
|
@@ -174,6 +178,7 @@ module MailSlurpClient
|
|
174
178
|
:'text_excerpt' => :'String',
|
175
179
|
:'in_reply_to' => :'String',
|
176
180
|
:'favourite' => :'Boolean',
|
181
|
+
:'size_bytes' => :'Integer',
|
177
182
|
:'html' => :'Boolean'
|
178
183
|
}
|
179
184
|
end
|
@@ -209,6 +214,7 @@ module MailSlurpClient
|
|
209
214
|
:'text_excerpt',
|
210
215
|
:'in_reply_to',
|
211
216
|
:'favourite',
|
217
|
+
:'size_bytes',
|
212
218
|
])
|
213
219
|
end
|
214
220
|
|
@@ -377,6 +383,10 @@ module MailSlurpClient
|
|
377
383
|
self.favourite = attributes[:'favourite']
|
378
384
|
end
|
379
385
|
|
386
|
+
if attributes.key?(:'size_bytes')
|
387
|
+
self.size_bytes = attributes[:'size_bytes']
|
388
|
+
end
|
389
|
+
|
380
390
|
if attributes.key?(:'html')
|
381
391
|
self.html = attributes[:'html']
|
382
392
|
end
|
@@ -458,6 +468,7 @@ module MailSlurpClient
|
|
458
468
|
text_excerpt == o.text_excerpt &&
|
459
469
|
in_reply_to == o.in_reply_to &&
|
460
470
|
favourite == o.favourite &&
|
471
|
+
size_bytes == o.size_bytes &&
|
461
472
|
html == o.html
|
462
473
|
end
|
463
474
|
|
@@ -470,7 +481,7 @@ module MailSlurpClient
|
|
470
481
|
# Calculates hash code according to all attributes.
|
471
482
|
# @return [Integer] Hash code
|
472
483
|
def hash
|
473
|
-
[id, user_id, inbox_id, domain_id, to, from, sender, recipients, reply_to, cc, bcc, attachments, subject, body_md5_hash, body, to_contacts, to_group, charset, is_html, sent_at, created_at, pixel_ids, message_id, message_ids, virtual_send, template_id, template_variables, headers, thread_id, body_excerpt, text_excerpt, in_reply_to, favourite, html].hash
|
484
|
+
[id, user_id, inbox_id, domain_id, to, from, sender, recipients, reply_to, cc, bcc, attachments, subject, body_md5_hash, body, to_contacts, to_group, charset, is_html, sent_at, created_at, pixel_ids, message_id, message_ids, virtual_send, template_id, template_variables, headers, thread_id, body_excerpt, text_excerpt, in_reply_to, favourite, size_bytes, html].hash
|
474
485
|
end
|
475
486
|
|
476
487
|
# Builds the object from hash
|