-
Notifications
You must be signed in to change notification settings - Fork 2
/
profile.py
68 lines (44 loc) · 1.49 KB
/
profile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
class Profile:
"""
Holds personal information to be used at checkout
@param name: name of the profile
@param profile: personal information for the profile
"""
def __init__(self, name, profile):
self.name = name
self.first_name = profile['First Name']
self.last_name = profile['Last Name']
self.email = profile['Email']
self.address = profile['Address']
self.address2 = profile['Address 2 (optional)']
self.city = profile['City']
self.province = profile['Province']
self.country = profile['Country']
self.postal_code = profile['Postal Code']
self.phone = profile['Phone Number']
self.payment = profile['Payment']
# Accessor methods
def get_name(self) -> str:
return self.name
def get_first_name(self) -> str:
return self.first_name
def get_last_name(self) -> str:
return self.last_name
def get_email(self) -> str:
return self.email
def get_address(self) -> str:
return self.address
def get_address2(self) -> str:
return self.address2
def get_city(self) -> str:
return self.city
def get_province(self) -> str:
return self.province
def get_country(self) -> str:
return self.country
def get_postal(self) -> str:
return self.postal_code
def get_phone(self) -> str:
return self.phone
def get_cc(self) -> dict[str, str]:
return self.payment