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 PaymentCreationOutput extends PaymentCreationReferences
14: {
15: /**
16: * @var bool|null
17: */
18: public ?bool $isCheckedRememberMe = null;
19:
20: /**
21: * @var bool|null
22: */
23: public ?bool $isNewToken = null;
24:
25: /**
26: * @var string|null
27: */
28: public ?string $token = null;
29:
30: /**
31: * @var bool|null
32: */
33: public ?bool $tokenizationSucceeded = null;
34:
35: /**
36: * @return object
37: */
38: public function toObject(): object
39: {
40: $object = parent::toObject();
41: if (!is_null($this->isCheckedRememberMe)) {
42: $object->isCheckedRememberMe = $this->isCheckedRememberMe;
43: }
44: if (!is_null($this->isNewToken)) {
45: $object->isNewToken = $this->isNewToken;
46: }
47: if (!is_null($this->token)) {
48: $object->token = $this->token;
49: }
50: if (!is_null($this->tokenizationSucceeded)) {
51: $object->tokenizationSucceeded = $this->tokenizationSucceeded;
52: }
53: return $object;
54: }
55:
56: /**
57: * @param object $object
58: *
59: * @return $this
60: * @throws UnexpectedValueException
61: */
62: public function fromObject(object $object): PaymentCreationOutput
63: {
64: parent::fromObject($object);
65: if (property_exists($object, 'isCheckedRememberMe')) {
66: $this->isCheckedRememberMe = $object->isCheckedRememberMe;
67: }
68: if (property_exists($object, 'isNewToken')) {
69: $this->isNewToken = $object->isNewToken;
70: }
71: if (property_exists($object, 'token')) {
72: $this->token = $object->token;
73: }
74: if (property_exists($object, 'tokenizationSucceeded')) {
75: $this->tokenizationSucceeded = $object->tokenizationSucceeded;
76: }
77: return $this;
78: }
79: }
80: