forked from dj-stripe/dj-stripe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stripe_trigger_account field to WebhookEventTrigger
* Added stripe_trigger_account model field to track which Stripe Account triggered the webhook Added stripe_trigger_account to the WebhookEventTrigger model to be able to associate which Stripe Account triggered the Webhook as they can be triggered not only on the Platform Account but also on Connected Accounts. This information along with a FK relation to the WebHookEndpoint Model (to be implemented) would make it possible to support multiple webhook endpoints and who triggered them * Improved error handling for Stripemodel._find_owner_account() * Added djstripe_owner_account to WebhookEventTriggerAdmin * Updated Corresponding Tests
- Loading branch information
1 parent
4908a5a
commit 49e7ffe
Showing
6 changed files
with
94 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
djstripe/migrations/0014_webhookeventtrigger_stripe_trigger_account.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 3.2.9 on 2021-11-11 11:51 | ||
|
||
from django.conf import settings | ||
from django.db import migrations | ||
import django.db.models.deletion | ||
import djstripe.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('djstripe', '0013_auto_20210817_0604'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='webhookeventtrigger', | ||
name='stripe_trigger_account', | ||
field=djstripe.fields.StripeForeignKey(blank=True, help_text='The Stripe Account this object belongs to.', null=True, on_delete=django.db.models.deletion.CASCADE, to='djstripe.account', to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters