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

com.razorpay.TransferClient Maven / Gradle / Ivy

There is a newer version: 1.4.7
Show newest version
package com.razorpay;

import java.util.List;

import org.json.JSONObject;

public class TransferClient extends ApiClient {

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

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

  public Transfer edit(String id, JSONObject request) throws RazorpayException {
    return patch(Constants.VERSION, String.format(Constants.TRANSFER_EDIT, id), request);
  }

  public Reversal reversal(String id, JSONObject request) throws RazorpayException {
    return post(Constants.VERSION, String.format(Constants.TRANSFER_REVERSAL_CREATE, id), request);
  }

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

  public List fetchReversal(String id) throws RazorpayException {
    return getCollection(Constants.VERSION, String.format(Constants.TRANSFER_REVERSAL_CREATE, id), null);
  }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy