#need help editing my method so it can work with two similar DTOs

4 messages · Page 1 of 1 (latest)

meager merlin
#

hi guys. so i have a method validateRequest. and i want to do changes in my code so it can be called twice, from two different places:
perlasService.validateRequest(perlasIdCheckRequestDTO); and
perlasService.validateRequest(perlasSaleRequestDTO);

Now my PerlasIdCheckRequestDTO is: https://pastecode.io/s/c3a9kmkq

PerlasSaleRequestDTO is: https://pastecode.io/s/u9um8pzr

and validateRequest is: https://pastecode.io/s/1iqnm5x5

And the thing is that idk how to design/change my DTOs ir validateRequest method. Can smb help me out? thanks

tardy stirrupBOT
#

This post has been reserved for your question.

Hey @meager merlin! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

autumn sun
#

create an interface with the common getters?