CustomerPage fetchCustomers()

in api/src/main/java/org/apache/fineract/cn/customer/api/v1/client/CustomerManager.java [68:94]


  CustomerPage fetchCustomers(@RequestParam(value = "term", required = false) final String term,
                              @RequestParam(value = "includeClosed", required = false) final Boolean includeClosed,
                              @RequestParam(value = "pageIndex", required = false) final Integer pageIndex,
                              @RequestParam(value = "size", required = false) final Integer size,
                              @RequestParam(value = "sortColumn", required = false) final String sortColumn,
                              @RequestParam(value = "sortDirection", required = false) final String sortDirection);

  @RequestMapping(
      value = "/customers/{identifier}",
      method = RequestMethod.GET,
      produces = MediaType.ALL_VALUE,
      consumes = MediaType.APPLICATION_JSON_VALUE
  )
  @ThrowsException(status = HttpStatus.NOT_FOUND, exception = CustomerNotFoundException.class)
  Customer findCustomer(@PathVariable("identifier") final String identifier);

  default boolean isCustomerInGoodStanding(final String customerIdentifier) {
    final Customer customer;
    try {
      customer = this.findCustomer(customerIdentifier);
    }
    catch (CustomerNotFoundException e) {
      return false;
    }
    final Customer.State state = Customer.State.valueOf(customer.getCurrentState());
    return (state == Customer.State.ACTIVE);
  }