I need to design a REST API for use with Angular usecases
The Resources are designed like ORDER, ADRESS, and so on
But how do I transport information that is specific for a usecase within that design?
Lets say, I have the resources ORDER, CUSTOMER, PRODCUT and the usecase “BuyStuff” and now I want special Info an the angular page like:
- This customer gets y% rebate
- happy hour with 10% rebate is from 3-4pm
- the usecase is only avaible between 8am and 4pm
- angular button should be displayed on spcial condition (like marital status or anything else unrelated to the product or something very special which is not in the plain customer resource)
What is the way to go?
1.) A special Resource “UseCaseX-needs-this-info”
2.) to put these info to an existing resource (like product, where it essential does not belong, since it is usecase)
3.) any other way?