sendmux-management 2.0.1 → 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 (147) hide show
  1. checksums.yaml +4 -4
  2. metadata +13 -224
  3. data/CHANGELOG.md +0 -92
  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_response.rb +0 -223
  61. data/lib/sendmux_management_generated/models/mailbox_availability_reason.rb +0 -45
  62. data/lib/sendmux_management_generated/models/mailbox_availability_response.rb +0 -223
  63. data/lib/sendmux_management_generated/models/mailbox_availability_result.rb +0 -240
  64. data/lib/sendmux_management_generated/models/mailbox_create_result.rb +0 -190
  65. data/lib/sendmux_management_generated/models/mailbox_create_result_response.rb +0 -223
  66. data/lib/sendmux_management_generated/models/mailbox_credential.rb +0 -352
  67. data/lib/sendmux_management_generated/models/mailbox_deleted_response.rb +0 -223
  68. data/lib/sendmux_management_generated/models/mailbox_domain.rb +0 -452
  69. data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +0 -303
  70. data/lib/sendmux_management_generated/models/mailbox_domain_mail_from_records.rb +0 -191
  71. data/lib/sendmux_management_generated/models/mailbox_domain_mx_record.rb +0 -190
  72. data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +0 -191
  73. data/lib/sendmux_management_generated/models/mailbox_domain_named_mx_record.rb +0 -217
  74. data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +0 -300
  75. data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +0 -377
  76. data/lib/sendmux_management_generated/models/mailbox_item_cursor_list_response.rb +0 -251
  77. data/lib/sendmux_management_generated/models/mailbox_item_response.rb +0 -223
  78. data/lib/sendmux_management_generated/models/mailbox_key_deleted_response.rb +0 -223
  79. data/lib/sendmux_management_generated/models/mailbox_send_scope.rb +0 -213
  80. data/lib/sendmux_management_generated/models/management_create_domain_request.rb +0 -209
  81. data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +0 -183
  82. data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +0 -270
  83. data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +0 -214
  84. data/lib/sendmux_management_generated/models/management_test_webhook200_response.rb +0 -223
  85. data/lib/sendmux_management_generated/models/management_update_domain_request.rb +0 -189
  86. data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +0 -294
  87. data/lib/sendmux_management_generated/models/provider_create_body.rb +0 -611
  88. data/lib/sendmux_management_generated/models/provider_create_body_quotas.rb +0 -174
  89. data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +0 -104
  90. data/lib/sendmux_management_generated/models/provider_deleted.rb +0 -190
  91. data/lib/sendmux_management_generated/models/provider_deleted_response.rb +0 -223
  92. data/lib/sendmux_management_generated/models/provider_item.rb +0 -733
  93. data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +0 -251
  94. data/lib/sendmux_management_generated/models/provider_item_response.rb +0 -223
  95. data/lib/sendmux_management_generated/models/provider_limits.rb +0 -190
  96. data/lib/sendmux_management_generated/models/provider_limits_response.rb +0 -223
  97. data/lib/sendmux_management_generated/models/provider_list_item.rb +0 -695
  98. data/lib/sendmux_management_generated/models/provider_quota_range.rb +0 -208
  99. data/lib/sendmux_management_generated/models/provider_quotas.rb +0 -186
  100. data/lib/sendmux_management_generated/models/provider_stats.rb +0 -325
  101. data/lib/sendmux_management_generated/models/provider_stats_response.rb +0 -223
  102. data/lib/sendmux_management_generated/models/provider_status_counts.rb +0 -242
  103. data/lib/sendmux_management_generated/models/provider_test_result.rb +0 -251
  104. data/lib/sendmux_management_generated/models/provider_test_result_response.rb +0 -223
  105. data/lib/sendmux_management_generated/models/provider_type_counts.rb +0 -246
  106. data/lib/sendmux_management_generated/models/provider_update_body.rb +0 -569
  107. data/lib/sendmux_management_generated/models/provider_usage.rb +0 -216
  108. data/lib/sendmux_management_generated/models/provider_usage_item.rb +0 -374
  109. data/lib/sendmux_management_generated/models/provider_usage_response.rb +0 -223
  110. data/lib/sendmux_management_generated/models/resource_limit_snapshot.rb +0 -420
  111. data/lib/sendmux_management_generated/models/response_meta.rb +0 -164
  112. data/lib/sendmux_management_generated/models/sending_account_limit_request.rb +0 -190
  113. data/lib/sendmux_management_generated/models/sending_account_limit_request_response.rb +0 -223
  114. data/lib/sendmux_management_generated/models/set_filter_state_body.rb +0 -226
  115. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +0 -315
  116. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +0 -361
  117. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel.rb +0 -190
  118. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel_response.rb +0 -223
  119. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +0 -190
  120. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +0 -223
  121. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page.rb +0 -176
  122. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +0 -223
  123. data/lib/sendmux_management_generated/models/spend_summary.rb +0 -292
  124. data/lib/sendmux_management_generated/models/spend_summary_response.rb +0 -223
  125. data/lib/sendmux_management_generated/models/success_envelope.rb +0 -192
  126. data/lib/sendmux_management_generated/models/transaction.rb +0 -332
  127. data/lib/sendmux_management_generated/models/transaction_cursor_list_response.rb +0 -251
  128. data/lib/sendmux_management_generated/models/update_mailbox_body.rb +0 -211
  129. data/lib/sendmux_management_generated/models/update_mailbox_body_send_scope.rb +0 -214
  130. data/lib/sendmux_management_generated/models/webhook_create_body.rb +0 -269
  131. data/lib/sendmux_management_generated/models/webhook_deleted_response.rb +0 -223
  132. data/lib/sendmux_management_generated/models/webhook_delivery_attempt.rb +0 -562
  133. data/lib/sendmux_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +0 -251
  134. data/lib/sendmux_management_generated/models/webhook_delivery_payload.rb +0 -359
  135. data/lib/sendmux_management_generated/models/webhook_delivery_payload_response.rb +0 -223
  136. data/lib/sendmux_management_generated/models/webhook_event_data.rb +0 -395
  137. data/lib/sendmux_management_generated/models/webhook_event_payload.rb +0 -297
  138. data/lib/sendmux_management_generated/models/webhook_filters.rb +0 -168
  139. data/lib/sendmux_management_generated/models/webhook_subscription.rb +0 -380
  140. data/lib/sendmux_management_generated/models/webhook_subscription_cursor_list_response.rb +0 -251
  141. data/lib/sendmux_management_generated/models/webhook_subscription_response.rb +0 -223
  142. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +0 -407
  143. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret_response.rb +0 -223
  144. data/lib/sendmux_management_generated/models/webhook_test_response.rb +0 -165
  145. data/lib/sendmux_management_generated/models/webhook_update_body.rb +0 -233
  146. data/lib/sendmux_management_generated/version.rb +0 -15
  147. data/lib/sendmux_management_generated.rb +0 -181
