Class: IdealPostcodes::PhonesResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/ideal_postcodes/resources/phones.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(number:) ⇒ Object



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

def validate(number:)
  response = get_request("phone_numbers", params: {query: number})
  Phone.new(response.body["result"])
end