Hello there,
I have a web API, which calls 3rd party APIs. A client wants me to put daily sales limits based on terminals (cash registers in shops). I am calculating the current total sales in the AuthorizationFilterAttribute. There are 11 different items a client can purchase. In the request, I am getting the item code, there is no price. Price returns from the 3rd party APIs. In order to correctly calculate daily total sales based on a terminal, I have to know the current request's price. Now, I can add if statements but it is not manageable. I can create a table adding item codes and their prices but still, it is not so elegant. Further I will go to DB one more time. I am hesitant about how to solve, what are your suggestions?
Best Regards.
I have a web API, which calls 3rd party APIs. A client wants me to put daily sales limits based on terminals (cash registers in shops). I am calculating the current total sales in the AuthorizationFilterAttribute. There are 11 different items a client can purchase. In the request, I am getting the item code, there is no price. Price returns from the 3rd party APIs. In order to correctly calculate daily total sales based on a terminal, I have to know the current request's price. Now, I can add if statements but it is not manageable. I can create a table adding item codes and their prices but still, it is not so elegant. Further I will go to DB one more time. I am hesitant about how to solve, what are your suggestions?
Best Regards.