team-telnyx / telnyx-dotnet

.NET SDK for the Telnyx API
MIT License
9 stars 9 forks source link

NumberSearchListOptions not working for NationalDestinationCode (Area Code) #2

Closed jraya85 closed 4 years ago

jraya85 commented 4 years ago

Hi!

I'm using the SDK on an application that purchases phone numbers and send SMS The users are 100% based on the US and they can select the Area Code of the phone numbers.

I'm using the NumberSearchListOptions object to filter the phone numbers by area code: var listOptions = new NumberSearchListOptions { NationalDestinationCode = areaCode }; searchService.List(listOptions, _requestOptions).Data;

The numbers I'm getting with this search doesn't belong to the submitted Area Code, I had to switch to direct http call to get the correct result: https://api.telnyx.com/v2/available_phone_numbers/available_phone_numbers?filter[country_code][]=US&filter[national_destination_code][]={areaCode}

I'm not sure if there is an issue on the NumberSearchListOptions object or if I'm using it incorrectly.

Thanks!

thedonmon commented 4 years ago

@jraya85 This will be fixed in an upcoming update. Thanks for the report!

thedonmon commented 4 years ago

Update has been merged to the latest library. Can you confirm the issue is fixed? I added some tests that help catch this in case it occurs. @jraya85