feat: stripe triggers (payout + transaction)

This commit is contained in:
Pierre Maurice Schwang
2022-11-24 23:22:02 +01:00
parent d3a059d759
commit ef27c9348b
11 changed files with 189 additions and 0 deletions

View File

@@ -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($)
}
})

View File

@@ -0,0 +1,4 @@
import balanceTransaction from "./balance-transaction";
import payouts from "./payouts";
export default [balanceTransaction, payouts];

View 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($)
}
})