sendmux-management 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0600937a35f111f28e5946bcb9cc259e6a31434469268255a06d6e4e6dbd5bf3'
4
- data.tar.gz: 3794fcda20d126674445268831e3d76b84900c6e3d5e52e15a2c4d6c75310707
3
+ metadata.gz: 5cc049f253dbd261eea688459210abc731d039d8ce86b4082244e7e63f725db1
4
+ data.tar.gz: e057790307740ac3a69aed1a07a1a78ad4ce63fab1dd39190f2ddc843575104f
5
5
  SHA512:
6
- metadata.gz: c2226f76e5b50a31230263a050fd5c36657035ffd898979d49e9d423c6f3afdd8e69e326f0b675170bb49df40af8917bd2e7d1a235f6f172f7be4ee5a4af2fd3
7
- data.tar.gz: 035c31ba87eac6ed31c0d3cb686e6c9ca50353ebfa3ccc929e51ad2da2db18f365737edf83a7d2b3faf0b79edff167e15c13c4758c3ddce23f958eb61e44dace
6
+ metadata.gz: 52459c8b5a0af17dee02cb4eb762a46333aa436c51a6099720298d653bcd6fd265b0528337f1d9edf731ebd0b147946b5a202dbeaf49caeec1f18e08be36c140
7
+ data.tar.gz: 4f99bf4b9155d8397cecf88b6bd1a09dd73a4f21ab1d9127ff6f5709fce76929555fc7a00f578e6136bd06871cbef7eaf71684b8b8d9dcc01b718b06388738a3
data/CHANGELOG.md CHANGED
@@ -1,10 +1,29 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
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
4
 
5
- ### Features
6
5
 
7
- * Add provider variable management fields and delivery-group fields to delivery logs.
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))
8
27
 
9
28
  ## [2.0.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-management/v1.3.0...ruby-management/v2.0.0) (2026-09-18)
10
29
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sendmux
4
4
  module Management
5
- VERSION = '2.0.0'
5
+ VERSION = '2.0.1'
6
6
  end
7
7
  end
@@ -37,7 +37,7 @@ module Sendmux::Management::Generated
37
37
  # Attribute type mapping.
38
38
  def self.openapi_types
39
39
  {
40
- :'credential' => :'MailboxAppPasswordResultCredential'
40
+ :'credential' => :'MailboxCredential'
41
41
  }
42
42
  end
43
43
 
@@ -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
@@ -21,7 +21,7 @@ module Sendmux::Management::Generated
21
21
  def openapi_any_of
22
22
  [
23
23
  :'Integer',
24
- :'ProviderCreateBodyQuotasPerDayAnyOf'
24
+ :'ProviderQuotaRange'
25
25
  ]
26
26
  end
27
27
 
@@ -35,15 +35,15 @@ module Sendmux::Management::Generated
35
35
  # Optional human-friendly label used in dashboard list/detail pages. May be `null` for subscriptions created without a name.
36
36
  attr_accessor :name
37
37
 
38
+ # Signing secret used to verify the HMAC-SHA256 signature on every event POST. This is the ONLY response containing the raw secret — store it securely; it cannot be retrieved later. Use POST /webhooks/{id}/rotate-secret to issue a new one.
39
+ attr_accessor :secret
40
+
38
41
  # ISO 8601 last-modified timestamp
39
42
  attr_accessor :updated_at
40
43
 
41
44
  # HTTPS endpoint that receives signed event POSTs.
42
45
  attr_accessor :url
43
46
 
44
- # Signing secret used to verify the HMAC-SHA256 signature on every event POST. This is the ONLY response containing the raw secret — store it securely; it cannot be retrieved later. Use POST /webhooks/{id}/rotate-secret to issue a new one.
45
- attr_accessor :secret
46
-
47
47
  class EnumAttributeValidator
48
48
  attr_reader :datatype
49
49
  attr_reader :allowable_values
@@ -76,9 +76,9 @@ module Sendmux::Management::Generated
76
76
  :'filters' => :'filters',
77
77
  :'id' => :'id',
78
78
  :'name' => :'name',
