@adyen/api-library
Version:
The Adyen API Library for NodeJS enables you to work with Adyen APIs.
47 lines (46 loc) • 2.37 kB
TypeScript
import { tokenizationWebhooks } from "..";
/**
* Union type for all supported webhook requests.
* Allows generic handling of configuration-related webhook events.
*/
export type GenericWebhook = tokenizationWebhooks.TokenizationAlreadyExistingDetailsNotificationRequest | tokenizationWebhooks.TokenizationCreatedDetailsNotificationRequest | tokenizationWebhooks.TokenizationDisabledDetailsNotificationRequest | tokenizationWebhooks.TokenizationUpdatedDetailsNotificationRequest;
/**
* Handler for processing TokenizationWebhooks.
*
* This class provides functionality to deserialize the payload of TokenizationWebhooks events.
*/
export declare class TokenizationWebhooksHandler {
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 TokenizationAlreadyExistingDetailsNotificationRequest
*
* @returns Deserialized TokenizationAlreadyExistingDetailsNotificationRequest object.
*/
getTokenizationAlreadyExistingDetailsNotificationRequest(): tokenizationWebhooks.TokenizationAlreadyExistingDetailsNotificationRequest;
/**
* Deserialize the webhook payload into a TokenizationCreatedDetailsNotificationRequest
*
* @returns Deserialized TokenizationCreatedDetailsNotificationRequest object.
*/
getTokenizationCreatedDetailsNotificationRequest(): tokenizationWebhooks.TokenizationCreatedDetailsNotificationRequest;
/**
* Deserialize the webhook payload into a TokenizationDisabledDetailsNotificationRequest
*
* @returns Deserialized TokenizationDisabledDetailsNotificationRequest object.
*/
getTokenizationDisabledDetailsNotificationRequest(): tokenizationWebhooks.TokenizationDisabledDetailsNotificationRequest;
/**
* Deserialize the webhook payload into a TokenizationUpdatedDetailsNotificationRequest
*
* @returns Deserialized TokenizationUpdatedDetailsNotificationRequest object.
*/
getTokenizationUpdatedDetailsNotificationRequest(): tokenizationWebhooks.TokenizationUpdatedDetailsNotificationRequest;
}