FixedAccommodationCoupon
extends AbstractCoupon
Table of Contents
-
$amount
: float
-
$checkInDateAfter
: DateTime
-
$checkOutDateBefore
: DateTime
-
$code
: string
-
$description
: string
-
$expirationDate
: DateTime
-
$id
: int
-
$maxDaysBeforeCheckIn
: int
-
$maxNights
: int
-
$minDaysBeforeCheckIn
: int
-
$minNights
: int
-
$roomTypes
: array<string|int, mixed>
-
$status
: string
-
$usageCount
: int
-
$usageLimit
: int
-
__construct()
: mixed
-
calcRoomDiscount()
: float
-
getAmount()
: float
-
getCheckInDateAfter()
: DateTime|null
-
getCheckOutDateBefore()
: DateTime|null
-
getCode()
: string
-
getDescription()
: string
-
getExpirationDate()
: DateTime|null
-
getId()
: int
-
getMaxDaysBeforeCheckIn()
: int
-
getMaxNights()
: int
-
getMinDaysBeforeCheckIn()
: int
-
getMinNights()
: int
-
getRoomTypes()
: array<string|int, mixed>
-
getStatus()
: string
-
getUsageCount()
: int
-
getUsageLimit()
: int
-
increaseUsageCount()
: mixed
-
isApplicableForRoomType()
: mixed
-
isExceedUsageLimit()
: bool
-
isExpired()
: bool
-
isPublished()
: bool
-
isValidForBookingContents()
: bool
-
validate()
: bool|WP_Error
$amount
protected
float
$amount
$checkInDateAfter
protected
DateTime
$checkInDateAfter
$checkOutDateBefore
protected
DateTime
$checkOutDateBefore
$code
protected
string
$code
$description
protected
string
$description
$expirationDate
protected
DateTime
$expirationDate
$id
protected
int
$id
$maxDaysBeforeCheckIn
protected
int
$maxDaysBeforeCheckIn
$maxNights
protected
int
$maxNights
$minDaysBeforeCheckIn
protected
int
$minDaysBeforeCheckIn
$minNights
protected
int
$minNights
$roomTypes
protected
array<string|int, mixed>
$roomTypes
= array()
$status
protected
string
$status
$usageCount
protected
int
$usageCount
= 0
$usageLimit
protected
int
$usageLimit
__construct()
public
__construct(mixed $atts) : mixed
Parameters
-
$atts
: mixed
-
Return values
mixed
—
calcRoomDiscount()
public
calcRoomDiscount(ReservedRoom $reservedRoom, DateTime $checkInDate, DateTime $checkOutDate) : float
Parameters
-
$reservedRoom
: ReservedRoom
-
-
$checkInDate
: DateTime
-
-
$checkOutDate
: DateTime
-
Return values
float
—
getAmount()
public
getAmount() : float
Return values
float
—
getCheckInDateAfter()
public
getCheckInDateAfter() : DateTime|null
Return values
DateTime|null
—
getCheckOutDateBefore()
public
getCheckOutDateBefore() : DateTime|null
Return values
DateTime|null
—
getCode()
public
getCode() : string
Return values
string
—
getDescription()
public
getDescription() : string
Return values
string
—
getExpirationDate()
public
getExpirationDate() : DateTime|null
Return values
DateTime|null
—
getId()
public
getId() : int
Return values
int
—
getMaxDaysBeforeCheckIn()
public
getMaxDaysBeforeCheckIn() : int
Return values
int
—
getMaxNights()
public
getMaxNights() : int
Return values
int
—
getMinDaysBeforeCheckIn()
public
getMinDaysBeforeCheckIn() : int
Return values
int
—
getMinNights()
public
getMinNights() : int
Return values
int
—
getRoomTypes()
public
getRoomTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>
—
getStatus()
public
getStatus() : string
Return values
string
—
getUsageCount()
public
getUsageCount() : int
Return values
int
—
getUsageLimit()
public
getUsageLimit() : int
Return values
int
—
increaseUsageCount()
public
increaseUsageCount() : mixed
Return values
mixed
—
isApplicableForRoomType()
public
isApplicableForRoomType(mixed $roomTypeId) : mixed
Parameters
-
$roomTypeId
: mixed
-
Return values
mixed
—
isExceedUsageLimit()
public
isExceedUsageLimit() : bool
Return values
bool
—
isExpired()
public
isExpired() : bool
Return values
bool
—
isPublished()
public
isPublished() : bool
Return values
bool
—
isValidForBookingContents()
public
isValidForBookingContents(Booking $booking) : bool
Parameters
-
$booking
: Booking
-
Return values
bool
—
validate()
public
validate(Booking $booking[, bool $returnError = false ]) : bool|WP_Error
Parameters
-
$booking
: Booking
-
-
$returnError
: bool
= false
-
Return values
bool|WP_Error
—