From c1e2f00b58a57a05351d3d83e820589db076e0dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Wed, 17 Apr 2024 14:40:08 +0200 Subject: [PATCH] BaseSubscribtion add subscribtion_data field --- payments/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/payments/models.py b/payments/models.py index 161a4ea72..046329d99 100644 --- a/payments/models.py +++ b/payments/models.py @@ -57,6 +57,11 @@ class BaseSubscription(models.Model): null=True, blank=True, ) + subscribtion_data = models.JSONField( + _("subscription data"), + help_text=_("Provider-specific data associated with subscription"), + default=dict, + ) class TimeUnit(enum.Enum): year = "year" @@ -69,6 +74,7 @@ def set_recurrence(self, token: str, **kwargs): Kwargs can contain provider-specific values """ self.token = token + self.subscribtion_data = kwargs def get_period(self) -> int: raise NotImplementedError()