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