Class: IdealPostcodes::EmailsResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/ideal_postcodes/resources/emails.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from IdealPostcodes::Resource

Instance Method Details

#validate(email:) ⇒ Object



4
5
6
7
# File 'lib/ideal_postcodes/resources/emails.rb', line 4

def validate(email:)
  response = get_request("emails", params: {query: email})
  Email.new(response.body["result"])
end