public interface OrderService
Modifier and Type | Method and Description |
---|---|
QueryRequest<Order> |
all()
Deprecated.
since 0.49.0. Use
query() instead. |
FetchRequest<Order> |
byId(java.lang.String id)
Finds an order by an id.
|
CommandRequest<Order> |
createOrder(CreateOrderBuilder builder)
Creates an order based on a cart, and deletes the cart.
|
CommandRequest<Order> |
createOrder(VersionedId cartId)
Creates an order based on a cart, and deletes the cart.
|
CommandRequest<Order> |
createOrder(VersionedId cartId,
PaymentState paymentState)
Creates an order based on a cart, and deletes the cart.
|
QueryRequest<Order> |
forCustomer(java.lang.String customerId)
Queries all orders of given customer.
|
QueryRequest<Order> |
query()
Queries orders in current project.
|
CommandRequest<Order> |
updateOrder(VersionedId orderId,
OrderUpdate orderUpdate)
Updates the order, e.g.
|
CommandRequest<Order> |
updatePaymentState(VersionedId orderId,
PaymentState paymentState)
Deprecated.
since 0.51.0, use
updateOrder(io.sphere.client.model.VersionedId, io.sphere.client.shop.model.OrderUpdate)
instead, e.g.
updateOrder(orderId, new OrderUpdate().setPaymentState(paymentState)); . |
CommandRequest<Order> |
updateShipmentState(VersionedId orderId,
ShipmentState shipmentState)
Deprecated.
since 0.51.0, use
updateOrder(io.sphere.client.model.VersionedId, io.sphere.client.shop.model.OrderUpdate)
instead, e.g.
updateOrder(orderId, new OrderUpdate().setShipmentState(shipmentState)); . |
FetchRequest<Order> byId(java.lang.String id)
@Deprecated QueryRequest<Order> all()
query()
instead.QueryRequest<Order> query()
QueryRequest<Order> forCustomer(java.lang.String customerId)
@Deprecated CommandRequest<Order> updatePaymentState(VersionedId orderId, PaymentState paymentState)
updateOrder(io.sphere.client.model.VersionedId, io.sphere.client.shop.model.OrderUpdate)
instead, e.g.
updateOrder(orderId, new OrderUpdate().setPaymentState(paymentState));
.@Deprecated CommandRequest<Order> updateShipmentState(VersionedId orderId, ShipmentState shipmentState)
updateOrder(io.sphere.client.model.VersionedId, io.sphere.client.shop.model.OrderUpdate)
instead, e.g.
updateOrder(orderId, new OrderUpdate().setShipmentState(shipmentState));
.CommandRequest<Order> updateOrder(VersionedId orderId, OrderUpdate orderUpdate)
orderId
- the versioned id of the order to updateorderUpdate
- the changes to be appliedCommandRequest<Order> createOrder(VersionedId cartId)
OutOfStockException
if some of the products
in the cart are not available anymore.
This can only happen if the cart is in the
ReserveOnOrder
mode.
PriceChangedException
if the price, tax or
shipping of some line items changed since the items were added to the cart.
CommandRequest<Order> createOrder(VersionedId cartId, PaymentState paymentState)
OutOfStockException
if some of the products
in the cart are not available anymore.
This can only happen if the cart is in the
ReserveOnOrder
mode.
PriceChangedException
if the price, tax or
shipping of some line items changed since the items were added to the cart.
CommandRequest<Order> createOrder(CreateOrderBuilder builder)
OutOfStockException
if some of the products
in the cart are not available anymore.
This can only happen if the cart is in the
ReserveOnOrder
mode.
PriceChangedException
if the price, tax or
shipping of some line items changed since the items were added to the cart.