updateJourneyState method
Cancels (stops) an active journey.
May throw BadRequestException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw MethodNotAllowedException.
May throw NotFoundException.
May throw PayloadTooLargeException.
May throw TooManyRequestsException.
Parameter applicationId :
The unique identifier for the application. This identifier is displayed as
the Project ID on the Amazon Pinpoint console.
Parameter journeyId :
The unique identifier for the journey.
Implementation
Future<UpdateJourneyStateResponse> updateJourneyState({
required String applicationId,
required String journeyId,
required JourneyStateRequest journeyStateRequest,
}) async {
final response = await _protocol.sendRaw(
payload: journeyStateRequest,
method: 'PUT',
requestUri:
'/v1/apps/${Uri.encodeComponent(applicationId)}/journeys/${Uri.encodeComponent(journeyId)}/state',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return UpdateJourneyStateResponse(
journeyResponse: JourneyResponse.fromJson($json),
);
}