package es.verdnatura.domain

import android.content.Context
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
import es.verdnatura.presentation.view.feature.calidad.model.ItemBuyerVO
import retrofit2.Call

class GetQualityUserCase(context: Context) : RestClient(context) {

    fun itemShelvingBuyerGet(usuario: String, password: String): Call<List<BuyerVO>> {
        return restClient!!.itemShelvingBuyerGet("json", "1", usuario, password, "application/json")
    }

    fun itemShelvingBuyerTask(
        usuario: String,
        password: String,
        userFk: String
    ): Call<List<ItemBuyerVO>> {
        val params: ArrayList<String> = ArrayList()
        params.add(userFk)
        return restClient!!.itemShelvingBuyerTask(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }

    fun itemShelvingStarsUpdate(
        usuario: String,
        password: String,
        vId: String,
        vStars: String
    ): Call<Any> {
        val params: ArrayList<String> = ArrayList()
        params.add(vId)
        params.add(vStars)
        return restClient!!.itemShelvingStarsUpdate(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }
}