We need the ability to allow the tenant to specify the starting value of the voucher number sequence. This endpoint allows for the specification of the start (and next) value and makes the change to the sequence via ALTER SEQUENCE <sequenceName> START with <value> RESTART;. The setval(...) function is insufficient in this case since it does not change the start value, only the current/next value.
See the API Listing document for details
NOTE: It's understood that this could potentially result in returning a sequence number which was previously returned (in the case of new start < current). This is acceptable and duplicate voucher numbers will be handled elsewhere. This endpoint should remain as simple as possible.
- RAML and module descriptor are updated
- The API is implemented as described above
- Unit tests are updated