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 UnauthorizedClientException. May throw NotFoundException. May throw ForbiddenException. May throw BadRequestException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter phoneNumberId : The phone number ID.

Implementation

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