Module: BlazeVerify
- Defined in:
- lib/blazeverify.rb,
lib/blazeverify/batch.rb,
lib/blazeverify/client.rb,
lib/blazeverify/version.rb,
lib/blazeverify/resources/account.rb,
lib/blazeverify/resources/api_resource.rb,
lib/blazeverify/resources/batch_status.rb,
lib/blazeverify/resources/verification.rb
Defined Under Namespace
Classes: APIResource, Account, BadRequestError, Batch, BatchStatus, Client, Error, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, ServiceUnavailableError, TooManyRequestsError, UnauthorizedError, Verification
Constant Summary collapse
- VERSION =
'1.0.0'
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.max_network_retries ⇒ Object
Returns the value of attribute max_network_retries.
Class Method Summary collapse
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
15 16 17 |
# File 'lib/blazeverify.rb', line 15 def api_key @api_key end |
.max_network_retries ⇒ Object
Returns the value of attribute max_network_retries.
15 16 17 |
# File 'lib/blazeverify.rb', line 15 def max_network_retries @max_network_retries end |
Class Method Details
.account ⇒ Object
35 36 37 38 39 |
# File 'lib/blazeverify.rb', line 35 def account client = BlazeVerify::Client.new response = client.request(:get, 'account') Account.new(response.body) end |
.verify(email, smtp: nil, accept_all: nil, timeout: nil) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/blazeverify.rb', line 20 def verify(email, smtp: nil, accept_all: nil, timeout: nil) opts = { email: email, smtp: smtp, accept_all: accept_all, timeout: timeout } client = BlazeVerify::Client.new response = client.request(:get, 'verify', opts) if response.status == 249 response.body else Verification.new(response.body) end end |