Class: Zavudev::Resources::Introspect
- Inherits:
-
Object
- Object
- Zavudev::Resources::Introspect
- Defined in:
- lib/zavudev/resources/introspect.rb,
sig/zavudev/resources/introspect.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Introspect
constructor
private
A new instance of Introspect.
-
#validate_email(email: nil, emails: nil, request_options: {}) ⇒ Zavudev::Models::IntrospectValidateEmailResponse
Heuristic email validation to run before sending: catches invalid syntax, dead domains (no MX/A records), disposable inboxes, role-based addresses (info@, contacto@, sales@), and addresses already on your project's suppression list.
-
#validate_phone(phone_number:, request_options: {}) ⇒ Zavudev::Models::IntrospectValidatePhoneResponse
Validate a phone number and check if a WhatsApp conversation window is open.
Constructor Details
#initialize(client:) ⇒ Introspect
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Introspect.
63 64 65 |
# File 'lib/zavudev/resources/introspect.rb', line 63 def initialize(client:) @client = client end |
Instance Method Details
#validate_email(email: nil, emails: nil, request_options: {}) ⇒ Zavudev::Models::IntrospectValidateEmailResponse
Heuristic email validation to run before sending: catches invalid syntax, dead domains (no MX/A records), disposable inboxes, role-based addresses (info@, contacto@, sales@), and addresses already on your project's suppression list. Use it to clean a list before a broadcast and keep your bounce rate low.
No mailbox-level (SMTP) probe is performed, so a deliverable verdict is not a
delivery guarantee — it means no negative signal was found. Treat risky
addresses with care and drop undeliverable ones.
Accepts a single email or an emails batch (max 100 per request).
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/zavudev/resources/introspect.rb', line 28 def validate_email(params = {}) parsed, = Zavudev::IntrospectValidateEmailParams.dump_request(params) @client.request( method: :post, path: "v1/introspect/email", body: parsed, model: Zavudev::Models::IntrospectValidateEmailResponse, options: ) end |
#validate_phone(phone_number:, request_options: {}) ⇒ Zavudev::Models::IntrospectValidatePhoneResponse
Validate a phone number and check if a WhatsApp conversation window is open.
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/zavudev/resources/introspect.rb', line 49 def validate_phone(params) parsed, = Zavudev::IntrospectValidatePhoneParams.dump_request(params) @client.request( method: :post, path: "v1/introspect/phone", body: parsed, model: Zavudev::Models::IntrospectValidatePhoneResponse, options: ) end |