Skip to content
Snippets Groups Projects
Commit 3aabe13b authored by Andriy Nasinnyk's avatar Andriy Nasinnyk
Browse files

MAGETWO-32631: Define Public API

 - for modules Customer, CustomerImportExport, ProductAlert, Sendfriend, Wishlist
parent 94e64062
No related merge requests found
......@@ -291,6 +291,7 @@ class Session extends \Magento\Framework\Session\SessionManager
/**
* Retrieve customer id from current session
*
* @api
* @return int|null
*/
public function getCustomerId()
......@@ -356,6 +357,7 @@ class Session extends \Magento\Framework\Session\SessionManager
/**
* Checking customer login status
*
* @api
* @return bool
*/
public function isLoggedIn()
......@@ -420,6 +422,7 @@ class Session extends \Magento\Framework\Session\SessionManager
/**
* Authorization customer by identifier
*
* @api
* @param int $customerId
* @return bool
*/
......@@ -437,6 +440,7 @@ class Session extends \Magento\Framework\Session\SessionManager
/**
* Logout customer
*
* @api
* @return $this
*/
public function logout()
......
......@@ -202,6 +202,7 @@ class Address extends \Magento\ImportExport\Model\Export\Entity\AbstractEav
/**
* Export process
*
* @api
* @return string
*/
public function export()
......
......@@ -119,6 +119,7 @@ class Customer extends \Magento\ImportExport\Model\Export\Entity\AbstractEav
/**
* Export process.
*
* @api
* @return string
*/
public function export()
......
......@@ -149,6 +149,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
/**
* Set model type
*
* @api
* @param string $type
* @return void
*/
......@@ -182,6 +183,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
/**
* Set website id
*
* @api
* @param int $websiteId
* @return $this
*/
......@@ -194,6 +196,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
/**
* Set customer by id
*
* @api
* @param int $customerId
* @return $this
*/
......@@ -232,6 +235,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
/**
* Add product (price change) to collection
*
* @api
* @param \Magento\Catalog\Model\Product $product
* @return $this
*/
......@@ -244,6 +248,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
/**
* Add product (back in stock) to collection
*
* @api
* @param \Magento\Catalog\Model\Product $product
* @return $this
*/
......@@ -282,6 +287,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
/**
* Send customer email
*
* @api
* @return bool
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
......
......@@ -161,6 +161,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel
}
/**
* @api
* @return $this
* @throws CoreException
*/
......@@ -220,6 +221,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel
/**
* Validate Form data
*
* @api
* @return bool|string[]
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
......@@ -270,6 +272,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel
/**
* Set Recipients
*
* @api
* @param array $recipients
* @return $this
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
......@@ -314,6 +317,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel
/**
* Retrieve Recipients object
*
* @api
* @return \Magento\Framework\Object
*/
public function getRecipients()
......@@ -329,6 +333,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel
/**
* Set product instance
*
* @api
* @param \Magento\Catalog\Model\Product $product
* @return $this
*/
......@@ -340,6 +345,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel
/**
* Retrieve Product instance
*
* @api
* @throws \Magento\Framework\Exception\LocalizedException
* @return \Magento\Catalog\Model\Product
*/
......@@ -355,6 +361,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel
/**
* Set Sender Information array
*
* @api
* @param array $sender
* @return $this
*/
......@@ -370,6 +377,7 @@ class Sendfriend extends \Magento\Framework\Model\AbstractModel
/**
* Retrieve Sender Information Object
*
* @api
* @throws \Magento\Framework\Exception\LocalizedException
* @return \Magento\Framework\Object
*/
......
......@@ -176,6 +176,7 @@ class Item extends AbstractModel implements ItemInterface
/**
* Set quantity. If quantity is less than 0 - set it to 1
*
* @api
* @param int $qty
* @return $this
*/
......@@ -308,6 +309,7 @@ class Item extends AbstractModel implements ItemInterface
/**
* Validate wish list item data
*
* @api
* @return bool
* @throws \Magento\Framework\Exception\LocalizedException
*/
......@@ -351,6 +353,7 @@ class Item extends AbstractModel implements ItemInterface
/**
* Load item by product, wishlist and shared stores
*
* @api
* @param int $wishlistId
* @param int $productId
* @param array $sharedStores
......@@ -400,6 +403,7 @@ class Item extends AbstractModel implements ItemInterface
* Return true if product was successful added or exception with code
* Return false for disabled or unvisible products
*
* @api
* @param \Magento\Checkout\Model\Cart $cart
* @param bool $delete delete the item after successful add to cart
* @return bool
......@@ -471,6 +475,7 @@ class Item extends AbstractModel implements ItemInterface
* Returns formatted buy request - object, holding request received from
* product view page with keys and options for configured product
*
* @api
* @return \Magento\Framework\Object
*/
public function getBuyRequest()
......@@ -572,6 +577,7 @@ class Item extends AbstractModel implements ItemInterface
/**
* Check product representation in item
*
* @api
* @param \Magento\Catalog\Model\Product $product
* @return bool
*/
......@@ -620,6 +626,7 @@ class Item extends AbstractModel implements ItemInterface
/**
* Initialize item options
*
* @api
* @param array $options
* @return $this
*/
......@@ -634,6 +641,7 @@ class Item extends AbstractModel implements ItemInterface
/**
* Get all item options
*
* @api
* @return Option[]
*/
public function getOptions()
......@@ -654,6 +662,7 @@ class Item extends AbstractModel implements ItemInterface
/**
* Add option to item
*
* @api
* @param Option|\Magento\Framework\Object|array $option
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
......@@ -683,8 +692,9 @@ class Item extends AbstractModel implements ItemInterface
}
/**
*Remove option from item options
* Remove option from item options
*
* @api
* @param string $code
* @return $this
*/
......@@ -700,6 +710,7 @@ class Item extends AbstractModel implements ItemInterface
/**
* Get item option by code
*
* @api
* @param string $code
* @return Option|null
*/
......@@ -763,6 +774,7 @@ class Item extends AbstractModel implements ItemInterface
* If we need to load only some of options, then option code or array of option codes
* can be provided in $optionsFilter.
*
* @api
* @param int $id
* @param null|string|array $optionsFilter
*
......
......@@ -172,6 +172,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Load wishlist by customer id
*
* @api
* @param int $customerId
* @param bool $create Create wishlist if don't exists
* @return $this
......@@ -196,6 +197,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Retrieve wishlist name
*
* @api
* @return string
*/
public function getName()
......@@ -210,6 +212,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Set random sharing code
*
* @api
* @return $this
*/
public function generateSharingCode()
......@@ -221,6 +224,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Load by sharing code
*
* @api
* @param string $code
* @return $this
*/
......@@ -335,6 +339,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Retrieve wishlist item collection
*
* @api
* @param int $itemId
* @return false|Item
*/
......@@ -349,6 +354,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Adding item to wishlist
*
* @api
* @param Item $item
* @return $this
*/
......@@ -366,6 +372,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
* Adds new product to wishlist.
* Returns new item or string on error.
*
* @api
* @param int|\Magento\Catalog\Model\Product $product
* @param \Magento\Framework\Object|array|string|null $buyRequest
* @param bool $forciblySetQty
......@@ -455,6 +462,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Set customer id
*
* @api
* @param int $customerId
* @return $this
*/
......@@ -466,6 +474,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Retrieve customer id
*
* @api
* @return int
*/
public function getCustomerId()
......@@ -524,6 +533,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Retrieve wishlist store object
*
* @api
* @return \Magento\Store\Model\Store
*/
public function getStore()
......@@ -537,6 +547,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Set wishlist store
*
* @api
* @param \Magento\Store\Model\Store $store
* @return $this
*/
......@@ -549,6 +560,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
/**
* Retrieve wishlist items count
*
* @api
* @return int
*/
public function getItemsCount()
......@@ -596,6 +608,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
*
* For more options see \Magento\Catalog\Helper\Product->addParamsToBuyRequest()
*
* @api
* @param int|Item $itemId
* @param \Magento\Framework\Object $buyRequest
* @param null|array|\Magento\Framework\Object $params
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment