sendmux-management 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. metadata +13 -226
  3. data/CHANGELOG.md +0 -73
  4. data/LICENSE +0 -21
  5. data/README.md +0 -157
  6. data/lib/sendmux/management/client.rb +0 -77
  7. data/lib/sendmux/management/version.rb +0 -7
  8. data/lib/sendmux/management.rb +0 -12
  9. data/lib/sendmux_management_generated/api/billing_api.rb +0 -221
  10. data/lib/sendmux_management_generated/api/connection_api.rb +0 -82
  11. data/lib/sendmux_management_generated/api/domain_filters_api.rb +0 -161
  12. data/lib/sendmux_management_generated/api/domains_api.rb +0 -492
  13. data/lib/sendmux_management_generated/api/emails_api.rb +0 -258
  14. data/lib/sendmux_management_generated/api/inboxes_api.rb +0 -175
  15. data/lib/sendmux_management_generated/api/mailbox_filters_api.rb +0 -161
  16. data/lib/sendmux_management_generated/api/mailboxes_api.rb +0 -723
  17. data/lib/sendmux_management_generated/api/sending_accounts_api.rb +0 -1009
  18. data/lib/sendmux_management_generated/api/webhooks_api.rb +0 -666
  19. data/lib/sendmux_management_generated/api_client.rb +0 -447
  20. data/lib/sendmux_management_generated/api_error.rb +0 -58
  21. data/lib/sendmux_management_generated/api_model_base.rb +0 -88
  22. data/lib/sendmux_management_generated/configuration.rb +0 -400
  23. data/lib/sendmux_management_generated/models/api_error_detail.rb +0 -219
  24. data/lib/sendmux_management_generated/models/api_error_error.rb +0 -275
  25. data/lib/sendmux_management_generated/models/api_error_meta.rb +0 -164
  26. data/lib/sendmux_management_generated/models/api_error_response.rb +0 -216
  27. data/lib/sendmux_management_generated/models/balance.rb +0 -293
  28. data/lib/sendmux_management_generated/models/balance_auto_topup.rb +0 -226
  29. data/lib/sendmux_management_generated/models/balance_response.rb +0 -223
  30. data/lib/sendmux_management_generated/models/connection.rb +0 -273
  31. data/lib/sendmux_management_generated/models/connection_credential.rb +0 -226
  32. data/lib/sendmux_management_generated/models/connection_mailboxes_inner.rb +0 -190
  33. data/lib/sendmux_management_generated/models/connection_response.rb +0 -223
  34. data/lib/sendmux_management_generated/models/connection_team.rb +0 -190
  35. data/lib/sendmux_management_generated/models/cursor_pagination.rb +0 -173
  36. data/lib/sendmux_management_generated/models/delivery_log_detail.rb +0 -573
  37. data/lib/sendmux_management_generated/models/delivery_log_item.rb +0 -543
  38. data/lib/sendmux_management_generated/models/delivery_log_item_cursor_list_response.rb +0 -251
  39. data/lib/sendmux_management_generated/models/delivery_log_item_response.rb +0 -223
  40. data/lib/sendmux_management_generated/models/delivery_log_recipient.rb +0 -254
  41. data/lib/sendmux_management_generated/models/domain_deleted_response.rb +0 -223
  42. data/lib/sendmux_management_generated/models/domain_deleted_response_all_of_data.rb +0 -190
  43. data/lib/sendmux_management_generated/models/domain_item_cursor_list_response.rb +0 -251
  44. data/lib/sendmux_management_generated/models/domain_item_response.rb +0 -223
  45. data/lib/sendmux_management_generated/models/domain_verify_response.rb +0 -223
  46. data/lib/sendmux_management_generated/models/email_metrics.rb +0 -218
  47. data/lib/sendmux_management_generated/models/email_metrics_comparison.rb +0 -294
  48. data/lib/sendmux_management_generated/models/email_metrics_comparison_change_pct.rb +0 -268
  49. data/lib/sendmux_management_generated/models/email_metrics_response.rb +0 -223
  50. data/lib/sendmux_management_generated/models/email_metrics_summary.rb +0 -268
  51. data/lib/sendmux_management_generated/models/email_metrics_timeseries_inner.rb +0 -294
  52. data/lib/sendmux_management_generated/models/filter_rule.rb +0 -242
  53. data/lib/sendmux_management_generated/models/filter_state.rb +0 -218
  54. data/lib/sendmux_management_generated/models/filter_state_response.rb +0 -223
  55. data/lib/sendmux_management_generated/models/incoming_log_item.rb +0 -465
  56. data/lib/sendmux_management_generated/models/incoming_log_item_cursor_list_response.rb +0 -251
  57. data/lib/sendmux_management_generated/models/incoming_log_item_response.rb +0 -223
  58. data/lib/sendmux_management_generated/models/mailbox.rb +0 -284
  59. data/lib/sendmux_management_generated/models/mailbox_app_password_result.rb +0 -164
  60. data/lib/sendmux_management_generated/models/mailbox_app_password_result_credential.rb +0 -359
  61. data/lib/sendmux_management_generated/models/mailbox_app_password_result_response.rb +0 -223
  62. data/lib/sendmux_management_generated/models/mailbox_availability_reason.rb +0 -45
  63. data/lib/sendmux_management_generated/models/mailbox_availability_response.rb +0 -223
  64. data/lib/sendmux_management_generated/models/mailbox_availability_result.rb +0 -240
  65. data/lib/sendmux_management_generated/models/mailbox_create_result.rb +0 -189
  66. data/lib/sendmux_management_generated/models/mailbox_create_result_response.rb +0 -223
  67. data/lib/sendmux_management_generated/models/mailbox_credential.rb +0 -353
  68. data/lib/sendmux_management_generated/models/mailbox_deleted_response.rb +0 -223
  69. data/lib/sendmux_management_generated/models/mailbox_domain.rb +0 -452
  70. data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +0 -303
  71. data/lib/sendmux_management_generated/models/mailbox_domain_mail_from_records.rb +0 -191
  72. data/lib/sendmux_management_generated/models/mailbox_domain_mx_record.rb +0 -190
  73. data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +0 -191
  74. data/lib/sendmux_management_generated/models/mailbox_domain_named_mx_record.rb +0 -217
  75. data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +0 -300
  76. data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +0 -377
  77. data/lib/sendmux_management_generated/models/mailbox_item_cursor_list_response.rb +0 -251
  78. data/lib/sendmux_management_generated/models/mailbox_item_response.rb +0 -223
  79. data/lib/sendmux_management_generated/models/mailbox_key_deleted_response.rb +0 -223
  80. data/lib/sendmux_management_generated/models/mailbox_send_scope.rb +0 -213
  81. data/lib/sendmux_management_generated/models/management_create_domain_request.rb +0 -209
  82. data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +0 -183
  83. data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +0 -270
  84. data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +0 -214
  85. data/lib/sendmux_management_generated/models/management_test_webhook200_response.rb +0 -223
  86. data/lib/sendmux_management_generated/models/management_update_domain_request.rb +0 -189
  87. data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +0 -294
  88. data/lib/sendmux_management_generated/models/provider_create_body.rb +0 -611
  89. data/lib/sendmux_management_generated/models/provider_create_body_quotas.rb +0 -174
  90. data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +0 -104
  91. data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day_any_of.rb +0 -215
  92. data/lib/sendmux_management_generated/models/provider_deleted.rb +0 -190
  93. data/lib/sendmux_management_generated/models/provider_deleted_response.rb +0 -223
  94. data/lib/sendmux_management_generated/models/provider_item.rb +0 -733
  95. data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +0 -251
  96. data/lib/sendmux_management_generated/models/provider_item_response.rb +0 -223
  97. data/lib/sendmux_management_generated/models/provider_limits.rb +0 -190
  98. data/lib/sendmux_management_generated/models/provider_limits_response.rb +0 -223
  99. data/lib/sendmux_management_generated/models/provider_list_item.rb +0 -695
  100. data/lib/sendmux_management_generated/models/provider_quota_range.rb +0 -208
  101. data/lib/sendmux_management_generated/models/provider_quotas.rb +0 -186
  102. data/lib/sendmux_management_generated/models/provider_stats.rb +0 -325
  103. data/lib/sendmux_management_generated/models/provider_stats_response.rb +0 -223
  104. data/lib/sendmux_management_generated/models/provider_status_counts.rb +0 -242
  105. data/lib/sendmux_management_generated/models/provider_test_result.rb +0 -251
  106. data/lib/sendmux_management_generated/models/provider_test_result_response.rb +0 -223
  107. data/lib/sendmux_management_generated/models/provider_type_counts.rb +0 -246
  108. data/lib/sendmux_management_generated/models/provider_update_body.rb +0 -569
  109. data/lib/sendmux_management_generated/models/provider_usage.rb +0 -216
  110. data/lib/sendmux_management_generated/models/provider_usage_item.rb +0 -374
  111. data/lib/sendmux_management_generated/models/provider_usage_response.rb +0 -223
  112. data/lib/sendmux_management_generated/models/resource_limit_snapshot.rb +0 -420
  113. data/lib/sendmux_management_generated/models/response_meta.rb +0 -164
  114. data/lib/sendmux_management_generated/models/sending_account_limit_request.rb +0 -190
  115. data/lib/sendmux_management_generated/models/sending_account_limit_request_response.rb +0 -223
  116. data/lib/sendmux_management_generated/models/set_filter_state_body.rb +0 -226
  117. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +0 -315
  118. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +0 -361
  119. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel.rb +0 -190
  120. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel_response.rb +0 -223
  121. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +0 -190
  122. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +0 -223
  123. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page.rb +0 -176
  124. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +0 -223
  125. data/lib/sendmux_management_generated/models/spend_summary.rb +0 -292
  126. data/lib/sendmux_management_generated/models/spend_summary_response.rb +0 -223
  127. data/lib/sendmux_management_generated/models/success_envelope.rb +0 -192
  128. data/lib/sendmux_management_generated/models/transaction.rb +0 -332
  129. data/lib/sendmux_management_generated/models/transaction_cursor_list_response.rb +0 -251
  130. data/lib/sendmux_management_generated/models/update_mailbox_body.rb +0 -211
  131. data/lib/sendmux_management_generated/models/update_mailbox_body_send_scope.rb +0 -214
  132. data/lib/sendmux_management_generated/models/webhook_create_body.rb +0 -269
  133. data/lib/sendmux_management_generated/models/webhook_deleted_response.rb +0 -223
  134. data/lib/sendmux_management_generated/models/webhook_delivery_attempt.rb +0 -562
  135. data/lib/sendmux_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +0 -251
  136. data/lib/sendmux_management_generated/models/webhook_delivery_payload.rb +0 -359
  137. data/lib/sendmux_management_generated/models/webhook_delivery_payload_response.rb +0 -223
  138. data/lib/sendmux_management_generated/models/webhook_event_data.rb +0 -395
  139. data/lib/sendmux_management_generated/models/webhook_event_payload.rb +0 -297
  140. data/lib/sendmux_management_generated/models/webhook_filters.rb +0 -168
  141. data/lib/sendmux_management_generated/models/webhook_subscription.rb +0 -380
  142. data/lib/sendmux_management_generated/models/webhook_subscription_cursor_list_response.rb +0 -251
  143. data/lib/sendmux_management_generated/models/webhook_subscription_response.rb +0 -223
  144. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +0 -414
  145. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret_response.rb +0 -223
  146. data/lib/sendmux_management_generated/models/webhook_test_response.rb +0 -165
  147. data/lib/sendmux_management_generated/models/webhook_update_body.rb +0 -233
  148. data/lib/sendmux_management_generated/version.rb +0 -15
  149. data/lib/sendmux_management_generated.rb +0 -175
