public void documentUnlockDrawer()

in component-test/src/main/java/org/apache/fineract/cn/teller/TellerApiDocumentation.java [582:622]


  public void documentUnlockDrawer ( ) throws Exception {

    final Teller teller = this.prepareTeller();

    final UnlockDrawerCommand unlockDrawerCommand = new UnlockDrawerCommand();
    unlockDrawerCommand.setEmployeeIdentifier(AbstractTellerTest.TEST_USER);
    unlockDrawerCommand.setPassword(teller.getPassword());

    Gson gson = new Gson();
    this.mockMvc.perform(post("/teller/" + teller.getCode() + "/drawer")
            .contentType(MediaType.APPLICATION_JSON_VALUE)
            .content(gson.toJson(unlockDrawerCommand))
            .accept(MediaType.APPLICATION_JSON_VALUE))
            .andExpect(status().isOk())
            .andDo(document("document-unlock-drawer", preprocessResponse(prettyPrint()),
                    responseFields(
                            fieldWithPath("code").description("Teller Code"),
                            fieldWithPath("password").type("String").description("Password to unlock drawer"),
                            fieldWithPath("cashdrawLimit").type("BigDecimal").description("Cash draw limit"),
                            fieldWithPath("tellerAccountIdentifier").description("Teller Account Identifier"),
                            fieldWithPath("vaultAccountIdentifier").description("Vault account identifier"),
                            fieldWithPath("chequesReceivableAccount").description("Cheques receivables account"),
                            fieldWithPath("cashOverShortAccount").description("Cash Over/Short Account"),
                            fieldWithPath("denominationRequired").description("Denomination Required ?"),
                            fieldWithPath("assignedEmployee").description("Assigned Employee"),
                            fieldWithPath("state").description(" State of Teller " +
                                    " + \n" +
                                    " *enum* _State_ { + \n" +
                                    "    ACTIVE, + \n" +
                                    "    CLOSED, + \n" +
                                    "    OPEN, + \n" +
                                    "    PAUSED + \n" +
                                    "  }"),
                            fieldWithPath("createdBy").description("Employee who created teller"),
                            fieldWithPath("createdOn").description("Date employee was created"),
                            fieldWithPath("lastModifiedBy").type("String").description("Employee who last modified teller"),
                            fieldWithPath("lastModifiedOn").type("String").description("Date when teller was last modified"),
                            fieldWithPath("lastOpenedBy").type("String").description("Last employee who opened teller"),
                            fieldWithPath("lastOpenedOn").type("String").description("Last time teller was opened")
                    )));
  }