Class: Telnyx::Resources::NumberLookup

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/number_lookup.rb

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

Returns:

See Also:



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, options = Telnyx::NumberLookupRetrieveParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["number_lookup/%1$s", phone_number],
    query: parsed,
    model: Telnyx::Models::NumberLookupRetrieveResponse,
    options: options
  )
end