com.razorpay.ItemClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of razorpay-java Show documentation
Show all versions of razorpay-java Show documentation
Official java bindings for the Razorpay API
package com.razorpay;
import java.util.List;
import org.json.JSONObject;
public class ItemClient extends ApiClient{
ItemClient(String auth) {
super(auth);
}
public Item create(JSONObject request) throws RazorpayException {
return post(Constants.VERSION, Constants.ITEMS, request);
}
public Item fetch(String id) throws RazorpayException {
return get(Constants.VERSION, String.format(Constants.ITEM, id), null);
}
public List- fetchAll() throws RazorpayException {
return fetchAll(null);
}
public Item edit(String id, JSONObject request) throws RazorpayException {
return patch(Constants.VERSION, String.format(Constants.ITEM, id), request);
}
public List
- fetchAll(JSONObject request) throws RazorpayException {
return getCollection(Constants.VERSION, Constants.ITEMS, request);
}
public List
- delete(String id) throws RazorpayException {
return delete(Constants.VERSION, String.format(Constants.ITEM, id), null);
}
}