sendmux-management 2.0.1 → 3.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.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. metadata +13 -224
  3. data/CHANGELOG.md +0 -92
  4. data/LICENSE +0 -21
  5. data/README.md +0 -157
  6. data/lib/sendmux/management/client.rb +0 -77
  7. data/lib/sendmux/management/version.rb +0 -7
  8. data/lib/sendmux/management.rb +0 -12
  9. data/lib/sendmux_management_generated/api/billing_api.rb +0 -221
  10. data/lib/sendmux_management_generated/api/connection_api.rb +0 -82
  11. data/lib/sendmux_management_generated/api/domain_filters_api.rb +0 -161
  12. data/lib/sendmux_management_generated/api/domains_api.rb +0 -492
  13. data/lib/sendmux_management_generated/api/emails_api.rb +0 -258
  14. data/lib/sendmux_management_generated/api/inboxes_api.rb +0 -175
  15. data/lib/sendmux_management_generated/api/mailbox_filters_api.rb +0 -161
  16. data/lib/sendmux_management_generated/api/mailboxes_api.rb +0 -723
  17. data/lib/sendmux_management_generated/api/sending_accounts_api.rb +0 -1009
  18. data/lib/sendmux_management_generated/api/webhooks_api.rb +0 -666
  19. data/lib/sendmux_management_generated/api_client.rb +0 -447
  20. data/lib/sendmux_management_generated/api_error.rb +0 -58
  21. data/lib/sendmux_management_generated/api_model_base.rb +0 -88
  22. data/lib/sendmux_management_generated/configuration.rb +0 -400
  23. data/lib/sendmux_management_generated/models/api_error_detail.rb +0 -219
  24. data/lib/sendmux_management_generated/models/api_error_error.rb +0 -275
  25. data/lib/sendmux_management_generated/models/api_error_meta.rb +0 -164
  26. data/lib/sendmux_management_generated/models/api_error_response.rb +0 -216
  27. data/lib/sendmux_management_generated/models/balance.rb +0 -293
  28. data/lib/sendmux_management_generated/models/balance_auto_topup.rb +0 -226
  29. data/lib/sendmux_management_generated/models/balance_response.rb +0 -223
  30. data/lib/sendmux_management_generated/models/connection.rb +0 -273
  31. data/lib/sendmux_management_generated/models/connection_credential.rb +0 -226
  32. data/lib/sendmux_management_generated/models/connection_mailboxes_inner.rb +0 -190
  33. data/lib/sendmux_management_generated/models/connection_response.rb +0 -223
  34. data/lib/sendmux_management_generated/models/connection_team.rb +0 -190
  35. data/lib/sendmux_management_generated/models/cursor_pagination.rb +0 -173
  36. data/lib/sendmux_management_generated/models/delivery_log_detail.rb +0 -573
  37. data/lib/sendmux_management_generated/models/delivery_log_item.rb +0 -543
  38. data/lib/sendmux_management_generated/models/delivery_log_item_cursor_list_response.rb +0 -251
  39. data/lib/sendmux_management_generated/models/delivery_log_item_response.rb +0 -223
  40. data/lib/sendmux_management_generated/models/delivery_log_recipient.rb +0 -254
  41. data/lib/sendmux_management_generated/models/domain_deleted_response.rb +0 -223
  42. data/lib/sendmux_management_generated/models/domain_deleted_response_all_of_data.rb +0 -190
  43. data/lib/sendmux_management_generated/models/domain_item_cursor_list_response.rb +0 -251
  44. data/lib/sendmux_management_generated/models/domain_item_response.rb +0 -223
  45. data/lib/sendmux_management_generated/models/domain_verify_response.rb +0 -223
  46. data/lib/sendmux_management_generated/models/email_metrics.rb +0 -218
  47. data/lib/sendmux_management_generated/models/email_metrics_comparison.rb +0 -294
  48. data/lib/sendmux_management_generated/models/email_metrics_comparison_change_pct.rb +0 -268
  49. data/lib/sendmux_management_generated/models/email_metrics_response.rb +0 -223
  50. data/lib/sendmux_management_generated/models/email_metrics_summary.rb +0 -268
  51. data/lib/sendmux_management_generated/models/email_metrics_timeseries_inner.rb +0 -294
  52. data/lib/sendmux_management_generated/models/filter_rule.rb +0 -242
  53. data/lib/sendmux_management_generated/models/filter_state.rb +0 -218
  54. data/lib/sendmux_management_generated/models/filter_state_response.rb +0 -223
  55. data/lib/sendmux_management_generated/models/incoming_log_item.rb +0 -465
  56. data/lib/sendmux_management_generated/models/incoming_log_item_cursor_list_response.rb +0 -251
  57. data/lib/sendmux_management_generated/models/incoming_log_item_response.rb +0 -223
  58. data/lib/sendmux_management_generated/models/mailbox.rb +0 -284
  59. data/lib/sendmux_management_generated/models/mailbox_app_password_result.rb +0 -164
  60. data/lib/sendmux_management_generated/models/mailbox_app_password_result_response.rb +0 -223
  61. data/lib/sendmux_management_generated/models/mailbox_availability_reason.rb +0 -45
  62. data/lib/sendmux_management_generated/models/mailbox_availability_response.rb +0 -223
  63. data/lib/sendmux_management_generated/models/mailbox_availability_result.rb +0 -240
  64. data/lib/sendmux_management_generated/models/mailbox_create_result.rb +0 -190
  65. data/lib/sendmux_management_generated/models/mailbox_create_result_response.rb +0 -223
  66. data/lib/sendmux_management_generated/models/mailbox_credential.rb +0 -352
  67. data/lib/sendmux_management_generated/models/mailbox_deleted_response.rb +0 -223
  68. data/lib/sendmux_management_generated/models/mailbox_domain.rb +0 -452
  69. data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +0 -303
  70. data/lib/sendmux_management_generated/models/mailbox_domain_mail_from_records.rb +0 -191
  71. data/lib/sendmux_management_generated/models/mailbox_domain_mx_record.rb +0 -190
  72. data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +0 -191
  73. data/lib/sendmux_management_generated/models/mailbox_domain_named_mx_record.rb +0 -217
  74. data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +0 -300
  75. data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +0 -377
  76. data/lib/sendmux_management_generated/models/mailbox_item_cursor_list_response.rb +0 -251
  77. data/lib/sendmux_management_generated/models/mailbox_item_response.rb +0 -223
  78. data/lib/sendmux_management_generated/models/mailbox_key_deleted_response.rb +0 -223
  79. data/lib/sendmux_management_generated/models/mailbox_send_scope.rb +0 -213
  80. data/lib/sendmux_management_generated/models/management_create_domain_request.rb +0 -209
  81. data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +0 -183
  82. data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +0 -270
  83. data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +0 -214
  84. data/lib/sendmux_management_generated/models/management_test_webhook200_response.rb +0 -223
  85. data/lib/sendmux_management_generated/models/management_update_domain_request.rb +0 -189
  86. data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +0 -294
  87. data/lib/sendmux_management_generated/models/provider_create_body.rb +0 -611
  88. data/lib/sendmux_management_generated/models/provider_create_body_quotas.rb +0 -174
  89. data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +0 -104
  90. data/lib/sendmux_management_generated/models/provider_deleted.rb +0 -190
  91. data/lib/sendmux_management_generated/models/provider_deleted_response.rb +0 -223
  92. data/lib/sendmux_management_generated/models/provider_item.rb +0 -733
  93. data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +0 -251
  94. data/lib/sendmux_management_generated/models/provider_item_response.rb +0 -223
  95. data/lib/sendmux_management_generated/models/provider_limits.rb +0 -190
  96. data/lib/sendmux_management_generated/models/provider_limits_response.rb +0 -223
  97. data/lib/sendmux_management_generated/models/provider_list_item.rb +0 -695
  98. data/lib/sendmux_management_generated/models/provider_quota_range.rb +0 -208
  99. data/lib/sendmux_management_generated/models/provider_quotas.rb +0 -186
  100. data/lib/sendmux_management_generated/models/provider_stats.rb +0 -325
  101. data/lib/sendmux_management_generated/models/provider_stats_response.rb +0 -223
  102. data/lib/sendmux_management_generated/models/provider_status_counts.rb +0 -242
  103. data/lib/sendmux_management_generated/models/provider_test_result.rb +0 -251
  104. data/lib/sendmux_management_generated/models/provider_test_result_response.rb +0 -223
  105. data/lib/sendmux_management_generated/models/provider_type_counts.rb +0 -246
  106. data/lib/sendmux_management_generated/models/provider_update_body.rb +0 -569
  107. data/lib/sendmux_management_generated/models/provider_usage.rb +0 -216
  108. data/lib/sendmux_management_generated/models/provider_usage_item.rb +0 -374
  109. data/lib/sendmux_management_generated/models/provider_usage_response.rb +0 -223
  110. data/lib/sendmux_management_generated/models/resource_limit_snapshot.rb +0 -420
  111. data/lib/sendmux_management_generated/models/response_meta.rb +0 -164
  112. data/lib/sendmux_management_generated/models/sending_account_limit_request.rb +0 -190
  113. data/lib/sendmux_management_generated/models/sending_account_limit_request_response.rb +0 -223
  114. data/lib/sendmux_management_generated/models/set_filter_state_body.rb +0 -226
  115. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +0 -315
  116. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +0 -361
  117. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel.rb +0 -190
  118. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel_response.rb +0 -223
  119. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +0 -190
  120. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +0 -223
  121. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page.rb +0 -176
  122. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +0 -223
  123. data/lib/sendmux_management_generated/models/spend_summary.rb +0 -292
  124. data/lib/sendmux_management_generated/models/spend_summary_response.rb +0 -223
  125. data/lib/sendmux_management_generated/models/success_envelope.rb +0 -192
  126. data/lib/sendmux_management_generated/models/transaction.rb +0 -332
  127. data/lib/sendmux_management_generated/models/transaction_cursor_list_response.rb +0 -251
  128. data/lib/sendmux_management_generated/models/update_mailbox_body.rb +0 -211
  129. data/lib/sendmux_management_generated/models/update_mailbox_body_send_scope.rb +0 -214
  130. data/lib/sendmux_management_generated/models/webhook_create_body.rb +0 -269
  131. data/lib/sendmux_management_generated/models/webhook_deleted_response.rb +0 -223
  132. data/lib/sendmux_management_generated/models/webhook_delivery_attempt.rb +0 -562
  133. data/lib/sendmux_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +0 -251
  134. data/lib/sendmux_management_generated/models/webhook_delivery_payload.rb +0 -359
  135. data/lib/sendmux_management_generated/models/webhook_delivery_payload_response.rb +0 -223
  136. data/lib/sendmux_management_generated/models/webhook_event_data.rb +0 -395
  137. data/lib/sendmux_management_generated/models/webhook_event_payload.rb +0 -297
  138. data/lib/sendmux_management_generated/models/webhook_filters.rb +0 -168
  139. data/lib/sendmux_management_generated/models/webhook_subscription.rb +0 -380
  140. data/lib/sendmux_management_generated/models/webhook_subscription_cursor_list_response.rb +0 -251
  141. data/lib/sendmux_management_generated/models/webhook_subscription_response.rb +0 -223
  142. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +0 -407
  143. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret_response.rb +0 -223
  144. data/lib/sendmux_management_generated/models/webhook_test_response.rb +0 -165
  145. data/lib/sendmux_management_generated/models/webhook_update_body.rb +0 -233
  146. data/lib/sendmux_management_generated/version.rb +0 -15
  147. data/lib/sendmux_management_generated.rb +0 -181
