The sale JSON being POSTed to the
/api/sales URI should be compatible with your Java
Sale domain class. This means that Gson will be able to use the JSON to create a Java sale object from the request body.
The Jooby route listening for POST requests to
Get the request and convert it to a
Sale object (use the
/api/register route in the customer module as a guide).
Add a complete
toString to your
Sale class if you haven't done so already so that you can print the entire sale details.
Save the sale using a sale DAO. The next section covers how to implement the DAO save method.
If you have completed the <> button then you should be able to see the complete sale details appear in the NetBeans output pane when you click the button.