package org.springblade.common.upyzt.model;

import org.springblade.common.upyzt.exception.UpyztException;
import org.springblade.common.upyzt.net.APIResource;
import org.springblade.common.upyzt.net.RequestOptions;
import org.springblade.common.upyzt.resp.BalanceTxnPaginationResp;
import lombok.experimental.Accessors;

import java.util.Map;

@Accessors(chain = true)
public class BalanceTransaction extends APIResource {

    /**
     * 电子账簿流水查询
     *
     * @param params 请求参数
     * @return 返回参数
     * @throws UpyztException 异常
     */
    public static BalanceTxnPaginationResp page(Map<String, Object> params) throws UpyztException {
        return page(params, null);
    }

    /**
     * 电子账簿流水查询
     *
     * @param params  请求参数
     * @param options 参数选项
     * @return 返回参数
     * @throws UpyztException 异常
     */
    public static BalanceTxnPaginationResp page(Map<String, Object> params, RequestOptions options) throws UpyztException {
        return APIResource.request(RequestMethod.GET, classURL(BalanceTransaction.class), params, BalanceTxnPaginationResp.class, options);
    }


}
