1: <?php
2: /*
3: * This file was automatically generated.
4: */
5: namespace Worldline\Acquiring\Sdk\V1\Domain;
6:
7: use UnexpectedValueException;
8: use Worldline\Acquiring\Sdk\Domain\DataObject;
9:
10: /**
11: * @package Worldline\Acquiring\Sdk\V1\Domain
12: */
13: class PaymentReferences extends DataObject
14: {
15: /**
16: * @var string
17: */
18: public $dynamicDescriptor = null;
19:
20: /**
21: * @var string
22: */
23: public $merchantReference = null;
24:
25: /**
26: * @var string
27: */
28: public $retrievalReferenceNumber = null;
29:
30: /**
31: * @return object
32: */
33: public function toObject()
34: {
35: $object = parent::toObject();
36: if (!is_null($this->dynamicDescriptor)) {
37: $object->dynamicDescriptor = $this->dynamicDescriptor;
38: }
39: if (!is_null($this->merchantReference)) {
40: $object->merchantReference = $this->merchantReference;
41: }
42: if (!is_null($this->retrievalReferenceNumber)) {
43: $object->retrievalReferenceNumber = $this->retrievalReferenceNumber;
44: }
45: return $object;
46: }
47:
48: /**
49: * @param object $object
50: * @return $this
51: * @throws UnexpectedValueException
52: */
53: public function fromObject($object)
54: {
55: parent::fromObject($object);
56: if (property_exists($object, 'dynamicDescriptor')) {
57: $this->dynamicDescriptor = $object->dynamicDescriptor;
58: }
59: if (property_exists($object, 'merchantReference')) {
60: $this->merchantReference = $object->merchantReference;
61: }
62: if (property_exists($object, 'retrievalReferenceNumber')) {
63: $this->retrievalReferenceNumber = $object->retrievalReferenceNumber;
64: }
65: return $this;
66: }
67: }
68: