sendmux-mailbox 1.4.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.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/README.md +60 -1
  4. data/lib/sendmux/mailbox/version.rb +1 -1
  5. data/lib/sendmux_mailbox_generated/api/mailbox_api_api.rb +6 -6
  6. data/lib/sendmux_mailbox_generated/models/mailbox_identity_cursor_list_response.rb +1 -1
  7. data/lib/sendmux_mailbox_generated/models/mailbox_identity_list_meta.rb +173 -0
  8. data/lib/sendmux_mailbox_generated/models/mailbox_me.rb +14 -21
  9. data/lib/sendmux_mailbox_generated/models/mailbox_message.rb +29 -35
  10. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +1 -1
  11. data/lib/sendmux_mailbox_generated/models/mailbox_query_meta.rb +173 -0
  12. data/lib/sendmux_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +1 -1
  13. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb +43 -49
  14. data/lib/sendmux_mailbox_generated/models/{mailbox_realtime_message_all_of_body.rb → mailbox_realtime_message_body.rb} +3 -3
  15. data/lib/sendmux_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +1 -1
  16. data/lib/sendmux_mailbox_generated/models/mailbox_sync_meta.rb +173 -0
  17. data/lib/sendmux_mailbox_generated/models/mailbox_thread.rb +32 -39
  18. data/lib/sendmux_mailbox_generated/models/{mailbox.rb → mailbox_thread_message_summary_cursor_list_response.rb} +73 -106
  19. data/lib/sendmux_mailbox_generated/models/mailbox_thread_messages_meta.rb +199 -0
  20. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +1 -1
  21. data/lib/sendmux_mailbox_generated.rb +12 -2
  22. metadata +8 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8e1b0e705f607337315096115ace9127a97f01d79aca0c2e5fecc48b4c7ed8e
4
- data.tar.gz: 3a924f8fc35fd94b028d3a16ca97140e16b29aa2a680d92de07c0b4d7d6a81ab
3
+ metadata.gz: 0c024fbb1bcefd6a29fbefb738b104c6ce71b36ccf802d0ad331e48529451a36
4
+ data.tar.gz: 6a3f7aa0036a0e5407b3abaa2654fc3709f6093c5de051dc72e23a3cf612b72c
5
5
  SHA512:
