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,380 @@
|
|
|
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 WebhookSubscription < ApiModelBase
|
|
18
|
+
# ISO 8601 creation timestamp
|
|
19
|
+
attr_accessor :created_at
|
|
20
|
+
|
|
21
|
+
# When false, no events are delivered to this subscription.
|
|
22
|
+
attr_accessor :enabled
|
|
23
|
+
|
|
24
|
+
# Event types this subscription receives.
|
|
25
|
+
attr_accessor :event_types
|
|
26
|
+
|
|
27
|
+
# True when the 24-hour retry window has been exhausted for this subscription. Reset by updating the subscription (e.g. fixing the URL) and re-enabling.
|
|
28
|
+
attr_accessor :failing
|
|
29
|
+
|
|
30
|
+
attr_accessor :filters
|
|
31
|
+
|
|
32
|
+
# Webhook public ID
|
|
33
|
+
attr_accessor :id
|
|
34
|
+
|
|
35
|
+
# Optional human-friendly label used in dashboard list/detail pages. May be `null` for subscriptions created without a name.
|
|
36
|
+
attr_accessor :name
|
|
37
|
+
|
|
38
|
+
# ISO 8601 last-modified timestamp
|
|
39
|
+
attr_accessor :updated_at
|
|
40
|
+
|
|
41
|
+
# HTTPS endpoint that receives signed event POSTs.
|
|
42
|
+
attr_accessor :url
|
|
43
|
+
|
|
44
|
+
class EnumAttributeValidator
|
|
45
|
+
attr_reader :datatype
|
|
46
|
+
attr_reader :allowable_values
|
|
47
|
+
|
|
48
|
+
def initialize(datatype, allowable_values)
|
|
49
|
+
@allowable_values = allowable_values.map do |value|
|
|
50
|
+
case datatype.to_s
|
|
51
|
+
when /Integer/i
|
|
52
|
+
value.to_i
|
|
53
|
+
when /Float/i
|
|
54
|
+
value.to_f
|
|
55
|
+
else
|
|
56
|
+
value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def valid?(value)
|
|
62
|
+
!value || allowable_values.include?(value)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
67
|
+
def self.attribute_map
|
|
68
|
+
{
|
|
69
|
+
:'created_at' => :'created_at',
|
|
70
|
+
:'enabled' => :'enabled',
|
|
71
|
+
:'event_types' => :'event_types',
|
|
72
|
+
:'failing' => :'failing',
|
|
73
|
+
:'filters' => :'filters',
|
|
74
|
+
:'id' => :'id',
|
|
75
|
+
:'name' => :'name',
|
|
76
|
+
:'updated_at' => :'updated_at',
|
|
77
|
+
:'url' => :'url'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Returns attribute mapping this model knows about
|
|
82
|
+
def self.acceptable_attribute_map
|
|
83
|
+
attribute_map
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Returns all the JSON keys this model knows about
|
|
87
|
+
def self.acceptable_attributes
|
|
88
|
+
acceptable_attribute_map.values
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Attribute type mapping.
|
|
92
|
+
def self.openapi_types
|
|
93
|
+
{
|
|
94
|
+
:'created_at' => :'String',
|
|
95
|
+
:'enabled' => :'Boolean',
|
|
96
|
+
:'event_types' => :'Array<String>',
|
|
97
|
+
:'failing' => :'Boolean',
|
|
98
|
+
:'filters' => :'WebhookFilters',
|
|
99
|
+
:'id' => :'String',
|
|
100
|
+
:'name' => :'String',
|
|
101
|
+
:'updated_at' => :'String',
|
|
102
|
+
:'url' => :'String'
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# List of attributes with nullable: true
|
|
107
|
+
def self.openapi_nullable
|
|
108
|
+
Set.new([
|
|
109
|
+
:'name',
|
|
110
|
+
])
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Initializes the object
|
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
115
|
+
def initialize(attributes = {})
|
|
116
|
+
if (!attributes.is_a?(Hash))
|
|
117
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::WebhookSubscription` initialize method"
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
121
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
122
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
123
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
124
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::WebhookSubscription`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
125
|
+
end
|
|
126
|
+
h[k.to_sym] = v
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'created_at')
|
|
130
|
+
self.created_at = attributes[:'created_at']
|
|
131
|
+
else
|
|
132
|
+
self.created_at = nil
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'enabled')
|
|
136
|
+
self.enabled = attributes[:'enabled']
|
|
137
|
+
else
|
|
138
|
+
self.enabled = nil
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'event_types')
|
|
142
|
+
if (value = attributes[:'event_types']).is_a?(Array)
|
|
143
|
+
self.event_types = value
|
|
144
|
+
end
|
|
145
|
+
else
|
|
146
|
+
self.event_types = nil
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'failing')
|
|
150
|
+
self.failing = attributes[:'failing']
|
|
151
|
+
else
|
|
152
|
+
self.failing = nil
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'filters')
|
|
156
|
+
self.filters = attributes[:'filters']
|
|
157
|
+
else
|
|
158
|
+
self.filters = nil
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'id')
|
|
162
|
+
self.id = attributes[:'id']
|
|
163
|
+
else
|
|
164
|
+
self.id = nil
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'name')
|
|
168
|
+
self.name = attributes[:'name']
|
|
169
|
+
else
|
|
170
|
+
self.name = nil
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'updated_at')
|
|
174
|
+
self.updated_at = attributes[:'updated_at']
|
|
175
|
+
else
|
|
176
|
+
self.updated_at = nil
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'url')
|
|
180
|
+
self.url = attributes[:'url']
|
|
181
|
+
else
|
|
182
|
+
self.url = nil
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
187
|
+
# @return Array for valid properties with the reasons
|
|
188
|
+
def list_invalid_properties
|
|
189
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
190
|
+
invalid_properties = Array.new
|
|
191
|
+
if @created_at.nil?
|
|
192
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if @enabled.nil?
|
|
196
|
+
invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if @event_types.nil?
|
|
200
|
+
invalid_properties.push('invalid value for "event_types", event_types cannot be nil.')
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if @failing.nil?
|
|
204
|
+
invalid_properties.push('invalid value for "failing", failing cannot be nil.')
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if @filters.nil?
|
|
208
|
+
invalid_properties.push('invalid value for "filters", filters cannot be nil.')
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if @id.nil?
|
|
212
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if @updated_at.nil?
|
|
216
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if @url.nil?
|
|
220
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
invalid_properties
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Check to see if the all the properties in the model are valid
|
|
227
|
+
# @return true if the model is valid
|
|
228
|
+
def valid?
|
|
229
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
230
|
+
return false if @created_at.nil?
|
|
231
|
+
return false if @enabled.nil?
|
|
232
|
+
return false if @event_types.nil?
|
|
233
|
+
return false if @failing.nil?
|
|
234
|
+
return false if @filters.nil?
|
|
235
|
+
return false if @id.nil?
|
|
236
|
+
return false if @updated_at.nil?
|
|
237
|
+
return false if @url.nil?
|
|
238
|
+
true
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Custom attribute writer method with validation
|
|
242
|
+
# @param [Object] created_at Value to be assigned
|
|
243
|
+
def created_at=(created_at)
|
|
244
|
+
if created_at.nil?
|
|
245
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
@created_at = created_at
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Custom attribute writer method with validation
|
|
252
|
+
# @param [Object] enabled Value to be assigned
|
|
253
|
+
def enabled=(enabled)
|
|
254
|
+
if enabled.nil?
|
|
255
|
+
fail ArgumentError, 'enabled cannot be nil'
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
@enabled = enabled
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Custom attribute writer method with validation
|
|
262
|
+
# @param [Object] failing Value to be assigned
|
|
263
|
+
def failing=(failing)
|
|
264
|
+
if failing.nil?
|
|
265
|
+
fail ArgumentError, 'failing cannot be nil'
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
@failing = failing
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Custom attribute writer method with validation
|
|
272
|
+
# @param [Object] filters Value to be assigned
|
|
273
|
+
def filters=(filters)
|
|
274
|
+
if filters.nil?
|
|
275
|
+
fail ArgumentError, 'filters cannot be nil'
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
@filters = filters
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Custom attribute writer method with validation
|
|
282
|
+
# @param [Object] id Value to be assigned
|
|
283
|
+
def id=(id)
|
|
284
|
+
if id.nil?
|
|
285
|
+
fail ArgumentError, 'id cannot be nil'
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
@id = id
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Custom attribute writer method with validation
|
|
292
|
+
# @param [Object] updated_at Value to be assigned
|
|
293
|
+
def updated_at=(updated_at)
|
|
294
|
+
if updated_at.nil?
|
|
295
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
@updated_at = updated_at
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Custom attribute writer method with validation
|
|
302
|
+
# @param [Object] url Value to be assigned
|
|
303
|
+
def url=(url)
|
|
304
|
+
if url.nil?
|
|
305
|
+
fail ArgumentError, 'url cannot be nil'
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
@url = url
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Checks equality by comparing each attribute.
|
|
312
|
+
# @param [Object] Object to be compared
|
|
313
|
+
def ==(o)
|
|
314
|
+
return true if self.equal?(o)
|
|
315
|
+
self.class == o.class &&
|
|
316
|
+
created_at == o.created_at &&
|
|
317
|
+
enabled == o.enabled &&
|
|
318
|
+
event_types == o.event_types &&
|
|
319
|
+
failing == o.failing &&
|
|
320
|
+
filters == o.filters &&
|
|
321
|
+
id == o.id &&
|
|
322
|
+
name == o.name &&
|
|
323
|
+
updated_at == o.updated_at &&
|
|
324
|
+
url == o.url
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# @see the `==` method
|
|
328
|
+
# @param [Object] Object to be compared
|
|
329
|
+
def eql?(o)
|
|
330
|
+
self == o
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Calculates hash code according to all attributes.
|
|
334
|
+
# @return [Integer] Hash code
|
|
335
|
+
def hash
|
|
336
|
+
[created_at, enabled, event_types, failing, filters, id, name, updated_at, url].hash
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Builds the object from hash
|
|
340
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
341
|
+
# @return [Object] Returns the model itself
|
|
342
|
+
def self.build_from_hash(attributes)
|
|
343
|
+
return nil unless attributes.is_a?(Hash)
|
|
344
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
345
|
+
transformed_hash = {}
|
|
346
|
+
openapi_types.each_pair do |key, type|
|
|
347
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
348
|
+
transformed_hash["#{key}"] = nil
|
|
349
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
350
|
+
# check to ensure the input is an array given that the attribute
|
|
351
|
+
# is documented as an array but the input is not
|
|
352
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
353
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
354
|
+
end
|
|
355
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
356
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
new(transformed_hash)
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Returns the object in the form of hash
|
|
363
|
+
# @return [Hash] Returns the object in the form of hash
|
|
364
|
+
def to_hash
|
|
365
|
+
hash = {}
|
|
366
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
367
|
+
value = self.send(attr)
|
|
368
|
+
if value.nil?
|
|
369
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
370
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
hash[param] = _to_hash(value)
|
|
374
|
+
end
|
|
375
|
+
hash
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
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 WebhookSubscriptionCursorListResponse < 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<WebhookSubscription>',
|
|
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::WebhookSubscriptionCursorListResponse` 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::WebhookSubscriptionCursorListResponse`. 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
|