mailodds 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +64 -0
  4. data/Rakefile +10 -0
  5. data/docs/AddPolicyRule201Response.md +18 -0
  6. data/docs/AddSuppressionRequest.md +18 -0
  7. data/docs/AddSuppressionRequestEntriesInner.md +22 -0
  8. data/docs/AddSuppressionResponse.md +22 -0
  9. data/docs/BulkValidationApi.md +659 -0
  10. data/docs/CheckSuppressionRequest.md +18 -0
  11. data/docs/CreateJobFromS3Request.md +20 -0
  12. data/docs/CreateJobRequest.md +26 -0
  13. data/docs/CreatePolicyFromPresetRequest.md +22 -0
  14. data/docs/CreatePolicyRequest.md +24 -0
  15. data/docs/DeleteJob200Response.md +20 -0
  16. data/docs/DeletePolicy200Response.md +20 -0
  17. data/docs/DeletePolicyRule200Response.md +18 -0
  18. data/docs/EmailValidationApi.md +77 -0
  19. data/docs/ErrorResponse.md +22 -0
  20. data/docs/GetPresignedUploadRequest.md +20 -0
  21. data/docs/HealthCheck200Response.md +20 -0
  22. data/docs/Job.md +34 -0
  23. data/docs/JobListResponse.md +22 -0
  24. data/docs/JobResponse.md +20 -0
  25. data/docs/JobSummary.md +26 -0
  26. data/docs/Pagination.md +24 -0
  27. data/docs/Policy.md +34 -0
  28. data/docs/PolicyListResponse.md +22 -0
  29. data/docs/PolicyListResponseLimits.md +22 -0
  30. data/docs/PolicyPresetsResponse.md +20 -0
  31. data/docs/PolicyPresetsResponsePresetsInner.md +24 -0
  32. data/docs/PolicyResponse.md +20 -0
  33. data/docs/PolicyRule.md +28 -0
  34. data/docs/PolicyRuleAction.md +18 -0
  35. data/docs/PolicyTestResponse.md +26 -0
  36. data/docs/PresignedUploadResponse.md +20 -0
  37. data/docs/PresignedUploadResponseUpload.md +24 -0
  38. data/docs/RemoveSuppression200Response.md +20 -0
  39. data/docs/RemoveSuppressionRequest.md +18 -0
  40. data/docs/ResultsResponse.md +22 -0
  41. data/docs/SuppressionCheckResponse.md +26 -0
  42. data/docs/SuppressionEntry.md +26 -0
  43. data/docs/SuppressionListResponse.md +22 -0
  44. data/docs/SuppressionListsApi.md +362 -0
  45. data/docs/SuppressionStatsResponse.md +22 -0
  46. data/docs/SuppressionStatsResponseByType.md +20 -0
  47. data/docs/SystemApi.md +141 -0
  48. data/docs/TelemetrySummary.md +32 -0
  49. data/docs/TelemetrySummaryRates.md +24 -0
  50. data/docs/TelemetrySummaryTopDomainsInner.md +28 -0
  51. data/docs/TelemetrySummaryTopReasonsInner.md +20 -0
  52. data/docs/TelemetrySummaryTotals.md +20 -0
  53. data/docs/TestPolicyRequest.md +20 -0
  54. data/docs/TestPolicyRequestTestResult.md +26 -0
  55. data/docs/UpdatePolicyRequest.md +24 -0
  56. data/docs/ValidateRequest.md +20 -0
  57. data/docs/ValidationPoliciesApi.md +712 -0
  58. data/docs/ValidationResponse.md +40 -0
  59. data/docs/ValidationResponseSuppressionMatch.md +22 -0
  60. data/docs/ValidationResult.md +26 -0
  61. data/git_push.sh +57 -0
  62. data/lib/mailodds/api/bulk_validation_api.rb +651 -0
  63. data/lib/mailodds/api/email_validation_api.rb +90 -0
  64. data/lib/mailodds/api/suppression_lists_api.rb +356 -0
  65. data/lib/mailodds/api/system_api.rb +143 -0
  66. data/lib/mailodds/api/validation_policies_api.rb +686 -0
  67. data/lib/mailodds/api_client.rb +397 -0
  68. data/lib/mailodds/api_error.rb +58 -0
  69. data/lib/mailodds/api_model_base.rb +88 -0
  70. data/lib/mailodds/configuration.rb +308 -0
  71. data/lib/mailodds/models/add_policy_rule201_response.rb +147 -0
  72. data/lib/mailodds/models/add_suppression_request.rb +166 -0
  73. data/lib/mailodds/models/add_suppression_request_entries_inner.rb +223 -0
  74. data/lib/mailodds/models/add_suppression_response.rb +165 -0
  75. data/lib/mailodds/models/check_suppression_request.rb +164 -0
  76. data/lib/mailodds/models/create_job_from_s3_request.rb +176 -0
  77. data/lib/mailodds/models/create_job_request.rb +219 -0
  78. data/lib/mailodds/models/create_policy_from_preset_request.rb +225 -0
  79. data/lib/mailodds/models/create_policy_request.rb +223 -0
  80. data/lib/mailodds/models/delete_job200_response.rb +156 -0
  81. data/lib/mailodds/models/delete_policy200_response.rb +156 -0
  82. data/lib/mailodds/models/delete_policy_rule200_response.rb +147 -0
  83. data/lib/mailodds/models/error_response.rb +201 -0
  84. data/lib/mailodds/models/get_presigned_upload_request.rb +175 -0
  85. data/lib/mailodds/models/health_check200_response.rb +156 -0
  86. data/lib/mailodds/models/job.rb +281 -0
  87. data/lib/mailodds/models/job_list_response.rb +167 -0
  88. data/lib/mailodds/models/job_response.rb +156 -0
  89. data/lib/mailodds/models/job_summary.rb +183 -0
  90. data/lib/mailodds/models/pagination.rb +174 -0
  91. data/lib/mailodds/models/policy.rb +221 -0
  92. data/lib/mailodds/models/policy_list_response.rb +167 -0
  93. data/lib/mailodds/models/policy_list_response_limits.rb +166 -0
  94. data/lib/mailodds/models/policy_presets_response.rb +158 -0
  95. data/lib/mailodds/models/policy_presets_response_presets_inner.rb +176 -0
  96. data/lib/mailodds/models/policy_response.rb +156 -0
  97. data/lib/mailodds/models/policy_rule.rb +269 -0
  98. data/lib/mailodds/models/policy_rule_action.rb +181 -0
  99. data/lib/mailodds/models/policy_test_response.rb +187 -0
  100. data/lib/mailodds/models/presigned_upload_response.rb +156 -0
  101. data/lib/mailodds/models/presigned_upload_response_upload.rb +174 -0
  102. data/lib/mailodds/models/remove_suppression200_response.rb +156 -0
  103. data/lib/mailodds/models/remove_suppression_request.rb +166 -0
  104. data/lib/mailodds/models/results_response.rb +167 -0
  105. data/lib/mailodds/models/suppression_check_response.rb +217 -0
  106. data/lib/mailodds/models/suppression_entry.rb +217 -0
  107. data/lib/mailodds/models/suppression_list_response.rb +167 -0
  108. data/lib/mailodds/models/suppression_stats_response.rb +165 -0
  109. data/lib/mailodds/models/suppression_stats_response_by_type.rb +156 -0
  110. data/lib/mailodds/models/telemetry_summary.rb +251 -0
  111. data/lib/mailodds/models/telemetry_summary_rates.rb +179 -0
  112. data/lib/mailodds/models/telemetry_summary_top_domains_inner.rb +192 -0
  113. data/lib/mailodds/models/telemetry_summary_top_reasons_inner.rb +156 -0
  114. data/lib/mailodds/models/telemetry_summary_totals.rb +158 -0
  115. data/lib/mailodds/models/test_policy_request.rb +190 -0
  116. data/lib/mailodds/models/test_policy_request_test_result.rb +184 -0
  117. data/lib/mailodds/models/update_policy_request.rb +174 -0
  118. data/lib/mailodds/models/validate_request.rb +175 -0
  119. data/lib/mailodds/models/validation_response.rb +326 -0
  120. data/lib/mailodds/models/validation_response_suppression_match.rb +199 -0
  121. data/lib/mailodds/models/validation_result.rb +183 -0
  122. data/lib/mailodds/version.rb +15 -0
  123. data/lib/mailodds.rb +96 -0
  124. data/mailodds.gemspec +31 -0
  125. data/spec/api/bulk_validation_api_spec.rb +151 -0
  126. data/spec/api/email_validation_api_spec.rb +47 -0
  127. data/spec/api/suppression_lists_api_spec.rb +97 -0
  128. data/spec/api/system_api_spec.rb +58 -0
  129. data/spec/api/validation_policies_api_spec.rb +157 -0
  130. data/spec/models/add_policy_rule201_response_spec.rb +36 -0
  131. data/spec/models/add_suppression_request_entries_inner_spec.rb +52 -0
  132. data/spec/models/add_suppression_request_spec.rb +36 -0
  133. data/spec/models/add_suppression_response_spec.rb +48 -0
  134. data/spec/models/check_suppression_request_spec.rb +36 -0
  135. data/spec/models/create_job_from_s3_request_spec.rb +42 -0
  136. data/spec/models/create_job_request_spec.rb +60 -0
  137. data/spec/models/create_policy_from_preset_request_spec.rb +52 -0
  138. data/spec/models/create_policy_request_spec.rb +54 -0
  139. data/spec/models/delete_job200_response_spec.rb +42 -0
  140. data/spec/models/delete_policy200_response_spec.rb +42 -0
  141. data/spec/models/delete_policy_rule200_response_spec.rb +36 -0
  142. data/spec/models/error_response_spec.rb +48 -0
  143. data/spec/models/get_presigned_upload_request_spec.rb +42 -0
  144. data/spec/models/health_check200_response_spec.rb +42 -0
  145. data/spec/models/job_list_response_spec.rb +48 -0
  146. data/spec/models/job_response_spec.rb +42 -0
  147. data/spec/models/job_spec.rb +88 -0
  148. data/spec/models/job_summary_spec.rb +60 -0
  149. data/spec/models/pagination_spec.rb +54 -0
  150. data/spec/models/policy_list_response_limits_spec.rb +48 -0
  151. data/spec/models/policy_list_response_spec.rb +48 -0
  152. data/spec/models/policy_presets_response_presets_inner_spec.rb +54 -0
  153. data/spec/models/policy_presets_response_spec.rb +42 -0
  154. data/spec/models/policy_response_spec.rb +42 -0
  155. data/spec/models/policy_rule_action_spec.rb +40 -0
  156. data/spec/models/policy_rule_spec.rb +70 -0
  157. data/spec/models/policy_spec.rb +84 -0
  158. data/spec/models/policy_test_response_spec.rb +60 -0
  159. data/spec/models/presigned_upload_response_spec.rb +42 -0
  160. data/spec/models/presigned_upload_response_upload_spec.rb +54 -0
  161. data/spec/models/remove_suppression200_response_spec.rb +42 -0
  162. data/spec/models/remove_suppression_request_spec.rb +36 -0
  163. data/spec/models/results_response_spec.rb +48 -0
  164. data/spec/models/suppression_check_response_spec.rb +64 -0
  165. data/spec/models/suppression_entry_spec.rb +64 -0
  166. data/spec/models/suppression_list_response_spec.rb +48 -0
  167. data/spec/models/suppression_stats_response_by_type_spec.rb +42 -0
  168. data/spec/models/suppression_stats_response_spec.rb +48 -0
  169. data/spec/models/telemetry_summary_rates_spec.rb +54 -0
  170. data/spec/models/telemetry_summary_spec.rb +82 -0
  171. data/spec/models/telemetry_summary_top_domains_inner_spec.rb +66 -0
  172. data/spec/models/telemetry_summary_top_reasons_inner_spec.rb +42 -0
  173. data/spec/models/telemetry_summary_totals_spec.rb +42 -0
  174. data/spec/models/test_policy_request_spec.rb +42 -0
  175. data/spec/models/test_policy_request_test_result_spec.rb +60 -0
  176. data/spec/models/update_policy_request_spec.rb +54 -0
  177. data/spec/models/validate_request_spec.rb +42 -0
  178. data/spec/models/validation_response_spec.rb +110 -0
  179. data/spec/models/validation_response_suppression_match_spec.rb +52 -0
  180. data/spec/models/validation_result_spec.rb +60 -0
  181. data/spec/spec_helper.rb +111 -0
  182. metadata +322 -0
