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.
-
-
Constructor Summary
Constructors Constructor Description CustomerAccountEndpoint(CustomerAccountService<Account,AccountMember> customerAccountService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteAccountMember(String accountId, String memberId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected CustomerAccountService<Account,AccountMember>
getCustomerAccountService()
List<Account>
myAccounts(int childAccountDepth, boolean filterParents, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
AccountMember
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)
AccountMember
updateAccountMember(String accountId, String memberId, UpdateAccountMemberRequest accountMember, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
-
-
Field Detail
-
BASE_URI
public static final String BASE_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CustomerAccountEndpoint
public CustomerAccountEndpoint(CustomerAccountService<Account,AccountMember> customerAccountService)
-
-
Method Detail
-
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
protected CustomerAccountService<Account,AccountMember> getCustomerAccountService()
-
-