Skip to content

Commit b38b4db

Browse files
author
Olexii Korshenko
committed
Merge pull request magento#1028 from magento-doc/MAGEDOC-1720-Sales
Magedoc 1720 sales
2 parents cc80835 + adb5818 commit b38b4db

File tree

53 files changed

+3250
-1387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3250
-1387
lines changed

app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php

+20-11
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,46 @@
55
namespace Magento\Sales\Api;
66

77
/**
8-
* Interface RepositoryInterface
8+
* Credit memo comment repository interface.
9+
*
10+
* After a customer places and pays for an order and an invoice has been issued, the merchant can create a credit memo
11+
* to refund all or part of the amount paid for any returned or undelivered items. The memo restores funds to the
12+
* customer account so that the customer can make future purchases. A credit memo usually includes comments that detail
13+
* why the credit memo amount was credited to the customer.
914
*/
1015
interface CreditmemoCommentRepositoryInterface
1116
{
1217
/**
13-
* Load entity
18+
* Loads a specified credit memo comment.
1419
*
15-
* @param int $id
16-
* @return \Magento\Sales\Api\Data\CreditmemoCommentInterface
20+
* @param int $id The credit memo comment ID.
21+
* @return \Magento\Sales\Api\Data\CreditmemoCommentInterface Credit memo comment interface.
1722
*/
1823
public function get($id);
1924

2025
/**
21-
* @param \Magento\Framework\Api\SearchCriteria $criteria
22-
* @return \Magento\Sales\Api\Data\CreditmemoCommentSearchResultInterface
26+
* Lists credit memo comments that match specified search criteria.
27+
*
28+
* Returns a credit memo comment search results interface.
29+
*
30+
* @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria.
31+
* @return \Magento\Sales\Api\Data\CreditmemoCommentSearchResultInterface Credit memo comment search results interface.
2332
*/
2433
public function getList(\Magento\Framework\Api\SearchCriteria $criteria);
2534

2635
/**
27-
* Delete entity
36+
* Deletes a specified credit memo comment.
2837
*
29-
* @param \Magento\Sales\Api\Data\CreditmemoCommentInterface $entity
38+
* @param \Magento\Sales\Api\Data\CreditmemoCommentInterface $entity The credit memo comment.
3039
* @return bool
3140
*/
3241
public function delete(\Magento\Sales\Api\Data\CreditmemoCommentInterface $entity);
3342

3443
/**
35-
* Perform persist operations for one entity
44+
* Performs persist operations for a specified entity.
3645
*
37-
* @param \Magento\Sales\Api\Data\CreditmemoCommentInterface $entity
38-
* @return \Magento\Sales\Api\Data\CreditmemoCommentInterface
46+
* @param \Magento\Sales\Api\Data\CreditmemoCommentInterface $entity The credit memo comment.
47+
* @return \Magento\Sales\Api\Data\CreditmemoCommentInterface Credit memo comment interface.
3948
*/
4049
public function save(\Magento\Sales\Api\Data\CreditmemoCommentInterface $entity);
4150
}

app/code/Magento/Sales/Api/CreditmemoItemRepositoryInterface.php

+18-11
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,44 @@
55
namespace Magento\Sales\Api;
66

77
/**
8-
* Interface RepositoryInterface
8+
* Credit memo item repository interface.
9+
*
10+
* After a customer places and pays for an order and an invoice has been issued, the merchant can create a credit memo
11+
* to refund all or part of the amount paid for any returned or undelivered items. The memo restores funds to the
12+
* customer account so that the customer can make future purchases. A credit memo item is an invoiced item for which
13+
* a merchant creates a credit memo.
914
*/
1015
interface CreditmemoItemRepositoryInterface
1116
{
1217
/**
13-
* Load entity
18+
* Loads a specified credit memo item.
1419
*
15-
* @param int $id
16-
* @return \Magento\Sales\Api\Data\CreditmemoItemInterface
20+
* @param int $id The credit memo item ID.
21+
* @return \Magento\Sales\Api\Data\CreditmemoItemInterface Credit memo item interface.
1722
*/
1823
public function get($id);
1924

2025
/**
21-
* @param \Magento\Framework\Api\SearchCriteria $criteria
22-
* @return \Magento\Sales\Api\Data\CreditmemoItemSearchResultInterface
26+
* Lists credit memo items that match specified search criteria.
27+
*
28+
* @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria.
29+
* @return \Magento\Sales\Api\Data\CreditmemoItemSearchResultInterface Credit memo item search results interface.
2330
*/
2431
public function getList(\Magento\Framework\Api\SearchCriteria $criteria);
2532

2633
/**
27-
* Delete entity
34+
* Deletes a specified credit memo item.
2835
*
29-
* @param \Magento\Sales\Api\Data\CreditmemoInterface $entity
36+
* @param \Magento\Sales\Api\Data\CreditmemoInterface $entity The credit memo item.
3037
* @return bool
3138
*/
3239
public function delete(\Magento\Sales\Api\Data\CreditmemoInterface $entity);
3340

3441
/**
35-
* Perform persist operations for one entity
42+
* Performs persist operations for a specified credit memo item.
3643
*
37-
* @param \Magento\Sales\Api\Data\CreditmemoInterface $entity
38-
* @return \Magento\Sales\Api\Data\CreditmemoInterface
44+
* @param \Magento\Sales\Api\Data\CreditmemoInterface $entity The credit memo item.
45+
* @return \Magento\Sales\Api\Data\CreditmemoInterface Credit memo interface.
3946
*/
4047
public function save(\Magento\Sales\Api\Data\CreditmemoInterface $entity);
4148
}

