mailsafepro 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 (159) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +256 -0
  5. data/Rakefile +10 -0
  6. data/docs/APIKeyCreateRequest.md +20 -0
  7. data/docs/APIKeyListResponse.md +22 -0
  8. data/docs/APIKeyMeta.md +34 -0
  9. data/docs/APIKeysApi.md +1241 -0
  10. data/docs/AuthenticationApi.md +1171 -0
  11. data/docs/BatchEmailResponse.md +28 -0
  12. data/docs/BatchValidationRequest.md +26 -0
  13. data/docs/BillingApi.md +689 -0
  14. data/docs/BodyChangePlanBillingBillingChangePlanPost.md +18 -0
  15. data/docs/CheckoutRequest.md +18 -0
  16. data/docs/CheckoutSessionResponse.md +18 -0
  17. data/docs/DNSInfo.md +26 -0
  18. data/docs/DNSRecordDKIM.md +26 -0
  19. data/docs/DNSRecordDMARC.md +24 -0
  20. data/docs/DNSRecordSPF.md +24 -0
  21. data/docs/DefaultApi.md +141 -0
  22. data/docs/DeveloperToolsApi.md +154 -0
  23. data/docs/EmailResponse.md +46 -0
  24. data/docs/EmailValidationApi.md +479 -0
  25. data/docs/EmailValidationRequest.md +26 -0
  26. data/docs/HTTPValidationError.md +18 -0
  27. data/docs/HealthApi.md +937 -0
  28. data/docs/JobCreateRequest.md +32 -0
  29. data/docs/JobCreateResponse.md +22 -0
  30. data/docs/JobResultEntry.md +34 -0
  31. data/docs/JobResultsPage.md +26 -0
  32. data/docs/JobStatusResponse.md +28 -0
  33. data/docs/JobsApi.md +433 -0
  34. data/docs/KeyRotationRequest.md +22 -0
  35. data/docs/LogsApi.md +154 -0
  36. data/docs/PlanEnum.md +15 -0
  37. data/docs/PriorityEnum.md +15 -0
  38. data/docs/RegisterEndpoint.md +18 -0
  39. data/docs/ResponseTestNotificationBillingBillingTestNotificationPostValue.md +15 -0
  40. data/docs/RiskLevelEnum.md +15 -0
  41. data/docs/RotateSecret.md +18 -0
  42. data/docs/SMTPInfo.md +26 -0
  43. data/docs/SubscriptionResponse.md +24 -0
  44. data/docs/UserLogin.md +20 -0
  45. data/docs/UserRegister.md +22 -0
  46. data/docs/ValidationApi.md +479 -0
  47. data/docs/ValidationError.md +22 -0
  48. data/docs/ValidationErrorLocInner.md +15 -0
  49. data/docs/WebhookCreate.md +24 -0
  50. data/docs/WebhookResponse.md +22 -0
  51. data/docs/WebhookUpdate.md +24 -0
  52. data/docs/WebhooksApi.md +776 -0
  53. data/docs/WebhooksManagementApi.md +500 -0
  54. data/git_push.sh +57 -0
  55. data/lib/mailsafepro/api/api_keys_api.rb +1148 -0
  56. data/lib/mailsafepro/api/authentication_api.rb +1114 -0
  57. data/lib/mailsafepro/api/billing_api.rb +670 -0
  58. data/lib/mailsafepro/api/default_api.rb +149 -0
  59. data/lib/mailsafepro/api/developer_tools_api.rb +155 -0
  60. data/lib/mailsafepro/api/email_validation_api.rb +486 -0
  61. data/lib/mailsafepro/api/health_api.rb +877 -0
  62. data/lib/mailsafepro/api/jobs_api.rb +452 -0
  63. data/lib/mailsafepro/api/logs_api.rb +155 -0
  64. data/lib/mailsafepro/api/validation_api.rb +486 -0
  65. data/lib/mailsafepro/api/webhooks_api.rb +768 -0
  66. data/lib/mailsafepro/api/webhooks_management_api.rb +480 -0
  67. data/lib/mailsafepro/api_client.rb +397 -0
  68. data/lib/mailsafepro/api_error.rb +58 -0
  69. data/lib/mailsafepro/api_model_base.rb +88 -0
  70. data/lib/mailsafepro/configuration.rb +316 -0
  71. data/lib/mailsafepro/models/api_key_create_request.rb +185 -0
  72. data/lib/mailsafepro/models/api_key_list_response.rb +240 -0
  73. data/lib/mailsafepro/models/api_key_meta.rb +338 -0
  74. data/lib/mailsafepro/models/batch_email_response.rb +348 -0
  75. data/lib/mailsafepro/models/batch_validation_request.rb +290 -0
  76. data/lib/mailsafepro/models/body_change_plan_billing_billing_change_plan_post.rb +164 -0
  77. data/lib/mailsafepro/models/checkout_request.rb +166 -0
  78. data/lib/mailsafepro/models/checkout_session_response.rb +165 -0
  79. data/lib/mailsafepro/models/dns_info.rb +193 -0
  80. data/lib/mailsafepro/models/dns_record_dkim.rb +189 -0
  81. data/lib/mailsafepro/models/dns_record_dmarc.rb +179 -0
  82. data/lib/mailsafepro/models/dns_record_spf.rb +179 -0
  83. data/lib/mailsafepro/models/email_response.rb +454 -0
  84. data/lib/mailsafepro/models/email_validation_request.rb +252 -0
  85. data/lib/mailsafepro/models/http_validation_error.rb +149 -0
  86. data/lib/mailsafepro/models/job_create_request.rb +251 -0
  87. data/lib/mailsafepro/models/job_create_response.rb +216 -0
  88. data/lib/mailsafepro/models/job_result_entry.rb +257 -0
  89. data/lib/mailsafepro/models/job_results_page.rb +270 -0
  90. data/lib/mailsafepro/models/job_status_response.rb +231 -0
  91. data/lib/mailsafepro/models/key_rotation_request.rb +269 -0
  92. data/lib/mailsafepro/models/plan_enum.rb +41 -0
  93. data/lib/mailsafepro/models/priority_enum.rb +41 -0
  94. data/lib/mailsafepro/models/register_endpoint.rb +173 -0
  95. data/lib/mailsafepro/models/response_test_notification_billing_billing_test_notification_post_value.rb +103 -0
  96. data/lib/mailsafepro/models/risk_level_enum.rb +42 -0
  97. data/lib/mailsafepro/models/rotate_secret.rb +164 -0
  98. data/lib/mailsafepro/models/smtp_info.rb +206 -0
  99. data/lib/mailsafepro/models/subscription_response.rb +196 -0
  100. data/lib/mailsafepro/models/user_login.rb +211 -0
  101. data/lib/mailsafepro/models/user_register.rb +243 -0
  102. data/lib/mailsafepro/models/validation_error.rb +218 -0
  103. data/lib/mailsafepro/models/validation_error_loc_inner.rb +103 -0
  104. data/lib/mailsafepro/models/webhook_create.rb +213 -0
  105. data/lib/mailsafepro/models/webhook_response.rb +185 -0
  106. data/lib/mailsafepro/models/webhook_update.rb +204 -0
  107. data/lib/mailsafepro/version.rb +15 -0
  108. data/lib/mailsafepro.rb +88 -0
  109. data/mailsafepro.gemspec +39 -0
  110. data/spec/api/api_keys_api_spec.rb +245 -0
  111. data/spec/api/authentication_api_spec.rb +239 -0
  112. data/spec/api/billing_api_spec.rb +155 -0
  113. data/spec/api/default_api_spec.rb +60 -0
  114. data/spec/api/developer_tools_api_spec.rb +62 -0
  115. data/spec/api/email_validation_api_spec.rb +125 -0
  116. data/spec/api/health_api_spec.rb +200 -0
  117. data/spec/api/jobs_api_spec.rb +119 -0
  118. data/spec/api/logs_api_spec.rb +62 -0
  119. data/spec/api/validation_api_spec.rb +125 -0
  120. data/spec/api/webhooks_api_spec.rb +172 -0
  121. data/spec/api/webhooks_management_api_spec.rb +120 -0
  122. data/spec/models/api_key_create_request_spec.rb +42 -0
  123. data/spec/models/api_key_list_response_spec.rb +48 -0
  124. data/spec/models/api_key_meta_spec.rb +84 -0
  125. data/spec/models/batch_email_response_spec.rb +66 -0
  126. data/spec/models/batch_validation_request_spec.rb +60 -0
  127. data/spec/models/body_change_plan_billing_billing_change_plan_post_spec.rb +36 -0
  128. data/spec/models/checkout_request_spec.rb +36 -0
  129. data/spec/models/checkout_session_response_spec.rb +36 -0
  130. data/spec/models/dns_info_spec.rb +60 -0
  131. data/spec/models/dns_record_dkim_spec.rb +60 -0
  132. data/spec/models/dns_record_dmarc_spec.rb +54 -0
  133. data/spec/models/dns_record_spf_spec.rb +54 -0
  134. data/spec/models/email_response_spec.rb +120 -0
  135. data/spec/models/email_validation_request_spec.rb +60 -0
  136. data/spec/models/http_validation_error_spec.rb +36 -0
  137. data/spec/models/job_create_request_spec.rb +78 -0
  138. data/spec/models/job_create_response_spec.rb +48 -0
  139. data/spec/models/job_result_entry_spec.rb +84 -0
  140. data/spec/models/job_results_page_spec.rb +60 -0
  141. data/spec/models/job_status_response_spec.rb +66 -0
  142. data/spec/models/key_rotation_request_spec.rb +48 -0
  143. data/spec/models/plan_enum_spec.rb +30 -0
  144. data/spec/models/priority_enum_spec.rb +30 -0
  145. data/spec/models/register_endpoint_spec.rb +36 -0
  146. data/spec/models/response_test_notification_billing_billing_test_notification_post_value_spec.rb +21 -0
  147. data/spec/models/risk_level_enum_spec.rb +30 -0
  148. data/spec/models/rotate_secret_spec.rb +36 -0
  149. data/spec/models/smtp_info_spec.rb +60 -0
  150. data/spec/models/subscription_response_spec.rb +54 -0
  151. data/spec/models/user_login_spec.rb +42 -0
  152. data/spec/models/user_register_spec.rb +48 -0
  153. data/spec/models/validation_error_loc_inner_spec.rb +21 -0
  154. data/spec/models/validation_error_spec.rb +48 -0
  155. data/spec/models/webhook_create_spec.rb +54 -0
  156. data/spec/models/webhook_response_spec.rb +48 -0
  157. data/spec/models/webhook_update_spec.rb +54 -0
  158. data/spec/spec_helper.rb +111 -0
  159. metadata +291 -0
@@ -0,0 +1,173 @@
1
+ =begin
2
+ #Email Validation API — Enterprise-grade Email Verification
3
+
4
+ #API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
5
+
6
+ The version of the OpenAPI document: 2.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MailSafePro
17
+ class RegisterEndpoint < ApiModelBase
18
+ attr_accessor :callback_url
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'callback_url' => :'callback_url'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'callback_url' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSafePro::RegisterEndpoint` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSafePro::RegisterEndpoint`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'callback_url')
67
+ self.callback_url = attributes[:'callback_url']
68
+ else
69
+ self.callback_url = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @callback_url.nil?
79
+ invalid_properties.push('invalid value for "callback_url", callback_url cannot be nil.')
80
+ end
81
+
82
+ if @callback_url.to_s.length < 1
83
+ invalid_properties.push('invalid value for "callback_url", the character length must be greater than or equal to 1.')
84
+ end
85
+
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
+ return false if @callback_url.nil?
94
+ return false if @callback_url.to_s.length < 1
95
+ true
96
+ end
97
+
98
+ # Custom attribute writer method with validation
99
+ # @param [Object] callback_url Value to be assigned
100
+ def callback_url=(callback_url)
101
+ if callback_url.nil?
102
+ fail ArgumentError, 'callback_url cannot be nil'
103
+ end
104
+
105
+ if callback_url.to_s.length < 1
106
+ fail ArgumentError, 'invalid value for "callback_url", the character length must be greater than or equal to 1.'
107
+ end
108
+
109
+ @callback_url = callback_url
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
+ callback_url == o.callback_url
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [callback_url].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ attributes = attributes.transform_keys(&:to_sym)
138
+ transformed_hash = {}
139
+ openapi_types.each_pair do |key, type|
140
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[attribute_map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
+ end
148
+ elsif !attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
+ end
151
+ end
152
+ new(transformed_hash)
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ if value.nil?
162
+ is_nullable = self.class.openapi_nullable.include?(attr)
163
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
164
+ end
165
+
166
+ hash[param] = _to_hash(value)
167
+ end
168
+ hash
169
+ end
170
+
171
+ end
172
+
173
+ end
@@ -0,0 +1,103 @@
1
+ =begin
2
+ #Email Validation API — Enterprise-grade Email Verification
3
+
4
+ #API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
5
+
6
+ The version of the OpenAPI document: 2.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MailSafePro
17
+ module ResponseTestNotificationBillingBillingTestNotificationPostValue
18
+ class << self
19
+ # List of class defined in anyOf (OpenAPI v3)
20
+ def openapi_any_of
21
+ [
22
+ :'Boolean',
23
+ :'String'
24
+ ]
25
+ end
26
+
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of anyOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of anyOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
34
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
35
+ # - TODO: scalar values are de facto behaving as if they were nullable.
36
+ # - TODO: logging when debugging is set.
37
+ openapi_any_of.each do |klass|
38
+ begin
39
+ next if klass == :AnyType # "nullable: true"
40
+ return find_and_cast_into_type(klass, data)
41
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
42
+ end
43
+ end
44
+
45
+ openapi_any_of.include?(:AnyType) ? data : nil
46
+ end
47
+
48
+ private
49
+
50
+ SchemaMismatchError = Class.new(StandardError)
51
+
52
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
53
+ def find_and_cast_into_type(klass, data)
54
+ return if data.nil?
55
+
56
+ case klass.to_s
57
+ when 'Boolean'
58
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
59
+ when 'Float'
60
+ return data if data.instance_of?(Float)
61
+ when 'Integer'
62
+ return data if data.instance_of?(Integer)
63
+ when 'Time'
64
+ return Time.parse(data)
65
+ when 'Date'
66
+ return Date.iso8601(data)
67
+ when 'String'
68
+ return data if data.instance_of?(String)
69
+ when 'Object' # "type: object"
70
+ return data if data.instance_of?(Hash)
71
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
72
+ if data.instance_of?(Array)
73
+ sub_type = Regexp.last_match[:sub_type]
74
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
75
+ end
76
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
77
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
78
+ sub_type = Regexp.last_match[:sub_type]
79
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
80
+ end
81
+ else # model
82
+ const = MailSafePro.const_get(klass)
83
+ if const
84
+ if const.respond_to?(:openapi_any_of) # nested anyOf model
85
+ model = const.build(data)
86
+ return model if model
87
+ else
88
+ # raise if data contains keys that are not known to the model
89
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
90
+ model = const.build_from_hash(data)
91
+ return model if model
92
+ end
93
+ end
94
+ end
95
+
96
+ raise # if no match by now, raise
97
+ rescue
98
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
99
+ end
100
+ end
101
+ end
102
+
103
+ end
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #Email Validation API — Enterprise-grade Email Verification
3
+
4
+ #API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
5
+
6
+ The version of the OpenAPI document: 2.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MailSafePro
17
+ class RiskLevelEnum
18
+ LOW = "low".freeze
19
+ MEDIUM = "medium".freeze
20
+ HIGH = "high".freeze
21
+ UNKNOWN = "unknown".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [LOW, MEDIUM, HIGH, UNKNOWN].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ return value if RiskLevelEnum.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #RiskLevelEnum"
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,164 @@
1
+ =begin
2
+ #Email Validation API — Enterprise-grade Email Verification
3
+
4
+ #API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
5
+
6
+ The version of the OpenAPI document: 2.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MailSafePro
17
+ class RotateSecret < ApiModelBase
18
+ attr_accessor :endpoint_id
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'endpoint_id' => :'endpoint_id'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'endpoint_id' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSafePro::RotateSecret` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSafePro::RotateSecret`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'endpoint_id')
67
+ self.endpoint_id = attributes[:'endpoint_id']
68
+ else
69
+ self.endpoint_id = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @endpoint_id.nil?
79
+ invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @endpoint_id.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] endpoint_id Value to be assigned
95
+ def endpoint_id=(endpoint_id)
96
+ if endpoint_id.nil?
97
+ fail ArgumentError, 'endpoint_id cannot be nil'
98
+ end
99
+
100
+ @endpoint_id = endpoint_id
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
+ endpoint_id == o.endpoint_id
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [endpoint_id].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -0,0 +1,206 @@
1
+ =begin
2
+ #Email Validation API — Enterprise-grade Email Verification
3
+
4
+ #API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
5
+
6
+ The version of the OpenAPI document: 2.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MailSafePro
17
+ # SMTP verification results
18
+ class SMTPInfo < ApiModelBase
19
+ # SMTP check was performed
20
+ attr_accessor :checked
21
+
22
+ attr_accessor :mailbox_exists
23
+
24
+ attr_accessor :mx_server
25
+
26
+ attr_accessor :response_time
27
+
28
+ attr_accessor :error_message
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'checked' => :'checked',
34
+ :'mailbox_exists' => :'mailbox_exists',
35
+ :'mx_server' => :'mx_server',
36
+ :'response_time' => :'response_time',
37
+ :'error_message' => :'error_message'
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
+ :'checked' => :'Boolean',
55
+ :'mailbox_exists' => :'Boolean',
56
+ :'mx_server' => :'String',
57
+ :'response_time' => :'Float',
58
+ :'error_message' => :'String'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ :'mailbox_exists',
66
+ :'mx_server',
67
+ :'response_time',
68
+ :'error_message'
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSafePro::SMTPInfo` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ acceptable_attribute_map = self.class.acceptable_attribute_map
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!acceptable_attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSafePro::SMTPInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'checked')
89
+ self.checked = attributes[:'checked']
90
+ else
91
+ self.checked = nil
92
+ end
93
+
94
+ if attributes.key?(:'mailbox_exists')
95
+ self.mailbox_exists = attributes[:'mailbox_exists']
96
+ end
97
+
98
+ if attributes.key?(:'mx_server')
99
+ self.mx_server = attributes[:'mx_server']
100
+ end
101
+
102
+ if attributes.key?(:'response_time')
103
+ self.response_time = attributes[:'response_time']
104
+ end
105
+
106
+ if attributes.key?(:'error_message')
107
+ self.error_message = attributes[:'error_message']
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
+ if @checked.nil?
117
+ invalid_properties.push('invalid value for "checked", checked cannot be nil.')
118
+ end
119
+
120
+ invalid_properties
121
+ end
122
+
123
+ # Check to see if the all the properties in the model are valid
124
+ # @return true if the model is valid
125
+ def valid?
126
+ warn '[DEPRECATED] the `valid?` method is obsolete'
127
+ return false if @checked.nil?
128
+ true
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] checked Value to be assigned
133
+ def checked=(checked)
134
+ if checked.nil?
135
+ fail ArgumentError, 'checked cannot be nil'
136
+ end
137
+
138
+ @checked = checked
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ checked == o.checked &&
147
+ mailbox_exists == o.mailbox_exists &&
148
+ mx_server == o.mx_server &&
149
+ response_time == o.response_time &&
150
+ error_message == o.error_message
151
+ end
152
+
153
+ # @see the `==` method
154
+ # @param [Object] Object to be compared
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ def hash
162
+ [checked, mailbox_exists, mx_server, response_time, error_message].hash
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def self.build_from_hash(attributes)
169
+ return nil unless attributes.is_a?(Hash)
170
+ attributes = attributes.transform_keys(&:to_sym)
171
+ transformed_hash = {}
172
+ openapi_types.each_pair do |key, type|
173
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
174
+ transformed_hash["#{key}"] = nil
175
+ elsif type =~ /\AArray<(.*)>/i
176
+ # check to ensure the input is an array given that the attribute
177
+ # is documented as an array but the input is not
178
+ if attributes[attribute_map[key]].is_a?(Array)
179
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
180
+ end
181
+ elsif !attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
183
+ end
184
+ end
185
+ new(transformed_hash)
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ if value.nil?
195
+ is_nullable = self.class.openapi_nullable.include?(attr)
196
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
+ end
198
+
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ end
205
+
206
+ end