listSupportedPhoneNumberCountries method

Future<ListSupportedPhoneNumberCountriesResponse> listSupportedPhoneNumberCountries({
  1. required PhoneNumberProductType productType,
})

Lists the countries that you can order phone numbers from.

May throw AccessDeniedException. May throw BadRequestException. May throw ForbiddenException. May throw ServiceFailureException. May throw ServiceUnavailableException. May throw ThrottledClientException. May throw UnauthorizedClientException.

Parameter productType : The phone number product type.

Implementation

Future<ListSupportedPhoneNumberCountriesResponse>
    listSupportedPhoneNumberCountries({
  required PhoneNumberProductType productType,
}) async {
  final $query = <String, List<String>>{
    'product-type': [productType.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/phone-number-countries',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListSupportedPhoneNumberCountriesResponse.fromJson(response);
}