PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / src / Domain / Entity / Bookable / Service / PackageCustomerService.php
ameliabooking / src / Domain / Entity / Bookable / Service Last commit date
Category.php 7 years ago Extra.php 2 years ago Package.php 2 years ago PackageCustomer.php 2 years ago PackageCustomerService.php 5 years ago PackageService.php 2 years ago Resource.php 2 years ago Service.php 2 years ago
PackageCustomerService.php
148 lines
1 <?php
2 /**
3 * @copyright © TMS-Plugins. All rights reserved.
4 * @licence See LICENCE.md for license details.
5 */
6
7 namespace AmeliaBooking\Domain\Entity\Bookable\Service;
8
9 use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id;
10 use AmeliaBooking\Domain\ValueObjects\Number\Integer\WholeNumber;
11
12 /**
13 * Class PackageCustomerService
14 *
15 * @package AmeliaBooking\Domain\Entity\Bookable\Service
16 */
17 class PackageCustomerService
18 {
19 /** @var Id */
20 private $id;
21
22 /** @var PackageCustomer */
23 private $packageCustomer;
24
25 /** @var Id */
26 private $serviceId;
27
28 /** @var Id */
29 private $providerId;
30
31 /** @var Id */
32 private $locationId;
33
34 /** @var WholeNumber */
35 private $bookingsCount;
36
37 /**
38 * @return Id
39 */
40 public function getId()
41 {
42 return $this->id;
43 }
44
45 /**
46 * @param Id $id
47 */
48 public function setId(Id $id)
49 {
50 $this->id = $id;
51 }
52
53 /**
54 * @return Id
55 */
56 public function getServiceId()
57 {
58 return $this->serviceId;
59 }
60
61 /**
62 * @param Id $serviceId
63 */
64 public function setServiceId(Id $serviceId)
65 {
66 $this->serviceId = $serviceId;
67 }
68
69 /**
70 * @return Id
71 */
72 public function getProviderId()
73 {
74 return $this->providerId;
75 }
76
77 /**
78 * @param Id $providerId
79 */
80 public function setProviderId(Id $providerId)
81 {
82 $this->providerId = $providerId;
83 }
84
85 /**
86 * @return Id
87 */
88 public function getLocationId()
89 {
90 return $this->locationId;
91 }
92
93 /**
94 * @param Id $locationId
95 */
96 public function setLocationId(Id $locationId)
97 {
98 $this->locationId = $locationId;
99 }
100
101 /**
102 * @return WholeNumber
103 */
104 public function getBookingsCount()
105 {
106 return $this->bookingsCount;
107 }
108
109 /**
110 * @param WholeNumber $bookingsCount
111 */
112 public function setBookingsCount(WholeNumber $bookingsCount)
113 {
114 $this->bookingsCount = $bookingsCount;
115 }
116
117 /**
118 * @return PackageCustomer
119 */
120 public function getPackageCustomer()
121 {
122 return $this->packageCustomer;
123 }
124
125 /**
126 * @param PackageCustomer $packageCustomer
127 */
128 public function setPackageCustomer(PackageCustomer $packageCustomer)
129 {
130 $this->packageCustomer = $packageCustomer;
131 }
132
133 /**
134 * @return array
135 */
136 public function toArray()
137 {
138 return [
139 'id' => $this->getId() ? $this->getId()->getValue() : null,
140 'serviceId' => $this->getServiceId() ? $this->getServiceId()->getValue() : null,
141 'providerId' => $this->getProviderId() ? $this->getProviderId()->getValue() : null,
142 'locationId' => $this->getLocationId() ? $this->getLocationId()->getValue() : null,
143 'bookingsCount' => $this->getBookingsCount() ? $this->getBookingsCount()->getValue() : null,
144 'packageCustomer' => $this->getPackageCustomer() ? $this->getPackageCustomer()->toArray() : null,
145 ];
146 }
147 }
148