Created
February 25, 2018 23:57
-
-
Save codeadict/d310a5a457dd0bb55e45b18dfce8dcd3 to your computer and use it in GitHub Desktop.
Customer object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Customer: | |
def __init__(self, name, address, state, zipcode, contact_name, | |
phone_number, email, notes): | |
self.name = name | |
self.address = address | |
self.state = state | |
self.zipcode = zipcode | |
self.contact_name = contact_name | |
self.phone_number = phone_number | |
self.email = email | |
self.notes = notes | |
@property | |
def full_address(self): | |
return f'{self.address} {self.state} {self.zipcode}' | |
@property | |
def contact(self): | |
return f'{self.contact_name} <self.email>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment