Class: Sentdm::Resources::Lookup

Inherits:
Object
  • Object
show all
Defined in:
lib/sentdm/resources/lookup.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Lookup

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 Lookup.

Parameters:



30
31
32
# File 'lib/sentdm/resources/lookup.rb', line 30

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve_phone_info(phone_number, request_options: {}) ⇒ Sentdm::Models::LookupRetrievePhoneInfoResponse

Validates a phone number and retrieves formatting, country, and timezone information from the internal index. Provider-agnostic and works for all customers.

Parameters:

Returns:

See Also:



18
19
20
21
22
23
24
25
# File 'lib/sentdm/resources/lookup.rb', line 18

def retrieve_phone_info(phone_number, params = {})
  @client.request(
    method: :get,
    path: ["v3/lookup/number/%1$s", phone_number],
    model: Sentdm::Models::LookupRetrievePhoneInfoResponse,
    options: params[:request_options]
  )
end