Shipping_Controller
- Full name:
\BigCommerce\Rest\Shipping_Controller
- Parent class:
\BigCommerce\Rest\Rest_Controller
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
SHIPPING_METHOD_TYPE_PERITEM | public | ’peritem’ | |
SHIPPING_METHOD_TYPE_FREE | public | ’freeshipping’ | |
SHIPPING_METHOD_TYPE_USPS | public | ’endicia’ | |
SHIPPING_METHOD_TYPE_WEIGHT_WEIGHT | public | ’weight’ | |
SHIPPING_METHOD_TYPE_WEIGHT_TOTAL | public | ’total’ |
Methods
__construct
Rest_Controller constructor.
public __construct(string $namespace_base, string $version, string $rest_base, \BigCommerce\Api\Shipping_Api $shipping_api, \BigCommerce\Api\v3\Api\CartApi $cart_api, \BigCommerce\Api\v3\Api\CheckoutApi $checkout_api): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$namespace_base | string | |
$version | string | |
$rest_base | string | |
$shipping_api | \BigCommerce\Api\Shipping_Api | |
$cart_api | \BigCommerce\Api\v3\Api\CartApi | |
$checkout_api | \BigCommerce\Api\v3\Api\CheckoutApi |
js_config
Add data to the JS config to support cart ajax
public js_config(array $config): array
Parameters:
Parameter | Type | Description |
---|---|---|
$config | array |
register_routes
public register_routes(): mixed
get_rendered_zones_schema
public get_rendered_zones_schema(): mixed
get_rendered_item_permissions_check
Checks if a given request has access to read the rendered shortcodes.
public get_rendered_item_permissions_check(\WP_REST_Request $request): true|\WP_Error
Parameters:
Parameter | Type | Description |
---|---|---|
$request | \WP_REST_Request | Full details about the request. |
Return Value:
True if the request has read access, WP_Error object otherwise.
get_zones
public get_zones(\WP_REST_Request $request): \WP_REST_Response|\WP_Error
Parameters:
Parameter | Type | Description |
---|---|---|
$request | \WP_REST_Request | Full details about the request. |
Return Value:
Response object on success, or WP_Error object on failure.
get_endicia_methods
public get_endicia_methods(mixed $request): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$request | mixed |
get_zone_methods
public get_zone_methods(\WP_REST_Request $request): \WP_REST_Response|\WP_Error
Parameters:
Parameter | Type | Description |
---|---|---|
$request | \WP_REST_Request | Full details about the request. |
Return Value:
Response object on success, or WP_Error object on failure.
Inherited methods
__construct
Rest_Controller constructor.
public __construct(string $namespace_base, string $version, string $rest_base): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$namespace_base | string | |
$version | string | |
$rest_base | string |
get_namespace
protected get_namespace(): mixed
get_base_url
public get_base_url(): mixed
parse_result
protected parse_result(mixed $response, mixed $client, mixed $rest_response = true): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$response | mixed | |
$client | mixed | |
$rest_response | mixed |
Automatically generated on 2025-01-21