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: use Worldline\Connect\Sdk\Domain\DataObject;
10:
11: /**
12: * @package Worldline\Connect\Sdk\V1\Domain
13: */
14: class ResultDoRiskAssessment extends DataObject
15: {
16: /**
17: * @var string
18: */
19: public $category = null;
20:
21: /**
22: * @var string
23: */
24: public $result = null;
25:
26: /**
27: * @var RetailDecisionsCCFraudCheckOutput
28: */
29: public $retaildecisionsCCFraudCheckOutput = null;
30:
31: /**
32: * @var ValidationBankAccountOutput
33: */
34: public $validationBankAccountOutput = null;
35:
36: /**
37: * @return object
38: */
39: public function toObject()
40: {
41: $object = parent::toObject();
42: if (!is_null($this->category)) {
43: $object->category = $this->category;
44: }
45: if (!is_null($this->result)) {
46: $object->result = $this->result;
47: }
48: if (!is_null($this->retaildecisionsCCFraudCheckOutput)) {
49: $object->retaildecisionsCCFraudCheckOutput = $this->retaildecisionsCCFraudCheckOutput->toObject();
50: }
51: if (!is_null($this->validationBankAccountOutput)) {
52: $object->validationBankAccountOutput = $this->validationBankAccountOutput->toObject();
53: }
54: return $object;
55: }
56:
57: /**
58: * @param object $object
59: * @return $this
60: * @throws UnexpectedValueException
61: */
62: public function fromObject($object)
63: {
64: parent::fromObject($object);
65: if (property_exists($object, 'category')) {
66: $this->category = $object->category;
67: }
68: if (property_exists($object, 'result')) {
69: $this->result = $object->result;
70: }
71: if (property_exists($object, 'retaildecisionsCCFraudCheckOutput')) {
72: if (!is_object($object->retaildecisionsCCFraudCheckOutput)) {
73: throw new UnexpectedValueException('value \'' . print_r($object->retaildecisionsCCFraudCheckOutput, true) . '\' is not an object');
74: }
75: $value = new RetailDecisionsCCFraudCheckOutput();
76: $this->retaildecisionsCCFraudCheckOutput = $value->fromObject($object->retaildecisionsCCFraudCheckOutput);
77: }
78: if (property_exists($object, 'validationBankAccountOutput')) {
79: if (!is_object($object->validationBankAccountOutput)) {
80: throw new UnexpectedValueException('value \'' . print_r($object->validationBankAccountOutput, true) . '\' is not an object');
81: }
82: $value = new ValidationBankAccountOutput();
83: $this->validationBankAccountOutput = $value->fromObject($object->validationBankAccountOutput);
84: }
85: return $this;
86: }
87: }
88: