parameters: (cls, user, price, credits, stripe_charge=None, org=None, expires_on=None)
return_statement: return topup
docstring: Creates a new topup
docstring_summary: Creates a new topup
docstring_tokens: Creates a new topup
function: def create(cls, user, price, credits, stripe_charge=None, org=None, expires_on=None):
          """
          Creates a new topup
          """
          if not org:
              org = user.get_org()
  
          if not expires_on:
              expires_on = timezone.now() + timedelta(days=365)  # credits last 1 year
  
          topup = TopUp.objects.create(
              org=org,
              price=price,
              credits=credits,
              expires_on=expires_on,
              stripe_charge=stripe_charge,
              created_by=user,
              modified_by=user,
          )
  
          org.clear_credit_cache()
          return topup
function_tokens: def create ( cls , user , price , credits , stripe_charge = None , org = None , expires_on = None ) : if not org : org = user . get_org ( ) if not expires_on : expires_on = timezone . now ( ) + timedelta ( days = 365 ) # credits last 1 year topup = TopUp . objects . create ( org = org , price = price , credits = credits , expires_on = expires_on , stripe_charge = stripe_charge , created_by = user , modified_by = user , ) org . clear_credit_cache ( ) return topup