package com.yidianling.ydlcommon.custom.http

import com.yidianling.ydlcommon.custom.base.BaseHttp
import com.yidianling.ydlcommon.custom.http.params.*
import com.yidianling.ydlcommon.custom.http.response.Balance
import com.yidianling.ydlcommon.custom.http.response.Recharge
import com.yidianling.ydlcommon.custom.http.response.TestAddOrderBean
import com.yidianling.ydlcommon.custom.http.response.WXPay
import com.yidianling.ydlcommon.custom.pay.redpacket.RedPacketBean
import com.yidianling.ydlcommon.custom.ui.confideredpacket.RedListParam
import io.reactivex.Observable

/**
 * author : Zhangwenchao
 * e-mail : zhangwch@yidianling.com
 * time   : 2018/02/03
 */
interface YdlCommonHttp: BaseHttp {

    fun uploadLog(param: LogParam): Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<Any>>

    fun wxRecharge(param: WXRechargeIdParam): Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<WXPay>>

    fun getBalance(param: BalanceParam): Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<Balance>>

    //获取红包列表
    fun getCoupon() : Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<ArrayList<RedPacketBean>>>

    //测评下单接口
    fun addOrder(param : AddOrderParam) : Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<TestAddOrderBean>>

    // 获得充值单号
    fun recharge(param: RechargeParam): Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<Recharge>>

    // 付款
    fun pay(param: BalancePayParam): Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<Any>>

    // 微信支付
    fun wxPay(param: PayParam.WxPayParam): Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<WXPay>>

    // 阿里支付
    fun aliPay(param: PayParam.AliPayParam): Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<Recharge>>

    //获取红包列表
    fun getRedList(param: RedListParam) : Observable<com.yidianling.ydlcommon.custom.http.BaseResponse<Any>>
}