@@ -1,573 +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 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
- # Applied per-message delivery group public IDs, or null for absent, ignored or historical hints
27
- attr_accessor :delivery_group
28
-
29
- attr_accessor :from_email
30
-
31
- # Log public ID
32
- attr_accessor :id
33
-
34
- # Email Message-ID header
35
- attr_accessor :message_id
36
-
37
- # Provider public ID
38
- attr_accessor :provider_id
39
-
40
- # Provider display name
41
- attr_accessor :provider_name
42
-
43
- # Total recipient occurrences, or null when no recipient snapshot exists
44
- attr_accessor :recipient_count
45
-
46
- # Ordered recipient outcome snapshot for this send, or null when no snapshot exists
47
- attr_accessor :recipients
48
-
49
- # Recipient occurrences rejected by the provider, or null when no recipient snapshot exists
50
- attr_accessor :rejected_recipient_count
51
-
52
- # ISO 8601 timestamp when email was sent
53
- attr_accessor :sent_at
54
-
55
- # The actual from address used for delivery after transformation. NULL if no transformation occurred or for older log entries.
56
- attr_accessor :sent_from_email
57
-
58
- attr_accessor :size_bytes
59
-
60
- attr_accessor :status
61
-
62
- attr_accessor :status_reason
63
-
64
- attr_accessor :subject
65
-
66
- attr_accessor :to_email
67
-
68
- class EnumAttributeValidator
69
- attr_reader :datatype
70
- attr_reader :allowable_values
71
-
72
- def initialize(datatype, allowable_values)
73
- @allowable_values = allowable_values.map do |value|
74
- case datatype.to_s
75
- when /Integer/i
76
- value.to_i
77
- when /Float/i
78
- value.to_f
79
- else
80
- value
81
- end
82
- end
83
- end
84
-
85
- def valid?(value)
86
- !value || allowable_values.include?(value)
87
- end
88
- end
89
-
90
- # Attribute mapping from ruby-style variable name to JSON key.
91
- def self.attribute_map
92
- {
93
- :'accepted_recipient_count' => :'accepted_recipient_count',
94
- :'attempts' => :'attempts',
95
- :'created_at' => :'created_at',
96
- :'delivery_group' => :'delivery_group',
97
- :'from_email' => :'from_email',
98
- :'id' => :'id',
99
- :'message_id' => :'message_id',
100
- :'provider_id' => :'provider_id',
101
- :'provider_name' => :'provider_name',
102
- :'recipient_count' => :'recipient_count',
103
- :'recipients' => :'recipients',
104
- :'rejected_recipient_count' => :'rejected_recipient_count',
105
- :'sent_at' => :'sent_at',
106
- :'sent_from_email' => :'sent_from_email',
107
- :'size_bytes' => :'size_bytes',
108
- :'status' => :'status',
109
- :'status_reason' => :'status_reason',
110
- :'subject' => :'subject',
111
- :'to_email' => :'to_email'
112
- }
113
- end
114
-
115
- # Returns attribute mapping this model knows about
116
- def self.acceptable_attribute_map
117
- attribute_map
118
- end
119
-
120
- # Returns all the JSON keys this model knows about
121
- def self.acceptable_attributes
122
- acceptable_attribute_map.values
123
- end
124
-
125
- # Attribute type mapping.
126
- def self.openapi_types
127
- {
128
- :'accepted_recipient_count' => :'Integer',
129
- :'attempts' => :'Float',
130
- :'created_at' => :'String',
131
- :'delivery_group' => :'Array<String>',
132
- :'from_email' => :'String',
133
- :'id' => :'String',
134
- :'message_id' => :'String',
135
- :'provider_id' => :'String',
136
- :'provider_name' => :'String',
137
- :'recipient_count' => :'Integer',
138
- :'recipients' => :'Array<DeliveryLogRecipient>',
139
- :'rejected_recipient_count' => :'Integer',
140
- :'sent_at' => :'String',
141
- :'sent_from_email' => :'String',
142
- :'size_bytes' => :'Float',
143
- :'status' => :'String',
144
- :'status_reason' => :'String',
145
- :'subject' => :'String',
146
- :'to_email' => :'String'
147
- }
148
- end
149
-
150
- # List of attributes with nullable: true
151
- def self.openapi_nullable
152
- Set.new([
153
- :'accepted_recipient_count',
154
- :'delivery_group',
155
- :'from_email',
156
- :'message_id',
157
- :'provider_id',
158
- :'provider_name',
159
- :'recipient_count',
160
- :'recipients',
161
- :'rejected_recipient_count',
162
- :'sent_at',
163
- :'sent_from_email',
164
- :'size_bytes',
165
- :'status_reason',
166
- :'subject',
167
- :'to_email'
168
- ])
169
- end
170
-
171
- # Initializes the object
172
- # @param [Hash] attributes Model attributes in the form of hash
173
- def initialize(attributes = {})
174
- if (!attributes.is_a?(Hash))
175
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::DeliveryLogDetail` initialize method"
176
- end
177
-
178
- # check to see if the attribute exists and convert string to symbol for hash key
179
- acceptable_attribute_map = self.class.acceptable_attribute_map
180
- attributes = attributes.each_with_object({}) { |(k, v), h|
181
- if (!acceptable_attribute_map.key?(k.to_sym))
182
- 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
183
- end
184
- h[k.to_sym] = v
185
- }
186
-
187
- if attributes.key?(:'accepted_recipient_count')
188
- self.accepted_recipient_count = attributes[:'accepted_recipient_count']
189
- else
190
- self.accepted_recipient_count = nil
191
- end
192
-
193
- if attributes.key?(:'attempts')
194
- self.attempts = attributes[:'attempts']
195
- else
196
- self.attempts = nil
197
- end
198
-
199
- if attributes.key?(:'created_at')
200
- self.created_at = attributes[:'created_at']
201
- else
202
- self.created_at = nil
203
- end
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
-
213
- if attributes.key?(:'from_email')
214
- self.from_email = attributes[:'from_email']
215
- else
216
- self.from_email = nil
217
- end
218
-
219
- if attributes.key?(:'id')
220
- self.id = attributes[:'id']
221
- else
222
- self.id = nil
223
- end
224
-
225
- if attributes.key?(:'message_id')
226
- self.message_id = attributes[:'message_id']
227
- else
228
- self.message_id = nil
229
- end
230
-
231
- if attributes.key?(:'provider_id')
232
- self.provider_id = attributes[:'provider_id']
233
- else
234
- self.provider_id = nil
235
- end
236
-
237
- if attributes.key?(:'provider_name')
238
- self.provider_name = attributes[:'provider_name']
239
- else
240
- self.provider_name = nil
241
- end
242
-
243
- if attributes.key?(:'recipient_count')
244
- self.recipient_count = attributes[:'recipient_count']
245
- else
246
- self.recipient_count = nil
247
- end
248
-
249
- if attributes.key?(:'recipients')
250
- if (value = attributes[:'recipients']).is_a?(Array)
251
- self.recipients = value
252
- end
253
- else
254
- self.recipients = nil
255
- end
256
-
257
- if attributes.key?(:'rejected_recipient_count')
258
- self.rejected_recipient_count = attributes[:'rejected_recipient_count']
259
- else
260
- self.rejected_recipient_count = nil
261
- end
262
-
263
- if attributes.key?(:'sent_at')
264
- self.sent_at = attributes[:'sent_at']
265
- else
266
- self.sent_at = nil
267
- end
268
-
269
- if attributes.key?(:'sent_from_email')
270
- self.sent_from_email = attributes[:'sent_from_email']
271
- else
272
- self.sent_from_email = nil
273
- end
274
-
275
- if attributes.key?(:'size_bytes')
276
- self.size_bytes = attributes[:'size_bytes']
277
- else
278
- self.size_bytes = nil
279
- end
280
-
281
- if attributes.key?(:'status')
282
- self.status = attributes[:'status']
283
- else
284
- self.status = nil
285
- end
286
-
287
- if attributes.key?(:'status_reason')
288
- self.status_reason = attributes[:'status_reason']
289
- else
290
- self.status_reason = nil
291
- end
292
-
293
- if attributes.key?(:'subject')
294
- self.subject = attributes[:'subject']
295
- else
296
- self.subject = nil
297
- end
298
-
299
- if attributes.key?(:'to_email')
300
- self.to_email = attributes[:'to_email']
301
- else
302
- self.to_email = nil
303
- end
304
- end
305
-
306
- # Show invalid properties with the reasons. Usually used together with valid?
307
- # @return Array for valid properties with the reasons
308
- def list_invalid_properties
309
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
310
- invalid_properties = Array.new
311
- if !@accepted_recipient_count.nil? && @accepted_recipient_count > 50
312
- invalid_properties.push('invalid value for "accepted_recipient_count", must be smaller than or equal to 50.')
313
- end
314
-
315
- if !@accepted_recipient_count.nil? && @accepted_recipient_count < 0
316
- invalid_properties.push('invalid value for "accepted_recipient_count", must be greater than or equal to 0.')
317
- end
318
-
319
- if @attempts.nil?
320
- invalid_properties.push('invalid value for "attempts", attempts cannot be nil.')
321
- end
322
-
323
- if @created_at.nil?
324
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
325
- end
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
-
335
- if @id.nil?
336
- invalid_properties.push('invalid value for "id", id cannot be nil.')
337
- end
338
-
339
- if !@recipient_count.nil? && @recipient_count > 50
340
- invalid_properties.push('invalid value for "recipient_count", must be smaller than or equal to 50.')
341
- end
342
-
343
- if !@recipient_count.nil? && @recipient_count < 0
344
- invalid_properties.push('invalid value for "recipient_count", must be greater than or equal to 0.')
345
- end
346
-
347
- if !@recipients.nil? && @recipients.length > 50
348
- invalid_properties.push('invalid value for "recipients", number of items must be less than or equal to 50.')
349
- end
350
-
351
- if !@rejected_recipient_count.nil? && @rejected_recipient_count > 50
352
- invalid_properties.push('invalid value for "rejected_recipient_count", must be smaller than or equal to 50.')
353
- end
354
-
355
- if !@rejected_recipient_count.nil? && @rejected_recipient_count < 0
356
- invalid_properties.push('invalid value for "rejected_recipient_count", must be greater than or equal to 0.')
357
- end
358
-
359
- if @status.nil?
360
- invalid_properties.push('invalid value for "status", status cannot be nil.')
361
- end
362
-
363
- invalid_properties
364
- end
365
-
366
- # Check to see if the all the properties in the model are valid
367
- # @return true if the model is valid
368
- def valid?
369
- warn '[DEPRECATED] the `valid?` method is obsolete'
370
- return false if !@accepted_recipient_count.nil? && @accepted_recipient_count > 50
371
- return false if !@accepted_recipient_count.nil? && @accepted_recipient_count < 0
372
- return false if @attempts.nil?
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
376
- return false if @id.nil?
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
382
- return false if @status.nil?
383
- status_validator = EnumAttributeValidator.new('String', ["pending", "sent", "failed", "rejected", "unknown_default_open_api"])
384
- return false unless status_validator.valid?(@status)
385
- true
386
- end
387
-
388
- # Custom attribute writer method with validation
389
- # @param [Object] accepted_recipient_count Value to be assigned
390
- def accepted_recipient_count=(accepted_recipient_count)
391
- if !accepted_recipient_count.nil? && accepted_recipient_count > 50
392
- fail ArgumentError, 'invalid value for "accepted_recipient_count", must be smaller than or equal to 50.'
393
- end
394
-
395
- if !accepted_recipient_count.nil? && accepted_recipient_count < 0
396
- fail ArgumentError, 'invalid value for "accepted_recipient_count", must be greater than or equal to 0.'
397
- end
398
-
399
- @accepted_recipient_count = accepted_recipient_count
400
- end
401
-
402
- # Custom attribute writer method with validation
403
- # @param [Object] attempts Value to be assigned
404
- def attempts=(attempts)
405
- if attempts.nil?
406
- fail ArgumentError, 'attempts cannot be nil'
407
- end
408
-
409
- @attempts = attempts
410
- end
411
-
412
- # Custom attribute writer method with validation
413
- # @param [Object] created_at Value to be assigned
414
- def created_at=(created_at)
415
- if created_at.nil?
416
- fail ArgumentError, 'created_at cannot be nil'
417
- end
418
-
419
- @created_at = created_at
420
- end
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
-
436
- # Custom attribute writer method with validation
437
- # @param [Object] id Value to be assigned
438
- def id=(id)
439
- if id.nil?
440
- fail ArgumentError, 'id cannot be nil'
441
- end
442
-
443
- @id = id
444
- end
445
-
446
- # Custom attribute writer method with validation
447
- # @param [Object] recipient_count Value to be assigned
448
- def recipient_count=(recipient_count)
449
- if !recipient_count.nil? && recipient_count > 50
450
- fail ArgumentError, 'invalid value for "recipient_count", must be smaller than or equal to 50.'
451
- end
452
-
453
- if !recipient_count.nil? && recipient_count < 0
454
- fail ArgumentError, 'invalid value for "recipient_count", must be greater than or equal to 0.'
455
- end
456
-
457
- @recipient_count = recipient_count
458
- end
459
-
460
- # Custom attribute writer method with validation
461
- # @param [Object] recipients Value to be assigned
462
- def recipients=(recipients)
463
- if !recipients.nil? && recipients.length > 50
464
- fail ArgumentError, 'invalid value for "recipients", number of items must be less than or equal to 50.'
465
- end
466
-
467
- @recipients = recipients
468
- end
469
-
470
- # Custom attribute writer method with validation
471
- # @param [Object] rejected_recipient_count Value to be assigned
472
- def rejected_recipient_count=(rejected_recipient_count)
473
- if !rejected_recipient_count.nil? && rejected_recipient_count > 50
474
- fail ArgumentError, 'invalid value for "rejected_recipient_count", must be smaller than or equal to 50.'
475
- end
476
-
477
- if !rejected_recipient_count.nil? && rejected_recipient_count < 0
478
- fail ArgumentError, 'invalid value for "rejected_recipient_count", must be greater than or equal to 0.'
479
- end
480
-
481
- @rejected_recipient_count = rejected_recipient_count
482
- end
483
-
484
- # Custom attribute writer method checking allowed values (enum).
485
- # @param [Object] status Object to be assigned
486
- def status=(status)
487
- validator = EnumAttributeValidator.new('String', ["pending", "sent", "failed", "rejected", "unknown_default_open_api"])
488
- unless validator.valid?(status)
489
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
490
- end
491
- @status = status
492
- end
493
-
494
- # Checks equality by comparing each attribute.
495
- # @param [Object] Object to be compared
496
- def ==(o)
497
- return true if self.equal?(o)
498
- self.class == o.class &&
499
- accepted_recipient_count == o.accepted_recipient_count &&
500
- attempts == o.attempts &&
501
- created_at == o.created_at &&
502
- delivery_group == o.delivery_group &&
503
- from_email == o.from_email &&
504
- id == o.id &&
505
- message_id == o.message_id &&
506
- provider_id == o.provider_id &&
507
- provider_name == o.provider_name &&
508
- recipient_count == o.recipient_count &&
509
- recipients == o.recipients &&
510
- rejected_recipient_count == o.rejected_recipient_count &&
511
- sent_at == o.sent_at &&
512
- sent_from_email == o.sent_from_email &&
513
- size_bytes == o.size_bytes &&
514
- status == o.status &&
515
- status_reason == o.status_reason &&
516
- subject == o.subject &&
517
- to_email == o.to_email
518
- end
519
-
520
- # @see the `==` method
521
- # @param [Object] Object to be compared
522
- def eql?(o)
523
- self == o
524
- end
525
-
526
- # Calculates hash code according to all attributes.
527
- # @return [Integer] Hash code
528
- def 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
530
- end
531
-
532
- # Builds the object from hash
533
- # @param [Hash] attributes Model attributes in the form of hash
534
- # @return [Object] Returns the model itself
535
- def self.build_from_hash(attributes)
536
- return nil unless attributes.is_a?(Hash)
537
- attributes = attributes.transform_keys(&:to_sym)
538
- transformed_hash = {}
539
- openapi_types.each_pair do |key, type|
540
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
541
- transformed_hash["#{key}"] = nil
542
- elsif type =~ /\AArray<(.*)>/i
543
- # check to ensure the input is an array given that the attribute
544
- # is documented as an array but the input is not
545
- if attributes[attribute_map[key]].is_a?(Array)
546
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
547
- end
548
- elsif !attributes[attribute_map[key]].nil?
549
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
550
- end
551
- end
552
- new(transformed_hash)
553
- end
554
-
555
- # Returns the object in the form of hash
556
- # @return [Hash] Returns the object in the form of hash
557
- def to_hash
558
- hash = {}
559
- self.class.attribute_map.each_pair do |attr, param|
560
- value = self.send(attr)
561
- if value.nil?
562
- is_nullable = self.class.openapi_nullable.include?(attr)
563
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
564
- end
565
-
566
- hash[param] = _to_hash(value)
567
- end
568
- hash
569
- end
570
-
571
- end
572
-
573
- end