@@ -1,733 +0,0 @@
1
- =begin
2
- #Sendmux API
3
-
4
- #Programmatic access to your Sendmux email infrastructure.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.22.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Sendmux::Management::Generated
17
- class ProviderItem < ApiModelBase
18
- attr_accessor :allowed_actions
19
-
20
- # ISO 8601 creation timestamp
21
- attr_accessor :created_at
22
-
23
- # Default From email address. Connected Google and Microsoft accounts always use their authorised account 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
- # Per-account string variables. PATCH omission preserves the current map, a supplied map replaces it, and an empty map clears it. Detail responses return an empty map when no variables are set.
98
- attr_accessor :variables
99
-
100
- class EnumAttributeValidator
101
- attr_reader :datatype
102
- attr_reader :allowable_values
103
-
104
- def initialize(datatype, allowable_values)
105
- @allowable_values = allowable_values.map do |value|
106
- case datatype.to_s
107
- when /Integer/i
108
- value.to_i
109
- when /Float/i
110
- value.to_f
111
- else
112
- value
113
- end
114
- end
115
- end
116
-
117
- def valid?(value)
118
- !value || allowable_values.include?(value)
119
- end
120
- end
121
-
122
- # Attribute mapping from ruby-style variable name to JSON key.
123
- def self.attribute_map
124
- {
125
- :'allowed_actions' => :'allowed_actions',
126
- :'created_at' => :'created_at',
127
- :'from_email' => :'from_email',
128
- :'from_name' => :'from_name',
129
- :'has_refresh_token' => :'has_refresh_token',
130
- :'has_smtp_password' => :'has_smtp_password',
131
- :'id' => :'id',
132
- :'is_active' => :'is_active',
133
- :'is_editable' => :'is_editable',
134
- :'is_shared' => :'is_shared',
135
- :'last_tested_at' => :'last_tested_at',
136
- :'last_used_at' => :'last_used_at',
137
- :'name' => :'name',
138
- :'oauth_email' => :'oauth_email',
139
- :'percentage' => :'percentage',
140
- :'quotas' => :'quotas',
141
- :'reply_to_email' => :'reply_to_email',
142
- :'reply_to_name' => :'reply_to_name',
143
- :'smtp_host' => :'smtp_host',
144
- :'smtp_port' => :'smtp_port',
145
- :'smtp_protocol' => :'smtp_protocol',
146
- :'smtp_username' => :'smtp_username',
147
- :'status' => :'status',
148
- :'status_reason' => :'status_reason',
149
- :'tracking_domain' => :'tracking_domain',
150
- :'type' => :'type',
151
- :'updated_at' => :'updated_at',
152
- :'variables' => :'variables'
153
- }
154
- end
155
-
156
- # Returns attribute mapping this model knows about
157
- def self.acceptable_attribute_map
158
- attribute_map
159
- end
160
-
161
- # Returns all the JSON keys this model knows about
162
- def self.acceptable_attributes
163
- acceptable_attribute_map.values
164
- end
165
-
166
- # Attribute type mapping.
167
- def self.openapi_types
168
- {
169
- :'allowed_actions' => :'ProviderAllowedActions',
170
- :'created_at' => :'String',
171
- :'from_email' => :'String',
172
- :'from_name' => :'String',
173
- :'has_refresh_token' => :'Boolean',
174
- :'has_smtp_password' => :'Boolean',
175
- :'id' => :'String',
176
- :'is_active' => :'Boolean',
177
- :'is_editable' => :'Boolean',
178
- :'is_shared' => :'Boolean',
179
- :'last_tested_at' => :'String',
180
- :'last_used_at' => :'String',
181
- :'name' => :'String',
182
- :'oauth_email' => :'String',
183
- :'percentage' => :'Integer',
184
- :'quotas' => :'ProviderQuotas',
185
- :'reply_to_email' => :'String',
186
- :'reply_to_name' => :'String',
187
- :'smtp_host' => :'String',
188
- :'smtp_port' => :'Integer',
189
- :'smtp_protocol' => :'String',
190
- :'smtp_username' => :'String',
191
- :'status' => :'String',
192
- :'status_reason' => :'String',
193
- :'tracking_domain' => :'String',
194
- :'type' => :'String',
195
- :'updated_at' => :'String',
196
- :'variables' => :'Hash<String, String>'
197
- }
198
- end
199
-
200
- # List of attributes with nullable: true
201
- def self.openapi_nullable
202
- Set.new([
203
- :'from_email',
204
- :'from_name',
205
- :'last_tested_at',
206
- :'last_used_at',
207
- :'oauth_email',
208
- :'percentage',
209
- :'reply_to_email',
210
- :'reply_to_name',
211
- :'smtp_host',
212
- :'smtp_port',
213
- :'smtp_protocol',
214
- :'smtp_username',
215
- :'status_reason',
216
- :'tracking_domain',
217
- ])
218
- end
219
-
220
- # Initializes the object
221
- # @param [Hash] attributes Model attributes in the form of hash
222
- def initialize(attributes = {})
223
- if (!attributes.is_a?(Hash))
224
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::ProviderItem` initialize method"
225
- end
226
-
227
- # check to see if the attribute exists and convert string to symbol for hash key
228
- acceptable_attribute_map = self.class.acceptable_attribute_map
229
- attributes = attributes.each_with_object({}) { |(k, v), h|
230
- if (!acceptable_attribute_map.key?(k.to_sym))
231
- 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
232
- end
233
- h[k.to_sym] = v
234
- }
235
-
236
- if attributes.key?(:'allowed_actions')
237
- self.allowed_actions = attributes[:'allowed_actions']
238
- else
239
- self.allowed_actions = nil
240
- end
241
-
242
- if attributes.key?(:'created_at')
243
- self.created_at = attributes[:'created_at']
244
- else
245
- self.created_at = nil
246
- end
247
-
248
- if attributes.key?(:'from_email')
249
- self.from_email = attributes[:'from_email']
250
- else
251
- self.from_email = nil
252
- end
253
-
254
- if attributes.key?(:'from_name')
255
- self.from_name = attributes[:'from_name']
256
- else
257
- self.from_name = nil
258
- end
259
-
260
- if attributes.key?(:'has_refresh_token')
261
- self.has_refresh_token = attributes[:'has_refresh_token']
262
- else
263
- self.has_refresh_token = nil
264
- end
265
-
266
- if attributes.key?(:'has_smtp_password')
267
- self.has_smtp_password = attributes[:'has_smtp_password']
268
- else
269
- self.has_smtp_password = nil
270
- end
271
-
272
- if attributes.key?(:'id')
273
- self.id = attributes[:'id']
274
- else
275
- self.id = nil
276
- end
277
-
278
- if attributes.key?(:'is_active')
279
- self.is_active = attributes[:'is_active']
280
- else
281
- self.is_active = nil
282
- end
283
-
284
- if attributes.key?(:'is_editable')
285
- self.is_editable = attributes[:'is_editable']
286
- else
287
- self.is_editable = nil
288
- end
289
-
290
- if attributes.key?(:'is_shared')
291
- self.is_shared = attributes[:'is_shared']
292
- else
293
- self.is_shared = nil
294
- end
295
-
296
- if attributes.key?(:'last_tested_at')
297
- self.last_tested_at = attributes[:'last_tested_at']
298
- else
299
- self.last_tested_at = nil
300
- end
301
-
302
- if attributes.key?(:'last_used_at')
303
- self.last_used_at = attributes[:'last_used_at']
304
- else
305
- self.last_used_at = nil
306
- end
307
-
308
- if attributes.key?(:'name')
309
- self.name = attributes[:'name']
310
- else
311
- self.name = nil
312
- end
313
-
314
- if attributes.key?(:'oauth_email')
315
- self.oauth_email = attributes[:'oauth_email']
316
- else
317
- self.oauth_email = nil
318
- end
319
-
320
- if attributes.key?(:'percentage')
321
- self.percentage = attributes[:'percentage']
322
- else
323
- self.percentage = nil
324
- end
325
-
326
- if attributes.key?(:'quotas')
327
- self.quotas = attributes[:'quotas']
328
- else
329
- self.quotas = nil
330
- end
331
-
332
- if attributes.key?(:'reply_to_email')
333
- self.reply_to_email = attributes[:'reply_to_email']
334
- else
335
- self.reply_to_email = nil
336
- end
337
-
338
- if attributes.key?(:'reply_to_name')
339
- self.reply_to_name = attributes[:'reply_to_name']
340
- else
341
- self.reply_to_name = nil
342
- end
343
-
344
- if attributes.key?(:'smtp_host')
345
- self.smtp_host = attributes[:'smtp_host']
346
- else
347
- self.smtp_host = nil
348
- end
349
-
350
- if attributes.key?(:'smtp_port')
351
- self.smtp_port = attributes[:'smtp_port']
352
- else
353
- self.smtp_port = nil
354
- end
355
-
356
- if attributes.key?(:'smtp_protocol')
357
- self.smtp_protocol = attributes[:'smtp_protocol']
358
- else
359
- self.smtp_protocol = nil
360
- end
361
-
362
- if attributes.key?(:'smtp_username')
363
- self.smtp_username = attributes[:'smtp_username']
364
- else
365
- self.smtp_username = nil
366
- end
367
-
368
- if attributes.key?(:'status')
369
- self.status = attributes[:'status']
370
- else
371
- self.status = nil
372
- end
373
-
374
- if attributes.key?(:'status_reason')
375
- self.status_reason = attributes[:'status_reason']
376
- else
377
- self.status_reason = nil
378
- end
379
-
380
- if attributes.key?(:'tracking_domain')
381
- self.tracking_domain = attributes[:'tracking_domain']
382
- else
383
- self.tracking_domain = nil
384
- end
385
-
386
- if attributes.key?(:'type')
387
- self.type = attributes[:'type']
388
- else
389
- self.type = nil
390
- end
391
-
392
- if attributes.key?(:'updated_at')
393
- self.updated_at = attributes[:'updated_at']
394
- else
395
- self.updated_at = nil
396
- end
397
-
398
- if attributes.key?(:'variables')
399
- if (value = attributes[:'variables']).is_a?(Hash)
400
- self.variables = value
401
- end
402
- else
403
- self.variables = nil
404
- end
405
- end
406
-
407
- # Show invalid properties with the reasons. Usually used together with valid?
408
- # @return Array for valid properties with the reasons
409
- def list_invalid_properties
410
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
411
- invalid_properties = Array.new
412
- if @allowed_actions.nil?
413
- invalid_properties.push('invalid value for "allowed_actions", allowed_actions cannot be nil.')
414
- end
415
-
416
- if @created_at.nil?
417
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
418
- end
419
-
420
- if @has_refresh_token.nil?
421
- invalid_properties.push('invalid value for "has_refresh_token", has_refresh_token cannot be nil.')
422
- end
423
-
424
- if @has_smtp_password.nil?
425
- invalid_properties.push('invalid value for "has_smtp_password", has_smtp_password cannot be nil.')
426
- end
427
-
428
- if @id.nil?
429
- invalid_properties.push('invalid value for "id", id cannot be nil.')
430
- end
431
-
432
- if @is_active.nil?
433
- invalid_properties.push('invalid value for "is_active", is_active cannot be nil.')
434
- end
435
-
436
- if @is_editable.nil?
437
- invalid_properties.push('invalid value for "is_editable", is_editable cannot be nil.')
438
- end
439
-
440
- if @is_shared.nil?
441
- invalid_properties.push('invalid value for "is_shared", is_shared cannot be nil.')
442
- end
443
-
444
- if @name.nil?
445
- invalid_properties.push('invalid value for "name", name cannot be nil.')
446
- end
447
-
448
- if @quotas.nil?
449
- invalid_properties.push('invalid value for "quotas", quotas cannot be nil.')
450
- end
451
-
452
- if @status.nil?
453
- invalid_properties.push('invalid value for "status", status cannot be nil.')
454
- end
455
-
456
- if @type.nil?
457
- invalid_properties.push('invalid value for "type", type cannot be nil.')
458
- end
459
-
460
- if @updated_at.nil?
461
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
462
- end
463
-
464
- if @variables.nil?
465
- invalid_properties.push('invalid value for "variables", variables cannot be nil.')
466
- end
467
-
468
- if !@variables.nil? && @variables.length > 50
469
- invalid_properties.push('invalid value for "variables", number of items must be less than or equal to 50.')
470
- end
471
-
472
- invalid_properties
473
- end
474
-
475
- # Check to see if the all the properties in the model are valid
476
- # @return true if the model is valid
477
- def valid?
478
- warn '[DEPRECATED] the `valid?` method is obsolete'
479
- return false if @allowed_actions.nil?
480
- return false if @created_at.nil?
481
- return false if @has_refresh_token.nil?
482
- return false if @has_smtp_password.nil?
483
- return false if @id.nil?
484
- return false if @is_active.nil?
485
- return false if @is_editable.nil?
486
- return false if @is_shared.nil?
487
- return false if @name.nil?
488
- return false if @quotas.nil?
489
- return false if @status.nil?
490
- status_validator = EnumAttributeValidator.new('String', ["active", "inactive", "error", "pending", "unknown_default_open_api"])
491
- return false unless status_validator.valid?(@status)
492
- return false if @type.nil?
493
- type_validator = EnumAttributeValidator.new('String', ["smtp", "gmail_api", "outlook_api", "amazon_ses", "unknown_default_open_api"])
494
- return false unless type_validator.valid?(@type)
495
- return false if @updated_at.nil?
496
- return false if @variables.nil?
497
- return false if !@variables.nil? && @variables.length > 50
498
- true
499
- end
500
-
501
- # Custom attribute writer method with validation
502
- # @param [Object] allowed_actions Value to be assigned
503
- def allowed_actions=(allowed_actions)
504
- if allowed_actions.nil?
505
- fail ArgumentError, 'allowed_actions cannot be nil'
506
- end
507
-
508
- @allowed_actions = allowed_actions
509
- end
510
-
511
- # Custom attribute writer method with validation
512
- # @param [Object] created_at Value to be assigned
513
- def created_at=(created_at)
514
- if created_at.nil?
515
- fail ArgumentError, 'created_at cannot be nil'
516
- end
517
-
518
- @created_at = created_at
519
- end
520
-
521
- # Custom attribute writer method with validation
522
- # @param [Object] has_refresh_token Value to be assigned
523
- def has_refresh_token=(has_refresh_token)
524
- if has_refresh_token.nil?
525
- fail ArgumentError, 'has_refresh_token cannot be nil'
526
- end
527
-
528
- @has_refresh_token = has_refresh_token
529
- end
530
-
531
- # Custom attribute writer method with validation
532
- # @param [Object] has_smtp_password Value to be assigned
533
- def has_smtp_password=(has_smtp_password)
534
- if has_smtp_password.nil?
535
- fail ArgumentError, 'has_smtp_password cannot be nil'
536
- end
537
-
538
- @has_smtp_password = has_smtp_password
539
- end
540
-
541
- # Custom attribute writer method with validation
542
- # @param [Object] id Value to be assigned
543
- def id=(id)
544
- if id.nil?
545
- fail ArgumentError, 'id cannot be nil'
546
- end
547
-
548
- @id = id
549
- end
550
-
551
- # Custom attribute writer method with validation
552
- # @param [Object] is_active Value to be assigned
553
- def is_active=(is_active)
554
- if is_active.nil?
555
- fail ArgumentError, 'is_active cannot be nil'
556
- end
557
-
558
- @is_active = is_active
559
- end
560
-
561
- # Custom attribute writer method with validation
562
- # @param [Object] is_editable Value to be assigned
563
- def is_editable=(is_editable)
564
- if is_editable.nil?
565
- fail ArgumentError, 'is_editable cannot be nil'
566
- end
567
-
568
- @is_editable = is_editable
569
- end
570
-
571
- # Custom attribute writer method with validation
572
- # @param [Object] is_shared Value to be assigned
573
- def is_shared=(is_shared)
574
- if is_shared.nil?
575
- fail ArgumentError, 'is_shared cannot be nil'
576
- end
577
-
578
- @is_shared = is_shared
579
- end
580
-
581
- # Custom attribute writer method with validation
582
- # @param [Object] name Value to be assigned
583
- def name=(name)
584
- if name.nil?
585
- fail ArgumentError, 'name cannot be nil'
586
- end
587
-
588
- @name = name
589
- end
590
-
591
- # Custom attribute writer method with validation
592
- # @param [Object] quotas Value to be assigned
593
- def quotas=(quotas)
594
- if quotas.nil?
595
- fail ArgumentError, 'quotas cannot be nil'
596
- end
597
-
598
- @quotas = quotas
599
- end
600
-
601
- # Custom attribute writer method checking allowed values (enum).
602
- # @param [Object] status Object to be assigned
603
- def status=(status)
604
- validator = EnumAttributeValidator.new('String', ["active", "inactive", "error", "pending", "unknown_default_open_api"])
605
- unless validator.valid?(status)
606
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
607
- end
608
- @status = status
609
- end
610
-
611
- # Custom attribute writer method checking allowed values (enum).
612
- # @param [Object] type Object to be assigned
613
- def type=(type)
614
- validator = EnumAttributeValidator.new('String', ["smtp", "gmail_api", "outlook_api", "amazon_ses", "unknown_default_open_api"])
615
- unless validator.valid?(type)
616
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
617
- end
618
- @type = type
619
- end
620
-
621
- # Custom attribute writer method with validation
622
- # @param [Object] updated_at Value to be assigned
623
- def updated_at=(updated_at)
624
- if updated_at.nil?
625
- fail ArgumentError, 'updated_at cannot be nil'
626
- end
627
-
628
- @updated_at = updated_at
629
- end
630
-
631
- # Custom attribute writer method with validation
632
- # @param [Object] variables Value to be assigned
633
- def variables=(variables)
634
- if variables.nil?
635
- fail ArgumentError, 'variables cannot be nil'
636
- end
637
-
638
- if variables.length > 50
639
- fail ArgumentError, 'invalid value for "variables", number of items must be less than or equal to 50.'
640
- end
641
-
642
- @variables = variables
643
- end
644
-
645
- # Checks equality by comparing each attribute.
646
- # @param [Object] Object to be compared
647
- def ==(o)
648
- return true if self.equal?(o)
649
- self.class == o.class &&
650
- allowed_actions == o.allowed_actions &&
651
- created_at == o.created_at &&
652
- from_email == o.from_email &&
653
- from_name == o.from_name &&
654
- has_refresh_token == o.has_refresh_token &&
655
- has_smtp_password == o.has_smtp_password &&
656
- id == o.id &&
657
- is_active == o.is_active &&
658
- is_editable == o.is_editable &&
659
- is_shared == o.is_shared &&
660
- last_tested_at == o.last_tested_at &&
661
- last_used_at == o.last_used_at &&
662
- name == o.name &&
663
- oauth_email == o.oauth_email &&
664
- percentage == o.percentage &&
665
- quotas == o.quotas &&
666
- reply_to_email == o.reply_to_email &&
667
- reply_to_name == o.reply_to_name &&
668
- smtp_host == o.smtp_host &&
669
- smtp_port == o.smtp_port &&
670
- smtp_protocol == o.smtp_protocol &&
671
- smtp_username == o.smtp_username &&
672
- status == o.status &&
673
- status_reason == o.status_reason &&
674
- tracking_domain == o.tracking_domain &&
675
- type == o.type &&
676
- updated_at == o.updated_at &&
677
- variables == o.variables
678
- end
679
-
680
- # @see the `==` method
681
- # @param [Object] Object to be compared
682
- def eql?(o)
683
- self == o
684
- end
685
-
686
- # Calculates hash code according to all attributes.
687
- # @return [Integer] Hash code
688
- def hash
689
- [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, variables].hash
690
- end
691
-
692
- # Builds the object from hash
693
- # @param [Hash] attributes Model attributes in the form of hash
694
- # @return [Object] Returns the model itself
695
- def self.build_from_hash(attributes)
696
- return nil unless attributes.is_a?(Hash)
697
- attributes = attributes.transform_keys(&:to_sym)
698
- transformed_hash = {}
699
- openapi_types.each_pair do |key, type|
700
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
701
- transformed_hash["#{key}"] = nil
702
- elsif type =~ /\AArray<(.*)>/i
703
- # check to ensure the input is an array given that the attribute
704
- # is documented as an array but the input is not
705
- if attributes[attribute_map[key]].is_a?(Array)
706
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
707
- end
708
- elsif !attributes[attribute_map[key]].nil?
709
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
710
- end
711
- end
712
- new(transformed_hash)
713
- end
714
-
715
- # Returns the object in the form of hash
716
- # @return [Hash] Returns the object in the form of hash
717
- def to_hash
718
- hash = {}
719
- self.class.attribute_map.each_pair do |attr, param|
720
- value = self.send(attr)
721
- if value.nil?
722
- is_nullable = self.class.openapi_nullable.include?(attr)
723
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
724
- end
725
-
726
- hash[param] = _to_hash(value)
727
- end
728
- hash
729
- end
730
-
731
- end
732
-
733
- end