Class CustomerAccountEndpoint
java.lang.Object
com.broadleafcommerce.customer.web.endpoint.CustomerAccountEndpoint
@FrameworkRestController
@FrameworkMapping("/accounts/customer-accounts")
@DataRouteByExample(Customer.class)
public class CustomerAccountEndpoint
extends Object
Endpoint for reading/managing customer accounts from a customer facing perspective.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCustomerAccountEndpoint
(CustomerAccountService<Account, AccountMember> customerAccountService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteAccountMember
(String accountId, String memberId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected CustomerAccountService<Account,
AccountMember> myAccounts
(int childAccountDepth, boolean filterParents, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) readAccountMember
(String accountId, String memberId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) org.springframework.data.domain.Page<AccountMember>
readAccountMembers
(String accountId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) updateAccountMember
(String accountId, String memberId, UpdateAccountMemberRequest accountMember, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
Field Details
-
BASE_URI
- See Also:
-
-
Constructor Details
-
CustomerAccountEndpoint
public CustomerAccountEndpoint(CustomerAccountService<Account, AccountMember> customerAccountService)
-
-
Method Details
-
readAccountMembers
@FrameworkGetMapping("/{accountId}") @Policy(permissionRoots="ACCOUNT_USERS") public org.springframework.data.domain.Page<AccountMember> readAccountMembers(@PathVariable String accountId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
readAccountMember
@FrameworkGetMapping("/{accountId}/account-member/{memberId}") @Policy(permissionRoots="ACCOUNT_USERS") public AccountMember readAccountMember(@PathVariable String accountId, @PathVariable String memberId, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
updateAccountMember
@FrameworkPutMapping("/{accountId}/account-member/{memberId}") @FrameworkPatchMapping("/{accountId}/account-member/{memberId}") @Policy(permissionRoots="ACCOUNT_USERS") public AccountMember updateAccountMember(@PathVariable String accountId, @PathVariable String memberId, @RequestBody UpdateAccountMemberRequest accountMember, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
deleteAccountMember
@FrameworkDeleteMapping("/{accountId}/account-member/{memberId}") @Policy(permissionRoots="ACCOUNT_USERS") public void deleteAccountMember(@PathVariable String accountId, @PathVariable String memberId, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
myAccounts
@Policy(permissionRoots={"CUSTOMER","CUSTOMER_PROFILE"}) @FrameworkGetMapping("/my-accounts") public List<Account> myAccounts(@RequestParam(required=false,defaultValue="0",name="subAccountDepth") int childAccountDepth, @RequestParam(required=false,defaultValue="true") boolean filterParents, cz.jirutka.rsql.parser.ast.Node filters, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getCustomerAccountService
-