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.
@@ -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
 
@@ -190,6 +195,12 @@ module Sendmux::Management::Generated
190
195
  if attributes.key?(:'tracking_domain')
191
196
  self.tracking_domain = attributes[:'tracking_domain']
192
197
  end
198
+
199
+ if attributes.key?(:'variables')
200
+ if (value = attributes[:'variables']).is_a?(Hash)
201
+ self.variables = value
202
+ end
203
+ end
193
204
  end
194
205
 
195
206
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -265,6 +276,10 @@ module Sendmux::Management::Generated
265
276
  invalid_properties.push('invalid value for "tracking_domain", the character length must be smaller than or equal to 255.')
266
277
  end
267
278
 
279
+ if !@variables.nil? && @variables.length > 50
280
+ invalid_properties.push('invalid value for "variables", number of items must be less than or equal to 50.')
281
+ end
282
+
268
283
  invalid_properties
269
284
  end
270
285
 
@@ -291,6 +306,7 @@ module Sendmux::Management::Generated
291
306
  return false if !@smtp_username.nil? && @smtp_username.to_s.length > 255
292
307
  return false if !@smtp_username.nil? && @smtp_username.to_s.length < 1
293
308
  return false if !@tracking_domain.nil? && @tracking_domain.to_s.length > 255
309
+ return false if !@variables.nil? && @variables.length > 50
294
310
  true
295
311
  end
296
312
 
@@ -462,6 +478,20 @@ module Sendmux::Management::Generated
462
478
  @tracking_domain = tracking_domain
463
479
  end
464
480
 
481
+ # Custom attribute writer method with validation
482
+ # @param [Object] variables Value to be assigned
483
+ def variables=(variables)
484
+ if variables.nil?
485
+ fail ArgumentError, 'variables cannot be nil'
486
+ end
487
+
488
+ if variables.length > 50
489
+ fail ArgumentError, 'invalid value for "variables", number of items must be less than or equal to 50.'
490
+ end
491
+
492
+ @variables = variables
493
+ end
494
+
465
495
  # Checks equality by comparing each attribute.
466
496
  # @param [Object] Object to be compared
467
497
  def ==(o)
@@ -479,7 +509,8 @@ module Sendmux::Management::Generated
479
509
  smtp_port == o.smtp_port &&
480
510
  smtp_protocol == o.smtp_protocol &&
481
511
  smtp_username == o.smtp_username &&
482
- tracking_domain == o.tracking_domain
512
+ tracking_domain == o.tracking_domain &&
513
+ variables == o.variables
483
514
  end
484
515
 
485
516
  # @see the `==` method
@@ -491,7 +522,7 @@ module Sendmux::Management::Generated
491
522
  # Calculates hash code according to all attributes.
492
523
  # @return [Integer] Hash code
493
524
  def hash
494
- [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
525
+ [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
495
526
  end
496
527
 
497
528
  # Builds the object from hash
@@ -154,7 +154,7 @@ module Sendmux::Management::Generated
154
154
  invalid_properties.push('invalid value for "can_request_increase", can_request_increase cannot be nil.')
155
155
  end
156
156
 
157
- if @daily_limit < 0
157
+ if !@daily_limit.nil? && @daily_limit < 0
158
158
  invalid_properties.push('invalid value for "daily_limit", must be greater than or equal to 0.')
159
159
  end
160
160
 
@@ -170,7 +170,7 @@ module Sendmux::Management::Generated
170
170
  invalid_properties.push('invalid value for "sent_today", must be greater than or equal to 0.')
171
171
  end
172
172
 
173
- if @threshold_usage < 0
173
+ if !@threshold_usage.nil? && @threshold_usage < 0
174
174
  invalid_properties.push('invalid value for "threshold_usage", must be greater than or equal to 0.')
175
175
  end
176
176
 
@@ -182,11 +182,11 @@ module Sendmux::Management::Generated
182
182
  def valid?
183
183
  warn '[DEPRECATED] the `valid?` method is obsolete'
184
184
  return false if @can_request_increase.nil?
185
- return false if @daily_limit < 0
185
+ return false if !@daily_limit.nil? && @daily_limit < 0
186
186
  return false if @is_near_limit.nil?
187
187
  return false if @sent_today.nil?
188
188
  return false if @sent_today < 0
189
- return false if @threshold_usage < 0
189
+ return false if !@threshold_usage.nil? && @threshold_usage < 0
190
190
  true
191
191
  end
192
192
 
@@ -170,7 +170,7 @@ module Sendmux::Management::Generated
170
170
  def list_invalid_properties
171
171
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
172
172
  invalid_properties = Array.new
173
- if @approved_daily_limit <= 0
173
+ if !@approved_daily_limit.nil? && @approved_daily_limit <= 0
174
174
  invalid_properties.push('invalid value for "approved_daily_limit", must be greater than 0.')
175
175
  end
176
176
 
@@ -209,7 +209,7 @@ module Sendmux::Management::Generated
209
209
  # @return true if the model is valid
210
210
  def valid?
211
211
  warn '[DEPRECATED] the `valid?` method is obsolete'
212
- return false if @approved_daily_limit <= 0
212
+ return false if !@approved_daily_limit.nil? && @approved_daily_limit <= 0
213
213
  return false if @created_at.nil?
214
214
  return false if @current_daily_limit.nil?
215
215
  return false if @current_daily_limit < 0
@@ -94,6 +94,7 @@ require 'sendmux_management_generated/models/provider_item_cursor_list_response'
94
94
  require 'sendmux_management_generated/models/provider_item_response'
95
95
  require 'sendmux_management_generated/models/provider_limits'
96
96
  require 'sendmux_management_generated/models/provider_limits_response'
97
+ require 'sendmux_management_generated/models/provider_list_item'
97
98
  require 'sendmux_management_generated/models/provider_quota_range'
98
99
  require 'sendmux_management_generated/models/provider_quotas'
99
100
  require 'sendmux_management_generated/models/provider_stats'
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: 1.3.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sendmux
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-09-10 00:00:00.000000000 Z
10
+ date: 2026-09-19 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: faraday
@@ -194,6 +194,7 @@ files:
194
194
  - lib/sendmux_management_generated/models/provider_item_response.rb
195
195
  - lib/sendmux_management_generated/models/provider_limits.rb
196
196
  - lib/sendmux_management_generated/models/provider_limits_response.rb
197
+ - lib/sendmux_management_generated/models/provider_list_item.rb
197
198
  - lib/sendmux_management_generated/models/provider_quota_range.rb
198
199
  - lib/sendmux_management_generated/models/provider_quotas.rb
199
200
  - lib/sendmux_management_generated/models/provider_stats.rb