79
+ :'secret' => :'secret',
79
80
  :'updated_at' => :'updated_at',
80
- :'url' => :'url',
81
- :'secret' => :'secret'
81
+ :'url' => :'url'
82
82
  }
83
83
  end
84
84
 
@@ -102,9 +102,9 @@ module Sendmux::Management::Generated
102
102
  :'filters' => :'WebhookFilters',
103
103
  :'id' => :'String',
104
104
  :'name' => :'String',
105
+ :'secret' => :'String',
105
106
  :'updated_at' => :'String',
106
- :'url' => :'String',
107
- :'secret' => :'String'
107
+ :'url' => :'String'
108
108
  }
109
109
  end
110
110
 
@@ -115,13 +115,6 @@ module Sendmux::Management::Generated
115
115
  ])
116
116
  end
117
117
 
118
- # List of class defined in allOf (OpenAPI v3)
119
- def self.openapi_all_of
120
- [
121
- :'WebhookSubscription'
122
- ]
123
- end
124
-
125
118
  # Initializes the object
126
119
  # @param [Hash] attributes Model attributes in the form of hash
127
120
  def initialize(attributes = {})
@@ -182,6 +175,12 @@ module Sendmux::Management::Generated
182
175
  self.name = nil
183
176
  end
184
177
 
178
+ if attributes.key?(:'secret')
179
+ self.secret = attributes[:'secret']
180
+ else
181
+ self.secret = nil
182
+ end
183
+
185
184
  if attributes.key?(:'updated_at')
186
185
  self.updated_at = attributes[:'updated_at']
187
186
  else
@@ -193,12 +192,6 @@ module Sendmux::Management::Generated
193
192
  else
194
193
  self.url = nil
195
194
  end
196
-
197
- if attributes.key?(:'secret')
198
- self.secret = attributes[:'secret']
199
- else
200
- self.secret = nil
201
- end
202
195
  end
203
196
 
204
197
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -230,6 +223,10 @@ module Sendmux::Management::Generated
230
223
  invalid_properties.push('invalid value for "id", id cannot be nil.')
231
224
  end
232
225
 
226
+ if @secret.nil?
227
+ invalid_properties.push('invalid value for "secret", secret cannot be nil.')
228
+ end
229
+
233
230
  if @updated_at.nil?
234
231
  invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
235
232
  end
@@ -238,10 +235,6 @@ module Sendmux::Management::Generated
238
235
  invalid_properties.push('invalid value for "url", url cannot be nil.')
239
236
  end
240
237
 
241
- if @secret.nil?
242
- invalid_properties.push('invalid value for "secret", secret cannot be nil.')
243
- end
244
-
245
238
  invalid_properties
246
239
  end
247
240
 
@@ -255,9 +248,9 @@ module Sendmux::Management::Generated
255
248
  return false if @failing.nil?
256
249
  return false if @filters.nil?
257
250
  return false if @id.nil?
251
+ return false if @secret.nil?
258
252
  return false if @updated_at.nil?
259
253
  return false if @url.nil?
260
- return false if @secret.nil?
261
254
  true
262
255
  end
263
256
 
@@ -311,6 +304,16 @@ module Sendmux::Management::Generated
311
304
  @id = id
312
305
  end
313
306
 
307
+ # Custom attribute writer method with validation
308
+ # @param [Object] secret Value to be assigned
309
+ def secret=(secret)
310
+ if secret.nil?
311
+ fail ArgumentError, 'secret cannot be nil'
312
+ end
313
+
314
+ @secret = secret
315
+ end
316
+
314
317
  # Custom attribute writer method with validation
315
318
  # @param [Object] updated_at Value to be assigned
316
319
  def updated_at=(updated_at)
@@ -331,16 +334,6 @@ module Sendmux::Management::Generated
331
334
  @url = url
332
335
  end
333
336
 
334
- # Custom attribute writer method with validation
335
- # @param [Object] secret Value to be assigned
336
- def secret=(secret)
337
- if secret.nil?
338
- fail ArgumentError, 'secret cannot be nil'
339
- end
340
-
341
- @secret = secret
342
- end
343
-
344
337
  # Checks equality by comparing each attribute.
