BookedService
in package
Booked service.
Handles individual services for a succeeded BookingIntent.
Tags
Table of Contents
Properties
- $adjustment_label : string
- Adjustment label.
- $booking_intent_id : int
- The ID of the BookingIntent.
- $client_fee : int
- Client fee.
- $client_id : int
- The ID of the client.
- $complete_date : string
- The timestamp when the service was completed.
- $created_at : string
- Datetime created.
- $file_ids : int
- File IDs.
- $ID : int
- The ID.
- $name : string
- Service name.
- $project_id : int
- The ID of the project.
- $service_id : int
- Service ID.
- $status : string
- The status.
- $team_fee : int
- Team member fee.
- $team_id : int
- Team member ID.
Methods
- __construct() : mixed
- Constructor method.
- check_booking_status() : mixed
- Checks whether all BookedServices associated with a BookingIntent are complete.
- create() : mixed
- Builds BookedService from line item.
- delete_booked_service() : mixed
- Deletes a Booked Service object.
- delete_intent_booked_services() : mixed
- Deletes all BookedService objects associated with a BookingIntent.
- get_all_services() : mixed
- Retrieves all BookedServices.
- get_booked_service() : mixed
- Retrieves BookedService object.
- get_created_at() : mixed
- Retrieves the time created.
- get_services_by() : mixed
- Retrieves all BookedServices for a specific property.
- get_services_by_booking_intent() : mixed
- Retrieves Booked Services by booking intent ID.
- get_status() : mixed
- Retrieves the status
- team_payment_object() : mixed
- Retrieves the associated team Payment object.
- team_payment_status() : mixed
- Retrieves the status of the associated team payment.
- update_cancellation_reason() : mixed
- Updates cancellation reason.
- update_status() : mixed
- Updates status.
- update_team_id() : mixed
- Updates team member.
Properties
$adjustment_label
Adjustment label.
public
string
$adjustment_label
$booking_intent_id
The ID of the BookingIntent.
public
int
$booking_intent_id
$client_fee
Client fee.
public
int
$client_fee
$client_id
The ID of the client.
public
int
$client_id
$complete_date
The timestamp when the service was completed.
public
string
$complete_date
$created_at
Datetime created.
public
string
$created_at
$file_ids
File IDs.
public
int
$file_ids
$ID
The ID.
public
int
$ID
$name
Service name.
public
string
$name
$project_id
The ID of the project.
public
int
$project_id
$service_id
Service ID.
public
int
$service_id
$status
The status.
public
string
$status
Accepts 'pending', 'in_progress', 'complete', 'cancellation_requested', 'canceled'.
$team_fee
Team member fee.
public
int
$team_fee
$team_id
Team member ID.
public
int
$team_id
Methods
__construct()
Constructor method.
public
__construct([int|null $ID = null ]) : mixed
Parameters
- $ID : int|null = null
-
The ID of the BookedService.
Tags
check_booking_status()
Checks whether all BookedServices associated with a BookingIntent are complete.
public
static check_booking_status(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent.
Tags
create()
Builds BookedService from line item.
public
create(int $booking_intent_id, LineItem $line_item, int $project_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent.
- $line_item : LineItem
-
Single LineItem object.
- $project_id : int
-
The ID of the project group.
Tags
delete_booked_service()
Deletes a Booked Service object.
public
static delete_booked_service(mixed $booked_service_id) : mixed
Parameters
- $booked_service_id : mixed
Tags
delete_intent_booked_services()
Deletes all BookedService objects associated with a BookingIntent.
public
static delete_intent_booked_services(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent.
Tags
get_all_services()
Retrieves all BookedServices.
public
static get_all_services([int $booking_intent_id = null ]) : mixed
If a BookingIntent ID is passed, retrieves all BookedService objects for that BookingIntent.
Parameters
- $booking_intent_id : int = null
-
Optional. The ID of the BookingIntent.
Tags
get_booked_service()
Retrieves BookedService object.
public
static get_booked_service(int $ID) : mixed
Parameters
- $ID : int
-
The ID of the BookedService object.
Tags
get_created_at()
Retrieves the time created.
public
static get_created_at(int $ID) : mixed
Parameters
- $ID : int
-
The BookedService ID.
Tags
get_services_by()
Retrieves all BookedServices for a specific property.
public
static get_services_by(string $property, mixed $value) : mixed
Parameters
- $property : string
-
The property to search by.
- $value : mixed
-
The value to filter by.
Tags
get_services_by_booking_intent()
Retrieves Booked Services by booking intent ID.
public
static get_services_by_booking_intent(mixed $booking_intent_id) : mixed
Parameters
- $booking_intent_id : mixed
Tags
get_status()
Retrieves the status
public
static get_status(int $ID) : mixed
Parameters
- $ID : int
-
The BookedService ID.
Tags
team_payment_object()
Retrieves the associated team Payment object.
public
static team_payment_object(int $ID) : mixed
Parameters
- $ID : int
-
The ID of the BookedService.
Tags
team_payment_status()
Retrieves the status of the associated team payment.
public
static team_payment_status(int $ID) : mixed
Parameters
- $ID : int
-
The ID of the BookedService.
Tags
update_cancellation_reason()
Updates cancellation reason.
public
static update_cancellation_reason(int $ID, string $cancellation_reason) : mixed
Parameters
- $ID : int
-
The BookedService ID.
- $cancellation_reason : string
-
The submitted cancellation reason.
Tags
update_status()
Updates status.
public
static update_status(int $ID, string $new_status) : mixed
Parameters
- $ID : int
-
The BookedService ID.
- $new_status : string
-
The status to update to.
Tags
update_team_id()
Updates team member.
public
static update_team_id(int $ID, string $team_id) : mixed
Parameters
- $ID : int
-
The BookedService ID.
- $team_id : string
-
The ID of the new team member.