Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
CartRepositoryInterface Interface Reference
Inheritance diagram for CartRepositoryInterface:
QuoteRepository

Public Member Functions

 get ($cartId)
 
 getList (\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
 
 getForCustomer ($customerId, array $sharedStoreIds=[])
 
 getActive ($cartId, array $sharedStoreIds=[])
 
 getActiveForCustomer ($customerId, array $sharedStoreIds=[])
 
 save (\Magento\Quote\Api\Data\CartInterface $quote)
 
 delete (\Magento\Quote\Api\Data\CartInterface $quote)
 

Detailed Description

Interface CartRepositoryInterface @api

Since
100.0.2

Definition at line 13 of file CartRepositoryInterface.php.

Member Function Documentation

◆ delete()

Delete quote

Parameters
\Magento\Quote\Api\Data\CartInterface$quote
Returns
void

◆ get()

get (   $cartId)

Enables an administrative user to return information for a specified cart.

Parameters
int$cartId
Returns
\Magento\Quote\Api\Data\CartInterface
Exceptions

◆ getActive()

getActive (   $cartId,
array  $sharedStoreIds = [] 
)

Get active quote by id

Parameters
int$cartId
int[]$sharedStoreIds
Returns
\Magento\Quote\Api\Data\CartInterface
Exceptions

Implemented in QuoteRepository.

◆ getActiveForCustomer()

getActiveForCustomer (   $customerId,
array  $sharedStoreIds = [] 
)

Get active quote by customer Id

Parameters
int$customerId
int[]$sharedStoreIds
Returns
\Magento\Quote\Api\Data\CartInterface
Exceptions

Implemented in QuoteRepository.

◆ getForCustomer()

getForCustomer (   $customerId,
array  $sharedStoreIds = [] 
)

Get quote by customer Id

Parameters
int$customerId
int[]$sharedStoreIds
Returns
\Magento\Quote\Api\Data\CartInterface
Exceptions

Implemented in QuoteRepository.

◆ getList()

getList ( \Magento\Framework\Api\SearchCriteriaInterface  $searchCriteria)

Enables administrative users to list carts that match specified search criteria.

This call returns an array of objects, but detailed information about each object’s attributes might not be included. See http://devdocs.magento.com/codelinks/attributes.html#CartRepositoryInterface to determine which call to use to get detailed information about all attributes for an object.

Parameters
\Magento\Framework\Api\SearchCriteriaInterface$searchCriteria
Returns
\Magento\Quote\Api\Data\CartSearchResultsInterface

◆ save()

Save quote

Parameters
\Magento\Quote\Api\Data\CartInterface$quote
Returns
void

The documentation for this interface was generated from the following file: