src/Entity/System/Customer.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use App\Factory\ControlPanel\Wishlist\WishListFactory;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  8. use Symfony\Component\Security\Core\User\UserInterface;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. /**
  11.  * Customer
  12.  *
  13.  * @ORM\Table(name="ps_customer")
  14.  *
  15.  * @ORM\Entity(repositoryClass="App\Repository\System\CustomerRepository")
  16.  */
  17. class Customer implements UserInterfacePasswordAuthenticatedUserInterface
  18. {
  19.     public const DEFAULT_SYS_USER_ID 1523;
  20.     public const IDS_USERS_SYS = [self::DEFAULT_SYS_USER_ID131588131590245190];
  21.     public const PARTIAL_CREATION_STEP_0 2;
  22.     public const ACCOUNT_COMPLETE 0;
  23.     public const ID_CUSTOMER_NOT_BILLING_AGREEMENT '0';
  24.     public const WORKHUMAN_CUSTOMER_IDS = [232487235957235968235969235972235973235974235976235977235978235980235986235989235993235994235996277077425892425896454066454504454508454511454513454515635273669050];
  25.     public const WORKHUMAN_PRICE_FACTOR 1.01;
  26.     public const PREFIX_DROP 'baja_';
  27.     public const NINE_CUSTOMER_ID 132688;
  28.     public const CUSTOMER_DISABLE_CONTROL_FLAG '_baja';
  29.     public const CUSTOMER_PERCENTAGE_COST_PRICES_INDEXED_BY_CUSTOMER_ID = [self::NINE_CUSTOMER_ID => 0.0];
  30.     public const EQUIVALENCE_SURCHARGE_2_NAME 'REC_EQ_2';
  31.     public const EQUIVALENCE_SURCHARGE_2_VALUE 0.0026;
  32.     public const EQUIVALENCE_SURCHARGE_4_NAME 'REC_EQ_4';
  33.     public const EQUIVALENCE_SURCHARGE_4_VALUE 0.005;
  34.     public const EQUIVALENCE_SURCHARGE_5_NAME 'REC_EQ_5';
  35.     public const EQUIVALENCE_SURCHARGE_5_VALUE 0.006;
  36.     public const EQUIVALENCE_SURCHARGE_7_NAME 'REC_EQ_7';
  37.     public const EQUIVALENCE_SURCHARGE_7_VALUE 0.01;
  38.     public const EQUIVALENCE_SURCHARGE_10_NAME 'REC_EQ_10';
  39.     public const EQUIVALENCE_SURCHARGE_10_VALUE 0.014;
  40.     public const EQUIVALENCE_SURCHARGE_21_NAME 'REC_EQ_21';
  41.     public const EQUIVALENCE_SURCHARGE_21_VALUE 0.052;
  42.     public const EQUIVALENCE_SURCHARGE_PERCENTAGE_INDEXED_BY_NAME = [
  43.         self::EQUIVALENCE_SURCHARGE_2_NAME => self::EQUIVALENCE_SURCHARGE_2_VALUE,
  44.         self::EQUIVALENCE_SURCHARGE_4_NAME => self::EQUIVALENCE_SURCHARGE_4_VALUE,
  45.         self::EQUIVALENCE_SURCHARGE_5_NAME => self::EQUIVALENCE_SURCHARGE_5_VALUE,
  46.         self::EQUIVALENCE_SURCHARGE_7_NAME => self::EQUIVALENCE_SURCHARGE_7_VALUE,
  47.         self::EQUIVALENCE_SURCHARGE_10_NAME => self::EQUIVALENCE_SURCHARGE_10_VALUE,
  48.         self::EQUIVALENCE_SURCHARGE_21_NAME => self::EQUIVALENCE_SURCHARGE_21_VALUE,
  49.     ];
  50.     /**
  51.      * @ORM\Id()
  52.      *
  53.      * @ORM\GeneratedValue()
  54.      *
  55.      * @ORM\Column(type="integer", name="id_customer")
  56.      */
  57.     private $id;
  58.     /**
  59.      * @var Group|null
  60.      *
  61.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Group", inversedBy="customers")
  62.      *
  63.      * @ORM\JoinColumn(name="id_group", referencedColumnName="id_group",referencedColumnName="id_group")
  64.      */
  65.     private $group;
  66.     /**
  67.      * @var Language|null
  68.      *
  69.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
  70.      *
  71.      * @ORM\JoinColumn(name="id_lang", referencedColumnName="id_lang",referencedColumnName="id_lang")
  72.      */
  73.     private $language;
  74.     /**
  75.      * @var string|null
  76.      *
  77.      * @ORM\Column(type="string", length=14, nullable=true)
  78.      */
  79.     private $prefixe;
  80.     /**
  81.      * @var string|null
  82.      *
  83.      * @ORM\Column(type="string", length=100, nullable=true)
  84.      */
  85.     private $name;
  86.     /**
  87.      * @var string|null
  88.      *
  89.      * @ORM\Column(type="string", length=32, nullable=true)
  90.      */
  91.     private $surnames;
  92.     /**
  93.      * @var string
  94.      *
  95.      * @Assert\Email
  96.      *
  97.      * @ORM\Column(type="string", length=128)
  98.      */
  99.     private $email;
  100.     /**
  101.      * @var string
  102.      *
  103.      * @ORM\Column(type="string", length=100)
  104.      */
  105.     private $passwd;
  106.     /**
  107.      * @var string|null
  108.      *
  109.      * @ORM\Column(type="string", length=32, nullable=true)
  110.      */
  111.     private $taxNumber;
  112.     /**
  113.      * @var int|null
  114.      *
  115.      * @ORM\Column(type="integer", length=11, nullable=true)
  116.      */
  117.     private $idPack;
  118.     /**
  119.      * @var float
  120.      *
  121.      * @ORM\Column(type="decimal", precision=10, scale=2)
  122.      */
  123.     private $purse;
  124.     /**
  125.      * @var \DateTime
  126.      *
  127.      * @ORM\Column(type="datetime", options={"default" : "CURRENT_TIMESTAMP"})
  128.      */
  129.     private $lastPasswdGen;
  130.     /**
  131.      * @var \DateTime|null
  132.      *
  133.      * @ORM\Column(type="date", nullable=true)
  134.      */
  135.     private $birthday;
  136.     /**
  137.      * @var bool
  138.      *
  139.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  140.      */
  141.     private $newsletter;
  142.     /**
  143.      * @var string|null
  144.      *
  145.      * @ORM\Column(type="string", length=15, nullable=true)
  146.      */
  147.     private $ipRegistrationNewsletter;
  148.     /**
  149.      * @var \DateTime
  150.      *
  151.      * @ORM\Column(type="datetime", nullable=true)
  152.      */
  153.     private $block;
  154.     /**
  155.      * @var bool
  156.      *
  157.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  158.      */
  159.     private $withdrawalWarehouse;
  160.     /**
  161.      * @var bool
  162.      *
  163.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  164.      */
  165.     private $multifactorAuthEnabled;
  166.     /**
  167.      * @var bool
  168.      *
  169.      * @ORM\Column(type="boolean", columnDefinition="tinyint(4)", options={"default" : 0})
  170.      */
  171.     private $subscription;
  172.     /**
  173.      * @var int|null
  174.      *
  175.      * @ORM\Column(type="integer", length=10, nullable=true)
  176.      */
  177.     private $idService;
  178.     /**
  179.      * @var int|null
  180.      *               Number of hours that orders owned by this customer
  181.      *               must be delayed until confirmed by ERP
  182.      *
  183.      * @ORM\Column(type="integer", nullable=true)
  184.      */
  185.     private $orderConfirmationDelay;
  186.     /**
  187.      * @var bool
  188.      *
  189.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  190.      */
  191.     private $reserve;
  192.     /**
  193.      * @var bool
  194.      *
  195.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  196.      */
  197.     private $active;
  198.     /**
  199.      * @var bool
  200.      *
  201.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  202.      */
  203.     private $isGuest;
  204.     /**
  205.      * @var bool
  206.      *
  207.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  208.      */
  209.     private $isValidVat;
  210.     /**
  211.      * @var bool
  212.      *
  213.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  214.      */
  215.     private $dropshipping;
  216.     /**
  217.      * @var \DateTime
  218.      *
  219.      * @ORM\Column(type="datetime")
  220.      */
  221.     private $dateAdd;
  222.     /**
  223.      * @var \DateTime
  224.      *
  225.      * @ORM\Column(type="datetime")
  226.      */
  227.     private $dateUpd;
  228.     /**
  229.      * @var string|null
  230.      *
  231.      * @ORM\Column(type="text", nullable=true)
  232.      */
  233.     private $comment;
  234.     /**
  235.      * @var string|null
  236.      *
  237.      * @ORM\Column(type="string", length=10, nullable=true)
  238.      */
  239.     private $commissionAgent;
  240.     /**
  241.      * @ORM\Column(type="datetime", nullable=true)
  242.      */
  243.     private $dateCsv;
  244.     /**
  245.      * @var \DateTime|null
  246.      *
  247.      * @ORM\Column(type="datetime", nullable=true)
  248.      */
  249.     private $dateBlock;
  250.     /**
  251.      * @var string|null
  252.      *
  253.      * @ORM\Column(type="string", length=30, nullable=true, options={"default" : "0"})
  254.      */
  255.     private $paypalBillingAgreement;
  256.     /**
  257.      * @var \DateTime|null
  258.      *
  259.      * @ORM\Column(type="datetime", nullable=true)
  260.      */
  261.     private $datePack;
  262.     /**
  263.      * @var string|null
  264.      *
  265.      * @ORM\Column(type="string", length=2, nullable=true)
  266.      */
  267.     private $csvLang;
  268.     /**
  269.      * @var string|null
  270.      *
  271.      * @ORM\Column(type="string", length=50, nullable=true)
  272.      */
  273.     private $dropshippingName;
  274.     /**
  275.      * @var string|null
  276.      *
  277.      * @ORM\Column(type="string", length=100, nullable=true)
  278.      */
  279.     private $emailPaypal;
  280.     /**
  281.      * @var bool|null
  282.      *
  283.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  284.      */
  285.     private $sincronizedErp;
  286.     /**
  287.      * @var bool|null
  288.      *
  289.      * @ORM\Column(type="boolean", columnDefinition="tinyint(4)", options={"default" : 0}, nullable=true)
  290.      */
  291.     private $promotions;
  292.     /**
  293.      * @var bool|null
  294.      *
  295.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0}, nullable=true)
  296.      */
  297.     private $moroso;
  298.     /**
  299.      * @var bool|null
  300.      *
  301.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0}, nullable=true)
  302.      */
  303.     private $avatar;
  304.     /**
  305.      * @var bool|null
  306.      *
  307.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0}, nullable=true)
  308.      */
  309.     private $avisoContabilidad;
  310.     /**
  311.      * @var string|null
  312.      *
  313.      * @ORM\Column(type="string", length=25, nullable=true)
  314.      */
  315.     private $payerIdPaypal;
  316.     /**
  317.      * @var bool
  318.      *
  319.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 1})
  320.      */
  321.     private $orderCsv;
  322.     /**
  323.      * @var \DateTime|null
  324.      *
  325.      * @ORM\Column(type="datetime", nullable=true)
  326.      */
  327.     private $dateBasicFree;
  328.     /**
  329.      * @var bool|null
  330.      *
  331.      * @ORM\Column(type="boolean", columnDefinition="tinyint(4)" ,nullable=true)
  332.      */
  333.     private $excluirVies;
  334.     /**
  335.      * @var bool|null
  336.      *
  337.      * @ORM\Column(type="boolean", columnDefinition="tinyint(4)", options={"default" : 0}, nullable=true)
  338.      */
  339.     private $blocked;
  340.     /**
  341.      * @var \DateTime|null
  342.      *
  343.      * @ORM\Column(type="datetime", nullable=true)
  344.      */
  345.     private $dateExcluirIva;
  346.     /**
  347.      * @var float|null
  348.      *
  349.      * @ORM\Column(type="float", precision=10, scale=2, options={"default" : 0.00}, nullable=true)
  350.      */
  351.     private $dtoPersonal1;
  352.     /**
  353.      * @var float|null
  354.      *
  355.      * @ORM\Column(type="float", precision=10, scale=2, options={"default" : 0.00}, nullable=true)
  356.      */
  357.     private $dtoPersonal2;
  358.     /**
  359.      * @var float|null
  360.      *
  361.      * @ORM\Column(type="float", precision=10, scale=2, options={"default" : 0.00}, nullable=true)
  362.      */
  363.     private $dtoPersonal3;
  364.     /**
  365.      * @var float|null
  366.      *
  367.      * @ORM\Column(type="float", precision=10, scale=2, options={"default" : 0.00}, nullable=true)
  368.      */
  369.     private $importePersonal1;
  370.     /**
  371.      * @var float|null
  372.      *
  373.      * @ORM\Column(type="float", precision=10, scale=2, options={"default" : 0.00}, nullable=true)
  374.      */
  375.     private $importePersonal2;
  376.     /**
  377.      * @var float|null
  378.      *
  379.      * @ORM\Column(type="float", precision=10, scale=2, options={"default" : 0.00}, nullable=true)
  380.      */
  381.     private $importePersonal3;
  382.     /**
  383.      * @var int|null
  384.      *
  385.      * @ORM\Column(type="integer", length=11, options={"default" : 0}, nullable=true)
  386.      */
  387.     private $creditType;
  388.     /**
  389.      * @var int|null
  390.      *
  391.      * @ORM\Column(type="integer", length=11, nullable=true)
  392.      */
  393.     private $multichannelUserId;
  394.     /**
  395.      * @var bool|null
  396.      *
  397.      * @ORM\Column(type="boolean")
  398.      */
  399.     private $forcePasswordUpdate;
  400.     /**
  401.      * @var int|null
  402.      *
  403.      * @ORM\Column(type="integer", length=2, nullable=true)
  404.      */
  405.     private $top;
  406.     /**
  407.      * @var string|null
  408.      *
  409.      * @ORM\Column(type="string", name="KAM", length=50, nullable=true)
  410.      */
  411.     private $kam;
  412.     /**
  413.      * @var \DateTime|null
  414.      *
  415.      * @ORM\Column(type="datetime", nullable=true)
  416.      */
  417.     private $readPolicyCookies;
  418.     /**
  419.      * @var string|null
  420.      *
  421.      * @ORM\Column(type="string", length=32, nullable=true)
  422.      */
  423.     private $sector;
  424.     /**
  425.      * @var string|null
  426.      *
  427.      * @ORM\Column(type="string", length=32, nullable=true)
  428.      */
  429.     private $catchment;
  430.     /**
  431.      * @var string|null
  432.      *
  433.      * @ORM\Column(type="string", length=64, nullable=true)
  434.      */
  435.     private $type;
  436.     /**
  437.      * @var int|null
  438.      *
  439.      * @ORM\Column(type="integer", length=1, options={"default" : 0}, nullable=true)
  440.      */
  441.     private $packByPurse;
  442.     /**
  443.      * @var int|null
  444.      *
  445.      * @ORM\Column(type="integer", length=1)
  446.      */
  447.     private $partialCreation;
  448.     /**
  449.      * @var bool|null
  450.      *
  451.      * @ORM\Column(type="boolean", length=1, options={"default" : 0})
  452.      */
  453.     private $purchaseNotAllowed;
  454.     /**
  455.      * @var \DateTime|null
  456.      *
  457.      * @ORM\Column(type="datetime", nullable=true)
  458.      */
  459.     private $dateEnding;
  460.     /**
  461.      * @var bool|null
  462.      *
  463.      * @ORM\Column(type="boolean", nullable=true)
  464.      */
  465.     private $packBankwirePayment;
  466.     /**
  467.      * @ORM\OneToMany(targetEntity="App\Entity\System\Order", mappedBy="customer")
  468.      */
  469.     private $orders;
  470.     /**
  471.      * @ORM\OneToMany(targetEntity="App\Entity\System\Address", mappedBy="customer",  cascade={"persist"})
  472.      */
  473.     private $addresses;
  474.     /**
  475.      * @var ArrayCollection|FuturePack[]
  476.      *
  477.      * @ORM\OneToMany(targetEntity="App\Entity\System\FuturePack", mappedBy="customer")
  478.      */
  479.     private $futurePacks;
  480.     /**
  481.      * @var ArrayCollection|SubscriptionLine[]
  482.      *
  483.      * @ORM\OneToMany(targetEntity="SubscriptionLine", mappedBy="customer")
  484.      */
  485.     private $subscriptionLines;
  486.     /**
  487.      * @var ArrayCollection|ServiceCustomer[]
  488.      *
  489.      * @ORM\OneToMany(targetEntity="ServiceCustomer", mappedBy="customer", cascade={"persist"})
  490.      */
  491.     private $serviceCustomer;
  492.     /**
  493.      * @ORM\OneToMany(targetEntity="CustomerApi", mappedBy="customer", cascade={"persist"})
  494.      */
  495.     private $customerApi;
  496.     /**
  497.      * @ORM\OneToMany(targetEntity="CustomerLog", mappedBy="customer", cascade={"persist"})
  498.      */
  499.     private $customerLog;
  500.     /**
  501.      * @ORM\OneToMany(targetEntity="App\Entity\System\Ftp", mappedBy="customer")
  502.      */
  503.     private $ftp;
  504.     /**
  505.      * @ORM\OneToMany(targetEntity="App\Entity\System\SynchronisedShopConfiguration", mappedBy="customer")
  506.      */
  507.     private $syncronisedShopConfiguration;
  508.     /**
  509.      * @ORM\OneToMany(targetEntity="App\Entity\System\CustomerMigration", mappedBy="customer")
  510.      */
  511.     private $customerMigration;
  512.     /**
  513.      * @var Role[]|ArrayCollection
  514.      *
  515.      * @ORM\ManyToMany(targetEntity="App\Entity\System\Role", inversedBy="customers")
  516.      *
  517.      * @ORM\JoinTable(name="customer_role",
  518.      *  joinColumns={@ORM\JoinColumn(name="id_customer", referencedColumnName="id_customer")},
  519.      *     inverseJoinColumns={@ORM\JoinColumn(name="id_role", referencedColumnName="id_role")}
  520.      * )
  521.      */
  522.     private $roles;
  523.     /**
  524.      * @ORM\OneToMany(targetEntity="App\Entity\System\CustomerCatalog", mappedBy="customer", cascade={"persist"}, indexBy="catalog_id")
  525.      */
  526.     private $customerCatalogs;
  527.     /**
  528.      * @var AdditionalInfoAnswer[]|ArrayCollection
  529.      *
  530.      * @ORM\ManyToMany(targetEntity="App\Entity\System\AdditionalInfoAnswer", inversedBy="customers")
  531.      *
  532.      *  @ORM\JoinTable(
  533.      *   name="customer_additional_info_answer",
  534.      *   inverseJoinColumns={@ORM\JoinColumn(name="answer_id", referencedColumnName="id")},
  535.      *   joinColumns={@ORM\JoinColumn(name="customer_id", referencedColumnName="id_customer")}
  536.      * )
  537.      */
  538.     private $additionalInfoAnswers;
  539.     /**
  540.      * @var string|null
  541.      *
  542.      * @ORM\Column(type="string", length=64, nullable=true)
  543.      */
  544.     private $adyenPaymentId;
  545.     /**
  546.      * @var Wishlist[]|ArrayCollection
  547.      *
  548.      * @ORM\OneToMany(targetEntity="Wishlist", mappedBy="customer", cascade={"persist"})
  549.      */
  550.     private $wishlists;
  551.     /**
  552.      * @var string
  553.      *
  554.      * @ORM\Column(type="string", length=50, nullable= true)
  555.      */
  556.     private $thePowerMbaUserId;
  557.     /**
  558.      * @var string|null
  559.      *
  560.      * @ORM\Column(type="string", nullable=true)
  561.      */
  562.     private $googleAccountId;
  563.     /**
  564.      * @var string|null
  565.      *
  566.      * @ORM\Column(type="string", nullable=true)
  567.      */
  568.     private $linkedinAccountId;
  569.     /**
  570.      * @ORM\Column(type="bigint", nullable=true)
  571.      */
  572.     private ?int $hubspotCompanyId null;
  573.     /**
  574.      * @ORM\Column(type="bigint", nullable=true)
  575.      */
  576.     private ?int $hubspotContactId null;
  577.     /**
  578.      * @var \DateTime|null
  579.      *
  580.      * @ORM\Column(type="datetime", nullable=true)
  581.      */
  582.     private ?\DateTime $lastAccess null;
  583.     /**
  584.      * Customer constructor.
  585.      *
  586.      * @throws \Exception
  587.      */
  588.     public function __construct()
  589.     {
  590.         $this->group 1;
  591.         $this->lastPasswdGen = new \DateTime();
  592.         $this->newsletter 0;
  593.         $this->withdrawalWarehouse 0;
  594.         $this->subscription 0;
  595.         $this->reserve 0;
  596.         $this->active 0;
  597.         $this->isGuest 0;
  598.         $this->isValidVat 0;
  599.         $this->dropshipping 0;
  600.         $this->paypalBillingAgreement '0';
  601.         $this->sincronizedErp 0;
  602.         $this->promotions 0;
  603.         $this->moroso 0;
  604.         $this->avatar 0;
  605.         $this->avisoContabilidad 0;
  606.         $this->orderCsv 1;
  607.         $this->blocked 0;
  608.         $this->dtoPersonal1 0.00;
  609.         $this->dtoPersonal2 0.00;
  610.         $this->dtoPersonal3 0.00;
  611.         $this->importePersonal1 0.00;
  612.         $this->importePersonal2 0.00;
  613.         $this->importePersonal3 0.00;
  614.         $this->creditType 0;
  615.         $this->orders = new ArrayCollection();
  616.         $this->addresses = new ArrayCollection();
  617.         $this->futurePacks = new ArrayCollection();
  618.         $this->subscriptionLines = new ArrayCollection();
  619.         $this->serviceCustomer = new ArrayCollection();
  620.         $this->customerApi = new ArrayCollection();
  621.         $this->customerLog = new ArrayCollection();
  622.         $this->customerMigration = new ArrayCollection();
  623.         $this->syncronisedShopConfiguration = new ArrayCollection();
  624.         $this->ftp = new ArrayCollection();
  625.         $this->roles = new ArrayCollection();
  626.         $this->customerCatalogs = new ArrayCollection();
  627.         $this->additionalInfoAnswers = new ArrayCollection();
  628.         $this->wishlists = new ArrayCollection();
  629.         $this->dateAdd = new \DateTime();
  630.         $this->multifactorAuthEnabled true;
  631.         $this->forcePasswordUpdate false;
  632.         $this->purchaseNotAllowed false;
  633.     }
  634.     public static function createEmptyCustomer(string $emailstring $passwordGroup $groupRole $roleLanguage $language, \DateTime $currentDateTime, \DateTime $zeroDate): Customer
  635.     {
  636.         $customer = new self();
  637.         $customer->email $email;
  638.         $customer->passwd $password;
  639.         $customer->language $language;
  640.         $customer->active true;
  641.         $customer->purse 0;
  642.         $customer->dateAdd $currentDateTime;
  643.         $customer->dateUpd $currentDateTime;
  644.         $customer->dateCsv $zeroDate;
  645.         $customer->dateExcluirIva $zeroDate;
  646.         $customer->orderCsv false;
  647.         $customer->idPack 0;
  648.         $customer->multichannelUserId 0;
  649.         $customer->packByPurse 0;
  650.         $customer->group $group;
  651.         $customer->name '';
  652.         $customer->partialCreation self::PARTIAL_CREATION_STEP_0;
  653.         $customer->multifactorAuthEnabled true;
  654.         $customer->roles = [$role];
  655.         $customer->wishlists = new ArrayCollection([WishListFactory::createDefault($customer$customer->getLanguage()->getId())]);
  656.         return $customer;
  657.     }
  658.     public function getPassword(): string
  659.     {
  660.         return $this->getPasswd();
  661.     }
  662.     public function getSalt(): ?string
  663.     {
  664.         return null;
  665.     }
  666.     public function getUsername(): string
  667.     {
  668.         return $this->email;
  669.     }
  670.     public function eraseCredentials()
  671.     {
  672.     }
  673.     public function getEncoderName(): ?string
  674.     {
  675.         return 'customer_encoder';
  676.     }
  677.     /**
  678.      * @return mixed
  679.      */
  680.     public function getId()
  681.     {
  682.         return $this->id;
  683.     }
  684.     public function getUserIdentifier(): string
  685.     {
  686.         return (string)$this->id;
  687.     }
  688.     /**
  689.      * @param mixed $id
  690.      *
  691.      * @return Customer
  692.      */
  693.     public function setId($id): Customer
  694.     {
  695.         $this->id $id;
  696.         return $this;
  697.     }
  698.     /**
  699.      * @return Group|null
  700.      */
  701.     public function getGroup(): ?Group
  702.     {
  703.         return $this->group;
  704.     }
  705.     /**
  706.      * @param Group|null $group
  707.      *
  708.      * @return Customer
  709.      */
  710.     public function setGroup(?Group $group): Customer
  711.     {
  712.         $this->group $group;
  713.         return $this;
  714.     }
  715.     /**
  716.      * @return Language|null
  717.      */
  718.     public function getLanguage(): ?Language
  719.     {
  720.         return $this->language;
  721.     }
  722.     /**
  723.      * @param Language|null $language
  724.      *
  725.      * @return Customer
  726.      */
  727.     public function setLanguage(?Language $language): Customer
  728.     {
  729.         $this->language $language;
  730.         return $this;
  731.     }
  732.     /**
  733.      * @return string|null
  734.      */
  735.     public function getPrefixe(): ?string
  736.     {
  737.         return $this->prefixe;
  738.     }
  739.     /**
  740.      * @param string|null $prefixe
  741.      *
  742.      * @return Customer
  743.      */
  744.     public function setPrefixe(?string $prefixe): Customer
  745.     {
  746.         $this->prefixe $prefixe;
  747.         return $this;
  748.     }
  749.     /**
  750.      * @return string|null
  751.      */
  752.     public function getName(): ?string
  753.     {
  754.         return $this->name;
  755.     }
  756.     /**
  757.      * @param string|null $name
  758.      *
  759.      * @return Customer
  760.      */
  761.     public function setName(?string $name): Customer
  762.     {
  763.         $this->name $name;
  764.         return $this;
  765.     }
  766.     /**
  767.      * @return string|null
  768.      */
  769.     public function getSurnames(): ?string
  770.     {
  771.         return $this->surnames;
  772.     }
  773.     /**
  774.      * @return string|null
  775.      */
  776.     public function getLastname(): ?string
  777.     {
  778.         return $this->surnames;
  779.     }
  780.     /**
  781.      * @param string|null $surnames
  782.      *
  783.      * @return Customer
  784.      */
  785.     public function setSurnames(?string $surnames): Customer
  786.     {
  787.         $this->surnames $surnames;
  788.         return $this;
  789.     }
  790.     /**
  791.      * @return string
  792.      */
  793.     public function getEmail(): string
  794.     {
  795.         return $this->email;
  796.     }
  797.     /**
  798.      * @param string $email
  799.      *
  800.      * @return Customer
  801.      */
  802.     public function setEmail(string $email): Customer
  803.     {
  804.         $this->email $email;
  805.         return $this;
  806.     }
  807.     /**
  808.      * @return string
  809.      */
  810.     public function getPasswd(): string
  811.     {
  812.         return $this->passwd;
  813.     }
  814.     /**
  815.      * @param string $passwd
  816.      *
  817.      * @return Customer
  818.      */
  819.     public function setPasswd(string $passwd): Customer
  820.     {
  821.         $this->passwd $passwd;
  822.         return $this;
  823.     }
  824.     /**
  825.      * @return string|null
  826.      */
  827.     public function getTaxNumber(): ?string
  828.     {
  829.         return $this->taxNumber;
  830.     }
  831.     /**
  832.      * @param string|null $taxNumber
  833.      *
  834.      * @return Customer
  835.      */
  836.     public function setTaxNumber(?string $taxNumber): Customer
  837.     {
  838.         $this->taxNumber $taxNumber;
  839.         return $this;
  840.     }
  841.     /**
  842.      * @return int|null
  843.      */
  844.     public function getIdPack(): ?int
  845.     {
  846.         return $this->idPack;
  847.     }
  848.     /**
  849.      * @param int|null $idPack
  850.      *
  851.      * @return Customer
  852.      */
  853.     public function setIdPack(?int $idPack): Customer
  854.     {
  855.         $this->idPack $idPack;
  856.         return $this;
  857.     }
  858.     /**
  859.      * @return float
  860.      */
  861.     public function getPurse(): float
  862.     {
  863.         return $this->purse;
  864.     }
  865.     /**
  866.      * @param float $purse
  867.      *
  868.      * @return Customer
  869.      */
  870.     public function setPurse(float $purse): Customer
  871.     {
  872.         $this->purse $purse;
  873.         return $this;
  874.     }
  875.     /**
  876.      * @return \DateTime
  877.      */
  878.     public function getLastPasswdGen(): \DateTime
  879.     {
  880.         return $this->lastPasswdGen;
  881.     }
  882.     /**
  883.      * @param \DateTime $lastPasswdGen
  884.      *
  885.      * @return Customer
  886.      */
  887.     public function setLastPasswdGen(\DateTime $lastPasswdGen): Customer
  888.     {
  889.         $this->lastPasswdGen $lastPasswdGen;
  890.         return $this;
  891.     }
  892.     /**
  893.      * @return \DateTime|null
  894.      */
  895.     public function getBirthday(): ?\DateTime
  896.     {
  897.         return $this->birthday;
  898.     }
  899.     /**
  900.      * @param \DateTime|null $birthday
  901.      *
  902.      * @return Customer
  903.      */
  904.     public function setBirthday(?\DateTime $birthday): Customer
  905.     {
  906.         $this->birthday $birthday;
  907.         return $this;
  908.     }
  909.     /**
  910.      * @return bool
  911.      */
  912.     public function isNewsletter(): bool
  913.     {
  914.         return $this->newsletter;
  915.     }
  916.     /**
  917.      * @param bool $newsletter
  918.      *
  919.      * @return Customer
  920.      */
  921.     public function setNewsletter(bool $newsletter): Customer
  922.     {
  923.         $this->newsletter $newsletter;
  924.         return $this;
  925.     }
  926.     /**
  927.      * @return string|null
  928.      */
  929.     public function getIpRegistrationNewsletter(): ?string
  930.     {
  931.         return $this->ipRegistrationNewsletter;
  932.     }
  933.     /**
  934.      * @param string|null $ipRegistrationNewsletter
  935.      *
  936.      * @return Customer
  937.      */
  938.     public function setIpRegistrationNewsletter(?string $ipRegistrationNewsletter): Customer
  939.     {
  940.         $this->ipRegistrationNewsletter $ipRegistrationNewsletter;
  941.         return $this;
  942.     }
  943.     /**
  944.      * @return \DateTime
  945.      */
  946.     public function getBlock(): \DateTime
  947.     {
  948.         return $this->block;
  949.     }
  950.     /**
  951.      * @param \DateTime $block
  952.      *
  953.      * @return Customer
  954.      */
  955.     public function setBlock(\DateTime $block): Customer
  956.     {
  957.         $this->block $block;
  958.         return $this;
  959.     }
  960.     /**
  961.      * @return bool
  962.      */
  963.     public function isWithdrawalWarehouse(): bool
  964.     {
  965.         return $this->withdrawalWarehouse;
  966.     }
  967.     /**
  968.      * @param bool $withdrawalWarehouse
  969.      *
  970.      * @return Customer
  971.      */
  972.     public function setWithdrawalWarehouse(bool $withdrawalWarehouse): Customer
  973.     {
  974.         $this->withdrawalWarehouse $withdrawalWarehouse;
  975.         return $this;
  976.     }
  977.     /**
  978.      * @return bool
  979.      */
  980.     public function isSubscription(): bool
  981.     {
  982.         return $this->subscription;
  983.     }
  984.     /**
  985.      * @param bool $subscription
  986.      *
  987.      * @return Customer
  988.      */
  989.     public function setSubscription(bool $subscription): Customer
  990.     {
  991.         $this->subscription $subscription;
  992.         return $this;
  993.     }
  994.     /**
  995.      * @return int|null
  996.      */
  997.     public function getIdService(): ?int
  998.     {
  999.         return $this->idService;
  1000.     }
  1001.     /**
  1002.      * @param int|null $idService
  1003.      *
  1004.      * @return Customer
  1005.      */
  1006.     public function setIdService(?int $idService): Customer
  1007.     {
  1008.         $this->idService $idService;
  1009.         return $this;
  1010.     }
  1011.     /**
  1012.      * @return bool
  1013.      */
  1014.     public function isReserve(): bool
  1015.     {
  1016.         return $this->reserve;
  1017.     }
  1018.     /**
  1019.      * @param bool $reserve
  1020.      *
  1021.      * @return Customer
  1022.      */
  1023.     public function setReserve(bool $reserve): Customer
  1024.     {
  1025.         $this->reserve $reserve;
  1026.         return $this;
  1027.     }
  1028.     /**
  1029.      * @return bool
  1030.      */
  1031.     public function isActive(): bool
  1032.     {
  1033.         return $this->active;
  1034.     }
  1035.     /**
  1036.      * @return bool
  1037.      */
  1038.     public function isEnabled(): bool
  1039.     {
  1040.         return $this->active;
  1041.     }
  1042.     /**
  1043.      * @param bool $active
  1044.      *
  1045.      * @return Customer
  1046.      */
  1047.     public function setActive(bool $active): Customer
  1048.     {
  1049.         $this->active $active;
  1050.         return $this;
  1051.     }
  1052.     /**
  1053.      * @return bool
  1054.      */
  1055.     public function isGuest(): bool
  1056.     {
  1057.         return $this->isGuest;
  1058.     }
  1059.     /**
  1060.      * @param bool $isGuest
  1061.      *
  1062.      * @return Customer
  1063.      */
  1064.     public function setIsGuest(bool $isGuest): Customer
  1065.     {
  1066.         $this->isGuest $isGuest;
  1067.         return $this;
  1068.     }
  1069.     /**
  1070.      * @return bool
  1071.      */
  1072.     public function isValidVat(): bool
  1073.     {
  1074.         return $this->isValidVat;
  1075.     }
  1076.     /**
  1077.      * @param bool $isValidVat
  1078.      *
  1079.      * @return Customer
  1080.      */
  1081.     public function setIsValidVat(bool $isValidVat): Customer
  1082.     {
  1083.         $this->isValidVat $isValidVat;
  1084.         return $this;
  1085.     }
  1086.     /**
  1087.      * @return bool
  1088.      */
  1089.     public function isDropshipping(): bool
  1090.     {
  1091.         return $this->dropshipping;
  1092.     }
  1093.     /**
  1094.      * @param bool $dropshipping
  1095.      *
  1096.      * @return Customer
  1097.      */
  1098.     public function setDropshipping(bool $dropshipping): Customer
  1099.     {
  1100.         $this->dropshipping $dropshipping;
  1101.         return $this;
  1102.     }
  1103.     /**
  1104.      * @return \DateTime
  1105.      */
  1106.     public function getDateAdd(): \DateTime
  1107.     {
  1108.         return $this->dateAdd;
  1109.     }
  1110.     /**
  1111.      * @param \DateTime $dateAdd
  1112.      *
  1113.      * @return Customer
  1114.      */
  1115.     public function setDateAdd(\DateTime $dateAdd): Customer
  1116.     {
  1117.         $this->dateAdd $dateAdd;
  1118.         return $this;
  1119.     }
  1120.     /**
  1121.      * @return \DateTime
  1122.      */
  1123.     public function getDateUpd(): \DateTime
  1124.     {
  1125.         return $this->dateUpd;
  1126.     }
  1127.     /**
  1128.      * @param \DateTime $dateUpd
  1129.      *
  1130.      * @return Customer
  1131.      */
  1132.     public function setDateUpd(\DateTime $dateUpd): Customer
  1133.     {
  1134.         $this->dateUpd $dateUpd;
  1135.         return $this;
  1136.     }
  1137.     /**
  1138.      * @return string|null
  1139.      */
  1140.     public function getComment(): ?string
  1141.     {
  1142.         return $this->comment;
  1143.     }
  1144.     /**
  1145.      * @param string|null $comment
  1146.      *
  1147.      * @return Customer
  1148.      */
  1149.     public function setComment(?string $comment): Customer
  1150.     {
  1151.         $this->comment $comment;
  1152.         return $this;
  1153.     }
  1154.     /**
  1155.      * @return string|null
  1156.      */
  1157.     public function getCommissionAgent(): ?string
  1158.     {
  1159.         return $this->commissionAgent;
  1160.     }
  1161.     /**
  1162.      * @param string|null $commissionAgent
  1163.      *
  1164.      * @return Customer
  1165.      */
  1166.     public function setCommissionAgent(?string $commissionAgent): Customer
  1167.     {
  1168.         $this->commissionAgent $commissionAgent;
  1169.         return $this;
  1170.     }
  1171.     public function getDateCsv()
  1172.     {
  1173.         return $this->dateCsv;
  1174.     }
  1175.     public function setDateCsv($dateCsv)
  1176.     {
  1177.         $this->dateCsv $dateCsv;
  1178.         return $this;
  1179.     }
  1180.     /**
  1181.      * @return \DateTime|null
  1182.      */
  1183.     public function getDateBlock(): ?\DateTime
  1184.     {
  1185.         return $this->dateBlock;
  1186.     }
  1187.     /**
  1188.      * @param \DateTime|null $dateBlock
  1189.      *
  1190.      * @return Customer
  1191.      */
  1192.     public function setDateBlock(?\DateTime $dateBlock): Customer
  1193.     {
  1194.         $this->dateBlock $dateBlock;
  1195.         return $this;
  1196.     }
  1197.     /**
  1198.      * @return string|null
  1199.      */
  1200.     public function getPaypalBillingAgreement(): ?string
  1201.     {
  1202.         return $this->paypalBillingAgreement;
  1203.     }
  1204.     /**
  1205.      * @param string|null $paypalBillingAgreement
  1206.      *
  1207.      * @return Customer
  1208.      */
  1209.     public function setPaypalBillingAgreement(?string $paypalBillingAgreement): Customer
  1210.     {
  1211.         $this->paypalBillingAgreement $paypalBillingAgreement;
  1212.         return $this;
  1213.     }
  1214.     /**
  1215.      * @return \DateTime|null
  1216.      */
  1217.     public function getDatePack(): ?\DateTime
  1218.     {
  1219.         return $this->datePack;
  1220.     }
  1221.     /**
  1222.      * @param \DateTime|null $datePack
  1223.      *
  1224.      * @return Customer
  1225.      */
  1226.     public function setDatePack(?\DateTime $datePack): Customer
  1227.     {
  1228.         $this->datePack $datePack;
  1229.         return $this;
  1230.     }
  1231.     /**
  1232.      * @return string|null
  1233.      */
  1234.     public function getCsvLang(): ?string
  1235.     {
  1236.         return $this->csvLang;
  1237.     }
  1238.     /**
  1239.      * @param string|null $csvLang
  1240.      *
  1241.      * @return Customer
  1242.      */
  1243.     public function setCsvLang(?string $csvLang): Customer
  1244.     {
  1245.         $this->csvLang $csvLang;
  1246.         return $this;
  1247.     }
  1248.     /**
  1249.      * @return string|null
  1250.      */
  1251.     public function getDropshippingName(): ?string
  1252.     {
  1253.         return $this->dropshippingName;
  1254.     }
  1255.     /**
  1256.      * @param string|null $dropshippingName
  1257.      *
  1258.      * @return Customer
  1259.      */
  1260.     public function setDropshippingName(?string $dropshippingName): Customer
  1261.     {
  1262.         $this->dropshippingName $dropshippingName;
  1263.         return $this;
  1264.     }
  1265.     /**
  1266.      * @return string|null
  1267.      */
  1268.     public function getEmailPaypal(): ?string
  1269.     {
  1270.         return $this->emailPaypal;
  1271.     }
  1272.     /**
  1273.      * @param string|null $emailPaypal
  1274.      *
  1275.      * @return Customer
  1276.      */
  1277.     public function setEmailPaypal(?string $emailPaypal): Customer
  1278.     {
  1279.         $this->emailPaypal $emailPaypal;
  1280.         return $this;
  1281.     }
  1282.     /**
  1283.      * @return bool|null
  1284.      */
  1285.     public function getSincronizedErp(): ?bool
  1286.     {
  1287.         return $this->sincronizedErp;
  1288.     }
  1289.     /**
  1290.      * @param bool|null $sincronizedErp
  1291.      *
  1292.      * @return Customer
  1293.      */
  1294.     public function setSincronizedErp(?bool $sincronizedErp): Customer
  1295.     {
  1296.         $this->sincronizedErp $sincronizedErp;
  1297.         return $this;
  1298.     }
  1299.     /**
  1300.      * @return bool|null
  1301.      */
  1302.     public function getPromotions(): ?bool
  1303.     {
  1304.         return $this->promotions;
  1305.     }
  1306.     /**
  1307.      * @param bool|null $promotions
  1308.      *
  1309.      * @return Customer
  1310.      */
  1311.     public function setPromotions(?bool $promotions): Customer
  1312.     {
  1313.         $this->promotions $promotions;
  1314.         return $this;
  1315.     }
  1316.     /**
  1317.      * @return bool|null
  1318.      */
  1319.     public function getMoroso(): ?bool
  1320.     {
  1321.         return $this->moroso;
  1322.     }
  1323.     /**
  1324.      * @param bool|null $moroso
  1325.      *
  1326.      * @return Customer
  1327.      */
  1328.     public function setMoroso(?bool $moroso): Customer
  1329.     {
  1330.         $this->moroso $moroso;
  1331.         return $this;
  1332.     }
  1333.     /**
  1334.      * @return bool|null
  1335.      */
  1336.     public function getAvatar(): ?bool
  1337.     {
  1338.         return $this->avatar;
  1339.     }
  1340.     /**
  1341.      * @param bool|null $avatar
  1342.      *
  1343.      * @return Customer
  1344.      */
  1345.     public function setAvatar(?bool $avatar): Customer
  1346.     {
  1347.         $this->avatar $avatar;
  1348.         return $this;
  1349.     }
  1350.     /**
  1351.      * @return bool|null
  1352.      */
  1353.     public function getAvisoContabilidad(): ?bool
  1354.     {
  1355.         return $this->avisoContabilidad;
  1356.     }
  1357.     /**
  1358.      * @param bool|null $avisoContabilidad
  1359.      *
  1360.      * @return Customer
  1361.      */
  1362.     public function setAvisoContabilidad(?bool $avisoContabilidad): Customer
  1363.     {
  1364.         $this->avisoContabilidad $avisoContabilidad;
  1365.         return $this;
  1366.     }
  1367.     /**
  1368.      * @return string|null
  1369.      */
  1370.     public function getPayerIdPaypal(): ?string
  1371.     {
  1372.         return $this->payerIdPaypal;
  1373.     }
  1374.     /**
  1375.      * @param string|null $payerIdPaypal
  1376.      *
  1377.      * @return Customer
  1378.      */
  1379.     public function setPayerIdPaypal(?string $payerIdPaypal): Customer
  1380.     {
  1381.         $this->payerIdPaypal $payerIdPaypal;
  1382.         return $this;
  1383.     }
  1384.     /**
  1385.      * @return bool
  1386.      */
  1387.     public function isOrderCsv(): bool
  1388.     {
  1389.         return $this->orderCsv;
  1390.     }
  1391.     /**
  1392.      * @param bool $orderCsv
  1393.      *
  1394.      * @return Customer
  1395.      */
  1396.     public function setOrderCsv(bool $orderCsv): Customer
  1397.     {
  1398.         $this->orderCsv $orderCsv;
  1399.         return $this;
  1400.     }
  1401.     /**
  1402.      * @return \DateTime|null
  1403.      */
  1404.     public function getDateBasicFree(): ?\DateTime
  1405.     {
  1406.         return $this->dateBasicFree;
  1407.     }
  1408.     /**
  1409.      * @param \DateTime|null $dateBasicFree
  1410.      *
  1411.      * @return Customer
  1412.      */
  1413.     public function setDateBasicFree(?\DateTime $dateBasicFree): Customer
  1414.     {
  1415.         $this->dateBasicFree $dateBasicFree;
  1416.         return $this;
  1417.     }
  1418.     /**
  1419.      * @return bool|null
  1420.      */
  1421.     public function getExcluirVies(): ?bool
  1422.     {
  1423.         return $this->excluirVies;
  1424.     }
  1425.     /**
  1426.      * @param bool|null $excluirVies
  1427.      *
  1428.      * @return Customer
  1429.      */
  1430.     public function setExcluirVies(?bool $excluirVies): Customer
  1431.     {
  1432.         $this->excluirVies $excluirVies;
  1433.         return $this;
  1434.     }
  1435.     /**
  1436.      * @return bool|null
  1437.      */
  1438.     public function getBlocked(): ?bool
  1439.     {
  1440.         return $this->blocked;
  1441.     }
  1442.     /**
  1443.      * @param bool|null $blocked
  1444.      *
  1445.      * @return Customer
  1446.      */
  1447.     public function setBlocked(?bool $blocked): Customer
  1448.     {
  1449.         $this->blocked $blocked;
  1450.         return $this;
  1451.     }
  1452.     /**
  1453.      * @return \DateTime|null
  1454.      */
  1455.     public function getDateExcluirIva(): ?\DateTime
  1456.     {
  1457.         return $this->dateExcluirIva;
  1458.     }
  1459.     /**
  1460.      * @param \DateTime|null $dateExcluirIva
  1461.      *
  1462.      * @return Customer
  1463.      */
  1464.     public function setDateExcluirIva(?\DateTime $dateExcluirIva): Customer
  1465.     {
  1466.         $this->dateExcluirIva $dateExcluirIva;
  1467.         return $this;
  1468.     }
  1469.     /**
  1470.      * @return float|null
  1471.      */
  1472.     public function getDtoPersonal1(): ?float
  1473.     {
  1474.         return $this->dtoPersonal1;
  1475.     }
  1476.     /**
  1477.      * @param float|null $dtoPersonal1
  1478.      *
  1479.      * @return Customer
  1480.      */
  1481.     public function setDtoPersonal1(?float $dtoPersonal1): Customer
  1482.     {
  1483.         $this->dtoPersonal1 $dtoPersonal1;
  1484.         return $this;
  1485.     }
  1486.     /**
  1487.      * @return float|null
  1488.      */
  1489.     public function getDtoPersonal2(): ?float
  1490.     {
  1491.         return $this->dtoPersonal2;
  1492.     }
  1493.     /**
  1494.      * @param float|null $dtoPersonal2
  1495.      *
  1496.      * @return Customer
  1497.      */
  1498.     public function setDtoPersonal2(?float $dtoPersonal2): Customer
  1499.     {
  1500.         $this->dtoPersonal2 $dtoPersonal2;
  1501.         return $this;
  1502.     }
  1503.     /**
  1504.      * @return float|null
  1505.      */
  1506.     public function getDtoPersonal3(): ?float
  1507.     {
  1508.         return $this->dtoPersonal3;
  1509.     }
  1510.     /**
  1511.      * @param float|null $dtoPersonal3
  1512.      *
  1513.      * @return Customer
  1514.      */
  1515.     public function setDtoPersonal3(?float $dtoPersonal3): Customer
  1516.     {
  1517.         $this->dtoPersonal3 $dtoPersonal3;
  1518.         return $this;
  1519.     }
  1520.     /**
  1521.      * @return float|null
  1522.      */
  1523.     public function getImportePersonal1(): ?float
  1524.     {
  1525.         return $this->importePersonal1;
  1526.     }
  1527.     /**
  1528.      * @param float|null $importePersonal1
  1529.      *
  1530.      * @return Customer
  1531.      */
  1532.     public function setImportePersonal1(?float $importePersonal1): Customer
  1533.     {
  1534.         $this->importePersonal1 $importePersonal1;
  1535.         return $this;
  1536.     }
  1537.     /**
  1538.      * @return float|null
  1539.      */
  1540.     public function getImportePersonal2(): ?float
  1541.     {
  1542.         return $this->importePersonal2;
  1543.     }
  1544.     /**
  1545.      * @param float|null $importePersonal2
  1546.      *
  1547.      * @return Customer
  1548.      */
  1549.     public function setImportePersonal2(?float $importePersonal2): Customer
  1550.     {
  1551.         $this->importePersonal2 $importePersonal2;
  1552.         return $this;
  1553.     }
  1554.     /**
  1555.      * @return float|null
  1556.      */
  1557.     public function getImportePersonal3(): ?float
  1558.     {
  1559.         return $this->importePersonal3;
  1560.     }
  1561.     /**
  1562.      * @param float|null $importePersonal3
  1563.      *
  1564.      * @return Customer
  1565.      */
  1566.     public function setImportePersonal3(?float $importePersonal3): Customer
  1567.     {
  1568.         $this->importePersonal3 $importePersonal3;
  1569.         return $this;
  1570.     }
  1571.     /**
  1572.      * @return int|null
  1573.      */
  1574.     public function getCreditType(): ?int
  1575.     {
  1576.         return $this->creditType;
  1577.     }
  1578.     /**
  1579.      * @param int|null $creditType
  1580.      *
  1581.      * @return Customer
  1582.      */
  1583.     public function setCreditType(?int $creditType): Customer
  1584.     {
  1585.         $this->creditType $creditType;
  1586.         return $this;
  1587.     }
  1588.     /**
  1589.      * @return int|null
  1590.      */
  1591.     public function getMultichannelUserId(): ?int
  1592.     {
  1593.         return $this->multichannelUserId;
  1594.     }
  1595.     /**
  1596.      * @param int|null $multichannelUserId
  1597.      *
  1598.      * @return Customer
  1599.      */
  1600.     public function setMultichannelUserId(?int $multichannelUserId): Customer
  1601.     {
  1602.         $this->multichannelUserId $multichannelUserId;
  1603.         return $this;
  1604.     }
  1605.     /**
  1606.      * @return int|null
  1607.      */
  1608.     public function getTop(): ?int
  1609.     {
  1610.         return $this->top;
  1611.     }
  1612.     /**
  1613.      * @param int|null $top
  1614.      *
  1615.      * @return Customer
  1616.      */
  1617.     public function setTop(?int $top): Customer
  1618.     {
  1619.         $this->top $top;
  1620.         return $this;
  1621.     }
  1622.     /**
  1623.      * @return string|null
  1624.      */
  1625.     public function getKam(): ?string
  1626.     {
  1627.         return $this->kam;
  1628.     }
  1629.     /**
  1630.      * @param string|null $kam
  1631.      *
  1632.      * @return Customer
  1633.      */
  1634.     public function setKam(?string $kam): Customer
  1635.     {
  1636.         $this->kam $kam;
  1637.         return $this;
  1638.     }
  1639.     /**
  1640.      * @return \DateTime|null
  1641.      */
  1642.     public function getReadPolicyCookies(): ?\DateTime
  1643.     {
  1644.         return $this->readPolicyCookies;
  1645.     }
  1646.     /**
  1647.      * @param \DateTime|null $readPolicyCookies
  1648.      *
  1649.      * @return Customer
  1650.      */
  1651.     public function setReadPolicyCookies(?\DateTime $readPolicyCookies): Customer
  1652.     {
  1653.         $this->readPolicyCookies $readPolicyCookies;
  1654.         return $this;
  1655.     }
  1656.     /**
  1657.      * @return string|null
  1658.      */
  1659.     public function getSector(): ?string
  1660.     {
  1661.         return $this->sector;
  1662.     }
  1663.     /**
  1664.      * @param string|null $sector
  1665.      *
  1666.      * @return Customer
  1667.      */
  1668.     public function setSector(?string $sector): Customer
  1669.     {
  1670.         $this->sector $sector;
  1671.         return $this;
  1672.     }
  1673.     /**
  1674.      * @return string|null
  1675.      */
  1676.     public function getCatchment(): ?string
  1677.     {
  1678.         return $this->catchment;
  1679.     }
  1680.     /**
  1681.      * @param string|null $catchment
  1682.      *
  1683.      * @return Customer
  1684.      */
  1685.     public function setCatchment(?string $catchment): Customer
  1686.     {
  1687.         $this->catchment $catchment;
  1688.         return $this;
  1689.     }
  1690.     /**
  1691.      * @return string|null
  1692.      */
  1693.     public function getType(): ?string
  1694.     {
  1695.         return $this->type;
  1696.     }
  1697.     /**
  1698.      * @param string|null $type
  1699.      *
  1700.      * @return Customer
  1701.      */
  1702.     public function setType(?string $type): Customer
  1703.     {
  1704.         $this->type $type;
  1705.         return $this;
  1706.     }
  1707.     /**
  1708.      * @return int|null
  1709.      */
  1710.     public function getPackByPurse(): ?int
  1711.     {
  1712.         return $this->packByPurse;
  1713.     }
  1714.     /**
  1715.      * @param int|null $packByPurse
  1716.      *
  1717.      * @return Customer
  1718.      */
  1719.     public function setPackByPurse(?int $packByPurse): Customer
  1720.     {
  1721.         $this->packByPurse $packByPurse;
  1722.         return $this;
  1723.     }
  1724.     /**
  1725.      * @return int
  1726.      */
  1727.     public function getPartialCreation(): int
  1728.     {
  1729.         return $this->partialCreation;
  1730.     }
  1731.     /**
  1732.      * @param int $partialCreation
  1733.      *
  1734.      * @return Customer
  1735.      */
  1736.     public function setPartialCreation(int $partialCreation): Customer
  1737.     {
  1738.         $this->partialCreation $partialCreation;
  1739.         return $this;
  1740.     }
  1741.     /**
  1742.      * @return Collection|Order[]
  1743.      */
  1744.     public function getOrders(): Collection
  1745.     {
  1746.         return $this->orders;
  1747.     }
  1748.     public function addOrder(Order $order): self
  1749.     {
  1750.         if (!$this->orders->contains($order)) {
  1751.             $this->orders[] = $order;
  1752.             $order->setCustomer($this);
  1753.         }
  1754.         return $this;
  1755.     }
  1756.     public function removeOrder(Order $order): self
  1757.     {
  1758.         if ($this->orders->contains($order)) {
  1759.             $this->orders->removeElement($order);
  1760.             // set the owning side to null (unless already changed)
  1761.             if ($order->getCustomer() === $this) {
  1762.                 $order->setCustomer(null);
  1763.             }
  1764.         }
  1765.         return $this;
  1766.     }
  1767.     /**
  1768.      * @return Collection|Address[]
  1769.      */
  1770.     public function getAddresses(): Collection
  1771.     {
  1772.         return $this->addresses;
  1773.     }
  1774.     public function addAddress(Address $address): self
  1775.     {
  1776.         if (!$this->addresses->contains($address)) {
  1777.             $this->addresses[] = $address;
  1778.             $address->setCustomer($this);
  1779.         }
  1780.         return $this;
  1781.     }
  1782.     public function removeAddress(Address $address): self
  1783.     {
  1784.         if ($this->addresses->contains($address)) {
  1785.             $this->addresses->removeElement($address);
  1786.             // set the owning side to null (unless already changed)
  1787.             if ($address->getCustomer() === $this) {
  1788.                 $address->setCustomer(null);
  1789.             }
  1790.         }
  1791.         return $this;
  1792.     }
  1793.     /**
  1794.      * @return bool|null
  1795.      */
  1796.     public function getPurchaseNotAllowed(): ?bool
  1797.     {
  1798.         return $this->purchaseNotAllowed;
  1799.     }
  1800.     /**
  1801.      * @param bool|null $purchaseNotAllowed
  1802.      *
  1803.      * @return Customer
  1804.      */
  1805.     public function setPurchaseNotAllowed(?bool $purchaseNotAllowed): self
  1806.     {
  1807.         $this->purchaseNotAllowed $purchaseNotAllowed;
  1808.         return $this;
  1809.     }
  1810.     /**
  1811.      * @return \DateTime|null
  1812.      */
  1813.     public function getDateEnding(): ?\DateTime
  1814.     {
  1815.         return $this->dateEnding;
  1816.     }
  1817.     /**
  1818.      * @param \DateTime|null $dateEnding
  1819.      *
  1820.      * @return Customer
  1821.      */
  1822.     public function setDateEnding(?\DateTime $dateEnding): self
  1823.     {
  1824.         $this->dateEnding $dateEnding;
  1825.         return $this;
  1826.     }
  1827.     /**
  1828.      * @return FuturePack[]|ArrayCollection
  1829.      */
  1830.     public function getFuturePacks()
  1831.     {
  1832.         return $this->futurePacks;
  1833.     }
  1834.     /**
  1835.      * @param FuturePack[]|ArrayCollection $futurePacks
  1836.      *
  1837.      * @return Customer
  1838.      */
  1839.     public function setFuturePacks($futurePacks)
  1840.     {
  1841.         $this->futurePacks $futurePacks;
  1842.         return $this;
  1843.     }
  1844.     /**
  1845.      * @return SubscriptionLine[]|ArrayCollection
  1846.      */
  1847.     public function getSubscriptionLines()
  1848.     {
  1849.         return $this->subscriptionLines;
  1850.     }
  1851.     /**
  1852.      * @param SubscriptionLine[]|ArrayCollection $subscriptionLines
  1853.      *
  1854.      * @return Customer
  1855.      */
  1856.     public function setSubscriptionLines($subscriptionLines)
  1857.     {
  1858.         $this->subscriptionLines $subscriptionLines;
  1859.         return $this;
  1860.     }
  1861.     /**
  1862.      * @return ServiceCustomer[]|ArrayCollection
  1863.      */
  1864.     public function getServiceCustomer()
  1865.     {
  1866.         return $this->serviceCustomer;
  1867.     }
  1868.     /**
  1869.      * @param array $serviceCustomer
  1870.      */
  1871.     public function setServiceCustomer(array $serviceCustomer): Customer
  1872.     {
  1873.         $this->serviceCustomer $serviceCustomer;
  1874.         return $this;
  1875.     }
  1876.     /**
  1877.      * @return array
  1878.      */
  1879.     public function getCustomerApi(): array
  1880.     {
  1881.         return $this->customerApi;
  1882.     }
  1883.     /**
  1884.      * @param array $customerApi
  1885.      *
  1886.      * @return Customer
  1887.      */
  1888.     public function setCustomerApi(array $customerApi): Customer
  1889.     {
  1890.         $this->customerApi $customerApi;
  1891.         return $this;
  1892.     }
  1893.     /**
  1894.      * @return array
  1895.      */
  1896.     public function getCustomerLog(): array
  1897.     {
  1898.         return $this->customerLog;
  1899.     }
  1900.     /**
  1901.      * @param array $customerLog
  1902.      *
  1903.      * @return Customer
  1904.      */
  1905.     public function setCustomerLog(array $customerLog): Customer
  1906.     {
  1907.         $this->customerLog $customerLog;
  1908.         return $this;
  1909.     }
  1910.     /**
  1911.      * @return array
  1912.      */
  1913.     public function getFtp(): array
  1914.     {
  1915.         return $this->ftp;
  1916.     }
  1917.     /**
  1918.      * @param array $ftp
  1919.      *
  1920.      * @return Customer
  1921.      */
  1922.     public function setFtp(array $ftp): Customer
  1923.     {
  1924.         $this->ftp $ftp;
  1925.         return $this;
  1926.     }
  1927.     /**
  1928.      * @return array
  1929.      */
  1930.     public function getSyncronisedShopConfiguration(): array
  1931.     {
  1932.         return $this->syncronisedShopConfiguration;
  1933.     }
  1934.     /**
  1935.      * @param array $syncronisedShopConfiguration
  1936.      *
  1937.      * @return Customer
  1938.      */
  1939.     public function setSyncronisedShopConfiguration(array $syncronisedShopConfiguration): Customer
  1940.     {
  1941.         $this->syncronisedShopConfiguration $syncronisedShopConfiguration;
  1942.         return $this;
  1943.     }
  1944.     /**
  1945.      * @return array
  1946.      */
  1947.     public function getCustomerMigration(): array
  1948.     {
  1949.         return $this->customerMigration;
  1950.     }
  1951.     /**
  1952.      * @param array $customerMigration
  1953.      *
  1954.      * @return Customer
  1955.      */
  1956.     public function setCustomerMigration(array $customerMigration): Customer
  1957.     {
  1958.         $this->customerMigration $customerMigration;
  1959.         return $this;
  1960.     }
  1961.     /**
  1962.      * @return array
  1963.      */
  1964.     public function getRoles(): array
  1965.     {
  1966.         $roleCollection $this->roles;
  1967.         $roles = [];
  1968.         if ($roleCollection) {
  1969.             foreach ($roleCollection as $role) {
  1970.                 $roleName $role->getName();
  1971.                 if (!in_array($roleName$rolestrue)) {
  1972.                     $roles[$role->getId()] = $role->getName();
  1973.                 }
  1974.             }
  1975.         }
  1976.         return $roles;
  1977.     }
  1978.     public function hasRole(string $queryRole): bool
  1979.     {
  1980.         $roleCollection $this->roles;
  1981.         $roles = [];
  1982.         if ($roleCollection) {
  1983.             foreach ($roleCollection as $role) {
  1984.                 $roleName $role->getName();
  1985.                 if (!in_array($roleName$rolestrue)) {
  1986.                     $roles[] = $role->getName();
  1987.                 }
  1988.             }
  1989.         }
  1990.         return in_array(strtoupper($queryRole), $rolestrue);
  1991.     }
  1992.     /**
  1993.      * @return Role[]|ArrayCollection
  1994.      */
  1995.     public function getRoleCollection()
  1996.     {
  1997.         return $this->roles;
  1998.     }
  1999.     /**
  2000.      * @param Role[]|ArrayCollection $roles
  2001.      */
  2002.     public function setRoleCollection($roles): Customer
  2003.     {
  2004.         $this->roles $roles;
  2005.         return $this;
  2006.     }
  2007.     /**
  2008.      * @return bool
  2009.      */
  2010.     public function hasMultifactorAuthEnabled(): bool
  2011.     {
  2012.         return $this->multifactorAuthEnabled;
  2013.     }
  2014.     /**
  2015.      * Resets paypal-related fields
  2016.      */
  2017.     public function resetBillingAgreement(): void
  2018.     {
  2019.         $this->setPaypalBillingAgreement(self::ID_CUSTOMER_NOT_BILLING_AGREEMENT);
  2020.         $this->setEmailPaypal('');
  2021.         $this->setPayerIdPaypal('');
  2022.     }
  2023.     /**
  2024.      * @param Customer $oldCustomer
  2025.      */
  2026.     public function setPackValuesFromOldCustomer(Customer $oldCustomer): void
  2027.     {
  2028.         $this->group $oldCustomer->getGroup();
  2029.         $this->idPack $oldCustomer->getIdPack();
  2030.         $this->dateCsv $oldCustomer->getDateCsv();
  2031.         $this->datePack $oldCustomer->getDatePack();
  2032.         $this->payerIdPaypal $oldCustomer->getPayerIdPaypal();
  2033.         $this->emailPaypal $oldCustomer->getEmailPaypal();
  2034.         $this->reserve $oldCustomer->isReserve();
  2035.         $this->orderCsv $oldCustomer->isOrderCsv();
  2036.         $this->multichannelUserId $oldCustomer->getMultichannelUserId();
  2037.     }
  2038.     /**
  2039.      * @param Group $groupReference
  2040.      */
  2041.     public function setValuesAfterMigration(Group $groupReference): void
  2042.     {
  2043.         $this->group $groupReference;
  2044.         $this->idPack 0;
  2045.         $this->dateCsv null;
  2046.         $this->datePack null;
  2047.         $this->idService 0;
  2048.         $this->multichannelUserId 0;
  2049.     }
  2050.     public function resetPackAndGroup(Group $group): void
  2051.     {
  2052.         $this->group $group;
  2053.         $this->idPack Pack::PACK_WITHOUT_PACK;
  2054.         $this->dateCsv null;
  2055.     }
  2056.     /**
  2057.      * @return ArrayCollection|CustomerCatalog[]
  2058.      */
  2059.     public function getCustomerCatalogs()
  2060.     {
  2061.         return $this->customerCatalogs;
  2062.     }
  2063.     /**
  2064.      * @param ArrayCollection $customerCatalogs
  2065.      *
  2066.      * @return Customer
  2067.      */
  2068.     public function setCustomerCatalogs($customerCatalogs): self
  2069.     {
  2070.         $this->customerCatalogs $customerCatalogs;
  2071.         return $this;
  2072.     }
  2073.     public function getFullName(): string
  2074.     {
  2075.         return $this->name.' '.$this->surnames;
  2076.     }
  2077.     public function setMultifactorAuthEnabled(bool $multifactorAuthEnabled): void
  2078.     {
  2079.         $this->multifactorAuthEnabled $multifactorAuthEnabled;
  2080.     }
  2081.     public function removeAllAnswers()
  2082.     {
  2083.         $this->additionalInfoAnswers->clear();
  2084.     }
  2085.     public function addAnswers(array $answers): void
  2086.     {
  2087.         /** @var AdditionalInfoAnswer $answer */
  2088.         foreach ($answers as $answer) {
  2089.             if ($answer && !$this->additionalInfoAnswers->contains($answer)) {
  2090.                 $this->additionalInfoAnswers->add($answer);
  2091.             }
  2092.         }
  2093.     }
  2094.     public function getAdyenPaymentId(): ?string
  2095.     {
  2096.         return $this->adyenPaymentId;
  2097.     }
  2098.     public function setAdyenPaymentId(?string $adyenPaymentId): self
  2099.     {
  2100.         $this->adyenPaymentId $adyenPaymentId;
  2101.         return $this;
  2102.     }
  2103.     /**
  2104.      * @return Wishlist[]|ArrayCollection
  2105.      */
  2106.     public function getWishlists()
  2107.     {
  2108.         return $this->wishlists;
  2109.     }
  2110.     public function getThePowerMbaUserId(): ?string
  2111.     {
  2112.         return $this->thePowerMbaUserId;
  2113.     }
  2114.     public function setThePowerMbaUserId(?string $thePowerMbaUserId): self
  2115.     {
  2116.         $this->thePowerMbaUserId $thePowerMbaUserId;
  2117.         return $this;
  2118.     }
  2119.     public function checkInactive(): bool
  2120.     {
  2121.         return str_starts_with($this->emailself::PREFIX_DROP);
  2122.     }
  2123.     public function getGoogleAccountId(): ?string
  2124.     {
  2125.         return $this->googleAccountId;
  2126.     }
  2127.     public function setGoogleAccountId(?string $googleAccountId): Customer
  2128.     {
  2129.         $this->googleAccountId $googleAccountId;
  2130.         return $this;
  2131.     }
  2132.     public function getLinkedinAccountId(): ?string
  2133.     {
  2134.         return $this->linkedinAccountId;
  2135.     }
  2136.     public function setLinkedinAccountId(?string $linkedinAccountId): Customer
  2137.     {
  2138.         $this->linkedinAccountId $linkedinAccountId;
  2139.         return $this;
  2140.     }
  2141.     public function getPackBankwirePayment(): ?bool
  2142.     {
  2143.         return $this->packBankwirePayment;
  2144.     }
  2145.     public function setPackBankwirePayment(bool $packBankwirePayment): Customer
  2146.     {
  2147.         $this->packBankwirePayment $packBankwirePayment;
  2148.         return $this;
  2149.     }
  2150.     public function getForcePasswordUpdate(): ?bool
  2151.     {
  2152.         return $this->forcePasswordUpdate;
  2153.     }
  2154.     public function setForcePasswordUpdate(?bool $forcePasswordUpdate): void
  2155.     {
  2156.         $this->forcePasswordUpdate $forcePasswordUpdate;
  2157.     }
  2158.     public function getHubspotCompanyId(): ?int
  2159.     {
  2160.         return $this->hubspotCompanyId;
  2161.     }
  2162.     public function setHubspotCompanyId(?int $hubspotCompanyId): Customer
  2163.     {
  2164.         $this->hubspotCompanyId $hubspotCompanyId;
  2165.         return $this;
  2166.     }
  2167.     public function getHubspotContactId(): ?int
  2168.     {
  2169.         return $this->hubspotContactId;
  2170.     }
  2171.     public function setHubspotContactId(?int $hubspotContactId): Customer
  2172.     {
  2173.         $this->hubspotContactId $hubspotContactId;
  2174.         return $this;
  2175.     }
  2176.     public function getOrderConfirmationDelay(): ?int
  2177.     {
  2178.         if (null === $this->orderConfirmationDelay) {
  2179.             return null;
  2180.         }
  2181.         if (=== $this->orderConfirmationDelay) { // set by legacy model
  2182.             return null;
  2183.         }
  2184.         return $this->orderConfirmationDelay;
  2185.     }
  2186.     public function setOrderConfirmationDelay(?int $orderConfirmationDelay): void
  2187.     {
  2188.         $this->orderConfirmationDelay $orderConfirmationDelay;
  2189.     }
  2190.     public function getLastAccess(): ?\DateTime
  2191.     {
  2192.         return $this->lastAccess;
  2193.     }
  2194.     public function setLastAccess(?\DateTime $lastAccess): Customer
  2195.     {
  2196.         $this->lastAccess $lastAccess;
  2197.         return $this;
  2198.     }
  2199.     public function __toString(): string
  2200.     {
  2201.         return $this->name.' '.$this->surnames;
  2202.     }
  2203. }