getPhoneNumber method

Future<GetPhoneNumberResponse> getPhoneNumber({
  1. required String phoneNumberId,
})

Retrieves details for the specified phone number ID, such as associations, capabilities, and product type.

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

Parameter phoneNumberId : The phone number ID.

Implementation

Future<GetPhoneNumberResponse> getPhoneNumber({
  required String phoneNumberId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/phone-numbers/${Uri.encodeComponent(phoneNumberId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetPhoneNumberResponse.fromJson(response);
}