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