Interface AssistedServiceService
- All Known Implementing Classes:
DefaultAssistedServiceService
public interface AssistedServiceService
Service layer interface for Assisted Service methods.
-
Method Summary
Modifier and TypeMethodDescriptionvoidbindCustomerToCart(String customerId, String cartId) Binds customer with provided id to cart if it's anonymous cart.voidbindCustomerToCartWithoutEmulating(String customerId, String cartId) Binds customer with provided id to cart if it's anonymous cart, but not emulate the customer.createNewCustomer(String customerId, String customerName) Creates a new customer by it email and name.gerOrderByCode(String orderCode, UserModel customer) Deprecated, for removal: This API element is subject to removal in a future version.Returns ASM session object with all information about current asm session.Returns the PointOfServiceModel for the logged in as agent.Returns the PointOfServiceModel for the given as agent.getCartByCode(String cartCode, UserModel customer) search cart by code and customergetCartsForCustomer(CustomerModel customer) Returns collection of a customer's cartsgetCustomer(String customerId) returns customergetCustomers(String searchCriteria, PageableData pageableData) Get list of customers which username or email starts with provided value.getLatestModifiedCart(UserModel customer) search for a cart with most resent CartModel::getModifiedtimegetOrderByCode(String orderCode, UserModel customer) search for orderbooleanisAbstractOrderMatchBaseSite(AbstractOrderModel abstractOrderModel) Returns true when provided abstractOrderModel relates to current base sitevoidrestoreCartToUser(CartModel cart, UserModel user) Restore cart to provided user
-
Method Details
-
bindCustomerToCart
Binds customer with provided id to cart if it's anonymous cart.- Parameters:
customerId- This is id of the customer to whom we want to bind a cartcartId- the id of the customer cart to pick up- Throws:
AssistedServiceException- in case cart with given cartId is not anonymous
-
bindCustomerToCartWithoutEmulating
void bindCustomerToCartWithoutEmulating(String customerId, String cartId) throws AssistedServiceException Binds customer with provided id to cart if it's anonymous cart, but not emulate the customer.- Parameters:
customerId- This is id of the customer to whom we want to bind a cartcartId- the id of anonymous cart to be bound with user- Throws:
AssistedServiceException- In case of missing cart with given cartId OR the cart is not anonymous OR missing customer with the customerId
-
createNewCustomer
CustomerModel createNewCustomer(String customerId, String customerName) throws DuplicateUidException Creates a new customer by it email and name.- Parameters:
customerId- email of to be newly created customer that is used as uidcustomerName- name of to be newly created customer (firstname and surname separated by space symbol)- Returns:
- newly created
CustomerModel - Throws:
DuplicateUidException- in case customer with given customerId already exists
-
getCartsForCustomer
Returns collection of a customer's carts- Parameters:
customer- customer model whose carts to be returned- Returns:
- collection of the customer's cart models
-
getCustomer
returns customer- Parameters:
customerId- email of to be newly created customer that is used as uid- Returns:
- a UserModel for given customerId
-
getLatestModifiedCart
search for a cart with most resent CartModel::getModifiedtime- Parameters:
customer- customer model whose latest modified cart to be returned- Returns:
- a latest modified cart by given customer
-
gerOrderByCode
@Deprecated(since="6.6", forRemoval=true) OrderModel gerOrderByCode(String orderCode, UserModel customer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.6, usegetOrderByCode(String, UserModel)insteadsearch for order- Parameters:
orderCode- the order's codecustomer- customer model whose order to be returned- Returns:
- an OrderModel with given code and given customer
-
getOrderByCode
search for order- Parameters:
orderCode- the order's codecustomer- customer model whose order to be returned- Returns:
- an OrderModel with given code and given customer
-
isAbstractOrderMatchBaseSite
Returns true when provided abstractOrderModel relates to current base site- Parameters:
abstractOrderModel- order model- Returns:
- true in case order is made against current
BaseSite
-
getCartByCode
search cart by code and customer- Parameters:
cartCode- the cart's codecustomer- customer model whose cart to be returned- Returns:
- a CartModel of cart with given cartCode and customer
-
getAsmSession
AssistedServiceSession getAsmSession()Returns ASM session object with all information about current asm session.- Returns:
- asm session object
-
restoreCartToUser
Restore cart to provided user- Parameters:
cart- cart model to be restoreduser- user model which cart to be restored
-
getAssistedServiceAgentStore
PointOfServiceModel getAssistedServiceAgentStore()Returns the PointOfServiceModel for the logged in as agent.- Returns:
- PointOfServiceModel
-
getAssistedServiceAgentStore
Returns the PointOfServiceModel for the given as agent.- Parameters:
agent- AS agent- Returns:
- PointOfServiceModel a PointOfServiceModel for the given as agent.
-
getCustomers
Get list of customers which username or email starts with provided value.- Parameters:
searchCriteria- uid or customer's namepageableData- pageable properties- Returns:
- suggested customers
-
getOrderByCode(String, UserModel)instead