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:
10: /**
11: * @package Worldline\Connect\Sdk\V1\Domain
12: */
13: class DeferredBillingDetails extends BaseBillingDetails
14: {
15: /**
16: * @var string
17: */
18: public $deferredPaymentDate = null;
19:
20: /**
21: * @var string
22: */
23: public $freeCancellationDate = null;
24:
25: /**
26: * @var string
27: */
28: public $freeCancellationDateTimeZone = null;
29:
30: /**
31: * @return object
32: */
33: public function toObject()
34: {
35: $object = parent::toObject();
36: if (!is_null($this->deferredPaymentDate)) {
37: $object->deferredPaymentDate = $this->deferredPaymentDate;
38: }
39: if (!is_null($this->freeCancellationDate)) {
40: $object->freeCancellationDate = $this->freeCancellationDate;
41: }
42: if (!is_null($this->freeCancellationDateTimeZone)) {
43: $object->freeCancellationDateTimeZone = $this->freeCancellationDateTimeZone;
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, 'deferredPaymentDate')) {
57: $this->deferredPaymentDate = $object->deferredPaymentDate;
58: }
59: if (property_exists($object, 'freeCancellationDate')) {
60: $this->freeCancellationDate = $object->freeCancellationDate;
61: }
62: if (property_exists($object, 'freeCancellationDateTimeZone')) {
63: $this->freeCancellationDateTimeZone = $object->freeCancellationDateTimeZone;
64: }
65: return $this;
66: }
67: }
68: