package com.app.simplitend.cg_subscription.mvp;

import com.app.simplitend.cg_subscription.SubscriptionPlan;
import com.app.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;

import java.util.ArrayList;
import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface SubscriptionApiService {

    @GET("api/list-of-plans")
    Call<CallResponse<ArrayList<SubscriptionPlan>>> getSubscriptionPlans(@Header("Authorization") String token);

    @Multipart
    @POST("api/pay-subscription")
    Call<CallResponse<SubscriptionCredentials>> paySubscription(
            @Header("Authorization") String token,
            @PartMap Map<String, RequestBody> body);

    @Multipart
    @POST("api/create-subscription")
    Call<CallResponse<Object>> createSubscription(
            @Header("Authorization") String token,
            @PartMap Map<String, RequestBody> bodyMap
    );

    @GET("api/get-subscription-details")
    Call<CallResponse<CurrentPlan>> getCurrentPlan(@Query("caregiver_id") long c_id,
                                                   @Header("Authorization") String token);

    @POST("api/cancel-subscription")
    Call<CallResponse<CurrentPlan>> cancelSubscription(@Body Map<String, String> body,
                                                       @Header("Authorization") String token);

}
