You are asked to create a magento module that introduces an extra validation on the "add to cart" action:
- the customer should be able to add a product to cart only if the product stock is greater than a threshold value.
- the threshold must be configurable in Magento backoffice
- the threshold value must also be configurable via a REST API call