updateApnsVoipSandboxChannel method

Future<UpdateApnsVoipSandboxChannelResponse> updateApnsVoipSandboxChannel({
  1. required APNSVoipSandboxChannelRequest aPNSVoipSandboxChannelRequest,
  2. required String applicationId,
})

Enables the APNs VoIP sandbox channel for an application or updates the status and settings of the APNs VoIP sandbox channel for an application.

May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException.

Parameter applicationId : The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

Implementation

Future<UpdateApnsVoipSandboxChannelResponse> updateApnsVoipSandboxChannel({
  required APNSVoipSandboxChannelRequest aPNSVoipSandboxChannelRequest,
  required String applicationId,
}) async {
  ArgumentError.checkNotNull(
      aPNSVoipSandboxChannelRequest, 'aPNSVoipSandboxChannelRequest');
  ArgumentError.checkNotNull(applicationId, 'applicationId');
  final response = await _protocol.sendRaw(
    payload: aPNSVoipSandboxChannelRequest,
    method: 'PUT',
    requestUri:
        '/v1/apps/${Uri.encodeComponent(applicationId)}/channels/apns_voip_sandbox',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return UpdateApnsVoipSandboxChannelResponse(
    aPNSVoipSandboxChannelResponse:
        APNSVoipSandboxChannelResponse.fromJson($json),
  );
}