All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.razorpay.SettlementClient Maven / Gradle / Ivy

The newest version!
package com.razorpay;

import java.util.List;

import org.json.JSONObject;

public class SettlementClient extends ApiClient {

    SettlementClient(String auth) {
        super(auth);
    }

    /**
     * It is wrapper of fetchAll with parameter here sending null defines fetchAll
     * with a default values without filteration
     * @throws RazorpayException
     */
    public List fetchAll() throws RazorpayException {
        return fetchAll(null);
    }

    /**
     * This method get list of Settlements filtered by parameters @request
     * @throws RazorpayException
     */
    public List fetchAll(JSONObject request) throws RazorpayException {
        return getCollection(Constants.VERSION, Constants.SETTLEMENTS, request);
    }

    public Settlement fetch(String id) throws RazorpayException {
        return get(Constants.VERSION, String.format(Constants.SETTLEMENT, id), null);
    }

    public List reports(JSONObject request) throws RazorpayException {
        return getCollection(Constants.VERSION, Constants.SETTLEMENTS_REPORTS, request);
    }

    public List reports() throws RazorpayException {
        return reports(null);
    }

    public Settlement create(JSONObject request) throws RazorpayException {
        return post(Constants.VERSION, Constants.SETTLEMENTS_INSTANT, request);
    }

    /**
     * It is wrapper of fetchAllDemand with parameter here sending null defines fetchAllDemand
     * with a default values without filteration
     * @throws RazorpayException
     */
    public List fetchAllDemand() throws RazorpayException {
        return fetchAllDemand(null);
    }

    /**
     * This method get list of demand Settlements filtered by parameters @request
     * @throws RazorpayException
     */
    public List fetchAllDemand(JSONObject request) throws RazorpayException {
        return getCollection(Constants.VERSION, Constants.SETTLEMENTS_INSTANT, request);
    }

    public Settlement fetchDemandSettlement(String id) throws RazorpayException {
        return get(Constants.VERSION, String.format(Constants.SETTLEMENT_INSTANT, id), null);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy