serum-390 / soen390-team16-godzilla

Codename GODZILLA: project for course SOEN-390
GNU General Public License v3.0
4 stars 0 forks source link

Shipping #191

Closed Ysabz closed 3 years ago

Ysabz commented 3 years ago

Description

This PR : 1) allows scheduling the packaged orders for shipping 2) allows selecting the shipping method and date 3) calculates the shipping price based on the shipping method and the number of items in the order 4) a log file to log the information on shipping

Link to work item

TODO: Include a link to the work item E.g.: #1

How to Test

1) To schedule shipping for a sales order : validate and schedule the order by sending a POST request as follows : http://localhost:8080/api/shipping-manager/validate/?shippingDate=2021-04-24&method=air&orderID={someOrderID} Notice !! the date should be in future or current date otherwise the request is invalid. The order id should be valid . The possible methods are : air, car, ferry

2) after sending this request, query the shipping items by sending a GET request as follows : http://localhost:8080/api/shipping/

the status of the shipping item should be scheduled. after shipping is complete in 2mins [for demo purpose] the status of the order and the shipping item should be both shipped

3) To cancel the shipping send a POST request as follows http://localhost:8080/api/shipping-manager/cancel/{shippingItemid}

the status of the shipping item should be canceled