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 int|null
17: */
18: public ?int $deferredPaymentAmount = null;
19:
20: /**
21: * @var string|null
22: */
23: public ?string $deferredPaymentDate = null;
24:
25: /**
26: * @var string|null
27: */
28: public ?string $freeCancellationDate = null;
29:
30: /**
31: * @var string|null
32: */
33: public ?string $freeCancellationDateTimeZone = null;
34:
35: /**
36: * @return object
37: */
38: public function toObject(): object
39: {
40: $object = parent::toObject();
41: if (!is_null($this->deferredPaymentAmount)) {
42: $object->deferredPaymentAmount = $this->deferredPaymentAmount;
43: }
44: if (!is_null($this->deferredPaymentDate)) {
45: $object->deferredPaymentDate = $this->deferredPaymentDate;
46: }
47: if (!is_null($this->freeCancellationDate)) {
48: $object->freeCancellationDate = $this->freeCancellationDate;
49: }
50: if (!is_null($this->freeCancellationDateTimeZone)) {
51: $object->freeCancellationDateTimeZone = $this->freeCancellationDateTimeZone;
52: }
53: return $object;
54: }
55:
56: /**
57: * @param object $object
58: *
59: * @return $this
60: * @throws UnexpectedValueException
61: */
62: public function fromObject(object $object): DeferredBillingDetails
63: {
64: parent::fromObject($object);
65: if (property_exists($object, 'deferredPaymentAmount')) {
66: $this->deferredPaymentAmount = $object->deferredPaymentAmount;
67: }
68: if (property_exists($object, 'deferredPaymentDate')) {
69: $this->deferredPaymentDate = $object->deferredPaymentDate;
70: }
71: if (property_exists($object, 'freeCancellationDate')) {
72: $this->freeCancellationDate = $object->freeCancellationDate;
73: }
74: if (property_exists($object, 'freeCancellationDateTimeZone')) {
75: $this->freeCancellationDateTimeZone = $object->freeCancellationDateTimeZone;
76: }
77: return $this;
78: }
79: }
80: