Skip to content

Commit c1e2f00

Browse files
committed
BaseSubscribtion add subscribtion_data field
1 parent 8b7288f commit c1e2f00

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
@@ -57,6 +57,11 @@ class BaseSubscription(models.Model):
5757
null=True,
5858
blank=True,
5959
)
60+
subscribtion_data = models.JSONField(
61+
_("subscription data"),
62+
help_text=_("Provider-specific data associated with subscription"),
63+
default=dict,
64+
)
6065

6166
class TimeUnit(enum.Enum):
6267
year = "year"
@@ -69,6 +74,7 @@ def set_recurrence(self, token: str, **kwargs):
6974
Kwargs can contain provider-specific values
7075
"""
7176
self.token = token
77+
self.subscribtion_data = kwargs
7278

7379
def get_period(self) -> int:
7480
raise NotImplementedError()

0 commit comments

Comments
 (0)