billing / user.py
Roland Ding
0.0.1.2 included common app files and utilities.
9c6b97d
raw
history blame contribute delete
419 Bytes
from cloud_db import *
def get_user(user_id:str):
return get_item("users",{"user_id":user_id})
def put_billing_info(user_id:str,billing_info:dict=None,payment_method:dict=None):
if not billing_info and not payment_method:
return {"Error":"No billing info or payment method provided"}
return put_item("users",{"user_id":user_id,"billing_info":billing_info,"payment_method":payment_method})