ClassesBigCommerceApiWebhooks API

Webhooks_Api

Creates an adapter class for the BC v2 API webhook endpoint.

Provides methods for managing webhooks through the BigCommerce v2 API, including listing, creating, deleting, and updating webhooks.

Methods

listWebhooks

List all webhooks.

public listWebhooks(): mixed

Retrieves a list of all webhooks through the client class’s listWebhooks method.

Return Value:

The list of webhooks.


createWebhook

Create a new webhook.

public createWebhook(mixed $object): mixed

Creates a new webhook by calling the client class’s createWebhook method.

Parameters:

ParameterTypeDescription
$objectmixedThe webhook object to create.

Return Value:

The result of the create operation.


deleteWebhook

Delete a webhook by ID.

public deleteWebhook(int $id): mixed

Deletes the specified webhook by calling the client class’s deleteWebhook method.

Parameters:

ParameterTypeDescription
$idintThe ID of the webhook to delete.

Return Value:

The result of the delete operation.


updateWebhook

Update an existing webhook.

public updateWebhook(int $id, mixed $object): mixed

Updates the specified webhook by calling the client class’s updateWebhook method.

Parameters:

ParameterTypeDescription
$idintThe ID of the webhook to update.
$objectmixedThe updated webhook data.

Return Value:

The result of the update operation.


Inherited methods

__construct

Constructor

public __construct(\BigCommerce\Api\Base_Client $apiClient): mixed

Initializes the API client instance to be used in making requests.

Parameters:

ParameterTypeDescription
$apiClient\BigCommerce\Api\Base_ClientThe API client to use.

__call

Magic method to call methods on the client class.

public __call(string $method, array $args): mixed

Dynamically calls methods on the client class if available. Throws an exception if the method does not exist.

Parameters:

ParameterTypeDescription
$methodstringThe method name to call.
$argsarrayThe arguments to pass to the method.

Return Value:

The result of the method call.

Throws:

If the method is not found.


get_store_hash

Retrieve the store hash from the API client configuration.

protected get_store_hash(): string

Extracts the store hash from the API client’s configuration using the host URL.

Return Value:

The store hash.



Automatically generated on 2025-01-21