sendmux-management 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5054b52ac1b86c25fe37c185168b5566c8ebdfb1cfce976d9d9e906a50a41af0
4
- data.tar.gz: f81b9dde19a295a11f13c33026a659b8afe4e1a1907125e883ce713670634bae
3
+ metadata.gz: '0600937a35f111f28e5946bcb9cc259e6a31434469268255a06d6e4e6dbd5bf3'
4
+ data.tar.gz: 3794fcda20d126674445268831e3d76b84900c6e3d5e52e15a2c4d6c75310707
5
5
  SHA512:
6
- metadata.gz: 5fb7b4a3b04493e60813cc8cf23ee47210d5d81a78828cc8ee2910c589d42c2597a8a763eaa07dcfad54fb2a4044f2a0f26082365ef8fb8cc36b4a35be2b7ff5
7
- data.tar.gz: 2f8c1810c172bd30c0ddd94407259715002282b47eec3af5568412711e4571df369817b9a1fb8d994ad0d2c5d4bb7b5c51c85cc153cbf0feaf4f0225acd4e461
6
+ metadata.gz: c2226f76e5b50a31230263a050fd5c36657035ffd898979d49e9d423c6f3afdd8e69e326f0b675170bb49df40af8917bd2e7d1a235f6f172f7be4ee5a4af2fd3
7
+ data.tar.gz: 035c31ba87eac6ed31c0d3cb686e6c9ca50353ebfa3ccc929e51ad2da2db18f365737edf83a7d2b3faf0b79edff167e15c13c4758c3ddce23f958eb61e44dace
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ### Features
6
+
7
+ * Add provider variable management fields and delivery-group fields to delivery logs.
8
+
9
+ ## [2.0.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-management/v1.3.0...ruby-management/v2.0.0) (2026-09-18)
10
+
11
+ ### Changed
12
+
13
+ * **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).
14
+
15
+ ### Features
16
+
17
+ * integrate combined provider variables and delivery routing ([81bbf22](https://github.com/Sendmux/sendmux-sdk/commit/81bbf221a357bf5d588eba654184ff34491473df))
18
+ * **sdk:** add provider variables and delivery group routing ([94f52d4](https://github.com/Sendmux/sendmux-sdk/commit/94f52d4e9f6157e197308541cc5987517bac7a4a))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * correct generated client contracts ([dd31abe](https://github.com/Sendmux/sendmux-sdk/commit/dd31abed8e264e05f4717388a0d4ada83e47d7e3))
24
+ * **sdk:** adopt final provider contract description and provenance ([a9bdaf5](https://github.com/Sendmux/sendmux-sdk/commit/a9bdaf58f0db684328458e269ba8aff515334d0b))
25
+ * **sdk:** adopt final provider contract description and provenance ([815278e](https://github.com/Sendmux/sendmux-sdk/commit/815278e76587dcba314c51202b8e764250e51ef3))
26
+
3
27
  ## [1.3.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-management/v1.2.0...ruby-management/v1.3.0) (2026-09-10)
4
28
 
5
29
 
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", "~> 1.0"
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.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sendmux
4
4
  module Management
5
- VERSION = '1.3.0'
5
+ VERSION = '2.0.0'
6
6
  end
7
7
  end
@@ -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. The shared Amazon SES account cannot be edited here; use activate/deactivate and the limit-request endpoint for the allowed shared-account actions.
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. The shared Amazon SES account cannot be edited here; use activate/deactivate and the limit-request endpoint for the allowed shared-account actions.
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
@@ -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
@@ -42,6 +42,9 @@ module Sendmux::Management::Generated
42
42
 
43
43
  attr_accessor :tracking_domain
44
44
 
45
+ # Per-account string variables. PATCH omission preserves the current map, a supplied map replaces it, and an empty map clears it. Detail responses return an empty map when no variables are set.
46
+ attr_accessor :variables
47
+
45
48
  class EnumAttributeValidator
46
49
  attr_reader :datatype
47
50
  attr_reader :allowable_values
@@ -79,7 +82,8 @@ module Sendmux::Management::Generated
79
82
  :'smtp_port' => :'smtp_port',
80
83
  :'smtp_protocol' => :'smtp_protocol',
81
84
  :'smtp_username' => :'smtp_username',
82
- :'tracking_domain' => :'tracking_domain'
85
+ :'tracking_domain' => :'tracking_domain',
86
+ :'variables' => :'variables'
83
87
  }
84
88
  end
85
89
 
@@ -108,7 +112,8 @@ module Sendmux::Management::Generated
108
112
  :'smtp_port' => :'Integer',
109
113
  :'smtp_protocol' => :'String',
110
114
  :'smtp_username' => :'String',
111
- :'tracking_domain' => :'String'
115
+ :'tracking_domain' => :'String',
116
+ :'variables' => :'Hash<String, String>'
112
117
  }
113
118
  end
114
119
 
@@ -119,7 +124,7 @@ module Sendmux::Management::Generated
119
124
  :'from_name',
120
125
  :'reply_to_email',
121
126
  :'reply_to_name',
122
- :'tracking_domain'
127
+ :'tracking_domain',
123
128
  ])
124
129
  end
125
130
 
@@ -202,6 +207,12 @@ module Sendmux::Management::Generated
202
207
  if attributes.key?(:'tracking_domain')
203
208
  self.tracking_domain = attributes[:'tracking_domain']
204
209
  end
210
+
211
+ if attributes.key?(:'variables')
212
+ if (value = attributes[:'variables']).is_a?(Hash)
213
+ self.variables = value
214
+ end
215
+ end
205
216
  end
206
217
 
207
218
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -301,6 +312,10 @@ module Sendmux::Management::Generated
301
312
  invalid_properties.push('invalid value for "tracking_domain", the character length must be smaller than or equal to 255.')
302
313
  end
303
314
 
315
+ if !@variables.nil? && @variables.length > 50
316
+ invalid_properties.push('invalid value for "variables", number of items must be less than or equal to 50.')
317
+ end
318
+
304
319
  invalid_properties
305
320
  end
306
321
 
@@ -333,6 +348,7 @@ module Sendmux::Management::Generated
333
348
  return false if @smtp_username.to_s.length > 255
334
349
  return false if @smtp_username.to_s.length < 1
335
350
  return false if !@tracking_domain.nil? && @tracking_domain.to_s.length > 255
351
+ return false if !@variables.nil? && @variables.length > 50
336
352
  true
337
353
  end
338
354
 
@@ -504,6 +520,20 @@ module Sendmux::Management::Generated
504
520
  @tracking_domain = tracking_domain
505
521
  end
506
522
 
523
+ # Custom attribute writer method with validation
524
+ # @param [Object] variables Value to be assigned
525
+ def variables=(variables)
526
+ if variables.nil?
527
+ fail ArgumentError, 'variables cannot be nil'
528
+ end
529
+
530
+ if variables.length > 50
531
+ fail ArgumentError, 'invalid value for "variables", number of items must be less than or equal to 50.'
532
+ end
533
+
534
+ @variables = variables
535
+ end
536
+
507
537
  # Checks equality by comparing each attribute.
508
538
  # @param [Object] Object to be compared
509
539
  def ==(o)
@@ -521,7 +551,8 @@ module Sendmux::Management::Generated
521
551
  smtp_port == o.smtp_port &&
522
552
  smtp_protocol == o.smtp_protocol &&
523
553
  smtp_username == o.smtp_username &&
524
- tracking_domain == o.tracking_domain
554
+ tracking_domain == o.tracking_domain &&
555
+ variables == o.variables
525
556
  end
526
557
 
527
558
  # @see the `==` method
@@ -533,7 +564,7 @@ module Sendmux::Management::Generated
533
564
  # Calculates hash code according to all attributes.
534
565
  # @return [Integer] Hash code
535
566
  def hash
536
- [from_email, from_name, name, percentage, quotas, reply_to_email, reply_to_name, smtp_host, smtp_password, smtp_port, smtp_protocol, smtp_username, tracking_domain].hash
567
+ [from_email, from_name, name, percentage, quotas, reply_to_email, reply_to_name, smtp_host, smtp_password, smtp_port, smtp_protocol, smtp_username, tracking_domain, variables].hash
537
568
  end
538
569
 
539
570
  # Builds the object from hash