package kr.co.vividnext.sodalive.mypage.can.payment

import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import io.reactivex.rxjava3.core.Single
import kr.co.vividnext.sodalive.common.ApiResponse
import kr.co.vividnext.sodalive.mypage.can.charge.pg.ChargeResponse
import kr.co.vividnext.sodalive.mypage.can.charge.pg.VerifyRequest
import retrofit2.http.Body
import retrofit2.http.Header
import retrofit2.http.POST

interface CanTempApi {
    @POST("/charge/temp")
    fun chargeCan(
        @Body chargeRequest: ChargeTempRequest,
        @Header("Authorization") authHeader: String
    ): Single<ApiResponse<ChargeResponse>>

    @POST("/charge/temp/verify")
    fun verifyCharge(
        @Body request: VerifyRequest,
        @Header("Authorization") authHeader: String
    ): Single<ApiResponse<Any>>
}

@Keep
data class ChargeTempRequest(
    @SerializedName("can") val can: Int,
    @SerializedName("price") val price: Int,
    @SerializedName("paymentGateway") val paymentGateway: PaymentGateway
)
