GeneralSettings.php
6 months ago
GoogleMeetSettings.php
6 months ago
LessonSpaceSettings.php
6 months ago
MicrosoftTeamsSettings.php
6 months ago
PaymentLinksSettings.php
6 months ago
PaymentMollieSettings.php
6 months ago
PaymentPayPalSettings.php
6 months ago
PaymentSettings.php
6 months ago
PaymentSquareSettings.php
6 months ago
PaymentStripeSettings.php
6 months ago
PaymentWooCommerceSettings.php
6 months ago
Settings.php
6 months ago
ZoomSettings.php
6 months ago
PaymentSettings.php
168 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @copyright © Melograno Ventures. All rights reserved. |
| 5 | * @licence See LICENCE.md for license details. |
| 6 | */ |
| 7 | |
| 8 | namespace AmeliaBooking\Domain\Entity\Settings; |
| 9 | |
| 10 | /** |
| 11 | * Class PaymentSettings |
| 12 | * |
| 13 | * @package AmeliaBooking\Domain\Entity\Settings |
| 14 | */ |
| 15 | class PaymentSettings |
| 16 | { |
| 17 | /** @var bool */ |
| 18 | private $onSite; |
| 19 | |
| 20 | /** @var PaymentPayPalSettings */ |
| 21 | private $payPalSettings; |
| 22 | |
| 23 | /** @var PaymentStripeSettings */ |
| 24 | private $stripeSettings; |
| 25 | |
| 26 | /** @var PaymentWooCommerceSettings */ |
| 27 | private $wooCommerceSettings; |
| 28 | |
| 29 | /** @var PaymentMollieSettings */ |
| 30 | private $mollieSettings; |
| 31 | |
| 32 | /** @var PaymentSquareSettings */ |
| 33 | private $squareSettings; |
| 34 | |
| 35 | /** @var PaymentLinksSettings */ |
| 36 | private $paymentLinksSettings; |
| 37 | |
| 38 | /** |
| 39 | * @return bool |
| 40 | */ |
| 41 | public function getOnSite() |
| 42 | { |
| 43 | return $this->onSite; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * @param bool $onSite |
| 48 | */ |
| 49 | public function setOnSite($onSite) |
| 50 | { |
| 51 | $this->onSite = $onSite; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * @return PaymentPayPalSettings |
| 56 | */ |
| 57 | public function getPayPalSettings() |
| 58 | { |
| 59 | return $this->payPalSettings; |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * @param PaymentPayPalSettings $payPalSettings |
| 64 | */ |
| 65 | public function setPayPalSettings($payPalSettings) |
| 66 | { |
| 67 | $this->payPalSettings = $payPalSettings; |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * @return PaymentStripeSettings |
| 72 | */ |
| 73 | public function getStripeSettings() |
| 74 | { |
| 75 | return $this->stripeSettings; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * @param PaymentStripeSettings $stripeSettings |
| 80 | */ |
| 81 | public function setStripeSettings($stripeSettings) |
| 82 | { |
| 83 | $this->stripeSettings = $stripeSettings; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * @return PaymentWooCommerceSettings |
| 88 | */ |
| 89 | public function getWooCommerceSettings() |
| 90 | { |
| 91 | return $this->wooCommerceSettings; |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * @param PaymentWooCommerceSettings $wooCommerceSettings |
| 96 | */ |
| 97 | public function setWooCommerceSettings($wooCommerceSettings) |
| 98 | { |
| 99 | $this->wooCommerceSettings = $wooCommerceSettings; |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * @return PaymentMollieSettings |
| 104 | */ |
| 105 | public function getMollieSettings() |
| 106 | { |
| 107 | return $this->mollieSettings; |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * @param PaymentMollieSettings $mollieSettings |
| 112 | */ |
| 113 | public function setMollieSettings($mollieSettings) |
| 114 | { |
| 115 | $this->mollieSettings = $mollieSettings; |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * @return PaymentSquareSettings |
| 120 | */ |
| 121 | public function getSquareSettings() |
| 122 | { |
| 123 | return $this->squareSettings; |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * @param PaymentSquareSettings $squareSettings |
| 128 | */ |
| 129 | public function setSquareSettings($squareSettings) |
| 130 | { |
| 131 | $this->squareSettings = $squareSettings; |
| 132 | } |
| 133 | |
| 134 | |
| 135 | /** |
| 136 | * @return PaymentLinksSettings |
| 137 | */ |
| 138 | public function getPaymentLinksSettings() |
| 139 | { |
| 140 | return $this->paymentLinksSettings; |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * @param PaymentLinksSettings $paymentLinksSettings |
| 145 | */ |
| 146 | public function setPaymentLinksSettings(PaymentLinksSettings $paymentLinksSettings) |
| 147 | { |
| 148 | $this->paymentLinksSettings = $paymentLinksSettings; |
| 149 | } |
| 150 | |
| 151 | |
| 152 | /** |
| 153 | * @return array |
| 154 | */ |
| 155 | public function toArray() |
| 156 | { |
| 157 | return [ |
| 158 | 'onSite' => $this->onSite, |
| 159 | 'payPal' => $this->getPayPalSettings() ? $this->getPayPalSettings()->toArray() : null, |
| 160 | 'stripe' => $this->getStripeSettings() ? $this->getStripeSettings()->toArray() : null, |
| 161 | 'wc' => $this->getWooCommerceSettings() ? $this->getWooCommerceSettings()->toArray() : null, |
| 162 | 'mollie' => $this->getMollieSettings() ? $this->getMollieSettings()->toArray() : null, |
| 163 | 'square' => $this->getSquareSettings() ? $this->getSquareSettings()->toArray() : null, |
| 164 | 'paymentLinks' => $this->getPaymentLinksSettings() ? $this->getPaymentLinksSettings()->toArray() : null, |
| 165 | ]; |
| 166 | } |
| 167 | } |
| 168 |