Skip to content

Commit

Permalink
BaseSubscribtion add subscribtion_data field
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Apr 17, 2024
1 parent 8b7288f commit c1e2f00
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions payments/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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()
Expand Down

0 comments on commit c1e2f00

Please sign in to comment.