@@ -1,191 +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
- # SPF TXT record for the custom MAIL FROM subdomain
18
- class MailboxDomainNameValueRecord < ApiModelBase
19
- attr_accessor :name
20
-
21
- attr_accessor :value
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'name' => :'name',
27
- :'value' => :'value'
28
- }
29
- end
30
-
31
- # Returns attribute mapping this model knows about
32
- def self.acceptable_attribute_map
33
- attribute_map
34
- end
35
-
36
- # Returns all the JSON keys this model knows about
37
- def self.acceptable_attributes
38
- acceptable_attribute_map.values
39
- end
40
-
41
- # Attribute type mapping.
42
- def self.openapi_types
43
- {
44
- :'name' => :'String',
45
- :'value' => :'String'
46
- }
47
- end
48
-
49
- # List of attributes with nullable: true
50
- def self.openapi_nullable
51
- Set.new([
52
- ])
53
- end
54
-
55
- # Initializes the object
56
- # @param [Hash] attributes Model attributes in the form of hash
57
- def initialize(attributes = {})
58
- if (!attributes.is_a?(Hash))
59
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::MailboxDomainNameValueRecord` initialize method"
60
- end
61
-
62
- # check to see if the attribute exists and convert string to symbol for hash key
63
- acceptable_attribute_map = self.class.acceptable_attribute_map
64
- attributes = attributes.each_with_object({}) { |(k, v), h|
65
- if (!acceptable_attribute_map.key?(k.to_sym))
66
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::MailboxDomainNameValueRecord`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
- end
68
- h[k.to_sym] = v
69
- }
70
-
71
- if attributes.key?(:'name')
72
- self.name = attributes[:'name']
73
- else
74
- self.name = nil
75
- end
76
-
77
- if attributes.key?(:'value')
78
- self.value = attributes[:'value']
79
- else
80
- self.value = nil
81
- end
82
- end
83
-
84
- # Show invalid properties with the reasons. Usually used together with valid?
85
- # @return Array for valid properties with the reasons
86
- def list_invalid_properties
87
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
- invalid_properties = Array.new
89
- if @name.nil?
90
- invalid_properties.push('invalid value for "name", name cannot be nil.')
91
- end
92
-
93
- if @value.nil?
94
- invalid_properties.push('invalid value for "value", value cannot be nil.')
95
- end
96
-
97
- invalid_properties
98
- end
99
-
100
- # Check to see if the all the properties in the model are valid
101
- # @return true if the model is valid
102
- def valid?
103
- warn '[DEPRECATED] the `valid?` method is obsolete'
104
- return false if @name.nil?
105
- return false if @value.nil?
106
- true
107
- end
108
-
109
- # Custom attribute writer method with validation
110
- # @param [Object] name Value to be assigned
111
- def name=(name)
112
- if name.nil?
113
- fail ArgumentError, 'name cannot be nil'
114
- end
115
-
116
- @name = name
117
- end
118
-
119
- # Custom attribute writer method with validation
120
- # @param [Object] value Value to be assigned
121
- def value=(value)
122
- if value.nil?
123
- fail ArgumentError, 'value cannot be nil'
124
- end
125
-
126
- @value = value
127
- end
128
-
129
- # Checks equality by comparing each attribute.
130
- # @param [Object] Object to be compared
131
- def ==(o)
132
- return true if self.equal?(o)
133
- self.class == o.class &&
134
- name == o.name &&
135
- value == o.value
136
- end
137
-
138
- # @see the `==` method
139
- # @param [Object] Object to be compared
140
- def eql?(o)
141
- self == o
142
- end
143
-
144
- # Calculates hash code according to all attributes.
145
- # @return [Integer] Hash code
146
- def hash
147
- [name, value].hash
148
- end
149
-
150
- # Builds the object from hash
151
- # @param [Hash] attributes Model attributes in the form of hash
152
- # @return [Object] Returns the model itself
153
- def self.build_from_hash(attributes)
154
- return nil unless attributes.is_a?(Hash)
155
- attributes = attributes.transform_keys(&:to_sym)
156
- transformed_hash = {}
157
- openapi_types.each_pair do |key, type|
158
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
159
- transformed_hash["#{key}"] = nil
160
- elsif type =~ /\AArray<(.*)>/i
161
- # check to ensure the input is an array given that the attribute
162
- # is documented as an array but the input is not
163
- if attributes[attribute_map[key]].is_a?(Array)
164
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
165
- end
166
- elsif !attributes[attribute_map[key]].nil?
167
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
168
- end
169
- end
170
- new(transformed_hash)
171
- end
172
-
173
- # Returns the object in the form of hash
174
- # @return [Hash] Returns the object in the form of hash
175
- def to_hash
176
- hash = {}
177
- self.class.attribute_map.each_pair do |attr, param|
178
- value = self.send(attr)
179
- if value.nil?
180
- is_nullable = self.class.openapi_nullable.include?(attr)
181
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
- end
183
-
184
- hash[param] = _to_hash(value)
185
- end
186
- hash
187
- end
188
-
189
- end
190
-
191
- end
@@ -1,217 +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
- # MX record for Amazon SES bounce handling
18
- class MailboxDomainNamedMxRecord < ApiModelBase
19
- attr_accessor :name
20
-
21
- attr_accessor :priority
22
-
23
- attr_accessor :target
24
-
25
- # Attribute mapping from ruby-style variable name to JSON key.
26
- def self.attribute_map
27
- {
28
- :'name' => :'name',
29
- :'priority' => :'priority',
30
- :'target' => :'target'
31
- }
32
- end
33
-
34
- # Returns attribute mapping this model knows about
35
- def self.acceptable_attribute_map
36
- attribute_map
37
- end
38
-
39
- # Returns all the JSON keys this model knows about
40
- def self.acceptable_attributes
41
- acceptable_attribute_map.values
42
- end
43
-
44
- # Attribute type mapping.
45
- def self.openapi_types
46
- {
47
- :'name' => :'String',
48
- :'priority' => :'Integer',
49
- :'target' => :'String'
50
- }
51
- end
52
-
53
- # List of attributes with nullable: true
54
- def self.openapi_nullable
55
- Set.new([
56
- ])
57
- end
58
-
59
- # Initializes the object
60
- # @param [Hash] attributes Model attributes in the form of hash
61
- def initialize(attributes = {})
62
- if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::MailboxDomainNamedMxRecord` initialize method"
64
- end
65
-
66
- # check to see if the attribute exists and convert string to symbol for hash key
67
- acceptable_attribute_map = self.class.acceptable_attribute_map
68
- attributes = attributes.each_with_object({}) { |(k, v), h|
69
- if (!acceptable_attribute_map.key?(k.to_sym))
70
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::MailboxDomainNamedMxRecord`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
- end
72
- h[k.to_sym] = v
73
- }
74
-
75
- if attributes.key?(:'name')
76
- self.name = attributes[:'name']
77
- else
78
- self.name = nil
79
- end
80
-
81
- if attributes.key?(:'priority')
82
- self.priority = attributes[:'priority']
83
- else
84
- self.priority = nil
85
- end
86
-
87
- if attributes.key?(:'target')
88
- self.target = attributes[:'target']
89
- else
90
- self.target = nil
91
- end
92
- end
93
-
94
- # Show invalid properties with the reasons. Usually used together with valid?
95
- # @return Array for valid properties with the reasons
96
- def list_invalid_properties
97
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
- invalid_properties = Array.new
99
- if @name.nil?
100
- invalid_properties.push('invalid value for "name", name cannot be nil.')
101
- end
102
-
103
- if @priority.nil?
104
- invalid_properties.push('invalid value for "priority", priority cannot be nil.')
105
- end
106
-
107
- if @target.nil?
108
- invalid_properties.push('invalid value for "target", target cannot be nil.')
109
- end
110
-
111
- invalid_properties
112
- end
113
-
114
- # Check to see if the all the properties in the model are valid
115
- # @return true if the model is valid
116
- def valid?
117
- warn '[DEPRECATED] the `valid?` method is obsolete'
118
- return false if @name.nil?
119
- return false if @priority.nil?
120
- return false if @target.nil?
121
- true
122
- end
123
-
124
- # Custom attribute writer method with validation
125
- # @param [Object] name Value to be assigned
126
- def name=(name)
127
- if name.nil?
128
- fail ArgumentError, 'name cannot be nil'
129
- end
130
-
131
- @name = name
132
- end
133
-
134
- # Custom attribute writer method with validation
135
- # @param [Object] priority Value to be assigned
136
- def priority=(priority)
137
- if priority.nil?
138
- fail ArgumentError, 'priority cannot be nil'
139
- end
140
-
141
- @priority = priority
142
- end
143
-
144
- # Custom attribute writer method with validation
145
- # @param [Object] target Value to be assigned
146
- def target=(target)
147
- if target.nil?
148
- fail ArgumentError, 'target cannot be nil'
149
- end
150
-
151
- @target = target
152
- end
153
-
154
- # Checks equality by comparing each attribute.
155
- # @param [Object] Object to be compared
156
- def ==(o)
157
- return true if self.equal?(o)
158
- self.class == o.class &&
159
- name == o.name &&
160
- priority == o.priority &&
161
- target == o.target
162
- end
163
-
164
- # @see the `==` method
165
- # @param [Object] Object to be compared
166
- def eql?(o)
167
- self == o
168
- end
169
-
170
- # Calculates hash code according to all attributes.
171
- # @return [Integer] Hash code
172
- def hash
173
- [name, priority, target].hash
174
- end
175
-
176
- # Builds the object from hash
177
- # @param [Hash] attributes Model attributes in the form of hash
178
- # @return [Object] Returns the model itself
179
- def self.build_from_hash(attributes)
180
- return nil unless attributes.is_a?(Hash)
181
- attributes = attributes.transform_keys(&:to_sym)
182
- transformed_hash = {}
183
- openapi_types.each_pair do |key, type|
184
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
185
- transformed_hash["#{key}"] = nil
186
- elsif type =~ /\AArray<(.*)>/i
187
- # check to ensure the input is an array given that the attribute
188
- # is documented as an array but the input is not
189
- if attributes[attribute_map[key]].is_a?(Array)
190
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
191
- end
192
- elsif !attributes[attribute_map[key]].nil?
193
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
194
- end
195
- end
196
- new(transformed_hash)
197
- end
198
-
199
- # Returns the object in the form of hash
200
- # @return [Hash] Returns the object in the form of hash
201
- def to_hash
202
- hash = {}
203
- self.class.attribute_map.each_pair do |attr, param|
204
- value = self.send(attr)
205
- if value.nil?
206
- is_nullable = self.class.openapi_nullable.include?(attr)
207
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
- end
209
-
210
- hash[param] = _to_hash(value)
211
- end
212
- hash
213
- end
214
-
215
- end
216
-
217
- end
@@ -1,300 +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 MailboxDomainVerifyChecks < ApiModelBase
18
- # Published DMARC policy provides at least the required enforcement level.
19
- attr_accessor :dmarc
20
-
21
- # Custom MAIL FROM MX record matches expected value
22
- attr_accessor :mail_from_mx
23
-
24
- # Custom MAIL FROM SPF policy is compatible with the required Amazon SES sender authorisation.
25
- attr_accessor :mail_from_spf
26
-
27
- # MX record present when the domain is configured for receiving. Always true for send-only domains.
28
- attr_accessor :mx
29
-
30
- # Published SPF policy is compatible with the required Amazon SES sender authorisation.
31
- attr_accessor :spf
32
-
33
- # Ownership TXT record present with correct value
34
- attr_accessor :verification_txt
35
-
36
- # Attribute mapping from ruby-style variable name to JSON key.
37
- def self.attribute_map
38
- {
39
- :'dmarc' => :'dmarc',
40
- :'mail_from_mx' => :'mail_from_mx',
41
- :'mail_from_spf' => :'mail_from_spf',
42
- :'mx' => :'mx',
43
- :'spf' => :'spf',
44
- :'verification_txt' => :'verification_txt'
45
- }
46
- end
47
-
48
- # Returns attribute mapping this model knows about
49
- def self.acceptable_attribute_map
50
- attribute_map
51
- end
52
-
53
- # Returns all the JSON keys this model knows about
54
- def self.acceptable_attributes
55
- acceptable_attribute_map.values
56
- end
57
-
58
- # Attribute type mapping.
59
- def self.openapi_types
60
- {
61
- :'dmarc' => :'Boolean',
62
- :'mail_from_mx' => :'Boolean',
63
- :'mail_from_spf' => :'Boolean',
64
- :'mx' => :'Boolean',
65
- :'spf' => :'Boolean',
66
- :'verification_txt' => :'Boolean'
67
- }
68
- end
69
-
70
- # List of attributes with nullable: true
71
- def self.openapi_nullable
72
- Set.new([
73
- ])
74
- end
75
-
76
- # Initializes the object
77
- # @param [Hash] attributes Model attributes in the form of hash
78
- def initialize(attributes = {})
79
- if (!attributes.is_a?(Hash))
80
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::MailboxDomainVerifyChecks` initialize method"
81
- end
82
-
83
- # check to see if the attribute exists and convert string to symbol for hash key
84
- acceptable_attribute_map = self.class.acceptable_attribute_map
85
- attributes = attributes.each_with_object({}) { |(k, v), h|
86
- if (!acceptable_attribute_map.key?(k.to_sym))
87
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::MailboxDomainVerifyChecks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
- end
89
- h[k.to_sym] = v
90
- }
91
-
92
- if attributes.key?(:'dmarc')
93
- self.dmarc = attributes[:'dmarc']
94
- else
95
- self.dmarc = nil
96
- end
97
-
98
- if attributes.key?(:'mail_from_mx')
99
- self.mail_from_mx = attributes[:'mail_from_mx']
100
- else
101
- self.mail_from_mx = nil
102
- end
103
-
104
- if attributes.key?(:'mail_from_spf')
105
- self.mail_from_spf = attributes[:'mail_from_spf']
106
- else
107
- self.mail_from_spf = nil
108
- end
109
-
110
- if attributes.key?(:'mx')
111
- self.mx = attributes[:'mx']
112
- else
113
- self.mx = nil
114
- end
115
-
116
- if attributes.key?(:'spf')
117
- self.spf = attributes[:'spf']
118
- else
119
- self.spf = nil
120
- end
121
-
122
- if attributes.key?(:'verification_txt')
123
- self.verification_txt = attributes[:'verification_txt']
124
- else
125
- self.verification_txt = nil
126
- end
127
- end
128
-
129
- # Show invalid properties with the reasons. Usually used together with valid?
130
- # @return Array for valid properties with the reasons
131
- def list_invalid_properties
132
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
133
- invalid_properties = Array.new
134
- if @dmarc.nil?
135
- invalid_properties.push('invalid value for "dmarc", dmarc cannot be nil.')
136
- end
137
-
138
- if @mail_from_mx.nil?
139
- invalid_properties.push('invalid value for "mail_from_mx", mail_from_mx cannot be nil.')
140
- end
141
-
142
- if @mail_from_spf.nil?
143
- invalid_properties.push('invalid value for "mail_from_spf", mail_from_spf cannot be nil.')
144
- end
145
-
146
- if @mx.nil?
147
- invalid_properties.push('invalid value for "mx", mx cannot be nil.')
148
- end
149
-
150
- if @spf.nil?
151
- invalid_properties.push('invalid value for "spf", spf cannot be nil.')
152
- end
153
-
154
- if @verification_txt.nil?
155
- invalid_properties.push('invalid value for "verification_txt", verification_txt cannot be nil.')
156
- end
157
-
158
- invalid_properties
159
- end
160
-
161
- # Check to see if the all the properties in the model are valid
162
- # @return true if the model is valid
163
- def valid?
164
- warn '[DEPRECATED] the `valid?` method is obsolete'
165
- return false if @dmarc.nil?
166
- return false if @mail_from_mx.nil?
167
- return false if @mail_from_spf.nil?
168
- return false if @mx.nil?
169
- return false if @spf.nil?
170
- return false if @verification_txt.nil?
171
- true
172
- end
173
-
174
- # Custom attribute writer method with validation
175
- # @param [Object] dmarc Value to be assigned
176
- def dmarc=(dmarc)
177
- if dmarc.nil?
178
- fail ArgumentError, 'dmarc cannot be nil'
179
- end
180
-
181
- @dmarc = dmarc
182
- end
183
-
184
- # Custom attribute writer method with validation
185
- # @param [Object] mail_from_mx Value to be assigned
186
- def mail_from_mx=(mail_from_mx)
187
- if mail_from_mx.nil?
188
- fail ArgumentError, 'mail_from_mx cannot be nil'
189
- end
190
-
191
- @mail_from_mx = mail_from_mx
192
- end
193
-
194
- # Custom attribute writer method with validation
195
- # @param [Object] mail_from_spf Value to be assigned
196
- def mail_from_spf=(mail_from_spf)
197
- if mail_from_spf.nil?
198
- fail ArgumentError, 'mail_from_spf cannot be nil'
199
- end
200
-
201
- @mail_from_spf = mail_from_spf
202
- end
203
-
204
- # Custom attribute writer method with validation
205
- # @param [Object] mx Value to be assigned
206
- def mx=(mx)
207
- if mx.nil?
208
- fail ArgumentError, 'mx cannot be nil'
209
- end
210
-
211
- @mx = mx
212
- end
213
-
214
- # Custom attribute writer method with validation
215
- # @param [Object] spf Value to be assigned
216
- def spf=(spf)
217
- if spf.nil?
218
- fail ArgumentError, 'spf cannot be nil'
219
- end
220
-
221
- @spf = spf
222
- end
223
-
224
- # Custom attribute writer method with validation
225
- # @param [Object] verification_txt Value to be assigned
226
- def verification_txt=(verification_txt)
227
- if verification_txt.nil?
228
- fail ArgumentError, 'verification_txt cannot be nil'
229
- end
230
-
231
- @verification_txt = verification_txt
232
- end
233
-
234
- # Checks equality by comparing each attribute.
235
- # @param [Object] Object to be compared
236
- def ==(o)
237
- return true if self.equal?(o)
238
- self.class == o.class &&
239
- dmarc == o.dmarc &&
240
- mail_from_mx == o.mail_from_mx &&
241
- mail_from_spf == o.mail_from_spf &&
242
- mx == o.mx &&
243
- spf == o.spf &&
244
- verification_txt == o.verification_txt
245
- end
246
-
247
- # @see the `==` method
248
- # @param [Object] Object to be compared
249
- def eql?(o)
250
- self == o
251
- end
252
-
253
- # Calculates hash code according to all attributes.
254
- # @return [Integer] Hash code
255
- def hash
256
- [dmarc, mail_from_mx, mail_from_spf, mx, spf, verification_txt].hash
257
- end
258
-
259
- # Builds the object from hash
260
- # @param [Hash] attributes Model attributes in the form of hash
261
- # @return [Object] Returns the model itself
262
- def self.build_from_hash(attributes)
263
- return nil unless attributes.is_a?(Hash)
264
- attributes = attributes.transform_keys(&:to_sym)
265
- transformed_hash = {}
266
- openapi_types.each_pair do |key, type|
267
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
268
- transformed_hash["#{key}"] = nil
269
- elsif type =~ /\AArray<(.*)>/i
270
- # check to ensure the input is an array given that the attribute
271
- # is documented as an array but the input is not
272
- if attributes[attribute_map[key]].is_a?(Array)
273
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
274
- end
275
- elsif !attributes[attribute_map[key]].nil?
276
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
277
- end
278
- end
279
- new(transformed_hash)
280
- end
281
-
282
- # Returns the object in the form of hash
283
- # @return [Hash] Returns the object in the form of hash
284
- def to_hash
285
- hash = {}
286
- self.class.attribute_map.each_pair do |attr, param|
287
- value = self.send(attr)
288
- if value.nil?
289
- is_nullable = self.class.openapi_nullable.include?(attr)
290
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
291
- end
292
-
293
- hash[param] = _to_hash(value)
294
- end
295
- hash
296
- end
297
-
298
- end
299
-
300
- end