sendmux-management 1.1.0 → 1.1.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 +7 -0
- data/lib/sendmux/management/version.rb +1 -1
- data/lib/sendmux_management_generated/api/domains_api.rb +2 -2
- data/lib/sendmux_management_generated/models/delivery_log_detail.rb +534 -0
- data/lib/sendmux_management_generated/models/delivery_log_item.rb +112 -1
- data/lib/sendmux_management_generated/models/delivery_log_item_response.rb +1 -1
- data/lib/sendmux_management_generated/models/delivery_log_recipient.rb +254 -0
- data/lib/sendmux_management_generated/models/mailbox_domain.rb +53 -1
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +3 -3
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +111 -3
- data/lib/sendmux_management_generated/models/provider_create_body.rb +1 -0
- data/lib/sendmux_management_generated/models/provider_item.rb +1 -1
- data/lib/sendmux_management_generated/models/provider_update_body.rb +1 -0
- data/lib/sendmux_management_generated.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3439843238f753ec990889125b677ff6a94ef5453bfc63f934a7d0cd17bbbbed
|
|
4
|
+
data.tar.gz: 59fc079fb696f1820a8ca27afaa3e97af5e97a08c696a9365228b4334618a1f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b655b2cf33a13056503893ed4e82bfced4a45e7a10f11084ec6ba170bb4b6059fb76e8e2b4f8035bc16ed651ae3a53254af6a4df6609f890343ed2a541b9ae2
|
|
7
|
+
data.tar.gz: d1a4b1896ebb17576c397fab995b55980a2eeacdbfbcc440a04dff6929134a176d44f9af0389b4349e738a70e8f6f9e2ea28e438bffeee022e8acc1384a08f9c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.1](https://github.com/Sendmux/sendmux-sdk/compare/ruby-management/v1.1.0...ruby-management/v1.1.1) (2026-08-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **sdk:** regenerate management clients for the Amazon SES identity fields ([#137](https://github.com/Sendmux/sendmux-sdk/issues/137)) ([b0a3d63](https://github.com/Sendmux/sendmux-sdk/commit/b0a3d63f7d836d3d0e290a5b8c4e315a1a017e43))
|
|
9
|
+
|
|
3
10
|
## [1.1.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-management/v1.0.0...ruby-management/v1.1.0) (2026-07-08)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -427,7 +427,7 @@ module Sendmux::Management::Generated
|
|
|
427
427
|
end
|
|
428
428
|
|
|
429
429
|
# Verify a mailbox domain
|
|
430
|
-
#
|
|
430
|
+
# Checks the domain's published DNS records and latest Amazon SES DKIM and MAIL FROM statuses. If every required check passes, the domain is marked verified. A previously failed domain remains failed until a complete check succeeds. Domains automatically re-verify every 6 hours — this endpoint is only needed to trigger a check on demand.
|
|
431
431
|
# @param public_id [String]
|
|
432
432
|
# @param [Hash] opts the optional parameters
|
|
433
433
|
# @return [DomainVerifyResponse]
|
|
@@ -437,7 +437,7 @@ module Sendmux::Management::Generated
|
|
|
437
437
|
end
|
|
438
438
|
|
|
439
439
|
# Verify a mailbox domain
|
|
440
|
-
#
|
|
440
|
+
# Checks the domain's published DNS records and latest Amazon SES DKIM and MAIL FROM statuses. If every required check passes, the domain is marked verified. A previously failed domain remains failed until a complete check succeeds. Domains automatically re-verify every 6 hours — this endpoint is only needed to trigger a check on demand.
|
|
441
441
|
# @param public_id [String]
|
|
442
442
|
# @param [Hash] opts the optional parameters
|
|
443
443
|
# @return [Array<(DomainVerifyResponse, Integer, Hash)>] DomainVerifyResponse data, response status code and response headers
|
|
@@ -0,0 +1,534 @@
|
|
|
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 DeliveryLogDetail < ApiModelBase
|
|
18
|
+
# Recipient occurrences accepted by the provider, or null when no recipient snapshot exists
|
|
19
|
+
attr_accessor :accepted_recipient_count
|
|
20
|
+
|
|
21
|
+
attr_accessor :attempts
|
|
22
|
+
|
|
23
|
+
# ISO 8601 creation timestamp
|
|
24
|
+
attr_accessor :created_at
|
|
25
|
+
|
|
26
|
+
attr_accessor :from_email
|
|
27
|
+
|
|
28
|
+
# Log public ID
|
|
29
|
+
attr_accessor :id
|
|
30
|
+
|
|
31
|
+
# Email Message-ID header
|
|
32
|
+
attr_accessor :message_id
|
|
33
|
+
|
|
34
|
+
# Provider public ID
|
|
35
|
+
attr_accessor :provider_id
|
|
36
|
+
|
|
37
|
+
# Provider display name
|
|
38
|
+
attr_accessor :provider_name
|
|
39
|
+
|
|
40
|
+
# Total recipient occurrences, or null when no recipient snapshot exists
|
|
41
|
+
attr_accessor :recipient_count
|
|
42
|
+
|
|
43
|
+
# Ordered recipient outcome snapshot for this send, or null when no snapshot exists
|
|
44
|
+
attr_accessor :recipients
|
|
45
|
+
|
|
46
|
+
# Recipient occurrences rejected by the provider, or null when no recipient snapshot exists
|
|
47
|
+
attr_accessor :rejected_recipient_count
|
|
48
|
+
|
|
49
|
+
# ISO 8601 timestamp when email was sent
|
|
50
|
+
attr_accessor :sent_at
|
|
51
|
+
|
|
52
|
+
# The actual from address used for delivery after transformation. NULL if no transformation occurred or for older log entries.
|
|
53
|
+
attr_accessor :sent_from_email
|
|
54
|
+
|
|
55
|
+
attr_accessor :size_bytes
|
|
56
|
+
|
|
57
|
+
attr_accessor :status
|
|
58
|
+
|
|
59
|
+
attr_accessor :status_reason
|
|
60
|
+
|
|
61
|
+
attr_accessor :subject
|
|
62
|
+
|
|
63
|
+
attr_accessor :to_email
|
|
64
|
+
|
|
65
|
+
class EnumAttributeValidator
|
|
66
|
+
attr_reader :datatype
|
|
67
|
+
attr_reader :allowable_values
|
|
68
|
+
|
|
69
|
+
def initialize(datatype, allowable_values)
|
|
70
|
+
@allowable_values = allowable_values.map do |value|
|
|
71
|
+
case datatype.to_s
|
|
72
|
+
when /Integer/i
|
|
73
|
+
value.to_i
|
|
74
|
+
when /Float/i
|
|
75
|
+
value.to_f
|
|
76
|
+
else
|
|
77
|
+
value
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def valid?(value)
|
|
83
|
+
!value || allowable_values.include?(value)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
88
|
+
def self.attribute_map
|
|
89
|
+
{
|
|
90
|
+
:'accepted_recipient_count' => :'accepted_recipient_count',
|
|
91
|
+
:'attempts' => :'attempts',
|
|
92
|
+
:'created_at' => :'created_at',
|
|
93
|
+
:'from_email' => :'from_email',
|
|
94
|
+
:'id' => :'id',
|
|
95
|
+
:'message_id' => :'message_id',
|
|
96
|
+
:'provider_id' => :'provider_id',
|
|
97
|
+
:'provider_name' => :'provider_name',
|
|
98
|
+
:'recipient_count' => :'recipient_count',
|
|
99
|
+
:'recipients' => :'recipients',
|
|
100
|
+
:'rejected_recipient_count' => :'rejected_recipient_count',
|
|
101
|
+
:'sent_at' => :'sent_at',
|
|
102
|
+
:'sent_from_email' => :'sent_from_email',
|
|
103
|
+
:'size_bytes' => :'size_bytes',
|
|
104
|
+
:'status' => :'status',
|
|
105
|
+
:'status_reason' => :'status_reason',
|
|
106
|
+
:'subject' => :'subject',
|
|
107
|
+
:'to_email' => :'to_email'
|
|
108
|
+
}
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Returns attribute mapping this model knows about
|
|
112
|
+
def self.acceptable_attribute_map
|
|
113
|
+
attribute_map
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Returns all the JSON keys this model knows about
|
|
117
|
+
def self.acceptable_attributes
|
|
118
|
+
acceptable_attribute_map.values
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Attribute type mapping.
|
|
122
|
+
def self.openapi_types
|
|
123
|
+
{
|
|
124
|
+
:'accepted_recipient_count' => :'Integer',
|
|
125
|
+
:'attempts' => :'Float',
|
|
126
|
+
:'created_at' => :'String',
|
|
127
|
+
:'from_email' => :'String',
|
|
128
|
+
:'id' => :'String',
|
|
129
|
+
:'message_id' => :'String',
|
|
130
|
+
:'provider_id' => :'String',
|
|
131
|
+
:'provider_name' => :'String',
|
|
132
|
+
:'recipient_count' => :'Integer',
|
|
133
|
+
:'recipients' => :'Array<DeliveryLogRecipient>',
|
|
134
|
+
:'rejected_recipient_count' => :'Integer',
|
|
135
|
+
:'sent_at' => :'String',
|
|
136
|
+
:'sent_from_email' => :'String',
|
|
137
|
+
:'size_bytes' => :'Float',
|
|
138
|
+
:'status' => :'String',
|
|
139
|
+
:'status_reason' => :'String',
|
|
140
|
+
:'subject' => :'String',
|
|
141
|
+
:'to_email' => :'String'
|
|
142
|
+
}
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# List of attributes with nullable: true
|
|
146
|
+
def self.openapi_nullable
|
|
147
|
+
Set.new([
|
|
148
|
+
:'accepted_recipient_count',
|
|
149
|
+
:'from_email',
|
|
150
|
+
:'message_id',
|
|
151
|
+
:'provider_id',
|
|
152
|
+
:'provider_name',
|
|
153
|
+
:'recipient_count',
|
|
154
|
+
:'recipients',
|
|
155
|
+
:'rejected_recipient_count',
|
|
156
|
+
:'sent_at',
|
|
157
|
+
:'sent_from_email',
|
|
158
|
+
:'size_bytes',
|
|
159
|
+
:'status_reason',
|
|
160
|
+
:'subject',
|
|
161
|
+
:'to_email'
|
|
162
|
+
])
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Initializes the object
|
|
166
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
167
|
+
def initialize(attributes = {})
|
|
168
|
+
if (!attributes.is_a?(Hash))
|
|
169
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::DeliveryLogDetail` initialize method"
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
173
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
174
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
175
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
176
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::DeliveryLogDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
177
|
+
end
|
|
178
|
+
h[k.to_sym] = v
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'accepted_recipient_count')
|
|
182
|
+
self.accepted_recipient_count = attributes[:'accepted_recipient_count']
|
|
183
|
+
else
|
|
184
|
+
self.accepted_recipient_count = nil
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'attempts')
|
|
188
|
+
self.attempts = attributes[:'attempts']
|
|
189
|
+
else
|
|
190
|
+
self.attempts = nil
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if attributes.key?(:'created_at')
|
|
194
|
+
self.created_at = attributes[:'created_at']
|
|
195
|
+
else
|
|
196
|
+
self.created_at = nil
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'from_email')
|
|
200
|
+
self.from_email = attributes[:'from_email']
|
|
201
|
+
else
|
|
202
|
+
self.from_email = nil
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'id')
|
|
206
|
+
self.id = attributes[:'id']
|
|
207
|
+
else
|
|
208
|
+
self.id = nil
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'message_id')
|
|
212
|
+
self.message_id = attributes[:'message_id']
|
|
213
|
+
else
|
|
214
|
+
self.message_id = nil
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if attributes.key?(:'provider_id')
|
|
218
|
+
self.provider_id = attributes[:'provider_id']
|
|
219
|
+
else
|
|
220
|
+
self.provider_id = nil
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'provider_name')
|
|
224
|
+
self.provider_name = attributes[:'provider_name']
|
|
225
|
+
else
|
|
226
|
+
self.provider_name = nil
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if attributes.key?(:'recipient_count')
|
|
230
|
+
self.recipient_count = attributes[:'recipient_count']
|
|
231
|
+
else
|
|
232
|
+
self.recipient_count = nil
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'recipients')
|
|
236
|
+
if (value = attributes[:'recipients']).is_a?(Array)
|
|
237
|
+
self.recipients = value
|
|
238
|
+
end
|
|
239
|
+
else
|
|
240
|
+
self.recipients = nil
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'rejected_recipient_count')
|
|
244
|
+
self.rejected_recipient_count = attributes[:'rejected_recipient_count']
|
|
245
|
+
else
|
|
246
|
+
self.rejected_recipient_count = nil
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
if attributes.key?(:'sent_at')
|
|
250
|
+
self.sent_at = attributes[:'sent_at']
|
|
251
|
+
else
|
|
252
|
+
self.sent_at = nil
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if attributes.key?(:'sent_from_email')
|
|
256
|
+
self.sent_from_email = attributes[:'sent_from_email']
|
|
257
|
+
else
|
|
258
|
+
self.sent_from_email = nil
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
if attributes.key?(:'size_bytes')
|
|
262
|
+
self.size_bytes = attributes[:'size_bytes']
|
|
263
|
+
else
|
|
264
|
+
self.size_bytes = nil
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if attributes.key?(:'status')
|
|
268
|
+
self.status = attributes[:'status']
|
|
269
|
+
else
|
|
270
|
+
self.status = nil
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
if attributes.key?(:'status_reason')
|
|
274
|
+
self.status_reason = attributes[:'status_reason']
|
|
275
|
+
else
|
|
276
|
+
self.status_reason = nil
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if attributes.key?(:'subject')
|
|
280
|
+
self.subject = attributes[:'subject']
|
|
281
|
+
else
|
|
282
|
+
self.subject = nil
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
if attributes.key?(:'to_email')
|
|
286
|
+
self.to_email = attributes[:'to_email']
|
|
287
|
+
else
|
|
288
|
+
self.to_email = nil
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
293
|
+
# @return Array for valid properties with the reasons
|
|
294
|
+
def list_invalid_properties
|
|
295
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
296
|
+
invalid_properties = Array.new
|
|
297
|
+
if @accepted_recipient_count > 50
|
|
298
|
+
invalid_properties.push('invalid value for "accepted_recipient_count", must be smaller than or equal to 50.')
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
if @accepted_recipient_count < 0
|
|
302
|
+
invalid_properties.push('invalid value for "accepted_recipient_count", must be greater than or equal to 0.')
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
if @attempts.nil?
|
|
306
|
+
invalid_properties.push('invalid value for "attempts", attempts cannot be nil.')
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if @created_at.nil?
|
|
310
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
if @id.nil?
|
|
314
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
if @recipient_count > 50
|
|
318
|
+
invalid_properties.push('invalid value for "recipient_count", must be smaller than or equal to 50.')
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
if @recipient_count < 0
|
|
322
|
+
invalid_properties.push('invalid value for "recipient_count", must be greater than or equal to 0.')
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
if @recipients.length > 50
|
|
326
|
+
invalid_properties.push('invalid value for "recipients", number of items must be less than or equal to 50.')
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
if @rejected_recipient_count > 50
|
|
330
|
+
invalid_properties.push('invalid value for "rejected_recipient_count", must be smaller than or equal to 50.')
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
if @rejected_recipient_count < 0
|
|
334
|
+
invalid_properties.push('invalid value for "rejected_recipient_count", must be greater than or equal to 0.')
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
if @status.nil?
|
|
338
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
invalid_properties
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Check to see if the all the properties in the model are valid
|
|
345
|
+
# @return true if the model is valid
|
|
346
|
+
def valid?
|
|
347
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
348
|
+
return false if @accepted_recipient_count > 50
|
|
349
|
+
return false if @accepted_recipient_count < 0
|
|
350
|
+
return false if @attempts.nil?
|
|
351
|
+
return false if @created_at.nil?
|
|
352
|
+
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
|
|
358
|
+
return false if @status.nil?
|
|
359
|
+
status_validator = EnumAttributeValidator.new('String', ["pending", "sent", "failed", "rejected", "unknown_default_open_api"])
|
|
360
|
+
return false unless status_validator.valid?(@status)
|
|
361
|
+
true
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# Custom attribute writer method with validation
|
|
365
|
+
# @param [Object] accepted_recipient_count Value to be assigned
|
|
366
|
+
def accepted_recipient_count=(accepted_recipient_count)
|
|
367
|
+
if !accepted_recipient_count.nil? && accepted_recipient_count > 50
|
|
368
|
+
fail ArgumentError, 'invalid value for "accepted_recipient_count", must be smaller than or equal to 50.'
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
if !accepted_recipient_count.nil? && accepted_recipient_count < 0
|
|
372
|
+
fail ArgumentError, 'invalid value for "accepted_recipient_count", must be greater than or equal to 0.'
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
@accepted_recipient_count = accepted_recipient_count
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# Custom attribute writer method with validation
|
|
379
|
+
# @param [Object] attempts Value to be assigned
|
|
380
|
+
def attempts=(attempts)
|
|
381
|
+
if attempts.nil?
|
|
382
|
+
fail ArgumentError, 'attempts cannot be nil'
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
@attempts = attempts
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
# Custom attribute writer method with validation
|
|
389
|
+
# @param [Object] created_at Value to be assigned
|
|
390
|
+
def created_at=(created_at)
|
|
391
|
+
if created_at.nil?
|
|
392
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
@created_at = created_at
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# Custom attribute writer method with validation
|
|
399
|
+
# @param [Object] id Value to be assigned
|
|
400
|
+
def id=(id)
|
|
401
|
+
if id.nil?
|
|
402
|
+
fail ArgumentError, 'id cannot be nil'
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
@id = id
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
# Custom attribute writer method with validation
|
|
409
|
+
# @param [Object] recipient_count Value to be assigned
|
|
410
|
+
def recipient_count=(recipient_count)
|
|
411
|
+
if !recipient_count.nil? && recipient_count > 50
|
|
412
|
+
fail ArgumentError, 'invalid value for "recipient_count", must be smaller than or equal to 50.'
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
if !recipient_count.nil? && recipient_count < 0
|
|
416
|
+
fail ArgumentError, 'invalid value for "recipient_count", must be greater than or equal to 0.'
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
@recipient_count = recipient_count
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
# Custom attribute writer method with validation
|
|
423
|
+
# @param [Object] recipients Value to be assigned
|
|
424
|
+
def recipients=(recipients)
|
|
425
|
+
if !recipients.nil? && recipients.length > 50
|
|
426
|
+
fail ArgumentError, 'invalid value for "recipients", number of items must be less than or equal to 50.'
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
@recipients = recipients
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Custom attribute writer method with validation
|
|
433
|
+
# @param [Object] rejected_recipient_count Value to be assigned
|
|
434
|
+
def rejected_recipient_count=(rejected_recipient_count)
|
|
435
|
+
if !rejected_recipient_count.nil? && rejected_recipient_count > 50
|
|
436
|
+
fail ArgumentError, 'invalid value for "rejected_recipient_count", must be smaller than or equal to 50.'
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
if !rejected_recipient_count.nil? && rejected_recipient_count < 0
|
|
440
|
+
fail ArgumentError, 'invalid value for "rejected_recipient_count", must be greater than or equal to 0.'
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
@rejected_recipient_count = rejected_recipient_count
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
447
|
+
# @param [Object] status Object to be assigned
|
|
448
|
+
def status=(status)
|
|
449
|
+
validator = EnumAttributeValidator.new('String', ["pending", "sent", "failed", "rejected", "unknown_default_open_api"])
|
|
450
|
+
unless validator.valid?(status)
|
|
451
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
452
|
+
end
|
|
453
|
+
@status = status
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Checks equality by comparing each attribute.
|
|
457
|
+
# @param [Object] Object to be compared
|
|
458
|
+
def ==(o)
|
|
459
|
+
return true if self.equal?(o)
|
|
460
|
+
self.class == o.class &&
|
|
461
|
+
accepted_recipient_count == o.accepted_recipient_count &&
|
|
462
|
+
attempts == o.attempts &&
|
|
463
|
+
created_at == o.created_at &&
|
|
464
|
+
from_email == o.from_email &&
|
|
465
|
+
id == o.id &&
|
|
466
|
+
message_id == o.message_id &&
|
|
467
|
+
provider_id == o.provider_id &&
|
|
468
|
+
provider_name == o.provider_name &&
|
|
469
|
+
recipient_count == o.recipient_count &&
|
|
470
|
+
recipients == o.recipients &&
|
|
471
|
+
rejected_recipient_count == o.rejected_recipient_count &&
|
|
472
|
+
sent_at == o.sent_at &&
|
|
473
|
+
sent_from_email == o.sent_from_email &&
|
|
474
|
+
size_bytes == o.size_bytes &&
|
|
475
|
+
status == o.status &&
|
|
476
|
+
status_reason == o.status_reason &&
|
|
477
|
+
subject == o.subject &&
|
|
478
|
+
to_email == o.to_email
|
|
479
|
+
end
|
|
480
|
+
|
|
481
|
+
# @see the `==` method
|
|
482
|
+
# @param [Object] Object to be compared
|
|
483
|
+
def eql?(o)
|
|
484
|
+
self == o
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
# Calculates hash code according to all attributes.
|
|
488
|
+
# @return [Integer] Hash code
|
|
489
|
+
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
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Builds the object from hash
|
|
494
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
495
|
+
# @return [Object] Returns the model itself
|
|
496
|
+
def self.build_from_hash(attributes)
|
|
497
|
+
return nil unless attributes.is_a?(Hash)
|
|
498
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
499
|
+
transformed_hash = {}
|
|
500
|
+
openapi_types.each_pair do |key, type|
|
|
501
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
502
|
+
transformed_hash["#{key}"] = nil
|
|
503
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
504
|
+
# check to ensure the input is an array given that the attribute
|
|
505
|
+
# is documented as an array but the input is not
|
|
506
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
507
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
508
|
+
end
|
|
509
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
510
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
511
|
+
end
|
|
512
|
+
end
|
|
513
|
+
new(transformed_hash)
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# Returns the object in the form of hash
|
|
517
|
+
# @return [Hash] Returns the object in the form of hash
|
|
518
|
+
def to_hash
|
|
519
|
+
hash = {}
|
|
520
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
521
|
+
value = self.send(attr)
|
|
522
|
+
if value.nil?
|
|
523
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
524
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
hash[param] = _to_hash(value)
|
|
528
|
+
end
|
|
529
|
+
hash
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
end
|