Contact::getDescription()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace Xsolve\SalesforceClient\Model;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Xsolve\SalesforceClient\Enum\AbstractSObjectType;
7
use Xsolve\SalesforceClient\Enum\SObjectType;
8
9
class Contact extends AbstractSObject
10
{
11
    /**
12
     * @var string|null
13
     * @JMS\Type("string")
14
     * @JMS\Groups({"create", "update"})
15
     */
16
    protected $accountId;
17
18
    /**
19
     * @var string|null
20
     * @JMS\Type("string")
21
     * @JMS\Groups({"create", "update"})
22
     */
23
    protected $assistantName;
24
25
    /**
26
     * @var string|null
27
     * @JMS\Type("string")
28
     * @JMS\Groups({"create", "update"})
29
     */
30
    protected $assistantPhone;
31
32
    /**
33
     * @var \DateTimeInterface|null
34
     * @JMS\Type("DateTime<'Y-m-d'>")
35
     * @JMS\Groups({"create", "update"})
36
     */
37
    protected $birthdate;
38
39
    /**
40
     * @var string|null
41
     * @JMS\Type("string")
42
     * @JMS\Groups({"create", "update"})
43
     */
44
    protected $cleanStatus;
45
46
    /**
47
     * @var string|null
48
     * @JMS\Type("string")
49
     * @JMS\Groups({"create", "update"})
50
     */
51
    protected $department;
52
53
    /**
54
     * @var string|null
55
     * @JMS\Type("string")
56
     * @JMS\Groups({"create", "update"})
57
     */
58
    protected $description;
59
60
    /**
61
     * @var string|null
62
     * @JMS\Type("string")
63
     * @JMS\Groups({"create", "update"})
64
     */
65
    protected $email;
66
67
    /**
68
     * @var \DateTimeInterface|null
69
     * @JMS\Type("DateTime<'Y-m-d\TH:i:s.\0\0\0O'>")
70
     */
71
    protected $emailBouncedDate;
72
73
    /**
74
     * @var string|null
75
     * @JMS\Type("string")
76
     * @JMS\Groups({"create", "update"})
77
     */
78
    protected $emailBouncedReason;
79
80
    /**
81
     * @var string|null
82
     * @JMS\Type("string")
83
     * @JMS\Groups({"create", "update"})
84
     */
85
    protected $fax;
86
87
    /**
88
     * @var string|null
89
     * @JMS\Type("string")
90
     */
91
    protected $name;
92
93
    /**
94
     * @var string|null
95
     * @JMS\Type("string")
96
     * @JMS\Groups({"create", "update"})
97
     */
98
    protected $firstName;
99
100
    /**
101
     * @var string|null
102
     * @JMS\Type("string")
103
     * @JMS\Groups({"create", "update"})
104
     */
105
    protected $lastName;
106
107
    /**
108
     * @var string|null
109
     * @JMS\Type("string")
110
     * @JMS\Groups({"create", "update"})
111
     */
112
    protected $homePhone;
113
114
    /**
115
     * @var bool|null
116
     * @JMS\Type("boolean")
117
     */
118
    protected $isDeleted;
119
120
    /**
121
     * @var bool|null
122
     * @JMS\Type("boolean")
123
     */
124
    protected $isEmailBounced;
125
126
    /**
127
     * @var bool|null
128
     * @JMS\Type("boolean")
129
     */
130
    protected $isPersonAccount;
131
132
    /**
133
     * @var string|null
134
     * @JMS\Type("string")
135
     * @JMS\Groups({"create", "update"})
136
     */
137
    protected $jigsaw;
138
139
    /**
140
     * @var \DateTimeInterface|null
141
     * @JMS\Type("DateTime<'Y-m-d\TH:i:s.\0\0\0O'>")
142
     */
143
    protected $lastActivityDate;
144
145
    /**
146
     * @var \DateTimeInterface|null
147
     * @JMS\Type("DateTime<'Y-m-d\TH:i:s.\0\0\0O'>")
148
     */
149
    protected $lastCURequestDate;
150
151
    /**
152
     * @var \DateTimeInterface|null
153
     * @JMS\Type("DateTime<'Y-m-d\TH:i:s.\0\0\0O'>")
154
     */
155
    protected $lastCUUpdateDate;
156
157
    /**
158
     * @var \DateTimeInterface|null
159
     * @JMS\Type("DateTime<'Y-m-d\TH:i:s.\0\0\0O'>")
160
     */
161
    protected $lastReferencedDate;
162
163
    /**
164
     * @var \DateTimeInterface|null
165
     * @JMS\Type("DateTime<'Y-m-d\TH:i:s.\0\0\0O'>")
166
     */
167
    protected $lastViewedDate;
168
169
    /**
170
     * @var string|null
171
     * @JMS\Type("string")
172
     * @JMS\Groups({"create", "update"})
173
     */
174
    protected $leadSource;
175
176
    /**
177
     * @var string|null
178
     * @JMS\Type("string")
179
     * @JMS\Groups({"create", "update"})
180
     */
181
    protected $mobilePhone;
182
183
    /**
184
     * @var ValueObject\Address|null
185
     * @JMS\Type("Xsolve\SalesforceClient\Model\ValueObject\Address")
186
     */
187
    protected $mailingAddress;
188
189
    /**
190
     * @var string|null
191
     * @JMS\Type("string")
192
     * @JMS\Groups({"update", "create"})
193
     */
194
    protected $mailingStreet;
195
196
    /**
197
     * @var string|null
198
     * @JMS\Type("string")
199
     * @JMS\Groups({"update", "create"})
200
     */
201
    protected $mailingCity;
202
203
    /**
204
     * @var string|null
205
     * @JMS\Type("string")
206
     * @JMS\Groups({"update", "create"})
207
     */
208
    protected $mailingState;
209
210
    /**
211
     * @var string|null
212
     * @JMS\Type("string")
213
     * @JMS\Groups({"update", "create"})
214
     */
215
    protected $mailingPostalCode;
216
217
    /**
218
     * @var string|null
219
     * @JMS\Type("string")
220
     * @JMS\Groups({"update", "create"})
221
     */
222
    protected $mailingCountry;
223
224
    /**
225
     * @var float|null
226
     * @JMS\Type("float")
227
     * @JMS\Groups({"update", "create"})
228
     */
229
    protected $mailingLatitude;
230
231
    /**
232
     * @var float|null
233
     * @JMS\Type("float")
234
     * @JMS\Groups({"update", "create"})
235
     */
236
    protected $mailingLongitude;
237
238
    /**
239
     * @var string|null
240
     * @JMS\Type("string")
241
     */
242
    protected $masterRecordId;
243
244
    /**
245
     * @var ValueObject\Address|null
246
     * @JMS\Type("Xsolve\SalesforceClient\Model\ValueObject\Address")
247
     */
248
    protected $otherAddress;
249
250
    /**
251
     * @var string|null
252
     * @JMS\Type("string")
253
     * @JMS\Groups({"update", "create"})
254
     */
255
    protected $otherStreet;
256
257
    /**
258
     * @var string|null
259
     * @JMS\Type("string")
260
     * @JMS\Groups({"update", "create"})
261
     */
262
    protected $otherCity;
263
264
    /**
265
     * @var string|null
266
     * @JMS\Type("string")
267
     * @JMS\Groups({"update", "create"})
268
     */
269
    protected $otherState;
270
271
    /**
272
     * @var string|null
273
     * @JMS\Type("string")
274
     * @JMS\Groups({"update", "create"})
275
     */
276
    protected $otherPostalCode;
277
278
    /**
279
     * @var string|null
280
     * @JMS\Type("string")
281
     * @JMS\Groups({"update", "create"})
282
     */
283
    protected $otherCountry;
284
285
    /**
286
     * @var float|null
287
     * @JMS\Type("float")
288
     * @JMS\Groups({"update", "create"})
289
     */
290
    protected $otherLatitude;
291
292
    /**
293
     * @var float|null
294
     * @JMS\Type("float")
295
     * @JMS\Groups({"update", "create"})
296
     */
297
    protected $otherLongitude;
298
299
    /**
300
     * @var string|null
301
     * @JMS\Type("string")
302
     * @JMS\Groups({"create", "update"})
303
     */
304
    protected $otherPhone;
305
306
    /**
307
     * @var string|null
308
     * @JMS\Type("string")
309
     * @JMS\Groups({"create", "update"})
310
     */
311
    protected $phone;
312
313
    /**
314
     * @var string|null
315
     * @JMS\Type("string")
316
     * @JMS\Groups({"create", "update"})
317
     */
318
    protected $ownerId;
319
320
    /**
321
     * @var string|null
322
     * @JMS\Type("string")
323
     */
324
    protected $photoUrl;
325
326
    /**
327
     * @var string|null
328
     * @JMS\Type("string")
329
     * @JMS\Groups({"create", "update"})
330
     */
331
    protected $reportsToId;
332
333
    /**
334
     * @var string|null
335
     * @JMS\Type("string")
336
     * @JMS\Groups({"create", "update"})
337
     */
338
    protected $salutation;
339
340
    /**
341
     * @var string|null
342
     * @JMS\Type("string")
343
     * @JMS\Groups({"create", "update"})
344
     */
345
    protected $suffix;
346
347
    /**
348
     * @var string|null
349
     * @JMS\Type("string")
350
     * @JMS\Groups({"create", "update"})
351
     */
352
    protected $title;
353
354
    /**
355
     * {@inheritdoc}
356
     */
357
    public static function getSObjectName(): AbstractSObjectType
358
    {
359
        return SObjectType::CONTACT();
360
    }
361
362
    /**
363
     * @return string|null
364
     */
365
    public function getAccountId()
366
    {
367
        return $this->accountId;
368
    }
369
370
    /**
371
     * @return string|null
372
     */
373
    public function getAssistantName()
374
    {
375
        return $this->assistantName;
376
    }
377
378
    /**
379
     * @return string|null
380
     */
381
    public function getAssistantPhone()
382
    {
383
        return $this->assistantPhone;
384
    }
385
386
    /**
387
     * @return \DateTimeInterface|null
388
     */
389
    public function getBirthdate()
390
    {
391
        return $this->birthdate;
392
    }
393
394
    /**
395
     * @return string|null
396
     */
397
    public function getCleanStatus()
398
    {
399
        return $this->cleanStatus;
400
    }
401
402
    /**
403
     * @return string|null
404
     */
405
    public function getDepartment()
406
    {
407
        return $this->department;
408
    }
409
410
    /**
411
     * @return string|null
412
     */
413
    public function getDescription()
414
    {
415
        return $this->description;
416
    }
417
418
    /**
419
     * @return string|null
420
     */
421
    public function getEmail()
422
    {
423
        return $this->email;
424
    }
425
426
    /**
427
     * @return \DateTimeInterface|null
428
     */
429
    public function getEmailBouncedDate()
430
    {
431
        return $this->emailBouncedDate;
432
    }
433
434
    /**
435
     * @return string|null
436
     */
437
    public function getEmailBouncedReason()
438
    {
439
        return $this->emailBouncedReason;
440
    }
441
442
    /**
443
     * @return string|null
444
     */
445
    public function getFax()
446
    {
447
        return $this->fax;
448
    }
449
450
    /**
451
     * @return string|null
452
     */
453
    public function getName()
454
    {
455
        return $this->name;
456
    }
457
458
    /**
459
     * @return string|null
460
     */
461
    public function getFirstName()
462
    {
463
        return $this->firstName;
464
    }
465
466
    /**
467
     * @return string|null
468
     */
469
    public function getLastName()
470
    {
471
        return $this->lastName;
472
    }
473
474
    /**
475
     * @return string|null
476
     */
477
    public function getHomePhone()
478
    {
479
        return $this->homePhone;
480
    }
481
482
    /**
483
     * @return bool|null
484
     */
485
    public function isDeleted()
486
    {
487
        return $this->isDeleted;
488
    }
489
490
    /**
491
     * @return bool|null
492
     */
493
    public function isEmailBounced()
494
    {
495
        return $this->isEmailBounced;
496
    }
497
498
    /**
499
     * @return bool|null
500
     */
501
    public function isPersonAccount()
502
    {
503
        return $this->isPersonAccount;
504
    }
505
506
    /**
507
     * @return string|null
508
     */
509
    public function getJigsaw()
510
    {
511
        return $this->jigsaw;
512
    }
513
514
    /**
515
     * @return \DateTimeInterface|null
516
     */
517
    public function getLastActivityDate()
518
    {
519
        return $this->lastActivityDate;
520
    }
521
522
    /**
523
     * @return \DateTimeInterface|null
524
     */
525
    public function getLastCURequestDate()
526
    {
527
        return $this->lastCURequestDate;
528
    }
529
530
    /**
531
     * @return \DateTimeInterface|null
532
     */
533
    public function getLastCUUpdateDate()
534
    {
535
        return $this->lastCUUpdateDate;
536
    }
537
538
    /**
539
     * @return \DateTimeInterface|null
540
     */
541
    public function getLastReferencedDate()
542
    {
543
        return $this->lastReferencedDate;
544
    }
545
546
    /**
547
     * @return \DateTimeInterface|null
548
     */
549
    public function getLastViewedDate()
550
    {
551
        return $this->lastViewedDate;
552
    }
553
554
    /**
555
     * @return string|null
556
     */
557
    public function getLeadSource()
558
    {
559
        return $this->leadSource;
560
    }
561
562
    /**
563
     * @return string|null
564
     */
565
    public function getMobilePhone()
566
    {
567
        return $this->mobilePhone;
568
    }
569
570
    /**
571
     * @return ValueObject\Address|null
572
     */
573
    public function getMailingAddress()
574
    {
575
        return $this->mailingAddress;
576
    }
577
578
    /**
579
     * @return ValueObject\Address|null
580
     */
581
    public function getOtherAddress()
582
    {
583
        return $this->otherAddress;
584
    }
585
586
    /**
587
     * @return string|null
588
     */
589
    public function getOtherPhone()
590
    {
591
        return $this->otherPhone;
592
    }
593
594
    /**
595
     * @return string|null
596
     */
597
    public function getPhone()
598
    {
599
        return $this->phone;
600
    }
601
602
    /**
603
     * @return string|null
604
     */
605
    public function getOwnerId()
606
    {
607
        return $this->ownerId;
608
    }
609
610
    /**
611
     * @return string|null
612
     */
613
    public function getPhotoUrl()
614
    {
615
        return $this->photoUrl;
616
    }
617
618
    /**
619
     * @return string|null
620
     */
621
    public function getReportsToId()
622
    {
623
        return $this->reportsToId;
624
    }
625
626
    /**
627
     * @return string|null
628
     */
629
    public function getSalutation()
630
    {
631
        return $this->salutation;
632
    }
633
634
    /**
635
     * @return string|null
636
     */
637
    public function getSuffix()
638
    {
639
        return $this->suffix;
640
    }
641
642
    /**
643
     * @return string|null
644
     */
645
    public function getTitle()
646
    {
647
        return $this->title;
648
    }
649
650
    public function setAccountId(string $accountId = null): self
651
    {
652
        $this->accountId = $accountId;
653
654
        return $this;
655
    }
656
657
    public function setAssistantName(string $assistantName = null): self
658
    {
659
        $this->assistantName = $assistantName;
660
661
        return $this;
662
    }
663
664
    public function setAssistantPhone(string $assistantPhone = null): self
665
    {
666
        $this->assistantPhone = $assistantPhone;
667
668
        return $this;
669
    }
670
671
    public function setBirthdate(\DateTimeInterface $birthdate = null): self
672
    {
673
        $this->birthdate = $birthdate;
674
675
        return $this;
676
    }
677
678
    public function setCleanStatus(string $cleanStatus = null): self
679
    {
680
        $this->cleanStatus = $cleanStatus;
681
682
        return $this;
683
    }
684
685
    public function setDepartment(string $department = null): self
686
    {
687
        $this->department = $department;
688
689
        return $this;
690
    }
691
692
    public function setDescription(string $description = null): self
693
    {
694
        $this->description = $description;
695
696
        return $this;
697
    }
698
699
    public function setEmail(string $email = null): self
700
    {
701
        $this->email = $email;
702
703
        return $this;
704
    }
705
706
    public function setEmailBouncedDate(\DateTimeInterface $emailBouncedDate = null): self
707
    {
708
        $this->emailBouncedDate = $emailBouncedDate;
709
710
        return $this;
711
    }
712
713
    public function setEmailBouncedReason(string $emailBouncedReason = null): self
714
    {
715
        $this->emailBouncedReason = $emailBouncedReason;
716
717
        return $this;
718
    }
719
720
    public function setFax(string $fax = null): self
721
    {
722
        $this->fax = $fax;
723
724
        return $this;
725
    }
726
727
    public function setFirstName(string $firstName = null): self
728
    {
729
        $this->firstName = $firstName;
730
731
        return $this;
732
    }
733
734
    public function setLastName(string $lastName): self
735
    {
736
        $this->lastName = $lastName;
737
738
        return $this;
739
    }
740
741
    public function setHomePhone(string $homePhone = null): self
742
    {
743
        $this->homePhone = $homePhone;
744
745
        return $this;
746
    }
747
748
    public function setJigsaw(string $jigsaw = null): self
749
    {
750
        $this->jigsaw = $jigsaw;
751
752
        return $this;
753
    }
754
755
    public function setLastReferencedDate(\DateTimeInterface $lastReferencedDate): self
756
    {
757
        $this->lastReferencedDate = $lastReferencedDate;
758
759
        return $this;
760
    }
761
762
    public function setLastViewedDate(\DateTimeInterface $lastViewedDate): self
763
    {
764
        $this->lastViewedDate = $lastViewedDate;
765
766
        return $this;
767
    }
768
769
    public function setLeadSource(string $leadSource = null): self
770
    {
771
        $this->leadSource = $leadSource;
772
773
        return $this;
774
    }
775
776
    public function setMobilePhone(string $mobilePhone = null): self
777
    {
778
        $this->mobilePhone = $mobilePhone;
779
780
        return $this;
781
    }
782
783
    public function setMailingAddress(ValueObject\Address $mailingAddress): self
784
    {
785
        $this->mailingAddress = $mailingAddress;
786
787
        return $this;
788
    }
789
790
    public function setOtherAddress(ValueObject\Address $otherAddress): self
791
    {
792
        $this->otherAddress = $otherAddress;
793
794
        return $this;
795
    }
796
797
    public function setOtherPhone(string $otherPhone = null): self
798
    {
799
        $this->otherPhone = $otherPhone;
800
801
        return $this;
802
    }
803
804
    public function setPhone(string $phone = null): self
805
    {
806
        $this->phone = $phone;
807
808
        return $this;
809
    }
810
811
    public function setOwnerId(string $ownerId): self
812
    {
813
        $this->ownerId = $ownerId;
814
815
        return $this;
816
    }
817
818
    public function setReportsToId(string $reportsToId = null): self
819
    {
820
        $this->reportsToId = $reportsToId;
821
822
        return $this;
823
    }
824
825
    public function setSalutation(string $salutation = null): self
826
    {
827
        $this->salutation = $salutation;
828
829
        return $this;
830
    }
831
832
    public function setSuffix(string $suffix = null): self
833
    {
834
        $this->suffix = $suffix;
835
836
        return $this;
837
    }
838
839
    public function setTitle(string $title = null): self
840
    {
841
        $this->title = $title;
842
843
        return $this;
844
    }
845
846
    /**
847
     * @JMS\PreSerialize
848
     */
849
    public function updateMailingAddress()
850
    {
851
        if (!$this->mailingAddress instanceof ValueObject\Address) {
852
            return;
853
        }
854
855
        $this->mailingCity = $this->mailingAddress->getCity();
856
        $this->mailingCountry = $this->mailingAddress->getCountry();
857
        $this->mailingLatitude = $this->mailingAddress->getLatitude();
858
        $this->mailingLongitude = $this->mailingAddress->getLongitude();
859
        $this->mailingPostalCode = $this->mailingAddress->getPostalCode();
860
        $this->mailingState = $this->mailingAddress->getState();
861
        $this->mailingStreet = $this->mailingAddress->getStreet();
862
    }
863
864
    /**
865
     * @JMS\PreSerialize
866
     */
867
    public function updateOtherAddress()
868
    {
869
        if (!$this->otherAddress instanceof ValueObject\Address) {
870
            return;
871
        }
872
873
        $this->otherCity = $this->otherAddress->getCity();
874
        $this->otherCountry = $this->otherAddress->getCountry();
875
        $this->otherLatitude = $this->otherAddress->getLatitude();
876
        $this->otherLongitude = $this->otherAddress->getLongitude();
877
        $this->otherPostalCode = $this->otherAddress->getPostalCode();
878
        $this->otherState = $this->otherAddress->getState();
879
        $this->otherStreet = $this->otherAddress->getStreet();
880
    }
881
}
882