Package com.vonage.client.numbers
Class SearchNumbersFilter
java.lang.Object
com.vonage.client.numbers.SearchNumbersFilter
- All Implemented Interfaces:
QueryParamsRequest
This class encapsulates a request to search for available Vonage Virtual Numbers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for setting the parameters of SearchNumbersFilter. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SearchNumbersFilter.Builderbuilder()Entrypoint for constructing an instance of this class.Two character country code in ISO 3166-1 alpha-2 format.String[]Desired capabilities as an array of strings.getIndex()Page index to start return results from.Number pattern to narrow down the results by.Strategy to use for matching.getSize()Page size.getType()Type of number to search for.Internal method for serializing the fields of this class into query parameters.voidsetFeatures(String[] features) Deprecated.voidDeprecated.voidsetPattern(String pattern) Deprecated.voidsetSearchPattern(SearchPattern searchPattern) Deprecated.UseBaseNumbersFilter.Builder.pattern(SearchPattern, String).voidDeprecated.voidDeprecated.
-
Constructor Details
-
SearchNumbersFilter
Deprecated.Usebuilder(). 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. -
setType
Deprecated. -
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
nullif unspecified.
-
getType
Type of number to search for.- Returns:
- The number type as an enum, or
nullif unspecified.
-
makeParams
Description copied from interface:QueryParamsRequestInternal 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 asfinal. Duplicate entries can be handled by mapping the key to a list of the entries.- Specified by:
makeParamsin interfaceQueryParamsRequest- 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
Page index to start return results from. Default is 1.- Returns:
- The cursor index, or
nullif unspecified.
-
getSize
Page size. Default is 10, max is 100.- Returns:
- The number of results to return, or
nullif unspecified.
-
getCountry
Two character country code in ISO 3166-1 alpha-2 format.- Returns:
- The number's country code.
-
getPattern
Number pattern to narrow down the results by.- Returns:
- The number pattern, or
nullif unspecified.
-
getSearchPattern
Strategy to use for matching.- Returns:
- The pattern matching strategy as an enum, or
nullif unspecified.
-
setIndex
Deprecated. -
setSize
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. -
setSearchPattern
Deprecated.UseBaseNumbersFilter.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.
-
builder().