Skip to content

Commit

Permalink
Made User __str__() to match actual attribute names (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroCB authored and mmohades committed Jul 14, 2020
1 parent 6d6bdaa commit 74a8cd5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def requirements():

setup(
name='venmo-api',
version='0.1.6',
version='0.1.7',
author="Mark Mohades",
license="GNU General Public License v3",
url='https://github.com/mmohades/venmo',
Expand Down
2 changes: 1 addition & 1 deletion venmo_api/models/payment_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def from_json(cls, json: Dict):
p_type=p_type)

def __str__(self):
return f"id: {self.id}, payment_method_role: {self.role}, payment_method_name: {self.name}, type: {self.type}"
return f"Payment: id: {self.id}, role: {self.role}, name: {self.name}, type: {self.type}"


class VenmoBalance(PaymentMethod):
Expand Down
2 changes: 1 addition & 1 deletion venmo_api/models/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def from_json(cls, json):

def __str__(self):

return f'story_id: {self.id}, payment_id: {self.payment_id}, date_completed: {self.date_completed},' \
return f'Transaction: story_id: {self.id}, payment_id: {self.payment_id}, date_completed: {self.date_completed},' \
f'date_created: {self.date_created}, date_updated: {self.date_updated},' \
f'payment_type: {self.payment_type}, amount: {self.amount},' \
f'audience: {self.audience}, status: {self.status}, note: {self.note}, device_used: {self.device_used},\n' \
Expand Down
4 changes: 2 additions & 2 deletions venmo_api/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ def from_json(cls, json, is_profile=False):
is_active=parser.get_is_active())

def __str__(self):
return f'id: {self.id}, username: {self.username}, firstname: {self.first_name}, lastname: {self.last_name}'\
f' display_name: {self.display_name}, phone: {self.phone}, picture: {self.profile_picture_url}, about: {self.about},'\
return f'User: id: {self.id}, username: {self.username}, first_name: {self.first_name}, last_name: {self.last_name}'\
f' display_name: {self.display_name}, phone: {self.phone}, profile_picture_url: {self.profile_picture_url}, about: {self.about},'\
f' joined: {self.date_joined}, is_group: {self.is_group}, is_active: {self.is_active}'

0 comments on commit 74a8cd5

Please sign in to comment.