click to refresh error debugging
[namibia] / module / Stock / src / Stock / Entity / Tuhpi.php
1 <?php
2 namespace Stock\Entity;
3
4 use Doctrine\ORM\Mapping as ORM;
5
6
7
8 /**
9  * A Trans Union HPI vs stock item.
10  *
11  * @ORM\Entity
12  * @ORM\HasLifecycleCallbacks
13  * @ORM\Table(name="tuhpi")
14  */
15 class Tuhpi
16 {
17
18         /**
19          * Can archive records.
20          */
21         const ARCHIVE = false;
22         /**
23          * Pull Synchronization Strategy for this table.
24          */
25         const PULL_SYNCH_STRATEGY = false;
26         /**
27          * Push Synchronization Strategy for this table.
28          */
29         const PUSH_SYNCH_STRATEGY = false;
30         /**
31          * Post insert action must be called after new entity is flushed to database.
32          */
33         const HAVE_POST_INSERT = true;
34
35
36
37         /* ------------------------------------ Identification ------------------------------------ */
38         /**
39          * @ORM\Id
40          * @ORM\Column(type="integer");
41          * @ORM\GeneratedValue(strategy="AUTO")
42          */
43         protected $id;
44
45
46         /* ------------------------------------ Ownership ------------------------------------ */
47         /**
48          * @ORM\ManyToOne(targetEntity="\Company\Entity\Company")
49          * @ORM\JoinColumn(nullable=false, name="company_id")
50          **/
51         protected $company;
52
53         /**
54          * @ORM\ManyToOne(targetEntity="\User\Entity\Profile")
55          * @ORM\JoinColumn(nullable=false, name="created_by_profile_id")
56          **/
57         protected $createdBy;
58
59         /**
60          * @ORM\ManyToOne(targetEntity="\Valuation\Entity\Valuation", cascade={"all"})
61          * @ORM\JoinColumn(nullable=true, name="stock_valuation_id")
62          **/
63         protected $valuation;
64
65         /**
66          * @ORM\ManyToOne(targetEntity="\PriceGuide\Entity\PriceGuide")
67          * @ORM\JoinColumn(nullable=true, name="price_guide_id")
68          **/
69         protected $priceGuide;
70
71         /**
72          * @ORM\ManyToOne(targetEntity="\Auction\Entity\Auction")
73          * @ORM\JoinColumn(nullable=true, name="auction_id")
74          **/
75         protected $auction;
76
77
78         /**
79          * @ORM\ManyToOne(targetEntity="\Stock\Entity\Stock")
80          * @ORM\JoinColumn(nullable=false, name="stock_id")
81          **/
82         protected $stock;
83
84
85         /* ------------------------------------ Finance Information ------------------------------------ */
86
87
88         /**
89          * @ORM\Column(type="string", length=15, nullable=true, name="transaction_number")
90          */
91         protected $transactionNumber;
92
93         /**
94          * @ORM\Column(type="string", length=255, nullable=true, name="f_financeProvider")
95          */
96         protected $f_financeProvider;
97
98         /**
99          * @ORM\Column(type="string", length=255, nullable=true, name="f_financeBranch")
100          */
101         protected $f_financeBranch;
102
103         /**
104          * @ORM\Column(type="string", length=255, nullable=true, name="f_agreementOrAccountNumber")
105          */
106         protected $f_agreementOrAccountNumber;
107
108         /**
109          * @ORM\Column(type="string", length=255, nullable=true, name="f_agreementType")
110          */
111         protected $f_agreementType;
112
113         /**
114          * @ORM\Column(type="string", length=255, nullable=true, name="f_telephoneNumber")
115          */
116         protected $f_telephoneNumber;
117
118         /**
119          * @ORM\Column(type="string", length=255, nullable=true, name="f_resultCode")
120          */
121         protected $f_resultCode;
122
123
124         /* ------------------------------------ Finance History ------------------------------------ */
125
126         /**
127          * @ORM\Column(type="text", name="fh_data")
128          */
129         protected $fh_data;
130
131
132         /* ------------------------------------ Accident History ------------------------------------ */
133
134
135         /**
136          * @ORM\Column(type="text", name="ah_data")
137          */
138         protected $ah_data;
139
140         /**
141          * @ORM\Column(type="string", length=255, nullable=true, name="ah_assessmentDate")
142          */
143         protected $ah_assessmentDate;
144
145
146         /**
147          * @ORM\Column(type="string", length=255, nullable=true, name="ah_vehicleDescription")
148          */
149         protected $ah_vehicleDescription;
150
151         /**
152          * @ORM\Column(type="string", length=255, nullable=true, name="ah_vinMatch")
153          */
154         protected $ah_vinMatch;
155
156         /**
157          * @ORM\Column(type="string", length=255, nullable=true, name="ah_regMatch")
158          */
159         protected $ah_regMatch;
160
161         /**
162          * @ORM\Column(type="string", length=255, nullable=true, name="ah_estimatedRepairCost")
163          */
164         protected $ah_estimatedRepairCost;
165
166         /**
167          * @ORM\Column(type="string", length=255, nullable=true, name="ah_assessmentNumber")
168          */
169         protected $ah_assessmentNumber;
170
171         /**
172          * @ORM\Column(type="string", length=255, nullable=true, name="ah_engineMatch")
173          */
174         protected $ah_engineMatch;
175
176         /**
177          * @ORM\Column(type="string", length=255, nullable=true, name="ah_estimatePercentageOfRetailValue")
178          */
179         protected $ah_estimatePercentageOfRetailValue;
180
181         /**
182          * @ORM\Column(type="string", length=255, nullable=true, name="ah_resultCode")
183          */
184         protected $ah_resultCode;
185
186
187         /* ------------------------------------ Stolen Information ------------------------------------ */
188
189
190         /**
191          * @ORM\Column(type="string", length=255, nullable=true, name="si_policeStation")
192          */
193         protected $si_policeStation;
194
195
196         /**
197          * @ORM\Column(type="string", length=255, nullable=true, name="si_caseNumber")
198          */
199         protected $si_caseNumber;
200
201         /**
202          * @ORM\Column(type="string", length=255, nullable=true, name="si_dateStolen")
203          */
204         protected $si_dateStolen;
205
206
207         /**
208          * @ORM\Column(type="string", length=255, nullable=true, name="si_vinMatch")
209          */
210         protected $si_vinMatch;
211
212         /**
213          * @ORM\Column(type="string", length=255, nullable=true, name="si_engineMatch")
214          */
215         protected $si_engineMatch;
216
217         /**
218          * @ORM\Column(type="string", length=255, nullable=true, name="si_registrationMatch")
219          */
220         protected $si_registrationMatch;
221
222         /**
223          * @ORM\Column(type="string", length=255, nullable=true, name="si_resultCode")
224          */
225         protected $si_resultCode;
226
227
228         /* ------------------------------------ Alert Information ------------------------------------ */
229
230
231         /**
232          * @ORM\Column(type="string", length=255, nullable=true, name="ai_company")
233          */
234         protected $ai_company;
235
236
237         /**
238          * @ORM\Column(type="string", length=255, nullable=true, name="ai_referenceNumber")
239          */
240         protected $ai_referenceNumber;
241
242         /**
243          * @ORM\Column(type="string", length=255, nullable=true, name="ai_alertReason")
244          */
245         protected $ai_alertReason;
246
247         /**
248          * @ORM\Column(type="string", length=255, nullable=true, name="ai_telephoneNumber")
249          */
250         protected $ai_telephoneNumber;
251
252         /**
253          * @ORM\Column(type="string", length=255, nullable=true, name="ai_resultCode")
254          */
255         protected $ai_resultCode;
256
257
258         /* ------------------------------------ IVID History Information ------------------------------------ */
259
260
261         /**
262          * @ORM\Column(type="string", length=255, nullable=true, name="ivid_responseCode")
263          */
264         protected $ivid_responseCode;
265
266
267         /**
268          * @ORM\Column(type="string", length=255, nullable=true, name="ivid_responseDescription")
269          */
270         protected $ivid_responseDescription;
271
272         /**
273          * @ORM\Column(type="string", length=255, nullable=true, name="ivid_referenceNumber")
274          */
275         protected $ivid_referenceNumber;
276
277         /**
278          * @ORM\Column(type="string", length=255, nullable=true, name="ivid_contactNumber")
279          */
280         protected $ivid_contactNumber;
281
282         /**
283          * @ORM\Column(type="string", length=255, nullable=true, name="ivid_resultCode")
284          */
285         protected $ivid_resultCode;
286
287
288         /* ------------------------------------ Microdot Information ------------------------------------ */
289
290
291         /**
292          * @ORM\Column(type="string", length=255, nullable=true, name="mi_company")
293          */
294         protected $mi_company;
295
296
297         /**
298          * @ORM\Column(type="string", length=255, nullable=true, name="mi_referenceNumber")
299          */
300         protected $mi_referenceNumber;
301
302         /**
303          * @ORM\Column(type="string", length=255, nullable=true, name="mi_contactNumber")
304          */
305         protected $mi_contactNumber;
306
307         /**
308          * @ORM\Column(type="string", length=255, nullable=true, name="mi_dateApplied")
309          */
310         protected $mi_dateApplied;
311
312         /**
313          * @ORM\Column(type="string", length=255, nullable=true, name="mi_resultCode")
314          */
315         protected $mi_resultCode;
316
317
318         /* ------------------------------------ VESA Information ------------------------------------ */
319
320
321         /**
322          * @ORM\Column(type="string", length=255, nullable=true, name="vesa_CertificateNumber")
323          */
324         protected $vesa_CertificateNumber;
325
326         /**
327          * @ORM\Column(type="string", length=255, nullable=true, name="vesa_dateFitted")
328          */
329         protected $vesa_dateFitted;
330
331         /**
332          * @ORM\Column(type="string", length=255, nullable=true, name="vesa_brandName")
333          */
334         protected $vesa_brandName;
335
336         /**
337          * @ORM\Column(type="string", length=255, nullable=true, name="vesa_brandModel")
338          */
339         protected $vesa_brandModel;
340
341         /**
342          * @ORM\Column(type="string", length=255, nullable=true, name="vesa_deviceDescriptionType")
343          */
344         protected $vesa_deviceDescriptionType;
345
346         /**
347          * @ORM\Column(type="string", length=255, nullable=true, name="vesa_resultCode")
348          */
349         protected $vesa_resultCode;
350
351
352         /* ------------------------------------ Registration History ------------------------------------ */
353
354         /**
355          * @ORM\Column(type="text", name="rh_data")
356          */
357         protected $rh_data;
358
359
360
361         /* ------------------------------------ Enquiry History ------------------------------------ */
362
363
364         /**
365          * @ORM\Column(type="text", name="eh_data")
366          */
367         protected $eh_data;
368
369
370
371         /* ------------------------------------ Mileage History ------------------------------------ */
372
373
374         /**
375          * @ORM\Column(type="text", name="mh_data")
376          */
377         protected $mh_data;
378
379         /* ------------------------------------ VehicleOptionCodes ------------------------------------ */
380
381
382         /**
383          * @ORM\Column(type="integer", nullable=false, name="vc_month");
384          */
385         protected $vc_month = 0;
386
387
388         /**
389          * @ORM\Column(type="integer", nullable=false, name="vc_year");
390          */
391         protected $vc_year = 0;
392
393         /**
394          * @ORM\Column(type="integer", nullable=false, name="vc_newOptionCode");
395          */
396         protected $vc_newOptionCode = 0;
397
398         /**
399          * @ORM\Column(type="integer", nullable=false, name="vc_usedOptionCode");
400          */
401         protected $vc_usedOptionCode = 0;
402
403         /**
404          * @ORM\Column(type="integer", nullable=false, name="vc_maximumRange");
405          */
406         protected $vc_maximumRange = 0;
407
408         /**
409          * @ORM\Column(type="integer", nullable=false, name="vc_minimunRange");
410          */
411         protected $vc_minimunRange = 0;
412
413         /**
414          * @ORM\Column(type="integer", nullable=false, name="vc_newPrice");
415          */
416         protected $vc_newPrice = 0;
417
418         /**
419          * @ORM\Column(type="integer", nullable=false, name="vc_retailPrice");
420          */
421         protected $vc_retailPrice = 0;
422
423
424         /**
425          * @ORM\Column(type="integer", nullable=false, name="vc_tradePrice");
426          */
427         protected $vc_tradePrice = 0;
428
429         /**
430          * @ORM\Column(type="string", length=255, nullable=true, name="vc_resultCode")
431          */
432         protected $vc_resultCode;
433
434
435
436         /* ------------------------------------ VehicleOptionCodes ------------------------------------ */
437         /**
438          * @ORM\Column(type="string", length=50, nullable=true, name="vci_hpiNumber");
439          */
440         protected $vci_HPINumber;
441
442         /**
443          * @ORM\Column(type="string", length=50, nullable=true, name="vci_matchColour");
444          */
445         protected $vci_matchColour;
446
447         /**
448          * @ORM\Column(type="string", length=50, nullable=true, name="vci_matchEngineNumber");
449          */
450         protected $vci_matchEngineNumber;
451
452         /**
453          * @ORM\Column(type="string", length=50, nullable=true, name="vci_matchManufacturer");
454          */
455         protected $vci_matchManufacturer;
456
457         /**
458          * @ORM\Column(type="string", length=50, nullable=true, name="vci_matchModel");
459          */
460         protected $vci_matchModel;
461
462         /**
463          * @ORM\Column(type="string", length=250, nullable=true, name="vci_matchString");
464          */
465         protected $vci_matchString;
466
467         /**
468          * @ORM\Column(type="string", length=50, nullable=true, name="vci_matchVehicleRegistration");
469          */
470         protected $vci_matchVehicleRegistration;
471
472         /**
473          * @ORM\Column(type="string", length=50, nullable=true, name="vci_matchVinorChassis");
474          */
475         protected $vci_matchVinorChassis;
476
477         /**
478          * @ORM\Column(type="string", length=50, nullable=true, name="vci_matchYear");
479          */
480         protected $vci_matchYear;
481
482
483
484         /* ------------------------------------ VehicleValueInfo ------------------------------------ */
485
486
487
488         /**
489          * @ORM\Column(type="integer", nullable=false, name="vvi_guideMonth");
490          */
491         protected $vvi_guideMonth = 0;
492
493         /**
494          * @ORM\Column(type="integer", nullable=false, name="vvi_guideYear");
495          */
496         protected $vvi_guideYear = 0;
497
498         /**
499          * @ORM\Column(type="integer", nullable=false, name="vvi_newListPrice");
500          */
501         protected $vvi_newListPrice = 0;
502
503         /**
504          * @ORM\Column(type="integer", nullable=false, name="vvi_retailPrice");
505          */
506         protected $vvi_retailPrice = 0;
507
508         /**
509          * @ORM\Column(type="integer", nullable=false, name="vvi_tradePrice");
510          */
511         protected $vvi_tradePrice = 0;
512
513         /**
514          * @ORM\Column(type="integer", nullable=false, name="vvi_costPrice");
515          */
516         protected $vvi_costPrice = 0;
517
518         /**
519          * @ORM\Column(type="integer", nullable=false, name="vvi_adjustedRetailPrice_mileageAndCondition");
520          */
521         protected $vvi_adjustedRetailPrice_mileageAndCondition = 0;
522
523         /**
524          * @ORM\Column(type="integer", nullable=false, name="vvi_AdjustedTradePrice_MileageAndCondition");
525          */
526         protected $vvi_AdjustedTradePrice_MileageAndCondition = 0;
527
528         /**
529          * @ORM\Column(type="integer", nullable=false, name="vvi_adjustedRetailPrice");
530          */
531         protected $vvi_adjustedRetailPrice = 0;
532
533         /**
534          * @ORM\Column(type="integer", nullable=false, name="vvi_adjustedTradePrice");
535          */
536         protected $vvi_adjustedTradePrice = 0;
537
538         /**
539          * @ORM\Column(type="integer", nullable=false, name="vvi_estimatedRetailPrice");
540          */
541         protected $vvi_estimatedRetailPrice = 0;
542
543         /**
544          * @ORM\Column(type="integer", nullable=false, name="vvi_estimatedTradePrice");
545          */
546         protected $vvi_estimatedTradePrice = 0;
547
548         /**
549          * @ORM\Column(type="integer", nullable=false, name="vvi_estimatedCostPrice");
550          */
551         protected $vvi_estimatedCostPrice = 0;
552
553         /**
554          * @ORM\Column(type="integer", nullable=false, name="vvi_adjustedEstimatedRetailPrice_mileageAndCondition");
555          */
556         protected $vvi_adjustedEstimatedRetailPrice_mileageAndCondition = 0;
557
558         /**
559          * @ORM\Column(type="integer", nullable=false, name="vvi_adjustedEstimatedTradePrice_mileageAndCondition");
560          */
561         protected $vvi_adjustedEstimatedTradePrice_mileageAndCondition = 0;
562
563         /**
564          * @ORM\Column(type="integer", nullable=false, name="vvi_adjustedEstimatedcostprice_mileageandcondition");
565          */
566         protected $vvi_adjustedEstimatedcostprice_mileageandcondition = 0;
567
568         /**
569          * @ORM\Column(type="integer", nullable=false, name="vvi_adjustedEstimatedRetailPrice");
570          */
571         protected $vvi_adjustedEstimatedRetailPrice = 0;
572
573         /**
574          * @ORM\Column(type="integer", nullable=false, name="vvi_adjustedEstimatedTradePrice");
575          */
576         protected $vvi_adjustedEstimatedTradePrice = 0;
577
578         /**
579          * @ORM\Column(type="integer", nullable=false, name="vvi_adjustedEstimatedCostPrice");
580          */
581         protected $vvi_adjustedEstimatedCostPrice = 0;
582
583
584         /**
585          * @ORM\Column(type="string", length=255, nullable=true, name="vvi_resultCode")
586          */
587         protected $vvi_resultCode;
588
589
590     /**
591      * @ORM\Column(type="string", length=255, nullable=true, name="hpi_type")
592      */
593     protected $hpi_type;
594
595         /* ------------------------------------ Error codes ------------------------------------ */
596
597
598         /**
599          * @ORM\Column(type="integer", nullable=true, name="error_code");
600          */
601         protected $error_code = 0;
602
603
604
605         /* ------------------------------------ Tracking ------------------------------------ */
606
607
608         /**
609          * @ORM\Column(type="datetime", nullable=true);
610          */
611         protected $reset;
612
613         /**
614          * @ORM\Column(type="string", length=25, nullable=true, name="previous_status");
615          */
616         protected $previousState;
617
618         /**
619          * @ORM\Column(type="string", length=25, nullable=true, name="status");
620          */
621         protected $jobState;
622
623         /**
624          * @ORM\Column(type="datetime");
625          */
626         protected $created;
627
628         /**
629          * @ORM\Column(type="datetime", nullable=true);
630          */
631         protected $updated;
632
633         /**
634          * @ORM\Column(type="boolean");
635          */
636         protected $archived = false;
637
638
639
640         /**
641          * Initialize collections.
642          */
643         public function __construct()
644         {
645                 $this->accessories = new \Doctrine\Common\Collections\ArrayCollection();
646                 $this->damages = new \Doctrine\Common\Collections\ArrayCollection();
647         }
648
649
650         /**
651          * Magic getter to expose protected properties.
652          *
653          * @param string $property
654          * @return mixed
655          */
656         public function __get($property)
657         {
658                 return $this->$property;
659         }
660
661         /**
662          * Magic setter to save protected properties.
663          *
664          * @param string $property
665          * @param mixed $value
666          */
667         public function __set($property, $value)
668         {
669                 $this->$property = $value;
670         }
671
672         /**
673          * @ORM\PrePersist
674          */
675         public function setCreateTime()
676         {
677                 if (\Utility\Registry::isAuthenticated())
678                 {
679                         $this->company   = \Utility\Registry::resolveCompanyContext($this->company);
680                         $this->createdBy = \Utility\Registry::resolveProfileContext($this->createdBy);
681                 }
682                 $this->created = new \DateTime("now");
683         }
684
685         /**
686          * @ORM\PreUpdate
687          */
688         public function setUpdateTime()
689         {
690                 $this->updated = new \DateTime("now");
691                 /* if ('' == $this->jobState
692                         && is_null($this->loadedOnPriceGuide))
693                 {
694                         $this->loadedOnPriceGuide = new \DateTime("now");
695                 } */
696         }
697
698
699
700         /**
701          * Convert the object to an array.
702          * @param array $expand
703          * @param array $intersect
704          * @param boolean $showIdentifiers
705          * @param integer $expandAll
706          * @return array
707          */
708         public function toArray(
709                         array $expand = array(), array $intersect = array(),
710                         $showIdentifiers = false, $expandAll = 0
711                         )
712         {
713                 $intersect = array_flip($intersect);
714                 $dateTimeFormat = \Utility\Registry::getConfigParam('DateTimeFormat');
715                 $includeAll = empty($intersect);
716                 $data = array();
717                 ($includeAll || isset($intersect['id']))
718                         && $data['id'] = $this->id;
719
720                 ($includeAll || isset($intersect['company']))
721                         && $data['company'] = (in_array('company', $expand) || $expandAll || $showIdentifiers)
722                                                                         && !is_null($this->company)
723                                 ? (!$showIdentifiers || in_array('company', $expand) ? $this->company->toArray(
724                                                 $expand, $intersect, $showIdentifiers, ($expandAll - 1)
725                                                 ) : $this->company->id)
726                                 : null;
727                 ($includeAll || isset($intersect['createdBy']))
728                         && $data['createdBy'] = (in_array('createdBy', $expand) || $expandAll || $showIdentifiers)
729                                                                         && !is_null($this->createdBy)
730                                 ? (!$showIdentifiers || in_array('createdBy', $expand) ? $this->createdBy->toArray(
731                                                 $expand, $intersect, $showIdentifiers, ($expandAll - 1)
732                                                 ) : $this->createdBy->id)
733                                 : null;
734                 ($includeAll || isset($intersect['valuation']))
735                         && $data['valuation'] = (in_array('valuation_', $expand) || $expandAll || $showIdentifiers)
736                                                                         && !is_null($this->valuation)
737                                 ? (!$showIdentifiers || in_array('valuation_', $expand) ? $this->valuation->toArray(
738                                                 /* $expand, $intersect, $showIdentifiers, ($expandAll - 1) */
739                                                 ) : $this->valuation->id)
740                                 : null;
741
742                 ($includeAll || isset($intersect['priceGuide']))
743                         && $data['priceGuide'] = (in_array('priceGuide', $expand) || $expandAll || $showIdentifiers)
744                                                                         && !is_null($this->priceGuide)
745                                 ? (!$showIdentifiers || in_array('priceGuide', $expand) ? $this->priceGuide->toArray(
746                                                 $expand, $intersect, $showIdentifiers, ($expandAll - 1)
747                                                 ) : $this->priceGuide->id)
748                                 : null;
749
750                 ($includeAll || isset($intersect['auction']))
751                         && $data['auction'] = (in_array('auction', $expand) || $expandAll || $showIdentifiers)
752                                                                         && !is_null($this->auction)
753                         ? (!$showIdentifiers || in_array('auction', $expand) ? $this->auction->toArray(
754                                 $expand, $intersect, $showIdentifiers, ($expandAll - 1)
755                                 ) : $this->auction->id)
756                         : null;
757
758                 ($includeAll || isset($intersect['stock']))
759                         && $data['stock'] = (in_array('stock', $expand) || $expandAll || $showIdentifiers)
760                                                                         && !is_null($this->stock)
761                         ? (!$showIdentifiers || in_array('stock', $expand) ? $this->stock->toArray(
762                                 $expand, $intersect, $showIdentifiers, ($expandAll - 1)
763                                 ) : $this->stock->id)
764                                 : null;
765
766
767                 if (2 == $showIdentifiers)
768                 {
769                         $data['mmCode']   = $this->type->mmCode;
770                         $data['category'] = $this->type->category->id;
771                         $data['make']     = $this->type->model->make->id;
772                         $data['model']    = $this->type->model->id;
773                 }
774
775
776
777
778         /*      ($includeAll || isset($intersect['referenceNumber']))
779                 && $data['referenceNumber'] = $this->referenceNumber; */
780                 ($includeAll || isset($intersect['transactionNumber']))
781                 && $data['transactionNumber'] = $this->transactionNumber;
782
783                 /* ------------------------------------ Finance Information ------------------------------------ */
784
785                 ($includeAll || isset($intersect['f_financeProvider']))
786                 && $data['f_financeProvider'] = $this->f_financeProvider;
787
788
789                 ($includeAll || isset($intersect['f_financeBranch']))
790                 && $data['f_financeBranch'] = $this->f_financeBranch;
791
792                 ($includeAll || isset($intersect['f_agreementOrAccountNumber']))
793                 && $data['f_agreementOrAccountNumber'] = $this->f_agreementOrAccountNumber;
794
795                 ($includeAll || isset($intersect['f_agreementType']))
796                 && $data['f_agreementType'] = $this->f_agreementType;
797
798                 ($includeAll || isset($intersect['f_telephoneNumber']))
799                 && $data['f_telephoneNumber'] = $this->f_telephoneNumber;
800
801                 ($includeAll || isset($intersect['f_resultCode']))
802                 && $data['f_resultCode'] = $this->f_resultCode;
803
804
805                 /* ------------------------------------ Finance History ------------------------------------ */
806
807
808                 ($includeAll || isset($intersect['fh_data']))
809                 && $data['fh_data'] = unserialize($this->fh_data);
810
811
812                 /* ------------------------------------ Accident History ------------------------------------ */
813
814                 ($includeAll || isset($intersect['ah_data']))
815                 && $data['ah_data'] = unserialize($this->ah_data);
816
817
818
819                 /* ------------------------------------ Stolen Information ------------------------------------ */
820
821                 ($includeAll || isset($intersect['si_policeStation']))
822                 && $data['si_policeStation'] = $this->si_policeStation;
823
824                 ($includeAll || isset($intersect['si_caseNumber']))
825                 && $data['si_caseNumber'] = $this->si_caseNumber;
826
827                 ($includeAll || isset($intersect['si_dateStolen']))
828                 && $data['si_dateStolen'] = $this->si_dateStolen;
829
830                 ($includeAll || isset($intersect['si_vinMatch']))
831                 && $data['si_vinMatch'] = $this->si_vinMatch;
832
833                 ($includeAll || isset($intersect['si_engineMatch']))
834                 && $data['si_engineMatch'] = $this->si_engineMatch;
835
836                 ($includeAll || isset($intersect['si_registrationMatch']))
837                 && $data['si_registrationMatch'] = $this->si_registrationMatch;
838
839                 ($includeAll || isset($intersect['si_resultCode']))
840                 && $data['si_resultCode'] = $this->si_resultCode;
841
842
843                 /* ------------------------------------ Alert Information ------------------------------------ */
844
845                 ($includeAll || isset($intersect['ai_company']))
846                 && $data['ai_company'] = $this->ai_company;
847
848                 ($includeAll || isset($intersect['ai_referenceNumber']))
849                 && $data['ai_referenceNumber'] = $this->ai_referenceNumber;
850
851                 ($includeAll || isset($intersect['ai_alertReason']))
852                 && $data['ai_alertReason'] = $this->ai_alertReason;
853
854                 ($includeAll || isset($intersect['ai_telephoneNumber']))
855                 && $data['ai_telephoneNumber'] = $this->ai_telephoneNumber;
856
857                 ($includeAll || isset($intersect['ai_resultCode']))
858                 && $data['ai_resultCode'] = $this->ai_resultCode;
859
860
861                 /* ------------------------------------ IVID History Information ------------------------------------ */
862
863                 ($includeAll || isset($intersect['ivid_responseCode']))
864                 && $data['ivid_responseCode'] = $this->ivid_responseCode;
865
866                 ($includeAll || isset($intersect['ivid_responseDescription']))
867                 && $data['ivid_responseDescription'] = $this->ivid_responseDescription;
868
869                 ($includeAll || isset($intersect['ivid_referenceNumber']))
870                 && $data['ivid_referenceNumber'] = $this->ivid_referenceNumber;
871
872                 ($includeAll || isset($intersect['ivid_contactNumber']))
873                 && $data['ivid_contactNumber'] = $this->ivid_contactNumber;
874
875                 ($includeAll || isset($intersect['ivid_resultCode']))
876                 && $data['ivid_resultCode'] = $this->ivid_resultCode;
877
878
879                 /* ------------------------------------ Microdot Information ------------------------------------ */
880
881                 ($includeAll || isset($intersect['mi_company']))
882                 && $data['mi_company'] = $this->mi_company;
883
884                 ($includeAll || isset($intersect['mi_referenceNumber']))
885                 && $data['mi_referenceNumber'] = $this->mi_referenceNumber;
886
887                 ($includeAll || isset($intersect['mi_contactNumber']))
888                 && $data['mi_contactNumber'] = $this->mi_contactNumber;
889
890                 ($includeAll || isset($intersect['mi_dateApplied']))
891                 && $data['mi_dateApplied'] = $this->mi_dateApplied;
892
893                 ($includeAll || isset($intersect['mi_resultCode']))
894                 && $data['mi_resultCode'] = $this->mi_resultCode;
895
896
897
898                 /* ------------------------------------ VESA Information ------------------------------------ */
899
900                 ($includeAll || isset($intersect['vesa_CertificateNumber']))
901                 && $data['vesa_CertificateNumber'] = $this->vesa_CertificateNumber;
902
903                 ($includeAll || isset($intersect['vesa_dateFitted']))
904                 && $data['vesa_dateFitted'] = $this->vesa_dateFitted;
905
906                 ($includeAll || isset($intersect['vesa_brandName']))
907                 && $data['vesa_brandName'] = $this->vesa_brandName;
908
909                 ($includeAll || isset($intersect['vesa_brandModel']))
910                 && $data['vesa_brandModel'] = $this->vesa_brandModel;
911
912                 ($includeAll || isset($intersect['vesa_deviceDescriptionType']))
913                 && $data['vesa_deviceDescriptionType'] = $this->vesa_deviceDescriptionType;
914
915                 ($includeAll || isset($intersect['vesa_resultCode']))
916                 && $data['vesa_resultCode'] = $this->vesa_resultCode;
917
918
919
920                 /* ------------------------------------ Registration History ------------------------------------ */
921
922                 ($includeAll || isset($intersect['rh_data']))
923                 && $data['rh_data'] = unserialize($this->rh_data);
924
925
926
927                 /* ------------------------------------ Enquiry History ------------------------------------ */
928
929                 ($includeAll || isset($intersect['eh_data']))
930                 && $data['eh_data'] = unserialize($this->eh_data);
931
932
933
934                 /* ------------------------------------ Mileage History ------------------------------------ */
935
936                 ($includeAll || isset($intersect['mh_data']))
937                 && $data['mh_data'] = unserialize($this->mh_data);
938
939
940                 /* ------------------------------------ VehicleOptionCodes ------------------------------------ */
941
942                 ($includeAll || isset($intersect['vc_month']))
943                 && $data['vc_month'] = $this->vc_month;
944
945                 ($includeAll || isset($intersect['vc_year']))
946                 && $data['vc_year'] = $this->vc_year;
947
948                 ($includeAll || isset($intersect['vc_newOptionCode']))
949                 && $data['vc_newOptionCode'] = $this->vc_newOptionCode;
950
951                 ($includeAll || isset($intersect['vc_usedOptionCode']))
952                 && $data['vc_usedOptionCode'] = $this->vc_usedOptionCode;
953
954                 ($includeAll || isset($intersect['vc_maximumRange']))
955                 && $data['vc_maximumRange'] = $this->vc_maximumRange;
956
957                 ($includeAll || isset($intersect['vc_minimunRange']))
958                 && $data['vc_minimunRange'] = $this->vc_minimunRange;
959
960                 ($includeAll || isset($intersect['vc_newPrice']))
961                 && $data['vc_newPrice'] = $this->vc_newPrice;
962
963                 ($includeAll || isset($intersect['vc_retailPrice']))
964                 && $data['vc_retailPrice'] = $this->vc_retailPrice;
965
966                 ($includeAll || isset($intersect['vc_tradePrice']))
967                 && $data['vc_tradePrice'] = $this->vc_tradePrice;
968
969
970                 ($includeAll || isset($intersect['vc_resultCode']))
971                 && $data['vc_resultCode'] = $this->vc_resultCode;
972
973
974
975                 /* ------------------------------------ VehicleConfirmationInfo ------------------------------------ */
976
977                 ($includeAll || isset($intersect['vci_HPINumber']))
978                 && $data['vci_HPINumber'] = $this->vci_HPINumber;
979
980                 ($includeAll || isset($intersect['vci_matchColour']))
981                 && $data['vci_matchColour'] = $this->vci_matchColour;
982
983                 ($includeAll || isset($intersect['vci_matchEngineNumber']))
984                 && $data['vci_matchEngineNumber'] = $this->vci_matchEngineNumber;
985
986                 ($includeAll || isset($intersect['vci_matchManufacturer']))
987                 && $data['vci_matchManufacturer'] = $this->vci_matchManufacturer;
988
989                 ($includeAll || isset($intersect['vci_matchModel']))
990                 && $data['vci_matchModel'] = $this->vci_matchModel;
991
992                 ($includeAll || isset($intersect['vci_matchString']))
993                 && $data['vci_matchString'] = $this->vci_matchString;
994
995                 ($includeAll || isset($intersect['vci_matchVehicleRegistration']))
996                 && $data['vci_matchVehicleRegistration'] = $this->vci_matchVehicleRegistration;
997
998                 ($includeAll || isset($intersect['vci_matchVinorChassis']))
999                 && $data['vci_matchVinorChassis'] = $this->vci_matchVinorChassis;
1000
1001                 ($includeAll || isset($intersect['vci_matchYear']))
1002                 && $data['vci_matchYear'] = $this->vci_matchYear;
1003
1004                 /* ------------------------------------ VehicleValueInfo ------------------------------------ */
1005
1006                 ($includeAll || isset($intersect['vvi_guideMonth']))
1007                 && $data['vvi_guideMonth'] = $this->vvi_guideMonth;
1008
1009                 ($includeAll || isset($intersect['vvi_guideYear']))
1010                 && $data['vvi_guideYear'] = $this->vvi_guideYear;
1011
1012                 ($includeAll || isset($intersect['vvi_newListPrice']))
1013                 && $data['vvi_newListPrice'] = $this->vvi_newListPrice;
1014
1015                 ($includeAll || isset($intersect['vvi_retailPrice']))
1016                 && $data['vvi_retailPrice'] = $this->vvi_retailPrice;
1017
1018                 ($includeAll || isset($intersect['vvi_tradePrice']))
1019                 && $data['vvi_tradePrice'] = $this->vvi_tradePrice;
1020
1021                 ($includeAll || isset($intersect['vvi_costPrice']))
1022                 && $data['vvi_costPrice'] = $this->vvi_costPrice;
1023
1024                 ($includeAll || isset($intersect['vvi_adjustedRetailPrice_mileageAndCondition']))
1025                 && $data['vvi_adjustedRetailPrice_mileageAndCondition'] = $this->vvi_adjustedRetailPrice_mileageAndCondition;
1026
1027                 ($includeAll || isset($intersect['vvi_AdjustedTradePrice_MileageAndCondition']))
1028                 && $data['vvi_AdjustedTradePrice_MileageAndCondition'] = $this->vvi_AdjustedTradePrice_MileageAndCondition;
1029
1030                 ($includeAll || isset($intersect['vvi_adjustedRetailPrice']))
1031                 && $data['vvi_adjustedRetailPrice'] = $this->vvi_adjustedRetailPrice;
1032
1033                 ($includeAll || isset($intersect['vvi_adjustedTradePrice']))
1034                 && $data['vvi_adjustedTradePrice'] = $this->vvi_adjustedTradePrice;
1035
1036                 ($includeAll || isset($intersect['vvi_estimatedRetailPrice']))
1037                 && $data['vvi_estimatedRetailPrice'] = $this->vvi_estimatedRetailPrice;
1038
1039                 ($includeAll || isset($intersect['vvi_estimatedTradePrice']))
1040                 && $data['vvi_estimatedTradePrice'] = $this->vvi_estimatedTradePrice;
1041
1042                 ($includeAll || isset($intersect['vvi_estimatedCostPrice']))
1043                 && $data['vvi_estimatedCostPrice'] = $this->vvi_estimatedCostPrice;
1044
1045                 ($includeAll || isset($intersect['vvi_adjustedEstimatedRetailPrice_mileageAndCondition']))
1046                 && $data['vvi_adjustedEstimatedRetailPrice_mileageAndCondition'] = $this->vvi_adjustedEstimatedRetailPrice_mileageAndCondition;
1047
1048                 ($includeAll || isset($intersect['vvi_adjustedEstimatedTradePrice_mileageAndCondition']))
1049                 && $data['vvi_adjustedEstimatedTradePrice_mileageAndCondition'] = $this->vvi_adjustedEstimatedTradePrice_mileageAndCondition;
1050
1051                 ($includeAll || isset($intersect['vvi_adjustedEstimatedcostprice_mileageandcondition']))
1052                 && $data['vvi_adjustedEstimatedcostprice_mileageandcondition'] = $this->vvi_adjustedEstimatedcostprice_mileageandcondition;
1053
1054                 ($includeAll || isset($intersect['vvi_adjustedEstimatedRetailPrice']))
1055                 && $data['vvi_adjustedEstimatedRetailPrice'] = $this->vvi_adjustedEstimatedRetailPrice;
1056
1057                 ($includeAll || isset($intersect['vvi_adjustedEstimatedTradePrice']))
1058                 && $data['vvi_adjustedEstimatedTradePrice'] = $this->vvi_adjustedEstimatedTradePrice;
1059
1060                 ($includeAll || isset($intersect['vvi_adjustedEstimatedCostPrice']))
1061                 && $data['vvi_adjustedEstimatedCostPrice'] = $this->vvi_adjustedEstimatedCostPrice;
1062
1063                 ($includeAll || isset($intersect['vvi_resultCode']))
1064                 && $data['vvi_resultCode'] = $this->vvi_resultCode;
1065
1066         ($includeAll || isset($intersect['hpi_type']))
1067         && $data['hpi_type'] = $this->hpi_type;
1068
1069                 /* ------------------------------------ Error codes ------------------------------------ */
1070
1071                 ($includeAll || isset($intersect['error_code']))
1072                 && $data['error_code'] = $this->error_code;
1073
1074                 ($includeAll || isset($intersect['jobState']))
1075                         && $data['jobState'] = $this->jobState;
1076
1077                 ($includeAll || isset($intersect['created']))
1078                         && $data['created'] = !is_null($this->created)
1079                                 ? $this->created->format($dateTimeFormat)
1080                                 : null;
1081                 ($includeAll || isset($intersect['updated']))
1082                         && $data['updated'] = !is_null($this->updated)
1083                                 ? $this->updated->format($dateTimeFormat)
1084                                 : null;
1085                 ($includeAll || isset($intersect['reset']))
1086                         && $data['reset'] = !is_null($this->reset)
1087                                 ? $this->reset->format($dateTimeFormat)
1088                                 : null;
1089                 return $data;
1090         }
1091
1092         /**
1093          * Internal utility to change accessories collection into array.
1094          * @param boolean $showIdentifiers
1095          * @return array
1096          */
1097         public function accessoriesToArray($showIdentifiers = false)
1098         {
1099                 $data = array();
1100                 $iterator = $this->accessories->getIterator();
1101                 if (2 == $showIdentifiers)
1102                 {
1103                         foreach ($iterator as $accessory)
1104                         {
1105                                 $data[] = $accessory->accessory->id;
1106                         }
1107                 }
1108                 else
1109                 {
1110                         foreach ($iterator as $accessory)
1111                         {
1112                                 $data[] = $showIdentifiers
1113                                         ? array('id' => $accessory->accessory->id)
1114                                         : $accessory->toArray();
1115                         }
1116                 }
1117                 return $data;
1118         }
1119
1120         /**
1121          * Internal utility to change damages collection into array.
1122          * @param boolean $showIdentifiers
1123          * @return array
1124          */
1125         public function damagesToArray($showIdentifiers = false)
1126         {
1127                 $data = array();
1128                 $iterator = $this->damages->getIterator();
1129                 foreach ($iterator as $damage)
1130                 {
1131                         $data[] = $damage->toArray(array(), array(), $showIdentifiers);
1132                 }
1133                 return $data;
1134         }
1135
1136         /**
1137          * Populate from an array.
1138          * @param array $data
1139          */
1140         public function fromArray($data = array())
1141         {
1142                 isset($data['id'])
1143                         && $this->id = $data['id'];
1144                 isset($data['company'])
1145                         && $this->company = $data['company'];
1146
1147                 isset($data['createdBy'])
1148                         && $this->createdBy = $data['createdBy'];
1149
1150                 isset($data['valuation'])
1151                 && $this->valuation = $data['valuation'];
1152
1153                 isset($data['priceGuide'])
1154                 && $this->priceGuide = $data['priceGuide'];
1155
1156                 isset($data['auction'])
1157                 && $this->auction = $data['auction'];
1158
1159                 isset($data['stock'])
1160                 && $this->stock = $data['stock'];
1161
1162                 isset($data['transactionNumber'])
1163                 && $this->transactionNumber = $data['transactionNumber'];
1164
1165
1166                 /* ------------------------------------ Finance Information ------------------------------------ */
1167
1168                 isset($data['f_financeProvider'])
1169                 && $this->f_financeProvider = $data['f_financeProvider'];
1170
1171                 isset($data['f_financeBranch'])
1172                 && $this->f_financeBranch = $data['f_financeBranch'];
1173
1174                 isset($data['f_agreementOrAccountNumber'])
1175                 && $this->f_agreementOrAccountNumber = $data['f_agreementOrAccountNumber'];
1176
1177                 isset($data['f_agreementType'])
1178                 && $this->f_agreementType = $data['f_agreementType'];
1179
1180                 isset($data['f_telephoneNumber'])
1181                 && $this->f_telephoneNumber = $data['f_telephoneNumber'];
1182
1183                 isset($data['f_resultCode'])
1184                 && $this->f_resultCode = $data['f_resultCode'];
1185
1186
1187
1188
1189                 /* ------------------------------------ Finance History ------------------------------------ */
1190
1191
1192                 isset($data['fh_data'])
1193                 && $this->fh_data = is_array($data['fh_data'])
1194                         ? serialize($data['fh_data'])
1195                         : serialize(array());
1196
1197
1198
1199                 /* ------------------------------------ Accident History ------------------------------------ */
1200
1201                 isset($data['ah_data'])
1202                 && $this->ah_data = is_array($data['ah_data'])
1203                         ? serialize($data['ah_data'])
1204                         : serialize(array());
1205
1206
1207                 /* ------------------------------------ Stolen Information ------------------------------------ */
1208
1209                 isset($data['si_policeStation'])
1210                 && $this->si_policeStation = $data['si_policeStation'];
1211
1212                 isset($data['si_caseNumber'])
1213                 && $this->si_caseNumber = $data['si_caseNumber'];
1214
1215                 isset($data['si_dateStolen'])
1216                 && $this->si_dateStolen = $data['si_dateStolen'];
1217
1218                 isset($data['si_vinMatch'])
1219                 && $this->si_vinMatch = $data['si_vinMatch'];
1220
1221                 isset($data['si_engineMatch'])
1222                 && $this->si_engineMatch = $data['si_engineMatch'];
1223
1224                 isset($data['si_registrationMatch'])
1225                 && $this->si_registrationMatch = $data['si_registrationMatch'];
1226
1227                 isset($data['si_resultCode'])
1228                 && $this->si_resultCode = $data['si_resultCode'];
1229
1230
1231                 /* ------------------------------------ Alert Information ------------------------------------ */
1232
1233                 isset($data['ai_company'])
1234                 && $this->ai_company = $data['ai_company'];
1235
1236                 isset($data['ai_referenceNumber'])
1237                 && $this->ai_referenceNumber = $data['ai_referenceNumber'];
1238
1239                 isset($data['ai_alertReason'])
1240                 && $this->ai_alertReason = $data['ai_alertReason'];
1241
1242                 isset($data['ai_telephoneNumber'])
1243                 && $this->ai_telephoneNumber = $data['ai_telephoneNumber'];
1244
1245                 isset($data['ai_resultCode'])
1246                 && $this->ai_resultCode = $data['ai_resultCode'];
1247
1248                 /* ------------------------------------ IVID History Information ------------------------------------ */
1249
1250                 isset($data['ivid_responseCode'])
1251                 && $this->ivid_responseCode = $data['ivid_responseCode'];
1252
1253                 isset($data['ivid_responseDescription'])
1254                 && $this->ivid_responseDescription = $data['ivid_responseDescription'];
1255
1256                 isset($data['ivid_referenceNumber'])
1257                 && $this->ivid_referenceNumber = $data['ivid_referenceNumber'];
1258
1259                 isset($data['ivid_contactNumber'])
1260                 && $this->ivid_contactNumber = $data['ivid_contactNumber'];
1261
1262                 isset($data['ivid_resultCode'])
1263                 && $this->ivid_resultCode = $data['ivid_resultCode'];
1264
1265                 /* ------------------------------------ Microdot Information ------------------------------------ */
1266
1267                 isset($data['mi_company'])
1268                 && $this->mi_company = $data['mi_company'];
1269
1270                 isset($data['mi_referenceNumber'])
1271                 && $this->mi_referenceNumber = $data['mi_referenceNumber'];
1272
1273                 isset($data['mi_contactNumber'])
1274                 && $this->mi_contactNumber = $data['mi_contactNumber'];
1275
1276                 isset($data['mi_dateApplied'])
1277                 && $this->mi_dateApplied = $data['mi_dateApplied'];
1278
1279                 isset($data['mi_resultCode'])
1280                 && $this->mi_resultCode = $data['mi_resultCode'];
1281
1282
1283
1284                 /* ------------------------------------ VESA Information ------------------------------------ */
1285
1286                 isset($data['vesa_CertificateNumber'])
1287                 && $this->vesa_CertificateNumber = $data['vesa_CertificateNumber'];
1288
1289                 isset($data['vesa_dateFitted'])
1290                 && $this->vesa_dateFitted = $data['vesa_dateFitted'];
1291
1292                 isset($data['vesa_brandName'])
1293                 && $this->vesa_brandName = $data['vesa_brandName'];
1294
1295                 isset($data['vesa_brandModel'])
1296                 && $this->vesa_brandModel = $data['vesa_brandModel'];
1297
1298                 isset($data['vesa_deviceDescriptionType'])
1299                 && $this->vesa_deviceDescriptionType = $data['vesa_deviceDescriptionType'];
1300
1301                 isset($data['vesa_resultCode'])
1302                 && $this->vesa_resultCode = $data['vesa_resultCode'];
1303
1304
1305                 /* ------------------------------------ Registration History ------------------------------------ */
1306
1307                 isset($data['rh_data'])
1308                 && $this->rh_data = is_array($data['rh_data'])
1309                         ? serialize($data['rh_data'])
1310                         : serialize(array());
1311
1312
1313                 /* ------------------------------------ Enquiry History ------------------------------------ */
1314
1315                 isset($data['eh_data'])
1316                 && $this->eh_data = is_array($data['eh_data'])
1317                         ? serialize($data['eh_data'])
1318                         : serialize(array());
1319
1320
1321                 /* ------------------------------------ Mileage History ------------------------------------ */
1322
1323                 isset($data['mh_data'])
1324                 && $this->mh_data = is_array($data['mh_data'])
1325                         ? serialize($data['mh_data'])
1326                         : serialize(array());
1327
1328
1329                 /* ------------------------------------ VehicleOptionCodes ------------------------------------ */
1330
1331                 isset($data['vc_month'])
1332                 && $this->vc_month = $data['vc_month'];
1333
1334                 isset($data['vc_year'])
1335                 && $this->vc_year = $data['vc_year'];
1336
1337                 isset($data['vc_newOptionCode'])
1338                 && $this->vc_newOptionCode = $data['vc_newOptionCode'];
1339
1340                 isset($data['vc_usedOptionCode'])
1341                 && $this->vc_usedOptionCode = $data['vc_usedOptionCode'];
1342
1343                 isset($data['vc_maximumRange'])
1344                 && $this->vc_maximumRange = $data['vc_maximumRange'];
1345
1346                 isset($data['vc_minimunRange'])
1347                 && $this->vc_minimunRange = $data['vc_minimunRange'];
1348
1349                 isset($data['vc_newPrice'])
1350                 && $this->vc_newPrice = $data['vc_newPrice'];
1351
1352                 isset($data['vc_retailPrice'])
1353                 && $this->vc_retailPrice = $data['vc_retailPrice'];
1354
1355                 isset($data['vc_tradePrice'])
1356                 && $this->vc_tradePrice = $data['vc_tradePrice'];
1357
1358                 isset($data['vc_resultCode'])
1359                 && $this->vc_resultCode = $data['vc_resultCode'];
1360
1361
1362                 /* ------------------------------------ VehicleConfirmationInfo ------------------------------------ */
1363
1364                 isset($data['vci_HPINumber'])
1365                 && $this->vci_HPINumber = $data['vci_HPINumber'];
1366
1367                 isset($data['vci_matchColour'])
1368                 && $this->vci_matchColour = $data['vci_matchColour'];
1369
1370                 isset($data['vci_matchEngineNumber'])
1371                 && $this->vci_matchEngineNumber = $data['vci_matchEngineNumber'];
1372
1373                 isset($data['vci_matchManufacturer'])
1374                 && $this->vci_matchManufacturer = $data['vci_matchManufacturer'];
1375
1376                 isset($data['vci_matchModel'])
1377                 && $this->vci_matchModel = $data['vci_matchModel'];
1378
1379                 isset($data['vci_matchString'])
1380                 && $this->vci_matchString = $data['vci_matchString'];
1381
1382                 isset($data['vci_matchVehicleRegistration'])
1383                 && $this->vci_matchVehicleRegistration = $data['vci_matchVehicleRegistration'];
1384
1385                 isset($data['vci_matchVinorChassis'])
1386                 && $this->vci_matchVinorChassis = $data['vci_matchVinorChassis'];
1387
1388                 isset($data['vci_matchYear'])
1389                 && $this->vci_matchYear = $data['vci_matchYear'];
1390
1391
1392                 /* ------------------------------------ VehicleValueInfo ------------------------------------ */
1393
1394                 isset($data['vvi_guideMonth'])
1395                 && $this->vvi_guideMonth = $data['vvi_guideMonth'];
1396
1397                 isset($data['vvi_guideYear'])
1398                 && $this->vvi_guideYear = $data['vvi_guideYear'];
1399
1400                 isset($data['vvi_newListPrice'])
1401                 && $this->vvi_newListPrice = $data['vvi_newListPrice'];
1402
1403                 isset($data['vvi_retailPrice'])
1404                 && $this->vvi_retailPrice = $data['vvi_retailPrice'];
1405
1406                 isset($data['vvi_tradePrice'])
1407                 && $this->vvi_tradePrice = $data['vvi_tradePrice'];
1408
1409                 isset($data['vvi_costPrice'])
1410                 && $this->vvi_costPrice = $data['vvi_costPrice'];
1411
1412                 isset($data['vvi_adjustedRetailPrice_mileageAndCondition'])
1413                 && $this->vvi_adjustedRetailPrice_mileageAndCondition = $data['vvi_adjustedRetailPrice_mileageAndCondition'];
1414
1415                 isset($data['vvi_AdjustedTradePrice_MileageAndCondition'])
1416                 && $this->vvi_AdjustedTradePrice_MileageAndCondition = $data['vvi_AdjustedTradePrice_MileageAndCondition'];
1417
1418                 isset($data['vvi_adjustedRetailPrice'])
1419                 && $this->vvi_adjustedRetailPrice = $data['vvi_adjustedRetailPrice'];
1420
1421                 isset($data['vvi_adjustedTradePrice'])
1422                 && $this->vvi_adjustedTradePrice = $data['vvi_adjustedTradePrice'];
1423
1424                 isset($data['vvi_estimatedRetailPrice'])
1425                 && $this->vvi_estimatedRetailPrice = $data['vvi_estimatedRetailPrice'];
1426
1427                 isset($data['vvi_estimatedTradePrice'])
1428                 && $this->vvi_estimatedTradePrice = $data['vvi_estimatedTradePrice'];
1429
1430                 isset($data['vvi_estimatedCostPrice'])
1431                 && $this->vvi_estimatedCostPrice = $data['vvi_estimatedCostPrice'];
1432
1433                 isset($data['vvi_adjustedEstimatedRetailPrice_mileageAndCondition'])
1434                 && $this->vvi_adjustedEstimatedRetailPrice_mileageAndCondition = $data['vvi_adjustedEstimatedRetailPrice_mileageAndCondition'];
1435
1436                 isset($data['vvi_adjustedEstimatedTradePrice_mileageAndCondition'])
1437                 && $this->vvi_adjustedEstimatedTradePrice_mileageAndCondition = $data['vvi_adjustedEstimatedTradePrice_mileageAndCondition'];
1438
1439                 isset($data['vvi_adjustedEstimatedcostprice_mileageandcondition'])
1440                 && $this->vvi_adjustedEstimatedcostprice_mileageandcondition = $data['vvi_adjustedEstimatedcostprice_mileageandcondition'];
1441
1442                 isset($data['vvi_adjustedEstimatedRetailPrice'])
1443                 && $this->vvi_adjustedEstimatedRetailPrice = $data['vvi_adjustedEstimatedRetailPrice'];
1444
1445                 isset($data['vvi_adjustedEstimatedTradePrice'])
1446                 && $this->vvi_adjustedEstimatedTradePrice = $data['vvi_adjustedEstimatedTradePrice'];
1447
1448                 isset($data['vvi_adjustedEstimatedCostPrice'])
1449                 && $this->vvi_adjustedEstimatedCostPrice = $data['vvi_adjustedEstimatedCostPrice'];
1450
1451                 isset($data['vvi_resultCode'])
1452                 && $this->vvi_resultCode = $data['vvi_resultCode'];
1453
1454         isset($data['hpi_type'])
1455         && $this->hpi_type = $data['hpi_type'];
1456
1457                 /* ------------------------------------ Error codes ------------------------------------ */
1458                 isset($data['error_code'])
1459                 && $this->error_code = $data['error_code'];
1460
1461
1462
1463         }
1464
1465
1466 }
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513