modifyDBRecommendation method
Updates the recommendation status and recommended action status for the specified recommendation.
Parameter recommendationId :
The identifier of the recommendation to update.
Parameter locale :
The language of the modified recommendation.
Parameter recommendedActionUpdates :
The list of recommended action status to update. You can update multiple
recommended actions at one time.
Parameter status :
The recommendation status to update.
Valid values:
- active
- dismissed
Implementation
Future<DBRecommendationMessage> modifyDBRecommendation({
required String recommendationId,
String? locale,
List<RecommendedActionUpdate>? recommendedActionUpdates,
String? status,
}) async {
final $request = <String, String>{
'RecommendationId': recommendationId,
if (locale != null) 'Locale': locale,
if (recommendedActionUpdates != null)
if (recommendedActionUpdates.isEmpty)
'RecommendedActionUpdates': ''
else
for (var i1 = 0; i1 < recommendedActionUpdates.length; i1++)
for (var e3 in recommendedActionUpdates[i1].toQueryMap().entries)
'RecommendedActionUpdates.member.${i1 + 1}.${e3.key}': e3.value,
if (status != null) 'Status': status,
};
final $result = await _protocol.send(
$request,
action: 'ModifyDBRecommendation',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ModifyDBRecommendationResult',
);
return DBRecommendationMessage.fromXml($result);
}