Documentation

CartsApi extends UuidResourceApi
in package
Uses GetResource, CreateResource, DeleteResource

Carts API

The is the store management access for creating and viewing carts (not for customers to access carts)

Example fetching the contents of a cart:

$api = new BigCommerce\ApiV3\Client($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);

$cart = $api->carts('abcdefg;)->get()->getCart();

Tags

Table of Contents

INCLUDE_DIGITAL_ITEMS  = 'line_items.digital_items.options'
The Cart returns an abbreviated result. Use this to return digital items product options.
INCLUDE_PHYSICAL_ITEMS  = 'line_items.physical_items.options'
The Cart returns an abbreviated result. Use this to return physical items product options.
__construct()  : mixed
create()  : CartResponse
delete()  : ResponseInterface
get()  : CartResponse
getClient()  : Client
getParentResourceId()  : int|null
getResourceId()  : int|null
getUuid()  : string
item()  : CartItemsApi
items()  : CartItemsApi
multipleResourceUrl()  : string
redirectUrls()  : CartRedirectUrlsApi
setUuid()  : void
singleResourceUrl()  : string
updateCustomerId()  : CartResponse

Constants

INCLUDE_DIGITAL_ITEMS

The Cart returns an abbreviated result. Use this to return digital items product options.

public mixed INCLUDE_DIGITAL_ITEMS = 'line_items.digital_items.options'
Tags

INCLUDE_PHYSICAL_ITEMS

The Cart returns an abbreviated result. Use this to return physical items product options.

public mixed INCLUDE_PHYSICAL_ITEMS = 'line_items.physical_items.options'
Tags

Methods

__construct()

public __construct(Client $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed
Parameters
$client : Client
$resourceId : int|null = null
$parentResourceId : int|null = null
Tags
Return values
mixed —

delete()

public delete() : ResponseInterface
Tags
Return values
ResponseInterface —

getParentResourceId()

public getParentResourceId() : int|null
Tags
Return values
int|null —

getResourceId()

public getResourceId() : int|null
Tags
Return values
int|null —

multipleResourceUrl()

public multipleResourceUrl() : string
Tags
Return values
string —

setUuid()

public setUuid(string $uuid) : void
Parameters
$uuid : string
Tags
Return values
void —

singleResourceUrl()

public singleResourceUrl() : string
Tags
Return values
string —

updateCustomerId()

public updateCustomerId(int $customerId[, string|null $include = null ]) : CartResponse
Parameters
$customerId : int
$include : string|null = null
Tags
Return values
CartResponse —

        

Search results