UNPKG

@adyen/api-library

Version:

The Adyen API Library for NodeJS enables you to work with Adyen APIs.

29 lines (28 loc) 1.02 kB
import { disputeWebhooks } from ".."; /** * Union type for all supported webhook requests. * Allows generic handling of configuration-related webhook events. */ export type GenericWebhook = disputeWebhooks.DisputeNotificationRequest; /** * Handler for processing DisputeWebhooks. * * This class provides functionality to deserialize the payload of DisputeWebhooks events. */ export declare class DisputeWebhooksHandler { private readonly payload; constructor(jsonPayload: string); /** * This method checks the type of the webhook payload and returns the appropriate deserialized object. * * @returns A deserialized object of type GenericWebhook. * @throws Error if the type is not recognized. */ getGenericWebhook(): GenericWebhook; /** * Deserialize the webhook payload into a DisputeNotificationRequest * * @returns Deserialized DisputeNotificationRequest object. */ getDisputeNotificationRequest(): disputeWebhooks.DisputeNotificationRequest; }