deleteWebhookEndpoint method

Future<TDeleteWebhookEndpointResponse> deleteWebhookEndpoint({
  1. required TDeleteWebhookEndpointBody input,
})

Delete a webhook endpoint for an organization.

Sign the provided TDeleteWebhookEndpointBody with the client's stamp function and submit the request (POST /public/v1/submit/delete_webhook_endpoint).

See also: stampDeleteWebhookEndpoint.

Implementation

Future<TDeleteWebhookEndpointResponse> deleteWebhookEndpoint({
  required TDeleteWebhookEndpointBody input,
}) async {
  final body = packActivityBody(
    bodyJson: input.toJson(),
    fallbackOrganizationId: input.organizationId ??
        config.organizationId ??
        (throw Exception(
            "Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
    activityType: 'ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT',
  );
  return await request<Map<String, dynamic>, TDeleteWebhookEndpointResponse>(
      "/public/v1/submit/delete_webhook_endpoint",
      body,
      (json) => TDeleteWebhookEndpointResponse.fromJson(
          transformActivityResponse(json, 'DeleteWebhookEndpoint')));
}