Api_Scopes_Validator
Validates the API scopes for several resources, ensuring that the correct permissions are in place during the onboarding process. This includes validating scopes for customers, orders, and payment methods.
- Full name:
\BigCommerce\Api\Api_Scopes_Validator - Parent class:
\BigCommerce\Api\v2ApiAdapter
Constants
| Constant | Visibility | Type | Value |
|---|---|---|---|
CUSTOMERS_RESOURCE | public | string | ’/customers’ |
MARKETING_RESOURCE | public | string | ’/gift_certificates’ |
ORDERS_RESOURCE | public | string | ’/orders’ |
PAYMENT_METHODS_RESOURCE | public | string | ’/payments/methods’ |
Methods
validate
Validates scopes for several API items to ensure that the necessary permissions are in place during the onboarding process.
public validate(): boolThis method checks the scopes for customers, orders, and payment methods and throws an exception if any of them are invalid.
Return Value:
Returns true if all scopes are valid.
Throws:
If any of the scopes are invalid.
Inherited methods
__construct
Constructor
public __construct(\BigCommerce\Api\Base_Client $apiClient): mixedInitializes the API client instance to be used in making requests.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$apiClient | \BigCommerce\Api\Base_Client | The API client to use. |
__call
Magic method to call methods on the client class.
public __call(string $method, array $args): mixedDynamically calls methods on the client class if available. Throws an exception if the method does not exist.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$method | string | The method name to call. |
$args | array | The 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(): stringExtracts the store hash from the API client’s configuration using the host URL.
Return Value:
The store hash.
Automatically generated on 2025-01-21