345
338
  # @param [Object] Object to be compared
346
339
  def ==(o)
@@ -353,9 +346,9 @@ module Sendmux::Management::Generated
353
346
  filters == o.filters &&
354
347
  id == o.id &&
355
348
  name == o.name &&
349
+ secret == o.secret &&
356
350
  updated_at == o.updated_at &&
357
- url == o.url &&
358
- secret == o.secret
351
+ url == o.url
359
352
  end
360
353
 
361
354
  # @see the `==` method
@@ -367,7 +360,7 @@ module Sendmux::Management::Generated
367
360
  # Calculates hash code according to all attributes.
368
361
  # @return [Integer] Hash code
369
362
  def hash
370
- [created_at, enabled, event_types, failing, filters, id, name, updated_at, url, secret].hash
363
+ [created_at, enabled, event_types, failing, filters, id, name, secret, updated_at, url].hash
371
364
  end
372
365
 
373
366
  # Builds the object from hash
@@ -55,7 +55,6 @@ require 'sendmux_management_generated/models/incoming_log_item_cursor_list_respo
55
55
  require 'sendmux_management_generated/models/incoming_log_item_response'
56
56
  require 'sendmux_management_generated/models/mailbox'
57
57
  require 'sendmux_management_generated/models/mailbox_app_password_result'
58
- require 'sendmux_management_generated/models/mailbox_app_password_result_credential'
59
58
  require 'sendmux_management_generated/models/mailbox_app_password_result_response'
60
59
  require 'sendmux_management_generated/models/mailbox_availability_reason'
61
60
  require 'sendmux_management_generated/models/mailbox_availability_response'
@@ -86,7 +85,6 @@ require 'sendmux_management_generated/models/provider_allowed_actions'
86
85
  require 'sendmux_management_generated/models/provider_create_body'
87
86
  require 'sendmux_management_generated/models/provider_create_body_quotas'
88
87
  require 'sendmux_management_generated/models/provider_create_body_quotas_per_day'
89
- require 'sendmux_management_generated/models/provider_create_body_quotas_per_day_any_of'
90
88
  require 'sendmux_management_generated/models/provider_deleted'
91
89
  require 'sendmux_management_generated/models/provider_deleted_response'
92
90
  require 'sendmux_management_generated/models/provider_item'
@@ -173,3 +171,11 @@ module Sendmux::Management::Generated
173
171
  end
174
172
  end
175
173
  end
174
+
175
+ module Sendmux::Management::Generated
176
+ # Deprecated model constants kept as aliases of their replacements until the next major release.
177
+ MailboxAppPasswordResultCredential = MailboxCredential
178
+ deprecate_constant :MailboxAppPasswordResultCredential
179
+ ProviderCreateBodyQuotasPerDayAnyOf = ProviderQuotaRange
180
+ deprecate_constant :ProviderCreateBodyQuotasPerDayAnyOf
181
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendmux-management
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sendmux
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-09-19 00:00:00.000000000 Z
10
+ date: 2026-09-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: faraday
@@ -155,7 +155,6 @@ files:
155
155
  - lib/sendmux_management_generated/models/incoming_log_item_response.rb
156
156
  - lib/sendmux_management_generated/models/mailbox.rb
157
157
  - lib/sendmux_management_generated/models/mailbox_app_password_result.rb
158
- - lib/sendmux_management_generated/models/mailbox_app_password_result_credential.rb
159
158
  - lib/sendmux_management_generated/models/mailbox_app_password_result_response.rb
160
159
  - lib/sendmux_management_generated/models/mailbox_availability_reason.rb
161
160
  - lib/sendmux_management_generated/models/mailbox_availability_response.rb
@@ -186,7 +185,6 @@ files:
186
185
  - lib/sendmux_management_generated/models/provider_create_body.rb
187
186
  - lib/sendmux_management_generated/models/provider_create_body_quotas.rb
188
187
  - lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb
189
- - lib/sendmux_management_generated/models/provider_create_body_quotas_per_day_any_of.rb
190
188
  - lib/sendmux_management_generated/models/provider_deleted.rb
191
189
  - lib/sendmux_management_generated/models/provider_deleted_response.rb
192
190
  - lib/sendmux_management_generated/models/provider_item.rb
@@ -1,359 +0,0 @@
1
- =begin
2
- #Sendmux API
3
-
4
- #Programmatic access to your Sendmux email infrastructure.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.22.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Sendmux::Management::Generated
17
- class MailboxAppPasswordResultCredential < ApiModelBase
18
- # IMAP retrieval port
19
- attr_accessor :imap_port
20
-
21
- attr_accessor :key_prefix
22
-
23
- attr_accessor :key_suffix
24
-
25
- # Credential public ID
26
- attr_accessor :public_id
27
-
28
- # Mailbox credential — shown exactly once. Use as a Bearer token on the HTTP API and as the password for IMAP retrieval and SMTP submission.
29
- attr_accessor :secret
30
-
31
- # Mailbox server name
32
- attr_accessor :server
33
-
34
- # SMTP submission port
35
- attr_accessor :smtp_port
36
-
37
- # Mailbox email address used as the login
38
- attr_accessor :username
39
-
40
- # Attribute mapping from ruby-style variable name to JSON key.
41
- def self.attribute_map
42
- {
43
- :'imap_port' => :'imap_port',
44
- :'key_prefix' => :'key_prefix',
45
- :'key_suffix' => :'key_suffix',
46
- :'public_id' => :'public_id',
47
- :'secret' => :'secret',
48
- :'server' => :'server',
49
- :'smtp_port' => :'smtp_port',
50
- :'username' => :'username'
51
- }
52
- end
53
-
54
- # Returns attribute mapping this model knows about
55
- def self.acceptable_attribute_map
56
- attribute_map
57
- end
58
-
59
- # Returns all the JSON keys this model knows about
60
- def self.acceptable_attributes
61
- acceptable_attribute_map.values
62
- end
63
-
64
- # Attribute type mapping.
65
- def self.openapi_types
66
- {
67
- :'imap_port' => :'Integer',
68
- :'key_prefix' => :'String',
69
- :'key_suffix' => :'String',
70
- :'public_id' => :'String',
71
- :'secret' => :'String',
72
- :'server' => :'String',
73
- :'smtp_port' => :'Integer',
74
- :'username' => :'String'
75
- }
76
- end
77
-
78
- # List of attributes with nullable: true
79
- def self.openapi_nullable
80
- Set.new([
81
- ])
82
- end
83
-
84
- # List of class defined in allOf (OpenAPI v3)
85
- def self.openapi_all_of
86
- [
87
- :'MailboxCredential'
88
- ]
89
- end
90
-
91
- # Initializes the object
92
- # @param [Hash] attributes Model attributes in the form of hash
93
- def initialize(attributes = {})
94
- if (!attributes.is_a?(Hash))
95
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::MailboxAppPasswordResultCredential` initialize method"
96
- end
97
-
98
- # check to see if the attribute exists and convert string to symbol for hash key
99
- acceptable_attribute_map = self.class.acceptable_attribute_map
100
- attributes = attributes.each_with_object({}) { |(k, v), h|
101
- if (!acceptable_attribute_map.key?(k.to_sym))
102
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::MailboxAppPasswordResultCredential`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
103
- end
104
- h[k.to_sym] = v
105
- }
106
-
107
- if attributes.key?(:'imap_port')
108
- self.imap_port = attributes[:'imap_port']
109
- else
110
- self.imap_port = nil
111
- end
112
-
113
- if attributes.key?(:'key_prefix')
114
- self.key_prefix = attributes[:'key_prefix']
115
- else
116
- self.key_prefix = nil
117
- end
118
-
119
- if attributes.key?(:'key_suffix')
120
- self.key_suffix = attributes[:'key_suffix']
121
- else
122
- self.key_suffix = nil
123
- end
124
-
125
- if attributes.key?(:'public_id')
126
- self.public_id = attributes[:'public_id']
127
- else
128
- self.public_id = nil
129
- end
130
-
131
- if attributes.key?(:'secret')
132
- self.secret = attributes[:'secret']
133
- else
134
- self.secret = nil
135
- end
136
-
137
- if attributes.key?(:'server')
138
- self.server = attributes[:'server']
139
- else
140
- self.server = nil
141
- end
142
-
143
- if attributes.key?(:'smtp_port')
144
- self.smtp_port = attributes[:'smtp_port']
145
- else
146
- self.smtp_port = nil
147
- end
148
-
149
- if attributes.key?(:'username')
150
- self.username = attributes[:'username']
151
- else
152
- self.username = nil
153
- end
154
- end
155
-
156
- # Show invalid properties with the reasons. Usually used together with valid?
157
- # @return Array for valid properties with the reasons
158
- def list_invalid_properties
159
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
160
- invalid_properties = Array.new
161
- if @imap_port.nil?
162
- invalid_properties.push('invalid value for "imap_port", imap_port cannot be nil.')
163
- end
164
-
165
- if @key_prefix.nil?
166
- invalid_properties.push('invalid value for "key_prefix", key_prefix cannot be nil.')
167
- end
168
-
169
- if @key_suffix.nil?
170
- invalid_properties.push('invalid value for "key_suffix", key_suffix cannot be nil.')
171
- end
172
-
173
- if @public_id.nil?
174
- invalid_properties.push('invalid value for "public_id", public_id cannot be nil.')
175
- end
176
-
177
- if @secret.nil?
178
- invalid_properties.push('invalid value for "secret", secret cannot be nil.')
179
- end
180
-
181
- if @server.nil?
182
- invalid_properties.push('invalid value for "server", server cannot be nil.')
183
- end
184
-
185
- if @smtp_port.nil?
186
- invalid_properties.push('invalid value for "smtp_port", smtp_port cannot be nil.')
187
- end
188
-
189
- if @username.nil?
190
- invalid_properties.push('invalid value for "username", username cannot be nil.')
191
- end
192
-
193
- invalid_properties
194
- end
195
-
196
- # Check to see if the all the properties in the model are valid
197
- # @return true if the model is valid
198
- def valid?
199
- warn '[DEPRECATED] the `valid?` method is obsolete'
200
- return false if @imap_port.nil?
201
- return false if @key_prefix.nil?
202
- return false if @key_suffix.nil?
203
- return false if @public_id.nil?
204
- return false if @secret.nil?
205
- return false if @server.nil?
206
- return false if @smtp_port.nil?
207
- return false if @username.nil?
208
- true
209
- end
210
-
211
- # Custom attribute writer method with validation
212
- # @param [Object] imap_port Value to be assigned
213
- def imap_port=(imap_port)
214
- if imap_port.nil?
215
- fail ArgumentError, 'imap_port cannot be nil'
216
- end
217
-
218
- @imap_port = imap_port
219
- end
220
-
221
- # Custom attribute writer method with validation
222
- # @param [Object] key_prefix Value to be assigned
223
- def key_prefix=(key_prefix)
224
- if key_prefix.nil?
225
- fail ArgumentError, 'key_prefix cannot be nil'
226
- end
227
-
228
- @key_prefix = key_prefix
229
- end
230
-
231
- # Custom attribute writer method with validation
232
- # @param [Object] key_suffix Value to be assigned
233
- def key_suffix=(key_suffix)
234
- if key_suffix.nil?
235
- fail ArgumentError, 'key_suffix cannot be nil'
236
- end
237
-
238
- @key_suffix = key_suffix
239
- end
240
-
241
- # Custom attribute writer method with validation
242
- # @param [Object] public_id Value to be assigned
243
- def public_id=(public_id)
244
- if public_id.nil?
245
- fail ArgumentError, 'public_id cannot be nil'
246
- end
247
-
248
- @public_id = public_id
249
- end
250
-
251
- # Custom attribute writer method with validation
252
- # @param [Object] secret Value to be assigned
253
- def secret=(secret)
254
- if secret.nil?
255
- fail ArgumentError, 'secret cannot be nil'
256
- end
257
-
258
- @secret = secret
259
- end
260
-
261
- # Custom attribute writer method with validation
262
- # @param [Object] server Value to be assigned
263
- def server=(server)
264
- if server.nil?
265
- fail ArgumentError, 'server cannot be nil'
266
- end
267
-
268
- @server = server
269
- end
270
-
271
- # Custom attribute writer method with validation
272
- # @param [Object] smtp_port Value to be assigned
273
- def smtp_port=(smtp_port)
274
- if smtp_port.nil?
275
- fail ArgumentError, 'smtp_port cannot be nil'
276
- end
277
-
278
- @smtp_port = smtp_port
279
- end
280
-
281
- # Custom attribute writer method with validation
282
- # @param [Object] username Value to be assigned
283
- def username=(username)
284
- if username.nil?
285
- fail ArgumentError, 'username cannot be nil'
286
- end
287
-
288
- @username = username
289
- end
290
-
291
- # Checks equality by comparing each attribute.
292
- # @param [Object] Object to be compared
293
- def ==(o)
294
- return true if self.equal?(o)
295
- self.class == o.class &&
296
- imap_port == o.imap_port &&
297
- key_prefix == o.key_prefix &&
298
- key_suffix == o.key_suffix &&
299
- public_id == o.public_id &&
300
- secret == o.secret &&
301
- server == o.server &&
302
- smtp_port == o.smtp_port &&
303
- username == o.username
304
- end
305
-
306
- # @see the `==` method
307
- # @param [Object] Object to be compared
308
- def eql?(o)
309
- self == o
310
- end
311
-
312
- # Calculates hash code according to all attributes.
313
- # @return [Integer] Hash code
314
- def hash
315
- [imap_port, key_prefix, key_suffix, public_id, secret, server, smtp_port, username].hash
316
- end
317
-
318
- # Builds the object from hash
319
- # @param [Hash] attributes Model attributes in the form of hash
320
- # @return [Object] Returns the model itself
321
- def self.build_from_hash(attributes)
322
- return nil unless attributes.is_a?(Hash)
323
- attributes = attributes.transform_keys(&:to_sym)
324
- transformed_hash = {}
325
- openapi_types.each_pair do |key, type|
326
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
327
- transformed_hash["#{key}"] = nil
328
- elsif type =~ /\AArray<(.*)>/i
329
- # check to ensure the input is an array given that the attribute
330
- # is documented as an array but the input is not
331
- if attributes[attribute_map[key]].is_a?(Array)
332
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
333
- end
334
- elsif !attributes[attribute_map[key]].nil?
335
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
336
- end
337
- end
338
- new(transformed_hash)
339
- end
340
-
341
- # Returns the object in the form of hash
342
- # @return [Hash] Returns the object in the form of hash
343
- def to_hash
344
- hash = {}
345
- self.class.attribute_map.each_pair do |attr, param|
346
- value = self.send(attr)
347
- if value.nil?
348
- is_nullable = self.class.openapi_nullable.include?(attr)
349
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
350
- end
351
-
352
- hash[param] = _to_hash(value)
353
- end
354
- hash
355
- end
356
-
357
- end
358
-
359
- end
@@ -1,215 +0,0 @@
1
- =begin
2
- #Sendmux API
3
-
4
- #Programmatic access to your Sendmux email infrastructure.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.22.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Sendmux::Management::Generated
17
- class ProviderCreateBodyQuotasPerDayAnyOf < ApiModelBase
18
- attr_accessor :max
19
-
20
- attr_accessor :min
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'max' => :'max',
26
- :'min' => :'min'
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
- :'max' => :'Integer',
44
- :'min' => :'Integer'
45
- }
46
- end
47
-
48
- # List of attributes with nullable: true
49
- def self.openapi_nullable
50
- Set.new([
51
- ])
52
- end
53
-
54
- # List of class defined in allOf (OpenAPI v3)
55
- def self.openapi_all_of
56
- [
57
- :'ProviderQuotaRange'
58
- ]
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::ProviderCreateBodyQuotasPerDayAnyOf` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- acceptable_attribute_map = self.class.acceptable_attribute_map
70
- attributes = attributes.each_with_object({}) { |(k, v), h|
71
- if (!acceptable_attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::ProviderCreateBodyQuotasPerDayAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
- end
74
- h[k.to_sym] = v
75
- }
76
-
77
- if attributes.key?(:'max')
78
- self.max = attributes[:'max']
79
- else
80
- self.max = nil
81
- end
82
-
83
- if attributes.key?(:'min')
84
- self.min = attributes[:'min']
85
- else
86
- self.min = nil
87
- end
88
- end
89
-
90
- # Show invalid properties with the reasons. Usually used together with valid?
91
- # @return Array for valid properties with the reasons
92
- def list_invalid_properties
93
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
- invalid_properties = Array.new
95
- if @max.nil?
96
- invalid_properties.push('invalid value for "max", max cannot be nil.')
97
- end
98
-
99
- if @max <= 0
100
- invalid_properties.push('invalid value for "max", must be greater than 0.')
101
- end
102
-
103
- if @min.nil?
104
- invalid_properties.push('invalid value for "min", min cannot be nil.')
105
- end
106
-
107
- if @min <= 0
108
- invalid_properties.push('invalid value for "min", must be greater than 0.')
109
- end
110
-
111
- invalid_properties
112
- end
113
-
114
- # Check to see if the all the properties in the model are valid
115
- # @return true if the model is valid
116
- def valid?
117
- warn '[DEPRECATED] the `valid?` method is obsolete'
118
- return false if @max.nil?
119
- return false if @max <= 0
120
- return false if @min.nil?
121
- return false if @min <= 0
122
- true
123
- end
124
-
125
- # Custom attribute writer method with validation
126
- # @param [Object] max Value to be assigned
127
- def max=(max)
128
- if max.nil?
129
- fail ArgumentError, 'max cannot be nil'
130
- end
131
-
132
- if max <= 0
133
- fail ArgumentError, 'invalid value for "max", must be greater than 0.'
134
- end
135
-
136
- @max = max
137
- end
138
-
139
- # Custom attribute writer method with validation
140
- # @param [Object] min Value to be assigned
141
- def min=(min)
142
- if min.nil?
143
- fail ArgumentError, 'min cannot be nil'
144
- end
145
-
146
- if min <= 0
147
- fail ArgumentError, 'invalid value for "min", must be greater than 0.'
148
- end
149
-
150
- @min = min
151
- end
152
-
153
- # Checks equality by comparing each attribute.
154
- # @param [Object] Object to be compared
155
- def ==(o)
156
- return true if self.equal?(o)
157
- self.class == o.class &&
158
- max == o.max &&
159
- min == o.min
160
- end
161
-
162
- # @see the `==` method
163
- # @param [Object] Object to be compared
164
- def eql?(o)
165
- self == o
166
- end
167
-
168
- # Calculates hash code according to all attributes.
169
- # @return [Integer] Hash code
170
- def hash
171
- [max, min].hash
172
- end
173
-
174
- # Builds the object from hash
175
- # @param [Hash] attributes Model attributes in the form of hash
176
- # @return [Object] Returns the model itself
177
- def self.build_from_hash(attributes)
178
- return nil unless attributes.is_a?(Hash)
179
- attributes = attributes.transform_keys(&:to_sym)
180
- transformed_hash = {}
181
- openapi_types.each_pair do |key, type|
182
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
183
- transformed_hash["#{key}"] = nil
184
- elsif type =~ /\AArray<(.*)>/i
185
- # check to ensure the input is an array given that the attribute
186
- # is documented as an array but the input is not
187
- if attributes[attribute_map[key]].is_a?(Array)
188
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
189
- end
190
- elsif !attributes[attribute_map[key]].nil?
191
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
192
- end
193
- end
194
- new(transformed_hash)
195
- end
196
-
197
- # Returns the object in the form of hash
198
- # @return [Hash] Returns the object in the form of hash
199
- def to_hash
200
- hash = {}
201
- self.class.attribute_map.each_pair do |attr, param|
202
- value = self.send(attr)
203
- if value.nil?
204
- is_nullable = self.class.openapi_nullable.include?(attr)
205
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
- end
207
-
208
- hash[param] = _to_hash(value)
209
- end
210
- hash
211
- end
212
-
213
- end
214
-
215
- end