sendmux-management 1.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 +7 -0
- data/CHANGELOG.md +12 -0
- data/README.md +3 -0
- data/lib/sendmux/management/client.rb +66 -0
- data/lib/sendmux/management/version.rb +7 -0
- data/lib/sendmux/management.rb +12 -0
- data/lib/sendmux_management_generated/api/billing_api.rb +221 -0
- data/lib/sendmux_management_generated/api/domain_filters_api.rb +161 -0
- data/lib/sendmux_management_generated/api/domains_api.rb +419 -0
- data/lib/sendmux_management_generated/api/emails_api.rb +258 -0
- data/lib/sendmux_management_generated/api/inboxes_api.rb +175 -0
- data/lib/sendmux_management_generated/api/mailbox_filters_api.rb +161 -0
- data/lib/sendmux_management_generated/api/mailboxes_api.rb +659 -0
- data/lib/sendmux_management_generated/api/sending_accounts_api.rb +946 -0
- data/lib/sendmux_management_generated/api/webhooks_api.rb +666 -0
- data/lib/sendmux_management_generated/api_client.rb +441 -0
- data/lib/sendmux_management_generated/api_error.rb +58 -0
- data/lib/sendmux_management_generated/api_model_base.rb +88 -0
- data/lib/sendmux_management_generated/configuration.rb +393 -0
- data/lib/sendmux_management_generated/models/api_error_detail.rb +219 -0
- data/lib/sendmux_management_generated/models/api_error_error.rb +275 -0
- data/lib/sendmux_management_generated/models/api_error_meta.rb +164 -0
- data/lib/sendmux_management_generated/models/api_error_response.rb +216 -0
- data/lib/sendmux_management_generated/models/balance.rb +293 -0
- data/lib/sendmux_management_generated/models/balance_auto_topup.rb +226 -0
- data/lib/sendmux_management_generated/models/balance_response.rb +223 -0
- data/lib/sendmux_management_generated/models/cursor_pagination.rb +173 -0
- data/lib/sendmux_management_generated/models/delivery_log_item.rb +393 -0
- data/lib/sendmux_management_generated/models/delivery_log_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/delivery_log_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/domain_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/domain_deleted_response_all_of_data.rb +190 -0
- data/lib/sendmux_management_generated/models/domain_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/domain_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/domain_verify_response.rb +223 -0
- data/lib/sendmux_management_generated/models/email_metrics.rb +218 -0
- data/lib/sendmux_management_generated/models/email_metrics_comparison.rb +294 -0
- data/lib/sendmux_management_generated/models/email_metrics_comparison_change_pct.rb +268 -0
- data/lib/sendmux_management_generated/models/email_metrics_response.rb +223 -0
- data/lib/sendmux_management_generated/models/email_metrics_summary.rb +268 -0
- data/lib/sendmux_management_generated/models/email_metrics_timeseries_inner.rb +294 -0
- data/lib/sendmux_management_generated/models/filter_rule.rb +242 -0
- data/lib/sendmux_management_generated/models/filter_state.rb +218 -0
- data/lib/sendmux_management_generated/models/filter_state_response.rb +223 -0
- data/lib/sendmux_management_generated/models/incoming_log_item.rb +465 -0
- data/lib/sendmux_management_generated/models/incoming_log_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/incoming_log_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox.rb +284 -0
- data/lib/sendmux_management_generated/models/mailbox_app_password_result.rb +164 -0
- data/lib/sendmux_management_generated/models/mailbox_app_password_result_credential.rb +359 -0
- data/lib/sendmux_management_generated/models/mailbox_app_password_result_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_create_result.rb +189 -0
- data/lib/sendmux_management_generated/models/mailbox_create_result_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_credential.rb +353 -0
- data/lib/sendmux_management_generated/models/mailbox_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_domain.rb +358 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +276 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_mx_record.rb +190 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +191 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +246 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +242 -0
- data/lib/sendmux_management_generated/models/mailbox_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/mailbox_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_key_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_send_scope.rb +213 -0
- data/lib/sendmux_management_generated/models/management_create_domain_request.rb +165 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +182 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +257 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +210 -0
- data/lib/sendmux_management_generated/models/management_test_webhook200_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +268 -0
- data/lib/sendmux_management_generated/models/provider_create_body.rb +579 -0
- data/lib/sendmux_management_generated/models/provider_create_body_quotas.rb +174 -0
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +104 -0
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day_any_of.rb +215 -0
- data/lib/sendmux_management_generated/models/provider_deleted.rb +190 -0
- data/lib/sendmux_management_generated/models/provider_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_item.rb +695 -0
- data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/provider_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_limits.rb +190 -0
- data/lib/sendmux_management_generated/models/provider_limits_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_quota_range.rb +208 -0
- data/lib/sendmux_management_generated/models/provider_quotas.rb +186 -0
- data/lib/sendmux_management_generated/models/provider_stats.rb +325 -0
- data/lib/sendmux_management_generated/models/provider_stats_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_status_counts.rb +242 -0
- data/lib/sendmux_management_generated/models/provider_test_result.rb +251 -0
- data/lib/sendmux_management_generated/models/provider_test_result_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_type_counts.rb +246 -0
- data/lib/sendmux_management_generated/models/provider_update_body.rb +537 -0
- data/lib/sendmux_management_generated/models/provider_usage.rb +216 -0
- data/lib/sendmux_management_generated/models/provider_usage_item.rb +374 -0
- data/lib/sendmux_management_generated/models/provider_usage_response.rb +223 -0
- data/lib/sendmux_management_generated/models/resource_limit_snapshot.rb +420 -0
- data/lib/sendmux_management_generated/models/response_meta.rb +164 -0
- data/lib/sendmux_management_generated/models/sending_account_limit_request.rb +190 -0
- data/lib/sendmux_management_generated/models/sending_account_limit_request_response.rb +223 -0
- data/lib/sendmux_management_generated/models/set_filter_state_body.rb +226 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +315 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +361 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +190 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_request.rb +368 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +223 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page.rb +176 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +223 -0
- data/lib/sendmux_management_generated/models/spend_summary.rb +292 -0
- data/lib/sendmux_management_generated/models/spend_summary_response.rb +223 -0
- data/lib/sendmux_management_generated/models/success_envelope.rb +192 -0
- data/lib/sendmux_management_generated/models/transaction.rb +332 -0
- data/lib/sendmux_management_generated/models/transaction_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/update_mailbox_body.rb +210 -0
- data/lib/sendmux_management_generated/models/webhook_create_body.rb +269 -0
- data/lib/sendmux_management_generated/models/webhook_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_attempt.rb +562 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_payload.rb +359 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_payload_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_event_data.rb +395 -0
- data/lib/sendmux_management_generated/models/webhook_event_payload.rb +297 -0
- data/lib/sendmux_management_generated/models/webhook_filters.rb +168 -0
- data/lib/sendmux_management_generated/models/webhook_subscription.rb +380 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +414 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_with_secret_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_test_response.rb +165 -0
- data/lib/sendmux_management_generated/models/webhook_update_body.rb +233 -0
- data/lib/sendmux_management_generated/version.rb +15 -0
- data/lib/sendmux_management_generated.rb +158 -0
- metadata +247 -0
|
@@ -0,0 +1,393 @@
|
|
|
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 DeliveryLogItem < ApiModelBase
|
|
18
|
+
attr_accessor :attempts
|
|
19
|
+
|
|
20
|
+
# ISO 8601 creation timestamp
|
|
21
|
+
attr_accessor :created_at
|
|
22
|
+
|
|
23
|
+
attr_accessor :from_email
|
|
24
|
+
|
|
25
|
+
# Log public ID
|
|
26
|
+
attr_accessor :id
|
|
27
|
+
|
|
28
|
+
# Email Message-ID header
|
|
29
|
+
attr_accessor :message_id
|
|
30
|
+
|
|
31
|
+
# Provider public ID
|
|
32
|
+
attr_accessor :provider_id
|
|
33
|
+
|
|
34
|
+
# Provider display name
|
|
35
|
+
attr_accessor :provider_name
|
|
36
|
+
|
|
37
|
+
# ISO 8601 timestamp when email was sent
|
|
38
|
+
attr_accessor :sent_at
|
|
39
|
+
|
|
40
|
+
# The actual from address used for delivery after transformation. NULL if no transformation occurred or for older log entries.
|
|
41
|
+
attr_accessor :sent_from_email
|
|
42
|
+
|
|
43
|
+
attr_accessor :size_bytes
|
|
44
|
+
|
|
45
|
+
attr_accessor :status
|
|
46
|
+
|
|
47
|
+
attr_accessor :status_reason
|
|
48
|
+
|
|
49
|
+
attr_accessor :subject
|
|
50
|
+
|
|
51
|
+
attr_accessor :to_email
|
|
52
|
+
|
|
53
|
+
class EnumAttributeValidator
|
|
54
|
+
attr_reader :datatype
|
|
55
|
+
attr_reader :allowable_values
|
|
56
|
+
|
|
57
|
+
def initialize(datatype, allowable_values)
|
|
58
|
+
@allowable_values = allowable_values.map do |value|
|
|
59
|
+
case datatype.to_s
|
|
60
|
+
when /Integer/i
|
|
61
|
+
value.to_i
|
|
62
|
+
when /Float/i
|
|
63
|
+
value.to_f
|
|
64
|
+
else
|
|
65
|
+
value
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def valid?(value)
|
|
71
|
+
!value || allowable_values.include?(value)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
76
|
+
def self.attribute_map
|
|
77
|
+
{
|
|
78
|
+
:'attempts' => :'attempts',
|
|
79
|
+
:'created_at' => :'created_at',
|
|
80
|
+
:'from_email' => :'from_email',
|
|
81
|
+
:'id' => :'id',
|
|
82
|
+
:'message_id' => :'message_id',
|
|
83
|
+
:'provider_id' => :'provider_id',
|
|
84
|
+
:'provider_name' => :'provider_name',
|
|
85
|
+
:'sent_at' => :'sent_at',
|
|
86
|
+
:'sent_from_email' => :'sent_from_email',
|
|
87
|
+
:'size_bytes' => :'size_bytes',
|
|
88
|
+
:'status' => :'status',
|
|
89
|
+
:'status_reason' => :'status_reason',
|
|
90
|
+
:'subject' => :'subject',
|
|
91
|
+
:'to_email' => :'to_email'
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Returns attribute mapping this model knows about
|
|
96
|
+
def self.acceptable_attribute_map
|
|
97
|
+
attribute_map
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Returns all the JSON keys this model knows about
|
|
101
|
+
def self.acceptable_attributes
|
|
102
|
+
acceptable_attribute_map.values
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Attribute type mapping.
|
|
106
|
+
def self.openapi_types
|
|
107
|
+
{
|
|
108
|
+
:'attempts' => :'Float',
|
|
109
|
+
:'created_at' => :'String',
|
|
110
|
+
:'from_email' => :'String',
|
|
111
|
+
:'id' => :'String',
|
|
112
|
+
:'message_id' => :'String',
|
|
113
|
+
:'provider_id' => :'String',
|
|
114
|
+
:'provider_name' => :'String',
|
|
115
|
+
:'sent_at' => :'String',
|
|
116
|
+
:'sent_from_email' => :'String',
|
|
117
|
+
:'size_bytes' => :'Float',
|
|
118
|
+
:'status' => :'String',
|
|
119
|
+
:'status_reason' => :'String',
|
|
120
|
+
:'subject' => :'String',
|
|
121
|
+
:'to_email' => :'String'
|
|
122
|
+
}
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# List of attributes with nullable: true
|
|
126
|
+
def self.openapi_nullable
|
|
127
|
+
Set.new([
|
|
128
|
+
:'from_email',
|
|
129
|
+
:'message_id',
|
|
130
|
+
:'provider_id',
|
|
131
|
+
:'provider_name',
|
|
132
|
+
:'sent_at',
|
|
133
|
+
:'sent_from_email',
|
|
134
|
+
:'size_bytes',
|
|
135
|
+
:'status_reason',
|
|
136
|
+
:'subject',
|
|
137
|
+
:'to_email'
|
|
138
|
+
])
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Initializes the object
|
|
142
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
143
|
+
def initialize(attributes = {})
|
|
144
|
+
if (!attributes.is_a?(Hash))
|
|
145
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::DeliveryLogItem` initialize method"
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
149
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
150
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
151
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
152
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::DeliveryLogItem`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
153
|
+
end
|
|
154
|
+
h[k.to_sym] = v
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'attempts')
|
|
158
|
+
self.attempts = attributes[:'attempts']
|
|
159
|
+
else
|
|
160
|
+
self.attempts = nil
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'created_at')
|
|
164
|
+
self.created_at = attributes[:'created_at']
|
|
165
|
+
else
|
|
166
|
+
self.created_at = nil
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'from_email')
|
|
170
|
+
self.from_email = attributes[:'from_email']
|
|
171
|
+
else
|
|
172
|
+
self.from_email = nil
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'id')
|
|
176
|
+
self.id = attributes[:'id']
|
|
177
|
+
else
|
|
178
|
+
self.id = nil
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'message_id')
|
|
182
|
+
self.message_id = attributes[:'message_id']
|
|
183
|
+
else
|
|
184
|
+
self.message_id = nil
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'provider_id')
|
|
188
|
+
self.provider_id = attributes[:'provider_id']
|
|
189
|
+
else
|
|
190
|
+
self.provider_id = nil
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if attributes.key?(:'provider_name')
|
|
194
|
+
self.provider_name = attributes[:'provider_name']
|
|
195
|
+
else
|
|
196
|
+
self.provider_name = nil
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'sent_at')
|
|
200
|
+
self.sent_at = attributes[:'sent_at']
|
|
201
|
+
else
|
|
202
|
+
self.sent_at = nil
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'sent_from_email')
|
|
206
|
+
self.sent_from_email = attributes[:'sent_from_email']
|
|
207
|
+
else
|
|
208
|
+
self.sent_from_email = nil
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'size_bytes')
|
|
212
|
+
self.size_bytes = attributes[:'size_bytes']
|
|
213
|
+
else
|
|
214
|
+
self.size_bytes = nil
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if attributes.key?(:'status')
|
|
218
|
+
self.status = attributes[:'status']
|
|
219
|
+
else
|
|
220
|
+
self.status = nil
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'status_reason')
|
|
224
|
+
self.status_reason = attributes[:'status_reason']
|
|
225
|
+
else
|
|
226
|
+
self.status_reason = nil
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if attributes.key?(:'subject')
|
|
230
|
+
self.subject = attributes[:'subject']
|
|
231
|
+
else
|
|
232
|
+
self.subject = nil
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'to_email')
|
|
236
|
+
self.to_email = attributes[:'to_email']
|
|
237
|
+
else
|
|
238
|
+
self.to_email = nil
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
243
|
+
# @return Array for valid properties with the reasons
|
|
244
|
+
def list_invalid_properties
|
|
245
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
246
|
+
invalid_properties = Array.new
|
|
247
|
+
if @attempts.nil?
|
|
248
|
+
invalid_properties.push('invalid value for "attempts", attempts cannot be nil.')
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if @created_at.nil?
|
|
252
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if @id.nil?
|
|
256
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if @status.nil?
|
|
260
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
invalid_properties
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Check to see if the all the properties in the model are valid
|
|
267
|
+
# @return true if the model is valid
|
|
268
|
+
def valid?
|
|
269
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
270
|
+
return false if @attempts.nil?
|
|
271
|
+
return false if @created_at.nil?
|
|
272
|
+
return false if @id.nil?
|
|
273
|
+
return false if @status.nil?
|
|
274
|
+
status_validator = EnumAttributeValidator.new('String', ["pending", "sent", "failed", "rejected", "unknown_default_open_api"])
|
|
275
|
+
return false unless status_validator.valid?(@status)
|
|
276
|
+
true
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Custom attribute writer method with validation
|
|
280
|
+
# @param [Object] attempts Value to be assigned
|
|
281
|
+
def attempts=(attempts)
|
|
282
|
+
if attempts.nil?
|
|
283
|
+
fail ArgumentError, 'attempts cannot be nil'
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
@attempts = attempts
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# Custom attribute writer method with validation
|
|
290
|
+
# @param [Object] created_at Value to be assigned
|
|
291
|
+
def created_at=(created_at)
|
|
292
|
+
if created_at.nil?
|
|
293
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
@created_at = created_at
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Custom attribute writer method with validation
|
|
300
|
+
# @param [Object] id Value to be assigned
|
|
301
|
+
def id=(id)
|
|
302
|
+
if id.nil?
|
|
303
|
+
fail ArgumentError, 'id cannot be nil'
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
@id = id
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
310
|
+
# @param [Object] status Object to be assigned
|
|
311
|
+
def status=(status)
|
|
312
|
+
validator = EnumAttributeValidator.new('String', ["pending", "sent", "failed", "rejected", "unknown_default_open_api"])
|
|
313
|
+
unless validator.valid?(status)
|
|
314
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
315
|
+
end
|
|
316
|
+
@status = status
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Checks equality by comparing each attribute.
|
|
320
|
+
# @param [Object] Object to be compared
|
|
321
|
+
def ==(o)
|
|
322
|
+
return true if self.equal?(o)
|
|
323
|
+
self.class == o.class &&
|
|
324
|
+
attempts == o.attempts &&
|
|
325
|
+
created_at == o.created_at &&
|
|
326
|
+
from_email == o.from_email &&
|
|
327
|
+
id == o.id &&
|
|
328
|
+
message_id == o.message_id &&
|
|
329
|
+
provider_id == o.provider_id &&
|
|
330
|
+
provider_name == o.provider_name &&
|
|
331
|
+
sent_at == o.sent_at &&
|
|
332
|
+
sent_from_email == o.sent_from_email &&
|
|
333
|
+
size_bytes == o.size_bytes &&
|
|
334
|
+
status == o.status &&
|
|
335
|
+
status_reason == o.status_reason &&
|
|
336
|
+
subject == o.subject &&
|
|
337
|
+
to_email == o.to_email
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# @see the `==` method
|
|
341
|
+
# @param [Object] Object to be compared
|
|
342
|
+
def eql?(o)
|
|
343
|
+
self == o
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Calculates hash code according to all attributes.
|
|
347
|
+
# @return [Integer] Hash code
|
|
348
|
+
def hash
|
|
349
|
+
[attempts, created_at, from_email, id, message_id, provider_id, provider_name, sent_at, sent_from_email, size_bytes, status, status_reason, subject, to_email].hash
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# Builds the object from hash
|
|
353
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
354
|
+
# @return [Object] Returns the model itself
|
|
355
|
+
def self.build_from_hash(attributes)
|
|
356
|
+
return nil unless attributes.is_a?(Hash)
|
|
357
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
358
|
+
transformed_hash = {}
|
|
359
|
+
openapi_types.each_pair do |key, type|
|
|
360
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
361
|
+
transformed_hash["#{key}"] = nil
|
|
362
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
363
|
+
# check to ensure the input is an array given that the attribute
|
|
364
|
+
# is documented as an array but the input is not
|
|
365
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
366
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
367
|
+
end
|
|
368
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
369
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
new(transformed_hash)
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Returns the object in the form of hash
|
|
376
|
+
# @return [Hash] Returns the object in the form of hash
|
|
377
|
+
def to_hash
|
|
378
|
+
hash = {}
|
|
379
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
380
|
+
value = self.send(attr)
|
|
381
|
+
if value.nil?
|
|
382
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
383
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
hash[param] = _to_hash(value)
|
|
387
|
+
end
|
|
388
|
+
hash
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
end
|
|
@@ -0,0 +1,251 @@
|
|
|
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 DeliveryLogItemCursorListResponse < ApiModelBase
|
|
18
|
+
attr_accessor :meta
|
|
19
|
+
|
|
20
|
+
attr_accessor :ok
|
|
21
|
+
|
|
22
|
+
attr_accessor :data
|
|
23
|
+
|
|
24
|
+
attr_accessor :pagination
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'meta' => :'meta',
|
|
30
|
+
:'ok' => :'ok',
|
|
31
|
+
:'data' => :'data',
|
|
32
|
+
:'pagination' => :'pagination'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'meta' => :'ResponseMeta',
|
|
50
|
+
:'ok' => :'Boolean',
|
|
51
|
+
:'data' => :'Array<DeliveryLogItem>',
|
|
52
|
+
:'pagination' => :'CursorPagination'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
63
|
+
def self.openapi_all_of
|
|
64
|
+
[
|
|
65
|
+
:'SuccessEnvelope'
|
|
66
|
+
]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Initializes the object
|
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
71
|
+
def initialize(attributes = {})
|
|
72
|
+
if (!attributes.is_a?(Hash))
|
|
73
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::DeliveryLogItemCursorListResponse` initialize method"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
77
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
78
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
79
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::DeliveryLogItemCursorListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
81
|
+
end
|
|
82
|
+
h[k.to_sym] = v
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'meta')
|
|
86
|
+
self.meta = attributes[:'meta']
|
|
87
|
+
else
|
|
88
|
+
self.meta = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'ok')
|
|
92
|
+
self.ok = attributes[:'ok']
|
|
93
|
+
else
|
|
94
|
+
self.ok = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'data')
|
|
98
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
99
|
+
self.data = value
|
|
100
|
+
end
|
|
101
|
+
else
|
|
102
|
+
self.data = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'pagination')
|
|
106
|
+
self.pagination = attributes[:'pagination']
|
|
107
|
+
else
|
|
108
|
+
self.pagination = nil
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
113
|
+
# @return Array for valid properties with the reasons
|
|
114
|
+
def list_invalid_properties
|
|
115
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
116
|
+
invalid_properties = Array.new
|
|
117
|
+
if @meta.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @ok.nil?
|
|
122
|
+
invalid_properties.push('invalid value for "ok", ok cannot be nil.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if @data.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if @pagination.nil?
|
|
130
|
+
invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
invalid_properties
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Check to see if the all the properties in the model are valid
|
|
137
|
+
# @return true if the model is valid
|
|
138
|
+
def valid?
|
|
139
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
140
|
+
return false if @meta.nil?
|
|
141
|
+
return false if @ok.nil?
|
|
142
|
+
return false if @data.nil?
|
|
143
|
+
return false if @pagination.nil?
|
|
144
|
+
true
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Custom attribute writer method with validation
|
|
148
|
+
# @param [Object] meta Value to be assigned
|
|
149
|
+
def meta=(meta)
|
|
150
|
+
if meta.nil?
|
|
151
|
+
fail ArgumentError, 'meta cannot be nil'
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
@meta = meta
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Custom attribute writer method with validation
|
|
158
|
+
# @param [Object] ok Value to be assigned
|
|
159
|
+
def ok=(ok)
|
|
160
|
+
if ok.nil?
|
|
161
|
+
fail ArgumentError, 'ok cannot be nil'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@ok = ok
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Custom attribute writer method with validation
|
|
168
|
+
# @param [Object] data Value to be assigned
|
|
169
|
+
def data=(data)
|
|
170
|
+
if data.nil?
|
|
171
|
+
fail ArgumentError, 'data cannot be nil'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
@data = data
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Custom attribute writer method with validation
|
|
178
|
+
# @param [Object] pagination Value to be assigned
|
|
179
|
+
def pagination=(pagination)
|
|
180
|
+
if pagination.nil?
|
|
181
|
+
fail ArgumentError, 'pagination cannot be nil'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@pagination = pagination
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Checks equality by comparing each attribute.
|
|
188
|
+
# @param [Object] Object to be compared
|
|
189
|
+
def ==(o)
|
|
190
|
+
return true if self.equal?(o)
|
|
191
|
+
self.class == o.class &&
|
|
192
|
+
meta == o.meta &&
|
|
193
|
+
ok == o.ok &&
|
|
194
|
+
data == o.data &&
|
|
195
|
+
pagination == o.pagination
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# @see the `==` method
|
|
199
|
+
# @param [Object] Object to be compared
|
|
200
|
+
def eql?(o)
|
|
201
|
+
self == o
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Calculates hash code according to all attributes.
|
|
205
|
+
# @return [Integer] Hash code
|
|
206
|
+
def hash
|
|
207
|
+
[meta, ok, data, pagination].hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Builds the object from hash
|
|
211
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
212
|
+
# @return [Object] Returns the model itself
|
|
213
|
+
def self.build_from_hash(attributes)
|
|
214
|
+
return nil unless attributes.is_a?(Hash)
|
|
215
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
216
|
+
transformed_hash = {}
|
|
217
|
+
openapi_types.each_pair do |key, type|
|
|
218
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
219
|
+
transformed_hash["#{key}"] = nil
|
|
220
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
221
|
+
# check to ensure the input is an array given that the attribute
|
|
222
|
+
# is documented as an array but the input is not
|
|
223
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
224
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
225
|
+
end
|
|
226
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
227
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
new(transformed_hash)
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Returns the object in the form of hash
|
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
|
235
|
+
def to_hash
|
|
236
|
+
hash = {}
|
|
237
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
238
|
+
value = self.send(attr)
|
|
239
|
+
if value.nil?
|
|
240
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
241
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
hash[param] = _to_hash(value)
|
|
245
|
+
end
|
|
246
|
+
hash
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
end
|