Statement Helper Functions
The helper you can use to create, delete, get and update Statement details.
function add_statement($statement) {.....}
Supported hooks
Filter name: before_add_statement Description: This filter would be executed before add statement into the database in add_statement helper. Usage:
// The filter callback function is based on the filter.
add_filter( ‘before_add_statement’, ‘before_add_statement_callback_fun’, 10, 1 );
function before_add_statement_callback_fun($statement) {
// code
}Filter name: should_add_statement Description: This filter would be executed before add statement into database in add_statement helper. Usage:
// The filter callback function is based on the filter.
add_filter( ‘should_add_statement’, ‘should_add_statement_callback_fun’, 10, 1 );
function should_add_statement_callback_fun($statement) {
// code
}
hook name: pre.add.statement Description: This hook would be executed before add statement into the database in add_statement helper. Usage:
hook name: post.add.statement Description: This hook would be executed after add statement into the database in add_statement helper. Usage:
Usage
Request Parameters
Parameters in array format includes following attributes:
statement_number
Integer
Yes
Null
The statement_number of a specific statement.
creation_date
Date_time
Null
the creation_date for specific statement ( must provide date in gmdate() format)
statement_name
Character
Yes
Null
The statement_name for specific statement.
booking_id
Integer
Yes
Null
The booking_id create for a specific booking statement.
Response
function get_statement($statement_id) {....}
Supported hooks
Filter name: before_get_statement Description: This filter would be executed before retrieving statement details from database in get_statement helper. Usage:
Filter name: should_get_statement Description: This filter would be executed before retrieving statement details from database in get_statement helper. Usage:
hook name: pre.get.statement Description: This hook would be executed before retrieving statement details from database in get_statement helper. Usage:
hook name: post.get.statement Description: This hook would be executed after retrieving statement details from database in get_statement helper. Usage:
Usage
Request Parameters
$statement_id
Integer
Yes
Null
The id of the statement corresponds to the statement table
Response
function get_statements($filter) {.....}
Supported hooks
Filter name: before_get_statements Description: This filter would be executed before retrieving statement details from database in get_statements helper. Usage:
Filter name: should_get_statements Description: This filter would be executed before retrieving statement details from database in get_statements helper. Usage:
hook name: pre.get.statements Description: This hook would be executed before retrieving statement details from database in get_statements helper. Usage:
hook name: post.get.statements Description: This hook would be executed after retrieving statement details from database in get_statements helper. Usage:
Usage
Request Parameters
parameter array filter required for statement details.
statement_name
Character
Yes
Null
The statement_name for a specific statement.
booking_id
Integer
Yes
Null
The booking_id for specific statement.
Response
function update_statement($statement, $statement_id) {....}
Usage
Supported hooks
Filter name: before_update_statement Description: This filter would be executed before update statement into the database in update_statement helper. Usage:
Filter name: should_update_statement Description: This filter would be executed before update tax into database in update_statement helper. Usage:
hook name: pre.update.statement Description: This hook would be executed before update statement into the database in update_statement helper. Usage:
hook name: post.update.statement Description: This hook would be executed after update statement into the database in update_statement helper. Usage:
Request Parameters
Request required statement_id and array format data includes following attributes:
statement_number
Integer
Yes
Null
The statement_number of a specific statement.
creation_date
Date_time
Null
the creation_date for specific statement ( must provide date in gmdate() format)
statement_name
Character
Yes
Null
The statement_name for specific statement.
booking_id
Integer
Yes
Null
The booking_id create for a specific booking statement.
Response
function delete_statement ($statement_id) {.....}
Usage
Request Parameters
$statement _id
integer
yes
null
The id of the statement corresponds to the statement table
Response
Last updated