I am trying to use class based views where I need to implement 3 different endpoints on GET method.
/coupons
/coupons/{id}
/coupons/{id}/{code}
Should I define 3 different classes or can this be accomodated inside a single class.
I am trying to use class based views where I need to implement 3 different endpoints on GET method.
/coupons
/coupons/{id}
/coupons/{id}/{code}
Should I define 3 different classes or can this be accomodated inside a single class.
Three classes. Each class can have a single url.