public interface CustomerAccountService
| Modifier and Type | Method and Description |
|---|---|
void |
changePassword(UserModel userModel,
java.lang.String oldPassword,
java.lang.String newPassword)
Changes user password.
|
void |
changeUid(java.lang.String newUid,
java.lang.String currentPassword)
Changes uid for current user
|
void |
clearDefaultAddressEntry(CustomerModel customerModel)
Clears default address on the given customer
|
CustomerModel |
closeAccount(CustomerModel user)
Close Account for a customer.
|
void |
convertGuestToCustomer(java.lang.String pwd,
java.lang.String orderGUID)
Converts a Guest Customer of anonymous checkout to a regular customer
|
CreditCardPaymentInfoModel |
createPaymentSubscription(CustomerModel customerModel,
CardInfo cardInfo,
BillingInfo billingInfo,
java.lang.String titleCode,
java.lang.String paymentProvider,
boolean saveInAccount)
Creates a payment subscription using specified
paymentProvider. |
void |
deleteAddressEntry(CustomerModel customerModel,
AddressModel addressModel)
Delete address entry.
|
void |
deleteCCPaymentInfo(CustomerModel customerModel,
CreditCardPaymentInfoModel creditCardPaymentInfo)
Delete credit card payment info.
|
void |
forgottenPassword(CustomerModel customerModel)
Sends a forgotten password event
|
java.util.List<AddressModel> |
getAddressBookDeliveryEntries(CustomerModel customerModel)
Returns all delivery address book entries from the given customer.
|
java.util.List<AddressModel> |
getAddressBookEntries(CustomerModel customerModel)
Returns all visible address book entries from the given customer.
|
AddressModel |
getAddressForCode(CustomerModel customerModel,
java.lang.String code)
Get a customer address given its code
|
java.util.List<AddressModel> |
getAllAddressEntries(CustomerModel customerModel)
Returns all address book entries from the given customer.
|
CreditCardPaymentInfoModel |
getCreditCardPaymentInfoForCode(CustomerModel customerModel,
java.lang.String code)
Retrieves the customer's credit card payment info given its code
|
java.util.List<CreditCardPaymentInfoModel> |
getCreditCardPaymentInfos(CustomerModel customerModel,
boolean saved)
Retrieves the customer's list of credit card payment information.
|
AddressModel |
getDefaultAddress(CustomerModel customerModel)
Returns a customer default shipping address
|
OrderModel |
getGuestOrderForGUID(java.lang.String guid,
BaseStoreModel store)
Fetch the
OrderModel for the given GUID,Store details and the expiry date for Guest Customers. |
OrderModel |
getOrderDetailsForGUID(java.lang.String guid,
BaseStoreModel store)
Returns the orderModel based on the guid and base store
|
OrderModel |
getOrderForCode(CustomerModel customerModel,
java.lang.String code,
BaseStoreModel store)
Returns the specified order for the supplied user.
|
OrderModel |
getOrderForCode(java.lang.String code,
BaseStoreModel store)
Returns the orderModel based on order code and base store
|
java.util.List<OrderModel> |
getOrderList(CustomerModel customerModel,
BaseStoreModel store,
OrderStatus[] status)
Returns the order of the supplied user filtering by OrderStatus
|
SearchPageData<OrderModel> |
getOrderList(CustomerModel customerModel,
BaseStoreModel store,
OrderStatus[] status,
PageableData pageableData)
Returns the order of the supplied user filtering by OrderStatus
|
SearchPageData<ReturnRequestModel> |
getReturnRequestsByCustomerAndStore(CustomerModel customerModel,
BaseStoreModel store,
ReturnStatus[] returnStatuses,
PageableData pageableData)
Returns the
ReturnRequestModel of the given user filtered by given list of ReturnStatus(s). |
java.util.Collection<TitleModel> |
getTitles()
Returns all available customer titles in the system.
|
void |
register(CustomerModel customerModel,
java.lang.String password)
Register a user with given parameters
|
void |
registerGuestForAnonymousCheckout(CustomerModel customerModel,
java.lang.String password)
Registers the Guest customer to session cart for anonymous checkout
|
void |
saveAddressEntry(CustomerModel customerModel,
AddressModel addressModel)
Save address entry.
|
void |
setDefaultAddressEntry(CustomerModel customerModel,
AddressModel addressModel)
Sets the default address entry.
|
void |
setDefaultPaymentInfo(CustomerModel customerModel,
PaymentInfoModel paymentInfoModel)
Sets the default
paymentInfoModel for the specified customerModel. |
void |
unlinkCCPaymentInfo(CustomerModel customerModel,
CreditCardPaymentInfoModel creditCardPaymentInfo)
Deprecated.
|
void |
updatePassword(java.lang.String token,
java.lang.String newPassword)
Update the password for the user by decrypting and validating the token.
|
void |
updateProfile(CustomerModel customerModel,
java.lang.String titleCode,
java.lang.String name,
java.lang.String login)
Updates the current user with the given parameters
|
CreditCardPaymentInfoModel createPaymentSubscription(CustomerModel customerModel, CardInfo cardInfo, BillingInfo billingInfo, java.lang.String titleCode, java.lang.String paymentProvider, boolean saveInAccount)
paymentProvider.customerModel - the customer model to add a new payment subscription cardPaymentInfoModelcardInfo - the card detailsbillingInfo - the payment address detailstitleCode - the title code of the payment address details. this parameter can be nullpaymentProvider - the payment provider value specifies provider that will be used to create subscription ID.saveInAccount - true to save in customer account to reuse the subscription for other transactionsvoid setDefaultPaymentInfo(CustomerModel customerModel, PaymentInfoModel paymentInfoModel)
paymentInfoModel for the specified customerModel. Both arguments must
be set and paymentInfoModel must belong to the specified customerModel.customerModel - the customer model to set default paymentInfoModelpaymentInfoModel - the payment info model to be set as defaultjava.lang.IllegalArgumentException - the illegal argument exception if any argument is nulljava.util.List<CreditCardPaymentInfoModel> getCreditCardPaymentInfos(CustomerModel customerModel, boolean saved)
customerModel - the customer model for which to retrieve payment infosaved - true to retrieve only saved credit card payment informationCreditCardPaymentInfoModel getCreditCardPaymentInfoForCode(CustomerModel customerModel, java.lang.String code)
customerModel - the customercode - the codevoid deleteCCPaymentInfo(CustomerModel customerModel, CreditCardPaymentInfoModel creditCardPaymentInfo)
customerModel - the customer model that should be the address ownercreditCardPaymentInfo - payment info model that will be deletedjava.lang.IllegalArgumentException - the illegal argument exception is thrown when given payment info does not belong to the given customer
or any argument is null@Deprecated void unlinkCCPaymentInfo(CustomerModel customerModel, CreditCardPaymentInfoModel creditCardPaymentInfo)
deleteCCPaymentInfo(CustomerModel, CreditCardPaymentInfoModel)customerModel - the customer model that should be the address ownercreditCardPaymentInfo - payment info model that will be unlinkedjava.lang.IllegalArgumentException - the illegal argument exception is thrown when given payment info does not belong to the given customer
or any argument is nulljava.util.Collection<TitleModel> getTitles()
java.util.List<AddressModel> getAllAddressEntries(CustomerModel customerModel)
customerModel - the customer model to retrieve addresses fromjava.lang.IllegalArgumentException - the illegal argument exception if any argument is nulljava.util.List<AddressModel> getAddressBookEntries(CustomerModel customerModel)
customerModel - the customer model to retrieve addresses fromjava.lang.IllegalArgumentException - the illegal argument exception if any argument is nulljava.util.List<AddressModel> getAddressBookDeliveryEntries(CustomerModel customerModel)
customerModel - the customer model to retrieve addresses fromjava.lang.IllegalArgumentException - the illegal argument exception if any argument is nullAddressModel getAddressForCode(CustomerModel customerModel, java.lang.String code)
customerModel - the customercode - the address codeAddressModel getDefaultAddress(CustomerModel customerModel)
customerModel - void saveAddressEntry(CustomerModel customerModel, AddressModel addressModel)
customerModel - the customer model to save/reassign address.addressModel - the address model to save/createjava.lang.IllegalArgumentException - the illegal argument exception if any argument is nullvoid deleteAddressEntry(CustomerModel customerModel, AddressModel addressModel)
customerModel - the customer model that should be the address owneraddressModel - the address model that will be deletedjava.lang.IllegalArgumentException - the illegal argument exception is thrown when given address does not belong to the given customer or
any argument is nullvoid setDefaultAddressEntry(CustomerModel customerModel, AddressModel addressModel)
customerModel - the customer model to set default payment address foraddressModel - the address model to be set as default onejava.lang.IllegalArgumentException - the illegal argument exception if any argument is nullvoid clearDefaultAddressEntry(CustomerModel customerModel)
customerModel - the customervoid register(CustomerModel customerModel, java.lang.String password) throws DuplicateUidException
customerModel - the user data the user will be registered withpassword - the user's passwordjava.lang.IllegalArgumentException - if required data is missingDuplicateUidException - if the login is not uniquevoid updateProfile(CustomerModel customerModel, java.lang.String titleCode, java.lang.String name, java.lang.String login) throws DuplicateUidException
customerModel - the customer to updatetitleCode - the code for the title to setname - the full name to set on the customerlogin - the UID to set on the customerDuplicateUidException - if the email is not uniquevoid changePassword(UserModel userModel, java.lang.String oldPassword, java.lang.String newPassword) throws PasswordMismatchException
userModel - the user to change the password foroldPassword - old password to confirmnewPassword - new password to setPasswordMismatchException - if the given old password does not match the one stored in the systemvoid forgottenPassword(CustomerModel customerModel)
customerModel - the uservoid updatePassword(java.lang.String token,
java.lang.String newPassword)
throws TokenInvalidatedException
token - the password reset tokennewPassword - the new plain text passwordjava.lang.IllegalArgumentException - If the new password is empty or the token is invalid or expiredTokenInvalidatedException - if the token was already used or there is a newer tokenOrderModel getOrderForCode(CustomerModel customerModel, java.lang.String code, BaseStoreModel store)
customerModel - the user to retrieve order forcode - the code of the order to retrievestore - the current storejava.util.List<OrderModel> getOrderList(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status)
customerModel - the user to retrieve orders forstore - the current storestatus - One or more OrderStatuses to include in the resultSearchPageData<OrderModel> getOrderList(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status, PageableData pageableData)
customerModel - the user to retrieve orders forstore - the current storestatus - One or more OrderStatuses to include in the resultpageableData - pagination informationSearchPageData<ReturnRequestModel> getReturnRequestsByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, ReturnStatus[] returnStatuses, PageableData pageableData)
ReturnRequestModel of the given user filtered by given list of ReturnStatus(s).customerModel - the CustomerModel to retrieve return requests forstore - the current BaseStoreModelreturnStatuses - the ReturnStatus(s) to be included in the result. If null or empty then all statuses are includedpageableData - pagination informationReturnRequestModelvoid changeUid(java.lang.String newUid,
java.lang.String currentPassword)
throws DuplicateUidException,
PasswordMismatchException
newUid - given new uidcurrentPassword - password checked for authorization changeDuplicateUidException - if the newUid already exists in the systemPasswordMismatchException - if given currentPassword does not match the store one for the current userOrderModel getGuestOrderForGUID(java.lang.String guid, BaseStoreModel store)
OrderModel for the given GUID,Store details and the expiry date for Guest Customers.guid - GUID of the order which was created from the CartModelstore - BaseStoreModel for the current store which the Guest Customer is accessing.void registerGuestForAnonymousCheckout(CustomerModel customerModel, java.lang.String password) throws DuplicateUidException
customerModel - password - DuplicateUidExceptionOrderModel getOrderDetailsForGUID(java.lang.String guid, BaseStoreModel store)
guid - store - void convertGuestToCustomer(java.lang.String pwd,
java.lang.String orderGUID)
throws DuplicateUidException
pwd - orderGUID - DuplicateUidExceptionOrderModel getOrderForCode(java.lang.String code, BaseStoreModel store)
code - store - CustomerModel closeAccount(CustomerModel user)
user - customer whose account is to be closedUserModel.DEACTIVATIONDATE attributeCopyright © 2018 SAP SE. All Rights Reserved.