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
18: */
19: public $merchantCaptureReference = null;
20:
21: /**
22: * @var int
23: */
24: public $merchantOrderId = null;
25:
26: /**
27: * @var string
28: */
29: public $merchantReference = null;
30:
31: /**
32: * @var string
33: */
34: public $paymentReference = null;
35:
36: /**
37: * @var string
38: */
39: public $providerId = null;
40:
41: /**
42: * @var string
43: */
44: public $providerMerchantId = null;
45:
46: /**
47: * @var string
48: */
49: public $providerReference = null;
50:
51: /**
52: * @var string
53: */
54: public $referenceOrigPayment = null;
55:
56: /**
57: * @return object
58: */
59: public function toObject()
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: * @return $this
92: * @throws UnexpectedValueException
93: */
94: public function fromObject($object)
95: {
96: parent::fromObject($object);
97: if (property_exists($object, 'merchantCaptureReference')) {
98: $this->merchantCaptureReference = $object->merchantCaptureReference;
99: }
100: if (property_exists($object, 'merchantOrderId')) {
101: $this->merchantOrderId = $object->merchantOrderId;
102: }
103: if (property_exists($object, 'merchantReference')) {
104: $this->merchantReference = $object->merchantReference;
105: }
106: if (property_exists($object, 'paymentReference')) {
107: $this->paymentReference = $object->paymentReference;
108: }
109: if (property_exists($object, 'providerId')) {
110: $this->providerId = $object->providerId;
111: }
112: if (property_exists($object, 'providerMerchantId')) {
113: $this->providerMerchantId = $object->providerMerchantId;
114: }
115: if (property_exists($object, 'providerReference')) {
116: $this->providerReference = $object->providerReference;
117: }
118: if (property_exists($object, 'referenceOrigPayment')) {
119: $this->referenceOrigPayment = $object->referenceOrigPayment;
120: }
121: return $this;
122: }
123: }
124: