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,695 @@
|
|
|
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 ProviderItem < ApiModelBase
|
|
18
|
+
attr_accessor :allowed_actions
|
|
19
|
+
|
|
20
|
+
# ISO 8601 creation timestamp
|
|
21
|
+
attr_accessor :created_at
|
|
22
|
+
|
|
23
|
+
# Default From email address.
|
|
24
|
+
attr_accessor :from_email
|
|
25
|
+
|
|
26
|
+
# Default From display name.
|
|
27
|
+
attr_accessor :from_name
|
|
28
|
+
|
|
29
|
+
# Whether an OAuth account has an active connection token.
|
|
30
|
+
attr_accessor :has_refresh_token
|
|
31
|
+
|
|
32
|
+
# Whether a custom SMTP password is stored.
|
|
33
|
+
attr_accessor :has_smtp_password
|
|
34
|
+
|
|
35
|
+
# Sending account public ID
|
|
36
|
+
attr_accessor :id
|
|
37
|
+
|
|
38
|
+
# Whether this account is enabled for sending.
|
|
39
|
+
attr_accessor :is_active
|
|
40
|
+
|
|
41
|
+
# False when the account is platform-managed.
|
|
42
|
+
attr_accessor :is_editable
|
|
43
|
+
|
|
44
|
+
# True for the team's shared Amazon SES account.
|
|
45
|
+
attr_accessor :is_shared
|
|
46
|
+
|
|
47
|
+
# Last connection test timestamp.
|
|
48
|
+
attr_accessor :last_tested_at
|
|
49
|
+
|
|
50
|
+
# Last send timestamp.
|
|
51
|
+
attr_accessor :last_used_at
|
|
52
|
+
|
|
53
|
+
# Display name
|
|
54
|
+
attr_accessor :name
|
|
55
|
+
|
|
56
|
+
# Connected account email for OAuth accounts.
|
|
57
|
+
attr_accessor :oauth_email
|
|
58
|
+
|
|
59
|
+
# Routing weight percentage.
|
|
60
|
+
attr_accessor :percentage
|
|
61
|
+
|
|
62
|
+
attr_accessor :quotas
|
|
63
|
+
|
|
64
|
+
# Default Reply-To email address.
|
|
65
|
+
attr_accessor :reply_to_email
|
|
66
|
+
|
|
67
|
+
# Default Reply-To display name.
|
|
68
|
+
attr_accessor :reply_to_name
|
|
69
|
+
|
|
70
|
+
# SMTP host for custom SMTP accounts.
|
|
71
|
+
attr_accessor :smtp_host
|
|
72
|
+
|
|
73
|
+
# SMTP port for custom SMTP accounts.
|
|
74
|
+
attr_accessor :smtp_port
|
|
75
|
+
|
|
76
|
+
# SMTP security mode.
|
|
77
|
+
attr_accessor :smtp_protocol
|
|
78
|
+
|
|
79
|
+
# SMTP username for custom SMTP accounts.
|
|
80
|
+
attr_accessor :smtp_username
|
|
81
|
+
|
|
82
|
+
# Current sending account status.
|
|
83
|
+
attr_accessor :status
|
|
84
|
+
|
|
85
|
+
# Public-safe reason for the current status.
|
|
86
|
+
attr_accessor :status_reason
|
|
87
|
+
|
|
88
|
+
# Custom tracking hostname.
|
|
89
|
+
attr_accessor :tracking_domain
|
|
90
|
+
|
|
91
|
+
# Sending account type. `amazon_ses` is the shared managed account.
|
|
92
|
+
attr_accessor :type
|
|
93
|
+
|
|
94
|
+
# ISO 8601 last update timestamp
|
|
95
|
+
attr_accessor :updated_at
|
|
96
|
+
|
|
97
|
+
class EnumAttributeValidator
|
|
98
|
+
attr_reader :datatype
|
|
99
|
+
attr_reader :allowable_values
|
|
100
|
+
|
|
101
|
+
def initialize(datatype, allowable_values)
|
|
102
|
+
@allowable_values = allowable_values.map do |value|
|
|
103
|
+
case datatype.to_s
|
|
104
|
+
when /Integer/i
|
|
105
|
+
value.to_i
|
|
106
|
+
when /Float/i
|
|
107
|
+
value.to_f
|
|
108
|
+
else
|
|
109
|
+
value
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def valid?(value)
|
|
115
|
+
!value || allowable_values.include?(value)
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
120
|
+
def self.attribute_map
|
|
121
|
+
{
|
|
122
|
+
:'allowed_actions' => :'allowed_actions',
|
|
123
|
+
:'created_at' => :'created_at',
|
|
124
|
+
:'from_email' => :'from_email',
|
|
125
|
+
:'from_name' => :'from_name',
|
|
126
|
+
:'has_refresh_token' => :'has_refresh_token',
|
|
127
|
+
:'has_smtp_password' => :'has_smtp_password',
|
|
128
|
+
:'id' => :'id',
|
|
129
|
+
:'is_active' => :'is_active',
|
|
130
|
+
:'is_editable' => :'is_editable',
|
|
131
|
+
:'is_shared' => :'is_shared',
|
|
132
|
+
:'last_tested_at' => :'last_tested_at',
|
|
133
|
+
:'last_used_at' => :'last_used_at',
|
|
134
|
+
:'name' => :'name',
|
|
135
|
+
:'oauth_email' => :'oauth_email',
|
|
136
|
+
:'percentage' => :'percentage',
|
|
137
|
+
:'quotas' => :'quotas',
|
|
138
|
+
:'reply_to_email' => :'reply_to_email',
|
|
139
|
+
:'reply_to_name' => :'reply_to_name',
|
|
140
|
+
:'smtp_host' => :'smtp_host',
|
|
141
|
+
:'smtp_port' => :'smtp_port',
|
|
142
|
+
:'smtp_protocol' => :'smtp_protocol',
|
|
143
|
+
:'smtp_username' => :'smtp_username',
|
|
144
|
+
:'status' => :'status',
|
|
145
|
+
:'status_reason' => :'status_reason',
|
|
146
|
+
:'tracking_domain' => :'tracking_domain',
|
|
147
|
+
:'type' => :'type',
|
|
148
|
+
:'updated_at' => :'updated_at'
|
|
149
|
+
}
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Returns attribute mapping this model knows about
|
|
153
|
+
def self.acceptable_attribute_map
|
|
154
|
+
attribute_map
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Returns all the JSON keys this model knows about
|
|
158
|
+
def self.acceptable_attributes
|
|
159
|
+
acceptable_attribute_map.values
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Attribute type mapping.
|
|
163
|
+
def self.openapi_types
|
|
164
|
+
{
|
|
165
|
+
:'allowed_actions' => :'ProviderAllowedActions',
|
|
166
|
+
:'created_at' => :'String',
|
|
167
|
+
:'from_email' => :'String',
|
|
168
|
+
:'from_name' => :'String',
|
|
169
|
+
:'has_refresh_token' => :'Boolean',
|
|
170
|
+
:'has_smtp_password' => :'Boolean',
|
|
171
|
+
:'id' => :'String',
|
|
172
|
+
:'is_active' => :'Boolean',
|
|
173
|
+
:'is_editable' => :'Boolean',
|
|
174
|
+
:'is_shared' => :'Boolean',
|
|
175
|
+
:'last_tested_at' => :'String',
|
|
176
|
+
:'last_used_at' => :'String',
|
|
177
|
+
:'name' => :'String',
|
|
178
|
+
:'oauth_email' => :'String',
|
|
179
|
+
:'percentage' => :'Integer',
|
|
180
|
+
:'quotas' => :'ProviderQuotas',
|
|
181
|
+
:'reply_to_email' => :'String',
|
|
182
|
+
:'reply_to_name' => :'String',
|
|
183
|
+
:'smtp_host' => :'String',
|
|
184
|
+
:'smtp_port' => :'Integer',
|
|
185
|
+
:'smtp_protocol' => :'String',
|
|
186
|
+
:'smtp_username' => :'String',
|
|
187
|
+
:'status' => :'String',
|
|
188
|
+
:'status_reason' => :'String',
|
|
189
|
+
:'tracking_domain' => :'String',
|
|
190
|
+
:'type' => :'String',
|
|
191
|
+
:'updated_at' => :'String'
|
|
192
|
+
}
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# List of attributes with nullable: true
|
|
196
|
+
def self.openapi_nullable
|
|
197
|
+
Set.new([
|
|
198
|
+
:'from_email',
|
|
199
|
+
:'from_name',
|
|
200
|
+
:'last_tested_at',
|
|
201
|
+
:'last_used_at',
|
|
202
|
+
:'oauth_email',
|
|
203
|
+
:'percentage',
|
|
204
|
+
:'reply_to_email',
|
|
205
|
+
:'reply_to_name',
|
|
206
|
+
:'smtp_host',
|
|
207
|
+
:'smtp_port',
|
|
208
|
+
:'smtp_protocol',
|
|
209
|
+
:'smtp_username',
|
|
210
|
+
:'status_reason',
|
|
211
|
+
:'tracking_domain',
|
|
212
|
+
])
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Initializes the object
|
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
217
|
+
def initialize(attributes = {})
|
|
218
|
+
if (!attributes.is_a?(Hash))
|
|
219
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::ProviderItem` initialize method"
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
223
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
224
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
225
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
226
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::ProviderItem`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
227
|
+
end
|
|
228
|
+
h[k.to_sym] = v
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if attributes.key?(:'allowed_actions')
|
|
232
|
+
self.allowed_actions = attributes[:'allowed_actions']
|
|
233
|
+
else
|
|
234
|
+
self.allowed_actions = nil
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if attributes.key?(:'created_at')
|
|
238
|
+
self.created_at = attributes[:'created_at']
|
|
239
|
+
else
|
|
240
|
+
self.created_at = nil
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'from_email')
|
|
244
|
+
self.from_email = attributes[:'from_email']
|
|
245
|
+
else
|
|
246
|
+
self.from_email = nil
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
if attributes.key?(:'from_name')
|
|
250
|
+
self.from_name = attributes[:'from_name']
|
|
251
|
+
else
|
|
252
|
+
self.from_name = nil
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if attributes.key?(:'has_refresh_token')
|
|
256
|
+
self.has_refresh_token = attributes[:'has_refresh_token']
|
|
257
|
+
else
|
|
258
|
+
self.has_refresh_token = nil
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
if attributes.key?(:'has_smtp_password')
|
|
262
|
+
self.has_smtp_password = attributes[:'has_smtp_password']
|
|
263
|
+
else
|
|
264
|
+
self.has_smtp_password = nil
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if attributes.key?(:'id')
|
|
268
|
+
self.id = attributes[:'id']
|
|
269
|
+
else
|
|
270
|
+
self.id = nil
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
if attributes.key?(:'is_active')
|
|
274
|
+
self.is_active = attributes[:'is_active']
|
|
275
|
+
else
|
|
276
|
+
self.is_active = nil
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if attributes.key?(:'is_editable')
|
|
280
|
+
self.is_editable = attributes[:'is_editable']
|
|
281
|
+
else
|
|
282
|
+
self.is_editable = nil
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
if attributes.key?(:'is_shared')
|
|
286
|
+
self.is_shared = attributes[:'is_shared']
|
|
287
|
+
else
|
|
288
|
+
self.is_shared = nil
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
if attributes.key?(:'last_tested_at')
|
|
292
|
+
self.last_tested_at = attributes[:'last_tested_at']
|
|
293
|
+
else
|
|
294
|
+
self.last_tested_at = nil
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
if attributes.key?(:'last_used_at')
|
|
298
|
+
self.last_used_at = attributes[:'last_used_at']
|
|
299
|
+
else
|
|
300
|
+
self.last_used_at = nil
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
if attributes.key?(:'name')
|
|
304
|
+
self.name = attributes[:'name']
|
|
305
|
+
else
|
|
306
|
+
self.name = nil
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if attributes.key?(:'oauth_email')
|
|
310
|
+
self.oauth_email = attributes[:'oauth_email']
|
|
311
|
+
else
|
|
312
|
+
self.oauth_email = nil
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
if attributes.key?(:'percentage')
|
|
316
|
+
self.percentage = attributes[:'percentage']
|
|
317
|
+
else
|
|
318
|
+
self.percentage = nil
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
if attributes.key?(:'quotas')
|
|
322
|
+
self.quotas = attributes[:'quotas']
|
|
323
|
+
else
|
|
324
|
+
self.quotas = nil
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
if attributes.key?(:'reply_to_email')
|
|
328
|
+
self.reply_to_email = attributes[:'reply_to_email']
|
|
329
|
+
else
|
|
330
|
+
self.reply_to_email = nil
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
if attributes.key?(:'reply_to_name')
|
|
334
|
+
self.reply_to_name = attributes[:'reply_to_name']
|
|
335
|
+
else
|
|
336
|
+
self.reply_to_name = nil
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
if attributes.key?(:'smtp_host')
|
|
340
|
+
self.smtp_host = attributes[:'smtp_host']
|
|
341
|
+
else
|
|
342
|
+
self.smtp_host = nil
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
if attributes.key?(:'smtp_port')
|
|
346
|
+
self.smtp_port = attributes[:'smtp_port']
|
|
347
|
+
else
|
|
348
|
+
self.smtp_port = nil
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
if attributes.key?(:'smtp_protocol')
|
|
352
|
+
self.smtp_protocol = attributes[:'smtp_protocol']
|
|
353
|
+
else
|
|
354
|
+
self.smtp_protocol = nil
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
if attributes.key?(:'smtp_username')
|
|
358
|
+
self.smtp_username = attributes[:'smtp_username']
|
|
359
|
+
else
|
|
360
|
+
self.smtp_username = nil
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
if attributes.key?(:'status')
|
|
364
|
+
self.status = attributes[:'status']
|
|
365
|
+
else
|
|
366
|
+
self.status = nil
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
if attributes.key?(:'status_reason')
|
|
370
|
+
self.status_reason = attributes[:'status_reason']
|
|
371
|
+
else
|
|
372
|
+
self.status_reason = nil
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
if attributes.key?(:'tracking_domain')
|
|
376
|
+
self.tracking_domain = attributes[:'tracking_domain']
|
|
377
|
+
else
|
|
378
|
+
self.tracking_domain = nil
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
if attributes.key?(:'type')
|
|
382
|
+
self.type = attributes[:'type']
|
|
383
|
+
else
|
|
384
|
+
self.type = nil
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
if attributes.key?(:'updated_at')
|
|
388
|
+
self.updated_at = attributes[:'updated_at']
|
|
389
|
+
else
|
|
390
|
+
self.updated_at = nil
|
|
391
|
+
end
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
395
|
+
# @return Array for valid properties with the reasons
|
|
396
|
+
def list_invalid_properties
|
|
397
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
398
|
+
invalid_properties = Array.new
|
|
399
|
+
if @allowed_actions.nil?
|
|
400
|
+
invalid_properties.push('invalid value for "allowed_actions", allowed_actions cannot be nil.')
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
if @created_at.nil?
|
|
404
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
if @has_refresh_token.nil?
|
|
408
|
+
invalid_properties.push('invalid value for "has_refresh_token", has_refresh_token cannot be nil.')
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
if @has_smtp_password.nil?
|
|
412
|
+
invalid_properties.push('invalid value for "has_smtp_password", has_smtp_password cannot be nil.')
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
if @id.nil?
|
|
416
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
if @is_active.nil?
|
|
420
|
+
invalid_properties.push('invalid value for "is_active", is_active cannot be nil.')
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
if @is_editable.nil?
|
|
424
|
+
invalid_properties.push('invalid value for "is_editable", is_editable cannot be nil.')
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
if @is_shared.nil?
|
|
428
|
+
invalid_properties.push('invalid value for "is_shared", is_shared cannot be nil.')
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
if @name.nil?
|
|
432
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
if @quotas.nil?
|
|
436
|
+
invalid_properties.push('invalid value for "quotas", quotas cannot be nil.')
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
if @status.nil?
|
|
440
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
if @type.nil?
|
|
444
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
if @updated_at.nil?
|
|
448
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
invalid_properties
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
# Check to see if the all the properties in the model are valid
|
|
455
|
+
# @return true if the model is valid
|
|
456
|
+
def valid?
|
|
457
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
458
|
+
return false if @allowed_actions.nil?
|
|
459
|
+
return false if @created_at.nil?
|
|
460
|
+
return false if @has_refresh_token.nil?
|
|
461
|
+
return false if @has_smtp_password.nil?
|
|
462
|
+
return false if @id.nil?
|
|
463
|
+
return false if @is_active.nil?
|
|
464
|
+
return false if @is_editable.nil?
|
|
465
|
+
return false if @is_shared.nil?
|
|
466
|
+
return false if @name.nil?
|
|
467
|
+
return false if @quotas.nil?
|
|
468
|
+
return false if @status.nil?
|
|
469
|
+
status_validator = EnumAttributeValidator.new('String', ["active", "inactive", "error", "pending", "unknown_default_open_api"])
|
|
470
|
+
return false unless status_validator.valid?(@status)
|
|
471
|
+
return false if @type.nil?
|
|
472
|
+
type_validator = EnumAttributeValidator.new('String', ["smtp", "gmail_api", "outlook_api", "amazon_ses", "unknown_default_open_api"])
|
|
473
|
+
return false unless type_validator.valid?(@type)
|
|
474
|
+
return false if @updated_at.nil?
|
|
475
|
+
true
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
# Custom attribute writer method with validation
|
|
479
|
+
# @param [Object] allowed_actions Value to be assigned
|
|
480
|
+
def allowed_actions=(allowed_actions)
|
|
481
|
+
if allowed_actions.nil?
|
|
482
|
+
fail ArgumentError, 'allowed_actions cannot be nil'
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
@allowed_actions = allowed_actions
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
# Custom attribute writer method with validation
|
|
489
|
+
# @param [Object] created_at Value to be assigned
|
|
490
|
+
def created_at=(created_at)
|
|
491
|
+
if created_at.nil?
|
|
492
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
@created_at = created_at
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
# Custom attribute writer method with validation
|
|
499
|
+
# @param [Object] has_refresh_token Value to be assigned
|
|
500
|
+
def has_refresh_token=(has_refresh_token)
|
|
501
|
+
if has_refresh_token.nil?
|
|
502
|
+
fail ArgumentError, 'has_refresh_token cannot be nil'
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
@has_refresh_token = has_refresh_token
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
# Custom attribute writer method with validation
|
|
509
|
+
# @param [Object] has_smtp_password Value to be assigned
|
|
510
|
+
def has_smtp_password=(has_smtp_password)
|
|
511
|
+
if has_smtp_password.nil?
|
|
512
|
+
fail ArgumentError, 'has_smtp_password cannot be nil'
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
@has_smtp_password = has_smtp_password
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# Custom attribute writer method with validation
|
|
519
|
+
# @param [Object] id Value to be assigned
|
|
520
|
+
def id=(id)
|
|
521
|
+
if id.nil?
|
|
522
|
+
fail ArgumentError, 'id cannot be nil'
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
@id = id
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
# Custom attribute writer method with validation
|
|
529
|
+
# @param [Object] is_active Value to be assigned
|
|
530
|
+
def is_active=(is_active)
|
|
531
|
+
if is_active.nil?
|
|
532
|
+
fail ArgumentError, 'is_active cannot be nil'
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
@is_active = is_active
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
# Custom attribute writer method with validation
|
|
539
|
+
# @param [Object] is_editable Value to be assigned
|
|
540
|
+
def is_editable=(is_editable)
|
|
541
|
+
if is_editable.nil?
|
|
542
|
+
fail ArgumentError, 'is_editable cannot be nil'
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
@is_editable = is_editable
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
# Custom attribute writer method with validation
|
|
549
|
+
# @param [Object] is_shared Value to be assigned
|
|
550
|
+
def is_shared=(is_shared)
|
|
551
|
+
if is_shared.nil?
|
|
552
|
+
fail ArgumentError, 'is_shared cannot be nil'
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
@is_shared = is_shared
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
# Custom attribute writer method with validation
|
|
559
|
+
# @param [Object] name Value to be assigned
|
|
560
|
+
def name=(name)
|
|
561
|
+
if name.nil?
|
|
562
|
+
fail ArgumentError, 'name cannot be nil'
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
@name = name
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
# Custom attribute writer method with validation
|
|
569
|
+
# @param [Object] quotas Value to be assigned
|
|
570
|
+
def quotas=(quotas)
|
|
571
|
+
if quotas.nil?
|
|
572
|
+
fail ArgumentError, 'quotas cannot be nil'
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
@quotas = quotas
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
579
|
+
# @param [Object] status Object to be assigned
|
|
580
|
+
def status=(status)
|
|
581
|
+
validator = EnumAttributeValidator.new('String', ["active", "inactive", "error", "pending", "unknown_default_open_api"])
|
|
582
|
+
unless validator.valid?(status)
|
|
583
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
584
|
+
end
|
|
585
|
+
@status = status
|
|
586
|
+
end
|
|
587
|
+
|
|
588
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
589
|
+
# @param [Object] type Object to be assigned
|
|
590
|
+
def type=(type)
|
|
591
|
+
validator = EnumAttributeValidator.new('String', ["smtp", "gmail_api", "outlook_api", "amazon_ses", "unknown_default_open_api"])
|
|
592
|
+
unless validator.valid?(type)
|
|
593
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
594
|
+
end
|
|
595
|
+
@type = type
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
# Custom attribute writer method with validation
|
|
599
|
+
# @param [Object] updated_at Value to be assigned
|
|
600
|
+
def updated_at=(updated_at)
|
|
601
|
+
if updated_at.nil?
|
|
602
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
@updated_at = updated_at
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
# Checks equality by comparing each attribute.
|
|
609
|
+
# @param [Object] Object to be compared
|
|
610
|
+
def ==(o)
|
|
611
|
+
return true if self.equal?(o)
|
|
612
|
+
self.class == o.class &&
|
|
613
|
+
allowed_actions == o.allowed_actions &&
|
|
614
|
+
created_at == o.created_at &&
|
|
615
|
+
from_email == o.from_email &&
|
|
616
|
+
from_name == o.from_name &&
|
|
617
|
+
has_refresh_token == o.has_refresh_token &&
|
|
618
|
+
has_smtp_password == o.has_smtp_password &&
|
|
619
|
+
id == o.id &&
|
|
620
|
+
is_active == o.is_active &&
|
|
621
|
+
is_editable == o.is_editable &&
|
|
622
|
+
is_shared == o.is_shared &&
|
|
623
|
+
last_tested_at == o.last_tested_at &&
|
|
624
|
+
last_used_at == o.last_used_at &&
|
|
625
|
+
name == o.name &&
|
|
626
|
+
oauth_email == o.oauth_email &&
|
|
627
|
+
percentage == o.percentage &&
|
|
628
|
+
quotas == o.quotas &&
|
|
629
|
+
reply_to_email == o.reply_to_email &&
|
|
630
|
+
reply_to_name == o.reply_to_name &&
|
|
631
|
+
smtp_host == o.smtp_host &&
|
|
632
|
+
smtp_port == o.smtp_port &&
|
|
633
|
+
smtp_protocol == o.smtp_protocol &&
|
|
634
|
+
smtp_username == o.smtp_username &&
|
|
635
|
+
status == o.status &&
|
|
636
|
+
status_reason == o.status_reason &&
|
|
637
|
+
tracking_domain == o.tracking_domain &&
|
|
638
|
+
type == o.type &&
|
|
639
|
+
updated_at == o.updated_at
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
# @see the `==` method
|
|
643
|
+
# @param [Object] Object to be compared
|
|
644
|
+
def eql?(o)
|
|
645
|
+
self == o
|
|
646
|
+
end
|
|
647
|
+
|
|
648
|
+
# Calculates hash code according to all attributes.
|
|
649
|
+
# @return [Integer] Hash code
|
|
650
|
+
def hash
|
|
651
|
+
[allowed_actions, created_at, from_email, from_name, has_refresh_token, has_smtp_password, id, is_active, is_editable, is_shared, last_tested_at, last_used_at, name, oauth_email, percentage, quotas, reply_to_email, reply_to_name, smtp_host, smtp_port, smtp_protocol, smtp_username, status, status_reason, tracking_domain, type, updated_at].hash
|
|
652
|
+
end
|
|
653
|
+
|
|
654
|
+
# Builds the object from hash
|
|
655
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
656
|
+
# @return [Object] Returns the model itself
|
|
657
|
+
def self.build_from_hash(attributes)
|
|
658
|
+
return nil unless attributes.is_a?(Hash)
|
|
659
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
660
|
+
transformed_hash = {}
|
|
661
|
+
openapi_types.each_pair do |key, type|
|
|
662
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
663
|
+
transformed_hash["#{key}"] = nil
|
|
664
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
665
|
+
# check to ensure the input is an array given that the attribute
|
|
666
|
+
# is documented as an array but the input is not
|
|
667
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
668
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
669
|
+
end
|
|
670
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
671
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
672
|
+
end
|
|
673
|
+
end
|
|
674
|
+
new(transformed_hash)
|
|
675
|
+
end
|
|
676
|
+
|
|
677
|
+
# Returns the object in the form of hash
|
|
678
|
+
# @return [Hash] Returns the object in the form of hash
|
|
679
|
+
def to_hash
|
|
680
|
+
hash = {}
|
|
681
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
682
|
+
value = self.send(attr)
|
|
683
|
+
if value.nil?
|
|
684
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
685
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
686
|
+
end
|
|
687
|
+
|
|
688
|
+
hash[param] = _to_hash(value)
|
|
689
|
+
end
|
|
690
|
+
hash
|
|
691
|
+
end
|
|
692
|
+
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
end
|