Skip to content

Commit 9893a13

Browse files
committed
BaseSubscribtion add subscribtion_data field
1 parent 6148dad commit 9893a13

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

payments/models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ class BaseSubscription(models.Model):
5959
null=True,
6060
blank=True,
6161
)
62+
subscribtion_data = models.JSONField(
63+
_("subscription data"),
64+
help_text=_("Provider-specific data associated with subscription"),
65+
default=dict,
66+
)
6267

6368
class TimeUnit(enum.Enum):
6469
year = "year"
@@ -71,6 +76,7 @@ def set_recurrence(self, token: str, **kwargs):
7176
Kwargs can contain provider-specific values
7277
"""
7378
self.token = token
79+
self.subscribtion_data = kwargs
7480

7581
def get_period(self) -> int:
7682
raise NotImplementedError

0 commit comments

Comments
 (0)