sendmux-management 1.3.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 +43 -0
- data/README.md +37 -1
- data/lib/sendmux/management/version.rb +1 -1
- data/lib/sendmux_management_generated/api/sending_accounts_api.rb +2 -2
- data/lib/sendmux_management_generated/models/delivery_log_detail.rb +54 -15
- data/lib/sendmux_management_generated/models/delivery_log_item.rb +52 -13
- data/lib/sendmux_management_generated/models/mailbox_app_password_result.rb +1 -1
- data/lib/sendmux_management_generated/models/mailbox_create_result.rb +1 -0
- data/lib/sendmux_management_generated/models/mailbox_credential.rb +0 -1
- data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +30 -4
- data/lib/sendmux_management_generated/models/provider_create_body.rb +36 -5
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +1 -1
- data/lib/sendmux_management_generated/models/provider_item.rb +42 -4
- data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +1 -1
- data/lib/sendmux_management_generated/models/provider_list_item.rb +695 -0
- data/lib/sendmux_management_generated/models/provider_update_body.rb +36 -5
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +4 -4
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +2 -2
- data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +31 -38
- data/lib/sendmux_management_generated.rb +9 -2
- metadata +3 -4
- data/lib/sendmux_management_generated/models/mailbox_app_password_result_credential.rb +0 -359
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day_any_of.rb +0 -215
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5cc049f253dbd261eea688459210abc731d039d8ce86b4082244e7e63f725db1
|
|
4
|
+
data.tar.gz: e057790307740ac3a69aed1a07a1a78ad4ce63fab1dd39190f2ddc843575104f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52459c8b5a0af17dee02cb4eb762a46333aa436c51a6099720298d653bcd6fd265b0528337f1d9edf731ebd0b147946b5a202dbeaf49caeec1f18e08be36c140
|
|
7
|
+
data.tar.gz: 4f99bf4b9155d8397cecf88b6bd1a09dd73a4f21ab1d9127ff6f5709fce76929555fc7a00f578e6136bd06871cbef7eaf71684b8b8d9dcc01b718b06388738a3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.1](https://github.com/Sendmux/sendmux-sdk/compare/ruby-management/v2.0.0...ruby-management/v2.0.1) (2026-09-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Fixed
|
|
7
|
+
|
|
8
|
+
* **Regenerated models:** `management_create_mailbox_key` results (`MailboxAppPasswordResultResponse#data`, a `Sendmux::Management::Generated::MailboxAppPasswordResult`) type `credential` as the canonical `MailboxCredential` — the class `management_create_mailbox` already returns in `MailboxCreateResult#credential`, with the same eight attributes (`imap_port`, `key_prefix`, `key_suffix`, `public_id`, `secret`, `server`, `smtp_port`, `username`) — instead of the generator's `MailboxAppPasswordResultCredential` copy. The per-period quotas on `management_create_provider` and `management_update_provider` bodies (`ProviderCreateBodyQuotas#per_second`, `#per_minute`, `#per_hour`, `#per_day`) accept an `Integer` or a `ProviderQuotaRange` (`min`/`max`) instead of the `ProviderCreateBodyQuotasPerDayAnyOf` copy. `WebhookSubscriptionWithSecret` (`management_create_webhook`, `management_rotate_webhook_secret`) is generated from the flat deployed schema: `secret` now sits in alphabetical attribute order (between `name` and `updated_at`, which only changes `to_hash` key order) and the class no longer defines the generator's `openapi_all_of` introspection method; no public class or accessor is added or removed. The wire format is unchanged, and `pending_request`, `MailboxCreateResult#credential` and `ProviderQuotas#per_*` are unchanged ([ab2af52](https://github.com/Sendmux/sendmux-sdk/commit/ab2af52629e73b42862aae2f40c6b60248dccf95), [b002849](https://github.com/Sendmux/sendmux-sdk/commit/b00284908ee07980f25badafaba90f4bd4eb6b25)).
|
|
9
|
+
|
|
10
|
+
### Deprecated
|
|
11
|
+
|
|
12
|
+
* `Sendmux::Management::Generated::MailboxAppPasswordResultCredential` is now a deprecated constant aliasing `MailboxCredential`, and `ProviderCreateBodyQuotasPerDayAnyOf` aliases `ProviderQuotaRange`. Referencing an old constant still works and, with `Warning[:deprecated]` enabled (`ruby -W:deprecated`), warns that it is deprecated; the aliases are removed in the next major, 3.0 ([ab2af52](https://github.com/Sendmux/sendmux-sdk/commit/ab2af52629e73b42862aae2f40c6b60248dccf95)).
|
|
13
|
+
|
|
14
|
+
## Verification behind each claim
|
|
15
|
+
|
|
16
|
+
- Operation → model mapping from `packages/ruby/management/lib/sendmux_management_generated/api/*.rb` at 67ea1c15: `management_create_mailbox_key` → `MailboxAppPasswordResultResponse` (`data: MailboxAppPasswordResult`, `models/mailbox_app_password_result_response.rb:48`); `management_create_mailbox` → `MailboxCreateResultResponse`; `management_create_provider` body `provider_create_body`, `management_update_provider` body `provider_update_body`, both with `quotas: ProviderCreateBodyQuotas` whose four periods are `ProviderCreateBodyQuotasPerDay` (`models/provider_create_body_quotas.rb:49-52`); `management_create_webhook`/`management_rotate_webhook_secret` → `WebhookSubscriptionWithSecretResponse`.
|
|
17
|
+
- ab2af52 diff: `mailbox_app_password_result.rb` `:'MailboxAppPasswordResultCredential'` → `:'MailboxCredential'`; `provider_create_body_quotas_per_day.rb` any-of `ProviderCreateBodyQuotasPerDayAnyOf` → `ProviderQuotaRange`; two copies deleted (574 lines); `sendmux_management_generated.rb` adds the two `deprecate_constant` aliases; a doc comment moves from `mailbox_credential.rb` to `mailbox_create_result.rb`. The 2.0.0 `MailboxAppPasswordResultCredential` had the same eight `attr_accessor`s as `MailboxCredential` (checked at tag ruby-management/v2.0.0).
|
|
18
|
+
- b002849 (the management part of merge 628b161): `webhook_subscription_with_secret.rb` only reorders `secret` and removes `openapi_all_of` (+31/−38).
|
|
19
|
+
- Isolated install of the built gem (`.claude/artifacts/l22/ruby-management/smoke.log`): `credential => MailboxCredential`, `openapi_any_of => [:Integer, :ProviderQuotaRange]`, `build(250) => 250`, `secret` at index 7 of 10 attributes, `openapi_all_of` absent, 2/2 aliases resolve with 2 deprecation warnings.
|
|
20
|
+
- Published `sendmux-management-2.0.0.gem` (sha256 fddae3c5…, the L5 receipt) vs the candidate: 10 member differences, exactly `CHANGELOG.md`, `version.rb`, the five regenerated models, the loader and the two removed copies (`diff-published-2.0.0-vs-candidate-2.0.1.txt`).
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* regenerate SDKs from the deployed flattened response schemas (docs 86b0f45) ([628b161](https://github.com/Sendmux/sendmux-sdk/commit/628b161d2692775ac1f4830c1d64c024ba04ed83))
|
|
25
|
+
* **ruby-management:** regenerate management models from the deployed v1.8.250 schema ([ab2af52](https://github.com/Sendmux/sendmux-sdk/commit/ab2af52629e73b42862aae2f40c6b60248dccf95))
|
|
26
|
+
* **ruby-management:** regenerate the flattened webhook secret response model ([b002849](https://github.com/Sendmux/sendmux-sdk/commit/b00284908ee07980f25badafaba90f4bd4eb6b25))
|
|
27
|
+
|
|
28
|
+
## [2.0.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-management/v1.3.0...ruby-management/v2.0.0) (2026-09-18)
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
* **Breaking:** `management_list_providers` returns `ProviderListItem` instead of `ProviderItem`; list entries don't expose `variables`, while detail `ProviderItem` requires a variables hash. Update list-specific class checks and fetch detail when you need variables. See [Migrate from 1.x to 2.0](README.md#migrate-from-1x-to-20).
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* integrate combined provider variables and delivery routing ([81bbf22](https://github.com/Sendmux/sendmux-sdk/commit/81bbf221a357bf5d588eba654184ff34491473df))
|
|
37
|
+
* **sdk:** add provider variables and delivery group routing ([94f52d4](https://github.com/Sendmux/sendmux-sdk/commit/94f52d4e9f6157e197308541cc5987517bac7a4a))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* correct generated client contracts ([dd31abe](https://github.com/Sendmux/sendmux-sdk/commit/dd31abed8e264e05f4717388a0d4ada83e47d7e3))
|
|
43
|
+
* **sdk:** adopt final provider contract description and provenance ([a9bdaf5](https://github.com/Sendmux/sendmux-sdk/commit/a9bdaf58f0db684328458e269ba8aff515334d0b))
|
|
44
|
+
* **sdk:** adopt final provider contract description and provenance ([815278e](https://github.com/Sendmux/sendmux-sdk/commit/815278e76587dcba314c51202b8e764250e51ef3))
|
|
45
|
+
|
|
3
46
|
## [1.3.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-management/v1.2.0...ruby-management/v1.3.0) (2026-09-10)
|
|
4
47
|
|
|
5
48
|
|
data/README.md
CHANGED
|
@@ -29,9 +29,45 @@ gem install sendmux-management
|
|
|
29
29
|
Or add it to your Gemfile:
|
|
30
30
|
|
|
31
31
|
```ruby
|
|
32
|
-
gem "sendmux-management", "~>
|
|
32
|
+
gem "sendmux-management", "~> 2.0"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
## Migrate from 1.x to 2.0
|
|
36
|
+
|
|
37
|
+
If you check sending-account result classes, update those checks when upgrading
|
|
38
|
+
to 2.0. `management_list_providers` returns `ProviderListItem` entries instead of
|
|
39
|
+
`ProviderItem`. List entries don't expose `variables`; detail results remain
|
|
40
|
+
`ProviderItem` and require a variables hash, which is empty when none are set.
|
|
41
|
+
|
|
42
|
+
1. Update list-specific class checks to use the class loaded by the public entry
|
|
43
|
+
point:
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
require "sendmux/management"
|
|
47
|
+
|
|
48
|
+
def provider_list_item?(item)
|
|
49
|
+
# Before: item.is_a?(Sendmux::Management::Generated::ProviderItem)
|
|
50
|
+
item.is_a?(Sendmux::Management::Generated::ProviderListItem)
|
|
51
|
+
end
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
2. If you need an account's variables, fetch its detail using the public client.
|
|
55
|
+
Pass the account's `id` as the `public_id` argument:
|
|
56
|
+
|
|
57
|
+
```ruby
|
|
58
|
+
def provider_variables(client, public_id)
|
|
59
|
+
detail = client.sending_accounts.management_get_provider(public_id).data
|
|
60
|
+
detail.variables
|
|
61
|
+
end
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Don't convert a list entry into `ProviderItem` or substitute an empty variables
|
|
65
|
+
hash for the account's actual variables. Update hand-built detail fixtures to
|
|
66
|
+
include `variables: {}` when no variables are set.
|
|
67
|
+
|
|
68
|
+
3. Run your application's tests with the updated bundle. Verify that list
|
|
69
|
+
handling accepts `ProviderListItem` and only detail handling reads variables.
|
|
70
|
+
|
|
35
71
|
## OAuth access tokens
|
|
36
72
|
|
|
37
73
|
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.
|
|
@@ -934,7 +934,7 @@ module Sendmux::Management::Generated
|
|
|
934
934
|
end
|
|
935
935
|
|
|
936
936
|
# Update a sending account
|
|
937
|
-
# Updates a custom sending account
|
|
937
|
+
# Updates a custom sending account or replaces variables on the shared Amazon SES account. Shared-account connection settings cannot be edited; use activate/deactivate and the limit-request endpoint for its other allowed actions.
|
|
938
938
|
# @param public_id [String]
|
|
939
939
|
# @param [Hash] opts the optional parameters
|
|
940
940
|
# @option opts [String] :if_match
|
|
@@ -946,7 +946,7 @@ module Sendmux::Management::Generated
|
|
|
946
946
|
end
|
|
947
947
|
|
|
948
948
|
# Update a sending account
|
|
949
|
-
# Updates a custom sending account
|
|
949
|
+
# Updates a custom sending account or replaces variables on the shared Amazon SES account. Shared-account connection settings cannot be edited; use activate/deactivate and the limit-request endpoint for its other allowed actions.
|
|
950
950
|
# @param public_id [String]
|
|
951
951
|
# @param [Hash] opts the optional parameters
|
|
952
952
|
# @option opts [String] :if_match
|
|
@@ -23,6 +23,9 @@ module Sendmux::Management::Generated
|
|
|
23
23
|
# ISO 8601 creation timestamp
|
|
24
24
|
attr_accessor :created_at
|
|
25
25
|
|
|
26
|
+
# Applied per-message delivery group public IDs, or null for absent, ignored or historical hints
|
|
27
|
+
attr_accessor :delivery_group
|
|
28
|
+
|
|
26
29
|
attr_accessor :from_email
|
|
27
30
|
|
|
28
31
|
# Log public ID
|
|
@@ -90,6 +93,7 @@ module Sendmux::Management::Generated
|
|
|
90
93
|
:'accepted_recipient_count' => :'accepted_recipient_count',
|
|
91
94
|
:'attempts' => :'attempts',
|
|
92
95
|
:'created_at' => :'created_at',
|
|
96
|
+
:'delivery_group' => :'delivery_group',
|
|
93
97
|
:'from_email' => :'from_email',
|
|
94
98
|
:'id' => :'id',
|
|
95
99
|
:'message_id' => :'message_id',
|
|
@@ -124,6 +128,7 @@ module Sendmux::Management::Generated
|
|
|
124
128
|
:'accepted_recipient_count' => :'Integer',
|
|
125
129
|
:'attempts' => :'Float',
|
|
126
130
|
:'created_at' => :'String',
|
|
131
|
+
:'delivery_group' => :'Array<String>',
|
|
127
132
|
:'from_email' => :'String',
|
|
128
133
|
:'id' => :'String',
|
|
129
134
|
:'message_id' => :'String',
|
|
@@ -146,6 +151,7 @@ module Sendmux::Management::Generated
|
|
|
146
151
|
def self.openapi_nullable
|
|
147
152
|
Set.new([
|
|
148
153
|
:'accepted_recipient_count',
|
|
154
|
+
:'delivery_group',
|
|
149
155
|
:'from_email',
|
|
150
156
|
:'message_id',
|
|
151
157
|
:'provider_id',
|
|
@@ -196,6 +202,14 @@ module Sendmux::Management::Generated
|
|
|
196
202
|
self.created_at = nil
|
|
197
203
|
end
|
|
198
204
|
|
|
205
|
+
if attributes.key?(:'delivery_group')
|
|
206
|
+
if (value = attributes[:'delivery_group']).is_a?(Array)
|
|
207
|
+
self.delivery_group = value
|
|
208
|
+
end
|
|
209
|
+
else
|
|
210
|
+
self.delivery_group = nil
|
|
211
|
+
end
|
|
212
|
+
|
|
199
213
|
if attributes.key?(:'from_email')
|
|
200
214
|
self.from_email = attributes[:'from_email']
|
|
201
215
|
else
|
|
@@ -294,11 +308,11 @@ module Sendmux::Management::Generated
|
|
|
294
308
|
def list_invalid_properties
|
|
295
309
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
296
310
|
invalid_properties = Array.new
|
|
297
|
-
if @accepted_recipient_count > 50
|
|
311
|
+
if !@accepted_recipient_count.nil? && @accepted_recipient_count > 50
|
|
298
312
|
invalid_properties.push('invalid value for "accepted_recipient_count", must be smaller than or equal to 50.')
|
|
299
313
|
end
|
|
300
314
|
|
|
301
|
-
if @accepted_recipient_count < 0
|
|
315
|
+
if !@accepted_recipient_count.nil? && @accepted_recipient_count < 0
|
|
302
316
|
invalid_properties.push('invalid value for "accepted_recipient_count", must be greater than or equal to 0.')
|
|
303
317
|
end
|
|
304
318
|
|
|
@@ -310,27 +324,35 @@ module Sendmux::Management::Generated
|
|
|
310
324
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
311
325
|
end
|
|
312
326
|
|
|
327
|
+
if !@delivery_group.nil? && @delivery_group.length > 50
|
|
328
|
+
invalid_properties.push('invalid value for "delivery_group", number of items must be less than or equal to 50.')
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
if !@delivery_group.nil? && @delivery_group.length < 1
|
|
332
|
+
invalid_properties.push('invalid value for "delivery_group", number of items must be greater than or equal to 1.')
|
|
333
|
+
end
|
|
334
|
+
|
|
313
335
|
if @id.nil?
|
|
314
336
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
315
337
|
end
|
|
316
338
|
|
|
317
|
-
if @recipient_count > 50
|
|
339
|
+
if !@recipient_count.nil? && @recipient_count > 50
|
|
318
340
|
invalid_properties.push('invalid value for "recipient_count", must be smaller than or equal to 50.')
|
|
319
341
|
end
|
|
320
342
|
|
|
321
|
-
if @recipient_count < 0
|
|
343
|
+
if !@recipient_count.nil? && @recipient_count < 0
|
|
322
344
|
invalid_properties.push('invalid value for "recipient_count", must be greater than or equal to 0.')
|
|
323
345
|
end
|
|
324
346
|
|
|
325
|
-
if @recipients.length > 50
|
|
347
|
+
if !@recipients.nil? && @recipients.length > 50
|
|
326
348
|
invalid_properties.push('invalid value for "recipients", number of items must be less than or equal to 50.')
|
|
327
349
|
end
|
|
328
350
|
|
|
329
|
-
if @rejected_recipient_count > 50
|
|
351
|
+
if !@rejected_recipient_count.nil? && @rejected_recipient_count > 50
|
|
330
352
|
invalid_properties.push('invalid value for "rejected_recipient_count", must be smaller than or equal to 50.')
|
|
331
353
|
end
|
|
332
354
|
|
|
333
|
-
if @rejected_recipient_count < 0
|
|
355
|
+
if !@rejected_recipient_count.nil? && @rejected_recipient_count < 0
|
|
334
356
|
invalid_properties.push('invalid value for "rejected_recipient_count", must be greater than or equal to 0.')
|
|
335
357
|
end
|
|
336
358
|
|
|
@@ -345,16 +367,18 @@ module Sendmux::Management::Generated
|
|
|
345
367
|
# @return true if the model is valid
|
|
346
368
|
def valid?
|
|
347
369
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
348
|
-
return false if @accepted_recipient_count > 50
|
|
349
|
-
return false if @accepted_recipient_count < 0
|
|
370
|
+
return false if !@accepted_recipient_count.nil? && @accepted_recipient_count > 50
|
|
371
|
+
return false if !@accepted_recipient_count.nil? && @accepted_recipient_count < 0
|
|
350
372
|
return false if @attempts.nil?
|
|
351
373
|
return false if @created_at.nil?
|
|
374
|
+
return false if !@delivery_group.nil? && @delivery_group.length > 50
|
|
375
|
+
return false if !@delivery_group.nil? && @delivery_group.length < 1
|
|
352
376
|
return false if @id.nil?
|
|
353
|
-
return false if @recipient_count > 50
|
|
354
|
-
return false if @recipient_count < 0
|
|
355
|
-
return false if @recipients.length > 50
|
|
356
|
-
return false if @rejected_recipient_count > 50
|
|
357
|
-
return false if @rejected_recipient_count < 0
|
|
377
|
+
return false if !@recipient_count.nil? && @recipient_count > 50
|
|
378
|
+
return false if !@recipient_count.nil? && @recipient_count < 0
|
|
379
|
+
return false if !@recipients.nil? && @recipients.length > 50
|
|
380
|
+
return false if !@rejected_recipient_count.nil? && @rejected_recipient_count > 50
|
|
381
|
+
return false if !@rejected_recipient_count.nil? && @rejected_recipient_count < 0
|
|
358
382
|
return false if @status.nil?
|
|
359
383
|
status_validator = EnumAttributeValidator.new('String', ["pending", "sent", "failed", "rejected", "unknown_default_open_api"])
|
|
360
384
|
return false unless status_validator.valid?(@status)
|
|
@@ -395,6 +419,20 @@ module Sendmux::Management::Generated
|
|
|
395
419
|
@created_at = created_at
|
|
396
420
|
end
|
|
397
421
|
|
|
422
|
+
# Custom attribute writer method with validation
|
|
423
|
+
# @param [Object] delivery_group Value to be assigned
|
|
424
|
+
def delivery_group=(delivery_group)
|
|
425
|
+
if !delivery_group.nil? && delivery_group.length > 50
|
|
426
|
+
fail ArgumentError, 'invalid value for "delivery_group", number of items must be less than or equal to 50.'
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
if !delivery_group.nil? && delivery_group.length < 1
|
|
430
|
+
fail ArgumentError, 'invalid value for "delivery_group", number of items must be greater than or equal to 1.'
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
@delivery_group = delivery_group
|
|
434
|
+
end
|
|
435
|
+
|
|
398
436
|
# Custom attribute writer method with validation
|
|
399
437
|
# @param [Object] id Value to be assigned
|
|
400
438
|
def id=(id)
|
|
@@ -461,6 +499,7 @@ module Sendmux::Management::Generated
|
|
|
461
499
|
accepted_recipient_count == o.accepted_recipient_count &&
|
|
462
500
|
attempts == o.attempts &&
|
|
463
501
|
created_at == o.created_at &&
|
|
502
|
+
delivery_group == o.delivery_group &&
|
|
464
503
|
from_email == o.from_email &&
|
|
465
504
|
id == o.id &&
|
|
466
505
|
message_id == o.message_id &&
|
|
@@ -487,7 +526,7 @@ module Sendmux::Management::Generated
|
|
|
487
526
|
# Calculates hash code according to all attributes.
|
|
488
527
|
# @return [Integer] Hash code
|
|
489
528
|
def hash
|
|
490
|
-
[accepted_recipient_count, attempts, created_at, from_email, id, message_id, provider_id, provider_name, recipient_count, recipients, rejected_recipient_count, sent_at, sent_from_email, size_bytes, status, status_reason, subject, to_email].hash
|
|
529
|
+
[accepted_recipient_count, attempts, created_at, delivery_group, from_email, id, message_id, provider_id, provider_name, recipient_count, recipients, rejected_recipient_count, sent_at, sent_from_email, size_bytes, status, status_reason, subject, to_email].hash
|
|
491
530
|
end
|
|
492
531
|
|
|
493
532
|
# Builds the object from hash
|
|
@@ -23,6 +23,9 @@ module Sendmux::Management::Generated
|
|
|
23
23
|
# ISO 8601 creation timestamp
|
|
24
24
|
attr_accessor :created_at
|
|
25
25
|
|
|
26
|
+
# Applied per-message delivery group public IDs, or null for absent, ignored or historical hints
|
|
27
|
+
attr_accessor :delivery_group
|
|
28
|
+
|
|
26
29
|
attr_accessor :from_email
|
|
27
30
|
|
|
28
31
|
# Log public ID
|
|
@@ -87,6 +90,7 @@ module Sendmux::Management::Generated
|
|
|
87
90
|
:'accepted_recipient_count' => :'accepted_recipient_count',
|
|
88
91
|
:'attempts' => :'attempts',
|
|
89
92
|
:'created_at' => :'created_at',
|
|
93
|
+
:'delivery_group' => :'delivery_group',
|
|
90
94
|
:'from_email' => :'from_email',
|
|
91
95
|
:'id' => :'id',
|
|
92
96
|
:'message_id' => :'message_id',
|
|
@@ -120,6 +124,7 @@ module Sendmux::Management::Generated
|
|
|
120
124
|
:'accepted_recipient_count' => :'Integer',
|
|
121
125
|
:'attempts' => :'Float',
|
|
122
126
|
:'created_at' => :'String',
|
|
127
|
+
:'delivery_group' => :'Array<String>',
|
|
123
128
|
:'from_email' => :'String',
|
|
124
129
|
:'id' => :'String',
|
|
125
130
|
:'message_id' => :'String',
|
|
@@ -141,6 +146,7 @@ module Sendmux::Management::Generated
|
|
|
141
146
|
def self.openapi_nullable
|
|
142
147
|
Set.new([
|
|
143
148
|
:'accepted_recipient_count',
|
|
149
|
+
:'delivery_group',
|
|
144
150
|
:'from_email',
|
|
145
151
|
:'message_id',
|
|
146
152
|
:'provider_id',
|
|
@@ -190,6 +196,14 @@ module Sendmux::Management::Generated
|
|
|
190
196
|
self.created_at = nil
|
|
191
197
|
end
|
|
192
198
|
|
|
199
|
+
if attributes.key?(:'delivery_group')
|
|
200
|
+
if (value = attributes[:'delivery_group']).is_a?(Array)
|
|
201
|
+
self.delivery_group = value
|
|
202
|
+
end
|
|
203
|
+
else
|
|
204
|
+
self.delivery_group = nil
|
|
205
|
+
end
|
|
206
|
+
|
|
193
207
|
if attributes.key?(:'from_email')
|
|
194
208
|
self.from_email = attributes[:'from_email']
|
|
195
209
|
else
|
|
@@ -280,11 +294,11 @@ module Sendmux::Management::Generated
|
|
|
280
294
|
def list_invalid_properties
|
|
281
295
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
282
296
|
invalid_properties = Array.new
|
|
283
|
-
if @accepted_recipient_count > 50
|
|
297
|
+
if !@accepted_recipient_count.nil? && @accepted_recipient_count > 50
|
|
284
298
|
invalid_properties.push('invalid value for "accepted_recipient_count", must be smaller than or equal to 50.')
|
|
285
299
|
end
|
|
286
300
|
|
|
287
|
-
if @accepted_recipient_count < 0
|
|
301
|
+
if !@accepted_recipient_count.nil? && @accepted_recipient_count < 0
|
|
288
302
|
invalid_properties.push('invalid value for "accepted_recipient_count", must be greater than or equal to 0.')
|
|
289
303
|
end
|
|
290
304
|
|
|
@@ -296,23 +310,31 @@ module Sendmux::Management::Generated
|
|
|
296
310
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
297
311
|
end
|
|
298
312
|
|
|
313
|
+
if !@delivery_group.nil? && @delivery_group.length > 50
|
|
314
|
+
invalid_properties.push('invalid value for "delivery_group", number of items must be less than or equal to 50.')
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
if !@delivery_group.nil? && @delivery_group.length < 1
|
|
318
|
+
invalid_properties.push('invalid value for "delivery_group", number of items must be greater than or equal to 1.')
|
|
319
|
+
end
|
|
320
|
+
|
|
299
321
|
if @id.nil?
|
|
300
322
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
301
323
|
end
|
|
302
324
|
|
|
303
|
-
if @recipient_count > 50
|
|
325
|
+
if !@recipient_count.nil? && @recipient_count > 50
|
|
304
326
|
invalid_properties.push('invalid value for "recipient_count", must be smaller than or equal to 50.')
|
|
305
327
|
end
|
|
306
328
|
|
|
307
|
-
if @recipient_count < 0
|
|
329
|
+
if !@recipient_count.nil? && @recipient_count < 0
|
|
308
330
|
invalid_properties.push('invalid value for "recipient_count", must be greater than or equal to 0.')
|
|
309
331
|
end
|
|
310
332
|
|
|
311
|
-
if @rejected_recipient_count > 50
|
|
333
|
+
if !@rejected_recipient_count.nil? && @rejected_recipient_count > 50
|
|
312
334
|
invalid_properties.push('invalid value for "rejected_recipient_count", must be smaller than or equal to 50.')
|
|
313
335
|
end
|
|
314
336
|
|
|
315
|
-
if @rejected_recipient_count < 0
|
|
337
|
+
if !@rejected_recipient_count.nil? && @rejected_recipient_count < 0
|
|
316
338
|
invalid_properties.push('invalid value for "rejected_recipient_count", must be greater than or equal to 0.')
|
|
317
339
|
end
|
|
318
340
|
|
|
@@ -327,15 +349,17 @@ module Sendmux::Management::Generated
|
|
|
327
349
|
# @return true if the model is valid
|
|
328
350
|
def valid?
|
|
329
351
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
330
|
-
return false if @accepted_recipient_count > 50
|
|
331
|
-
return false if @accepted_recipient_count < 0
|
|
352
|
+
return false if !@accepted_recipient_count.nil? && @accepted_recipient_count > 50
|
|
353
|
+
return false if !@accepted_recipient_count.nil? && @accepted_recipient_count < 0
|
|
332
354
|
return false if @attempts.nil?
|
|
333
355
|
return false if @created_at.nil?
|
|
356
|
+
return false if !@delivery_group.nil? && @delivery_group.length > 50
|
|
357
|
+
return false if !@delivery_group.nil? && @delivery_group.length < 1
|
|
334
358
|
return false if @id.nil?
|
|
335
|
-
return false if @recipient_count > 50
|
|
336
|
-
return false if @recipient_count < 0
|
|
337
|
-
return false if @rejected_recipient_count > 50
|
|
338
|
-
return false if @rejected_recipient_count < 0
|
|
359
|
+
return false if !@recipient_count.nil? && @recipient_count > 50
|
|
360
|
+
return false if !@recipient_count.nil? && @recipient_count < 0
|
|
361
|
+
return false if !@rejected_recipient_count.nil? && @rejected_recipient_count > 50
|
|
362
|
+
return false if !@rejected_recipient_count.nil? && @rejected_recipient_count < 0
|
|
339
363
|
return false if @status.nil?
|
|
340
364
|
status_validator = EnumAttributeValidator.new('String', ["pending", "sent", "failed", "rejected", "unknown_default_open_api"])
|
|
341
365
|
return false unless status_validator.valid?(@status)
|
|
@@ -376,6 +400,20 @@ module Sendmux::Management::Generated
|
|
|
376
400
|
@created_at = created_at
|
|
377
401
|
end
|
|
378
402
|
|
|
403
|
+
# Custom attribute writer method with validation
|
|
404
|
+
# @param [Object] delivery_group Value to be assigned
|
|
405
|
+
def delivery_group=(delivery_group)
|
|
406
|
+
if !delivery_group.nil? && delivery_group.length > 50
|
|
407
|
+
fail ArgumentError, 'invalid value for "delivery_group", number of items must be less than or equal to 50.'
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
if !delivery_group.nil? && delivery_group.length < 1
|
|
411
|
+
fail ArgumentError, 'invalid value for "delivery_group", number of items must be greater than or equal to 1.'
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
@delivery_group = delivery_group
|
|
415
|
+
end
|
|
416
|
+
|
|
379
417
|
# Custom attribute writer method with validation
|
|
380
418
|
# @param [Object] id Value to be assigned
|
|
381
419
|
def id=(id)
|
|
@@ -432,6 +470,7 @@ module Sendmux::Management::Generated
|
|
|
432
470
|
accepted_recipient_count == o.accepted_recipient_count &&
|
|
433
471
|
attempts == o.attempts &&
|
|
434
472
|
created_at == o.created_at &&
|
|
473
|
+
delivery_group == o.delivery_group &&
|
|
435
474
|
from_email == o.from_email &&
|
|
436
475
|
id == o.id &&
|
|
437
476
|
message_id == o.message_id &&
|
|
@@ -457,7 +496,7 @@ module Sendmux::Management::Generated
|
|
|
457
496
|
# Calculates hash code according to all attributes.
|
|
458
497
|
# @return [Integer] Hash code
|
|
459
498
|
def hash
|
|
460
|
-
[accepted_recipient_count, attempts, created_at, from_email, id, message_id, provider_id, provider_name, recipient_count, rejected_recipient_count, sent_at, sent_from_email, size_bytes, status, status_reason, subject, to_email].hash
|
|
499
|
+
[accepted_recipient_count, attempts, created_at, delivery_group, from_email, id, message_id, provider_id, provider_name, recipient_count, rejected_recipient_count, sent_at, sent_from_email, size_bytes, status, status_reason, subject, to_email].hash
|
|
461
500
|
end
|
|
462
501
|
|
|
463
502
|
# Builds the object from hash
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Sendmux::Management::Generated
|
|
17
17
|
class MailboxCreateResult < ApiModelBase
|
|
18
|
+
# Initial credential for the mailbox. `null` if credential generation failed — call POST /mailboxes/{id}/keys to retry.
|
|
18
19
|
attr_accessor :credential
|
|
19
20
|
|
|
20
21
|
attr_accessor :mailbox
|
|
@@ -14,7 +14,6 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Sendmux::Management::Generated
|
|
17
|
-
# Initial credential for the mailbox. `null` if credential generation failed — call POST /mailboxes/{id}/keys to retry.
|
|
18
17
|
class MailboxCredential < ApiModelBase
|
|
19
18
|
# IMAP retrieval port
|
|
20
19
|
attr_accessor :imap_port
|
|
@@ -25,6 +25,8 @@ module Sendmux::Management::Generated
|
|
|
25
25
|
|
|
26
26
|
attr_accessor :update
|
|
27
27
|
|
|
28
|
+
attr_accessor :update_variables
|
|
29
|
+
|
|
28
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
31
|
def self.attribute_map
|
|
30
32
|
{
|
|
@@ -32,7 +34,8 @@ module Sendmux::Management::Generated
|
|
|
32
34
|
:'deactivate' => :'deactivate',
|
|
33
35
|
:'delete' => :'delete',
|
|
34
36
|
:'test' => :'test',
|
|
35
|
-
:'update' => :'update'
|
|
37
|
+
:'update' => :'update',
|
|
38
|
+
:'update_variables' => :'update_variables'
|
|
36
39
|
}
|
|
37
40
|
end
|
|
38
41
|
|
|
@@ -53,7 +56,8 @@ module Sendmux::Management::Generated
|
|
|
53
56
|
:'deactivate' => :'Boolean',
|
|
54
57
|
:'delete' => :'Boolean',
|
|
55
58
|
:'test' => :'Boolean',
|
|
56
|
-
:'update' => :'Boolean'
|
|
59
|
+
:'update' => :'Boolean',
|
|
60
|
+
:'update_variables' => :'Boolean'
|
|
57
61
|
}
|
|
58
62
|
end
|
|
59
63
|
|
|
@@ -108,6 +112,12 @@ module Sendmux::Management::Generated
|
|
|
108
112
|
else
|
|
109
113
|
self.update = nil
|
|
110
114
|
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'update_variables')
|
|
117
|
+
self.update_variables = attributes[:'update_variables']
|
|
118
|
+
else
|
|
119
|
+
self.update_variables = nil
|
|
120
|
+
end
|
|
111
121
|
end
|
|
112
122
|
|
|
113
123
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -135,6 +145,10 @@ module Sendmux::Management::Generated
|
|
|
135
145
|
invalid_properties.push('invalid value for "update", update cannot be nil.')
|
|
136
146
|
end
|
|
137
147
|
|
|
148
|
+
if @update_variables.nil?
|
|
149
|
+
invalid_properties.push('invalid value for "update_variables", update_variables cannot be nil.')
|
|
150
|
+
end
|
|
151
|
+
|
|
138
152
|
invalid_properties
|
|
139
153
|
end
|
|
140
154
|
|
|
@@ -147,6 +161,7 @@ module Sendmux::Management::Generated
|
|
|
147
161
|
return false if @delete.nil?
|
|
148
162
|
return false if @test.nil?
|
|
149
163
|
return false if @update.nil?
|
|
164
|
+
return false if @update_variables.nil?
|
|
150
165
|
true
|
|
151
166
|
end
|
|
152
167
|
|
|
@@ -200,6 +215,16 @@ module Sendmux::Management::Generated
|
|
|
200
215
|
@update = update
|
|
201
216
|
end
|
|
202
217
|
|
|
218
|
+
# Custom attribute writer method with validation
|
|
219
|
+
# @param [Object] update_variables Value to be assigned
|
|
220
|
+
def update_variables=(update_variables)
|
|
221
|
+
if update_variables.nil?
|
|
222
|
+
fail ArgumentError, 'update_variables cannot be nil'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
@update_variables = update_variables
|
|
226
|
+
end
|
|
227
|
+
|
|
203
228
|
# Checks equality by comparing each attribute.
|
|
204
229
|
# @param [Object] Object to be compared
|
|
205
230
|
def ==(o)
|
|
@@ -209,7 +234,8 @@ module Sendmux::Management::Generated
|
|
|
209
234
|
deactivate == o.deactivate &&
|
|
210
235
|
delete == o.delete &&
|
|
211
236
|
test == o.test &&
|
|
212
|
-
update == o.update
|
|
237
|
+
update == o.update &&
|
|
238
|
+
update_variables == o.update_variables
|
|
213
239
|
end
|
|
214
240
|
|
|
215
241
|
# @see the `==` method
|
|
@@ -221,7 +247,7 @@ module Sendmux::Management::Generated
|
|
|
221
247
|
# Calculates hash code according to all attributes.
|
|
222
248
|
# @return [Integer] Hash code
|
|
223
249
|
def hash
|
|
224
|
-
[activate, deactivate, delete, test, update].hash
|
|
250
|
+
[activate, deactivate, delete, test, update, update_variables].hash
|
|
225
251
|
end
|
|
226
252
|
|
|
227
253
|
# Builds the object from hash
|