app/code/Magento/Sales/Api/CreditmemoManagementInterface.php

+13-8
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,34 @@
55
namespace Magento\Sales\Api;
66

77
/**
8-
* Interface CreditmemoAddCommentInterface
8+
* Credit memo add comment interface.
9+
*
10+
* After a customer places and pays for an order and an invoice has been issued, the merchant can create a credit memo
11+
* to refund all or part of the amount paid for any returned or undelivered items. The memo restores funds to the
12+
* customer account so that the customer can make future purchases.
913
*/
1014
interface CreditmemoManagementInterface
1115
{
1216
/**
13-
* Cancel an existing creditimemo
17+
* Cancels a specified credit memo.
1418
*
15-
* @param int $id
19+
* @param int $id The credit memo ID.
1620
* @return bool
1721
*/
1822
public function cancel($id);
1923

2024
/**
21-
* Returns list of comments attached to creditmemo
22-
* @param int $id
23-
* @return \Magento\Sales\Api\Data\CreditmemoCommentSearchResultInterface
25+
* Lists comments for a specified credit memo.
26+
*
27+
* @param int $id The credit memo ID.
28+
* @return \Magento\Sales\Api\Data\CreditmemoCommentSearchResultInterface Credit memo comment search results interface.
2429
*/
2530
public function getCommentsList($id);
2631

2732
/**
28-
* Notify user
33+
* Emails a user a specified credit memo.
2934
*
30-
* @param int $id
35+
* @param int $id The credit memo ID.
3136
* @return bool
3237
*/
3338
public function notify($id);

app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php

+17-11
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,43 @@
55
namespace Magento\Sales\Api;
66

77
/**
8-
* Interface RepositoryInterface
8+
* Credit memo repository interface.
9+
*
10+
* After a customer places and pays for an order and an invoice has been issued, the merchant can create a credit memo
11+
* to refund all or part of the amount paid for any returned or undelivered items. The memo restores funds to the
12+
* customer account so that the customer can make future purchases.
913
*/
1014
interface CreditmemoRepositoryInterface
1115
{
1216
/**
13-
* @param \Magento\Framework\Api\SearchCriteria $criteria
14-
* @return \Magento\Sales\Api\Data\CreditmemoSearchResultInterface
17+
* Lists credit memos that match specified search criteria.
18+
*
19+
* @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria.
20+
* @return \Magento\Sales\Api\Data\CreditmemoSearchResultInterface Credit memo search result interface.
1521
*/
1622
public function getList(\Magento\Framework\Api\SearchCriteria $criteria);
1723

1824
/**
19-
* Load entity
25+
* Loads a specified credit memo.
2026
*
21-
* @param int $id
22-
* @return \Magento\Sales\Api\Data\CreditmemoInterface
27+
* @param int $id The credit memo ID.
28+
* @return \Magento\Sales\Api\Data\CreditmemoInterface Credit memo interface.
2329
*/
2430
public function get($id);
2531

2632
/**
27-
* Delete entity
33+
* Deletes a specified credit memo.
2834
*
29-
* @param \Magento\Sales\Api\Data\CreditmemoInterface $entity
35+
* @param \Magento\Sales\Api\Data\CreditmemoInterface $entity The credit memo.
3036
* @return bool
3137
*/
3238
public function delete(\Magento\Sales\Api\Data\CreditmemoInterface $entity);
3339

3440
/**
35-
* Perform persist operations for one entity
41+
* Performs persist operations for a specified credit memo.
3642
*
37-
* @param \Magento\Sales\Api\Data\CreditmemoInterface $entity
38-
* @return \Magento\Sales\Api\Data\CreditmemoInterface
43+
* @param \Magento\Sales\Api\Data\CreditmemoInterface $entity The credit memo.
44+
* @return \Magento\Sales\Api\Data\CreditmemoInterface Credit memo interface.
3945
*/
4046
public function save(\Magento\Sales\Api\Data\CreditmemoInterface $entity);
4147
}

app/code/Magento/Sales/Api/Data/CreditmemoCommentInterface.php

+37-14
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,82 @@
55
namespace Magento\Sales\Api\Data;
66

77
/**
8-
* Interface CreditmemoCommentInterface
8+
* Credit memo comment interface.
9+
*
10+
* After a customer places and pays for an order and an invoice has been issued, the merchant can create a credit memo
11+
* to refund all or part of the amount paid for any returned or undelivered items. The memo restores funds to the
12+
* customer account so that the customer can make future purchases. A credit memo usually includes comments that detail
13+
* why the credit memo amount was credited to the customer.
914
*/
1015
interface CreditmemoCommentInterface extends \Magento\Framework\Api\ExtensibleDataInterface
1116
{
1217
/**#@+
13-
* Constants for keys of data array. Identical to the name of the getter in snake case
18+
* Constants for keys of data array. Identical to the name of the getter in snake case.
19+
*/
20+
/*
21+
* Entity ID.
1422
*/
1523
const ENTITY_ID = 'entity_id';
24+
/*
25+
* Parent ID.
26+
*/
1627
const PARENT_ID = 'parent_id';
28+
/*
29+
* Is-customer-notified flag.
30+
*/
1731
const IS_CUSTOMER_NOTIFIED = 'is_customer_notified';
32+
/*
33+
* Is-visible-on-storefront flag.
34+
*/
1835
const IS_VISIBLE_ON_FRONT = 'is_visible_on_front';
36+
/*
37+
* Comment.
38+
*/
1939
const COMMENT = 'comment';
40+
/*
41+
* Created-at timestamp.
42+
*/
2043
const CREATED_AT = 'created_at';
2144

2245
/**
23-
* Returns comment
46+
* Gets the credit memo comment.
2447
*
25-
* @return string
48+
* @return string Comment.
2649
*/
2750
public function getComment();
2851

2952
/**
30-
* Returns created_at
53+
* Gets the credit memo created-at timestamp.
3154
*
32-
* @return string
55+
* @return string Created-at timestamp.
3356
*/
3457
public function getCreatedAt();
3558

3659
/**
37-
* Returns entity_id
60+
* Gets the credit memo ID.
3861
*
39-
* @return int
62+
* @return int Credit memo ID.
4063
*/
4164
public function getEntityId();
4265

4366
/**
44-
* Returns is_customer_notified
67+
* Gets the is-customer-notified flag value for the credit memo.
4568
*
46-
* @return int
69+
* @return int Is-customer-notified flag value.
4770
*/
4871
public function getIsCustomerNotified();
4972

5073
/**
51-
* Returns is_visible_on_front
74+
* Gets the is-visible-on-storefront flag value for the credit memo.
5275
*
53-
* @return int
76+
* @return int Is-visible-on-storefront flag value.
5477
*/
5578
public function getIsVisibleOnFront();
5679

5780
/**
58-
* Returns parent_id
81+
* Gets the parent ID for the credit memo.
5982
*
60-
* @return int
83+
* @return int Parent ID.
6184
*/
6285
public function getParentId();
6386
}

app/code/Magento/Sales/Api/Data/CreditmemoCommentSearchResultInterface.php

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@
55
namespace Magento\Sales\Api\Data;
66

77
/**
8-
* Interface CreditmemoCommentSearchResultInterface
8+
* Credit memo comment search result interface.
9+
*
10+
* After a customer places and pays for an order and an invoice has been issued, the merchant can create a credit memo
11+
* to refund all or part of the amount paid for any returned or undelivered items. The memo restores funds to the
12+
* customer account so that the customer can make future purchases. A credit memo usually includes comments that detail
13+
* why the credit memo amount was credited to the customer.
914
*/
1015
interface CreditmemoCommentSearchResultInterface extends \Magento\Framework\Api\SearchResultsInterface
1116
{
1217
/**
13-
* Get collection items
18+
* Gets collection items.
1419
*
15-
* @return \Magento\Sales\Api\Data\CreditmemoCommentInterface[]
20+
* @return \Magento\Sales\Api\Data\CreditmemoCommentInterface[] Array of collection items.
1621
*/
1722
public function getItems();
1823
}

0 commit comments

Comments
 (0)