ClassesBigCommerceApiNull Client

Null_Client

A placeholder API client that disables API calls.

This class is typically used when API configuration is missing or incomplete.

Attempts to make API calls using this client will throw an exception.

Methods

callApi

Attempt to make an API call.

public callApi(string $resourcePath, string $method, array $queryParams, array $postData, array $headerParams, string|null $responseType = null, string|null $endpointPath = null): mixed

This method always throws an exception because the client is configured to prevent API calls. It is intended to signal that required API configuration settings are missing.

Parameters:

ParameterTypeDescription
$resourcePathstringPath to the API method endpoint.
$methodstringHTTP method to use for the request (e.g., GET, POST).
$queryParamsarrayParameters to include in the query string of the URL.
$postDataarrayParameters to include in the body of the request.
$headerParamsarrayHeaders to include in the request.
$responseTypestring|nullThe expected response type (optional).
$endpointPathstring|nullThe original endpoint path before parameter substitution (optional).

Return Value:

This method does not return a value; it always throws an exception.

Throws:

Always thrown with a message indicating missing settings.


Inherited methods

__construct

Constructor for the Base_Client class

public __construct(\BigCommerce\Api\Configuration|null $config = null): mixed

Initializes the API client with the provided configuration. If no configuration is provided, it will use the default configuration.

Parameters:

ParameterTypeDescription
$config\BigCommerce\Api\Configuration|nullThe configuration for this ApiClient.

getConfig

Gets the configuration of the API client

public getConfig(): \BigCommerce\Api\Configuration

Returns the configuration object used by the API client.

Return Value:

Returns the Configuration object used by this API client.



Automatically generated on 2025-01-21