6
- metadata.gz: 5eab57ef617a7d08c59da74bbb0126cc1e30c2ffcb7316cd832e37e6ba6fb5b99658a44a3b7686c2e310722afdbba7988f67d74b1d2cfcf976ace33cb825ac65
7
- data.tar.gz: cb889b2b515e98b60e826e4f3404effe59593ff0c83950ecd8e91ae2021312691ffe3cad4d86540e2e89b7c8bbfc972ffdaa294a257cc01474ee2c6856cd8fc5
6
+ metadata.gz: e6b233030d757f9a1cda39d4a433dba9c17a8916e60a986b8abb0c413350ff2a733d0dd0b4e0d2a2ff615d73ab37e21a58f63b0403e582092f1a1c12f03472a5
7
+ data.tar.gz: 63f18717f5efc8da8a6781ebf306a35cab4d1f357fd052ebde2508694a31047d6125748ad2b58b8f8c77362983b1b3fc6b11bf29a218f755b187018737b8bda6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
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
+
20
+ ## [2.0.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-mailbox/v1.4.0...ruby-mailbox/v2.0.0) (2026-09-19)
21
+
22
+ ### Changed
23
+
24
+ * **Breaking:** `mailbox_list_thread_messages` returns `MailboxThreadMessageSummaryCursorListResponse`, whose `meta.thread_id` is required and whose optional `meta.sync_state` is typed; thread-message results you construct (fixtures, mocks, wrappers) must now supply `thread_id`, while reading results is unaffected. `mailbox_list_messages` keeps `MailboxMessageSummaryCursorListResponse`; message, identity, submission, quota, and thread list responses replace the generic `ResponseMeta` with `MailboxSyncMeta`, `MailboxIdentityListMeta`, or `MailboxQueryMeta`, which add optional typed state metadata (`sync_state`, `identity_state`, `query_state`) ([87f54eb](https://github.com/Sendmux/sendmux-sdk/commit/87f54eb1679994ddcbdd68ad25d674ad6978f57f)). See [Migrate from 1.x to 2.0](README.md#migrate-from-1x-to-20).
25
+
26
+ ### Bug Fixes
27
+
28
+ * prepare mailbox SDK major releases ([dc01472](https://github.com/Sendmux/sendmux-sdk/commit/dc014724f7f6eb6b93293e6acbcc1a36c5060ebb))
29
+ * **sdk:** preserve streaming arguments and prepare PHP OAuth release ([#207](https://github.com/Sendmux/sendmux-sdk/issues/207)) ([c534588](https://github.com/Sendmux/sendmux-sdk/commit/c53458875cef0bbd601c982308d84bc4e87c961c))
30
+
3
31
  ## [1.4.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-mailbox/v1.3.0...ruby-mailbox/v1.4.0) (2026-09-10)
4
32
 
5
33
 
data/README.md CHANGED
@@ -29,9 +29,68 @@ gem install sendmux-mailbox
29
29
  Or add it to your Gemfile:
30
30
 
31
31
  ```ruby
32
- gem "sendmux-mailbox", "~> 1.0"
32
+ gem "sendmux-mailbox", "~> 2.0"
33
33
  ```
34
34
 
35
+ ## Migrate from 1.x to 2.0
36
+
37
+ If you check thread-message result classes or build thread-message fixtures by
38
+ hand, update them when upgrading to 2.0. `mailbox_list_thread_messages` returns
39
+ `MailboxThreadMessageSummaryCursorListResponse` instead of
40
+ `MailboxMessageSummaryCursorListResponse`: its `meta` is
41
+ `MailboxThreadMessagesMeta`, whose `thread_id` is required and whose
42
+ `sync_state` is an optional string. Code that only reads thread-message results
43
+ keeps working.
44
+
45
+ 1. Update thread-message class checks to use the class loaded by the public
46
+ entry point:
47
+
48
+ ```ruby
49
+ require "sendmux/mailbox"
50
+
51
+ def thread_message_list?(response)
52
+ # Before: response.is_a?(Sendmux::Mailbox::Generated::MailboxMessageSummaryCursorListResponse)
53
+ response.is_a?(Sendmux::Mailbox::Generated::MailboxThreadMessageSummaryCursorListResponse)
54
+ end
55
+ ```
56
+
57
+ 2. Add the thread identity to every thread-message result you construct. Pass
58
+ the thread's `id` as the `thread_id` argument when you read one from the
59
+ public client:
60
+
61
+ ```ruby
62
+ def thread_message_fixture(thread_id)
63
+ # Before: meta: { request_id: "req_fixture" }
64
+ Sendmux::Mailbox::Generated::MailboxThreadMessageSummaryCursorListResponse.build_from_hash(
65
+ ok: true,
66
+ meta: { request_id: "req_fixture", thread_id: thread_id },
67
+ data: [],
68
+ pagination: { has_more: false }
69
+ )
70
+ end
71
+
72
+ def thread_sync_state(client, thread_id)
73
+ response = client.mailbox_api.mailbox_list_thread_messages(thread_id, limit: 50)
74
+ [response.meta.thread_id, response.meta.sync_state]
75
+ end
76
+ ```
77
+
78
+ Ordinary `mailbox_list_messages` results remain
79
+ `MailboxMessageSummaryCursorListResponse`: they have no thread identity and
80
+ expose an optional typed `meta.sync_state`. Identity, submission, quota, and
81
+ thread list responses likewise replace the generic `ResponseMeta` with
82
+ `MailboxIdentityListMeta` or `MailboxQueryMeta`, which add optional
83
+ `identity_state` or `query_state`; `meta.request_id` is unchanged everywhere
84
+ and no new field is required there.
85
+
86
+ 3. Run your application's tests with the updated bundle. A constructed
87
+ thread-message result without `meta.thread_id` fails with
88
+ `ArgumentError: thread_id cannot be nil`.
89
+
90
+ Update `sendmux-mailbox`, the bundle lock, and affected call sites or fixtures
91
+ together. To roll back, restore those gem requirement, lock, and call-site
92
+ changes together.
93
+
35
94
  ## OAuth access tokens
36
95
 
37
96
  Pass either `api_key:` or `access_token:`. `access_token:` accepts a bare token string or a callable; the callable is evaluated once per authenticated request. Your application owns token storage, expiry checks and refresh coordination.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sendmux
4
4
  module Mailbox
5
- VERSION = '1.4.0'
5
+ VERSION = '2.0.1'
6
6
  end
7
7
  end
@@ -2472,7 +2472,7 @@ module Sendmux::Mailbox::Generated
2472
2472
  # @option opts [Integer] :limit
2473
2473
  # @option opts [String] :sort
2474
2474
  # @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
2475
- # @return [MailboxMessageSummaryCursorListResponse]
2475
+ # @return [MailboxThreadMessageSummaryCursorListResponse]
2476
2476
  def mailbox_list_thread_messages(thread_id, opts = {})
2477
2477
  data, _status_code, _headers = mailbox_list_thread_messages_with_http_info(thread_id, opts)
2478
2478
  data
@@ -2486,7 +2486,7 @@ module Sendmux::Mailbox::Generated
2486
2486
  # @option opts [Integer] :limit
2487
2487
  # @option opts [String] :sort
2488
2488
  # @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
2489
- # @return [Array<(MailboxMessageSummaryCursorListResponse, Integer, Hash)>] MailboxMessageSummaryCursorListResponse data, response status code and response headers
2489
+ # @return [Array<(MailboxThreadMessageSummaryCursorListResponse, Integer, Hash)>] MailboxThreadMessageSummaryCursorListResponse data, response status code and response headers
2490
2490
  def mailbox_list_thread_messages_with_http_info(thread_id, opts = {})
2491
2491
  if @api_client.config.debugging
2492
2492
  @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_thread_messages ...'
@@ -2529,7 +2529,7 @@ module Sendmux::Mailbox::Generated
2529
2529
  post_body = opts[:debug_body]
2530
2530
 
2531
2531
  # return_type
2532
- return_type = opts[:debug_return_type] || 'MailboxMessageSummaryCursorListResponse'
2532
+ return_type = opts[:debug_return_type] || 'MailboxThreadMessageSummaryCursorListResponse'
2533
2533
 
2534
2534
  # auth_names
2535
2535
  auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
@@ -3163,12 +3163,12 @@ module Sendmux::Mailbox::Generated
3163
3163
  # Stream mailbox events
3164
3164
  # Streams bounded rich mailbox events for connected clients. Each received-message event includes subject, participants, preview, attachment metadata, and a capped body snapshot; use the message endpoints for full content or attachment bytes.
3165
3165
  # @param [Hash] opts the optional parameters
3166
- # @option opts [String] :mailbox_id
3167
3166
  # @option opts [String] :event_types
3168
3167
  # @option opts [String] :last_event_id
3169
3168
  # @option opts [Integer] :ping
3170
3169
  # @option opts [Integer] :close_after
3171
3170
  # @option opts [String] :last_event_id2
3171
+ # @option opts [String] :mailbox_id
3172
3172
  # @return [MailboxRealtimeEvent]
3173
3173
  def mailbox_stream_events(opts = {})
3174
3174
  data, _status_code, _headers = mailbox_stream_events_with_http_info(opts)
@@ -3178,12 +3178,12 @@ module Sendmux::Mailbox::Generated
3178
3178
  # Stream mailbox events
3179
3179
  # Streams bounded rich mailbox events for connected clients. Each received-message event includes subject, participants, preview, attachment metadata, and a capped body snapshot; use the message endpoints for full content or attachment bytes.
3180
3180
  # @param [Hash] opts the optional parameters
3181
- # @option opts [String] :mailbox_id
3182
3181
  # @option opts [String] :event_types
3183
3182
  # @option opts [String] :last_event_id
3184
3183
  # @option opts [Integer] :ping
3185
3184
  # @option opts [Integer] :close_after
3186
3185
  # @option opts [String] :last_event_id2
3186
+ # @option opts [String] :mailbox_id
3187
3187
  # @return [Array<(MailboxRealtimeEvent, Integer, Hash)>] MailboxRealtimeEvent data, response status code and response headers
3188
3188
  def mailbox_stream_events_with_http_info(opts = {})
3189
3189
  if @api_client.config.debugging
@@ -3210,11 +3210,11 @@ module Sendmux::Mailbox::Generated
3210
3210
 
3211
3211
  # query parameters
3212
3212
  query_params = opts[:query_params] || {}
3213
- query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
3214
3213
  query_params[:'event_types'] = opts[:'event_types'] if !opts[:'event_types'].nil?
3215
3214
  query_params[:'last_event_id'] = opts[:'last_event_id'] if !opts[:'last_event_id'].nil?
3216
3215
  query_params[:'ping'] = opts[:'ping'] if !opts[:'ping'].nil?
3217
3216
  query_params[:'close_after'] = opts[:'close_after'] if !opts[:'close_after'].nil?
3217
+ query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
3218
3218
 
3219
3219
  # header parameters
3220
3220
  header_params = opts[:header_params] || {}
@@ -46,7 +46,7 @@ module Sendmux::Mailbox::Generated
46
46
  # Attribute type mapping.
47
47
  def self.openapi_types
48
48
  {
49
- :'meta' => :'ResponseMeta',
49
+ :'meta' => :'MailboxIdentityListMeta',
50
50
  :'ok' => :'Boolean',
51
51
  :'data' => :'Array<MailboxIdentity>',
52
52
  :'pagination' => :'CursorPagination'
@@ -0,0 +1,173 @@
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 MailboxIdentityListMeta < ApiModelBase
18
+ attr_accessor :identity_state
19
+
20
+ attr_accessor :request_id
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'identity_state' => :'identity_state',
26
+ :'request_id' => :'request_id'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'identity_state' => :'String',
44
+ :'request_id' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxIdentityListMeta` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxIdentityListMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'identity_state')
71
+ self.identity_state = attributes[:'identity_state']
72
+ end
73
+
74
+ if attributes.key?(:'request_id')
75
+ self.request_id = attributes[:'request_id']
76
+ else
77
+ self.request_id = nil
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ if @request_id.nil?
87
+ invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
88
+ end
89
+
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ warn '[DEPRECATED] the `valid?` method is obsolete'
97
+ return false if @request_id.nil?
98
+ true
99
+ end
100
+
101
+ # Custom attribute writer method with validation
102
+ # @param [Object] request_id Value to be assigned
103
+ def request_id=(request_id)
104
+ if request_id.nil?
105
+ fail ArgumentError, 'request_id cannot be nil'
106
+ end
107
+
108
+ @request_id = request_id
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ identity_state == o.identity_state &&
117
+ request_id == o.request_id
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [identity_state, request_id].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ attributes = attributes.transform_keys(&:to_sym)
138
+ transformed_hash = {}
139
+ openapi_types.each_pair do |key, type|
140
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[attribute_map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
+ end
148
+ elsif !attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
+ end
151
+ end
152
+ new(transformed_hash)
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ if value.nil?
162
+ is_nullable = self.class.openapi_nullable.include?(attr)
163
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
164
+ end
165
+
166
+ hash[param] = _to_hash(value)
167
+ end
168
+ hash
169
+ end
170
+
171
+ end
172
+
173
+ end
@@ -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, quota_used_bytes].hash
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, html_body, text_body].hash
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
@@ -46,7 +46,7 @@ module Sendmux::Mailbox::Generated
46
46
  # Attribute type mapping.
47
47
  def self.openapi_types
48
48
  {
49
- :'meta' => :'ResponseMeta',
49
+ :'meta' => :'MailboxSyncMeta',
50
50
  :'ok' => :'Boolean',
51
51
  :'data' => :'Array<MailboxMessageSummary>',
52
52
  :'pagination' => :'CursorPagination'