Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.85 KB | None | 0 0
  1. <?php
  2.  
  3. namespace ClientPortal\GenericBundle\Document;
  4.  
  5. use App\AppBundle\Document\SerializableDocumentTrait;
  6. use ClientPortal\GenericBundle\Exception\ValidationErrorException;
  7. use Integration\SalesforceBundle\Document\SfRelatedDocumentInterface;
  8. use Integration\SalesforceBundle\Object\SfObjectInterface;
  9. use Symfony\Component\Security\Core\User\AdvancedUserInterface;
  10.  
  11. class Accountant implements AdvancedUserInterface, SfRelatedDocumentInterface
  12. {
  13. use SerializableDocumentTrait;
  14.  
  15. const ROLE_ADMIN = 'ROLE_ADMIN';
  16. const ROLE_ACCOUNTANT = 'ROLE_ACCOUNTANT';
  17. const ROLE_REMOTE_ACCOUNTANT = 'ROLE_REMOTE_ACCOUNTANT';
  18. const ROLE_ACCOUNTANT_PWD_RESET = 'ROLE_ACCOUNTANT_PWD_RESET';
  19.  
  20. const ROLE_TAX_PREP = "Tax Rep";
  21. const ROLE_MANAGER = "Manager";
  22.  
  23. const SF_TEAM_ROLE_ANALYST = 'Analyst';
  24. const SF_TEAM_ROLE_TAX_ADVISOR = 'Tax Advisor';
  25. const SF_TEAM_ROLE_SENIOR_TAX_ADVISOR = 'Senior Tax Advisor';
  26. const SF_TEAM_ROLE_SUPPORT_ACCOUNTANT = 'Support Accountant';
  27. const SF_TEAM_ROLE_REMOTE_LZ = "Remote LZ";
  28. const SF_TEAM_ROLE_REMOTE_STA = "Remote STA";
  29. const SF_TEAM_ROLE_INACTIVE = "Inactive";
  30. const SF_TEAM_ROLE_NONE = "N/A";
  31.  
  32. const SF_ZONE_NONE = "N/A";
  33. const SF_ZONE_CST = "Central";
  34. const SF_ZONE_PST = "Pacific";
  35. const SF_ZONE_EST = "Eastern";
  36.  
  37. const FORBIDDEN_RECENT_PASSWORDS_NUM = 3; // number of recent passwords that cannot be used
  38. const PASSWORD_RESET_TOKEN_LIFETIME = 1440; //minutes = 24h
  39.  
  40. const SKILL_ONBOARDING = 'Onboarding';
  41.  
  42. /** @var \MongoId $id */
  43. protected $id;
  44.  
  45. /** @var string $username */
  46. protected $username;
  47.  
  48. /** @var string $password */
  49. protected $password;
  50.  
  51. /** @var string $sf_accountant_id */
  52. protected $sf_accountant_id;
  53.  
  54. /** @var bool */
  55. protected $in_salesforce;
  56.  
  57. /** @var boolean $active */
  58. protected $active = true;
  59.  
  60. /** @var boolean $cp_access */
  61. protected $cp_access = false;
  62.  
  63. /** @var boolean $is_admin */
  64. protected $is_admin = false;
  65.  
  66. /** @var boolean $is_remote_accountant */
  67. protected $is_remote_accountant = false;
  68.  
  69. /** @var string $first_name */
  70. protected $first_name;
  71.  
  72. /** @var string $last_name */
  73. protected $last_name;
  74.  
  75. /** @var string $phone */
  76. protected $phone;
  77.  
  78. /** @var string $profile */
  79. protected $profile;
  80.  
  81. /** @var string $sf_profile_id */
  82. protected $sf_profile_id;
  83.  
  84. /** @var string $role_id */
  85. protected $role_id;
  86.  
  87. /** @var string $role */
  88. protected $role;
  89.  
  90. /** @var string $sf_team_role */
  91. protected $sf_team_role;
  92.  
  93. /** @var string $sales_team */
  94. protected $sales_team;
  95.  
  96. /** @var integer Timestamp of password expiration date */
  97. protected $password_expires_at = 0;
  98.  
  99. /** @var boolean Is set to true when user changes password on first sign in */
  100. protected $was_password_reset;
  101.  
  102. /** @var array Array of recent encoded passwords */
  103. protected $recent_passwords;
  104.  
  105. /** @var string $password_reset_token */
  106. protected $password_reset_token;
  107.  
  108. /** @var \DateTime $password_reset_date */
  109. protected $password_reset_date;
  110.  
  111. /** @var string $photoLink */
  112. protected $photoLink;
  113.  
  114. /** @var AccountantTeam */
  115. protected $accountantTeam;
  116.  
  117. /** @var int */
  118. protected $teamSize = 0;
  119.  
  120. /** @var string */
  121. private $alias;
  122.  
  123. /** @var string */
  124. private $sf_username;
  125.  
  126. /** @var string */
  127. private $nickname;
  128.  
  129. /** @var string */
  130. private $department;
  131.  
  132. /** @var string */
  133. private $user_license;
  134.  
  135. /** @var string */
  136. private $extension;
  137.  
  138. /** @var string */
  139. private $email_encoding_key;
  140.  
  141. /** @var string */
  142. private $zone;
  143.  
  144. /** @var array */
  145. private $accounting_skills = [];
  146.  
  147. /** @var string */
  148. private $department_c;
  149.  
  150. /** @var string */
  151. private $office;
  152.  
  153. /** @var string */
  154. private $credentials;
  155.  
  156. /** @var string */
  157. private $gender;
  158.  
  159. /** @var bool */
  160. private $can_handle_vip_clients = true;
  161.  
  162. /** @var bool */
  163. private $non_profit = true;
  164.  
  165. /** @var bool */
  166. private $international_taxation = true;
  167.  
  168. /** @var array */
  169. private $languages = [];
  170.  
  171. /** @var array */
  172. private $industries = [];
  173.  
  174. /** @var string */
  175. private $timezone_sid_key;
  176.  
  177. /** @var string */
  178. private $locale_sid_key;
  179.  
  180. /** @var string */
  181. private $language_locale_key;
  182.  
  183. /** @var string */
  184. private $legalZoomLegalPlanId;
  185.  
  186. /**
  187. * @return array
  188. */
  189. public static function getAllTeamRoles(): array
  190. {
  191. return array_merge([self::SF_TEAM_ROLE_ANALYST], self::getDedicatedAccountantTeamRoles());
  192. }
  193.  
  194. /**
  195. * @return array
  196. */
  197. public static function getReportTeamRoles()
  198. {
  199. return [
  200. self::SF_TEAM_ROLE_SENIOR_TAX_ADVISOR,
  201. self::SF_TEAM_ROLE_SUPPORT_ACCOUNTANT,
  202. self::SF_TEAM_ROLE_ANALYST,
  203. self::SF_TEAM_ROLE_REMOTE_LZ,
  204. self::SF_TEAM_ROLE_REMOTE_STA,
  205. self::SF_TEAM_ROLE_INACTIVE,
  206. self::SF_TEAM_ROLE_NONE,
  207. ];
  208. }
  209.  
  210. /**
  211. * @return array
  212. */
  213. public static function getReportZones()
  214. {
  215. return [
  216. self::SF_ZONE_CST,
  217. self::SF_ZONE_PST,
  218. self::SF_ZONE_EST,
  219. self::SF_ZONE_NONE,
  220.  
  221. ];
  222. }
  223.  
  224. /**
  225. * @return array
  226. */
  227. public static function getDedicatedAccountantTeamRoles(): array
  228. {
  229. return [
  230. 'Dedicated Accountant',
  231. self::SF_TEAM_ROLE_SUPPORT_ACCOUNTANT,
  232. self::SF_TEAM_ROLE_TAX_ADVISOR,
  233. self::SF_TEAM_ROLE_SENIOR_TAX_ADVISOR,
  234. self::SF_TEAM_ROLE_REMOTE_STA
  235. ];
  236. }
  237.  
  238. /**
  239. * @return array Array of available accountants roles (from SF)
  240. */
  241. public static function accountantRoles(): array
  242. {
  243. return [
  244. "Billing Management",
  245. "David's Team",
  246. "Executive",
  247. "Inactive Users",
  248. self::ROLE_MANAGER,
  249. "Merchant Sales",
  250. "Ryan's Team",
  251. "Sales Rep",
  252. "Service Rep",
  253. self::ROLE_TAX_PREP,
  254. "Tiffanie's Team",
  255. ];
  256. }
  257.  
  258. /**
  259. * @return array
  260. */
  261. public static function accountantPermissionRoles(): array
  262. {
  263. return [
  264. self::ROLE_ADMIN => "Admin",
  265. self::ROLE_ACCOUNTANT => "Accountant",
  266. self::ROLE_REMOTE_ACCOUNTANT => "Remote Accountant",
  267. ];
  268. }
  269.  
  270. /**
  271. * Returns array with allowed roles, who can receipt emails about uploaded files
  272. *
  273. * @return array
  274. */
  275. public static function getEmailRecipientRoles(): array
  276. {
  277. return [
  278. self::SF_TEAM_ROLE_ANALYST,
  279. self::SF_TEAM_ROLE_TAX_ADVISOR,
  280. self::SF_TEAM_ROLE_SENIOR_TAX_ADVISOR,
  281. self::SF_TEAM_ROLE_SUPPORT_ACCOUNTANT,
  282. ];
  283. }
  284.  
  285. /**
  286. * {@inheritdoc}
  287. */
  288. public function getSfId(): ?string
  289. {
  290. return $this->getSfAccountantId();
  291. }
  292.  
  293. /**
  294. * {@inheritDoc}
  295. */
  296. public function setSfId(SfObjectInterface $sfObject): void
  297. {
  298. $this->setSfAccountantId($sfObject->getId());
  299. }
  300.  
  301. /**
  302. * Get id
  303. *
  304. * @return \MongoId $id
  305. */
  306. public function getId()
  307. {
  308. return $this->id;
  309. }
  310.  
  311. /**
  312. * Set username
  313. *
  314. * @param string $username
  315. *
  316. * @return Accountant
  317. */
  318. public function setUsername($username): self
  319. {
  320. $this->username = $username;
  321.  
  322. return $this;
  323. }
  324.  
  325. /**
  326. * Get username
  327. *
  328. * @return string $username
  329. */
  330. public function getUsername()
  331. {
  332. return $this->username;
  333. }
  334.  
  335. /**
  336. * Set password
  337. *
  338. * @param string $password
  339. *
  340. * @return Accountant
  341. */
  342. public function setPassword($password): self
  343. {
  344. $this->password = $password;
  345.  
  346. // update recent passwords
  347. $passwords = $this->getRecentPasswords();
  348. array_push($passwords, $password);
  349. // maintain maximum number of recent passwords <= static::FORBIDDEN_RECENT_PASSWORDS_NUM
  350. while (count((array) $passwords) > static::FORBIDDEN_RECENT_PASSWORDS_NUM) {
  351. array_shift($passwords);
  352. }
  353. $this->setRecentPasswords($passwords);
  354.  
  355. return $this;
  356. }
  357.  
  358. /**
  359. * Get password
  360. *
  361. * @return string $password
  362. */
  363. public function getPassword()
  364. {
  365. return $this->password;
  366. }
  367.  
  368. /**
  369. * Set sfAccountantId
  370. *
  371. * @param string $sfAccountantId
  372. *
  373. * @return Accountant
  374. */
  375. public function setSfAccountantId($sfAccountantId): self
  376. {
  377. $this->sf_accountant_id = $sfAccountantId;
  378.  
  379. return $this;
  380. }
  381.  
  382. /**
  383. * Get sfAccountantId
  384. *
  385. * @return string $sfAccountantId
  386. */
  387. public function getSfAccountantId()
  388. {
  389. return $this->sf_accountant_id;
  390. }
  391.  
  392. /**
  393. * Set inSalesforce
  394. *
  395. * @param bool $inSalesforce
  396. *
  397. * @return self
  398. */
  399. public function setInSalesforce($inSalesforce)
  400. {
  401. $this->in_salesforce = $inSalesforce;
  402.  
  403. return $this;
  404. }
  405.  
  406. /**
  407. * Get inSalesforce
  408. *
  409. * @return bool $inSalesforce
  410. */
  411. public function getInSalesforce()
  412. {
  413. return $this->in_salesforce;
  414. }
  415.  
  416. /**
  417. * Set active
  418. *
  419. * @param boolean $active
  420. *
  421. * @return Accountant
  422. */
  423. public function setActive($active): self
  424. {
  425. $this->active = $active;
  426.  
  427. return $this;
  428. }
  429.  
  430. /**
  431. * Get active
  432. *
  433. * @return boolean $active
  434. */
  435. public function isActive()
  436. {
  437. return $this->active;
  438. }
  439.  
  440. /**
  441. * Set cpAccess
  442. *
  443. * @param boolean $cpAccess
  444. *
  445. * @return Accountant
  446. */
  447. public function setCpAccess($cpAccess): self
  448. {
  449. $this->cp_access = $cpAccess;
  450.  
  451. return $this;
  452. }
  453.  
  454. /**
  455. * Get cpAccess
  456. *
  457. * @return boolean $cpAccess
  458. */
  459. public function getCpAccess()
  460. {
  461. return $this->cp_access;
  462. }
  463.  
  464. /**
  465. * Set isAdmin
  466. *
  467. * @param boolean $isAdmin
  468. *
  469. * @return Accountant
  470. */
  471. private function setIsAdmin($isAdmin): self
  472. {
  473. $this->is_admin = $isAdmin;
  474.  
  475. return $this;
  476. }
  477.  
  478. /**
  479. * Get isAdmin
  480. *
  481. * @return boolean $isAdmin
  482. */
  483. public function getIsAdmin()
  484. {
  485. return $this->is_admin;
  486. }
  487.  
  488. /**
  489. * Set $isRemoteAccountant
  490. *
  491. * @param boolean $isRemoteAccountant
  492. *
  493. * @return Accountant
  494. */
  495. private function setIsRemoteAccountant($isRemoteAccountant): self
  496. {
  497. $this->is_remote_accountant = $isRemoteAccountant;
  498.  
  499. return $this;
  500. }
  501.  
  502. /**
  503. * Get $isRemoteAccountant
  504. *
  505. * @return boolean
  506. */
  507. public function getIsRemoteAccountant()
  508. {
  509. return $this->is_remote_accountant;
  510. }
  511.  
  512. /**
  513. * Set firstName
  514. *
  515. * @param string $firstName
  516. *
  517. * @return Accountant
  518. */
  519. public function setFirstName($firstName): self
  520. {
  521. $this->first_name = $firstName;
  522.  
  523. return $this;
  524. }
  525.  
  526. /**
  527. * Get firstName
  528. *
  529. * @return string $firstName
  530. */
  531. public function getFirstName()
  532. {
  533. return $this->first_name;
  534. }
  535.  
  536. /**
  537. * @return string
  538. */
  539. public function getFullName()
  540. {
  541. return implode(' ', [$this->getFirstName(), $this->getLastName()]);
  542. }
  543.  
  544. /**
  545. * Set lastName
  546. *
  547. * @param string $lastName
  548. *
  549. * @return Accountant
  550. */
  551. public function setLastName($lastName): self
  552. {
  553. $this->last_name = $lastName;
  554.  
  555. return $this;
  556. }
  557.  
  558. /**
  559. * Get lastName
  560. *
  561. * @return string $lastName
  562. */
  563. public function getLastName()
  564. {
  565. return $this->last_name;
  566. }
  567.  
  568. // DO NOT REMOVE on regeneration
  569. public function eraseCredentials()
  570. {
  571. }
  572.  
  573. public function getSalt()
  574. {
  575. return null;
  576. }
  577.  
  578. /**
  579. * Returns user roles that are used to check permissions in API handlers
  580. *
  581. * @return string[]
  582. */
  583. public function getRoles()
  584. {
  585. if ((!$this->getIsAdmin() && !$this->getWasPasswordReset()) || $this->isPasswordExpired()) {
  586. // assign this role to accountants with weak passwords or all users with expired passwords
  587. return [self::ROLE_ACCOUNTANT_PWD_RESET];
  588. }
  589.  
  590. return [$this->getPermissionRole()];
  591. }
  592.  
  593. /**
  594. * Returns accountant role regardless of issues with password
  595. *
  596. * @return string
  597. */
  598. public function getPermissionRole()
  599. {
  600. if ($this->getIsAdmin()) {
  601. return self::ROLE_ADMIN;
  602. }
  603.  
  604. if ($this->getIsRemoteAccountant()) {
  605. return self::ROLE_REMOTE_ACCOUNTANT;
  606. }
  607.  
  608. return self::ROLE_ACCOUNTANT;
  609. }
  610.  
  611. /**
  612. * @param string $permissionRole
  613. *
  614. * @return Accountant
  615. * @throws ValidationErrorException
  616. */
  617. public function setPermissionRole($permissionRole): self
  618. {
  619. if (!in_array(trim($permissionRole), array_keys(self::accountantPermissionRoles()))) {
  620. throw new ValidationErrorException("Invalid accountant role provided.");
  621. }
  622.  
  623. switch ($permissionRole) {
  624. case self::ROLE_ADMIN:
  625. $this->setIsAdmin(true)
  626. ->setIsRemoteAccountant(false);
  627. break;
  628. case self::ROLE_REMOTE_ACCOUNTANT:
  629. $this->setIsAdmin(false)
  630. ->setIsRemoteAccountant(true);
  631. break;
  632. case self::ROLE_ACCOUNTANT:
  633. $this->setIsAdmin(false)
  634. ->setIsRemoteAccountant(false);
  635. break;
  636. }
  637.  
  638. return $this;
  639. }
  640.  
  641. /**
  642. * Set phone
  643. *
  644. * @param string $phone
  645. *
  646. * @return Accountant
  647. */
  648. public function setPhone($phone): self
  649. {
  650. $this->phone = $phone;
  651.  
  652. return $this;
  653. }
  654.  
  655. /**
  656. * Get phone
  657. *
  658. * @return string $phone
  659. */
  660. public function getPhone()
  661. {
  662. return $this->phone;
  663. }
  664.  
  665. /**
  666. * Set profile
  667. *
  668. * @param string $profile
  669. *
  670. * @return Accountant
  671. */
  672. public function setProfile($profile): self
  673. {
  674. $this->profile = $profile;
  675.  
  676. return $this;
  677. }
  678.  
  679. /**
  680. * Get profile
  681. *
  682. * @return string $profile
  683. */
  684. public function getProfile()
  685. {
  686. return $this->profile;
  687. }
  688.  
  689. /**
  690. * Set sfProfileId
  691. *
  692. * @param string $sfProfileId
  693. *
  694. * @return Accountant
  695. */
  696. public function setSfProfileId($sfProfileId): self
  697. {
  698. $this->sf_profile_id = $sfProfileId;
  699.  
  700. return $this;
  701. }
  702.  
  703. /**
  704. * Get sfProfileId
  705. *
  706. * @return string $sfProfileId
  707. */
  708. public function getSfProfileId()
  709. {
  710. return $this->sf_profile_id;
  711. }
  712.  
  713. /**
  714. * Set role
  715. *
  716. * @param string $sfRoleId
  717. *
  718. * @return Accountant
  719. */
  720. public function setRoleId($sfRoleId): self
  721. {
  722. $this->role_id = $sfRoleId;
  723.  
  724. return $this;
  725. }
  726.  
  727. /**
  728. * Get role
  729. *
  730. * @return string $role_id
  731. */
  732. public function getRoleId()
  733. {
  734. return $this->role_id;
  735. }
  736.  
  737. /**
  738. * Set role
  739. *
  740. * @param string $name
  741. *
  742. * @return Accountant
  743. */
  744. public function setRole($name): self
  745. {
  746. $this->role = $name;
  747.  
  748. return $this;
  749. }
  750.  
  751. /**
  752. * Get role
  753. *
  754. * @return string $role
  755. */
  756. public function getRole()
  757. {
  758. return $this->role;
  759. }
  760.  
  761. /**
  762. * @return bool
  763. */
  764. public function isDedicatedAccountant(): bool
  765. {
  766. return in_array($this->sf_team_role, self::getDedicatedAccountantTeamRoles());
  767. }
  768.  
  769. /**
  770. * @return null|string
  771. */
  772. public function getSfTeamRole(): ?string
  773. {
  774. return $this->sf_team_role;
  775. }
  776.  
  777. /**
  778. * @param string $sf_team_role
  779. *
  780. * @return Accountant
  781. */
  782. public function setSfTeamRole(?string $sf_team_role): self
  783. {
  784. $this->sf_team_role = $sf_team_role;
  785.  
  786. return $this;
  787. }
  788.  
  789. /**
  790. * @return string
  791. */
  792. public function getTeamRole(): string
  793. {
  794. if ($this->isDedicatedAccountant()) {
  795. return $this->sf_team_role;
  796. } else {
  797. return 'Accountant Team';
  798. }
  799. }
  800.  
  801. /**
  802. * Set salesTeam
  803. *
  804. * @param string $salesTeam
  805. *
  806. * @return Accountant
  807. */
  808. public function setSalesTeam($salesTeam): self
  809. {
  810. $this->sales_team = $salesTeam;
  811.  
  812. return $this;
  813. }
  814.  
  815. /**
  816. * Returns true if password was reset
  817. *
  818. * @return boolean
  819. */
  820. public function getWasPasswordReset()
  821. {
  822. return $this->was_password_reset;
  823. }
  824.  
  825. /**
  826. * @param boolean $value
  827. *
  828. * @return Accountant
  829. */
  830. public function setWasPasswordReset($value): self
  831. {
  832. $this->was_password_reset = $value;
  833.  
  834. return $this;
  835. }
  836.  
  837. /**
  838. * Returns password expiration timestamp
  839. *
  840. * @return integer
  841. */
  842. public function getPasswordExpiresAt()
  843. {
  844. return $this->password_expires_at;
  845. }
  846.  
  847. /**
  848. * @param integer $value
  849. *
  850. * @return Accountant
  851. */
  852. public function setPasswordExpiresAt($value): self
  853. {
  854. $this->password_expires_at = $value;
  855.  
  856. return $this;
  857. }
  858.  
  859. /**
  860. * Returns true if password has expired
  861. *
  862. * @return bool
  863. */
  864. public function isPasswordExpired(): bool
  865. {
  866. return time() > $this->password_expires_at;
  867. }
  868.  
  869. /**
  870. * Returns an array of encoded recent passwords
  871. *
  872. * @return array [type] [description]
  873. */
  874. public function getRecentPasswords()
  875. {
  876. return $this->recent_passwords ?: [];
  877. }
  878.  
  879. /**
  880. * Update recent passwords
  881. *
  882. * @param array $passwords
  883. *
  884. * @return Accountant
  885. */
  886. public function setRecentPasswords(array $passwords): self
  887. {
  888. $this->recent_passwords = $passwords;
  889.  
  890. return $this;
  891. }
  892.  
  893. /**
  894. * Set passwordResetToken
  895. *
  896. * @param string $passwordResetToken
  897. *
  898. * @return Accountant
  899. */
  900. public function setPasswordResetToken($passwordResetToken): self
  901. {
  902. $this->password_reset_token = $passwordResetToken;
  903.  
  904. return $this;
  905. }
  906.  
  907. /**
  908. * Get passwordResetToken
  909. *
  910. * @return string $passwordResetToken
  911. */
  912. public function getPasswordResetToken()
  913. {
  914. return $this->password_reset_token;
  915. }
  916.  
  917. /**
  918. * Set passwordResetDate
  919. *
  920. * @param \DateTime $passwordResetDate
  921. *
  922. * @return Accountant
  923. */
  924. public function setPasswordResetDate($passwordResetDate): self
  925. {
  926. $this->password_reset_date = $passwordResetDate;
  927.  
  928. return $this;
  929. }
  930.  
  931. /**
  932. * Get passwordResetDate
  933. *
  934. * @return \DateTime $passwordResetDate
  935. */
  936. public function getPasswordResetDate()
  937. {
  938. return $this->password_reset_date;
  939. }
  940.  
  941. /**
  942. * @return bool
  943. */
  944. public function needCurrentPasswordValidate(): bool
  945. {
  946. return !empty($this->password) && empty($this->password_reset_token);
  947. }
  948.  
  949. /**
  950. * Set photoLink
  951. *
  952. * @param string $photoLink
  953. *
  954. * @return Accountant
  955. */
  956. public function setPhotoLink(string $photoLink): self
  957. {
  958. $this->photoLink = $photoLink;
  959.  
  960. return $this;
  961. }
  962.  
  963. /**
  964. * Get photoLink
  965. *
  966. * @return string $photoLink
  967. */
  968. public function getPhotoLink()
  969. {
  970. return $this->photoLink;
  971. }
  972.  
  973. /**
  974. * @param AccountantTeam|null $accountantTeam
  975. *
  976. * @return Accountant
  977. */
  978. public function setAccountantTeam(?AccountantTeam $accountantTeam): self
  979. {
  980. $this->accountantTeam = $accountantTeam;
  981.  
  982. return $this;
  983. }
  984.  
  985. /**
  986. * @return string
  987. */
  988. public function getAccountantTeamName()
  989. {
  990. return $this->accountantTeam instanceof AccountantTeam ? $this->accountantTeam->getName() : null;
  991. }
  992.  
  993. /**
  994. * @return string
  995. */
  996. public function getAccountantTeamId()
  997. {
  998. return $this->accountantTeam instanceof AccountantTeam ? $this->accountantTeam->getId() : null;
  999. }
  1000.  
  1001. /**
  1002. * Get salesTeam
  1003. *
  1004. * @return string $salesTeam
  1005. */
  1006. public function getSalesTeam()
  1007. {
  1008. return $this->sales_team;
  1009. }
  1010.  
  1011. /**
  1012. * @return bool
  1013. */
  1014. public function isAccountNonLocked()
  1015. {
  1016. return true;
  1017. }
  1018.  
  1019. /**
  1020. * @return bool
  1021. */
  1022. public function isAccountNonExpired()
  1023. {
  1024. return true;
  1025. }
  1026.  
  1027. /**
  1028. * @return bool
  1029. */
  1030. public function isCredentialsNonExpired()
  1031. {
  1032. return true;
  1033. }
  1034.  
  1035. /**
  1036. * @return bool
  1037. */
  1038. public function isEnabled()
  1039. {
  1040. return true;
  1041. }
  1042.  
  1043. /**
  1044. * @return string
  1045. */
  1046. public function getAlias()
  1047. {
  1048. return $this->alias;
  1049. }
  1050.  
  1051. /**
  1052. * @param string $alias
  1053. *
  1054. * @return Accountant
  1055. */
  1056. public function setAlias($alias): self
  1057. {
  1058. $this->alias = $alias;
  1059.  
  1060. return $this;
  1061. }
  1062.  
  1063. /**
  1064. * @return string
  1065. */
  1066. public function getSfUsername()
  1067. {
  1068. return $this->sf_username;
  1069. }
  1070.  
  1071. /**
  1072. * @param string $sf_username
  1073. *
  1074. * @return Accountant
  1075. */
  1076. public function setSfUsername($sf_username): self
  1077. {
  1078. $this->sf_username = $sf_username;
  1079.  
  1080. return $this;
  1081. }
  1082.  
  1083. /**
  1084. * @return string
  1085. */
  1086. public function getNickname()
  1087. {
  1088. return $this->nickname;
  1089. }
  1090.  
  1091. /**
  1092. * @param string $nickname
  1093. *
  1094. * @return Accountant
  1095. */
  1096. public function setNickname($nickname): self
  1097. {
  1098. $this->nickname = $nickname;
  1099.  
  1100. return $this;
  1101. }
  1102.  
  1103. /**
  1104. * @return string
  1105. */
  1106. public function getDepartment()
  1107. {
  1108. return $this->department;
  1109. }
  1110.  
  1111. /**
  1112. * @param string $department
  1113. *
  1114. * @return Accountant
  1115. */
  1116. public function setDepartment($department): self
  1117. {
  1118. $this->department = $department;
  1119.  
  1120. return $this;
  1121. }
  1122.  
  1123. /**
  1124. * @return string
  1125. */
  1126. public function getUserLicense()
  1127. {
  1128. return $this->user_license;
  1129. }
  1130.  
  1131. /**
  1132. * @param string $user_license
  1133. *
  1134. * @return Accountant
  1135. */
  1136. public function setUserLicense($user_license): self
  1137. {
  1138. $this->user_license = $user_license;
  1139.  
  1140. return $this;
  1141. }
  1142.  
  1143. /**
  1144. * @return string
  1145. */
  1146. public function getExtension()
  1147. {
  1148. return $this->extension;
  1149. }
  1150.  
  1151. /**
  1152. * @param string $extension
  1153. *
  1154. * @return Accountant
  1155. */
  1156. public function setExtension($extension): self
  1157. {
  1158. $this->extension = $extension;
  1159.  
  1160. return $this;
  1161. }
  1162.  
  1163. /**
  1164. * @return string
  1165. */
  1166. public function getEmailEncodingKey()
  1167. {
  1168. return $this->email_encoding_key;
  1169. }
  1170.  
  1171. /**
  1172. * @param string $email_encoding_key
  1173. *
  1174. * @return Accountant
  1175. */
  1176. public function setEmailEncodingKey($email_encoding_key): self
  1177. {
  1178. $this->email_encoding_key = $email_encoding_key;
  1179.  
  1180. return $this;
  1181. }
  1182.  
  1183. /**
  1184. * @return string
  1185. */
  1186. public function getZone()
  1187. {
  1188. return $this->zone;
  1189. }
  1190.  
  1191. /**
  1192. * @param string $zone
  1193. *
  1194. * @return Accountant
  1195. */
  1196. public function setZone($zone): self
  1197. {
  1198. $this->zone = $zone;
  1199.  
  1200. return $this;
  1201. }
  1202.  
  1203. /**
  1204. * @return array
  1205. */
  1206. public function getAccountingSkills()
  1207. {
  1208. return $this->accounting_skills;
  1209. }
  1210.  
  1211. /**
  1212. * @param array $accounting_skills
  1213. *
  1214. * @return Accountant
  1215. */
  1216. public function setAccountingSkills($accounting_skills): self
  1217. {
  1218. $this->accounting_skills = $accounting_skills;
  1219.  
  1220. return $this;
  1221. }
  1222.  
  1223. /**
  1224. * @return string
  1225. */
  1226. public function getDepartmentC()
  1227. {
  1228. return $this->department_c;
  1229. }
  1230.  
  1231. /**
  1232. * @param string $department_c
  1233. *
  1234. * @return Accountant
  1235. */
  1236. public function setDepartmentC($department_c): self
  1237. {
  1238. $this->department_c = $department_c;
  1239.  
  1240. return $this;
  1241. }
  1242.  
  1243. /**
  1244. * @return string
  1245. */
  1246. public function getOffice()
  1247. {
  1248. return $this->office;
  1249. }
  1250.  
  1251. /**
  1252. * @param string $office
  1253. *
  1254. * @return Accountant
  1255. */
  1256. public function setOffice($office): self
  1257. {
  1258. $this->office = $office;
  1259.  
  1260. return $this;
  1261. }
  1262.  
  1263. /**
  1264. * @return string
  1265. */
  1266. public function getCredentials()
  1267. {
  1268. return $this->credentials;
  1269. }
  1270.  
  1271. /**
  1272. * @param string $credentials
  1273. *
  1274. * @return Accountant
  1275. */
  1276. public function setCredentials($credentials): self
  1277. {
  1278. $this->credentials = $credentials;
  1279.  
  1280. return $this;
  1281. }
  1282.  
  1283. /**
  1284. * @return string
  1285. */
  1286. public function getGender()
  1287. {
  1288. return $this->gender;
  1289. }
  1290.  
  1291. /**
  1292. * @param string $gender
  1293. *
  1294. * @return Accountant
  1295. */
  1296. public function setGender($gender): self
  1297. {
  1298. $this->gender = $gender;
  1299.  
  1300. return $this;
  1301. }
  1302.  
  1303. /**
  1304. * @return bool|null
  1305. */
  1306. public function getCanHandleVipClients(): ?bool
  1307. {
  1308. return $this->can_handle_vip_clients;
  1309. }
  1310.  
  1311. /**
  1312. * @param bool|null $can_handle_vip_clients
  1313. *
  1314. * @return Accountant
  1315. */
  1316. public function setCanHandleVipClients(?bool $can_handle_vip_clients): self
  1317. {
  1318. $this->can_handle_vip_clients = $can_handle_vip_clients;
  1319.  
  1320. return $this;
  1321. }
  1322.  
  1323. /**
  1324. * @return bool|null
  1325. */
  1326. public function getNonProfit(): ?bool
  1327. {
  1328. return $this->non_profit;
  1329. }
  1330.  
  1331. /**
  1332. * @param bool|null $non_profit
  1333. *
  1334. * @return Accountant
  1335. */
  1336. public function setNonProfit(?bool $non_profit): self
  1337. {
  1338. $this->non_profit = $non_profit;
  1339.  
  1340. return $this;
  1341. }
  1342.  
  1343. /**
  1344. * @return bool|null
  1345. */
  1346. public function getInternationalTaxation(): ?bool
  1347. {
  1348. return $this->international_taxation;
  1349. }
  1350.  
  1351. /**
  1352. * @param bool|null $international_taxation
  1353. *
  1354. * @return Accountant
  1355. */
  1356. public function setInternationalTaxation(?bool $international_taxation): self
  1357. {
  1358. $this->international_taxation = $international_taxation;
  1359.  
  1360. return $this;
  1361. }
  1362.  
  1363. /**
  1364. * @return array
  1365. */
  1366. public function getLanguages()
  1367. {
  1368. return $this->languages;
  1369. }
  1370.  
  1371. /**
  1372. * @param array $languages
  1373. *
  1374. * @return Accountant
  1375. */
  1376. public function setLanguages($languages): self
  1377. {
  1378. $this->languages = $languages;
  1379.  
  1380. return $this;
  1381. }
  1382.  
  1383. /**
  1384. * @return array
  1385. */
  1386. public function getIndustries()
  1387. {
  1388. return $this->industries;
  1389. }
  1390.  
  1391. /**
  1392. * @param array $industries
  1393. *
  1394. * @return Accountant
  1395. */
  1396. public function setIndustries($industries): self
  1397. {
  1398. $this->industries = $industries;
  1399.  
  1400. return $this;
  1401. }
  1402.  
  1403. /**
  1404. * @return string
  1405. */
  1406. public function getTimezoneSidKey()
  1407. {
  1408. return $this->timezone_sid_key;
  1409. }
  1410.  
  1411. /**
  1412. * @param string $timezone_sid_key
  1413. *
  1414. * @return Accountant
  1415. */
  1416. public function setTimezoneSidKey($timezone_sid_key): self
  1417. {
  1418. $this->timezone_sid_key = $timezone_sid_key;
  1419.  
  1420. return $this;
  1421. }
  1422.  
  1423. /**
  1424. * @return string
  1425. */
  1426. public function getLocaleSidKey()
  1427. {
  1428. return $this->locale_sid_key;
  1429. }
  1430.  
  1431. /**
  1432. * @param string $locale_sid_key
  1433. *
  1434. * @return Accountant
  1435. */
  1436. public function setLocaleSidKey($locale_sid_key): self
  1437. {
  1438. $this->locale_sid_key = $locale_sid_key;
  1439.  
  1440. return $this;
  1441. }
  1442.  
  1443. /**
  1444. * @return string
  1445. */
  1446. public function getLanguageLocaleKey()
  1447. {
  1448. return $this->language_locale_key;
  1449. }
  1450.  
  1451. /**
  1452. * @param string $language_locale_key
  1453. *
  1454. * @return Accountant
  1455. */
  1456. public function setLanguageLocaleKey($language_locale_key): self
  1457. {
  1458. $this->language_locale_key = $language_locale_key;
  1459.  
  1460. return $this;
  1461. }
  1462.  
  1463. /**
  1464. * @param int $teamSize
  1465. *
  1466. * @return Accountant
  1467. */
  1468. public function setTeamSize(int $teamSize): self
  1469. {
  1470. $this->teamSize = $teamSize;
  1471.  
  1472. return $this;
  1473. }
  1474.  
  1475. /**
  1476. * @return int
  1477. */
  1478. public function getTeamSize(): int
  1479. {
  1480. return $this->teamSize;
  1481. }
  1482.  
  1483. /**
  1484. * @param null|string $legalZoomLegalPlanId
  1485. *
  1486. * @return Accountant
  1487. */
  1488. public function setLegalZoomLegalPlanId(?string $legalZoomLegalPlanId = null): self
  1489. {
  1490. $this->legalZoomLegalPlanId = $legalZoomLegalPlanId;
  1491.  
  1492. return $this;
  1493. }
  1494.  
  1495. /**
  1496. * @return null|string
  1497. */
  1498. public function getLegalZoomLegalPlanId(): ?string
  1499. {
  1500. return $this->legalZoomLegalPlanId;
  1501. }
  1502.  
  1503. /**
  1504. * @return string|null
  1505. */
  1506. public function getMitelTeam():?string{
  1507. return $this->accountantTeam instanceof AccountantTeam ? $this->accountantTeam->getMitelTeam() : null;
  1508. }
  1509.  
  1510. /**
  1511. * @return string|null
  1512. */
  1513. public function getMitelTeamExtension():?string{
  1514. return $this->accountantTeam instanceof AccountantTeam ? $this->accountantTeam->getMitelTeamExtension() : null;
  1515. }
  1516. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement