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 RedirectPaymentMethodSpecificOutput extends AbstractPaymentMethodSpecificOutput
14: {
15: /**
16: * @var BankAccountBban
17: */
18: public $bankAccountBban = null;
19:
20: /**
21: * @var BankAccountIban
22: */
23: public $bankAccountIban = null;
24:
25: /**
26: * @var string
27: */
28: public $bic = null;
29:
30: /**
31: * @var FraudResults
32: */
33: public $fraudResults = null;
34:
35: /**
36: * @var PaymentProduct3201SpecificOutput
37: */
38: public $paymentProduct3201SpecificOutput = null;
39:
40: /**
41: * @var PaymentProduct806SpecificOutput
42: */
43: public $paymentProduct806SpecificOutput = null;
44:
45: /**
46: * @var PaymentProduct836SpecificOutput
47: */
48: public $paymentProduct836SpecificOutput = null;
49:
50: /**
51: * @var PaymentProduct840SpecificOutput
52: */
53: public $paymentProduct840SpecificOutput = null;
54:
55: /**
56: * @var string
57: */
58: public $token = null;
59:
60: /**
61: * @return object
62: */
63: public function toObject()
64: {
65: $object = parent::toObject();
66: if (!is_null($this->bankAccountBban)) {
67: $object->bankAccountBban = $this->bankAccountBban->toObject();
68: }
69: if (!is_null($this->bankAccountIban)) {
70: $object->bankAccountIban = $this->bankAccountIban->toObject();
71: }
72: if (!is_null($this->bic)) {
73: $object->bic = $this->bic;
74: }
75: if (!is_null($this->fraudResults)) {
76: $object->fraudResults = $this->fraudResults->toObject();
77: }
78: if (!is_null($this->paymentProduct3201SpecificOutput)) {
79: $object->paymentProduct3201SpecificOutput = $this->paymentProduct3201SpecificOutput->toObject();
80: }
81: if (!is_null($this->paymentProduct806SpecificOutput)) {
82: $object->paymentProduct806SpecificOutput = $this->paymentProduct806SpecificOutput->toObject();
83: }
84: if (!is_null($this->paymentProduct836SpecificOutput)) {
85: $object->paymentProduct836SpecificOutput = $this->paymentProduct836SpecificOutput->toObject();
86: }
87: if (!is_null($this->paymentProduct840SpecificOutput)) {
88: $object->paymentProduct840SpecificOutput = $this->paymentProduct840SpecificOutput->toObject();
89: }
90: if (!is_null($this->token)) {
91: $object->token = $this->token;
92: }
93: return $object;
94: }
95:
96: /**
97: * @param object $object
98: * @return $this
99: * @throws UnexpectedValueException
100: */
101: public function fromObject($object)
102: {
103: parent::fromObject($object);
104: if (property_exists($object, 'bankAccountBban')) {
105: if (!is_object($object->bankAccountBban)) {
106: throw new UnexpectedValueException('value \'' . print_r($object->bankAccountBban, true) . '\' is not an object');
107: }
108: $value = new BankAccountBban();
109: $this->bankAccountBban = $value->fromObject($object->bankAccountBban);
110: }
111: if (property_exists($object, 'bankAccountIban')) {
112: if (!is_object($object->bankAccountIban)) {
113: throw new UnexpectedValueException('value \'' . print_r($object->bankAccountIban, true) . '\' is not an object');
114: }
115: $value = new BankAccountIban();
116: $this->bankAccountIban = $value->fromObject($object->bankAccountIban);
117: }
118: if (property_exists($object, 'bic')) {
119: $this->bic = $object->bic;
120: }
121: if (property_exists($object, 'fraudResults')) {
122: if (!is_object($object->fraudResults)) {
123: throw new UnexpectedValueException('value \'' . print_r($object->fraudResults, true) . '\' is not an object');
124: }
125: $value = new FraudResults();
126: $this->fraudResults = $value->fromObject($object->fraudResults);
127: }
128: if (property_exists($object, 'paymentProduct3201SpecificOutput')) {
129: if (!is_object($object->paymentProduct3201SpecificOutput)) {
130: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3201SpecificOutput, true) . '\' is not an object');
131: }
132: $value = new PaymentProduct3201SpecificOutput();
133: $this->paymentProduct3201SpecificOutput = $value->fromObject($object->paymentProduct3201SpecificOutput);
134: }
135: if (property_exists($object, 'paymentProduct806SpecificOutput')) {
136: if (!is_object($object->paymentProduct806SpecificOutput)) {
137: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct806SpecificOutput, true) . '\' is not an object');
138: }
139: $value = new PaymentProduct806SpecificOutput();
140: $this->paymentProduct806SpecificOutput = $value->fromObject($object->paymentProduct806SpecificOutput);
141: }
142: if (property_exists($object, 'paymentProduct836SpecificOutput')) {
143: if (!is_object($object->paymentProduct836SpecificOutput)) {
144: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct836SpecificOutput, true) . '\' is not an object');
145: }
146: $value = new PaymentProduct836SpecificOutput();
147: $this->paymentProduct836SpecificOutput = $value->fromObject($object->paymentProduct836SpecificOutput);
148: }
149: if (property_exists($object, 'paymentProduct840SpecificOutput')) {
150: if (!is_object($object->paymentProduct840SpecificOutput)) {
151: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct840SpecificOutput, true) . '\' is not an object');
152: }
153: $value = new PaymentProduct840SpecificOutput();
154: $this->paymentProduct840SpecificOutput = $value->fromObject($object->paymentProduct840SpecificOutput);
155: }
156: if (property_exists($object, 'token')) {
157: $this->token = $object->token;
158: }
159: return $this;
160: }
161: }
162: