set next billing
This commit is contained in:
@@ -129,6 +129,17 @@ class Members(db.Model):
|
||||
|
||||
return option_name
|
||||
|
||||
@classmethod
|
||||
def set_user_next_billing(cls, member_id, next_billing):
|
||||
member = cls.query.filter_by(id=member_id).first()
|
||||
if not member:
|
||||
raise ValueError(f"Member with ID {member_id} does not exist.")
|
||||
# Update stripe_customer_id
|
||||
member.next_billing = next_billing
|
||||
|
||||
return next_billing
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def get_all_member(cls, email=None, username=None, page=1, limit=20):
|
||||
|
||||
Reference in New Issue
Block a user