1: <?php
2: namespace Hyperwallet\Model;
3:
4: /**
5: * Represents a V4 User
6: *
7: * @property string $token The user token
8: * @property string $status The user status
9: * @property string $verificationStatus The status of user verification
10: * @property string $taxVerificationStatus The status of tax verification
11: * @property string $businessStakeholderVerificationStatus The status of Business Stakeholder verification
12: * @property string $letterOfAuthorizationStatus The status of Letter of Authorization verification
13: *
14: * @property \DateTime $createdOn The user creation date
15: * @property string $clientUserId The client user id
16: * @property string $profileType The profile type
17: *
18: * @property string $businessType The business type
19: * @property string $businessName The business name
20: * @property string $businessOperatingName The business operating name
21: * @property string $businessRegistrationId The business registration id
22: * @property string $businessRegistrationCountry The business registration country
23: * @property string $businessRegistrationStateProvince The business registration state or province
24: * @property string $businessContactRole The business contact role
25: *
26: * @property string $firstName The first name
27: * @property string $middleName The middle name
28: * @property string $lastName The last name
29: * @property \DateTime $dateOfBirth The date of birth
30: * @property string $countryOfBirth The country of birth
31: * @property string $countryOfNationality The country of nationality
32: * @property string $gender The gender
33: * @property string $phoneNumber The phone number
34: * @property string $mobileNumber The mobile number
35: * @property string $email The email
36: *
37: * @property string $governmentId The goverment id
38: * @property string $governmentIdType The status of Letter of Authorization verification
39: * @property string $passportId The passport id
40: * @property string $driversLicenseId The drivers license id
41: * @property string $employerId The employer id
42: *
43: * @property string $addressLine1 The address line 1
44: * @property string $addressLine2 The address line 2
45: * @property string $city The city
46: * @property string $stateProvince The state or province
47: * @property string $postalCode The postal code
48: * @property string $country The country
49: *
50: * @property string $language The user language
51: * @property string $programToken The users program token
52: * @property string $timeZone The users program token
53: * @property HyperwalletVerificationDocumentCollection $documents The array of documents of type HyperwalletVerificationDocument returned for document upload
54: * @property array $links The array of HATEOS links
55: *
56: * @package Hyperwallet\Model
57: */
58: class User extends BaseModel implements IProgramAware {
59:
60: /**
61: * @internal
62: *
63: * Read only fields
64: *
65: * @var string[]
66: */
67:
68: private static $READ_ONLY_FIELDS = array('token', 'status', 'createdOn', 'documents');
69:
70: const STATUS_PRE_ACTIVATED = 'PRE_ACTIVATED';
71: const STATUS_ACTIVATED = 'ACTIVATED';
72: const STATUS_LOCKED = 'LOCKED';
73: const STATUS_FROZEN = 'FROZEN';
74: const STATUS_DE_ACTIVATED = 'DE_ACTIVATED';
75:
76: const PROFILE_TYPE_INDIVIDUAL = 'INDIVIDUAL';
77: const PROFILE_TYPE_BUSINESS = 'BUSINESS';
78: const PROFILE_TYPE_UNKNOWN = 'UNKNOWN';
79:
80: const BUSINESS_TYPE_CORPORATION = 'CORPORATION';
81: const BUSINESS_TYPE_PARTNERSHIP = 'PARTNERSHIP';
82:
83: const BUSINESS_CONTACT_ROLE_DIRECTOR = 'DIRECTOR';
84: const BUSINESS_CONTACT_ROLE_OWNER = 'OWNER';
85: const BUSINESS_CONTACT_ROLE_OTHER = 'OTHER';
86:
87: const GENDER_MALE = 'MALE';
88: const GENDER_FEMALE = 'FEMALE';
89:
90: const VERIFICATION_STATUS_NOT_REQUIRED = 'NOT_REQUIRED';
91: const VERIFICATION_STATUS_REQUIRED = 'REQUIRED';
92: const VERIFICATION_STATUS_FAILED = 'FAILED';
93: const VERIFICATION_STATUS_UNDER_REVIEW = 'UNDER_REVIEW';
94: const VERIFICATION_STATUS_VERIFIED = 'VERIFIED';
95: const VERIFICATION_STATUS_REQUESTED = 'REQUESTED';
96: const VERIFICATION_STATUS_EXPIRED = 'EXPIRED';
97: const VERIFICATION_STATUS_READY_FOR_REVIEW='READY_FOR_REVIEW';
98:
99: const TAX_VERIFICATION_STATUS_NOT_REQUIRED = 'NOT_REQUIRED';
100: const TAX_VERIFICATION_STATUS_REQUIRED = 'REQUIRED';
101: const TAX_VERIFICATION_STATUS_VERIFIED= 'VERIFIED';
102: const TAX_VERIFICATION_STATUS_UNDER_REVIEW = 'UNDER_REVIEW';
103:
104: const BUSINESSS_STAKEHOLDER_VERIFICATION_STATUS_NOT_REQUIRED = 'NOT_REQUIRED';
105: const BUSINESSS_STAKEHOLDER_VERIFICATION_STATUS_REQUIRED = 'REQUIRED';
106: const BUSINESSS_STAKEHOLDER_VERIFICATION_STATUS_FAILED = 'FAILED';
107: const BUSINESSS_STAKEHOLDER_VERIFICATION_STATUS_UNDER_REVIEW = 'UNDER_REVIEW';
108: const BUSINESSS_STAKEHOLDER_VERIFICATION_STATUS_VERIFIED = 'VERIFIED';
109: const BUSINESSS_STAKEHOLDER_VERIFICATION_STATUS_READY_FOR_REVIEW = 'READY_FOR_REVIEW';
110:
111: const LETTER_OF_AUTHORIZATION_STATUS_NOT_REQUIRED = 'NOT_REQUIRED';
112: const LETTER_OF_AUTHORIZATION_STATUS_REQUIRED = 'REQUIRED';
113: const LETTER_OF_AUTHORIZATION_STATUS_FAILED = 'FAILED';
114: const LETTER_OF_AUTHORIZATION_STATUS_UNDER_REVIEW = 'UNDER_REVIEW';
115: const LETTER_OF_AUTHORIZATION_STATUS_VERIFIED = 'VERIFIED';
116: const LETTER_OF_AUTHORIZATION_STATUS_READY_FOR_REVIEW = 'READY_FOR_REVIEW';
117:
118: const GOVERNMENT_ID_TYPE_PASSPORT = 'PASSPORT';
119: const GOVERNMENT_ID_TYPE_NATIONAL_ID_CARD = 'NATIONAL_ID_CARD';
120:
121: public static function FILTERS_ARRAY() {
122: return array('clientUserId','email','programToken','status','verificationStatus', 'taxVerificationStatus', 'createdBefore', 'createdAfter', 'sortBy', 'limit');
123: }
124:
125: /**
126: * Creates a instance of User
127: *
128: * @param string[] $properties The default properties
129: */
130: public function __construct(array $properties = array()) {
131: parent::__construct(self::$READ_ONLY_FIELDS, $properties);
132: }
133:
134: /**
135: * Get the user token
136: *
137: * @return string
138: */
139: public function getToken() {
140: return $this->token;
141: }
142:
143: /**
144: * Set the user token
145: *
146: * @param string $token
147: * @return User
148: */
149: public function setToken($token) {
150: $this->token = $token;
151: return $this;
152: }
153:
154: /**
155: * Get the user status
156: *
157: * @return string
158: */
159: public function getStatus() {
160: return $this->status;
161: }
162:
163: /**
164: * set the User status
165: *
166: * @param string $status
167: * @return User
168: */
169: /*
170: public function setStatus($status) {
171: $this->$status = $status;
172: return $this;
173: }
174:
175: */
176: /**
177: * Get the user creation time
178: *
179: * @return \DateTime
180: */
181: public function getCreatedOn() {
182: return $this->createdOn ? new \DateTime($this->createdOn) : null;
183: }
184:
185: /**
186: * Get the client user id
187: *
188: * @return string
189: */
190: public function getClientUserId() {
191: return $this->clientUserId;
192: }
193:
194: /**
195: * Set the client user id
196: *
197: * @param string $clientUserId
198: * @return User
199: */
200: public function setClientUserId($clientUserId) {
201: $this->clientUserId = $clientUserId;
202: return $this;
203: }
204:
205: /**
206: * Get the profile type
207: *
208: * @return string
209: */
210: public function getProfileType() {
211: return $this->profileType;
212: }
213:
214: /**
215: * Set the profile type
216: *
217: * @param string $profileType
218: * @return User
219: */
220: public function setProfileType($profileType) {
221: $this->profileType = $profileType;
222: return $this;
223: }
224:
225: /**
226: * Get the business type
227: *
228: * @return string
229: */
230: public function getBusinessType() {
231: return $this->businessType;
232: }
233:
234: /**
235: * Set the business type
236: *
237: * @param string $businessType
238: * @return User
239: */
240: public function setBusinessType($businessType) {
241: $this->businessType = $businessType;
242: return $this;
243: }
244:
245: /**
246: * Get the business name
247: *
248: * @return string
249: */
250: public function getBusinessName() {
251: return $this->businessName;
252: }
253:
254: /**
255: * Set the business name
256: *
257: * @param string $businessName
258: * @return User
259: */
260: public function setBusinessName($businessName) {
261: $this->businessName = $businessName;
262: return $this;
263: }
264:
265: /**
266: * Get the business operating name
267: *
268: * @return string
269: */
270: public function getBusinessOperatingName()
271: {
272: return $this->businessOperatingName;
273: }
274:
275: /**
276: * Set the business operating name
277: *
278: * @param string $businessOperatingName
279: * @return User
280: */
281: public function setBusinessOperatingName($businessOperatingName)
282: {
283: $this->businessOperatingName = $businessOperatingName;
284: return $this;
285: }
286:
287: /**
288: * Get the business registration id
289: *
290: * @return string
291: */
292: public function getBusinessRegistrationId() {
293: return $this->businessRegistrationId;
294: }
295:
296: /**
297: * Set the business registration id
298: *
299: * @param string $businessRegistrationId
300: * @return User
301: */
302: public function setBusinessRegistrationId($businessRegistrationId) {
303: $this->businessRegistrationId = $businessRegistrationId;
304: return $this;
305: }
306:
307: /**
308: * Get the business registration state or province
309: *
310: * @return string
311: */
312: public function getBusinessRegistrationStateProvince() {
313: return $this->businessRegistrationStateProvince;
314: }
315:
316: /**
317: * Set the business registartion state or province
318: *
319: * @param string $businessRegistrationStateProvince
320: * @return User
321: */
322: public function setBusinessRegistrationStateProvince($businessRegistrationStateProvince) {
323: $this->businessRegistrationStateProvince = $businessRegistrationStateProvince;
324: return $this;
325: }
326:
327: /**
328: * Get the business registartion country
329: *
330: * @return string
331: */
332: public function getBusinessRegistrationCountry() {
333: return $this->businessRegistrationCountry;
334: }
335:
336: /**
337: * Set the business registration country
338: *
339: * @param string $businessRegistrationCountry
340: * @return User
341: */
342: public function setBusinessRegistrationCountry($businessRegistrationCountry) {
343: $this->businessRegistrationCountry = $businessRegistrationCountry;
344: return $this;
345: }
346:
347: /**
348: * Get the business contact role
349: *
350: * @return string
351: */
352: public function getBusinessContactRole() {
353: return $this->businessContactRole;
354: }
355:
356: /**
357: * Set the business contact role
358: *
359: * @param string $businessContactRole
360: * @return User
361: */
362: public function setBusinessContactRole($businessContactRole) {
363: $this->businessContactRole = $businessContactRole;
364: return $this;
365: }
366:
367: /**
368: * Get the first name
369: *
370: * @return string
371: */
372: public function getFirstName() {
373: return $this->firstName;
374: }
375:
376: /**
377: * Set the first name
378: *
379: * @param string $firstName
380: * @return User
381: */
382: public function setFirstName($firstName) {
383: $this->firstName = $firstName;
384: return $this;
385: }
386:
387: /**
388: * Get the middle name
389: *
390: * @return string
391: */
392: public function getMiddleName() {
393: return $this->middleName;
394: }
395:
396: /**
397: * Set the middle name
398: *
399: * @param string $middleName
400: * @return User
401: */
402: public function setMiddleName($middleName) {
403: $this->middleName = $middleName;
404: return $this;
405: }
406:
407: /**
408: * Get the last name
409: *
410: * @return string
411: */
412: public function getLastName() {
413: return $this->lastName;
414: }
415:
416: /**
417: * Set the last name
418: *
419: * @param string $lastName
420: * @return User
421: */
422: public function setLastName($lastName) {
423: $this->lastName = $lastName;
424: return $this;
425: }
426:
427: /**
428: * Get the date of birth
429: *
430: * @return \DateTime|null
431: */
432: public function getDateOfBirth() {
433: return $this->dateOfBirth ? new \DateTime($this->dateOfBirth) : null;
434: }
435:
436: /**
437: * Set the date of birth
438: *
439: * @param \DateTime|null $dateOfBirth
440: * @return User
441: */
442: public function setDateOfBirth(\DateTime $dateOfBirth = null) {
443: $this->dateOfBirth = $dateOfBirth == null ? null : $dateOfBirth->format('Y-m-d');
444: return $this;
445: }
446:
447: /**
448: * Get the country of birth
449: *
450: * @return string
451: */
452: public function getCountryOfBirth() {
453: return $this->countryOfBirth;
454: }
455:
456: /**
457: * Set the country of birth
458: *
459: * @param string $countryOfBirth
460: * @return User
461: */
462: public function setCountryOfBirth($countryOfBirth) {
463: $this->countryOfBirth = $countryOfBirth;
464: return $this;
465: }
466:
467: /**
468: * Get the country of nationality
469: *
470: * @return string
471: */
472: public function getCountryOfNationality() {
473: return $this->countryOfNationality;
474: }
475:
476: /**
477: * Set the country of nationality
478: *
479: * @param string $countryOfNationality
480: * @return User
481: */
482: public function setCountryOfNationality($countryOfNationality) {
483: $this->countryOfNationality = $countryOfNationality;
484: return $this;
485: }
486:
487: /**
488: * Get the gender
489: *
490: * @return string
491: */
492: public function getGender() {
493: return $this->gender;
494: }
495:
496: /**
497: * Set the gender
498: *
499: * @param string $gender
500: * @return User
501: */
502: public function setGender($gender) {
503: $this->gender = $gender;
504: return $this;
505: }
506:
507: /**
508: * Get the phone number
509: *
510: * @return string
511: */
512: public function getPhoneNumber() {
513: return $this->phoneNumber;
514: }
515:
516: /**
517: * Set the phone number
518: *
519: * @param string $phoneNumber
520: * @return User
521: */
522: public function setPhoneNumber($phoneNumber) {
523: $this->phoneNumber = $phoneNumber;
524: return $this;
525: }
526:
527: /**
528: * Get the mobile number
529: *
530: * @return string
531: */
532: public function getMobileNumber() {
533: return $this->mobileNumber;
534: }
535:
536: /**
537: * Set the mobile number
538: *
539: * @param string $mobileNumber
540: * @return User
541: */
542: public function setMobileNumber($mobileNumber) {
543: $this->mobileNumber = $mobileNumber;
544: return $this;
545: }
546:
547: /**
548: * Get the email
549: *
550: * @return string
551: */
552: public function getEmail() {
553: return $this->email;
554: }
555:
556: /**
557: * Set the email
558: *
559: * @param string $email
560: * @return User
561: */
562: public function setEmail($email) {
563: $this->email = $email;
564: return $this;
565: }
566:
567: /**
568: * Get the government id
569: *
570: * @return string
571: */
572: public function getGovernmentId() {
573: return $this->governmentId;
574: }
575:
576: /**
577: * Set the government id
578: *
579: * @param string $governmentId
580: * @return User
581: */
582: public function setGovernmentId($governmentId) {
583: $this->governmentId = $governmentId;
584: return $this;
585: }
586:
587: /**
588: * Get the passport id
589: *
590: * @return string
591: */
592: public function getPassportId() {
593: return $this->passportId;
594: }
595:
596: /**
597: * Set the passport id
598: *
599: * @param string $passportId
600: * @return User
601: */
602: public function setPassportId($passportId) {
603: $this->passportId = $passportId;
604: return $this;
605: }
606:
607: /**
608: * Get the drivers license id
609: *
610: * @return string
611: */
612: public function getDriversLicenseId() {
613: return $this->driversLicenseId;
614: }
615:
616: /**
617: * Set the drivers license id
618: *
619: * @param string $driversLicenseId
620: * @return User
621: */
622: public function setDriversLicenseId($driversLicenseId) {
623: $this->driversLicenseId = $driversLicenseId;
624: return $this;
625: }
626:
627: /**
628: * Get the employer id
629: *
630: * @return string
631: */
632: public function getEmployerId() {
633: return $this->employerId;
634: }
635:
636: /**
637: * Set the employer id
638: *
639: * @param string $employerId
640: * @return User
641: */
642: public function setEmployerId($employerId) {
643: $this->employerId = $employerId;
644: return $this;
645: }
646:
647: /**
648: * Get the address line 1
649: *
650: * @return string
651: */
652: public function getAddressLine1() {
653: return $this->addressLine1;
654: }
655:
656: /**
657: * Set the address line 1
658: *
659: * @param string $addressLine1
660: * @return User
661: */
662: public function setAddressLine1($addressLine1) {
663: $this->addressLine1 = $addressLine1;
664: return $this;
665: }
666:
667: /**
668: * Get the address line 2
669: *
670: * @return string
671: */
672: public function getAddressLine2() {
673: return $this->addressLine2;
674: }
675:
676: /**
677: * Set the address line 2
678: *
679: * @param string $addressLine2
680: * @return User
681: */
682: public function setAddressLine2($addressLine2) {
683: $this->addressLine2 = $addressLine2;
684: return $this;
685: }
686:
687: /**
688: * Get the city
689: *
690: * @return string
691: */
692: public function getCity() {
693: return $this->city;
694: }
695:
696: /**
697: * Set the city
698: *
699: * @param string $city
700: * @return User
701: */
702: public function setCity($city) {
703: $this->city = $city;
704: return $this;
705: }
706:
707: /**
708: * Get the state or province
709: *
710: * @return string
711: */
712: public function getStateProvince() {
713: return $this->stateProvince;
714: }
715:
716: /**
717: * Set the state or province
718: *
719: * @param string $stateProvince
720: * @return User
721: */
722: public function setStateProvince($stateProvince) {
723: $this->stateProvince = $stateProvince;
724: return $this;
725: }
726:
727: /**
728: * Get the country
729: *
730: * @return string
731: */
732: public function getCountry() {
733: return $this->country;
734: }
735:
736: /**
737: * Set the country
738: *
739: * @param string $country
740: * @return User
741: */
742: public function setCountry($country) {
743: $this->country = $country;
744: return $this;
745: }
746:
747: /**
748: * Get the postal code
749: *
750: * @return string
751: */
752: public function getPostalCode() {
753: return $this->postalCode;
754: }
755:
756: /**
757: * Set the postal code
758: *
759: * @param string $postalCode
760: * @return User
761: */
762: public function setPostalCode($postalCode) {
763: $this->postalCode = $postalCode;
764: return $this;
765: }
766:
767: /**
768: * Get the user language
769: *
770: * @return string
771: */
772: public function getLanguage() {
773: return $this->language;
774: }
775:
776: /**
777: * Set the user language
778: *
779: * @param string $language
780: * @return User
781: */
782: public function setLanguage($language) {
783: $this->language = $language;
784: return $this;
785: }
786:
787: /**
788: * Get the users program token
789: *
790: * @return string
791: */
792: public function getProgramToken() {
793: return $this->programToken;
794: }
795:
796: /**
797: * Set the users program token
798: *
799: * @param string $programToken
800: * @return User
801: */
802: public function setProgramToken($programToken) {
803: $this->programToken = $programToken;
804: return $this;
805: }
806:
807: /**
808: * Get the users verification status
809: *
810: * @return string
811: */
812: public function getVerificationStatus() {
813: return $this->verificationStatus;
814: }
815:
816: /**
817: * Set the users verification status
818: *
819: * @param string $verificationStatus
820: * @return User
821: */
822: public function setVerificationStatus($verificationStatus) {
823: $this->verificationStatus = $verificationStatus;
824: return $this;
825: }
826:
827: /**
828: * Get the tax verification status
829: *
830: * @return string
831: */
832: public function getTaxVerificationStatus() {
833: return $this->taxVerificationStatus;
834: }
835:
836: /**
837: * Set the tax verification status
838: *
839: * @param string $taxVerificationStatus
840: * @return User
841: */
842: public function setTaxVerificationStatus($taxVerificationStatus) {
843: $this->taxVerificationStatus = $taxVerificationStatus;
844: return $this;
845: }
846:
847: public function getDocuments() {
848: return $this->documents;
849: }
850:
851: /**
852: * get Business Stakeholder verification status
853: *
854: * @return string
855: */
856: public function getBusinessStakeholderVerificationStatus() {
857: return $this->businessStakeholderVerificationStatus;
858: }
859:
860: /**
861: * set Business Stakeholder verification status
862: *
863: * @param string $businessStakeholderVerificationStatus
864: * @return User
865: */
866: public function setBusinessStakeholderVerificationStatus($businessStakeholderVerificationStatus) {
867: $this->businessStakeholderVerificationStatus = $businessStakeholderVerificationStatus;
868: return $this;
869: }
870:
871: /**
872: * Get the users Letter of Authorization status
873: *
874: * @return string
875: */
876: public function getLetterOfAuthorizationStatus() {
877: return $this->letterOfAuthorizationStatus;
878: }
879:
880: /**
881: * Set the users Letter of Authorization status
882: *
883: * @param string $letterOfAuthorizationStatus
884: * @return User
885: */
886: public function setLetterOfAuthorizationStatus($letterOfAuthorizationStatus) {
887: $this->letterOfAuthorizationStatus = $letterOfAuthorizationStatus;
888: return $this;
889: }
890:
891: /**
892: * get the users government Id Type
893: *
894: * @return string
895: */
896: public function getGovernmentIdType() {
897: return $this->governmentIdType;
898: }
899:
900: /**
901: * Set the users government Id Type
902: *
903: * @param string $governmentIdType
904: * @return User
905: */
906: public function setGovernmentIdType($governmentIdType) {
907: $this->governmentIdType = $governmentIdType;
908: return $this;
909: }
910:
911: /**
912: * get the user's time zone
913: *
914: * @return string
915: */
916: public function getTimeZone() {
917: return $this->timeZone;
918: }
919:
920: /**
921: * set the user's time zone
922: *
923: * @param string $timeZone
924: * @return User
925: */
926: public function setTimeZone($timeZone) {
927: $this->timeZone = $timeZone;
928: return $this;
929: }
930:
931: /**
932: * get the HATEOS links
933: *
934: * @return array
935: */
936: public function getLinks() {
937: return $this->links;
938: }
939:
940: /**
941: * set the HATEOS links
942: *
943: * @param array $links
944: * @return User
945: */
946: public function setLinks($links) {
947: $this->links = $links;
948: return $this;
949: }
950: }
951: