use of org.folio.rest.jaxrs.model.SequenceNumber in project mod-invoice by folio-org.
the class VouchersApiTest method testGetVoucherNumberStart.
@Test
public void testGetVoucherNumberStart() {
logger.info("=== Test Get Voucher number start value - success ===");
SequenceNumber number = verifyGet(VOUCHER_NUMBER_START_PATH, APPLICATION_JSON, 200).as(SequenceNumber.class);
assertThat(number.getSequenceNumber()).isNotBlank();
}
use of org.folio.rest.jaxrs.model.SequenceNumber in project mod-invoice by folio-org.
the class VoucherNumberService method setStartValue.
/**
* This endpoint is a means for the UI to set/reset the start value of the voucher-number sequence
* @param value start value to be set/reset
* @return completable future on success or {@code null} if validation fails or an exception if any issue happens
*/
public CompletableFuture<Void> setStartValue(String value, RequestContext requestContext) {
RequestEntry requestEntry = new RequestEntry(resourcesPath(VOUCHER_NUMBER_START) + "/{startNumber}");
requestEntry.withPathParameter("startNumber", value);
return restClient.post(requestEntry, null, requestContext, SequenceNumber.class).thenAccept(sequenceNumber -> {
});
}
Aggregations