Skip to content

Commit

Permalink
Merge pull request #272 from magento-firedrakes/MAGETWO-54677
Browse files Browse the repository at this point in the history
Story:
MAGETWO-54677 Order status change after Shipment creation through API
Task:
MAGETWO-56577 Rename interface orderInvoice to invoiceOrder
  • Loading branch information
VladimirZaets authored Aug 23, 2016
2 parents 3ef1e28 + df9ac67 commit adfd12a
Show file tree
Hide file tree
Showing 74 changed files with 3,809 additions and 445 deletions.
10 changes: 10 additions & 0 deletions app/code/Magento/Sales/Api/Data/CommentInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
*/
interface CommentInterface
{
/*
* Is-visible-on-storefront flag.
*/
const IS_VISIBLE_ON_FRONT = 'is_visible_on_front';

/*
* Comment.
*/
const COMMENT = 'comment';

/**
* Gets the comment for the invoice.
*
Expand Down
53 changes: 53 additions & 0 deletions app/code/Magento/Sales/Api/Data/EntityInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Sales\Api\Data;

/**
* Interface EntityInterface
* @api
*/
interface EntityInterface
{
/*
* Entity ID.
*/
const ENTITY_ID = 'entity_id';

/*
* Created-at timestamp.
*/
const CREATED_AT = 'created_at';

/**
* Gets the created-at timestamp for the invoice.
*
* @return string|null Created-at timestamp.
*/
public function getCreatedAt();

/**
* Sets the created-at timestamp for the invoice.
*
* @param string $createdAt timestamp
* @return $this
*/
public function setCreatedAt($createdAt);

/**
* Gets the ID for the invoice.
*
* @return int|null Invoice ID.
*/
public function getEntityId();

/**
* Sets entity ID.
*
* @param int $entityId
* @return $this
*/
public function setEntityId($entityId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,29 @@

namespace Magento\Sales\Api\Data;

use Magento\Framework\Api\ExtensibleDataInterface;

/**
* Interface InvoiceCommentCreationInterface
*
* @api
*/
interface InvoiceCommentCreationInterface extends \Magento\Sales\Api\Data\CommentInterface
interface InvoiceCommentCreationInterface extends ExtensibleDataInterface, CommentInterface
{
/**
* Retrieve existing extension attributes object or create a new one.
*
* @return \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface|null
*/
public function getExtensionAttributes();

/**
* Set an extension attributes object.
*
* @param \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface $extensionAttributes
* @return $this
*/
public function setExtensionAttributes(
\Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface $extensionAttributes
);
}
51 changes: 3 additions & 48 deletions app/code/Magento/Sales/Api/Data/InvoiceCommentInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@
*/
namespace Magento\Sales\Api\Data;

use Magento\Framework\Api\ExtensibleDataInterface;

/**
* Invoice comment interface.
*
* An invoice is a record of the receipt of payment for an order. An invoice can include comments that detail the
* invoice history.
* @api
*/
interface InvoiceCommentInterface extends \Magento\Framework\Api\ExtensibleDataInterface,
\Magento\Sales\Api\Data\InvoiceCommentCreationInterface
interface InvoiceCommentInterface extends ExtensibleDataInterface, CommentInterface, EntityInterface
{
/**#@+
* Constants for keys of data array. Identical to the name of the getter in snake case.
*/
/*
* Entity ID.
*/
const ENTITY_ID = 'entity_id';
/*
* Parent ID.
*/
Expand All @@ -30,48 +27,6 @@ interface InvoiceCommentInterface extends \Magento\Framework\Api\ExtensibleDataI
* Is-customer-notified flag.
*/
const IS_CUSTOMER_NOTIFIED = 'is_customer_notified';
/*
* Is-visible-on-storefront flag.
*/
const IS_VISIBLE_ON_FRONT = 'is_visible_on_front';
/*
* Comment.
*/
const COMMENT = 'comment';
/*
* Created-at timestamp.
*/
const CREATED_AT = 'created_at';

/**
* Gets the created-at timestamp for the invoice.
*
* @return string|null Created-at timestamp.
*/
public function getCreatedAt();

/**
* Sets the created-at timestamp for the invoice.
*
* @param string $createdAt timestamp
* @return $this
*/
public function setCreatedAt($createdAt);

/**
* Gets the ID for the invoice.
*
* @return int|null Invoice ID.
*/
public function getEntityId();

/**
* Sets entity ID.
*
* @param int $entityId
* @return $this
*/
public function setEntityId($entityId);

/**
* Gets the is-customer-notified flag value for the invoice.
Expand Down
20 changes: 19 additions & 1 deletion app/code/Magento/Sales/Api/Data/InvoiceItemCreationInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,31 @@

namespace Magento\Sales\Api\Data;

use Magento\Framework\Api\ExtensibleDataInterface;

/**
* Input argument for invoice creation
*
* Interface InvoiceItemCreationInterface
*
* @api
*/
interface InvoiceItemCreationInterface extends LineItemInterface
interface InvoiceItemCreationInterface extends LineItemInterface, ExtensibleDataInterface
{
/**
* Retrieve existing extension attributes object or create a new one.
*
* @return \Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface|null
*/
public function getExtensionAttributes();

/**
* Set an extension attributes object.
*
* @param \Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface $extensionAttributes
* @return $this
*/
public function setExtensionAttributes(
\Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface $extensionAttributes
);
}
5 changes: 3 additions & 2 deletions app/code/Magento/Sales/Api/Data/InvoiceItemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
*/
namespace Magento\Sales\Api\Data;

use Magento\Framework\Api\ExtensibleDataInterface;

/**
* Invoice item interface.
*
* An invoice is a record of the receipt of payment for an order. An invoice item is a purchased item in an invoice.
* @api
*/
interface InvoiceItemInterface extends \Magento\Sales\Api\Data\InvoiceItemCreationInterface,
\Magento\Framework\Api\ExtensibleDataInterface
interface InvoiceItemInterface extends ExtensibleDataInterface, LineItemInterface
{
/**#@+
* Constants for keys of data array. Identical to the name of the getter in snake case.
Expand Down
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;

use Magento\Framework\Api\ExtensibleDataInterface;

/**
* Interface ShipmentCommentCreationInterface
* @api
*/
interface ShipmentCommentCreationInterface extends ExtensibleDataInterface, CommentInterface
{
/**
* Retrieve existing extension attributes object or create a new one.
*
* @return \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface|null
*/
public function getExtensionAttributes();

/**
* Set an extension attributes object.
*
* @param \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface $extensionAttributes
* @return $this
*/
public function setExtensionAttributes(
\Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface $extensionAttributes
);
}
80 changes: 3 additions & 77 deletions app/code/Magento/Sales/Api/Data/ShipmentCommentInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@
*/
namespace Magento\Sales\Api\Data;

use Magento\Framework\Api\ExtensibleDataInterface;

/**
* Shipment comment interface.
*
* A shipment is a delivery package that contains products. A shipment document accompanies the shipment. This
* document lists the products and their quantities in the delivery package. A shipment document can contain comments.
* @api
*/
interface ShipmentCommentInterface extends \Magento\Framework\Api\ExtensibleDataInterface
interface ShipmentCommentInterface extends ExtensibleDataInterface, CommentInterface, EntityInterface
{
/**#@+
* Constants for keys of data array. Identical to the name of the getter in snake case.
*/
/*
* Entity ID.
*/
const ENTITY_ID = 'entity_id';
/*
* Parent ID.
*/
Expand All @@ -29,55 +27,6 @@ interface ShipmentCommentInterface extends \Magento\Framework\Api\ExtensibleData
* Is-customer-notified flag.
*/
const IS_CUSTOMER_NOTIFIED = 'is_customer_notified';
/*
* Is-visible-on-storefront flag.
*/
const IS_VISIBLE_ON_FRONT = 'is_visible_on_front';
/*
* Comment.
*/
const COMMENT = 'comment';
/*
* Created-at timestamp.
*/
const CREATED_AT = 'created_at';

/**
* Gets the comment for the shipment.
*
* @return string Comment.
*/
public function getComment();

/**
* Gets the created-at timestamp for the shipment comment.
*
* @return string|null Created-at timestamp.
*/
public function getCreatedAt();

/**
* Sets the created-at timestamp for the shipment comment.
*
* @param string $createdAt timestamp
* @return $this
*/
public function setCreatedAt($createdAt);

/**
* Gets the ID for the shipment comment.
*
* @return int|null Shipment comment ID.
*/
public function getEntityId();

/**
* Sets entity ID.
*
* @param int $entityId
* @return $this
*/
public function setEntityId($entityId);

/**
* Gets the is-customer-notified flag value for the shipment comment.
Expand All @@ -86,13 +35,6 @@ public function setEntityId($entityId);
*/
public function getIsCustomerNotified();

/**
* Gets the is-visible-on-storefront flag value for the shipment comment.
*
* @return int Is-visible-on-storefront flag value.
*/
public function getIsVisibleOnFront();

/**
* Gets the parent ID for the shipment comment.
*
Expand All @@ -116,22 +58,6 @@ public function setParentId($id);
*/
public function setIsCustomerNotified($isCustomerNotified);

/**
* Sets the is-visible-on-storefront flag value for the shipment comment.
*
* @param int $isVisibleOnFront
* @return $this
*/
public function setIsVisibleOnFront($isVisibleOnFront);

/**
* Sets the comment for the shipment.
*
* @param string $comment
* @return $this
*/
public function setComment($comment);

/**
* Retrieve existing extension attributes object or create a new one.
*
Expand Down
Loading

0 comments on commit adfd12a

Please sign in to comment.