package com.example.petstoremobile.api;

import com.example.petstoremobile.dtos.PageResponse;
import com.example.petstoremobile.dtos.SaleDTO;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface SaleApi {

    @GET("api/v1/sales")
    Call<PageResponse<SaleDTO>> getAllSales(
            @Query("page") int page,
            @Query("size") int size,
            @Query("q") String query,
            @Query("paymentMethod") String paymentMethod,
            @Query("storeId") Long storeId,
            @Query("isRefund") Boolean isRefund,
            @Query("customerId") Long customerId,
            @Query("sort") String sort);

    @GET("api/v1/sales/{id}")
    Call<SaleDTO> getSaleById(@Path("id") Long id);

    @POST("api/v1/sales")
    Call<SaleDTO> createSale(@Body SaleDTO sale);
}
