sendmux-mailbox 1.4.0 → 2.0.0
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 +11 -0
- data/README.md +60 -1
- data/lib/sendmux/mailbox/version.rb +1 -1
- data/lib/sendmux_mailbox_generated/api/mailbox_api_api.rb +6 -6
- data/lib/sendmux_mailbox_generated/models/mailbox_identity_cursor_list_response.rb +1 -1
- data/lib/sendmux_mailbox_generated/models/mailbox_identity_list_meta.rb +173 -0
- data/lib/sendmux_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +1 -1
- data/lib/sendmux_mailbox_generated/models/mailbox_query_meta.rb +173 -0
- data/lib/sendmux_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +1 -1
- data/lib/sendmux_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +1 -1
- data/lib/sendmux_mailbox_generated/models/mailbox_sync_meta.rb +173 -0
- data/lib/sendmux_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response.rb +251 -0
- data/lib/sendmux_mailbox_generated/models/mailbox_thread_messages_meta.rb +199 -0
- data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +1 -1
- data/lib/sendmux_mailbox_generated.rb +5 -0
- metadata +7 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68c9526f6b5a337fbca544020f422373d3b8a3f2f5297cc46a5dd89fc56e8178
|
|
4
|
+
data.tar.gz: ba40867ae0335bfecac6c6fa72734ae1ab9fc7f709a24fe4092eb11451be2536
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99f90042244c3f8438a6dd761a92e9b06a17dd2a84d689bf1b98c88d9706ff21f245f082152f1fa3601a3c671de9d94d52716772bafaa1b42edbcc99fccd72c5
|
|
7
|
+
data.tar.gz: e648e591dce5ef866b33dde9b23325dbfb707b19af956bcee415d8b0bb80d67b04d74855c1f171a3c5c8f2d4fc88d326e86877d6d0e12d437a18f88063289904
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-mailbox/v1.4.0...ruby-mailbox/v2.0.0) (2026-09-19)
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
* **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).
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* prepare mailbox SDK major releases ([dc01472](https://github.com/Sendmux/sendmux-sdk/commit/dc014724f7f6eb6b93293e6acbcc1a36c5060ebb))
|
|
12
|
+
* **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))
|
|
13
|
+
|
|
3
14
|
## [1.4.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-mailbox/v1.3.0...ruby-mailbox/v1.4.0) (2026-09-10)
|
|
4
15
|
|
|
5
16
|
|
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", "~>
|
|
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.
|
|
@@ -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 [
|
|
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<(
|
|
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] || '
|
|
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' => :'
|
|
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
|
|
@@ -46,7 +46,7 @@ module Sendmux::Mailbox::Generated
|
|
|
46
46
|
# Attribute type mapping.
|
|
47
47
|
def self.openapi_types
|
|
48
48
|
{
|
|
49
|
-
:'meta' => :'
|
|
49
|
+
:'meta' => :'MailboxSyncMeta',
|
|
50
50
|
:'ok' => :'Boolean',
|
|
51
51
|
:'data' => :'Array<MailboxMessageSummary>',
|
|
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 MailboxQueryMeta < ApiModelBase
|
|
18
|
+
attr_accessor :query_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
|
+
:'query_state' => :'query_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
|
+
:'query_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::MailboxQueryMeta` 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::MailboxQueryMeta`. 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?(:'query_state')
|
|
71
|
+
self.query_state = attributes[:'query_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
|
+
query_state == o.query_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
|
+
[query_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
|
|
@@ -46,7 +46,7 @@ module Sendmux::Mailbox::Generated
|
|
|
46
46
|
# Attribute type mapping.
|
|
47
47
|
def self.openapi_types
|
|
48
48
|
{
|
|
49
|
-
:'meta' => :'
|
|
49
|
+
:'meta' => :'MailboxQueryMeta',
|
|
50
50
|
:'ok' => :'Boolean',
|
|
51
51
|
:'data' => :'Array<MailboxQuota>',
|
|
52
52
|
:'pagination' => :'CursorPagination'
|
|
@@ -46,7 +46,7 @@ module Sendmux::Mailbox::Generated
|
|
|
46
46
|
# Attribute type mapping.
|
|
47
47
|
def self.openapi_types
|
|
48
48
|
{
|
|
49
|
-
:'meta' => :'
|
|
49
|
+
:'meta' => :'MailboxQueryMeta',
|
|
50
50
|
:'ok' => :'Boolean',
|
|
51
51
|
:'data' => :'Array<MailboxSubmission>',
|
|
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 MailboxSyncMeta < ApiModelBase
|
|
18
|
+
attr_accessor :request_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :sync_state
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'request_id' => :'request_id',
|
|
26
|
+
:'sync_state' => :'sync_state'
|
|
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
|
+
:'request_id' => :'String',
|
|
44
|
+
:'sync_state' => :'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::MailboxSyncMeta` 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::MailboxSyncMeta`. 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?(:'request_id')
|
|
71
|
+
self.request_id = attributes[:'request_id']
|
|
72
|
+
else
|
|
73
|
+
self.request_id = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'sync_state')
|
|
77
|
+
self.sync_state = attributes[:'sync_state']
|
|
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
|
+
request_id == o.request_id &&
|
|
117
|
+
sync_state == o.sync_state
|
|
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
|
+
[request_id, sync_state].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
|
data/lib/sendmux_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response.rb
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
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 MailboxThreadMessageSummaryCursorListResponse < ApiModelBase
|
|
18
|
+
attr_accessor :meta
|
|
19
|
+
|
|
20
|
+
attr_accessor :ok
|
|
21
|
+
|
|
22
|
+
attr_accessor :data
|
|
23
|
+
|
|
24
|
+
attr_accessor :pagination
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'meta' => :'meta',
|
|
30
|
+
:'ok' => :'ok',
|
|
31
|
+
:'data' => :'data',
|
|
32
|
+
:'pagination' => :'pagination'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'meta' => :'MailboxThreadMessagesMeta',
|
|
50
|
+
:'ok' => :'Boolean',
|
|
51
|
+
:'data' => :'Array<MailboxMessageSummary>',
|
|
52
|
+
:'pagination' => :'CursorPagination'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
63
|
+
def self.openapi_all_of
|
|
64
|
+
[
|
|
65
|
+
:'SuccessEnvelope'
|
|
66
|
+
]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Initializes the object
|
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
71
|
+
def initialize(attributes = {})
|
|
72
|
+
if (!attributes.is_a?(Hash))
|
|
73
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxThreadMessageSummaryCursorListResponse` initialize method"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
77
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
78
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
79
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxThreadMessageSummaryCursorListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
81
|
+
end
|
|
82
|
+
h[k.to_sym] = v
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'meta')
|
|
86
|
+
self.meta = attributes[:'meta']
|
|
87
|
+
else
|
|
88
|
+
self.meta = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'ok')
|
|
92
|
+
self.ok = attributes[:'ok']
|
|
93
|
+
else
|
|
94
|
+
self.ok = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'data')
|
|
98
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
99
|
+
self.data = value
|
|
100
|
+
end
|
|
101
|
+
else
|
|
102
|
+
self.data = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'pagination')
|
|
106
|
+
self.pagination = attributes[:'pagination']
|
|
107
|
+
else
|
|
108
|
+
self.pagination = nil
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
113
|
+
# @return Array for valid properties with the reasons
|
|
114
|
+
def list_invalid_properties
|
|
115
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
116
|
+
invalid_properties = Array.new
|
|
117
|
+
if @meta.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @ok.nil?
|
|
122
|
+
invalid_properties.push('invalid value for "ok", ok cannot be nil.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if @data.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if @pagination.nil?
|
|
130
|
+
invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
invalid_properties
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Check to see if the all the properties in the model are valid
|
|
137
|
+
# @return true if the model is valid
|
|
138
|
+
def valid?
|
|
139
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
140
|
+
return false if @meta.nil?
|
|
141
|
+
return false if @ok.nil?
|
|
142
|
+
return false if @data.nil?
|
|
143
|
+
return false if @pagination.nil?
|
|
144
|
+
true
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Custom attribute writer method with validation
|
|
148
|
+
# @param [Object] meta Value to be assigned
|
|
149
|
+
def meta=(meta)
|
|
150
|
+
if meta.nil?
|
|
151
|
+
fail ArgumentError, 'meta cannot be nil'
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
@meta = meta
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Custom attribute writer method with validation
|
|
158
|
+
# @param [Object] ok Value to be assigned
|
|
159
|
+
def ok=(ok)
|
|
160
|
+
if ok.nil?
|
|
161
|
+
fail ArgumentError, 'ok cannot be nil'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@ok = ok
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Custom attribute writer method with validation
|
|
168
|
+
# @param [Object] data Value to be assigned
|
|
169
|
+
def data=(data)
|
|
170
|
+
if data.nil?
|
|
171
|
+
fail ArgumentError, 'data cannot be nil'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
@data = data
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Custom attribute writer method with validation
|
|
178
|
+
# @param [Object] pagination Value to be assigned
|
|
179
|
+
def pagination=(pagination)
|
|
180
|
+
if pagination.nil?
|
|
181
|
+
fail ArgumentError, 'pagination cannot be nil'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@pagination = pagination
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Checks equality by comparing each attribute.
|
|
188
|
+
# @param [Object] Object to be compared
|
|
189
|
+
def ==(o)
|
|
190
|
+
return true if self.equal?(o)
|
|
191
|
+
self.class == o.class &&
|
|
192
|
+
meta == o.meta &&
|
|
193
|
+
ok == o.ok &&
|
|
194
|
+
data == o.data &&
|
|
195
|
+
pagination == o.pagination
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# @see the `==` method
|
|
199
|
+
# @param [Object] Object to be compared
|
|
200
|
+
def eql?(o)
|
|
201
|
+
self == o
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Calculates hash code according to all attributes.
|
|
205
|
+
# @return [Integer] Hash code
|
|
206
|
+
def hash
|
|
207
|
+
[meta, ok, data, pagination].hash
|
|
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 self.build_from_hash(attributes)
|
|
214
|
+
return nil unless attributes.is_a?(Hash)
|
|
215
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
216
|
+
transformed_hash = {}
|
|
217
|
+
openapi_types.each_pair do |key, type|
|
|
218
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
219
|
+
transformed_hash["#{key}"] = nil
|
|
220
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
221
|
+
# check to ensure the input is an array given that the attribute
|
|
222
|
+
# is documented as an array but the input is not
|
|
223
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
224
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
225
|
+
end
|
|
226
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
227
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
new(transformed_hash)
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Returns the object in the form of hash
|
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
|
235
|
+
def to_hash
|
|
236
|
+
hash = {}
|
|
237
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
238
|
+
value = self.send(attr)
|
|
239
|
+
if value.nil?
|
|
240
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
241
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
hash[param] = _to_hash(value)
|
|
245
|
+
end
|
|
246
|
+
hash
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
end
|
|
@@ -0,0 +1,199 @@
|
|
|
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 MailboxThreadMessagesMeta < ApiModelBase
|
|
18
|
+
attr_accessor :request_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :sync_state
|
|
21
|
+
|
|
22
|
+
attr_accessor :thread_id
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'request_id' => :'request_id',
|
|
28
|
+
:'sync_state' => :'sync_state',
|
|
29
|
+
:'thread_id' => :'thread_id'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'request_id' => :'String',
|
|
47
|
+
:'sync_state' => :'String',
|
|
48
|
+
:'thread_id' => :'String'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
if (!attributes.is_a?(Hash))
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxThreadMessagesMeta` initialize method"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxThreadMessagesMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
|
+
end
|
|
71
|
+
h[k.to_sym] = v
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'request_id')
|
|
75
|
+
self.request_id = attributes[:'request_id']
|
|
76
|
+
else
|
|
77
|
+
self.request_id = nil
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'sync_state')
|
|
81
|
+
self.sync_state = attributes[:'sync_state']
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'thread_id')
|
|
85
|
+
self.thread_id = attributes[:'thread_id']
|
|
86
|
+
else
|
|
87
|
+
self.thread_id = nil
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
92
|
+
# @return Array for valid properties with the reasons
|
|
93
|
+
def list_invalid_properties
|
|
94
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
95
|
+
invalid_properties = Array.new
|
|
96
|
+
if @request_id.nil?
|
|
97
|
+
invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if @thread_id.nil?
|
|
101
|
+
invalid_properties.push('invalid value for "thread_id", thread_id cannot be nil.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
invalid_properties
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Check to see if the all the properties in the model are valid
|
|
108
|
+
# @return true if the model is valid
|
|
109
|
+
def valid?
|
|
110
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
111
|
+
return false if @request_id.nil?
|
|
112
|
+
return false if @thread_id.nil?
|
|
113
|
+
true
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Custom attribute writer method with validation
|
|
117
|
+
# @param [Object] request_id Value to be assigned
|
|
118
|
+
def request_id=(request_id)
|
|
119
|
+
if request_id.nil?
|
|
120
|
+
fail ArgumentError, 'request_id cannot be nil'
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
@request_id = request_id
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Custom attribute writer method with validation
|
|
127
|
+
# @param [Object] thread_id Value to be assigned
|
|
128
|
+
def thread_id=(thread_id)
|
|
129
|
+
if thread_id.nil?
|
|
130
|
+
fail ArgumentError, 'thread_id cannot be nil'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
@thread_id = thread_id
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Checks equality by comparing each attribute.
|
|
137
|
+
# @param [Object] Object to be compared
|
|
138
|
+
def ==(o)
|
|
139
|
+
return true if self.equal?(o)
|
|
140
|
+
self.class == o.class &&
|
|
141
|
+
request_id == o.request_id &&
|
|
142
|
+
sync_state == o.sync_state &&
|
|
143
|
+
thread_id == o.thread_id
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# @see the `==` method
|
|
147
|
+
# @param [Object] Object to be compared
|
|
148
|
+
def eql?(o)
|
|
149
|
+
self == o
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Calculates hash code according to all attributes.
|
|
153
|
+
# @return [Integer] Hash code
|
|
154
|
+
def hash
|
|
155
|
+
[request_id, sync_state, thread_id].hash
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Builds the object from hash
|
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
160
|
+
# @return [Object] Returns the model itself
|
|
161
|
+
def self.build_from_hash(attributes)
|
|
162
|
+
return nil unless attributes.is_a?(Hash)
|
|
163
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
164
|
+
transformed_hash = {}
|
|
165
|
+
openapi_types.each_pair do |key, type|
|
|
166
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
167
|
+
transformed_hash["#{key}"] = nil
|
|
168
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
169
|
+
# check to ensure the input is an array given that the attribute
|
|
170
|
+
# is documented as an array but the input is not
|
|
171
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
172
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
173
|
+
end
|
|
174
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
175
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
new(transformed_hash)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Returns the object in the form of hash
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_hash
|
|
184
|
+
hash = {}
|
|
185
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
186
|
+
value = self.send(attr)
|
|
187
|
+
if value.nil?
|
|
188
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
189
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
hash[param] = _to_hash(value)
|
|
193
|
+
end
|
|
194
|
+
hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
end
|
|
@@ -46,7 +46,7 @@ module Sendmux::Mailbox::Generated
|
|
|
46
46
|
# Attribute type mapping.
|
|
47
47
|
def self.openapi_types
|
|
48
48
|
{
|
|
49
|
-
:'meta' => :'
|
|
49
|
+
:'meta' => :'MailboxQueryMeta',
|
|
50
50
|
:'ok' => :'Boolean',
|
|
51
51
|
:'data' => :'Array<MailboxThreadSummary>',
|
|
52
52
|
:'pagination' => :'CursorPagination'
|
|
@@ -69,6 +69,7 @@ require 'sendmux_mailbox_generated/models/mailbox_folder_response'
|
|
|
69
69
|
require 'sendmux_mailbox_generated/models/mailbox_get_changes200_response'
|
|
70
70
|
require 'sendmux_mailbox_generated/models/mailbox_identity'
|
|
71
71
|
require 'sendmux_mailbox_generated/models/mailbox_identity_cursor_list_response'
|
|
72
|
+
require 'sendmux_mailbox_generated/models/mailbox_identity_list_meta'
|
|
72
73
|
require 'sendmux_mailbox_generated/models/mailbox_identity_response'
|
|
73
74
|
require 'sendmux_mailbox_generated/models/mailbox_me'
|
|
74
75
|
require 'sendmux_mailbox_generated/models/mailbox_me_item_response'
|
|
@@ -89,6 +90,7 @@ require 'sendmux_mailbox_generated/models/mailbox_message_query_changes'
|
|
|
89
90
|
require 'sendmux_mailbox_generated/models/mailbox_message_query_changes_response'
|
|
90
91
|
require 'sendmux_mailbox_generated/models/mailbox_message_summary'
|
|
91
92
|
require 'sendmux_mailbox_generated/models/mailbox_message_summary_cursor_list_response'
|
|
93
|
+
require 'sendmux_mailbox_generated/models/mailbox_query_meta'
|
|
92
94
|
require 'sendmux_mailbox_generated/models/mailbox_quota'
|
|
93
95
|
require 'sendmux_mailbox_generated/models/mailbox_quota_cursor_list_response'
|
|
94
96
|
require 'sendmux_mailbox_generated/models/mailbox_raw_body'
|
|
@@ -126,12 +128,15 @@ require 'sendmux_mailbox_generated/models/mailbox_submission_envelope'
|
|
|
126
128
|
require 'sendmux_mailbox_generated/models/mailbox_submission_envelope_address'
|
|
127
129
|
require 'sendmux_mailbox_generated/models/mailbox_submission_envelope_rcpt_to_inner'
|
|
128
130
|
require 'sendmux_mailbox_generated/models/mailbox_submission_response'
|
|
131
|
+
require 'sendmux_mailbox_generated/models/mailbox_sync_meta'
|
|
129
132
|
require 'sendmux_mailbox_generated/models/mailbox_thread'
|
|
130
133
|
require 'sendmux_mailbox_generated/models/mailbox_thread_content_meta'
|
|
131
134
|
require 'sendmux_mailbox_generated/models/mailbox_thread_content_meta_states'
|
|
132
135
|
require 'sendmux_mailbox_generated/models/mailbox_thread_content_response'
|
|
133
136
|
require 'sendmux_mailbox_generated/models/mailbox_thread_content_response_all_of_data'
|
|
134
137
|
require 'sendmux_mailbox_generated/models/mailbox_thread_detail_response'
|
|
138
|
+
require 'sendmux_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response'
|
|
139
|
+
require 'sendmux_mailbox_generated/models/mailbox_thread_messages_meta'
|
|
135
140
|
require 'sendmux_mailbox_generated/models/mailbox_thread_summary'
|
|
136
141
|
require 'sendmux_mailbox_generated/models/mailbox_thread_summary_cursor_list_response'
|
|
137
142
|
require 'sendmux_mailbox_generated/models/mailbox_thread_summary_states'
|
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:
|
|
4
|
+
version: 2.0.0
|
|
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-19 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: faraday
|
|
@@ -160,6 +160,7 @@ files:
|
|
|
160
160
|
- lib/sendmux_mailbox_generated/models/mailbox_get_changes200_response.rb
|
|
161
161
|
- lib/sendmux_mailbox_generated/models/mailbox_identity.rb
|
|
162
162
|
- lib/sendmux_mailbox_generated/models/mailbox_identity_cursor_list_response.rb
|
|
163
|
+
- lib/sendmux_mailbox_generated/models/mailbox_identity_list_meta.rb
|
|
163
164
|
- lib/sendmux_mailbox_generated/models/mailbox_identity_response.rb
|
|
164
165
|
- lib/sendmux_mailbox_generated/models/mailbox_me.rb
|
|
165
166
|
- lib/sendmux_mailbox_generated/models/mailbox_me_item_response.rb
|
|
@@ -180,6 +181,7 @@ files:
|
|
|
180
181
|
- lib/sendmux_mailbox_generated/models/mailbox_message_query_changes_response.rb
|
|
181
182
|
- lib/sendmux_mailbox_generated/models/mailbox_message_summary.rb
|
|
182
183
|
- lib/sendmux_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb
|
|
184
|
+
- lib/sendmux_mailbox_generated/models/mailbox_query_meta.rb
|
|
183
185
|
- lib/sendmux_mailbox_generated/models/mailbox_quota.rb
|
|
184
186
|
- lib/sendmux_mailbox_generated/models/mailbox_quota_cursor_list_response.rb
|
|
185
187
|
- lib/sendmux_mailbox_generated/models/mailbox_raw_body.rb
|
|
@@ -217,12 +219,15 @@ files:
|
|
|
217
219
|
- lib/sendmux_mailbox_generated/models/mailbox_submission_envelope_address.rb
|
|
218
220
|
- lib/sendmux_mailbox_generated/models/mailbox_submission_envelope_rcpt_to_inner.rb
|
|
219
221
|
- lib/sendmux_mailbox_generated/models/mailbox_submission_response.rb
|
|
222
|
+
- lib/sendmux_mailbox_generated/models/mailbox_sync_meta.rb
|
|
220
223
|
- lib/sendmux_mailbox_generated/models/mailbox_thread.rb
|
|
221
224
|
- lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta.rb
|
|
222
225
|
- lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta_states.rb
|
|
223
226
|
- lib/sendmux_mailbox_generated/models/mailbox_thread_content_response.rb
|
|
224
227
|
- lib/sendmux_mailbox_generated/models/mailbox_thread_content_response_all_of_data.rb
|
|
225
228
|
- lib/sendmux_mailbox_generated/models/mailbox_thread_detail_response.rb
|
|
229
|
+
- lib/sendmux_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response.rb
|
|
230
|
+
- lib/sendmux_mailbox_generated/models/mailbox_thread_messages_meta.rb
|
|
226
231
|
- lib/sendmux_mailbox_generated/models/mailbox_thread_summary.rb
|
|
227
232
|
- lib/sendmux_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb
|
|
228
233
|
- lib/sendmux_mailbox_generated/models/mailbox_thread_summary_states.rb
|