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 PaymentMethodData extends PaymentMethodDataBase
13: {
14: /**
15: * @var string|null
16: */
17: public ?string $issuingCountryCode = null;
18:
19: /**
20: * @return object
21: */
22: public function toObject(): object
23: {
24: $object = parent::toObject();
25: if (!is_null($this->issuingCountryCode)) {
26: $object->issuingCountryCode = $this->issuingCountryCode;
27: }
28: return $object;
29: }
30:
31: /**
32: * @param object $object
33: *
34: * @return $this
35: * @throws UnexpectedValueException
36: */
37: public function fromObject(object $object): PaymentMethodData
38: {
39: parent::fromObject($object);
40: if (property_exists($object, 'issuingCountryCode')) {
41: $this->issuingCountryCode = $object->issuingCountryCode;
42: }
43: return $this;
44: }
45: }
46: