public class OrderServiceImpl extends java.lang.Object implements OrderService
| Modifier and Type | Field and Description |
|---|---|
protected ProjectEndpoints |
endpoints |
protected org.codehaus.jackson.type.TypeReference<QueryResult<T>> |
queryResultTypeReference |
protected RequestFactory |
requestFactory |
protected org.codehaus.jackson.type.TypeReference<T> |
typeReference |
| Constructor and Description |
|---|
OrderServiceImpl(RequestFactory requestFactory,
ProjectEndpoints endpoints) |
| Modifier and Type | Method and Description |
|---|---|
QueryRequest<Order> |
all()
Deprecated.
|
FetchRequest<Order> |
byId(java.lang.String id)
Finds an order by an id.
|
protected CommandRequest<T> |
createCommandRequest(java.lang.String url,
Command command) |
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.
|
protected QueryRequest<T> |
queryImpl(java.lang.String url) |
CommandRequest<Order> |
updateOrder(VersionedId orderId,
OrderUpdate orderUpdate)
Updates the order, e.g.
|
CommandRequest<Order> |
updatePaymentState(VersionedId orderId,
PaymentState paymentState)
Deprecated.
|
CommandRequest<Order> |
updateShipmentState(VersionedId orderId,
ShipmentState shipmentState)
Deprecated.
|
protected ProjectEndpoints endpoints
protected RequestFactory requestFactory
protected org.codehaus.jackson.type.TypeReference<T> typeReference
protected org.codehaus.jackson.type.TypeReference<QueryResult<T>> queryResultTypeReference
public OrderServiceImpl(RequestFactory requestFactory, ProjectEndpoints endpoints)
public FetchRequest<Order> byId(java.lang.String id)
OrderServicebyId in interface OrderService@Deprecated public QueryRequest<Order> all()
OrderServiceall in interface OrderServicepublic QueryRequest<Order> query()
OrderServicequery in interface OrderServicepublic QueryRequest<Order> forCustomer(java.lang.String customerId)
OrderServiceforCustomer in interface OrderService@Deprecated public CommandRequest<Order> updatePaymentState(VersionedId orderId, PaymentState paymentState)
OrderServiceupdatePaymentState in interface OrderService@Deprecated public CommandRequest<Order> updateShipmentState(VersionedId orderId, ShipmentState shipmentState)
OrderServiceupdateShipmentState in interface OrderServicepublic CommandRequest<Order> updateOrder(VersionedId orderId, OrderUpdate orderUpdate)
OrderServiceupdateOrder in interface OrderServiceorderId - the versioned id of the order to updateorderUpdate - the changes to be appliedpublic CommandRequest<Order> createOrder(VersionedId cartId, PaymentState paymentState)
OrderServicecreateOrder in interface OrderServiceOutOfStockException 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.
public CommandRequest<Order> createOrder(VersionedId cartId)
OrderServicecreateOrder in interface OrderServiceOutOfStockException 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.
public CommandRequest<Order> createOrder(CreateOrderBuilder builder)
OrderServicecreateOrder in interface OrderServiceOutOfStockException 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.
protected CommandRequest<T> createCommandRequest(java.lang.String url, Command command)
protected QueryRequest<T> queryImpl(java.lang.String url)