Class: Mailfloss::Resources::BatchVerify
- Defined in:
- lib/mailfloss/resources.rb,
sig/resources.rbs
Overview
POST /batch-verify and its sub-resources.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#cancel(id, idempotency_key: nil) ⇒ Hash
POST /batch-verify/id/cancel.
-
#create(emails:, webhook_url: nil, idempotency_key: nil) ⇒ Hash
POST /batch-verify — submit a batch of emails for verification.
-
#results(id, per_page: nil, next_cursor: nil) ⇒ Hash
GET /batch-verify/id/results.
-
#status(id) ⇒ Hash
GET /batch-verify/id/status.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Mailfloss::Resources::Base
Instance Method Details
#cancel(id, idempotency_key: nil) ⇒ Hash
POST /batch-verify/id/cancel
54 55 56 |
# File 'lib/mailfloss/resources.rb', line 54 def cancel(id, idempotency_key: nil) client.request(:post, "/batch-verify/#{encode(id)}/cancel", idempotency_key: idempotency_key) end |
#create(emails:, webhook_url: nil, idempotency_key: nil) ⇒ Hash
POST /batch-verify — submit a batch of emails for verification.
28 29 30 31 32 |
# File 'lib/mailfloss/resources.rb', line 28 def create(emails:, webhook_url: nil, idempotency_key: nil) body = { emails: emails } body[:webhook_url] = webhook_url if webhook_url client.request(:post, "/batch-verify", body: body, idempotency_key: idempotency_key) end |
#results(id, per_page: nil, next_cursor: nil) ⇒ Hash
GET /batch-verify/id/results
46 47 48 49 |
# File 'lib/mailfloss/resources.rb', line 46 def results(id, per_page: nil, next_cursor: nil) client.request(:get, "/batch-verify/#{encode(id)}/results", query: { per_page: per_page, next: next_cursor }) end |
#status(id) ⇒ Hash
GET /batch-verify/id/status
37 38 39 |
# File 'lib/mailfloss/resources.rb', line 37 def status(id) client.request(:get, "/batch-verify/#{encode(id)}/status") end |