src/Entity/Client.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Constants\Typology;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. /**
  10.  * Clientes
  11.  *
  12.  * @ORM\Table(name="clients")
  13.  * @ORM\Entity(repositoryClass="App\Repository\ClientRepository")
  14.  * @ORM\HasLifecycleCallbacks()
  15.  */
  16. class Client
  17. {
  18.     /**
  19.      * @var int
  20.      *
  21.      * @ORM\Column(name="id", type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="type", type="string", length=255)
  30.      * @Assert\NotBlank()
  31.      */
  32.     private $type;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(name="name", type="string", length=255)
  37.      * @Assert\NotBlank()
  38.      */
  39.     private $name;
  40.     /**
  41.      * @var string
  42.      *
  43.      * @ORM\Column(name="title", type="string", length=255, nullable=true)
  44.      */
  45.     private $title;
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(name="address", type="string", length=255)
  50.      * @Assert\NotBlank()
  51.      */
  52.     private $address;
  53.     /**
  54.      * @var string
  55.      *
  56.      * @ORM\Column(name="address_number", type="string", length=255)
  57.      * @Assert\NotBlank()
  58.      */
  59.     private $addressNumber;
  60.     /**
  61.      * @var string
  62.      *
  63.      * @ORM\Column(name="zip_code", type="string", length=255)
  64.      * @Assert\NotBlank()
  65.      */
  66.     private $zipCode;
  67.     /**
  68.      * @var string
  69.      *
  70.      * @ORM\Column(name="population", type="string", length=255, nullable=true)
  71.      *
  72.      */
  73.     private $population;
  74.     /**
  75.      * @var string
  76.      *
  77.      * @ORM\Column(name="province", type="string", length=255, nullable=true)
  78.      *
  79.      */
  80.     private $province;
  81.     /**
  82.      * @var string
  83.      *
  84.      * @ORM\Column(name="region", type="string", length=255)
  85.      * @Assert\NotBlank()
  86.      */
  87.     private $region;
  88.     /**
  89.      * @var string
  90.      *
  91.      * @ORM\Column(name="country", type="string", length=255)
  92.      * @Assert\NotBlank()
  93.      */
  94.     private $country;
  95.     /**
  96.      * @var string
  97.      *
  98.      * @ORM\Column(name="telephone", type="string", length=255)
  99.      * @Assert\NotBlank()
  100.      */
  101.     private $telephone;
  102.     /**
  103.      * @var string
  104.      *
  105.      * @ORM\Column(name="fax", type="string", length=255, nullable=true)
  106.      *
  107.      */
  108.     private $fax;
  109.     /**
  110.      * @var string
  111.      *
  112.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  113.      */
  114.     private $email;
  115.     /**
  116.      * @var string
  117.      *
  118.      * @ORM\Column(name="gds", type="string", length=255, nullable=true)
  119.      */
  120.     private $gds;
  121.     /**
  122.      * @var string
  123.      *
  124.      * @ORM\Column(name="type_document", type="string", length=255, nullable=true)
  125.      */
  126.     private $typeDocument;
  127.     /**
  128.      * @var string
  129.      *
  130.      * @ORM\Column(name="id_document", type="string", length=255, nullable=true)
  131.      */
  132.     private $idDocument;
  133.     /**
  134.      * @var string
  135.      *
  136.      * @ORM\Column(name="observation", type="text", nullable=true)
  137.      */
  138.     private $observation;
  139.     /**
  140.      * @var \DateTime
  141.      *
  142.      * @ORM\Column(name="created_at", type="datetime")
  143.      */
  144.     private $createdAt;
  145.     /**
  146.      * @var int
  147.      *
  148.      * @ORM\Column(name="created_id", type="integer", nullable=true)
  149.      */
  150.     private $createdId;
  151.     /**
  152.      * @var \DateTime
  153.      *
  154.      * @ORM\Column(name="updated_at", type="datetime")
  155.      */
  156.     private $updatedAt;
  157.     /**
  158.      * @var int
  159.      *
  160.      * @ORM\Column(name="updated_id", type="integer", nullable=true)
  161.      */
  162.     private $updatedId;
  163.     /**
  164.      * @var int
  165.      *
  166.      * @ORM\Column(name="status", type="boolean")
  167.      */
  168.     private $state;
  169.     /**
  170.      * @var string
  171.      *
  172.      * @ORM\Column(name="picture", type="string", length=255, nullable=true)
  173.      */
  174.     private $picture;
  175.     /**
  176.      * @var string
  177.      *
  178.      * @ORM\Column(name="group_id", type="integer", nullable=true)
  179.      */
  180.     private $groupId;
  181.     /**
  182.      * @var string
  183.      *
  184.      * @ORM\Column(name="competency", type="string", length=255, nullable=true)
  185.      */
  186.     private $competency;
  187.     /**
  188.      * @var string
  189.      *
  190.      * @ORM\Column(name="action", type="string", length=255, nullable=true)
  191.      * @Assert\NotBlank()
  192.      */
  193.     private $action;
  194.     /**
  195.      * @var string
  196.      *
  197.      * @ORM\Column(name="return_investment", type="string", length=255, nullable=true)
  198.      */
  199.     private $returnInvestment;
  200.     /**
  201.      * @ORM\Column(type="string", length=100, nullable=true)
  202.      */
  203.     private $typology;
  204.     /**
  205.      * @ORM\Column(type="string", length=20, nullable=true)
  206.      */
  207.     private $sageCode;
  208.     /**
  209.      * @ORM\Column(type="string", length=34, nullable=true)
  210.      */
  211.     private $iban;
  212.     /**
  213.      * @ORM\Column(type="string", length=20, nullable=true)
  214.      */
  215.     private $swift;
  216.     /**
  217.      * @ORM\Column(type="string", length=100, nullable=true)
  218.      */
  219.     private $bankName;
  220.     /**
  221.      * @ORM\Column(type="boolean")
  222.      */
  223.     private $sentToSage;
  224.     /**
  225.      * @ORM\Column(type="datetime", nullable=true)
  226.      */
  227.     private $syncDate;
  228.     /**
  229.      * @ORM\OneToMany(targetEntity=ClientAccountingAccount::class, mappedBy="client", orphanRemoval=true)
  230.      */
  231.     private $clientAccountingAccounts;
  232.     /**
  233.      * @ORM\OneToMany(targetEntity=DeliveryNote::class, mappedBy="client")
  234.      */
  235.     private $deliveryNotes;
  236.     /**
  237.      * @ORM\ManyToOne(targetEntity=SagePaymentMethod::class)
  238.      */
  239.     private $sagePaymentMethod;
  240.     /**
  241.      * @ORM\OneToMany(targetEntity=SagePayment::class, mappedBy="client")
  242.      */
  243.     private $sagePayments;
  244.     /**
  245.      * @ORM\ManyToMany(targetEntity=SettingsCompany::class, inversedBy="clients")
  246.      */
  247.     private $settingsCompany;
  248.     public function __construct()
  249.     {
  250.         $this->clientAccountingAccounts = new ArrayCollection();
  251.         $this->deliveryNotes = new ArrayCollection();
  252.         $this->sagePayments = new ArrayCollection();
  253.         $this->settingsCompany = new ArrayCollection();
  254.     }
  255.     /**
  256.      * Get id
  257.      *
  258.      * @return int
  259.      */
  260.     public function getId()
  261.     {
  262.         return $this->id;
  263.     }
  264.     /**
  265.      * Set type
  266.      *
  267.      * @param string $type
  268.      *
  269.      * @return Client
  270.      */
  271.     public function setType($type)
  272.     {
  273.         $this->type $type;
  274.         return $this;
  275.     }
  276.     /**
  277.      * Get type
  278.      *
  279.      * @return string
  280.      */
  281.     public function getType()
  282.     {
  283.         return $this->type;
  284.     }
  285.     /**
  286.      * Set name
  287.      *
  288.      * @param string $name
  289.      *
  290.      * @return Client
  291.      */
  292.     public function setName($name)
  293.     {
  294.         $this->name $name;
  295.         return $this;
  296.     }
  297.     /**
  298.      * Get name
  299.      *
  300.      * @return string
  301.      */
  302.     public function getName()
  303.     {
  304.         return $this->name;
  305.     }
  306.     /**
  307.      * Set title
  308.      *
  309.      * @param string $title
  310.      *
  311.      * @return Client
  312.      */
  313.     public function setTitle($title)
  314.     {
  315.         $this->title $title;
  316.         return $this;
  317.     }
  318.     /**
  319.      * Get title
  320.      *
  321.      * @return string
  322.      */
  323.     public function getTitle()
  324.     {
  325.         return $this->title;
  326.     }
  327.     /**
  328.      * Set address
  329.      *
  330.      * @param string $address
  331.      *
  332.      * @return Client
  333.      */
  334.     public function setAddress($address)
  335.     {
  336.         $this->address $address;
  337.         return $this;
  338.     }
  339.     /**
  340.      * Get address
  341.      *
  342.      * @return string
  343.      */
  344.     public function getAddress()
  345.     {
  346.         return $this->address;
  347.     }
  348.     /**
  349.      * Set addressNumber
  350.      *
  351.      * @param string $addressNumber
  352.      *
  353.      * @return Client
  354.      */
  355.     public function setAddressNumber($addressNumber)
  356.     {
  357.         $this->addressNumber $addressNumber;
  358.         return $this;
  359.     }
  360.     /**
  361.      * Get addressNumber
  362.      *
  363.      * @return string
  364.      */
  365.     public function getAddressNumber()
  366.     {
  367.         return $this->addressNumber;
  368.     }
  369.     /**
  370.      * Set zipCode
  371.      *
  372.      * @param string $zipCode
  373.      *
  374.      * @return Client
  375.      */
  376.     public function setZipCode($zipCode)
  377.     {
  378.         $this->zipCode $zipCode;
  379.         return $this;
  380.     }
  381.     /**
  382.      * Get zipCode
  383.      *
  384.      * @return string
  385.      */
  386.     public function getZipCode()
  387.     {
  388.         return $this->zipCode;
  389.     }
  390.     /**
  391.      * Set population
  392.      *
  393.      * @param string $population
  394.      *
  395.      * @return Client
  396.      */
  397.     public function setPopulation($population)
  398.     {
  399.         $this->population $population;
  400.         return $this;
  401.     }
  402.     /**
  403.      * Get population
  404.      *
  405.      * @return string
  406.      */
  407.     public function getPopulation()
  408.     {
  409.         return $this->population;
  410.     }
  411.     /**
  412.      * Set province
  413.      *
  414.      * @param string $province
  415.      *
  416.      * @return Client
  417.      */
  418.     public function setProvince($province)
  419.     {
  420.         $this->province $province;
  421.         return $this;
  422.     }
  423.     /**
  424.      * Get province
  425.      *
  426.      * @return string
  427.      */
  428.     public function getProvince()
  429.     {
  430.         return $this->province;
  431.     }
  432.     /**
  433.      * Set country
  434.      *
  435.      * @param string $country
  436.      *
  437.      * @return Client
  438.      */
  439.     public function setCountry($country)
  440.     {
  441.         $this->country $country;
  442.         return $this;
  443.     }
  444.     /**
  445.      * Get country
  446.      *
  447.      * @return string
  448.      */
  449.     public function getCountry()
  450.     {
  451.         return $this->country;
  452.     }
  453.     /**
  454.      * Set telephone
  455.      *
  456.      * @param string $telephone
  457.      *
  458.      * @return Client
  459.      */
  460.     public function setTelephone($telephone)
  461.     {
  462.         $this->telephone $telephone;
  463.         return $this;
  464.     }
  465.     /**
  466.      * Get telephone
  467.      *
  468.      * @return string
  469.      */
  470.     public function getTelephone()
  471.     {
  472.         return $this->telephone;
  473.     }
  474.     /**
  475.      * Set fax
  476.      *
  477.      * @param string $fax
  478.      *
  479.      * @return Client
  480.      */
  481.     public function setFax($fax)
  482.     {
  483.         $this->fax $fax;
  484.         return $this;
  485.     }
  486.     /**
  487.      * Get fax
  488.      *
  489.      * @return string
  490.      */
  491.     public function getFax()
  492.     {
  493.         return $this->fax;
  494.     }
  495.     /**
  496.      * Set email
  497.      *
  498.      * @param string $email
  499.      *
  500.      * @return Client
  501.      */
  502.     public function setEmail($email)
  503.     {
  504.         $this->email $email;
  505.         return $this;
  506.     }
  507.     /**
  508.      * Get email
  509.      *
  510.      * @return string
  511.      */
  512.     public function getEmail()
  513.     {
  514.         return $this->email;
  515.     }
  516.     /**
  517.      * Set gds
  518.      *
  519.      * @param string $gds
  520.      *
  521.      * @return Client
  522.      */
  523.     public function setGds($gds)
  524.     {
  525.         $this->gds $gds;
  526.         return $this;
  527.     }
  528.     /**
  529.      * Get gds
  530.      *
  531.      * @return string
  532.      */
  533.     public function getGds()
  534.     {
  535.         return $this->gds;
  536.     }
  537.     /**
  538.      * Set idDocument
  539.      *
  540.      * @param string $idDocument
  541.      *
  542.      * @return Client
  543.      */
  544.     public function setIdDocument($idDocument)
  545.     {
  546.         $this->idDocument $idDocument;
  547.         return $this;
  548.     }
  549.     /**
  550.      * Get idDocument
  551.      *
  552.      * @return string
  553.      */
  554.     public function getIdDocument()
  555.     {
  556.         return $this->idDocument;
  557.     }
  558.     /**
  559.      * Set observation
  560.      *
  561.      * @param string $observation
  562.      *
  563.      * @return Client
  564.      */
  565.     public function setObservation($observation)
  566.     {
  567.         $this->observation $observation;
  568.         return $this;
  569.     }
  570.     /**
  571.      * Get observation
  572.      *
  573.      * @return string
  574.      */
  575.     public function getObservation()
  576.     {
  577.         return $this->observation;
  578.     }
  579.     /**
  580.      * Set createdAt
  581.      *
  582.      * @param \Datetime $createdAt
  583.      *
  584.      * @return Client
  585.      */
  586.     public function setCreatedAt(\Datetime $createdAt)
  587.     {
  588.         $this->createdAt $createdAt;
  589.         return $this;
  590.     }
  591.     /**
  592.      * Get createdAt
  593.      *
  594.      * @return \Datetime
  595.      */
  596.     public function getCreatedAt()
  597.     {
  598.         return $this->createdAt;
  599.     }
  600.     /**
  601.      * Set createdId
  602.      *
  603.      * @param integer $createdId
  604.      *
  605.      * @return Client
  606.      */
  607.     public function setCreatedId($createdId)
  608.     {
  609.         $this->createdId $createdId;
  610.         return $this;
  611.     }
  612.     /**
  613.      * Get createdId
  614.      *
  615.      * @return int
  616.      */
  617.     public function getCreatedId()
  618.     {
  619.         return $this->createdId;
  620.     }
  621.     /**
  622.      * Set updatedAt
  623.      *
  624.      * @param \Datetime $updatedAt
  625.      *
  626.      * @return Client
  627.      */
  628.     public function setUpdatedAt(\Datetime $updatedAt)
  629.     {
  630.         $this->updatedAt $updatedAt;
  631.         return $this;
  632.     }
  633.     /**
  634.      * Get updatedAt
  635.      *
  636.      * @return \Datetime
  637.      */
  638.     public function getUpdatedAt()
  639.     {
  640.         return $this->updatedAt;
  641.     }
  642.     /**
  643.      * Set updatedId
  644.      *
  645.      * @param integer $updatedId
  646.      *
  647.      * @return Client
  648.      */
  649.     public function setUpdatedId($updatedId)
  650.     {
  651.         $this->updatedId $updatedId;
  652.         return $this;
  653.     }
  654.     /**
  655.      * Get updatedId
  656.      *
  657.      * @return int
  658.      */
  659.     public function getUpdatedId()
  660.     {
  661.         return $this->updatedId;
  662.     }
  663.     /**
  664.      * Set state
  665.      *
  666.      * @param boolean $state
  667.      *
  668.      * @return Client
  669.      */
  670.     public function setState($state)
  671.     {
  672.         $this->state $state;
  673.         return $this;
  674.     }
  675.     /**
  676.      * Get state
  677.      *
  678.      * @return int
  679.      */
  680.     public function getState()
  681.     {
  682.         return $this->state;
  683.     }
  684.     /**
  685.      * Set picture
  686.      *
  687.      * @param string $picture
  688.      *
  689.      * @return Client
  690.      */
  691.     public function setPicture($picture)
  692.     {
  693.         $this->picture $picture;
  694.         return $this;
  695.     }
  696.     /**
  697.      * Get picture
  698.      *
  699.      * @return string
  700.      */
  701.     public function getPicture()
  702.     {
  703.         return $this->picture;
  704.     }
  705.     /**
  706.      * @ORM\PrePersist
  707.      */
  708.     public function setCreatedAtValue()
  709.     {
  710.         $this->createdAt = new \Datetime();
  711.     }
  712.     /**
  713.      * @ORM\PrePersist
  714.      * @ORM\PreUpdate
  715.      */
  716.     public function setUpdatedAtValue()
  717.     {
  718.         $this->updatedAt = new \Datetime();
  719.     }
  720.     /**
  721.      * Set groupId
  722.      *
  723.      * @param integer $groupId
  724.      *
  725.      * @return Client
  726.      */
  727.     public function setGroupId($groupId)
  728.     {
  729.         $this->groupId $groupId;
  730.         return $this;
  731.     }
  732.     /**
  733.      * Get groupId
  734.      *
  735.      * @return integer
  736.      */
  737.     public function getGroupId()
  738.     {
  739.         return $this->groupId;
  740.     }
  741.     /**
  742.      * Set competency
  743.      *
  744.      * @param string $competency
  745.      *
  746.      * @return Client
  747.      */
  748.     public function setCompetency($competency)
  749.     {
  750.         $this->competency $competency;
  751.         return $this;
  752.     }
  753.     /**
  754.      * Get competency
  755.      *
  756.      * @return string
  757.      */
  758.     public function getCompetency()
  759.     {
  760.         return $this->competency;
  761.     }
  762.     /**
  763.      * Set action
  764.      *
  765.      * @param string $action
  766.      *
  767.      * @return Client
  768.      */
  769.     public function setAction($action)
  770.     {
  771.         $this->action $action;
  772.         return $this;
  773.     }
  774.     /**
  775.      * Get action
  776.      *
  777.      * @return string
  778.      */
  779.     public function getAction()
  780.     {
  781.         return $this->action;
  782.     }
  783.     /**
  784.      * Set typeDocument
  785.      *
  786.      * @param string $typeDocument
  787.      *
  788.      * @return Client
  789.      */
  790.     public function setTypeDocument($typeDocument)
  791.     {
  792.         $this->typeDocument $typeDocument;
  793.         return $this;
  794.     }
  795.     /**
  796.      * Get typeDocument
  797.      *
  798.      * @return string
  799.      */
  800.     public function getTypeDocument()
  801.     {
  802.         return $this->typeDocument;
  803.     }
  804.     /**
  805.      * Set returnInvestment
  806.      *
  807.      * @param string $returnInvestment
  808.      *
  809.      * @return Client
  810.      */
  811.     public function setReturnInvestment($returnInvestment)
  812.     {
  813.         $this->returnInvestment $returnInvestment;
  814.         return $this;
  815.     }
  816.     /**
  817.      * Get returnInvestment
  818.      *
  819.      * @return string
  820.      */
  821.     public function getReturnInvestment()
  822.     {
  823.         return $this->returnInvestment;
  824.     }
  825.     /**
  826.      * Set region
  827.      *
  828.      * @param string $region
  829.      *
  830.      * @return Client
  831.      */
  832.     public function setRegion($region)
  833.     {
  834.         $this->region $region;
  835.         return $this;
  836.     }
  837.     /**
  838.      * Get region
  839.      *
  840.      * @return string
  841.      */
  842.     public function getRegion()
  843.     {
  844.         return $this->region;
  845.     }
  846.     public function getTypology(): ?string
  847.     {
  848.         return $this->typology;
  849.     }
  850.     public function setTypology(?string $typology): self
  851.     {
  852.         if (!Typology::isValid($typology) && $typology !== null) {
  853.             throw new \InvalidArgumentException("Sector inválido: $typology");
  854.         }
  855.         $this->typology $typology;
  856.         return $this;
  857.     }
  858.     public function getSageCode(): ?string
  859.     {
  860.         return $this->sageCode;
  861.     }
  862.     public function setSageCode(string $sageCode): self
  863.     {
  864.         $this->sageCode $sageCode;
  865.         return $this;
  866.     }
  867.     public function getIban(): ?string
  868.     {
  869.         return $this->iban;
  870.     }
  871.     public function setIban(?string $iban): self
  872.     {
  873.         $this->iban $iban;
  874.         return $this;
  875.     }
  876.     public function getSwift(): ?string
  877.     {
  878.         return $this->swift;
  879.     }
  880.     public function setSwift(?string $swift): self
  881.     {
  882.         $this->swift $swift;
  883.         return $this;
  884.     }
  885.     public function getBankName(): ?string
  886.     {
  887.         return $this->bankName;
  888.     }
  889.     public function setBankName(?string $bankName): self
  890.     {
  891.         $this->bankName $bankName;
  892.         return $this;
  893.     }
  894.     public function isSentToSage(): ?bool
  895.     {
  896.         return $this->sentToSage;
  897.     }
  898.     public function setSentToSage(bool $sentToSage): self
  899.     {
  900.         $this->sentToSage $sentToSage;
  901.         return $this;
  902.     }
  903.     public function getSyncDate(): ?\DateTimeInterface
  904.     {
  905.         return $this->syncDate;
  906.     }
  907.     public function setSyncDate(?\DateTimeInterface $syncDate): self
  908.     {
  909.         $this->syncDate $syncDate;
  910.         return $this;
  911.     }
  912.     /**
  913.      * @return Collection<int, ClientAccountingAccount>
  914.      */
  915.     public function getClientAccountingAccounts(): Collection
  916.     {
  917.         return $this->clientAccountingAccounts;
  918.     }
  919.     public function addClientAccountingAccount(ClientAccountingAccount $clientAccountingAccount): self
  920.     {
  921.         if (!$this->clientAccountingAccounts->contains($clientAccountingAccount)) {
  922.             $this->clientAccountingAccounts[] = $clientAccountingAccount;
  923.             $clientAccountingAccount->setClient($this);
  924.         }
  925.         return $this;
  926.     }
  927.     public function removeClientAccountingAccount(ClientAccountingAccount $clientAccountingAccount): self
  928.     {
  929.         if ($this->clientAccountingAccounts->removeElement($clientAccountingAccount)) {
  930.             // set the owning side to null (unless already changed)
  931.             if ($clientAccountingAccount->getClient() === $this) {
  932.                 $clientAccountingAccount->setClient(null);
  933.             }
  934.         }
  935.         return $this;
  936.     }
  937.     /**
  938.      * @return Collection<int, DeliveryNote>
  939.      */
  940.     public function getDeliveryNotes(): Collection
  941.     {
  942.         return $this->deliveryNotes;
  943.     }
  944.     public function addDeliveryNote(DeliveryNote $deliveryNote): self
  945.     {
  946.         if (!$this->deliveryNotes->contains($deliveryNote)) {
  947.             $this->deliveryNotes[] = $deliveryNote;
  948.             $deliveryNote->setClient($this);
  949.         }
  950.         return $this;
  951.     }
  952.     public function removeDeliveryNote(DeliveryNote $deliveryNote): self
  953.     {
  954.         if ($this->deliveryNotes->removeElement($deliveryNote)) {
  955.             // set the owning side to null (unless already changed)
  956.             if ($deliveryNote->getClient() === $this) {
  957.                 $deliveryNote->setClient(null);
  958.             }
  959.         }
  960.         return $this;
  961.     }
  962.     public function getSagePaymentMethod(): ?SagePaymentMethod
  963.     {
  964.         return $this->sagePaymentMethod;
  965.     }
  966.     public function setSagePaymentMethod(?SagePaymentMethod $sagePaymentMethod): self
  967.     {
  968.         $this->sagePaymentMethod $sagePaymentMethod;
  969.         return $this;
  970.     }
  971.     /**
  972.      * @return Collection<int, SagePayment>
  973.      */
  974.     public function getSagePayments(): Collection
  975.     {
  976.         return $this->sagePayments;
  977.     }
  978.     public function addSagePayment(SagePayment $payment): self
  979.     {
  980.         if (!$this->sagePayments->contains($payment)) {
  981.             $this->sagePayments[] = $payment;
  982.             $payment->setClient($this);
  983.         }
  984.         return $this;
  985.     }
  986.     public function removeSagePayment(SagePayment $payment): self
  987.     {
  988.         if ($this->sagePayments->removeElement($payment)) {
  989.             // set the owning side to null (unless already changed)
  990.             if ($payment->getClient() === $this) {
  991.                 $payment->setClient(null);
  992.             }
  993.         }
  994.         return $this;
  995.     }
  996.     /**
  997.      * @return Collection<int, SettingsCompany>
  998.      */
  999.     public function getSettingsCompany(): Collection
  1000.     {
  1001.         return $this->settingsCompany;
  1002.     }
  1003.     public function addSettingsCompany(SettingsCompany $settingsCompany): self
  1004.     {
  1005.         if (!$this->settingsCompany->contains($settingsCompany)) {
  1006.             $this->settingsCompany[] = $settingsCompany;
  1007.         }
  1008.         return $this;
  1009.     }
  1010.     public function removeSettingsCompany(SettingsCompany $settingsCompany): self
  1011.     {
  1012.         $this->settingsCompany->removeElement($settingsCompany);
  1013.         return $this;
  1014.     }
  1015. }