restorePhoneNumber method

Future<RestorePhoneNumberResponse> restorePhoneNumber({
  1. required String phoneNumberId,
})

Moves a phone number from the Deletion queue back into the phone number Inventory.

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

Parameter phoneNumberId : The phone number.

Implementation

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