Vonage / vonage-node-sdk

Vonage API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Apache License 2.0
380 stars 181 forks source link

fix: allow no filter when getting owned numbers, require filter when searching available numbers #747

Closed dragonmantank closed 1 year ago

dragonmantank commented 1 year ago

Description

Changed it so a user can pass in an empty filter when getting their owned numbers Changed it so that a user is forced to pass in a filter when searching for available numbers, as a country is always required for that API call

Motivation and Context

Bug found when building out a demo app. While you can pass in an empty filter for getting owned numbers, it's more intuitive to allow the user to just not specify one at all.

When checking the above, came across that we allowed an optional filter on the getting available numbers call. You always have to at least pass in a country, so this enforces that rule as the user would have to pass in one to get a valid result anyway.

Testing Details

Unit tests

Example Output or Screenshots (if appropriate)

Types of changes

Checklist