src/Diplix/KMGBundle/Entity/Accounting/CoopMember.php line 15

Open in your IDE?
  1. <?php
  2. namespace Diplix\KMGBundle\Entity\Accounting;
  3. use Diplix\KMGBundle\Entity\BasicEntity;
  4. use Diplix\KMGBundle\Entity\Settings;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Diplix\KMGBundle\Entity\Accounting\Rate;
  7. use Symfony\Component\Serializer\Encoder\JsonEncoder;
  8. use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;
  9. use Symfony\Component\Serializer\Serializer;
  10. /**
  11.  * @ORM\Table(name="coop_members", indexes={@ORM\Index(name="be_deleted",columns={"be_deleted"})})
  12.  * @ORM\Entity(repositoryClass="Diplix\KMGBundle\Repository\CoopMemberRepository")
  13.  */
  14. class CoopMember extends BasicEntity implements \JsonSerializable
  15. {
  16.     /**
  17.      * @ORM\Column(type="integer",name="id")
  18.      * @ORM\Id()
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     protected $id;
  22.     /**
  23.      * @ORM\Column(type="string")
  24.      */
  25.     protected $number;
  26.     /**
  27.      * @ORM\Column(type="string")
  28.      */
  29.     protected $name;
  30.     /**
  31.      * @ORM\Column(type="string")
  32.      */
  33.     protected $shortCode;
  34.     /**
  35.      * @ORM\Column(type="text")
  36.      */
  37.     protected $address '';
  38.     /**
  39.      * @ORM\Column(type="string")
  40.      */
  41.     protected $taxNo '';
  42.     /**
  43.      * @ORM\Column(type="decimal", nullable=false, precision=12, scale=2,options={"unsigned":false})
  44.      */
  45.     protected $waitPrice 0.35;
  46.     /**
  47.      * @ORM\Column(type="decimal", nullable=false, precision=12, scale=2,options={"unsigned":false})
  48.      */
  49.     protected $dwzPrice 0.35;
  50.     /**
  51.      * @ORM\Column(type="string")
  52.      */
  53.     protected $waitPriceAccNumber '';
  54.     /**
  55.      * @ORM\Column(type="string")
  56.      */
  57.     protected $extraCostAccNumber '';
  58.     /**
  59.      * @ORM\Column(type="decimal", nullable=false, precision=5, scale=2,options={"unsigned":false})
  60.      */
  61.     protected $commissionPercent 0.0;
  62.     /**
  63.      * @ORM\Column(type="json")
  64.      * @var array|Rate[]
  65.      */
  66.     protected $rates = [ ];
  67.     /**
  68.      * @ORM\Column(type="boolean")
  69.      */
  70.     protected $showInCalendar true;
  71.     /**
  72.      * @ORM\Column(type="integer")
  73.      */
  74.     protected $sortOrder 0;
  75.     /**
  76.      * @ORM\Column(type="text")
  77.      */
  78.     protected $feeText '';
  79.     /**
  80.      * @ORM\Column(type="decimal", nullable=false, precision=12, scale=2,options={"unsigned":false})
  81.      */
  82.     protected $feeAmount 0.0;
  83.     /**
  84.      * @ORM\Column(type="text")
  85.      */
  86.     protected $accountingEmail '';
  87.     /**
  88.      * @ORM\Column(type="text")
  89.      */
  90.     protected $accountingEmailCC '';
  91.     /**
  92.      * @ORM\Column(type="text")
  93.      */
  94.     protected $accountingEmailBCC '';
  95.     /**
  96.      * @ORM\Column(type="text")
  97.      */
  98.     protected $accountingBankAccount '';
  99.     /**
  100.      * @ORM\Column(type="text")
  101.      */
  102.     protected $jobEmail '';
  103.     /**
  104.      * @ORM\Column(type="decimal", nullable=false, precision=5, scale=2,options={"unsigned":true})
  105.      */
  106.     protected $partialPaymentPercent 0.0;
  107.     /**
  108.      * @ORM\Column(type="boolean",options={"default" = 0});
  109.      */
  110.     protected $accExcludeFromAnalysis false;
  111.     /**
  112.      * @ORM\Column(type="boolean",options={"default" = 0});
  113.      */
  114.     protected $isCoopPartner false;
  115.     /**
  116.      * @ORM\Column(type="integer",options={"unsigned":true, "default":30} )
  117.      */
  118.     protected $freeServiceTimeFraMinutes 30;
  119.     /**
  120.      * @ORM\Column(type="date", nullable=true)
  121.      */
  122.     protected $personenbfscheinGueltigBis;
  123.     /**
  124.      * @ORM\Column(type="date", nullable=true)
  125.      */
  126.     protected $genehmigungKonzAblaufGueltigBis;
  127.     /**
  128.      * @ORM\Column(type="string")
  129.      */
  130.     protected $ordnungsNummer '';
  131.     /**
  132.      * @ORM\Column(type="string")
  133.      */
  134.     protected $fuehrerscheinNummer '';
  135.     /**
  136.      * @ORM\Column(type="string")
  137.      */
  138.     protected $fhzKennzeichen '';
  139.     /**
  140.      * @ORM\Column(type="date", nullable=true)
  141.      */
  142.     protected $fhzBaujahr;
  143.     /**
  144.      * @ORM\Column(type="string")
  145.      */
  146.     protected $fhzTyp '';
  147.     /**
  148.      * @ORM\Column(type="date", nullable=true)
  149.      */
  150.     protected $kmgEntry;
  151.     /**
  152.      * @ORM\Column(type="date", nullable=true)
  153.      */
  154.     protected $kmgExit;
  155.     /**
  156.      * @ORM\Column(type="date", nullable=true)
  157.      */
  158.     protected $birthDate;
  159.     /**
  160.      * @ORM\Column(type="string")
  161.      */
  162.     protected $xchgTargetUrl '';
  163.     /**
  164.      * @ORM\Column(type="string")
  165.      */
  166.     protected $xchgLogin '';
  167.     /**
  168.      * @ORM\Column(type="string")
  169.      */
  170.     protected $xchgPassword '';
  171.     /**
  172.      * @ORM\Column(type="boolean")
  173.      */
  174.     protected $sendOrderUpdatesPerMail false;
  175.     /**
  176.      * @ORM\Column(type="string", options={"length":"1","default":"m"})
  177.      */
  178.     protected $defaultRideStyle Job::RS_MIETWAGEN;
  179.     /**
  180.      * @ORM\Column(type="string")
  181.      */
  182.     protected $creditNumber '';
  183.     /**
  184.      * @ORM\Column(type="decimal", nullable=false, precision=12, scale=2,options={"unsigned":false})
  185.      */
  186.     protected $taxiGeldAufschlagKurzstrecke 0.0;
  187.     /**
  188.      * @ORM\Column(type="boolean",options={"default" = 1});
  189.      */
  190.     protected $allowInterest true;
  191.     /**
  192.      * @ORM\Column(type="boolean",options={"default" = 1});
  193.      */
  194.     protected bool $active true;
  195.     /**
  196.      * @return mixed
  197.      */
  198.     public function getId()
  199.     {
  200.         return $this->id;
  201.     }
  202.     /**
  203.      * @return mixed
  204.      */
  205.     public function getNumber()
  206.     {
  207.         return $this->number;
  208.     }
  209.     /**
  210.      * @param mixed $number
  211.      */
  212.     public function setNumber($number)
  213.     {
  214.         $this->number $number;
  215.     }
  216.     /**
  217.      * @return mixed
  218.      */
  219.     public function getName()
  220.     {
  221.         return $this->name;
  222.     }
  223.     /**
  224.      * @param mixed $name
  225.      */
  226.     public function setName($name)
  227.     {
  228.         $this->name $name;
  229.     }
  230.     /**
  231.      * @return mixed
  232.      */
  233.     public function getAddress()
  234.     {
  235.         return $this->address;
  236.     }
  237.     /**
  238.      * @param mixed $address
  239.      */
  240.     public function setAddress($address)
  241.     {
  242.         $this->address $address;
  243.     }
  244.     /**
  245.      * @return mixed
  246.      */
  247.     public function getTaxNo()
  248.     {
  249.         return $this->taxNo;
  250.     }
  251.     /**
  252.      * @param mixed $taxNo
  253.      */
  254.     public function setTaxNo($taxNo)
  255.     {
  256.         $this->taxNo $taxNo;
  257.     }
  258.     /**
  259.      * @return mixed
  260.      */
  261.     public function getWaitPrice()
  262.     {
  263.         return $this->waitPrice;
  264.     }
  265.     /**
  266.      * @param mixed $waitPrice
  267.      */
  268.     public function setWaitPrice($waitPrice)
  269.     {
  270.         $this->waitPrice $waitPrice;
  271.     }
  272.     /**
  273.      * @return mixed
  274.      */
  275.     public function getCommissionPercent()
  276.     {
  277.         return $this->commissionPercent;
  278.     }
  279.     /**
  280.      * @param mixed $commissionPercent
  281.      */
  282.     public function setCommissionPercent($commissionPercent)
  283.     {
  284.         $this->commissionPercent $commissionPercent;
  285.     }
  286.     /**
  287.      * @return array|Rate[]
  288.      */
  289.     public function getRates()
  290.     {
  291.         $ro = [];
  292.         foreach ( $this->rates as $row)
  293.         {
  294.             $ro[]= Rate::fromArray($row);
  295.         }
  296.         if (count($ro)<1)
  297.         {
  298.             // inject defaults
  299.             $ro Settings::getDefaultMemberRates();
  300.         }
  301.         return $ro;
  302.     }
  303.     /**
  304.      * @param array $rates
  305.      */
  306.     public function setRates($rates)
  307.     {
  308.         $this->rates json_decode(json_encode($rates), true); // ugly way to convert array of object to array of assoc-array
  309.     }
  310.     /**
  311.      * @return mixed
  312.      */
  313.     public function getShortCode()
  314.     {
  315.         return $this->shortCode;
  316.     }
  317.     /**
  318.      * @param mixed $shortCode
  319.      */
  320.     public function setShortCode($shortCode)
  321.     {
  322.         $this->shortCode $shortCode;
  323.     }
  324.     /**
  325.      * @return mixed
  326.      */
  327.     public function getShowInCalendar()
  328.     {
  329.         return $this->showInCalendar;
  330.     }
  331.     /**
  332.      * @param mixed $showInCalendar
  333.      */
  334.     public function setShowInCalendar($showInCalendar)
  335.     {
  336.         $this->showInCalendar $showInCalendar;
  337.     }
  338.     /**
  339.      * @return mixed
  340.      */
  341.     public function getSortOrder()
  342.     {
  343.         return $this->sortOrder;
  344.     }
  345.     /**
  346.      * @param mixed $sortOrder
  347.      */
  348.     public function setSortOrder($sortOrder)
  349.     {
  350.         $this->sortOrder $sortOrder;
  351.     }
  352.     /**
  353.      * @return string
  354.      */
  355.     public function getFeeText()
  356.     {
  357.         return $this->feeText;
  358.     }
  359.     /**
  360.      * @param string $feeText
  361.      */
  362.     public function setFeeText($feeText)
  363.     {
  364.         $this->feeText $feeText;
  365.     }
  366.     /**
  367.      * @return float
  368.      */
  369.     public function getFeeAmount()
  370.     {
  371.         return $this->feeAmount;
  372.     }
  373.     /**
  374.      * @param float $feeAmount
  375.      */
  376.     public function setFeeAmount($feeAmount)
  377.     {
  378.         $this->feeAmount $feeAmount;
  379.     }
  380.     /**
  381.      * @return string
  382.      */
  383.     public function getAccountingEmail()
  384.     {
  385.         return $this->accountingEmail;
  386.     }
  387.     /**
  388.      * @param string $accountingEmail
  389.      */
  390.     public function setAccountingEmail($accountingEmail)
  391.     {
  392.         $this->accountingEmail $accountingEmail;
  393.     }
  394.     /**
  395.      * @return string
  396.      */
  397.     public function getAccountingEmailCC()
  398.     {
  399.         return $this->accountingEmailCC;
  400.     }
  401.     /**
  402.      * @param string $accountingEmailCC
  403.      */
  404.     public function setAccountingEmailCC($accountingEmailCC)
  405.     {
  406.         $this->accountingEmailCC $accountingEmailCC;
  407.     }
  408.     /**
  409.      * @return string
  410.      */
  411.     public function getAccountingEmailBCC()
  412.     {
  413.         return $this->accountingEmailBCC;
  414.     }
  415.     /**
  416.      * @param string $accountingEmailBCC
  417.      */
  418.     public function setAccountingEmailBCC($accountingEmailBCC)
  419.     {
  420.         $this->accountingEmailBCC $accountingEmailBCC;
  421.     }
  422.     /**
  423.      * @return float
  424.      */
  425.     public function getPartialPaymentPercent(): float
  426.     {
  427.         return $this->partialPaymentPercent;
  428.     }
  429.     /**
  430.      * @param float $partialPaymentPercent
  431.      */
  432.     public function setPartialPaymentPercent(float $partialPaymentPercent): void
  433.     {
  434.         $this->partialPaymentPercent $partialPaymentPercent;
  435.     }
  436.     /**
  437.      * @return bool
  438.      */
  439.     public function isAccExcludeFromAnalysis(): bool
  440.     {
  441.         return $this->accExcludeFromAnalysis;
  442.     }
  443.     /**
  444.      * @param bool $accExcludeFromAnalysis
  445.      */
  446.     public function setAccExcludeFromAnalysis(bool $accExcludeFromAnalysis): void
  447.     {
  448.         $this->accExcludeFromAnalysis $accExcludeFromAnalysis;
  449.     }
  450.     /**
  451.      * @return bool
  452.      */
  453.     public function isCoopPartner(): bool
  454.     {
  455.         return $this->isCoopPartner;
  456.     }
  457.     /**
  458.      * @param bool $isCoopPartner
  459.      */
  460.     public function setIsCoopPartner(bool $isCoopPartner): void
  461.     {
  462.         $this->isCoopPartner $isCoopPartner;
  463.     }
  464.     /**
  465.      * @return int
  466.      */
  467.     public function getFreeServiceTimeFraMinutes(): int
  468.     {
  469.         return $this->freeServiceTimeFraMinutes;
  470.     }
  471.     /**
  472.      * @param int $freeServiceTimeFraMinutes
  473.      */
  474.     public function setFreeServiceTimeFraMinutes(int $freeServiceTimeFraMinutes): void
  475.     {
  476.         $this->freeServiceTimeFraMinutes $freeServiceTimeFraMinutes;
  477.     }
  478.     /**
  479.      * @return string
  480.      */
  481.     public function getAccountingBankAccount(): string
  482.     {
  483.         return $this->accountingBankAccount;
  484.     }
  485.     /**
  486.      * @param string $accountingBankAccount
  487.      */
  488.     public function setAccountingBankAccount(string $accountingBankAccount): void
  489.     {
  490.         $this->accountingBankAccount $accountingBankAccount;
  491.     }
  492.     /**
  493.      * @return mixed
  494.      */
  495.     public function getPersonenbfscheinGueltigBis()
  496.     {
  497.         return $this->personenbfscheinGueltigBis;
  498.     }
  499.     /**
  500.      * @param mixed $personenbfscheinGueltigBis
  501.      */
  502.     public function setPersonenbfscheinGueltigBis($personenbfscheinGueltigBis): void
  503.     {
  504.         $this->personenbfscheinGueltigBis $personenbfscheinGueltigBis;
  505.     }
  506.     /**
  507.      * @return mixed
  508.      */
  509.     public function getGenehmigungKonzAblaufGueltigBis()
  510.     {
  511.         return $this->genehmigungKonzAblaufGueltigBis;
  512.     }
  513.     /**
  514.      * @param mixed $genehmigungKonzAblaufGueltigBis
  515.      */
  516.     public function setGenehmigungKonzAblaufGueltigBis($genehmigungKonzAblaufGueltigBis): void
  517.     {
  518.         $this->genehmigungKonzAblaufGueltigBis $genehmigungKonzAblaufGueltigBis;
  519.     }
  520.     /**
  521.      * @return string
  522.      */
  523.     public function getOrdnungsNummer(): string
  524.     {
  525.         return $this->ordnungsNummer;
  526.     }
  527.     /**
  528.      * @param string $ordnungsNummer
  529.      */
  530.     public function setOrdnungsNummer(string $ordnungsNummer): void
  531.     {
  532.         $this->ordnungsNummer $ordnungsNummer;
  533.     }
  534.     /**
  535.      * @return string
  536.      */
  537.     public function getFuehrerscheinNummer(): string
  538.     {
  539.         return $this->fuehrerscheinNummer;
  540.     }
  541.     /**
  542.      * @param string $fuehrerscheinNummer
  543.      */
  544.     public function setFuehrerscheinNummer(string $fuehrerscheinNummer): void
  545.     {
  546.         $this->fuehrerscheinNummer $fuehrerscheinNummer;
  547.     }
  548.     /**
  549.      * @return string
  550.      */
  551.     public function getFhzKennzeichen(): string
  552.     {
  553.         return $this->fhzKennzeichen;
  554.     }
  555.     /**
  556.      * @param string $fhzKennzeichen
  557.      */
  558.     public function setFhzKennzeichen(string $fhzKennzeichen): void
  559.     {
  560.         $this->fhzKennzeichen $fhzKennzeichen;
  561.     }
  562.     /**
  563.      * @return \DateTime|null
  564.      */
  565.     public function getFhzBaujahr()
  566.     {
  567.         return $this->fhzBaujahr;
  568.     }
  569.     /**
  570.      * @param $fhzBaujahr
  571.      */
  572.     public function setFhzBaujahr$fhzBaujahr): void
  573.     {
  574.         $this->fhzBaujahr $fhzBaujahr;
  575.     }
  576.     /**
  577.      * @return string
  578.      */
  579.     public function getFhzTyp(): string
  580.     {
  581.         return $this->fhzTyp;
  582.     }
  583.     /**
  584.      * @param string $fhzTyp
  585.      */
  586.     public function setFhzTyp(string $fhzTyp): void
  587.     {
  588.         $this->fhzTyp $fhzTyp;
  589.     }
  590.     /**
  591.      * @return mixed
  592.      */
  593.     public function getKmgEntry()
  594.     {
  595.         return $this->kmgEntry;
  596.     }
  597.     /**
  598.      * @param mixed $kmgEntry
  599.      */
  600.     public function setKmgEntry($kmgEntry): void
  601.     {
  602.         $this->kmgEntry $kmgEntry;
  603.     }
  604.     /**
  605.      * @return mixed
  606.      */
  607.     public function getKmgExit()
  608.     {
  609.         return $this->kmgExit;
  610.     }
  611.     /**
  612.      * @param mixed $kmgExit
  613.      */
  614.     public function setKmgExit($kmgExit): void
  615.     {
  616.         $this->kmgExit $kmgExit;
  617.     }
  618.     /**
  619.      * @return mixed
  620.      */
  621.     public function getBirthDate()
  622.     {
  623.         return $this->birthDate;
  624.     }
  625.     /**
  626.      * @param mixed $birthDate
  627.      */
  628.     public function setBirthDate($birthDate): void
  629.     {
  630.         $this->birthDate $birthDate;
  631.     }
  632.     /**
  633.      * @return string
  634.      */
  635.     public function getXchgTargetUrl(): string
  636.     {
  637.         return $this->xchgTargetUrl;
  638.     }
  639.     /**
  640.      * @param string $xchgTargetUrl
  641.      */
  642.     public function setXchgTargetUrl(string $xchgTargetUrl): void
  643.     {
  644.         $this->xchgTargetUrl $xchgTargetUrl;
  645.     }
  646.     /**
  647.      * @return string
  648.      */
  649.     public function getXchgLogin(): string
  650.     {
  651.         return $this->xchgLogin;
  652.     }
  653.     /**
  654.      * @param string $xchgLogin
  655.      */
  656.     public function setXchgLogin(string $xchgLogin): void
  657.     {
  658.         $this->xchgLogin $xchgLogin;
  659.     }
  660.     /**
  661.      * @return string
  662.      */
  663.     public function getXchgPassword(): string
  664.     {
  665.         return $this->xchgPassword;
  666.     }
  667.     /**
  668.      * @param string $xchgPassword
  669.      */
  670.     public function setXchgPassword(string $xchgPassword): void
  671.     {
  672.         $this->xchgPassword $xchgPassword;
  673.     }
  674.     /**
  675.      * @return bool
  676.      */
  677.     public function isSendOrderUpdatesPerMail(): bool
  678.     {
  679.         return $this->sendOrderUpdatesPerMail;
  680.     }
  681.     /**
  682.      * @param bool $sendOrderUpdatesPerMail
  683.      */
  684.     public function setSendOrderUpdatesPerMail(bool $sendOrderUpdatesPerMail): void
  685.     {
  686.         $this->sendOrderUpdatesPerMail $sendOrderUpdatesPerMail;
  687.     }
  688.     /**
  689.      * @return string
  690.      */
  691.     public function getDefaultRideStyle(): string
  692.     {
  693.         return $this->defaultRideStyle;
  694.     }
  695.     /**
  696.      * @param string $defaultRideStyle
  697.      */
  698.     public function setDefaultRideStyle(string $defaultRideStyle): void
  699.     {
  700.         $this->defaultRideStyle $defaultRideStyle;
  701.     }
  702.     /**
  703.      * @return string
  704.      */
  705.     public function getCreditNumber(): string
  706.     {
  707.         return $this->creditNumber;
  708.     }
  709.     /**
  710.      * @param string $creditNumber
  711.      */
  712.     public function setCreditNumber(string $creditNumber): void
  713.     {
  714.         $this->creditNumber $creditNumber;
  715.     }
  716.     /**
  717.      * @return string
  718.      */
  719.     public function getWaitPriceAccNumber(): string
  720.     {
  721.         return $this->waitPriceAccNumber;
  722.     }
  723.     /**
  724.      * @param string $waitPriceAccNumber
  725.      */
  726.     public function setWaitPriceAccNumber(string $waitPriceAccNumber): void
  727.     {
  728.         $this->waitPriceAccNumber $waitPriceAccNumber;
  729.     }
  730.     /**
  731.      * @return string
  732.      */
  733.     public function getExtraCostAccNumber(): string
  734.     {
  735.         return $this->extraCostAccNumber;
  736.     }
  737.     /**
  738.      * @param string $extraCostAccNumber
  739.      */
  740.     public function setExtraCostAccNumber(string $extraCostAccNumber): void
  741.     {
  742.         $this->extraCostAccNumber $extraCostAccNumber;
  743.     }
  744.     /**
  745.      * @return float
  746.      */
  747.     public function getTaxiGeldAufschlagKurzstrecke(): float
  748.     {
  749.         return $this->taxiGeldAufschlagKurzstrecke;
  750.     }
  751.     /**
  752.      * @param float $taxiGeldAufschlagKurzstrecke
  753.      */
  754.     public function setTaxiGeldAufschlagKurzstrecke(float $taxiGeldAufschlagKurzstrecke): void
  755.     {
  756.         $this->taxiGeldAufschlagKurzstrecke $taxiGeldAufschlagKurzstrecke;
  757.     }
  758.     /**
  759.      * @return bool
  760.      */
  761.     public function isAllowInterest(): bool
  762.     {
  763.         return $this->allowInterest;
  764.     }
  765.     /**
  766.      * @param bool $allowInterest
  767.      */
  768.     public function setAllowInterest(bool $allowInterest): void
  769.     {
  770.         $this->allowInterest $allowInterest;
  771.     }
  772.     /**
  773.      * @return string
  774.      */
  775.     public function getJobEmail(): string
  776.     {
  777.         return $this->jobEmail;
  778.     }
  779.     /**
  780.      * @param string $jobEmail
  781.      */
  782.     public function setJobEmail(string $jobEmail): void
  783.     {
  784.         $this->jobEmail $jobEmail;
  785.     }
  786.     /**
  787.      * @return bool
  788.      */
  789.     public function isActive(): bool
  790.     {
  791.         return $this->active;
  792.     }
  793.     /**
  794.      * @param bool $active
  795.      */
  796.     public function setActive(bool $active): void
  797.     {
  798.         $this->active $active;
  799.     }
  800.     /**
  801.      * @return float
  802.      */
  803.     public function getDwzPrice(): float
  804.     {
  805.         return $this->dwzPrice;
  806.     }
  807.     /**
  808.      * @param float $dwzPrice
  809.      */
  810.     public function setDwzPrice(float $dwzPrice): void
  811.     {
  812.         $this->dwzPrice $dwzPrice;
  813.     }
  814.     /**
  815.      * Specify data which should be serialized to JSON
  816.      * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
  817.      * @return mixed data which can be serialized by <b>json_encode</b>,
  818.      * which is a value of any type other than a resource.
  819.      * @since 5.4.0
  820.      */
  821.     function jsonSerialize()
  822.     {
  823.         return [
  824.             'id'=>$this->getId(),
  825.             'number'=>$this->number,
  826.             'name'=>$this->getName(),
  827.             'shortCode'=>$this->shortCode
  828.         ];
  829.     }
  830.     public function __toString()
  831.     {
  832.         return $this->id."|".$this->name;
  833.     }
  834. }