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 RedirectPaymentProduct840SpecificInput extends AbstractRedirectPaymentProduct840SpecificInput
14: {
15: /**
16: * @var string|null
17: *
18: * @deprecated Use Order.references.descriptor instead
19: */
20: public ?string $custom = null;
21:
22: /**
23: * @var bool|null
24: */
25: public ?bool $isShortcut = null;
26:
27: /**
28: * @return object
29: */
30: public function toObject(): object
31: {
32: $object = parent::toObject();
33: if (!is_null($this->custom)) {
34: $object->custom = $this->custom;
35: }
36: if (!is_null($this->isShortcut)) {
37: $object->isShortcut = $this->isShortcut;
38: }
39: return $object;
40: }
41:
42: /**
43: * @param object $object
44: *
45: * @return $this
46: * @throws UnexpectedValueException
47: */
48: public function fromObject(object $object): RedirectPaymentProduct840SpecificInput
49: {
50: parent::fromObject($object);
51: if (property_exists($object, 'custom')) {
52: $this->custom = $object->custom;
53: }
54: if (property_exists($object, 'isShortcut')) {
55: $this->isShortcut = $object->isShortcut;
56: }
57: return $this;
58: }
59: }
60: