Class: Telnyx::Resources::EmailValidations
- Inherits:
-
Object
- Object
- Telnyx::Resources::EmailValidations
- Defined in:
- lib/telnyx/resources/email_validations.rb,
lib/telnyx/resources/email_validations/batch.rb,
sig/telnyx/resources/email_validations.rbs,
sig/telnyx/resources/email_validations/batch.rbs
Overview
Validate email addresses synchronously or in asynchronous batches.
Defined Under Namespace
Classes: Batch
Instance Attribute Summary collapse
-
#batch ⇒ Telnyx::Resources::EmailValidations::Batch
readonly
Validate email addresses synchronously or in asynchronous batches.
Instance Method Summary collapse
-
#create(email:, idempotency_key: nil, request_options: {}) ⇒ Telnyx::Models::EmailValidationCreateResponse
Some parameter documentations has been truncated, see Models::EmailValidationCreateParams for more details.
-
#initialize(client:) ⇒ EmailValidations
constructor
private
A new instance of EmailValidations.
Constructor Details
#initialize(client:) ⇒ EmailValidations
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 EmailValidations.
43 44 45 46 |
# File 'lib/telnyx/resources/email_validations.rb', line 43 def initialize(client:) @client = client @batch = Telnyx::Resources::EmailValidations::Batch.new(client: client) end |
Instance Attribute Details
#batch ⇒ Telnyx::Resources::EmailValidations::Batch (readonly)
Validate email addresses synchronously or in asynchronous batches.
9 10 11 |
# File 'lib/telnyx/resources/email_validations.rb', line 9 def batch @batch end |
Instance Method Details
#create(email:, idempotency_key: nil, request_options: {}) ⇒ Telnyx::Models::EmailValidationCreateResponse
Some parameter documentations has been truncated, see Models::EmailValidationCreateParams for more details.
Validates a single email address and returns deliverability checks.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/telnyx/resources/email_validations.rb', line 27 def create(params) parsed, = Telnyx::EmailValidationCreateParams.dump_request(params) header_params = {idempotency_key: "idempotency-key"} @client.request( method: :post, path: "email_validations", headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Telnyx::Models::EmailValidationCreateResponse, options: ) end |