BuddyClients Docs

BookingIntent
in package

Single booking intent.

The object generated on submission of the booking form. Represents a single intended purchase, whether suceeded or incomplete.

Tags
since
0.1.0

Table of Contents

Properties

$affiliate_id  : int
Affiliate ID.
$class  : string
The class name.
$client_email  : int|null
Client email.
$client_id  : string|int
The ID of the client or 'guest'.
$created_at  : string
Timestamp of creation.
$file_ids  : array<string|int, mixed>
An array of File IDs.
$files  : array<string|int, mixed>|null
Global file data.
$ID  : int
The ID of the BookingIntent.
$line_items  : array<string|int, mixed>
Line items.
$net_fee  : float
The net fee.
$payment_ids  : array<string|int, mixed>
An IDs of the BookingPayment objects.
$post  : array<string|int, mixed>
Global post data.
$previously_paid  : bool|null
Whether the booking was previously paid.
$project_id  : int
Project ID.
$sales_id  : int
The ID of the salesperson.
$services_complete  : bool
Whether all services for the BookingIntent are complete.
$status  : string
The current status.
$terms_pdf  : string
The ID of the attendee agreement PDF.
$terms_version  : int|null
The service agreement version.
$total_fee  : float
The total client fee.

Methods

__construct()  : mixed
Constructor method.
abandoned_booking_check()  : mixed
Checks if the booking was abandoned.
calculate_net_fee()  : mixed
Calculates the net fee.
delete_booking_intent()  : bool
Deletes the Booking Intent.
get_all_booking_intents()  : array<string|int, mixed>
Retrieves all booking intents.
get_booking_intent()  : object|bool
Retrieves booking intent by ID.
get_booking_intents_by_client()  : array<string|int, mixed>
Retrieves all booking intents for a client.
get_client_id()  : mixed
Retrieves client ID.
get_payment_ids()  : mixed
Retrieves the associated BookingPayment IDs.
get_project_id()  : mixed
Retrieves project ID.
get_status()  : mixed
Retrieves the status of the BookingIntent.
update_booking_intent()  : BookingIntent
Updates a single property of a BookingIntent.
update_booking_intent_object()  : mixed
Updates a BookingIntent object.
update_booking_intent_properties()  : mixed
Updates properties of a BookingIntent.
update_booking_payments()  : mixed
Updates a property of all BookingPayment objects associated with a BookingIntent.
update_client_email()  : bool
Updates client email.
update_client_id()  : bool
Updates the client id property of the BookingIntent.
update_net_fee()  : mixed
Updates the net fee.
update_project_id()  : mixed
Updates project id.
update_services_complete()  : BookingIntent
Updates the services complete flag.
update_status()  : mixed
Updates status.

Properties

$class

The class name.

public string $class = 'BookingIntent'

$client_id

The ID of the client or 'guest'.

public string|int $client_id

$created_at

Timestamp of creation.

public string $created_at

$file_ids

An array of File IDs.

public array<string|int, mixed> $file_ids

$files

Global file data.

public array<string|int, mixed>|null $files

$line_items

Line items.

public array<string|int, mixed> $line_items

Array of LineItem objects.

$payment_ids

An IDs of the BookingPayment objects.

public array<string|int, mixed> $payment_ids

$post

Global post data.

public array<string|int, mixed> $post

$previously_paid

Whether the booking was previously paid.

public bool|null $previously_paid

$services_complete

Whether all services for the BookingIntent are complete.

public bool $services_complete = false

$status

The current status.

public string $status

Accepts 'incomplete' and 'succeeded'.

$terms_pdf

The ID of the attendee agreement PDF.

public string $terms_pdf

$terms_version

The service agreement version.

public int|null $terms_version

Methods

__construct()

Constructor method.

public __construct(array<string|int, mixed> $post[, mixed $files = null ]) : mixed
Parameters
$post : array<string|int, mixed>

Global post data from form submission.

$files : mixed = null
Tags
since
0.1.0

abandoned_booking_check()

Checks if the booking was abandoned.

public static abandoned_booking_check(int $booking_intent_id) : mixed
Parameters
$booking_intent_id : int

The ID of the BookingIntent.

Tags
since
1.0.27

calculate_net_fee()

Calculates the net fee.

public calculate_net_fee() : mixed
Tags
since
1.0.21

delete_booking_intent()

Deletes the Booking Intent.

public static delete_booking_intent(int $booking_intent_id) : bool
Parameters
$booking_intent_id : int

