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