BuddyClients Docs

Payment
in package

Handles a single payment for a BookedService.

Tags
since
0.1.0

Table of Contents

Properties

$amount  : float
Amount.
$booked_service_id  : int
The ID of the BookedService.
$booking_intent_id  : int
The ID of the BookingIntent.
$client_id  : int
The ID of the client.
$created_at  : string
The time created.
$ID  : int
The ID.
$memo  : string
The memo with payment details.
$paid_date  : string
Paid date.
$payee_id  : int
Payee ID.
$project_id  : int
The ID of the project.
$service_name  : string
Service name.
$service_names  : string
All service names.
$status  : string
Status.
$time_eligible  : string
The timestamp the payment will be eligible.
$type  : string
Type.

Methods

__construct()  : mixed
Constructor method.
build_memo()  : mixed
Builds the memo.
create()  : mixed
Creates a new Payment.
delete_intent_payments()  : mixed
Deletes all Payments associated with a BookingIntent.
delete_payment()  : mixed
Deletes a Payment object.
get_all_payments()  : mixed
Retrieves all Payment records.
get_booked_service_payment()  : mixed
Retrieves a Payment by the ID of the BookedService.
get_payment()  : mixed
Retrieves a Payment by ID.
get_payments_by_booking_intent()  : mixed
Retrieves payments by booking intent ID.
get_payments_by_type()  : mixed
Retrieves Payment records by type.
update_property()  : mixed
Updates a property.
update_status()  : mixed
Updates status.

Properties

$amount

Amount.

public float $amount

$booked_service_id

The ID of the BookedService.

public int $booked_service_id

$booking_intent_id

The ID of the BookingIntent.

public int $booking_intent_id

$client_id

The ID of the client.

public int $client_id

$created_at

The time created.

public string $created_at

$memo

The memo with payment details.

public string $memo

$paid_date

Paid date.

public string $paid_date

$payee_id

Payee ID.

public int $payee_id

$project_id

The ID of the project.

public int $project_id

$service_name

Service name.

public string $service_name

$service_names

All service names.

public string $service_names

$status

Status.

public string $status

Accepts 'pending', 'eligible', 'paid'.

$time_eligible

The timestamp the payment will be eligible.

public string $time_eligible

$type

Type.

public string $type

Accepts 'team', 'affiliate', 'sales'.

Methods

__construct()

Constructor method.

public __construct([int|null $ID = null ]) : mixed
Parameters
$ID : int|null = null

The ID of the Payment.

Tags
since
0.1.0

build_memo()

Builds the memo.

public build_memo() : mixed
Tags
since
1.0.17

create()

Creates a new Payment.

public create(array<string|int, mixed> $args) : mixed
Parameters
$args : array<string|int, mixed>

{ Array of arguments for creating the Payment object.

@type    int     $booked_service_id      The ID of the BookedService.
@type    int     $booking_intent_id      The ID of the BookingIntent.
@type    string  $type                   The type of Payment.
@type    string  $status                 Optional. The Payment status. Defaults to 'pending'.
@type    int     $payee_id               The ID of the payee.
@type    float   $amount                 The amount to be paid.
@type    string  $paid_date              Optional. The date payment was completed.
@type    string  $service_name           Optional. The name of the service.
@type    string  $service_names          Optional. The names of all services for the BookingIntent.

}

Tags
since
0.1.0

delete_intent_payments()

Deletes all Payments associated with a BookingIntent.

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

The ID of the BookingIntent.

Tags
since
1.0.21

delete_payment()

Deletes a Payment object.

public static delete_payment(mixed $payment_id) : mixed
Parameters
$payment_id : mixed
Tags
since
0.2.5

get_all_payments()

Retrieves all Payment records.

public static get_all_payments() : mixed
Tags
since
0.1.0

get_booked_service_payment()

Retrieves a Payment by the ID of the BookedService.

public static get_booked_service_payment(int $booked_service_id, int $team_id) : mixed
Parameters
$booked_service_id : int

The ID of the BookedService.

$team_id : int

The ID of the team member.

Tags
since
0.1.0

get_payment()

Retrieves a Payment by ID.

public static get_payment(int $payment_id) : mixed
Parameters
$payment_id : int

The ID of the payment.

Tags
since
0.1.0

get_payments_by_booking_intent()

Retrieves payments by booking intent ID.

public static get_payments_by_booking_intent(mixed $booking_intent_id) : mixed
Parameters
$booking_intent_id : mixed
Tags
since
0.2.5

get_payments_by_type()

Retrieves Payment records by type.

public static get_payments_by_type([string $type = null ]) : mixed
Parameters
$type : string = null

Optional. The type to retrieve. Defaults to all payments.

Tags
since
0.1.0

update_property()

Updates a property.

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

The ID of the Payment to update.

$property : string

The property to update.

$value : mixed

The new value for the property.

Tags
since
0.3.3

update_status()

Updates status.

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

The Payment ID.

$new_status : string

The status to update to.

Tags
since
0.1.0

        
On this page

Search results