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