package com.example.petstoremobile.api;

import com.example.petstoremobile.dtos.RefundDTO;
import retrofit2.Call;
import retrofit2.http.*;

import java.util.List;

// api calls for refunds
public interface RefundApi {

    // Get all refunds
    @GET("api/v1/refunds")
    Call<List<RefundDTO>> getAllRefunds();

    // Get refund by id
    @GET("api/v1/refunds/{id}")
    Call<RefundDTO> getRefundById(@Path("id") Long id);

    // Create refund
    @POST("api/v1/refunds")
    Call<RefundDTO> createRefund(@Body RefundDTO refund);

    // Update refund
    @PUT("api/v1/refunds/{id}")
    Call<RefundDTO> updateRefund(@Path("id") Long id, @Body RefundDTO refund);

    // Delete refund
    @DELETE("api/v1/refunds/{id}")
    Call<Void> deleteRefund(@Path("id") Long id);
}