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 PaymentReferences extends DataObject
15: {
16: /**
17: * @var string|null
18: */
19: public ?string $merchantCaptureReference = null;
20:
21: /**
22: * @var int|null
23: */
24: public ?int $merchantOrderId = null;
25:
26: /**
27: * @var string|null
28: */
29: public ?string $merchantReference = null;
30:
31: /**
32: * @var string|null
33: */
34: public ?string $paymentReference = null;
35:
36: /**
37: * @var string|null
38: */
39: public ?string $providerId = null;
40:
41: /**
42: * @var string|null
43: */
44: public ?string $providerMerchantId = null;
45:
46: /**
47: * @var string|null
48: */
49: public ?string $providerReference = null;
50:
51: /**
52: * @var string|null
53: */
54: public ?string $referenceOrigPayment = null;
55:
56: /**
57: * @return object
58: */
59: public function toObject(): object
60: {
61: $object = parent::toObject();
62: if (!is_null($this->merchantCaptureReference)) {
63: $object->merchantCaptureReference = $this->merchantCaptureReference;
64: }
65: if (!is_null($this->merchantOrderId)) {
66: $object->merchantOrderId = $this->merchantOrderId;
67: }
68: if (!is_null($this->merchantReference)) {
69: $object->merchantReference = $this->merchantReference;
70: }
71: if (!is_null($this->paymentReference)) {
72: $object->paymentReference = $this->paymentReference;
73: }
74: if (!is_null($this->providerId)) {
75: $object->providerId = $this->providerId;
76: }
77: if (!is_null($this->providerMerchantId)) {
78: $object->providerMerchantId = $this->providerMerchantId;
79: }
80: if (!is_null($this->providerReference)) {
81: $object->providerReference = $this->providerReference;
82: }
83: if (!is_null($this->referenceOrigPayment)) {
84: $object->referenceOrigPayment = $this->referenceOrigPayment;
85: }
86: return $object;
87: }
88:
89: /**
90: * @param object $object
91: *
92: * @return $this
93: * @throws UnexpectedValueException
94: */
95: public function fromObject(object $object): PaymentReferences
96: {
97: parent::fromObject($object);
98: if (property_exists($object, 'merchantCaptureReference')) {
99: $this->merchantCaptureReference = $object->merchantCaptureReference;
100: }
101: if (property_exists($object, 'merchantOrderId')) {
102: $this->merchantOrderId = $object->merchantOrderId;
103: }
104: if (property_exists($object, 'merchantReference')) {
105: $this->merchantReference = $object->merchantReference;
106: }
107: if (property_exists($object, 'paymentReference')) {
108: $this->paymentReference = $object->paymentReference;
109: }
110: if (property_exists($object, 'providerId')) {
111: $this->providerId = $object->providerId;
112: }
113: if (property_exists($object, 'providerMerchantId')) {
114: $this->providerMerchantId = $object->providerMerchantId;
115: }
116: if (property_exists($object, 'providerReference')) {
117: $this->providerReference = $object->providerReference;
118: }
119: if (property_exists($object, 'referenceOrigPayment')) {
120: $this->referenceOrigPayment = $object->referenceOrigPayment;
121: }
122: return $this;
123: }
124: }
125: