putWebhookByIdWithHttpInfo method

Future<Response> putWebhookByIdWithHttpInfo(
  1. String id,
  2. UpdateEndpointIn updateEndpointIn
)

Replaces the editable fields of one of the caller org's endpoints — url, events, status and description — and answers the stored row with its secret redacted.

Replaces the editable fields of one of the caller org's endpoints — url, events, status and description — and answers the stored row with its secret redacted. It is a full replace, not a patch: an omitted field is written as its empty value, and an omitted or empty events list resubscribes the endpoint to EVERY event. The signing secret and the creation time are immutable here; rotate the secret with POST /v1/webhook/{id}/secret.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> putWebhookByIdWithHttpInfo(String id, UpdateEndpointIn updateEndpointIn,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/webhook/{id}'
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody = updateEndpointIn;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'PUT',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}