-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from magento-firedrakes/MAGETWO-54658
[Firedrakes] Order status change after Invoice creation through API
- Loading branch information
Showing
47 changed files
with
3,448 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Sales\Api\Data; | ||
|
||
/** | ||
* Interface CommentInterface | ||
* | ||
* @api | ||
*/ | ||
interface CommentInterface | ||
{ | ||
/** | ||
* Gets the comment for the invoice. | ||
* | ||
* @return string Comment. | ||
*/ | ||
public function getComment(); | ||
|
||
/** | ||
* Sets the comment for the invoice. | ||
* | ||
* @param string $comment | ||
* @return $this | ||
*/ | ||
public function setComment($comment); | ||
|
||
/** | ||
* Gets the is-visible-on-storefront flag value for the invoice. | ||
* | ||
* @return int Is-visible-on-storefront flag value. | ||
*/ | ||
public function getIsVisibleOnFront(); | ||
|
||
/** | ||
* Sets the is-visible-on-storefront flag value for the invoice. | ||
* | ||
* @param int $isVisibleOnFront | ||
* @return $this | ||
*/ | ||
public function setIsVisibleOnFront($isVisibleOnFront); | ||
} |
17 changes: 17 additions & 0 deletions
17
app/code/Magento/Sales/Api/Data/InvoiceCommentCreationInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Sales\Api\Data; | ||
|
||
/** | ||
* Interface InvoiceCommentCreationInterface | ||
* | ||
* @api | ||
*/ | ||
interface InvoiceCommentCreationInterface extends \Magento\Sales\Api\Data\CommentInterface | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/code/Magento/Sales/Api/Data/InvoiceCreationArgumentsInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Sales\Api\Data; | ||
|
||
/** | ||
* Interface for creation arguments for Invoice. | ||
* | ||
* @api | ||
*/ | ||
interface InvoiceCreationArgumentsInterface extends \Magento\Framework\Api\ExtensibleDataInterface | ||
{ | ||
/** | ||
* Gets existing extension attributes. | ||
* | ||
* @return \Magento\Sales\Api\Data\InvoiceCreationArgumentsExtensionInterface|null | ||
*/ | ||
public function getExtensionAttributes(); | ||
|
||
/** | ||
* Sets extension attributes. | ||
* | ||
* @param \Magento\Sales\Api\Data\InvoiceCreationArgumentsExtensionInterface $extensionAttributes | ||
* | ||
* @return $this | ||
*/ | ||
public function setExtensionAttributes( | ||
\Magento\Sales\Api\Data\InvoiceCreationArgumentsExtensionInterface $extensionAttributes | ||
); | ||
} |
19 changes: 19 additions & 0 deletions
19
app/code/Magento/Sales/Api/Data/InvoiceItemCreationInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Sales\Api\Data; | ||
|
||
/** | ||
* Input argument for invoice creation | ||
* | ||
* Interface InvoiceItemCreationInterface | ||
* | ||
* @api | ||
*/ | ||
interface InvoiceItemCreationInterface extends LineItemInterface | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Sales\Api\Data; | ||
|
||
/** | ||
* Base line item interface for order entities | ||
* | ||
* Interface LineItemInterface | ||
* @api | ||
*/ | ||
interface LineItemInterface | ||
{ | ||
/** | ||
* Gets the order item ID for the item. | ||
* | ||
* @return int Order item ID. | ||
*/ | ||
public function getOrderItemId(); | ||
|
||
/** | ||
* Sets the order item ID for the item. | ||
* | ||
* @param int $id | ||
* @return $this | ||
*/ | ||
public function setOrderItemId($id); | ||
|
||
/** | ||
* Gets the quantity for the item. | ||
* | ||
* @return float Quantity. | ||
*/ | ||
public function getQty(); | ||
|
||
/** | ||
* Sets the quantity for the item. | ||
* | ||
* @param float $qty | ||
* @return $this | ||
*/ | ||
public function setQty($qty); | ||
} |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Sales/Api/Exception/CouldNotInvoiceExceptionInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Sales\Api\Exception; | ||
|
||
/** | ||
* @api | ||
*/ | ||
interface CouldNotInvoiceExceptionInterface | ||
{ | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Sales/Api/Exception/DocumentValidationExceptionInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Sales\Api\Exception; | ||
|
||
/** | ||
* @api | ||
*/ | ||
interface DocumentValidationExceptionInterface | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Sales\Api; | ||
|
||
/** | ||
* Class OrderInvoiceInterface | ||
* | ||
* @api | ||
*/ | ||
interface OrderInvoiceInterface | ||
{ | ||
/** | ||
* @param int $orderId | ||
* @param bool|false $capture | ||
* @param \Magento\Sales\Api\Data\InvoiceItemCreationInterface[] $items | ||
* @param bool|false $notify | ||
* @param bool|false $appendComment | ||
* @param Data\InvoiceCommentCreationInterface|null $comment | ||
* @param Data\InvoiceCreationArgumentsInterface|null $arguments | ||
* @return int | ||
*/ | ||
public function execute( | ||
$orderId, | ||
$capture = false, | ||
array $items = [], | ||
$notify = false, | ||
$appendComment = false, | ||
\Magento\Sales\Api\Data\InvoiceCommentCreationInterface $comment = null, | ||
\Magento\Sales\Api\Data\InvoiceCreationArgumentsInterface $arguments = null | ||
); | ||
} |
17 changes: 17 additions & 0 deletions
17
app/code/Magento/Sales/Exception/CouldNotInvoiceException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Sales\Exception; | ||
|
||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Sales\Api\Exception\CouldNotInvoiceExceptionInterface; | ||
|
||
/** | ||
* Class CouldNotInvoiceException | ||
*/ | ||
class CouldNotInvoiceException extends LocalizedException implements CouldNotInvoiceExceptionInterface | ||
{ | ||
|
||
} |
Oops, something went wrong.