Class SearchNumbersFilter

java.lang.Object
com.vonage.client.numbers.SearchNumbersFilter
All Implemented Interfaces:
QueryParamsRequest

public class SearchNumbersFilter extends Object
This class encapsulates a request to search for available Vonage Virtual Numbers.
  • Constructor Details

    • SearchNumbersFilter

      Deprecated.
      Use builder(). This will be removed in the next major release.
      Construct a request with the only required parameter, the country code.
      Parameters:
      country - A String containing a two-character country code.
  • Method Details

    • setFeatures

      @Deprecated public void setFeatures(String[] features)
      Deprecated.
    • setType

      @Deprecated public void setType(Type type)
      Deprecated.
    • getFeatures

      public String[] getFeatures()
      Desired capabilities as an array of strings. In a future release, these will be enums.
      Returns:
      The capabilities to search for as a string array, or null if unspecified.
    • getType

      public Type getType()
      Type of number to search for.
      Returns:
      The number type as an enum, or null if unspecified.
    • makeParams

      Description copied from interface: QueryParamsRequest
      Internal method for serializing the fields of this class into query parameters. The Map should be mutable so that subclasses can add fields, otherwise the method or implementing class should be marked as final. Duplicate entries can be handled by mapping the key to a list of the entries.
      Specified by:
      makeParams in interface QueryParamsRequest
      Returns:
      The query parameters as unique key-value pairs.
    • builder

      Entrypoint for constructing an instance of this class.
      Returns:
      A new Builder.
      Since:
      8.10.0
    • getIndex

      public Integer getIndex()
      Page index to start return results from. Default is 1.
      Returns:
      The cursor index, or null if unspecified.
    • getSize

      public Integer getSize()
      Page size. Default is 10, max is 100.
      Returns:
      The number of results to return, or null if unspecified.
    • getCountry

      public String getCountry()
      Two character country code in ISO 3166-1 alpha-2 format.
      Returns:
      The number's country code.
    • getPattern

      public String getPattern()
      Number pattern to narrow down the results by.
      Returns:
      The number pattern, or null if unspecified.
    • getSearchPattern

      public SearchPattern getSearchPattern()
      Strategy to use for matching.
      Returns:
      The pattern matching strategy as an enum, or null if unspecified.
    • setIndex

      @Deprecated public void setIndex(Integer index)
      Deprecated.
    • setSize

      @Deprecated public void setSize(Integer size)
      Deprecated.
      Set the maximum number of matching results to be returned.
      Parameters:
      size - An Integer between 10 and 100 (inclusive) or null, to indicate that the default value should be used.
    • setPattern

      @Deprecated public void setPattern(String pattern)
      Deprecated.
    • setSearchPattern

      @Deprecated public void setSearchPattern(SearchPattern searchPattern)
      Deprecated.
      Use BaseNumbersFilter.Builder.pattern(SearchPattern, String). This will be removed in the next major release.
      Parameters:
      searchPattern - The pattern you want to search for. Use the * wildcard to match the start or end of the number. For example, *123* matches all numbers that contain the pattern 123.