From 3539fd51ded1dbac3143325d501b9afac527119a Mon Sep 17 00:00:00 2001 From: Alex Bair Date: Mon, 23 Sep 2024 17:13:12 -0400 Subject: [PATCH] source-stripe-native: switch Payouts to a no events stream No `payout.*` events are generated by Stripe despite being detailed in their docs, so we can't rely on those events to do incremental replication. Instead, we can treat `Payouts` as a no event stream. It seems like most payouts aren't updated after creation, so this strategy should work fine most of the time. --- source-stripe-native/source_stripe_native/models.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/source-stripe-native/source_stripe_native/models.py b/source-stripe-native/source_stripe_native/models.py index bcca84420..5e811a147 100644 --- a/source-stripe-native/source_stripe_native/models.py +++ b/source-stripe-native/source_stripe_native/models.py @@ -443,18 +443,11 @@ class PaymentIntent(BaseStripeObjectWithEvents): # Despite listing various payout.* event types, Stripe does not generate -# these events. -class Payouts(BaseStripeObjectWithEvents): +# these events. It seems like most payouts are not updated after creation, +# so treating them as a no event stream should work well enough most of the time. +class Payouts(BaseStripeObjectNoEvents): NAME: ClassVar[str] = "Payouts" SEARCH_NAME: ClassVar[str] = "payouts" - EVENT_TYPES: ClassVar[dict[str, Literal["c", "u", "d"]]] = { - "payout.created": "c", - "payout.updated": "u", - "payout.canceled": "u", - "payout.failed": "u", - "payout.paid": "u", - "payout.reconciliation_completed": "u", - } class Plans(BaseStripeObjectWithEvents):