Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
Args:
data(:obj:`json`, optional): JSON object representing friend user object
"""
User.__init__(self, data)
if data:
if 'updated_at' in data:
self.updated_at = data["updated_at"]
else:
self.updated_at = None
self.balances = []
for balance in data["balance"]:
self.balances.append(Balance(balance))
self.groups = []
if "groups" in data:
for group in data["groups"]:
self.groups.append(Group.FriendGroup(group))
else:
self.groups = None
def __init__(self,data=None):
self.id = data["group_id"]
self.balances = []
for balance in data["balance"]:
self.balances.append(Balance(balance))