1: <?php
2: /*
3: * This class was auto-generated from the API references found at
4: * https://apireference.connect.worldline-solutions.com/
5: */
6: namespace Worldline\Connect\Sdk\V1\Domain;
7:
8: use UnexpectedValueException;
9:
10: /**
11: * @package Worldline\Connect\Sdk\V1\Domain
12: */
13: class RiskAssessmentCard extends RiskAssessment
14: {
15: /**
16: * @var Card
17: */
18: public $card = null;
19:
20: /**
21: * @return object
22: */
23: public function toObject()
24: {
25: $object = parent::toObject();
26: if (!is_null($this->card)) {
27: $object->card = $this->card->toObject();
28: }
29: return $object;
30: }
31:
32: /**
33: * @param object $object
34: * @return $this
35: * @throws UnexpectedValueException
36: */
37: public function fromObject($object)
38: {
39: parent::fromObject($object);
40: if (property_exists($object, 'card')) {
41: if (!is_object($object->card)) {
42: throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object');
43: }
44: $value = new Card();
45: $this->card = $value->fromObject($object->card);
46: }
47: return $this;
48: }
49: }
50: