Class: Telnyx::Resources::NumberLookup
- Inherits:
-
Object
- Object
- Telnyx::Resources::NumberLookup
- Defined in:
- lib/telnyx/resources/number_lookup.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ NumberLookup
constructor
private
A new instance of NumberLookup.
-
#retrieve(phone_number, type: nil, request_options: {}) ⇒ Telnyx::Models::NumberLookupRetrieveResponse
Returns information about the provided phone number.
Constructor Details
#initialize(client:) ⇒ NumberLookup
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of NumberLookup.
33 34 35 |
# File 'lib/telnyx/resources/number_lookup.rb', line 33 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(phone_number, type: nil, request_options: {}) ⇒ Telnyx::Models::NumberLookupRetrieveResponse
Returns information about the provided phone number.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/telnyx/resources/number_lookup.rb', line 19 def retrieve(phone_number, params = {}) parsed, = Telnyx::NumberLookupRetrieveParams.dump_request(params) @client.request( method: :get, path: ["number_lookup/%1$s", phone_number], query: parsed, model: Telnyx::Models::NumberLookupRetrieveResponse, options: ) end |