Our teams is having the following discussion:
Let's say we have the following two methods:
public Response Withdraw(int clubId, int terminalId,int cardId, string invoice, decimal amount);
public Response Withdraw(Club club, Terminal terminal,Card card, string invoice, decimal amount);
whats sent over-the-wire are just the ids.
one side says that the first method is correct, because we only have the ids of terminal and club, and it should be clear that we have nothing else, this is my approach.
the other side says that the second method is correct because it's more flexible.
We are familiar with object parameter idea, the other side also thinks that the object parameter should have the objects as properties.
Which is the correct approach?
Maybe there is a third even better approach?