The ID of the BookingIntent to delete.

Tags
since
0.2.4
Return values
bool

True on success, false on failure.

get_all_booking_intents()

Retrieves all booking intents.

public static get_all_booking_intents() : array<string|int, mixed>
Tags
since
0.1.0
Return values
array<string|int, mixed>

Array of BookingIntent objects.

get_booking_intent()

Retrieves booking intent by ID.

public static get_booking_intent(int $ID) : object|bool
Parameters
$ID : int

Booking intent ID.

Tags
since
0.1.0
Return values
object|bool

BookingIntent on success. False on failure.

get_booking_intents_by_client()

Retrieves all booking intents for a client.

public static get_booking_intents_by_client(int $client_id) : array<string|int, mixed>
Parameters
$client_id : int

The ID of the client.

Tags
since
0.4.3
Return values
array<string|int, mixed>

Array of BookingIntent objects.

get_client_id()

Retrieves client ID.

public static get_client_id(int $ID) : mixed
Parameters
$ID : int

The BookingIntent ID.

Tags
since
0.1.0

get_payment_ids()

Retrieves the associated BookingPayment IDs.

public static get_payment_ids(int $ID) : mixed
Parameters
$ID : int

The BookingIntent ID.

Tags
since
1.0.27

get_project_id()

Retrieves project ID.

public static get_project_id(int $ID) : mixed
Parameters
$ID : int

The BookingIntent ID.

Tags
since
0.1.0

get_status()

Retrieves the status of the BookingIntent.

public static get_status(int $ID) : mixed
Parameters
$ID : int

The ID of the BookingIntent.

Tags
since
1.0.27

update_booking_intent()

Updates a single property of a BookingIntent.

public static update_booking_intent(int $ID, string $property, mixed $value) : BookingIntent
Parameters
$ID : int

The BookingIntent ID.

$property : string

The property to update.

$value : mixed

The new value for the property.

Tags
since
0.1.0
Return values
BookingIntent

The updated BookingIntent object.

update_booking_intent_object()

Updates a BookingIntent object.

public static update_booking_intent_object(int $ID, string $object) : mixed
Parameters
$ID : int

The BookingIntent ID.

$object : string

The new BookingIntent object.

Tags
since
0.1.0

update_booking_intent_properties()

Updates properties of a BookingIntent.

public static update_booking_intent_properties(int $ID, array<string|int, mixed> $properties) : mixed
Parameters
$ID : int

The BookingIntent ID.

$properties : array<string|int, mixed>

An associative array of property-value pairs.

Tags
since
0.1.0

update_booking_payments()

Updates a property of all BookingPayment objects associated with a BookingIntent.

public static update_booking_payments(int $ID, string $property, mixed $value) : mixed
Parameters
$ID : int

The BookingIntent ID.

$property : string

The BookingPayment property to update.

$value : mixed

The new value for the property.

Tags
since
1.0.27

update_client_email()

Updates client email.

public static update_client_email(int $ID, int $client_email) : bool
Parameters
$ID : int

The BookingIntent ID.

$client_email : int

The new client email.

Tags
since
0.1.0
Return values
bool

True on success. False on failure.

update_client_id()

Updates the client id property of the BookingIntent.

public static update_client_id(int $ID, int $client_id) : bool
Parameters
$ID : int

The BookingIntent ID.

$client_id : int

The new client ID.

Tags
since
0.1.0
since
1.0.27

Also updates the client id in the associated BookingPayment objects.

Return values
bool

True on success. False on failure.

update_net_fee()

Updates the net fee.

public static update_net_fee(int $ID, float $payment_amount) : mixed
Parameters
$ID : int

The BookingIntent ID.

$payment_amount : float

The amount of the payment to deduct.

Tags
since
0.1.0

update_project_id()

Updates project id.

public static update_project_id(int $ID, string $project_id) : mixed
Parameters
$ID : int

The BookingIntent ID.

$project_id : string

The new project.

Tags
since
0.1.0

update_services_complete()

Updates the services complete flag.

public static update_services_complete(int $ID, bool $services_complete) : BookingIntent
Parameters
$ID : int

The BookingIntent ID.

$services_complete : bool

Whether all services are complete.

Tags
since
1.0.27
Return values
BookingIntent

The updated BookingIntent object.

update_status()

Updates status.

public static update_status(int $ID, string $new_status) : mixed
Parameters
$ID : int

The BookingIntent ID.

$new_status : string

The status to update to.

Tags
since
0.1.0

        
On this page

Search results