For the complete documentation index, see llms.txt. This page is also available as Markdown.

Availability Helper Functions

The helper you can use to get room availability details in the company.

function get_availability($filter) {....}

Supported hooks

Filter name: before_get_availability Description: This filter would be executed before retrieving availability details from database in get_availability helper. Usage:

// The filter callback function is based on the filter.

add_filter( ‘before_get_availability’, ‘before_get_availability_callback_fun’, 10, 1 );

function before_get_availability_callback_fun($filter) {
// code
}

Filter name: should_get_availability Description: This filter would be executed before retrieving availability details from the database in the get_availability helper. Usage:

// The filter callback function is based on the filter.

add_filter( ‘should_get_availability’, ‘should_get_availability_callback_fun’, 10, 1 );

function should_get_availability_callback_fun($filter) {
// code
}

hook name: pre.get.availability Description: This hook would be executed before retrieving availability details from the database in the get_availability helper. Usage:

hook name: post.get.availability Description: This hook would be executed after retrieving availability details from the database in the get_availability helper. Usage:

Usage

Request Parameters

Param
Type
Required
Default
Description

company_id

Integer

Yes

Null

The company_id of specific company(must require).

ota_id

Integer

Yes

Null

The ota_id of any specific OTA type (must require)

start_date

Date_time

Yes

Null

The start_date of any specific availability data (must required)

end_date

Date_time

Yes

Null

The end_date of any specific availability data(must require)

adult_count

Integer

Null

The adult_count of any specific availability

children_count

Integer

Null

The children_count of any specific availability

filter_can_be_sold_online

Boolean

True

The filter_can_be_sold_online of any specific availability.

company_group_id

Integer

Null

The company_group_id of any specific availability.

get_max_availability

Boolean

True

The get_max_availability of any specific availability.

get_inventorysold

Boolean

True

The get_inventorysold of any specific availability.

get_closeout_status

Boolean

True

The get_closeout_status of any specific availability.

get_inventory

Boolean

True

The get_inventory of any specific availability.

ota_key

Character

Null

The ota_key of any specific availability.

Response

Last updated