@@ -0,0 +1,251 @@
1
+ =begin
2
+ #MailOdds Email Validation API
3
+
4
+ #MailOdds provides email validation services to help maintain clean email lists and improve deliverability. The API performs multiple validation checks including format verification, domain validation, MX record checking, and disposable email detection. ## Authentication All API requests require authentication using a Bearer token. Include your API key in the Authorization header: ``` Authorization: Bearer YOUR_API_KEY ``` API keys can be created in the MailOdds dashboard. ## Rate Limits Rate limits vary by plan: - Free: 10 requests/minute - Starter: 60 requests/minute - Pro: 300 requests/minute - Business: 1000 requests/minute - Enterprise: Custom limits ## Response Format All responses include: - `schema_version`: API schema version (currently \"1.0\") - `request_id`: Unique request identifier for debugging Error responses include: - `error`: Machine-readable error code - `message`: Human-readable error description
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@mailodds.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Mailodds
17
+ # Validation metrics for building dashboards and monitoring.
18
+ class TelemetrySummary < ApiModelBase
19
+ attr_accessor :schema_version
20
+
21
+ attr_accessor :window
22
+
23
+ attr_accessor :generated_at
24
+
25
+ attr_accessor :timezone
26
+
27
+ attr_accessor :totals
28
+
29
+ attr_accessor :rates
30
+
31
+ # Top rejection/status reasons
32
+ attr_accessor :top_reasons
33
+
34
+ # Top domains by volume
35
+ attr_accessor :top_domains
36
+
37
+ class EnumAttributeValidator
38
+ attr_reader :datatype
39
+ attr_reader :allowable_values
40
+
41
+ def initialize(datatype, allowable_values)
42
+ @allowable_values = allowable_values.map do |value|
43
+ case datatype.to_s
44
+ when /Integer/i
45
+ value.to_i
46
+ when /Float/i
47
+ value.to_f
48
+ else
49
+ value
50
+ end
51
+ end
52
+ end
53
+
54
+ def valid?(value)
55
+ !value || allowable_values.include?(value)
56
+ end
57
+ end
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'schema_version' => :'schemaVersion',
63
+ :'window' => :'window',
64
+ :'generated_at' => :'generatedAt',
65
+ :'timezone' => :'timezone',
66
+ :'totals' => :'totals',
67
+ :'rates' => :'rates',
68
+ :'top_reasons' => :'topReasons',
69
+ :'top_domains' => :'topDomains'
70
+ }
71
+ end
72
+
73
+ # Returns attribute mapping this model knows about
74
+ def self.acceptable_attribute_map
75
+ attribute_map
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ acceptable_attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'schema_version' => :'String',
87
+ :'window' => :'String',
88
+ :'generated_at' => :'Time',
89
+ :'timezone' => :'String',
90
+ :'totals' => :'TelemetrySummaryTotals',
91
+ :'rates' => :'TelemetrySummaryRates',
92
+ :'top_reasons' => :'Array<TelemetrySummaryTopReasonsInner>',
93
+ :'top_domains' => :'Array<TelemetrySummaryTopDomainsInner>'
94
+ }
95
+ end
96
+
97
+ # List of attributes with nullable: true
98
+ def self.openapi_nullable
99
+ Set.new([
100
+ ])
101
+ end
102
+
103
+ # Initializes the object
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ def initialize(attributes = {})
106
+ if (!attributes.is_a?(Hash))
107
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Mailodds::TelemetrySummary` initialize method"
108
+ end
109
+
110
+ # check to see if the attribute exists and convert string to symbol for hash key
111
+ acceptable_attribute_map = self.class.acceptable_attribute_map
112
+ attributes = attributes.each_with_object({}) { |(k, v), h|
113
+ if (!acceptable_attribute_map.key?(k.to_sym))
114
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Mailodds::TelemetrySummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
115
+ end
116
+ h[k.to_sym] = v
117
+ }
118
+
119
+ if attributes.key?(:'schema_version')
120
+ self.schema_version = attributes[:'schema_version']
121
+ end
122
+
123
+ if attributes.key?(:'window')
124
+ self.window = attributes[:'window']
125
+ end
126
+
127
+ if attributes.key?(:'generated_at')
128
+ self.generated_at = attributes[:'generated_at']
129
+ end
130
+
131
+ if attributes.key?(:'timezone')
132
+ self.timezone = attributes[:'timezone']
133
+ end
134
+
135
+ if attributes.key?(:'totals')
136
+ self.totals = attributes[:'totals']
137
+ end
138
+
139
+ if attributes.key?(:'rates')
140
+ self.rates = attributes[:'rates']
141
+ end
142
+
143
+ if attributes.key?(:'top_reasons')
144
+ if (value = attributes[:'top_reasons']).is_a?(Array)
145
+ self.top_reasons = value
146
+ end
147
+ end
148
+
149
+ if attributes.key?(:'top_domains')
150
+ if (value = attributes[:'top_domains']).is_a?(Array)
151
+ self.top_domains = value
152
+ end
153
+ end
154
+ end
155
+
156
+ # Show invalid properties with the reasons. Usually used together with valid?
157
+ # @return Array for valid properties with the reasons
158
+ def list_invalid_properties
159
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
160
+ invalid_properties = Array.new
161
+ invalid_properties
162
+ end
163
+
164
+ # Check to see if the all the properties in the model are valid
165
+ # @return true if the model is valid
166
+ def valid?
167
+ warn '[DEPRECATED] the `valid?` method is obsolete'
168
+ window_validator = EnumAttributeValidator.new('String', ["1h", "24h", "30d"])
169
+ return false unless window_validator.valid?(@window)
170
+ true
171
+ end
172
+
173
+ # Custom attribute writer method checking allowed values (enum).
174
+ # @param [Object] window Object to be assigned
175
+ def window=(window)
176
+ validator = EnumAttributeValidator.new('String', ["1h", "24h", "30d"])
177
+ unless validator.valid?(window)
178
+ fail ArgumentError, "invalid value for \"window\", must be one of #{validator.allowable_values}."
179
+ end
180
+ @window = window
181
+ end
182
+
183
+ # Checks equality by comparing each attribute.
184
+ # @param [Object] Object to be compared
185
+ def ==(o)
186
+ return true if self.equal?(o)
187
+ self.class == o.class &&
188
+ schema_version == o.schema_version &&
189
+ window == o.window &&
190
+ generated_at == o.generated_at &&
191
+ timezone == o.timezone &&
192
+ totals == o.totals &&
193
+ rates == o.rates &&
194
+ top_reasons == o.top_reasons &&
195
+ top_domains == o.top_domains
196
+ end
197
+
198
+ # @see the `==` method
199
+ # @param [Object] Object to be compared
200
+ def eql?(o)
201
+ self == o
202
+ end
203
+
204
+ # Calculates hash code according to all attributes.
205
+ # @return [Integer] Hash code
206
+ def hash
207
+ [schema_version, window, generated_at, timezone, totals, rates, top_reasons, top_domains].hash
208
+ end
209
+
210
+ # Builds the object from hash
211
+ # @param [Hash] attributes Model attributes in the form of hash
212
+ # @return [Object] Returns the model itself
213
+ def self.build_from_hash(attributes)
214
+ return nil unless attributes.is_a?(Hash)
215
+ attributes = attributes.transform_keys(&:to_sym)
216
+ transformed_hash = {}
217
+ openapi_types.each_pair do |key, type|
218
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = nil
220
+ elsif type =~ /\AArray<(.*)>/i
221
+ # check to ensure the input is an array given that the attribute
222
+ # is documented as an array but the input is not
223
+ if attributes[attribute_map[key]].is_a?(Array)
224
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
225
+ end
226
+ elsif !attributes[attribute_map[key]].nil?
227
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
228
+ end
229
+ end
230
+ new(transformed_hash)
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ if value.nil?
240
+ is_nullable = self.class.openapi_nullable.include?(attr)
241
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
+ end
243
+
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ end
250
+
251
+ end
@@ -0,0 +1,179 @@
1
+ =begin
2
+ #MailOdds Email Validation API
3
+
4
+ #MailOdds provides email validation services to help maintain clean email lists and improve deliverability. The API performs multiple validation checks including format verification, domain validation, MX record checking, and disposable email detection. ## Authentication All API requests require authentication using a Bearer token. Include your API key in the Authorization header: ``` Authorization: Bearer YOUR_API_KEY ``` API keys can be created in the MailOdds dashboard. ## Rate Limits Rate limits vary by plan: - Free: 10 requests/minute - Starter: 60 requests/minute - Pro: 300 requests/minute - Business: 1000 requests/minute - Enterprise: Custom limits ## Response Format All responses include: - `schema_version`: API schema version (currently \"1.0\") - `request_id`: Unique request identifier for debugging Error responses include: - `error`: Machine-readable error code - `message`: Human-readable error description
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@mailodds.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Mailodds
17
+ # Status distribution as decimals (0-1)
18
+ class TelemetrySummaryRates < ApiModelBase
19
+ # Rate of valid + catch_all emails
20
+ attr_accessor :deliverable
21
+
22
+ # Rate of invalid + do_not_mail emails
23
+ attr_accessor :reject
24
+
25
+ # Rate of unknown status
26
+ attr_accessor :unknown
27
+
28
+ # Rate of suppressed emails
29
+ attr_accessor :suppressed
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'deliverable' => :'deliverable',
35
+ :'reject' => :'reject',
36
+ :'unknown' => :'unknown',
37
+ :'suppressed' => :'suppressed'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'deliverable' => :'Float',
55
+ :'reject' => :'Float',
56
+ :'unknown' => :'Float',
57
+ :'suppressed' => :'Float'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Mailodds::TelemetrySummaryRates` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Mailodds::TelemetrySummaryRates`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'deliverable')
84
+ self.deliverable = attributes[:'deliverable']
85
+ end
86
+
87
+ if attributes.key?(:'reject')
88
+ self.reject = attributes[:'reject']
89
+ end
90
+
91
+ if attributes.key?(:'unknown')
92
+ self.unknown = attributes[:'unknown']
93
+ end
94
+
95
+ if attributes.key?(:'suppressed')
96
+ self.suppressed = attributes[:'suppressed']
97
+ end
98
+ end
99
+
100
+ # Show invalid properties with the reasons. Usually used together with valid?
101
+ # @return Array for valid properties with the reasons
102
+ def list_invalid_properties
103
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
+ invalid_properties = Array.new
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ warn '[DEPRECATED] the `valid?` method is obsolete'
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ deliverable == o.deliverable &&
121
+ reject == o.reject &&
122
+ unknown == o.unknown &&
123
+ suppressed == o.suppressed
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [deliverable, reject, unknown, suppressed].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ transformed_hash = {}
145
+ openapi_types.each_pair do |key, type|
146
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
149
+ # check to ensure the input is an array given that the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[attribute_map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
153
+ end
154
+ elsif !attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
+ end
157
+ end
158
+ new(transformed_hash)
159
+ end
160
+
161
+ # Returns the object in the form of hash
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_hash
164
+ hash = {}
165
+ self.class.attribute_map.each_pair do |attr, param|
166
+ value = self.send(attr)
167
+ if value.nil?
168
+ is_nullable = self.class.openapi_nullable.include?(attr)
169
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
170
+ end
171
+
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ end
178
+
179
+ end
@@ -0,0 +1,192 @@
1
+ =begin
2
+ #MailOdds Email Validation API
3
+
4
+ #MailOdds provides email validation services to help maintain clean email lists and improve deliverability. The API performs multiple validation checks including format verification, domain validation, MX record checking, and disposable email detection. ## Authentication All API requests require authentication using a Bearer token. Include your API key in the Authorization header: ``` Authorization: Bearer YOUR_API_KEY ``` API keys can be created in the MailOdds dashboard. ## Rate Limits Rate limits vary by plan: - Free: 10 requests/minute - Starter: 60 requests/minute - Pro: 300 requests/minute - Business: 1000 requests/minute - Enterprise: Custom limits ## Response Format All responses include: - `schema_version`: API schema version (currently \"1.0\") - `request_id`: Unique request identifier for debugging Error responses include: - `error`: Machine-readable error code - `message`: Human-readable error description
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@mailodds.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Mailodds
17
+ class TelemetrySummaryTopDomainsInner < ApiModelBase
18
+ attr_accessor :domain
19
+
20
+ attr_accessor :volume
21
+
22
+ attr_accessor :deliverable
23
+
24
+ attr_accessor :reject
25
+
26
+ attr_accessor :unknown
27
+
28
+ attr_accessor :catch_all
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'domain' => :'domain',
34
+ :'volume' => :'volume',
35
+ :'deliverable' => :'deliverable',
36
+ :'reject' => :'reject',
37
+ :'unknown' => :'unknown',
38
+ :'catch_all' => :'catchAll'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'domain' => :'String',
56
+ :'volume' => :'Integer',
57
+ :'deliverable' => :'Float',
58
+ :'reject' => :'Float',
59
+ :'unknown' => :'Float',
60
+ :'catch_all' => :'Float'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Mailodds::TelemetrySummaryTopDomainsInner` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Mailodds::TelemetrySummaryTopDomainsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'domain')
87
+ self.domain = attributes[:'domain']
88
+ end
89
+
90
+ if attributes.key?(:'volume')
91
+ self.volume = attributes[:'volume']
92
+ end
93
+
94
+ if attributes.key?(:'deliverable')
95
+ self.deliverable = attributes[:'deliverable']
96
+ end
97
+
98
+ if attributes.key?(:'reject')
99
+ self.reject = attributes[:'reject']
100
+ end
101
+
102
+ if attributes.key?(:'unknown')
103
+ self.unknown = attributes[:'unknown']
104
+ end
105
+
106
+ if attributes.key?(:'catch_all')
107
+ self.catch_all = attributes[:'catch_all']
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
+ invalid_properties = Array.new
116
+ invalid_properties
117
+ end
118
+
119
+ # Check to see if the all the properties in the model are valid
120
+ # @return true if the model is valid
121
+ def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
123
+ true
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param [Object] Object to be compared
128
+ def ==(o)
129
+ return true if self.equal?(o)
130
+ self.class == o.class &&
131
+ domain == o.domain &&
132
+ volume == o.volume &&
133
+ deliverable == o.deliverable &&
134
+ reject == o.reject &&
135
+ unknown == o.unknown &&
136
+ catch_all == o.catch_all
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [domain, volume, deliverable, reject, unknown, catch_all].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ end