CSCI-GA-2820-FA24-003 / products

NYU DevOps Products Service Fall 2024
Apache License 2.0
0 stars 1 forks source link

Implement Action Route for Apply Discount to Product #60

Closed NBFYayI closed 3 days ago

NBFYayI commented 2 weeks ago

As a Product Manager I need the ability to apply discounts to products So that I can manage promotions and sales effectively

Details and Assumptions

Given a product exists in the system
When I apply a valid discount percentage to the product
Then the product's price is reduced accordingly, saved, and displayed correctly when retrieved
Given I provide an invalid discount percentage (e.g., negative number, over 100%)
When I attempt to apply the discount
Then the system returns a 400 Bad Request error with an appropriate message
Given a product does not exist
When I attempt to apply a discount to it
Then the system returns a 404 Not Found error