UNPKG

@adyen/api-library

Version:

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

95 lines (94 loc) 4.74 kB
import { configurationWebhooks } from ".."; /** * Union type for all supported webhook requests. * Allows generic handling of configuration-related webhook events. */ export type GenericWebhook = configurationWebhooks.AccountHolderNotificationRequest | configurationWebhooks.AccountPayoutAutoApplicationNotificationRequest | configurationWebhooks.BalanceAccountNotificationRequest | configurationWebhooks.CardOrderNotificationRequest | configurationWebhooks.MandateNotificationRequest | configurationWebhooks.NetworkTokenNotificationRequest | configurationWebhooks.PaymentNotificationRequest | configurationWebhooks.PayoutScheduleBANotificationRequest | configurationWebhooks.PayoutScheduleBPNotificationRequest | configurationWebhooks.PayoutScheduleStateNotificationRequest | configurationWebhooks.ScoreNotificationRequest | configurationWebhooks.SweepConfigurationNotificationRequest; /** * Handler for processing ConfigurationWebhooks. * * This class provides functionality to deserialize the payload of ConfigurationWebhooks events. */ export declare class ConfigurationWebhooksHandler { 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 AccountHolderNotificationRequest * * @returns Deserialized AccountHolderNotificationRequest object. */ getAccountHolderNotificationRequest(): configurationWebhooks.AccountHolderNotificationRequest; /** * Deserialize the webhook payload into a AccountPayoutAutoApplicationNotificationRequest * * @returns Deserialized AccountPayoutAutoApplicationNotificationRequest object. */ getAccountPayoutAutoApplicationNotificationRequest(): configurationWebhooks.AccountPayoutAutoApplicationNotificationRequest; /** * Deserialize the webhook payload into a BalanceAccountNotificationRequest * * @returns Deserialized BalanceAccountNotificationRequest object. */ getBalanceAccountNotificationRequest(): configurationWebhooks.BalanceAccountNotificationRequest; /** * Deserialize the webhook payload into a CardOrderNotificationRequest * * @returns Deserialized CardOrderNotificationRequest object. */ getCardOrderNotificationRequest(): configurationWebhooks.CardOrderNotificationRequest; /** * Deserialize the webhook payload into a MandateNotificationRequest * * @returns Deserialized MandateNotificationRequest object. */ getMandateNotificationRequest(): configurationWebhooks.MandateNotificationRequest; /** * Deserialize the webhook payload into a NetworkTokenNotificationRequest * * @returns Deserialized NetworkTokenNotificationRequest object. */ getNetworkTokenNotificationRequest(): configurationWebhooks.NetworkTokenNotificationRequest; /** * Deserialize the webhook payload into a PaymentNotificationRequest * * @returns Deserialized PaymentNotificationRequest object. */ getPaymentNotificationRequest(): configurationWebhooks.PaymentNotificationRequest; /** * Deserialize the webhook payload into a PayoutScheduleBANotificationRequest * * @returns Deserialized PayoutScheduleBANotificationRequest object. */ getPayoutScheduleBANotificationRequest(): configurationWebhooks.PayoutScheduleBANotificationRequest; /** * Deserialize the webhook payload into a PayoutScheduleBPNotificationRequest * * @returns Deserialized PayoutScheduleBPNotificationRequest object. */ getPayoutScheduleBPNotificationRequest(): configurationWebhooks.PayoutScheduleBPNotificationRequest; /** * Deserialize the webhook payload into a PayoutScheduleStateNotificationRequest * * @returns Deserialized PayoutScheduleStateNotificationRequest object. */ getPayoutScheduleStateNotificationRequest(): configurationWebhooks.PayoutScheduleStateNotificationRequest; /** * Deserialize the webhook payload into a ScoreNotificationRequest * * @returns Deserialized ScoreNotificationRequest object. */ getScoreNotificationRequest(): configurationWebhooks.ScoreNotificationRequest; /** * Deserialize the webhook payload into a SweepConfigurationNotificationRequest * * @returns Deserialized SweepConfigurationNotificationRequest object. */ getSweepConfigurationNotificationRequest(): configurationWebhooks.SweepConfigurationNotificationRequest; }