sendmux-mailbox 2.0.0 → 2.0.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/CHANGELOG.md +17 -0
- data/lib/sendmux/mailbox/version.rb +1 -1
- data/lib/sendmux_mailbox_generated/models/mailbox_me.rb +14 -21
- data/lib/sendmux_mailbox_generated/models/mailbox_message.rb +29 -35
- data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb +43 -49
- data/lib/sendmux_mailbox_generated/models/{mailbox_realtime_message_all_of_body.rb → mailbox_realtime_message_body.rb} +3 -3
- data/lib/sendmux_mailbox_generated/models/mailbox_thread.rb +32 -39
- data/lib/sendmux_mailbox_generated.rb +7 -2
- metadata +3 -4
- data/lib/sendmux_mailbox_generated/models/mailbox.rb +0 -284
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c024fbb1bcefd6a29fbefb738b104c6ce71b36ccf802d0ad331e48529451a36
|
|
4
|
+
data.tar.gz: 6a3f7aa0036a0e5407b3abaa2654fc3709f6093c5de051dc72e23a3cf612b72c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6b233030d757f9a1cda39d4a433dba9c17a8916e60a986b8abb0c413350ff2a733d0dd0b4e0d2a2ff615d73ab37e21a58f63b0403e582092f1a1c12f03472a5
|
|
7
|
+
data.tar.gz: 63f18717f5efc8da8a6781ebf306a35cab4d1f357fd052ebde2508694a31047d6125748ad2b58b8f8c77362983b1b3fc6b11bf29a218f755b187018737b8bda6
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.1](https://github.com/Sendmux/sendmux-sdk/compare/ruby-mailbox/v2.0.0...ruby-mailbox/v2.0.1) (2026-09-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Deprecated
|
|
7
|
+
|
|
8
|
+
* `Sendmux::Mailbox::Generated::MailboxRealtimeMessageAllOfBody` is now a deprecated constant aliasing `Sendmux::Mailbox::Generated::MailboxRealtimeMessageBody`, the class of `MailboxRealtimeMessage#body`. Referencing the old constant still works and, with `Warning[:deprecated]` enabled (`ruby -W:deprecated`), warns that it is deprecated; the alias is removed in the next major, 3.0 ([f1108bf](https://github.com/Sendmux/sendmux-sdk/commit/f1108bf40f6c1ff3f3948b49c9ae9dd22b33b3d9)).
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
* Models are regenerated from the deployed flattened response schemas (docs 86b0f45): `MailboxMe`, `MailboxMessage`, `MailboxRealtimeMessage` and `MailboxThread` are flat objects instead of `allOf` compositions and carry the same attributes, so the wire format is unchanged, `MailboxRealtimeMessageBody` is the generated name of the realtime message body, and those four classes no longer define the generator's `openapi_all_of` introspection method. The `Sendmux::Mailbox::Generated::Mailbox` model, which no operation, README, guide or test referenced, is removed without a deprecation period; `mailbox_get_me` keeps returning `MailboxMe`, which carries the same attributes plus `quota_used_bytes` ([9c05be1](https://github.com/Sendmux/sendmux-sdk/commit/9c05be1bdad88fdcbbbeedf174adce01a6a48ae7)).
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* regenerate SDKs from the deployed flattened response schemas (docs 86b0f45) ([628b161](https://github.com/Sendmux/sendmux-sdk/commit/628b161d2692775ac1f4830c1d64c024ba04ed83))
|
|
17
|
+
* **ruby-mailbox:** keep MailboxRealtimeMessageAllOfBody as a deprecated constant ([f1108bf](https://github.com/Sendmux/sendmux-sdk/commit/f1108bf40f6c1ff3f3948b49c9ae9dd22b33b3d9))
|
|
18
|
+
* **ruby-mailbox:** regenerate flattened mailbox response models ([9c05be1](https://github.com/Sendmux/sendmux-sdk/commit/9c05be1bdad88fdcbbbeedf174adce01a6a48ae7))
|
|
19
|
+
|
|
3
20
|
## [2.0.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-mailbox/v1.4.0...ruby-mailbox/v2.0.0) (2026-09-19)
|
|
4
21
|
|
|
5
22
|
### Changed
|
|
@@ -30,14 +30,14 @@ module Sendmux::Mailbox::Generated
|
|
|
30
30
|
# Storage quota in bytes. Current writable tiers are 1 GB, 5 GB, and 50 GB.
|
|
31
31
|
attr_accessor :quota_bytes
|
|
32
32
|
|
|
33
|
+
# Live storage usage in bytes. Omitted when usage is temporarily unavailable.
|
|
34
|
+
attr_accessor :quota_used_bytes
|
|
35
|
+
|
|
33
36
|
attr_accessor :send_scope
|
|
34
37
|
|
|
35
38
|
# active | suspended | deleted
|
|
36
39
|
attr_accessor :status
|
|
37
40
|
|
|
38
|
-
# Live storage usage in bytes. Omitted when usage is temporarily unavailable.
|
|
39
|
-
attr_accessor :quota_used_bytes
|
|
40
|
-
|
|
41
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
42
|
def self.attribute_map
|
|
43
43
|
{
|
|
@@ -46,9 +46,9 @@ module Sendmux::Mailbox::Generated
|
|
|
46
46
|
:'email' => :'email',
|
|
47
47
|
:'id' => :'id',
|
|
48
48
|
:'quota_bytes' => :'quota_bytes',
|
|
49
|
+
:'quota_used_bytes' => :'quota_used_bytes',
|
|
49
50
|
:'send_scope' => :'send_scope',
|
|
50
|
-
:'status' => :'status'
|
|
51
|
-
:'quota_used_bytes' => :'quota_used_bytes'
|
|
51
|
+
:'status' => :'status'
|
|
52
52
|
}
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -70,9 +70,9 @@ module Sendmux::Mailbox::Generated
|
|
|
70
70
|
:'email' => :'String',
|
|
71
71
|
:'id' => :'String',
|
|
72
72
|
:'quota_bytes' => :'Integer',
|
|
73
|
+
:'quota_used_bytes' => :'Integer',
|
|
73
74
|
:'send_scope' => :'MailboxSendScope',
|
|
74
|
-
:'status' => :'String'
|
|
75
|
-
:'quota_used_bytes' => :'Integer'
|
|
75
|
+
:'status' => :'String'
|
|
76
76
|
}
|
|
77
77
|
end
|
|
78
78
|
|
|
@@ -85,13 +85,6 @@ module Sendmux::Mailbox::Generated
|
|
|
85
85
|
])
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
89
|
-
def self.openapi_all_of
|
|
90
|
-
[
|
|
91
|
-
:'Mailbox'
|
|
92
|
-
]
|
|
93
|
-
end
|
|
94
|
-
|
|
95
88
|
# Initializes the object
|
|
96
89
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
97
90
|
def initialize(attributes = {})
|
|
@@ -138,6 +131,10 @@ module Sendmux::Mailbox::Generated
|
|
|
138
131
|
self.quota_bytes = nil
|
|
139
132
|
end
|
|
140
133
|
|
|
134
|
+
if attributes.key?(:'quota_used_bytes')
|
|
135
|
+
self.quota_used_bytes = attributes[:'quota_used_bytes']
|
|
136
|
+
end
|
|
137
|
+
|
|
141
138
|
if attributes.key?(:'send_scope')
|
|
142
139
|
self.send_scope = attributes[:'send_scope']
|
|
143
140
|
else
|
|
@@ -149,10 +146,6 @@ module Sendmux::Mailbox::Generated
|
|
|
149
146
|
else
|
|
150
147
|
self.status = nil
|
|
151
148
|
end
|
|
152
|
-
|
|
153
|
-
if attributes.key?(:'quota_used_bytes')
|
|
154
|
-
self.quota_used_bytes = attributes[:'quota_used_bytes']
|
|
155
|
-
end
|
|
156
149
|
end
|
|
157
150
|
|
|
158
151
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -240,9 +233,9 @@ module Sendmux::Mailbox::Generated
|
|
|
240
233
|
email == o.email &&
|
|
241
234
|
id == o.id &&
|
|
242
235
|
quota_bytes == o.quota_bytes &&
|
|
236
|
+
quota_used_bytes == o.quota_used_bytes &&
|
|
243
237
|
send_scope == o.send_scope &&
|
|
244
|
-
status == o.status
|
|
245
|
-
quota_used_bytes == o.quota_used_bytes
|
|
238
|
+
status == o.status
|
|
246
239
|
end
|
|
247
240
|
|
|
248
241
|
# @see the `==` method
|
|
@@ -254,7 +247,7 @@ module Sendmux::Mailbox::Generated
|
|
|
254
247
|
# Calculates hash code according to all attributes.
|
|
255
248
|
# @return [Integer] Hash code
|
|
256
249
|
def hash
|
|
257
|
-
[created_at, display_name, email, id, quota_bytes, send_scope, status
|
|
250
|
+
[created_at, display_name, email, id, quota_bytes, quota_used_bytes, send_scope, status].hash
|
|
258
251
|
end
|
|
259
252
|
|
|
260
253
|
# Builds the object from hash
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Sendmux::Mailbox::Generated
|
|
17
17
|
class MailboxMessage < ApiModelBase
|
|
18
|
+
# Attachment metadata for this message. Each item includes a short-lived `download_url`; if it expires, fetch message metadata again.
|
|
18
19
|
attr_accessor :attachments
|
|
19
20
|
|
|
20
21
|
attr_accessor :bcc
|
|
@@ -29,6 +30,8 @@ module Sendmux::Mailbox::Generated
|
|
|
29
30
|
|
|
30
31
|
attr_accessor :has_attachments
|
|
31
32
|
|
|
33
|
+
attr_accessor :html_body
|
|
34
|
+
|
|
32
35
|
# Message ID
|
|
33
36
|
attr_accessor :id
|
|
34
37
|
|
|
@@ -45,14 +48,12 @@ module Sendmux::Mailbox::Generated
|
|
|
45
48
|
|
|
46
49
|
attr_accessor :subject
|
|
47
50
|
|
|
51
|
+
attr_accessor :text_body
|
|
52
|
+
|
|
48
53
|
attr_accessor :thread_id
|
|
49
54
|
|
|
50
55
|
attr_accessor :to
|
|
51
56
|
|
|
52
|
-
attr_accessor :html_body
|
|
53
|
-
|
|
54
|
-
attr_accessor :text_body
|
|
55
|
-
|
|
56
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
58
|
def self.attribute_map
|
|
58
59
|
{
|
|
@@ -63,6 +64,7 @@ module Sendmux::Mailbox::Generated
|
|
|
63
64
|
:'folder_ids' => :'folder_ids',
|
|
64
65
|
:'from' => :'from',
|
|
65
66
|
:'has_attachments' => :'has_attachments',
|
|
67
|
+
:'html_body' => :'html_body',
|
|
66
68
|
:'id' => :'id',
|
|
67
69
|
:'keywords' => :'keywords',
|
|
68
70
|
:'preview' => :'preview',
|
|
@@ -70,10 +72,9 @@ module Sendmux::Mailbox::Generated
|
|
|
70
72
|
:'sent_at' => :'sent_at',
|
|
71
73
|
:'size_bytes' => :'size_bytes',
|
|
72
74
|
:'subject' => :'subject',
|
|
75
|
+
:'text_body' => :'text_body',
|
|
73
76
|
:'thread_id' => :'thread_id',
|
|
74
|
-
:'to' => :'to'
|
|
75
|
-
:'html_body' => :'html_body',
|
|
76
|
-
:'text_body' => :'text_body'
|
|
77
|
+
:'to' => :'to'
|
|
77
78
|
}
|
|
78
79
|
end
|
|
79
80
|
|
|
@@ -97,6 +98,7 @@ module Sendmux::Mailbox::Generated
|
|
|
97
98
|
:'folder_ids' => :'Array<String>',
|
|
98
99
|
:'from' => :'MailboxAddress',
|
|
99
100
|
:'has_attachments' => :'Boolean',
|
|
101
|
+
:'html_body' => :'String',
|
|
100
102
|
:'id' => :'String',
|
|
101
103
|
:'keywords' => :'Array<String>',
|
|
102
104
|
:'preview' => :'String',
|
|
@@ -104,10 +106,9 @@ module Sendmux::Mailbox::Generated
|
|
|
104
106
|
:'sent_at' => :'String',
|
|
105
107
|
:'size_bytes' => :'Integer',
|
|
106
108
|
:'subject' => :'String',
|
|
109
|
+
:'text_body' => :'String',
|
|
107
110
|
:'thread_id' => :'String',
|
|
108
|
-
:'to' => :'Array<MailboxAddress>'
|
|
109
|
-
:'html_body' => :'String',
|
|
110
|
-
:'text_body' => :'String'
|
|
111
|
+
:'to' => :'Array<MailboxAddress>'
|
|
111
112
|
}
|
|
112
113
|
end
|
|
113
114
|
|
|
@@ -115,24 +116,17 @@ module Sendmux::Mailbox::Generated
|
|
|
115
116
|
def self.openapi_nullable
|
|
116
117
|
Set.new([
|
|
117
118
|
:'from',
|
|
119
|
+
:'html_body',
|
|
118
120
|
:'preview',
|
|
119
121
|
:'received_at',
|
|
120
122
|
:'sent_at',
|
|
121
123
|
:'size_bytes',
|
|
122
124
|
:'subject',
|
|
125
|
+
:'text_body',
|
|
123
126
|
:'thread_id',
|
|
124
|
-
:'html_body',
|
|
125
|
-
:'text_body'
|
|
126
127
|
])
|
|
127
128
|
end
|
|
128
129
|
|
|
129
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
130
|
-
def self.openapi_all_of
|
|
131
|
-
[
|
|
132
|
-
:'MailboxMessageSummary'
|
|
133
|
-
]
|
|
134
|
-
end
|
|
135
|
-
|
|
136
130
|
# Initializes the object
|
|
137
131
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
138
132
|
def initialize(attributes = {})
|
|
@@ -197,6 +191,12 @@ module Sendmux::Mailbox::Generated
|
|
|
197
191
|
self.has_attachments = nil
|
|
198
192
|
end
|
|
199
193
|
|
|
194
|
+
if attributes.key?(:'html_body')
|
|
195
|
+
self.html_body = attributes[:'html_body']
|
|
196
|
+
else
|
|
197
|
+
self.html_body = nil
|
|
198
|
+
end
|
|
199
|
+
|
|
200
200
|
if attributes.key?(:'id')
|
|
201
201
|
self.id = attributes[:'id']
|
|
202
202
|
else
|
|
@@ -241,6 +241,12 @@ module Sendmux::Mailbox::Generated
|
|
|
241
241
|
self.subject = nil
|
|
242
242
|
end
|
|
243
243
|
|
|
244
|
+
if attributes.key?(:'text_body')
|
|
245
|
+
self.text_body = attributes[:'text_body']
|
|
246
|
+
else
|
|
247
|
+
self.text_body = nil
|
|
248
|
+
end
|
|
249
|
+
|
|
244
250
|
if attributes.key?(:'thread_id')
|
|
245
251
|
self.thread_id = attributes[:'thread_id']
|
|
246
252
|
else
|
|
@@ -254,18 +260,6 @@ module Sendmux::Mailbox::Generated
|
|
|
254
260
|
else
|
|
255
261
|
self.to = nil
|
|
256
262
|
end
|
|
257
|
-
|
|
258
|
-
if attributes.key?(:'html_body')
|
|
259
|
-
self.html_body = attributes[:'html_body']
|
|
260
|
-
else
|
|
261
|
-
self.html_body = nil
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
if attributes.key?(:'text_body')
|
|
265
|
-
self.text_body = attributes[:'text_body']
|
|
266
|
-
else
|
|
267
|
-
self.text_body = nil
|
|
268
|
-
end
|
|
269
263
|
end
|
|
270
264
|
|
|
271
265
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -415,6 +409,7 @@ module Sendmux::Mailbox::Generated
|
|
|
415
409
|
folder_ids == o.folder_ids &&
|
|
416
410
|
from == o.from &&
|
|
417
411
|
has_attachments == o.has_attachments &&
|
|
412
|
+
html_body == o.html_body &&
|
|
418
413
|
id == o.id &&
|
|
419
414
|
keywords == o.keywords &&
|
|
420
415
|
preview == o.preview &&
|
|
@@ -422,10 +417,9 @@ module Sendmux::Mailbox::Generated
|
|
|
422
417
|
sent_at == o.sent_at &&
|
|
423
418
|
size_bytes == o.size_bytes &&
|
|
424
419
|
subject == o.subject &&
|
|
420
|
+
text_body == o.text_body &&
|
|
425
421
|
thread_id == o.thread_id &&
|
|
426
|
-
to == o.to
|
|
427
|
-
html_body == o.html_body &&
|
|
428
|
-
text_body == o.text_body
|
|
422
|
+
to == o.to
|
|
429
423
|
end
|
|
430
424
|
|
|
431
425
|
# @see the `==` method
|
|
@@ -437,7 +431,7 @@ module Sendmux::Mailbox::Generated
|
|
|
437
431
|
# Calculates hash code according to all attributes.
|
|
438
432
|
# @return [Integer] Hash code
|
|
439
433
|
def hash
|
|
440
|
-
[attachments, bcc, cc, flags, folder_ids, from, has_attachments, id, keywords, preview, received_at, sent_at, size_bytes, subject, thread_id, to
|
|
434
|
+
[attachments, bcc, cc, flags, folder_ids, from, has_attachments, html_body, id, keywords, preview, received_at, sent_at, size_bytes, subject, text_body, thread_id, to].hash
|
|
441
435
|
end
|
|
442
436
|
|
|
443
437
|
# Builds the object from hash
|
|
@@ -15,10 +15,13 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Sendmux::Mailbox::Generated
|
|
17
17
|
class MailboxRealtimeMessage < ApiModelBase
|
|
18
|
+
# Attachment metadata for this message. Each item includes a short-lived `download_url`; if it expires, fetch message metadata again.
|
|
18
19
|
attr_accessor :attachments
|
|
19
20
|
|
|
20
21
|
attr_accessor :bcc
|
|
21
22
|
|
|
23
|
+
attr_accessor :body
|
|
24
|
+
|
|
22
25
|
attr_accessor :cc
|
|
23
26
|
|
|
24
27
|
attr_accessor :flags
|
|
@@ -39,6 +42,8 @@ module Sendmux::Mailbox::Generated
|
|
|
39
42
|
|
|
40
43
|
attr_accessor :received_at
|
|
41
44
|
|
|
45
|
+
attr_accessor :rfc5322_message_id
|
|
46
|
+
|
|
42
47
|
attr_accessor :sent_at
|
|
43
48
|
|
|
44
49
|
attr_accessor :size_bytes
|
|
@@ -49,15 +54,12 @@ module Sendmux::Mailbox::Generated
|
|
|
49
54
|
|
|
50
55
|
attr_accessor :to
|
|
51
56
|
|
|
52
|
-
attr_accessor :body
|
|
53
|
-
|
|
54
|
-
attr_accessor :rfc5322_message_id
|
|
55
|
-
|
|
56
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
58
|
def self.attribute_map
|
|
58
59
|
{
|
|
59
60
|
:'attachments' => :'attachments',
|
|
60
61
|
:'bcc' => :'bcc',
|
|
62
|
+
:'body' => :'body',
|
|
61
63
|
:'cc' => :'cc',
|
|
62
64
|
:'flags' => :'flags',
|
|
63
65
|
:'folder_ids' => :'folder_ids',
|
|
@@ -67,13 +69,12 @@ module Sendmux::Mailbox::Generated
|
|
|
67
69
|
:'keywords' => :'keywords',
|
|
68
70
|
:'preview' => :'preview',
|
|
69
71
|
:'received_at' => :'received_at',
|
|
72
|
+
:'rfc5322_message_id' => :'rfc5322_message_id',
|
|
70
73
|
:'sent_at' => :'sent_at',
|
|
71
74
|
:'size_bytes' => :'size_bytes',
|
|
72
75
|
:'subject' => :'subject',
|
|
73
76
|
:'thread_id' => :'thread_id',
|
|
74
|
-
:'to' => :'to'
|
|
75
|
-
:'body' => :'body',
|
|
76
|
-
:'rfc5322_message_id' => :'rfc5322_message_id'
|
|
77
|
+
:'to' => :'to'
|
|
77
78
|
}
|
|
78
79
|
end
|
|
79
80
|
|
|
@@ -92,6 +93,7 @@ module Sendmux::Mailbox::Generated
|
|
|
92
93
|
{
|
|
93
94
|
:'attachments' => :'Array<MailboxAttachment>',
|
|
94
95
|
:'bcc' => :'Array<MailboxAddress>',
|
|
96
|
+
:'body' => :'MailboxRealtimeMessageBody',
|
|
95
97
|
:'cc' => :'Array<MailboxAddress>',
|
|
96
98
|
:'flags' => :'MailboxMessageFlags',
|
|
97
99
|
:'folder_ids' => :'Array<String>',
|
|
@@ -101,13 +103,12 @@ module Sendmux::Mailbox::Generated
|
|
|
101
103
|
:'keywords' => :'Array<String>',
|
|
102
104
|
:'preview' => :'String',
|
|
103
105
|
:'received_at' => :'String',
|
|
106
|
+
:'rfc5322_message_id' => :'String',
|
|
104
107
|
:'sent_at' => :'String',
|
|
105
108
|
:'size_bytes' => :'Integer',
|
|
106
109
|
:'subject' => :'String',
|
|
107
110
|
:'thread_id' => :'String',
|
|
108
|
-
:'to' => :'Array<MailboxAddress>'
|
|
109
|
-
:'body' => :'MailboxRealtimeMessageAllOfBody',
|
|
110
|
-
:'rfc5322_message_id' => :'String'
|
|
111
|
+
:'to' => :'Array<MailboxAddress>'
|
|
111
112
|
}
|
|
112
113
|
end
|
|
113
114
|
|
|
@@ -117,21 +118,14 @@ module Sendmux::Mailbox::Generated
|
|
|
117
118
|
:'from',
|
|
118
119
|
:'preview',
|
|
119
120
|
:'received_at',
|
|
121
|
+
:'rfc5322_message_id',
|
|
120
122
|
:'sent_at',
|
|
121
123
|
:'size_bytes',
|
|
122
124
|
:'subject',
|
|
123
125
|
:'thread_id',
|
|
124
|
-
:'rfc5322_message_id'
|
|
125
126
|
])
|
|
126
127
|
end
|
|
127
128
|
|
|
128
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
129
|
-
def self.openapi_all_of
|
|
130
|
-
[
|
|
131
|
-
:'MailboxMessageSummary'
|
|
132
|
-
]
|
|
133
|
-
end
|
|
134
|
-
|
|
135
129
|
# Initializes the object
|
|
136
130
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
131
|
def initialize(attributes = {})
|
|
@@ -162,6 +156,12 @@ module Sendmux::Mailbox::Generated
|
|
|
162
156
|
self.bcc = nil
|
|
163
157
|
end
|
|
164
158
|
|
|
159
|
+
if attributes.key?(:'body')
|
|
160
|
+
self.body = attributes[:'body']
|
|
161
|
+
else
|
|
162
|
+
self.body = nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
165
|
if attributes.key?(:'cc')
|
|
166
166
|
if (value = attributes[:'cc']).is_a?(Array)
|
|
167
167
|
self.cc = value
|
|
@@ -222,6 +222,12 @@ module Sendmux::Mailbox::Generated
|
|
|
222
222
|
self.received_at = nil
|
|
223
223
|
end
|
|
224
224
|
|
|
225
|
+
if attributes.key?(:'rfc5322_message_id')
|
|
226
|
+
self.rfc5322_message_id = attributes[:'rfc5322_message_id']
|
|
227
|
+
else
|
|
228
|
+
self.rfc5322_message_id = nil
|
|
229
|
+
end
|
|
230
|
+
|
|
225
231
|
if attributes.key?(:'sent_at')
|
|
226
232
|
self.sent_at = attributes[:'sent_at']
|
|
227
233
|
else
|
|
@@ -253,18 +259,6 @@ module Sendmux::Mailbox::Generated
|
|
|
253
259
|
else
|
|
254
260
|
self.to = nil
|
|
255
261
|
end
|
|
256
|
-
|
|
257
|
-
if attributes.key?(:'body')
|
|
258
|
-
self.body = attributes[:'body']
|
|
259
|
-
else
|
|
260
|
-
self.body = nil
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
if attributes.key?(:'rfc5322_message_id')
|
|
264
|
-
self.rfc5322_message_id = attributes[:'rfc5322_message_id']
|
|
265
|
-
else
|
|
266
|
-
self.rfc5322_message_id = nil
|
|
267
|
-
end
|
|
268
262
|
end
|
|
269
263
|
|
|
270
264
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -276,6 +270,10 @@ module Sendmux::Mailbox::Generated
|
|
|
276
270
|
invalid_properties.push('invalid value for "bcc", bcc cannot be nil.')
|
|
277
271
|
end
|
|
278
272
|
|
|
273
|
+
if @body.nil?
|
|
274
|
+
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
|
275
|
+
end
|
|
276
|
+
|
|
279
277
|
if @cc.nil?
|
|
280
278
|
invalid_properties.push('invalid value for "cc", cc cannot be nil.')
|
|
281
279
|
end
|
|
@@ -304,10 +302,6 @@ module Sendmux::Mailbox::Generated
|
|
|
304
302
|
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
|
305
303
|
end
|
|
306
304
|
|
|
307
|
-
if @body.nil?
|
|
308
|
-
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
|
309
|
-
end
|
|
310
|
-
|
|
311
305
|
invalid_properties
|
|
312
306
|
end
|
|
313
307
|
|
|
@@ -316,6 +310,7 @@ module Sendmux::Mailbox::Generated
|
|
|
316
310
|
def valid?
|
|
317
311
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
318
312
|
return false if @bcc.nil?
|
|
313
|
+
return false if @body.nil?
|
|
319
314
|
return false if @cc.nil?
|
|
320
315
|
return false if @flags.nil?
|
|
321
316
|
return false if @folder_ids.nil?
|
|
@@ -323,7 +318,6 @@ module Sendmux::Mailbox::Generated
|
|
|
323
318
|
return false if @id.nil?
|
|
324
319
|
return false if @keywords.nil?
|
|
325
320
|
return false if @to.nil?
|
|
326
|
-
return false if @body.nil?
|
|
327
321
|
true
|
|
328
322
|
end
|
|
329
323
|
|
|
@@ -337,6 +331,16 @@ module Sendmux::Mailbox::Generated
|
|
|
337
331
|
@bcc = bcc
|
|
338
332
|
end
|
|
339
333
|
|
|
334
|
+
# Custom attribute writer method with validation
|
|
335
|
+
# @param [Object] body Value to be assigned
|
|
336
|
+
def body=(body)
|
|
337
|
+
if body.nil?
|
|
338
|
+
fail ArgumentError, 'body cannot be nil'
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
@body = body
|
|
342
|
+
end
|
|
343
|
+
|
|
340
344
|
# Custom attribute writer method with validation
|
|
341
345
|
# @param [Object] cc Value to be assigned
|
|
342
346
|
def cc=(cc)
|
|
@@ -407,16 +411,6 @@ module Sendmux::Mailbox::Generated
|
|
|
407
411
|
@to = to
|
|
408
412
|
end
|
|
409
413
|
|
|
410
|
-
# Custom attribute writer method with validation
|
|
411
|
-
# @param [Object] body Value to be assigned
|
|
412
|
-
def body=(body)
|
|
413
|
-
if body.nil?
|
|
414
|
-
fail ArgumentError, 'body cannot be nil'
|
|
415
|
-
end
|
|
416
|
-
|
|
417
|
-
@body = body
|
|
418
|
-
end
|
|
419
|
-
|
|
420
414
|
# Checks equality by comparing each attribute.
|
|
421
415
|
# @param [Object] Object to be compared
|
|
422
416
|
def ==(o)
|
|
@@ -424,6 +418,7 @@ module Sendmux::Mailbox::Generated
|
|
|
424
418
|
self.class == o.class &&
|
|
425
419
|
attachments == o.attachments &&
|
|
426
420
|
bcc == o.bcc &&
|
|
421
|
+
body == o.body &&
|
|
427
422
|
cc == o.cc &&
|
|
428
423
|
flags == o.flags &&
|
|
429
424
|
folder_ids == o.folder_ids &&
|
|
@@ -433,13 +428,12 @@ module Sendmux::Mailbox::Generated
|
|
|
433
428
|
keywords == o.keywords &&
|
|
434
429
|
preview == o.preview &&
|
|
435
430
|
received_at == o.received_at &&
|
|
431
|
+
rfc5322_message_id == o.rfc5322_message_id &&
|
|
436
432
|
sent_at == o.sent_at &&
|
|
437
433
|
size_bytes == o.size_bytes &&
|
|
438
434
|
subject == o.subject &&
|
|
439
435
|
thread_id == o.thread_id &&
|
|
440
|
-
to == o.to
|
|
441
|
-
body == o.body &&
|
|
442
|
-
rfc5322_message_id == o.rfc5322_message_id
|
|
436
|
+
to == o.to
|
|
443
437
|
end
|
|
444
438
|
|
|
445
439
|
# @see the `==` method
|
|
@@ -451,7 +445,7 @@ module Sendmux::Mailbox::Generated
|
|
|
451
445
|
# Calculates hash code according to all attributes.
|
|
452
446
|
# @return [Integer] Hash code
|
|
453
447
|
def hash
|
|
454
|
-
[attachments, bcc, cc, flags, folder_ids, from, has_attachments, id, keywords, preview, received_at, sent_at, size_bytes, subject, thread_id, to
|
|
448
|
+
[attachments, bcc, body, cc, flags, folder_ids, from, has_attachments, id, keywords, preview, received_at, rfc5322_message_id, sent_at, size_bytes, subject, thread_id, to].hash
|
|
455
449
|
end
|
|
456
450
|
|
|
457
451
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Sendmux::Mailbox::Generated
|
|
17
|
-
class
|
|
17
|
+
class MailboxRealtimeMessageBody < ApiModelBase
|
|
18
18
|
attr_accessor :html
|
|
19
19
|
|
|
20
20
|
attr_accessor :is_truncated
|
|
@@ -65,14 +65,14 @@ module Sendmux::Mailbox::Generated
|
|
|
65
65
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
66
|
def initialize(attributes = {})
|
|
67
67
|
if (!attributes.is_a?(Hash))
|
|
68
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxRealtimeMessageBody` initialize method"
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
72
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
73
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
74
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
75
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxRealtimeMessageBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
76
|
end
|
|
77
77
|
h[k.to_sym] = v
|
|
78
78
|
}
|
|
@@ -26,6 +26,8 @@ module Sendmux::Mailbox::Generated
|
|
|
26
26
|
|
|
27
27
|
attr_accessor :message_count
|
|
28
28
|
|
|
29
|
+
attr_accessor :message_ids
|
|
30
|
+
|
|
29
31
|
attr_accessor :participants
|
|
30
32
|
|
|
31
33
|
attr_accessor :states
|
|
@@ -34,8 +36,6 @@ module Sendmux::Mailbox::Generated
|
|
|
34
36
|
|
|
35
37
|
attr_accessor :unread_count
|
|
36
38
|
|
|
37
|
-
attr_accessor :message_ids
|
|
38
|
-
|
|
39
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
40
|
def self.attribute_map
|
|
41
41
|
{
|
|
@@ -44,11 +44,11 @@ module Sendmux::Mailbox::Generated
|
|
|
44
44
|
:'id' => :'id',
|
|
45
45
|
:'last_message' => :'last_message',
|
|
46
46
|
:'message_count' => :'message_count',
|
|
47
|
+
:'message_ids' => :'message_ids',
|
|
47
48
|
:'participants' => :'participants',
|
|
48
49
|
:'states' => :'states',
|
|
49
50
|
:'subject' => :'subject',
|
|
50
|
-
:'unread_count' => :'unread_count'
|
|
51
|
-
:'message_ids' => :'message_ids'
|
|
51
|
+
:'unread_count' => :'unread_count'
|
|
52
52
|
}
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -70,11 +70,11 @@ module Sendmux::Mailbox::Generated
|
|
|
70
70
|
:'id' => :'String',
|
|
71
71
|
:'last_message' => :'MailboxMessageSummary',
|
|
72
72
|
:'message_count' => :'Integer',
|
|
73
|
+
:'message_ids' => :'Array<String>',
|
|
73
74
|
:'participants' => :'Array<MailboxAddress>',
|
|
74
75
|
:'states' => :'MailboxThreadSummaryStates',
|
|
75
76
|
:'subject' => :'String',
|
|
76
|
-
:'unread_count' => :'Integer'
|
|
77
|
-
:'message_ids' => :'Array<String>'
|
|
77
|
+
:'unread_count' => :'Integer'
|
|
78
78
|
}
|
|
79
79
|
end
|
|
80
80
|
|
|
@@ -86,13 +86,6 @@ module Sendmux::Mailbox::Generated
|
|
|
86
86
|
])
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
90
|
-
def self.openapi_all_of
|
|
91
|
-
[
|
|
92
|
-
:'MailboxThreadSummary'
|
|
93
|
-
]
|
|
94
|
-
end
|
|
95
|
-
|
|
96
89
|
# Initializes the object
|
|
97
90
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
98
91
|
def initialize(attributes = {})
|
|
@@ -141,6 +134,14 @@ module Sendmux::Mailbox::Generated
|
|
|
141
134
|
self.message_count = nil
|
|
142
135
|
end
|
|
143
136
|
|
|
137
|
+
if attributes.key?(:'message_ids')
|
|
138
|
+
if (value = attributes[:'message_ids']).is_a?(Array)
|
|
139
|
+
self.message_ids = value
|
|
140
|
+
end
|
|
141
|
+
else
|
|
142
|
+
self.message_ids = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
144
145
|
if attributes.key?(:'participants')
|
|
145
146
|
if (value = attributes[:'participants']).is_a?(Array)
|
|
146
147
|
self.participants = value
|
|
@@ -166,14 +167,6 @@ module Sendmux::Mailbox::Generated
|
|
|
166
167
|
else
|
|
167
168
|
self.unread_count = nil
|
|
168
169
|
end
|
|
169
|
-
|
|
170
|
-
if attributes.key?(:'message_ids')
|
|
171
|
-
if (value = attributes[:'message_ids']).is_a?(Array)
|
|
172
|
-
self.message_ids = value
|
|
173
|
-
end
|
|
174
|
-
else
|
|
175
|
-
self.message_ids = nil
|
|
176
|
-
end
|
|
177
170
|
end
|
|
178
171
|
|
|
179
172
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -197,6 +190,10 @@ module Sendmux::Mailbox::Generated
|
|
|
197
190
|
invalid_properties.push('invalid value for "message_count", message_count cannot be nil.')
|
|
198
191
|
end
|
|
199
192
|
|
|
193
|
+
if @message_ids.nil?
|
|
194
|
+
invalid_properties.push('invalid value for "message_ids", message_ids cannot be nil.')
|
|
195
|
+
end
|
|
196
|
+
|
|
200
197
|
if @participants.nil?
|
|
201
198
|
invalid_properties.push('invalid value for "participants", participants cannot be nil.')
|
|
202
199
|
end
|
|
@@ -209,10 +206,6 @@ module Sendmux::Mailbox::Generated
|
|
|
209
206
|
invalid_properties.push('invalid value for "unread_count", unread_count cannot be nil.')
|
|
210
207
|
end
|
|
211
208
|
|
|
212
|
-
if @message_ids.nil?
|
|
213
|
-
invalid_properties.push('invalid value for "message_ids", message_ids cannot be nil.')
|
|
214
|
-
end
|
|
215
|
-
|
|
216
209
|
invalid_properties
|
|
217
210
|
end
|
|
218
211
|
|
|
@@ -224,10 +217,10 @@ module Sendmux::Mailbox::Generated
|
|
|
224
217
|
return false if @has_attachments.nil?
|
|
225
218
|
return false if @id.nil?
|
|
226
219
|
return false if @message_count.nil?
|
|
220
|
+
return false if @message_ids.nil?
|
|
227
221
|
return false if @participants.nil?
|
|
228
222
|
return false if @states.nil?
|
|
229
223
|
return false if @unread_count.nil?
|
|
230
|
-
return false if @message_ids.nil?
|
|
231
224
|
true
|
|
232
225
|
end
|
|
233
226
|
|
|
@@ -271,6 +264,16 @@ module Sendmux::Mailbox::Generated
|
|
|
271
264
|
@message_count = message_count
|
|
272
265
|
end
|
|
273
266
|
|
|
267
|
+
# Custom attribute writer method with validation
|
|
268
|
+
# @param [Object] message_ids Value to be assigned
|
|
269
|
+
def message_ids=(message_ids)
|
|
270
|
+
if message_ids.nil?
|
|
271
|
+
fail ArgumentError, 'message_ids cannot be nil'
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
@message_ids = message_ids
|
|
275
|
+
end
|
|
276
|
+
|
|
274
277
|
# Custom attribute writer method with validation
|
|
275
278
|
# @param [Object] participants Value to be assigned
|
|
276
279
|
def participants=(participants)
|
|
@@ -301,16 +304,6 @@ module Sendmux::Mailbox::Generated
|
|
|
301
304
|
@unread_count = unread_count
|
|
302
305
|
end
|
|
303
306
|
|
|
304
|
-
# Custom attribute writer method with validation
|
|
305
|
-
# @param [Object] message_ids Value to be assigned
|
|
306
|
-
def message_ids=(message_ids)
|
|
307
|
-
if message_ids.nil?
|
|
308
|
-
fail ArgumentError, 'message_ids cannot be nil'
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
@message_ids = message_ids
|
|
312
|
-
end
|
|
313
|
-
|
|
314
307
|
# Checks equality by comparing each attribute.
|
|
315
308
|
# @param [Object] Object to be compared
|
|
316
309
|
def ==(o)
|
|
@@ -321,11 +314,11 @@ module Sendmux::Mailbox::Generated
|
|
|
321
314
|
id == o.id &&
|
|
322
315
|
last_message == o.last_message &&
|
|
323
316
|
message_count == o.message_count &&
|
|
317
|
+
message_ids == o.message_ids &&
|
|
324
318
|
participants == o.participants &&
|
|
325
319
|
states == o.states &&
|
|
326
320
|
subject == o.subject &&
|
|
327
|
-
unread_count == o.unread_count
|
|
328
|
-
message_ids == o.message_ids
|
|
321
|
+
unread_count == o.unread_count
|
|
329
322
|
end
|
|
330
323
|
|
|
331
324
|
# @see the `==` method
|
|
@@ -337,7 +330,7 @@ module Sendmux::Mailbox::Generated
|
|
|
337
330
|
# Calculates hash code according to all attributes.
|
|
338
331
|
# @return [Integer] Hash code
|
|
339
332
|
def hash
|
|
340
|
-
[folder_ids, has_attachments, id, last_message, message_count, participants, states, subject, unread_count
|
|
333
|
+
[folder_ids, has_attachments, id, last_message, message_count, message_ids, participants, states, subject, unread_count].hash
|
|
341
334
|
end
|
|
342
335
|
|
|
343
336
|
# Builds the object from hash
|
|
@@ -33,7 +33,6 @@ require 'sendmux_mailbox_generated/models/create_mailbox_folder_body'
|
|
|
33
33
|
require 'sendmux_mailbox_generated/models/cursor_pagination'
|
|
34
34
|
require 'sendmux_mailbox_generated/models/granted_mailbox'
|
|
35
35
|
require 'sendmux_mailbox_generated/models/granted_mailbox_list_response'
|
|
36
|
-
require 'sendmux_mailbox_generated/models/mailbox'
|
|
37
36
|
require 'sendmux_mailbox_generated/models/mailbox_address'
|
|
38
37
|
require 'sendmux_mailbox_generated/models/mailbox_attachment'
|
|
39
38
|
require 'sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_body'
|
|
@@ -99,7 +98,7 @@ require 'sendmux_mailbox_generated/models/mailbox_raw_body_response'
|
|
|
99
98
|
require 'sendmux_mailbox_generated/models/mailbox_raw_body_response_all_of_data'
|
|
100
99
|
require 'sendmux_mailbox_generated/models/mailbox_realtime_event'
|
|
101
100
|
require 'sendmux_mailbox_generated/models/mailbox_realtime_message'
|
|
102
|
-
require 'sendmux_mailbox_generated/models/
|
|
101
|
+
require 'sendmux_mailbox_generated/models/mailbox_realtime_message_body'
|
|
103
102
|
require 'sendmux_mailbox_generated/models/mailbox_search_snippet'
|
|
104
103
|
require 'sendmux_mailbox_generated/models/mailbox_search_snippets_result'
|
|
105
104
|
require 'sendmux_mailbox_generated/models/mailbox_search_snippets_result_response'
|
|
@@ -178,3 +177,9 @@ module Sendmux::Mailbox::Generated
|
|
|
178
177
|
end
|
|
179
178
|
end
|
|
180
179
|
end
|
|
180
|
+
|
|
181
|
+
module Sendmux::Mailbox::Generated
|
|
182
|
+
# Deprecated model constants kept as aliases of their replacements until the next major release.
|
|
183
|
+
MailboxRealtimeMessageAllOfBody = MailboxRealtimeMessageBody
|
|
184
|
+
deprecate_constant :MailboxRealtimeMessageAllOfBody
|
|
185
|
+
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sendmux-mailbox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sendmux
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-09-
|
|
10
|
+
date: 2026-09-20 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: faraday
|
|
@@ -124,7 +124,6 @@ files:
|
|
|
124
124
|
- lib/sendmux_mailbox_generated/models/cursor_pagination.rb
|
|
125
125
|
- lib/sendmux_mailbox_generated/models/granted_mailbox.rb
|
|
126
126
|
- lib/sendmux_mailbox_generated/models/granted_mailbox_list_response.rb
|
|
127
|
-
- lib/sendmux_mailbox_generated/models/mailbox.rb
|
|
128
127
|
- lib/sendmux_mailbox_generated/models/mailbox_address.rb
|
|
129
128
|
- lib/sendmux_mailbox_generated/models/mailbox_attachment.rb
|
|
130
129
|
- lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_body.rb
|
|
@@ -190,7 +189,7 @@ files:
|
|
|
190
189
|
- lib/sendmux_mailbox_generated/models/mailbox_raw_body_response_all_of_data.rb
|
|
191
190
|
- lib/sendmux_mailbox_generated/models/mailbox_realtime_event.rb
|
|
192
191
|
- lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb
|
|
193
|
-
- lib/sendmux_mailbox_generated/models/
|
|
192
|
+
- lib/sendmux_mailbox_generated/models/mailbox_realtime_message_body.rb
|
|
194
193
|
- lib/sendmux_mailbox_generated/models/mailbox_search_snippet.rb
|
|
195
194
|
- lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result.rb
|
|
196
195
|
- lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result_response.rb
|
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Sendmux API
|
|
3
|
-
|
|
4
|
-
#Programmatic access to your Sendmux email infrastructure.
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0.0
|
|
7
|
-
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.22.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
require 'time'
|
|
15
|
-
|
|
16
|
-
module Sendmux::Mailbox::Generated
|
|
17
|
-
class Mailbox < ApiModelBase
|
|
18
|
-
# ISO 8601 creation timestamp
|
|
19
|
-
attr_accessor :created_at
|
|
20
|
-
|
|
21
|
-
# Optional display name shown in outbound From headers
|
|
22
|
-
attr_accessor :display_name
|
|
23
|
-
|
|
24
|
-
# Mailbox email address (lowercase)
|
|
25
|
-
attr_accessor :email
|
|
26
|
-
|
|
27
|
-
# Public ID
|
|
28
|
-
attr_accessor :id
|
|
29
|
-
|
|
30
|
-
# Storage quota in bytes. Current writable tiers are 1 GB, 5 GB, and 50 GB.
|
|
31
|
-
attr_accessor :quota_bytes
|
|
32
|
-
|
|
33
|
-
attr_accessor :send_scope
|
|
34
|
-
|
|
35
|
-
# active | suspended | deleted
|
|
36
|
-
attr_accessor :status
|
|
37
|
-
|
|
38
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
-
def self.attribute_map
|
|
40
|
-
{
|
|
41
|
-
:'created_at' => :'created_at',
|
|
42
|
-
:'display_name' => :'display_name',
|
|
43
|
-
:'email' => :'email',
|
|
44
|
-
:'id' => :'id',
|
|
45
|
-
:'quota_bytes' => :'quota_bytes',
|
|
46
|
-
:'send_scope' => :'send_scope',
|
|
47
|
-
:'status' => :'status'
|
|
48
|
-
}
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
# Returns attribute mapping this model knows about
|
|
52
|
-
def self.acceptable_attribute_map
|
|
53
|
-
attribute_map
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# Returns all the JSON keys this model knows about
|
|
57
|
-
def self.acceptable_attributes
|
|
58
|
-
acceptable_attribute_map.values
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# Attribute type mapping.
|
|
62
|
-
def self.openapi_types
|
|
63
|
-
{
|
|
64
|
-
:'created_at' => :'String',
|
|
65
|
-
:'display_name' => :'String',
|
|
66
|
-
:'email' => :'String',
|
|
67
|
-
:'id' => :'String',
|
|
68
|
-
:'quota_bytes' => :'Integer',
|
|
69
|
-
:'send_scope' => :'MailboxSendScope',
|
|
70
|
-
:'status' => :'String'
|
|
71
|
-
}
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# List of attributes with nullable: true
|
|
75
|
-
def self.openapi_nullable
|
|
76
|
-
Set.new([
|
|
77
|
-
:'display_name',
|
|
78
|
-
:'quota_bytes',
|
|
79
|
-
:'send_scope',
|
|
80
|
-
])
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Initializes the object
|
|
84
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
85
|
-
def initialize(attributes = {})
|
|
86
|
-
if (!attributes.is_a?(Hash))
|
|
87
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::Mailbox` initialize method"
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
91
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
92
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
93
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
94
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::Mailbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
95
|
-
end
|
|
96
|
-
h[k.to_sym] = v
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if attributes.key?(:'created_at')
|
|
100
|
-
self.created_at = attributes[:'created_at']
|
|
101
|
-
else
|
|
102
|
-
self.created_at = nil
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
if attributes.key?(:'display_name')
|
|
106
|
-
self.display_name = attributes[:'display_name']
|
|
107
|
-
else
|
|
108
|
-
self.display_name = nil
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
if attributes.key?(:'email')
|
|
112
|
-
self.email = attributes[:'email']
|
|
113
|
-
else
|
|
114
|
-
self.email = nil
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
if attributes.key?(:'id')
|
|
118
|
-
self.id = attributes[:'id']
|
|
119
|
-
else
|
|
120
|
-
self.id = nil
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
if attributes.key?(:'quota_bytes')
|
|
124
|
-
self.quota_bytes = attributes[:'quota_bytes']
|
|
125
|
-
else
|
|
126
|
-
self.quota_bytes = nil
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
if attributes.key?(:'send_scope')
|
|
130
|
-
self.send_scope = attributes[:'send_scope']
|
|
131
|
-
else
|
|
132
|
-
self.send_scope = nil
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
if attributes.key?(:'status')
|
|
136
|
-
self.status = attributes[:'status']
|
|
137
|
-
else
|
|
138
|
-
self.status = nil
|
|
139
|
-
end
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
143
|
-
# @return Array for valid properties with the reasons
|
|
144
|
-
def list_invalid_properties
|
|
145
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
146
|
-
invalid_properties = Array.new
|
|
147
|
-
if @created_at.nil?
|
|
148
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
if @email.nil?
|
|
152
|
-
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
if @id.nil?
|
|
156
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
if @status.nil?
|
|
160
|
-
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
invalid_properties
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
# Check to see if the all the properties in the model are valid
|
|
167
|
-
# @return true if the model is valid
|
|
168
|
-
def valid?
|
|
169
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
170
|
-
return false if @created_at.nil?
|
|
171
|
-
return false if @email.nil?
|
|
172
|
-
return false if @id.nil?
|
|
173
|
-
return false if @status.nil?
|
|
174
|
-
true
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
# Custom attribute writer method with validation
|
|
178
|
-
# @param [Object] created_at Value to be assigned
|
|
179
|
-
def created_at=(created_at)
|
|
180
|
-
if created_at.nil?
|
|
181
|
-
fail ArgumentError, 'created_at cannot be nil'
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
@created_at = created_at
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
# Custom attribute writer method with validation
|
|
188
|
-
# @param [Object] email Value to be assigned
|
|
189
|
-
def email=(email)
|
|
190
|
-
if email.nil?
|
|
191
|
-
fail ArgumentError, 'email cannot be nil'
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
@email = email
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
# Custom attribute writer method with validation
|
|
198
|
-
# @param [Object] id Value to be assigned
|
|
199
|
-
def id=(id)
|
|
200
|
-
if id.nil?
|
|
201
|
-
fail ArgumentError, 'id cannot be nil'
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
@id = id
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
# Custom attribute writer method with validation
|
|
208
|
-
# @param [Object] status Value to be assigned
|
|
209
|
-
def status=(status)
|
|
210
|
-
if status.nil?
|
|
211
|
-
fail ArgumentError, 'status cannot be nil'
|
|
212
|
-
end
|
|
213
|
-
|
|
214
|
-
@status = status
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# Checks equality by comparing each attribute.
|
|
218
|
-
# @param [Object] Object to be compared
|
|
219
|
-
def ==(o)
|
|
220
|
-
return true if self.equal?(o)
|
|
221
|
-
self.class == o.class &&
|
|
222
|
-
created_at == o.created_at &&
|
|
223
|
-
display_name == o.display_name &&
|
|
224
|
-
email == o.email &&
|
|
225
|
-
id == o.id &&
|
|
226
|
-
quota_bytes == o.quota_bytes &&
|
|
227
|
-
send_scope == o.send_scope &&
|
|
228
|
-
status == o.status
|
|
229
|
-
end
|
|
230
|
-
|
|
231
|
-
# @see the `==` method
|
|
232
|
-
# @param [Object] Object to be compared
|
|
233
|
-
def eql?(o)
|
|
234
|
-
self == o
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
# Calculates hash code according to all attributes.
|
|
238
|
-
# @return [Integer] Hash code
|
|
239
|
-
def hash
|
|
240
|
-
[created_at, display_name, email, id, quota_bytes, send_scope, status].hash
|
|
241
|
-
end
|
|
242
|
-
|
|
243
|
-
# Builds the object from hash
|
|
244
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
245
|
-
# @return [Object] Returns the model itself
|
|
246
|
-
def self.build_from_hash(attributes)
|
|
247
|
-
return nil unless attributes.is_a?(Hash)
|
|
248
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
249
|
-
transformed_hash = {}
|
|
250
|
-
openapi_types.each_pair do |key, type|
|
|
251
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
252
|
-
transformed_hash["#{key}"] = nil
|
|
253
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
254
|
-
# check to ensure the input is an array given that the attribute
|
|
255
|
-
# is documented as an array but the input is not
|
|
256
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
257
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
258
|
-
end
|
|
259
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
260
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
261
|
-
end
|
|
262
|
-
end
|
|
263
|
-
new(transformed_hash)
|
|
264
|
-
end
|
|
265
|
-
|
|
266
|
-
# Returns the object in the form of hash
|
|
267
|
-
# @return [Hash] Returns the object in the form of hash
|
|
268
|
-
def to_hash
|
|
269
|
-
hash = {}
|
|
270
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
271
|
-
value = self.send(attr)
|
|
272
|
-
if value.nil?
|
|
273
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
274
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
hash[param] = _to_hash(value)
|
|
278
|
-
end
|
|
279
|
-
hash
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
end
|
|
283
|
-
|
|
284
|
-
end
|