Method: Vonage::NumberInsight#standard

Defined in:
lib/vonage/number_insight.rb

#standard(params) ⇒ Response

Provides standard number insight information about a number.

Examples:

response = client.number_insight.standard(number: '447700900000')

Parameters:

  • params (Hash)

Options Hash (params):

  • :number (required, String)

    A single phone number that you need insight about in national or international format.

  • :country (String)

    If a number does not have a country code or is uncertain, set the two-character country code. This code must be in ISO 3166-1 alpha-2 format and in upper case. For example, GB or US. If you set country and number is already in E.164 format, country must match the country code in number.

  • :cnam (Boolean)

    Indicates if the name of the person who owns the phone number should be looked up and returned in the response. Set to true to receive phone number owner name in the response. This features is available for US numbers only and incurs an additional charge.

Returns:

Raises:

See Also:



57
58
59
60
61
62
63
# File 'lib/vonage/number_insight.rb', line 57

def standard(params)
  response = request('/ni/standard/json', params: params)

  raise ServiceError.new(response: response), response[:status_message] unless response.status.zero?

  response
end