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,167 @@
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 PolicyListResponse < ApiModelBase
18
+ attr_accessor :schema_version
19
+
20
+ attr_accessor :policies
21
+
22
+ attr_accessor :limits
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'schema_version' => :'schema_version',
28
+ :'policies' => :'policies',
29
+ :'limits' => :'limits'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'schema_version' => :'String',
47
+ :'policies' => :'Array<Policy>',
48
+ :'limits' => :'PolicyListResponseLimits'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Mailodds::PolicyListResponse` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Mailodds::PolicyListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'schema_version')
75
+ self.schema_version = attributes[:'schema_version']
76
+ end
77
+
78
+ if attributes.key?(:'policies')
79
+ if (value = attributes[:'policies']).is_a?(Array)
80
+ self.policies = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'limits')
85
+ self.limits = attributes[:'limits']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ schema_version == o.schema_version &&
110
+ policies == o.policies &&
111
+ limits == o.limits
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [schema_version, policies, limits].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ self.class.attribute_map.each_pair do |attr, param|
154
+ value = self.send(attr)
155
+ if value.nil?
156
+ is_nullable = self.class.openapi_nullable.include?(attr)
157
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
+ end
159
+
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ end
166
+
167
+ end
@@ -0,0 +1,166 @@
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 PolicyListResponseLimits < ApiModelBase
18
+ # -1 means unlimited
19
+ attr_accessor :max_policies
20
+
21
+ attr_accessor :max_rules_per_policy
22
+
23
+ attr_accessor :plan
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'max_policies' => :'max_policies',
29
+ :'max_rules_per_policy' => :'max_rules_per_policy',
30
+ :'plan' => :'plan'
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
+ :'max_policies' => :'Integer',
48
+ :'max_rules_per_policy' => :'Integer',
49
+ :'plan' => :'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 `Mailodds::PolicyListResponseLimits` 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 `Mailodds::PolicyListResponseLimits`. 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?(:'max_policies')
76
+ self.max_policies = attributes[:'max_policies']
77
+ end
78
+
79
+ if attributes.key?(:'max_rules_per_policy')
80
+ self.max_rules_per_policy = attributes[:'max_rules_per_policy']
81
+ end
82
+
83
+ if attributes.key?(:'plan')
84
+ self.plan = attributes[:'plan']
85
+ end
86
+ end
87
+
88
+ # Show invalid properties with the reasons. Usually used together with valid?
89
+ # @return Array for valid properties with the reasons
90
+ def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
92
+ invalid_properties = Array.new
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ true
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ max_policies == o.max_policies &&
109
+ max_rules_per_policy == o.max_rules_per_policy &&
110
+ plan == o.plan
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [max_policies, max_rules_per_policy, plan].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -0,0 +1,158 @@
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 PolicyPresetsResponse < ApiModelBase
18
+ attr_accessor :schema_version
19
+
20
+ attr_accessor :presets
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'schema_version' => :'schema_version',
26
+ :'presets' => :'presets'
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
+ :'schema_version' => :'String',
44
+ :'presets' => :'Array<PolicyPresetsResponsePresetsInner>'
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 `Mailodds::PolicyPresetsResponse` 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 `Mailodds::PolicyPresetsResponse`. 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?(:'schema_version')
71
+ self.schema_version = attributes[:'schema_version']
72
+ end
73
+
74
+ if attributes.key?(:'presets')
75
+ if (value = attributes[:'presets']).is_a?(Array)
76
+ self.presets = value
77
+ end
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ schema_version == o.schema_version &&
102
+ presets == o.presets
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [schema_version, presets].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -0,0 +1,176 @@
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 PolicyPresetsResponsePresetsInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :description
23
+
24
+ attr_accessor :rules
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'name' => :'name',
31
+ :'description' => :'description',
32
+ :'rules' => :'rules'
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
+ :'id' => :'String',
50
+ :'name' => :'String',
51
+ :'description' => :'String',
52
+ :'rules' => :'Array<PolicyRule>'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Mailodds::PolicyPresetsResponsePresetsInner` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Mailodds::PolicyPresetsResponsePresetsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'id')
79
+ self.id = attributes[:'id']
80
+ end
81
+
82
+ if attributes.key?(:'name')
83
+ self.name = attributes[:'name']
84
+ end
85
+
86
+ if attributes.key?(:'description')
87
+ self.description = attributes[:'description']
88
+ end
89
+
90
+ if attributes.key?(:'rules')
91
+ if (value = attributes[:'rules']).is_a?(Array)
92
+ self.rules = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ id == o.id &&
118
+ name == o.name &&
119
+ description == o.description &&
120
+ rules == o.rules
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [id, name, description, rules].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ self.class.attribute_map.each_pair do |attr, param|
163
+ value = self.send(attr)
164
+ if value.nil?
165
+ is_nullable = self.class.openapi_nullable.include?(attr)
166
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
167
+ end
168
+
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ end
175
+
176
+ end