class NeverBounce::API::Request::SingleCheck
Attributes
address_info[RW]
@return [Boolean]
credits_info[RW]
@return [Boolean]
email[RW]
@return [String]
historical[RW]
@return [Boolean]
timeout[RW]
@return [Integer]
Public Class Methods
http_method()
click to toggle source
@return [Symbol]
# File lib/never_bounce/api/request/single_check.rb, line 28 def self.http_method :get end
path()
click to toggle source
@return [String]
# File lib/never_bounce/api/request/single_check.rb, line 33 def self.path "single/check" end
response_klass()
click to toggle source
@return [Response::SingleCheck]
# File lib/never_bounce/api/request/single_check.rb, line 38 def self.response_klass Response::SingleCheck end
Public Instance Methods
leverage_historical()
click to toggle source
# File lib/never_bounce/api/request/single_check.rb, line 23 def leverage_historical defined?(@historical) ? @historical : true end
mode_h()
click to toggle source
Return a ready-to-merge mode attributes hash. @return [Hash]
# File lib/never_bounce/api/request/single_check.rb, line 44 def mode_h @mode_h ||= {}.tap do |_| unless (v = address_info).nil? _[:address_info] = v end unless (v = credits_info).nil? _[:credits_info] = v end unless (v = timeout).nil? _[:timeout] = v end unless historical.nil? _[:request_meta_data] = {leverage_historical_data: leverage_historical} end end end
to_h()
click to toggle source
@return [Hash]
# File lib/never_bounce/api/request/single_check.rb, line 65 def to_h { email: require_attr(:email), key: require_attr(:api_key), }.merge(mode_h) end