mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
commit
1d4704483f
@ -34,17 +34,6 @@ public class ItemEntry {
|
||||
this.listID = listID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ItemEntry{" +
|
||||
"listID=" + listID +
|
||||
", productID=" + productID +
|
||||
", quantity=" + quantity +
|
||||
", addedDate=" + addedDate +
|
||||
", purchased=" + purchased +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Integer getProductID() {
|
||||
return productID;
|
||||
}
|
||||
|
||||
@ -44,6 +44,12 @@ public class Requestor {
|
||||
deleteObject(id, classType, null);
|
||||
}
|
||||
|
||||
public void deleteObject(Object toDelete) {
|
||||
String deleteURL = DEV_BASEURL + "/" + toDelete.getClass().getSimpleName();
|
||||
Request deleteRequest = buildBaseRequest(deleteURL, "DELETE", new Gson().toJson(toDelete));
|
||||
launchCall(deleteRequest, null, toDelete.getClass(), null);
|
||||
}
|
||||
|
||||
public void deleteObject(String id, Class classType, RequestErrorHandler failureHandler) {
|
||||
String deleteURL = DEV_BASEURL + "/" + classType.getSimpleName() + "?id=" + id;
|
||||
Request deleteRequest = buildBaseRequest(deleteURL, "DELETE", "{}");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user