-
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 remote-tracking branch 'mainline/develop' into MAGETWO-36298
- Loading branch information
Showing
100 changed files
with
6,220 additions
and
492 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
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
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
32 changes: 32 additions & 0 deletions
32
app/code/Magento/Quote/Api/GuestBillingAddressManagementInterface.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 © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Quote\Api; | ||
|
||
/** | ||
* Billing address management interface for guest carts. | ||
*/ | ||
interface GuestBillingAddressManagementInterface | ||
{ | ||
/** | ||
* Assigns a specified billing address to a specified cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @param \Magento\Quote\Api\Data\AddressInterface $address Billing address data. | ||
* @return int Address ID. | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
* @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid. | ||
*/ | ||
public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $address); | ||
|
||
/** | ||
* Returns the billing address for a specified quote. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @return \Magento\Quote\Api\Data\AddressInterface Quote billing address object. | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
*/ | ||
public function get($cartId); | ||
} |
43 changes: 43 additions & 0 deletions
43
app/code/Magento/Quote/Api/GuestCartItemRepositoryInterface.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,43 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Quote\Api; | ||
|
||
/** | ||
* Cart Item repository interface for guest carts. | ||
*/ | ||
interface GuestCartItemRepositoryInterface | ||
{ | ||
/** | ||
* Lists items that are assigned to a specified cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @return \Magento\Quote\Api\Data\CartItemInterface[] Array of items. | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
*/ | ||
public function getList($cartId); | ||
|
||
/** | ||
* Adds the specified item to the specified cart. | ||
* | ||
* @param \Magento\Quote\Api\Data\CartItemInterface $cartItem The item. | ||
* @return \Magento\Quote\Api\Data\CartItemInterface Item. | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
* @throws \Magento\Framework\Exception\CouldNotSaveException The specified item could not be saved to the cart. | ||
* @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid. | ||
*/ | ||
public function save(\Magento\Quote\Api\Data\CartItemInterface $cartItem); | ||
|
||
/** | ||
* Removes the specified item from the specified cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @param int $itemId The item ID of the item to be removed. | ||
* @return bool | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist. | ||
* @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be removed. | ||
*/ | ||
public function deleteById($cartId, $itemId); | ||
} |
38 changes: 38 additions & 0 deletions
38
app/code/Magento/Quote/Api/GuestCartManagementInterface.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,38 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Quote\Api; | ||
|
||
/** | ||
* Cart Management interface for guest carts. | ||
*/ | ||
interface GuestCartManagementInterface | ||
{ | ||
/** | ||
* Enables an customer or guest user to create an empty cart and quote for an anonymous customer. | ||
* | ||
* @return string Cart ID. | ||
* @throws \Magento\Framework\Exception\CouldNotSaveException The empty cart and quote could not be created. | ||
*/ | ||
public function createEmptyCart(); | ||
|
||
/** | ||
* Assigns a specified customer to a specified shopping cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @param int $customerId The customer ID. | ||
* @param int $storeId | ||
* @return boolean | ||
*/ | ||
public function assignCustomer($cartId, $customerId, $storeId); | ||
|
||
/** | ||
* Places an order for a specified cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @return int Order ID. | ||
*/ | ||
public function placeOrder($cartId); | ||
} |
21 changes: 21 additions & 0 deletions
21
app/code/Magento/Quote/Api/GuestCartRepositoryInterface.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,21 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Quote\Api; | ||
|
||
/** | ||
* Cart Repository interface for guest carts. | ||
*/ | ||
interface GuestCartRepositoryInterface | ||
{ | ||
/** | ||
* Enables a guest user to return information for a specified cart. | ||
* | ||
* @param string $cartId | ||
* @return \Magento\Quote\Api\Data\CartInterface | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException | ||
*/ | ||
public function get($cartId); | ||
} |
22 changes: 22 additions & 0 deletions
22
app/code/Magento/Quote/Api/GuestCartTotalRepositoryInterface.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,22 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Quote\Api; | ||
|
||
/** | ||
* Cart totals repository interface for guest carts. | ||
*/ | ||
interface GuestCartTotalRepositoryInterface | ||
{ | ||
/** | ||
* Returns quote totals data for a specified cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @return \Magento\Quote\Api\Data\TotalsInterface Quote totals data. | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
*/ | ||
public function get($cartId); | ||
} |
44 changes: 44 additions & 0 deletions
44
app/code/Magento/Quote/Api/GuestCouponManagementInterface.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,44 @@ | ||
<?php | ||
/** | ||
* | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Quote\Api; | ||
|
||
/** | ||
* Coupon management interface for guest carts. | ||
*/ | ||
interface GuestCouponManagementInterface | ||
{ | ||
/** | ||
* Returns information for a coupon in a specified cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @return string The coupon code data. | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
*/ | ||
public function get($cartId); | ||
|
||
/** | ||
* Adds a coupon by code to a specified cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @param string $couponCode The coupon code data. | ||
* @return bool | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
* @throws \Magento\Framework\Exception\CouldNotSaveException The specified coupon could not be added. | ||
*/ | ||
public function set($cartId, $couponCode); | ||
|
||
/** | ||
* Deletes a coupon from a specified cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @return bool | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
* @throws \Magento\Framework\Exception\CouldNotDeleteException The specified coupon could not be deleted. | ||
*/ | ||
public function remove($cartId); | ||
} |
42 changes: 42 additions & 0 deletions
42
app/code/Magento/Quote/Api/GuestPaymentMethodManagementInterface.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,42 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Quote\Api; | ||
|
||
/** | ||
* Payment method management interface for guest carts. | ||
*/ | ||
interface GuestPaymentMethodManagementInterface | ||
{ | ||
/** | ||
* Adds a specified payment method to a specified shopping cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @param \Magento\Quote\Api\Data\PaymentInterface $method The payment method. | ||
* @return int Payment method ID. | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
* @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address | ||
* is not set, or the specified payment method is not available. | ||
*/ | ||
public function set($cartId, \Magento\Quote\Api\Data\PaymentInterface $method); | ||
|
||
/** | ||
* Returns the payment method for a specified shopping cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @return \Magento\Quote\Api\Data\PaymentInterface Payment method object. | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
*/ | ||
public function get($cartId); | ||
|
||
/** | ||
* Lists available payment methods for a specified shopping cart. | ||
* | ||
* @param string $cartId The cart ID. | ||
* @return \Magento\Quote\Api\Data\PaymentMethodInterface[] Array of payment methods. | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist. | ||
*/ | ||
public function getList($cartId); | ||
} |
Oops, something went wrong.