|
Generated by JDiff |
||||||||
| PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES | |||||||||
This file contains all the changes in documentation in the packageorg.cyclos.services.marketplaceas colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
Returns all delivery methods assigned to the given user, or the logged user if the givenidlocator is null.
Service interface for web shop orders. Orders can be created via the logged user's shopping cart (with status OrderStatus.SHOPPING_CART) or as a new sale by the seller (with status OrderStatus.DRAFT).Class OrderService, void accept(AcceptOrderParams)
Shopping carts are always for a logged user, and contains one order per seller and currency. The workflow is:
- Initially, the status is OrderStatus.SHOPPING_CART when the first product is added, via .addToCart(Long, BigDecimal). Product quantity can be modified with .modifyQuantityOnCart(Long, BigDecimal) or removed with .removeCartItem(Long). Alternatively, an entire cart can be removed with .removeCart(Long, Long).
- Once the cart is ok, it can be checked out with the .checkout(ShoppingCartCheckoutParams) method. This will change the order status to OrderStatus.PENDING_SELLER. If the delivery price is known, the total order amount is reserved on the buyer's account, the confirmation password (if any) is checked and the stock is updated.
- If the delivery price was not known, the seller will then need to fill in the delivery price and accept. In that case, the order will return for buyer's confirm (the status will be set to OrderStatus.PENDING_BUYER). Otherwise, if the delivery price was known, the amount reservation will be returned and the actual payment will be performed, and the new status will be OrderStatus.REALIZED.
- If the delivery price was previously set by the seller, the buyer will need to provide the confirmation password (if any) and accept. The actual payment will then be performed and the stock will be updated. The final status will be OrderStatus.REALIZED.
When a seller is creating an order:
- The order may be saved as many times as the seller wants, by using the CRUDService.save(
OrderDTOorg.cyclos.model.EntityDTO) method. Onlyordersorders withthethe OrderStatus.DRAFT status can be created / modified. No deeper validation is performed on draft orders.- When the order is ready, the seller submits it for the buyer to approve, using the .submitToBuyer(OrderDTO) method. At that point, the order needs the list of products and the delivery address, price and time set.
- The buyer selects the payment type and inputs the confirmation password (if any). The stock is then updated, the payment is performed and the new status will be OrderStatus.REALIZED.
When the status is OrderStatus.PENDING_BUYER, the buyer may reject the order, and the new status will be OrderStatus.REJECTED_BY_BUYER. The same accounts for OrderStatus.PENDING_SELLER and OrderStatus.REJECTED_BY_SELLER. @author luis @author micael
Accepts the given order, which should be in either OrderStatus.PENDING_BUYER or OrderStatus.PENDING_SELLER status, and needs the delivery price to be already set. When the buyer hasn't yet chosen a payment type, it is required now. Also, when no amount was reserved, the confirmation password will be checked before performing the actual payment. @return Returns true when the order is still missing the delivery price, or false if @throws TransferException When there was a problem while reserving the amount, like there is no available balance @throws PasswordException The given confirmation password is invalid @throws IllegalActionException The given order is not in either OrderStatus.PENDING_BUYER or OrderStatus.PENDING_SELLER status