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.
- checksums.yaml +4 -4
- metadata +13 -226
- data/CHANGELOG.md +0 -73
- data/LICENSE +0 -21
- data/README.md +0 -157
- data/lib/sendmux/management/client.rb +0 -77
- data/lib/sendmux/management/version.rb +0 -7
- data/lib/sendmux/management.rb +0 -12
- data/lib/sendmux_management_generated/api/billing_api.rb +0 -221
- data/lib/sendmux_management_generated/api/connection_api.rb +0 -82
- data/lib/sendmux_management_generated/api/domain_filters_api.rb +0 -161
- data/lib/sendmux_management_generated/api/domains_api.rb +0 -492
- data/lib/sendmux_management_generated/api/emails_api.rb +0 -258
- data/lib/sendmux_management_generated/api/inboxes_api.rb +0 -175
- data/lib/sendmux_management_generated/api/mailbox_filters_api.rb +0 -161
- data/lib/sendmux_management_generated/api/mailboxes_api.rb +0 -723
- data/lib/sendmux_management_generated/api/sending_accounts_api.rb +0 -1009
- data/lib/sendmux_management_generated/api/webhooks_api.rb +0 -666
- data/lib/sendmux_management_generated/api_client.rb +0 -447
- data/lib/sendmux_management_generated/api_error.rb +0 -58
- data/lib/sendmux_management_generated/api_model_base.rb +0 -88
- data/lib/sendmux_management_generated/configuration.rb +0 -400
- data/lib/sendmux_management_generated/models/api_error_detail.rb +0 -219
- data/lib/sendmux_management_generated/models/api_error_error.rb +0 -275
- data/lib/sendmux_management_generated/models/api_error_meta.rb +0 -164
- data/lib/sendmux_management_generated/models/api_error_response.rb +0 -216
- data/lib/sendmux_management_generated/models/balance.rb +0 -293
- data/lib/sendmux_management_generated/models/balance_auto_topup.rb +0 -226
- data/lib/sendmux_management_generated/models/balance_response.rb +0 -223
- data/lib/sendmux_management_generated/models/connection.rb +0 -273
- data/lib/sendmux_management_generated/models/connection_credential.rb +0 -226
- data/lib/sendmux_management_generated/models/connection_mailboxes_inner.rb +0 -190
- data/lib/sendmux_management_generated/models/connection_response.rb +0 -223
- data/lib/sendmux_management_generated/models/connection_team.rb +0 -190
- data/lib/sendmux_management_generated/models/cursor_pagination.rb +0 -173
- data/lib/sendmux_management_generated/models/delivery_log_detail.rb +0 -573
- data/lib/sendmux_management_generated/models/delivery_log_item.rb +0 -543
- data/lib/sendmux_management_generated/models/delivery_log_item_cursor_list_response.rb +0 -251
- data/lib/sendmux_management_generated/models/delivery_log_item_response.rb +0 -223
- data/lib/sendmux_management_generated/models/delivery_log_recipient.rb +0 -254
- data/lib/sendmux_management_generated/models/domain_deleted_response.rb +0 -223
- data/lib/sendmux_management_generated/models/domain_deleted_response_all_of_data.rb +0 -190
- data/lib/sendmux_management_generated/models/domain_item_cursor_list_response.rb +0 -251
- data/lib/sendmux_management_generated/models/domain_item_response.rb +0 -223
- data/lib/sendmux_management_generated/models/domain_verify_response.rb +0 -223
- data/lib/sendmux_management_generated/models/email_metrics.rb +0 -218
- data/lib/sendmux_management_generated/models/email_metrics_comparison.rb +0 -294
- data/lib/sendmux_management_generated/models/email_metrics_comparison_change_pct.rb +0 -268
- data/lib/sendmux_management_generated/models/email_metrics_response.rb +0 -223
- data/lib/sendmux_management_generated/models/email_metrics_summary.rb +0 -268
- data/lib/sendmux_management_generated/models/email_metrics_timeseries_inner.rb +0 -294
- data/lib/sendmux_management_generated/models/filter_rule.rb +0 -242
- data/lib/sendmux_management_generated/models/filter_state.rb +0 -218
- data/lib/sendmux_management_generated/models/filter_state_response.rb +0 -223
- data/lib/sendmux_management_generated/models/incoming_log_item.rb +0 -465
- data/lib/sendmux_management_generated/models/incoming_log_item_cursor_list_response.rb +0 -251
- data/lib/sendmux_management_generated/models/incoming_log_item_response.rb +0 -223
- data/lib/sendmux_management_generated/models/mailbox.rb +0 -284
- data/lib/sendmux_management_generated/models/mailbox_app_password_result.rb +0 -164
- data/lib/sendmux_management_generated/models/mailbox_app_password_result_credential.rb +0 -359
- data/lib/sendmux_management_generated/models/mailbox_app_password_result_response.rb +0 -223
- data/lib/sendmux_management_generated/models/mailbox_availability_reason.rb +0 -45
- data/lib/sendmux_management_generated/models/mailbox_availability_response.rb +0 -223
- data/lib/sendmux_management_generated/models/mailbox_availability_result.rb +0 -240
- data/lib/sendmux_management_generated/models/mailbox_create_result.rb +0 -189
- data/lib/sendmux_management_generated/models/mailbox_create_result_response.rb +0 -223
- data/lib/sendmux_management_generated/models/mailbox_credential.rb +0 -353
- data/lib/sendmux_management_generated/models/mailbox_deleted_response.rb +0 -223
- data/lib/sendmux_management_generated/models/mailbox_domain.rb +0 -452
- data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +0 -303
- data/lib/sendmux_management_generated/models/mailbox_domain_mail_from_records.rb +0 -191
- data/lib/sendmux_management_generated/models/mailbox_domain_mx_record.rb +0 -190
- data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +0 -191
- data/lib/sendmux_management_generated/models/mailbox_domain_named_mx_record.rb +0 -217
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +0 -300
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +0 -377
- data/lib/sendmux_management_generated/models/mailbox_item_cursor_list_response.rb +0 -251
- data/lib/sendmux_management_generated/models/mailbox_item_response.rb +0 -223
- data/lib/sendmux_management_generated/models/mailbox_key_deleted_response.rb +0 -223
- data/lib/sendmux_management_generated/models/mailbox_send_scope.rb +0 -213
- data/lib/sendmux_management_generated/models/management_create_domain_request.rb +0 -209
- data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +0 -183
- data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +0 -270
- data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +0 -214
- data/lib/sendmux_management_generated/models/management_test_webhook200_response.rb +0 -223
- data/lib/sendmux_management_generated/models/management_update_domain_request.rb +0 -189
- data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +0 -294
- data/lib/sendmux_management_generated/models/provider_create_body.rb +0 -611
- data/lib/sendmux_management_generated/models/provider_create_body_quotas.rb +0 -174
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +0 -104
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day_any_of.rb +0 -215
- data/lib/sendmux_management_generated/models/provider_deleted.rb +0 -190
- data/lib/sendmux_management_generated/models/provider_deleted_response.rb +0 -223
- data/lib/sendmux_management_generated/models/provider_item.rb +0 -733
- data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +0 -251
- data/lib/sendmux_management_generated/models/provider_item_response.rb +0 -223
- data/lib/sendmux_management_generated/models/provider_limits.rb +0 -190
- data/lib/sendmux_management_generated/models/provider_limits_response.rb +0 -223
- data/lib/sendmux_management_generated/models/provider_list_item.rb +0 -695
- data/lib/sendmux_management_generated/models/provider_quota_range.rb +0 -208
- data/lib/sendmux_management_generated/models/provider_quotas.rb +0 -186
- data/lib/sendmux_management_generated/models/provider_stats.rb +0 -325
- data/lib/sendmux_management_generated/models/provider_stats_response.rb +0 -223
- data/lib/sendmux_management_generated/models/provider_status_counts.rb +0 -242
- data/lib/sendmux_management_generated/models/provider_test_result.rb +0 -251
- data/lib/sendmux_management_generated/models/provider_test_result_response.rb +0 -223
- data/lib/sendmux_management_generated/models/provider_type_counts.rb +0 -246
- data/lib/sendmux_management_generated/models/provider_update_body.rb +0 -569
- data/lib/sendmux_management_generated/models/provider_usage.rb +0 -216
- data/lib/sendmux_management_generated/models/provider_usage_item.rb +0 -374
- data/lib/sendmux_management_generated/models/provider_usage_response.rb +0 -223
- data/lib/sendmux_management_generated/models/resource_limit_snapshot.rb +0 -420
- data/lib/sendmux_management_generated/models/response_meta.rb +0 -164
- data/lib/sendmux_management_generated/models/sending_account_limit_request.rb +0 -190
- data/lib/sendmux_management_generated/models/sending_account_limit_request_response.rb +0 -223
- data/lib/sendmux_management_generated/models/set_filter_state_body.rb +0 -226
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +0 -315
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +0 -361
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel.rb +0 -190
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel_response.rb +0 -223
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +0 -190
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +0 -223
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page.rb +0 -176
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +0 -223
- data/lib/sendmux_management_generated/models/spend_summary.rb +0 -292
- data/lib/sendmux_management_generated/models/spend_summary_response.rb +0 -223
- data/lib/sendmux_management_generated/models/success_envelope.rb +0 -192
- data/lib/sendmux_management_generated/models/transaction.rb +0 -332
- data/lib/sendmux_management_generated/models/transaction_cursor_list_response.rb +0 -251
- data/lib/sendmux_management_generated/models/update_mailbox_body.rb +0 -211
- data/lib/sendmux_management_generated/models/update_mailbox_body_send_scope.rb +0 -214
- data/lib/sendmux_management_generated/models/webhook_create_body.rb +0 -269
- data/lib/sendmux_management_generated/models/webhook_deleted_response.rb +0 -223
- data/lib/sendmux_management_generated/models/webhook_delivery_attempt.rb +0 -562
- data/lib/sendmux_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +0 -251
- data/lib/sendmux_management_generated/models/webhook_delivery_payload.rb +0 -359
- data/lib/sendmux_management_generated/models/webhook_delivery_payload_response.rb +0 -223
- data/lib/sendmux_management_generated/models/webhook_event_data.rb +0 -395
- data/lib/sendmux_management_generated/models/webhook_event_payload.rb +0 -297
- data/lib/sendmux_management_generated/models/webhook_filters.rb +0 -168
- data/lib/sendmux_management_generated/models/webhook_subscription.rb +0 -380
- data/lib/sendmux_management_generated/models/webhook_subscription_cursor_list_response.rb +0 -251
- data/lib/sendmux_management_generated/models/webhook_subscription_response.rb +0 -223
- data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +0 -414
- data/lib/sendmux_management_generated/models/webhook_subscription_with_secret_response.rb +0 -223
- data/lib/sendmux_management_generated/models/webhook_test_response.rb +0 -165
- data/lib/sendmux_management_generated/models/webhook_update_body.rb +0 -233
- data/lib/sendmux_management_generated/version.rb +0 -15
- data/lib/sendmux_management_generated.rb +0 -175
|
@@ -1,208 +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 ProviderQuotaRange < ApiModelBase
|
|
18
|
-
attr_accessor :max
|
|
19
|
-
|
|
20
|
-
attr_accessor :min
|
|
21
|
-
|
|
22
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
-
def self.attribute_map
|
|
24
|
-
{
|
|
25
|
-
:'max' => :'max',
|
|
26
|
-
:'min' => :'min'
|
|
27
|
-
}
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Returns attribute mapping this model knows about
|
|
31
|
-
def self.acceptable_attribute_map
|
|
32
|
-
attribute_map
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# Returns all the JSON keys this model knows about
|
|
36
|
-
def self.acceptable_attributes
|
|
37
|
-
acceptable_attribute_map.values
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# Attribute type mapping.
|
|
41
|
-
def self.openapi_types
|
|
42
|
-
{
|
|
43
|
-
:'max' => :'Integer',
|
|
44
|
-
:'min' => :'Integer'
|
|
45
|
-
}
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# List of attributes with nullable: true
|
|
49
|
-
def self.openapi_nullable
|
|
50
|
-
Set.new([
|
|
51
|
-
])
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# Initializes the object
|
|
55
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
-
def initialize(attributes = {})
|
|
57
|
-
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::ProviderQuotaRange` initialize method"
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::ProviderQuotaRange`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
-
end
|
|
67
|
-
h[k.to_sym] = v
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if attributes.key?(:'max')
|
|
71
|
-
self.max = attributes[:'max']
|
|
72
|
-
else
|
|
73
|
-
self.max = nil
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
if attributes.key?(:'min')
|
|
77
|
-
self.min = attributes[:'min']
|
|
78
|
-
else
|
|
79
|
-
self.min = nil
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
-
# @return Array for valid properties with the reasons
|
|
85
|
-
def list_invalid_properties
|
|
86
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
-
invalid_properties = Array.new
|
|
88
|
-
if @max.nil?
|
|
89
|
-
invalid_properties.push('invalid value for "max", max cannot be nil.')
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
if @max <= 0
|
|
93
|
-
invalid_properties.push('invalid value for "max", must be greater than 0.')
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
if @min.nil?
|
|
97
|
-
invalid_properties.push('invalid value for "min", min cannot be nil.')
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
if @min <= 0
|
|
101
|
-
invalid_properties.push('invalid value for "min", must be greater than 0.')
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
invalid_properties
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Check to see if the all the properties in the model are valid
|
|
108
|
-
# @return true if the model is valid
|
|
109
|
-
def valid?
|
|
110
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
111
|
-
return false if @max.nil?
|
|
112
|
-
return false if @max <= 0
|
|
113
|
-
return false if @min.nil?
|
|
114
|
-
return false if @min <= 0
|
|
115
|
-
true
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
# Custom attribute writer method with validation
|
|
119
|
-
# @param [Object] max Value to be assigned
|
|
120
|
-
def max=(max)
|
|
121
|
-
if max.nil?
|
|
122
|
-
fail ArgumentError, 'max cannot be nil'
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if max <= 0
|
|
126
|
-
fail ArgumentError, 'invalid value for "max", must be greater than 0.'
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
@max = max
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
# Custom attribute writer method with validation
|
|
133
|
-
# @param [Object] min Value to be assigned
|
|
134
|
-
def min=(min)
|
|
135
|
-
if min.nil?
|
|
136
|
-
fail ArgumentError, 'min cannot be nil'
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
if min <= 0
|
|
140
|
-
fail ArgumentError, 'invalid value for "min", must be greater than 0.'
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
@min = min
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# Checks equality by comparing each attribute.
|
|
147
|
-
# @param [Object] Object to be compared
|
|
148
|
-
def ==(o)
|
|
149
|
-
return true if self.equal?(o)
|
|
150
|
-
self.class == o.class &&
|
|
151
|
-
max == o.max &&
|
|
152
|
-
min == o.min
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
# @see the `==` method
|
|
156
|
-
# @param [Object] Object to be compared
|
|
157
|
-
def eql?(o)
|
|
158
|
-
self == o
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
# Calculates hash code according to all attributes.
|
|
162
|
-
# @return [Integer] Hash code
|
|
163
|
-
def hash
|
|
164
|
-
[max, min].hash
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
# Builds the object from hash
|
|
168
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
169
|
-
# @return [Object] Returns the model itself
|
|
170
|
-
def self.build_from_hash(attributes)
|
|
171
|
-
return nil unless attributes.is_a?(Hash)
|
|
172
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
173
|
-
transformed_hash = {}
|
|
174
|
-
openapi_types.each_pair do |key, type|
|
|
175
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
176
|
-
transformed_hash["#{key}"] = nil
|
|
177
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
178
|
-
# check to ensure the input is an array given that the attribute
|
|
179
|
-
# is documented as an array but the input is not
|
|
180
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
181
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
182
|
-
end
|
|
183
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
184
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
185
|
-
end
|
|
186
|
-
end
|
|
187
|
-
new(transformed_hash)
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
# Returns the object in the form of hash
|
|
191
|
-
# @return [Hash] Returns the object in the form of hash
|
|
192
|
-
def to_hash
|
|
193
|
-
hash = {}
|
|
194
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
195
|
-
value = self.send(attr)
|
|
196
|
-
if value.nil?
|
|
197
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
198
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
hash[param] = _to_hash(value)
|
|
202
|
-
end
|
|
203
|
-
hash
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
end
|
|
207
|
-
|
|
208
|
-
end
|
|
@@ -1,186 +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 ProviderQuotas < ApiModelBase
|
|
18
|
-
attr_accessor :per_day
|
|
19
|
-
|
|
20
|
-
attr_accessor :per_hour
|
|
21
|
-
|
|
22
|
-
attr_accessor :per_minute
|
|
23
|
-
|
|
24
|
-
attr_accessor :per_second
|
|
25
|
-
|
|
26
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
-
def self.attribute_map
|
|
28
|
-
{
|
|
29
|
-
:'per_day' => :'per_day',
|
|
30
|
-
:'per_hour' => :'per_hour',
|
|
31
|
-
:'per_minute' => :'per_minute',
|
|
32
|
-
:'per_second' => :'per_second'
|
|
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
|
-
:'per_day' => :'ProviderQuotaRange',
|
|
50
|
-
:'per_hour' => :'ProviderQuotaRange',
|
|
51
|
-
:'per_minute' => :'ProviderQuotaRange',
|
|
52
|
-
:'per_second' => :'ProviderQuotaRange'
|
|
53
|
-
}
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# List of attributes with nullable: true
|
|
57
|
-
def self.openapi_nullable
|
|
58
|
-
Set.new([
|
|
59
|
-
:'per_day',
|
|
60
|
-
:'per_hour',
|
|
61
|
-
:'per_minute',
|
|
62
|
-
:'per_second'
|
|
63
|
-
])
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# Initializes the object
|
|
67
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
-
def initialize(attributes = {})
|
|
69
|
-
if (!attributes.is_a?(Hash))
|
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::ProviderQuotas` initialize method"
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::ProviderQuotas`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
-
end
|
|
79
|
-
h[k.to_sym] = v
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if attributes.key?(:'per_day')
|
|
83
|
-
self.per_day = attributes[:'per_day']
|
|
84
|
-
else
|
|
85
|
-
self.per_day = nil
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
if attributes.key?(:'per_hour')
|
|
89
|
-
self.per_hour = attributes[:'per_hour']
|
|
90
|
-
else
|
|
91
|
-
self.per_hour = nil
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
if attributes.key?(:'per_minute')
|
|
95
|
-
self.per_minute = attributes[:'per_minute']
|
|
96
|
-
else
|
|
97
|
-
self.per_minute = nil
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
if attributes.key?(:'per_second')
|
|
101
|
-
self.per_second = attributes[:'per_second']
|
|
102
|
-
else
|
|
103
|
-
self.per_second = nil
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
|
-
# @return Array for valid properties with the reasons
|
|
109
|
-
def list_invalid_properties
|
|
110
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
|
-
invalid_properties = Array.new
|
|
112
|
-
invalid_properties
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
# Check to see if the all the properties in the model are valid
|
|
116
|
-
# @return true if the model is valid
|
|
117
|
-
def valid?
|
|
118
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
119
|
-
true
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
# Checks equality by comparing each attribute.
|
|
123
|
-
# @param [Object] Object to be compared
|
|
124
|
-
def ==(o)
|
|
125
|
-
return true if self.equal?(o)
|
|
126
|
-
self.class == o.class &&
|
|
127
|
-
per_day == o.per_day &&
|
|
128
|
-
per_hour == o.per_hour &&
|
|
129
|
-
per_minute == o.per_minute &&
|
|
130
|
-
per_second == o.per_second
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
# @see the `==` method
|
|
134
|
-
# @param [Object] Object to be compared
|
|
135
|
-
def eql?(o)
|
|
136
|
-
self == o
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
# Calculates hash code according to all attributes.
|
|
140
|
-
# @return [Integer] Hash code
|
|
141
|
-
def hash
|
|
142
|
-
[per_day, per_hour, per_minute, per_second].hash
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
# Builds the object from hash
|
|
146
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
147
|
-
# @return [Object] Returns the model itself
|
|
148
|
-
def self.build_from_hash(attributes)
|
|
149
|
-
return nil unless attributes.is_a?(Hash)
|
|
150
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
151
|
-
transformed_hash = {}
|
|
152
|
-
openapi_types.each_pair do |key, type|
|
|
153
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
154
|
-
transformed_hash["#{key}"] = nil
|
|
155
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
156
|
-
# check to ensure the input is an array given that the attribute
|
|
157
|
-
# is documented as an array but the input is not
|
|
158
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
159
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
160
|
-
end
|
|
161
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
162
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
new(transformed_hash)
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# Returns the object in the form of hash
|
|
169
|
-
# @return [Hash] Returns the object in the form of hash
|
|
170
|
-
def to_hash
|
|
171
|
-
hash = {}
|
|
172
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
173
|
-
value = self.send(attr)
|
|
174
|
-
if value.nil?
|
|
175
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
176
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
hash[param] = _to_hash(value)
|
|
180
|
-
end
|
|
181
|
-
hash
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
end
|
|
@@ -1,325 +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 ProviderStats < ApiModelBase
|
|
18
|
-
# Accounts with status 'active'
|
|
19
|
-
attr_accessor :active
|
|
20
|
-
|
|
21
|
-
attr_accessor :by_status
|
|
22
|
-
|
|
23
|
-
attr_accessor :by_type
|
|
24
|
-
|
|
25
|
-
# Accounts with status 'error'
|
|
26
|
-
attr_accessor :error
|
|
27
|
-
|
|
28
|
-
# Accounts with status 'inactive'
|
|
29
|
-
attr_accessor :inactive
|
|
30
|
-
|
|
31
|
-
# Accounts with status 'pending'
|
|
32
|
-
attr_accessor :pending
|
|
33
|
-
|
|
34
|
-
# Total number of sending accounts
|
|
35
|
-
attr_accessor :total
|
|
36
|
-
|
|
37
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
-
def self.attribute_map
|
|
39
|
-
{
|
|
40
|
-
:'active' => :'active',
|
|
41
|
-
:'by_status' => :'by_status',
|
|
42
|
-
:'by_type' => :'by_type',
|
|
43
|
-
:'error' => :'error',
|
|
44
|
-
:'inactive' => :'inactive',
|
|
45
|
-
:'pending' => :'pending',
|
|
46
|
-
:'total' => :'total'
|
|
47
|
-
}
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Returns attribute mapping this model knows about
|
|
51
|
-
def self.acceptable_attribute_map
|
|
52
|
-
attribute_map
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
# Returns all the JSON keys this model knows about
|
|
56
|
-
def self.acceptable_attributes
|
|
57
|
-
acceptable_attribute_map.values
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# Attribute type mapping.
|
|
61
|
-
def self.openapi_types
|
|
62
|
-
{
|
|
63
|
-
:'active' => :'Float',
|
|
64
|
-
:'by_status' => :'ProviderStatusCounts',
|
|
65
|
-
:'by_type' => :'ProviderTypeCounts',
|
|
66
|
-
:'error' => :'Float',
|
|
67
|
-
:'inactive' => :'Float',
|
|
68
|
-
:'pending' => :'Float',
|
|
69
|
-
:'total' => :'Float'
|
|
70
|
-
}
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
# List of attributes with nullable: true
|
|
74
|
-
def self.openapi_nullable
|
|
75
|
-
Set.new([
|
|
76
|
-
])
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
# Initializes the object
|
|
80
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
81
|
-
def initialize(attributes = {})
|
|
82
|
-
if (!attributes.is_a?(Hash))
|
|
83
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::ProviderStats` initialize method"
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
87
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
88
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
90
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::ProviderStats`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
91
|
-
end
|
|
92
|
-
h[k.to_sym] = v
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if attributes.key?(:'active')
|
|
96
|
-
self.active = attributes[:'active']
|
|
97
|
-
else
|
|
98
|
-
self.active = nil
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
if attributes.key?(:'by_status')
|
|
102
|
-
self.by_status = attributes[:'by_status']
|
|
103
|
-
else
|
|
104
|
-
self.by_status = nil
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
if attributes.key?(:'by_type')
|
|
108
|
-
self.by_type = attributes[:'by_type']
|
|
109
|
-
else
|
|
110
|
-
self.by_type = nil
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
if attributes.key?(:'error')
|
|
114
|
-
self.error = attributes[:'error']
|
|
115
|
-
else
|
|
116
|
-
self.error = nil
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
if attributes.key?(:'inactive')
|
|
120
|
-
self.inactive = attributes[:'inactive']
|
|
121
|
-
else
|
|
122
|
-
self.inactive = nil
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if attributes.key?(:'pending')
|
|
126
|
-
self.pending = attributes[:'pending']
|
|
127
|
-
else
|
|
128
|
-
self.pending = nil
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
if attributes.key?(:'total')
|
|
132
|
-
self.total = attributes[:'total']
|
|
133
|
-
else
|
|
134
|
-
self.total = nil
|
|
135
|
-
end
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
139
|
-
# @return Array for valid properties with the reasons
|
|
140
|
-
def list_invalid_properties
|
|
141
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
142
|
-
invalid_properties = Array.new
|
|
143
|
-
if @active.nil?
|
|
144
|
-
invalid_properties.push('invalid value for "active", active cannot be nil.')
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
if @by_status.nil?
|
|
148
|
-
invalid_properties.push('invalid value for "by_status", by_status cannot be nil.')
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
if @by_type.nil?
|
|
152
|
-
invalid_properties.push('invalid value for "by_type", by_type cannot be nil.')
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
if @error.nil?
|
|
156
|
-
invalid_properties.push('invalid value for "error", error cannot be nil.')
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
if @inactive.nil?
|
|
160
|
-
invalid_properties.push('invalid value for "inactive", inactive cannot be nil.')
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
if @pending.nil?
|
|
164
|
-
invalid_properties.push('invalid value for "pending", pending cannot be nil.')
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
if @total.nil?
|
|
168
|
-
invalid_properties.push('invalid value for "total", total cannot be nil.')
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
invalid_properties
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
# Check to see if the all the properties in the model are valid
|
|
175
|
-
# @return true if the model is valid
|
|
176
|
-
def valid?
|
|
177
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
178
|
-
return false if @active.nil?
|
|
179
|
-
return false if @by_status.nil?
|
|
180
|
-
return false if @by_type.nil?
|
|
181
|
-
return false if @error.nil?
|
|
182
|
-
return false if @inactive.nil?
|
|
183
|
-
return false if @pending.nil?
|
|
184
|
-
return false if @total.nil?
|
|
185
|
-
true
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
# Custom attribute writer method with validation
|
|
189
|
-
# @param [Object] active Value to be assigned
|
|
190
|
-
def active=(active)
|
|
191
|
-
if active.nil?
|
|
192
|
-
fail ArgumentError, 'active cannot be nil'
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
@active = active
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
# Custom attribute writer method with validation
|
|
199
|
-
# @param [Object] by_status Value to be assigned
|
|
200
|
-
def by_status=(by_status)
|
|
201
|
-
if by_status.nil?
|
|
202
|
-
fail ArgumentError, 'by_status cannot be nil'
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
@by_status = by_status
|
|
206
|
-
end
|
|
207
|
-
|
|
208
|
-
# Custom attribute writer method with validation
|
|
209
|
-
# @param [Object] by_type Value to be assigned
|
|
210
|
-
def by_type=(by_type)
|
|
211
|
-
if by_type.nil?
|
|
212
|
-
fail ArgumentError, 'by_type cannot be nil'
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
@by_type = by_type
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
# Custom attribute writer method with validation
|
|
219
|
-
# @param [Object] error Value to be assigned
|
|
220
|
-
def error=(error)
|
|
221
|
-
if error.nil?
|
|
222
|
-
fail ArgumentError, 'error cannot be nil'
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
@error = error
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
# Custom attribute writer method with validation
|
|
229
|
-
# @param [Object] inactive Value to be assigned
|
|
230
|
-
def inactive=(inactive)
|
|
231
|
-
if inactive.nil?
|
|
232
|
-
fail ArgumentError, 'inactive cannot be nil'
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
@inactive = inactive
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
# Custom attribute writer method with validation
|
|
239
|
-
# @param [Object] pending Value to be assigned
|
|
240
|
-
def pending=(pending)
|
|
241
|
-
if pending.nil?
|
|
242
|
-
fail ArgumentError, 'pending cannot be nil'
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
@pending = pending
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
# Custom attribute writer method with validation
|
|
249
|
-
# @param [Object] total Value to be assigned
|
|
250
|
-
def total=(total)
|
|
251
|
-
if total.nil?
|
|
252
|
-
fail ArgumentError, 'total cannot be nil'
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
@total = total
|
|
256
|
-
end
|
|
257
|
-
|
|
258
|
-
# Checks equality by comparing each attribute.
|
|
259
|
-
# @param [Object] Object to be compared
|
|
260
|
-
def ==(o)
|
|
261
|
-
return true if self.equal?(o)
|
|
262
|
-
self.class == o.class &&
|
|
263
|
-
active == o.active &&
|
|
264
|
-
by_status == o.by_status &&
|
|
265
|
-
by_type == o.by_type &&
|
|
266
|
-
error == o.error &&
|
|
267
|
-
inactive == o.inactive &&
|
|
268
|
-
pending == o.pending &&
|
|
269
|
-
total == o.total
|
|
270
|
-
end
|
|
271
|
-
|
|
272
|
-
# @see the `==` method
|
|
273
|
-
# @param [Object] Object to be compared
|
|
274
|
-
def eql?(o)
|
|
275
|
-
self == o
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
# Calculates hash code according to all attributes.
|
|
279
|
-
# @return [Integer] Hash code
|
|
280
|
-
def hash
|
|
281
|
-
[active, by_status, by_type, error, inactive, pending, total].hash
|
|
282
|
-
end
|
|
283
|
-
|
|
284
|
-
# Builds the object from hash
|
|
285
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
286
|
-
# @return [Object] Returns the model itself
|
|
287
|
-
def self.build_from_hash(attributes)
|
|
288
|
-
return nil unless attributes.is_a?(Hash)
|
|
289
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
290
|
-
transformed_hash = {}
|
|
291
|
-
openapi_types.each_pair do |key, type|
|
|
292
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
293
|
-
transformed_hash["#{key}"] = nil
|
|
294
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
295
|
-
# check to ensure the input is an array given that the attribute
|
|
296
|
-
# is documented as an array but the input is not
|
|
297
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
298
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
299
|
-
end
|
|
300
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
301
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
302
|
-
end
|
|
303
|
-
end
|
|
304
|
-
new(transformed_hash)
|
|
305
|
-
end
|
|
306
|
-
|
|
307
|
-
# Returns the object in the form of hash
|
|
308
|
-
# @return [Hash] Returns the object in the form of hash
|
|
309
|
-
def to_hash
|
|
310
|
-
hash = {}
|
|
311
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
312
|
-
value = self.send(attr)
|
|
313
|
-
if value.nil?
|
|
314
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
315
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
hash[param] = _to_hash(value)
|
|
319
|
-
end
|
|
320
|
-
hash
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
end
|
|
324
|
-
|
|
325
|
-
end
|