updateJourneyState method
Future<UpdateJourneyStateResponse>
updateJourneyState({
- required String applicationId,
- required String journeyId,
- required JourneyStateRequest journeyStateRequest,
Cancels (stops) an active journey.
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.
Parameter journeyId
:
The unique identifier for the journey.
Implementation
Future<UpdateJourneyStateResponse> updateJourneyState({
required String applicationId,
required String journeyId,
required JourneyStateRequest journeyStateRequest,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(journeyId, 'journeyId');
ArgumentError.checkNotNull(journeyStateRequest, 'journeyStateRequest');
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),
);
}