1 | <?php |
||
4 | class Account extends BaseModel |
||
5 | { |
||
6 | /** |
||
7 | * Account ID |
||
8 | * |
||
9 | * @var string |
||
10 | */ |
||
11 | protected $account_id; |
||
12 | |||
13 | /** |
||
14 | * User name details |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $name = []; |
||
19 | |||
20 | /** |
||
21 | * Account Email |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $email; |
||
26 | |||
27 | /** |
||
28 | * Whether the user has verified their e-mail address |
||
29 | * |
||
30 | * @var boolean |
||
31 | */ |
||
32 | protected $email_verified = false; |
||
33 | |||
34 | /** |
||
35 | * Account Profile Pic URL |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $profile_photo_url; |
||
40 | |||
41 | /** |
||
42 | * Whether the user has been disabled |
||
43 | * |
||
44 | * @var boolean |
||
45 | */ |
||
46 | protected $disabled = false; |
||
47 | |||
48 | /** |
||
49 | * User's two-letter country code |
||
50 | * |
||
51 | * @var string |
||
52 | */ |
||
53 | protected $country; |
||
54 | |||
55 | /** |
||
56 | * Language of User's account |
||
57 | * |
||
58 | * @var string |
||
59 | */ |
||
60 | protected $locale; |
||
61 | |||
62 | /** |
||
63 | * User's referral link |
||
64 | * |
||
65 | * @var string |
||
66 | */ |
||
67 | protected $referral_link; |
||
68 | |||
69 | /** |
||
70 | * Indicates whether a work account is linked |
||
71 | * |
||
72 | * @var boolean |
||
73 | */ |
||
74 | protected $is_paired = false; |
||
75 | |||
76 | /** |
||
77 | * User's account type |
||
78 | * |
||
79 | * @var string |
||
80 | */ |
||
81 | protected $account_type; |
||
82 | |||
83 | /** |
||
84 | * Create a new Account instance |
||
85 | * |
||
86 | * @param array $data |
||
87 | */ |
||
88 | public function __construct(array $data) |
||
110 | |||
111 | /** |
||
112 | * Return full contents of API response as JSON |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | public function __toString() |
||
120 | |||
121 | /** |
||
122 | * Get Account ID |
||
123 | * |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getAccountId() |
||
130 | |||
131 | /** |
||
132 | * Get Account User's Name Details |
||
133 | * |
||
134 | * @return array |
||
135 | */ |
||
136 | public function getNameDetails() |
||
140 | |||
141 | /** |
||
142 | * Get Display name |
||
143 | * |
||
144 | * @return string |
||
145 | */ |
||
146 | public function getDisplayName() |
||
156 | |||
157 | /** |
||
158 | * Get Account Email |
||
159 | * |
||
160 | * @return string |
||
161 | */ |
||
162 | public function getEmail() |
||
166 | |||
167 | /** |
||
168 | * Whether account email is verified |
||
169 | * |
||
170 | * @return boolean |
||
171 | */ |
||
172 | public function emailIsVerified() |
||
176 | |||
177 | /** |
||
178 | * Get Profile Pic URL |
||
179 | * |
||
180 | * @return string |
||
181 | */ |
||
182 | public function getProfilePhotoUrl() |
||
186 | |||
187 | /** |
||
188 | * Whether acocunt has been disabled |
||
189 | * |
||
190 | * @return boolean |
||
191 | */ |
||
192 | public function isDisabled() |
||
196 | |||
197 | /** |
||
198 | * Get User's two-lettered country code |
||
199 | * |
||
200 | * @return string |
||
201 | */ |
||
202 | public function getCountry() |
||
206 | |||
207 | /** |
||
208 | * Get account language |
||
209 | * |
||
210 | * @return string |
||
211 | */ |
||
212 | public function getLocale() |
||
216 | |||
217 | /** |
||
218 | * Get user's referral link |
||
219 | * |
||
220 | * @return string |
||
221 | */ |
||
222 | public function getReferralLink() |
||
226 | |||
227 | /** |
||
228 | * Whether work account is paired |
||
229 | * |
||
230 | * @return boolean |
||
231 | */ |
||
232 | public function isPaired() |
||
236 | |||
237 | /** |
||
238 | * Get Account Type |
||
239 | * |
||
240 | * @return string |
||
241 | */ |
||
242 | public function getAccountType() |
||
246 | } |
||
247 |