feat: stripe triggers (payout + transaction)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import defineTrigger from "../../../../helpers/define-trigger";
|
||||
import getBalanceTransactions from "../../common/get-balance-transactions";
|
||||
|
||||
export default defineTrigger({
|
||||
name: 'Balance Transaction',
|
||||
key: 'balanceTransaction',
|
||||
description: 'Triggers when a new transaction is processed (refund, payout, adjustment, ...)',
|
||||
pollInterval: 15,
|
||||
async run($) {
|
||||
await getBalanceTransactions($)
|
||||
}
|
||||
})
|
4
packages/backend/src/apps/stripe/triggers/index.ts
Normal file
4
packages/backend/src/apps/stripe/triggers/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import balanceTransaction from "./balance-transaction";
|
||||
import payouts from "./payouts";
|
||||
|
||||
export default [balanceTransaction, payouts];
|
12
packages/backend/src/apps/stripe/triggers/payouts/index.ts
Normal file
12
packages/backend/src/apps/stripe/triggers/payouts/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import defineTrigger from "../../../../helpers/define-trigger";
|
||||
import getPayouts from "../../common/get-payouts";
|
||||
|
||||
export default defineTrigger({
|
||||
name: 'Payout',
|
||||
key: 'payout',
|
||||
description: 'Triggers when a payout (Stripe <-> Bank account) has been updated',
|
||||
pollInterval: 15,
|
||||
async run($) {
|
||||
await getPayouts($)
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user