updateWhatsAppFlow method

Future<void> updateWhatsAppFlow({
  1. required String flowId,
  2. required String id,
  3. List<MetaFlowCategory>? categories,
  4. String? flowName,
})

Updates the metadata of a WhatsApp Flow, such as its name or categories. This does not update the Flow JSON definition. Use UpdateWhatsAppFlowAssets to update the Flow JSON.

May throw AccessDeniedByMetaException. May throw DependencyException. May throw InternalServiceException. May throw InvalidParametersException. May throw ResourceNotFoundException. May throw ThrottledRequestException.

Parameter flowId : The unique identifier of the Flow to update.

Parameter id : The ID of the WhatsApp Business Account associated with this Flow.

Parameter categories : The updated categories for the Flow.

Parameter flowName : The updated name for the Flow.

Implementation

Future<void> updateWhatsAppFlow({
  required String flowId,
  required String id,
  List<MetaFlowCategory>? categories,
  String? flowName,
}) async {
  final $payload = <String, dynamic>{
    'flowId': flowId,
    'id': id,
    if (categories != null)
      'categories': categories.map((e) => e.value).toList(),
    if (flowName != null) 'flowName': flowName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/whatsapp/flow/update',
    exceptionFnMap: _exceptionFns,
  );
}