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 OrderTypeInformation extends DataObject
15: {
16: /**
17: * @var string
18: */
19: public $fundingType = null;
20:
21: /**
22: * @var string
23: */
24: public $paymentCode = null;
25:
26: /**
27: * @var string
28: */
29: public $purchaseType = null;
30:
31: /**
32: * @var string
33: */
34: public $transactionType = null;
35:
36: /**
37: * @var string
38: */
39: public $usageType = null;
40:
41: /**
42: * @return object
43: */
44: public function toObject()
45: {
46: $object = parent::toObject();
47: if (!is_null($this->fundingType)) {
48: $object->fundingType = $this->fundingType;
49: }
50: if (!is_null($this->paymentCode)) {
51: $object->paymentCode = $this->paymentCode;
52: }
53: if (!is_null($this->purchaseType)) {
54: $object->purchaseType = $this->purchaseType;
55: }
56: if (!is_null($this->transactionType)) {
57: $object->transactionType = $this->transactionType;
58: }
59: if (!is_null($this->usageType)) {
60: $object->usageType = $this->usageType;
61: }
62: return $object;
63: }
64:
65: /**
66: * @param object $object
67: * @return $this
68: * @throws UnexpectedValueException
69: */
70: public function fromObject($object)
71: {
72: parent::fromObject($object);
73: if (property_exists($object, 'fundingType')) {
74: $this->fundingType = $object->fundingType;
75: }
76: if (property_exists($object, 'paymentCode')) {
77: $this->paymentCode = $object->paymentCode;
78: }
79: if (property_exists($object, 'purchaseType')) {
80: $this->purchaseType = $object->purchaseType;
81: }
82: if (property_exists($object, 'transactionType')) {
83: $this->transactionType = $object->transactionType;
84: }
85: if (property_exists($object, 'usageType')) {
86: $this->usageType = $object->usageType;
87: }
88: return $this;
89: }
90: }
91: