ResponseEntity createCustomer()

in service/src/main/java/org/apache/fineract/cn/customer/rest/controller/CustomerRestController.java [134:146]


  ResponseEntity<Void> createCustomer(@RequestBody @Valid final Customer customer) throws InterruptedException {
    if (this.customerService.customerExists(customer.getIdentifier())) {
      throw ServiceException.conflict("Customer {0} already exists.", customer.getIdentifier());
    }

    if (customer.getCustomValues() != null) {
      this.fieldValueValidator.validateValues(customer.getCustomValues());
    }

    this.commandGateway.process(new CreateCustomerCommand(customer));

    return ResponseEntity.accepted().build();
  }