/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package id.amigogroup.posterminal.api; import id.amigogroup.posterminal.model.Barang; import id.amigogroup.posterminal.model.DNotaTunai; import id.amigogroup.posterminal.model.MNotaRetur; import id.amigogroup.posterminal.model.MNotaTunai; import id.amigogroup.posterminal.model.NoBarang; import id.amigogroup.posterminal.model.Pagination; import io.reactivex.Observable; import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Path; /** * * @author ronal */ public interface ServiceApiBarang { //BARANG //Mengambil Barang by Kode Barang @GET("barangs/kode/{kode}") Observable getBarangByKodeBarang(@Path("kode") String kode); //Mengambil Barang Berdasarkan Nama Barang @GET("barangs/nama/{namaBarang}") Observable> getBarangByNamaBarang(@Path("namaBarang") String namaBarang); //NO-BARANG //Mengambil No Barang by Id Gabungan & Ukuran @GET("no-barangs/id-gabungan/{idGabungan}/kolom-urut/nomor") Observable> getByIdGabunganSortNomor( @Path("idGabungan") String idGabungan); //Mengambil No Barang by Id Gabungan & Ukuran @GET("no-barangs/id-gabungan/{idGabungan}/nomor/{nomor}") Observable getByIdGabunganNomor( @Path("idGabungan") String idGabungan, @Path("nomor") String nomor); //Update Stok Operasional Berdasarkan Id Gabungan dan Nomor @PUT("no-barangs/id-gabungan/{idGabungan}/nomor/{nomor}/stok-operasional/{operasi}") Observable> updateStokOperasionalByIdGabunganDanNomor( @Path("idGabungan") String idGabungan, @Path("nomor") String nomor, @Path("operasi") String operasi); //M-NOTA-TUNAI //Mengambil Master Nota Tunai by No Nota @GET("m-nota-tunai/no-nota/{noNota}") Observable getMNotaTunaiByNoNota(@Path("noNota") String noNota); //Validasi Master Nota Tunai by No Nota @GET("m-nota-tunai/no-nota/{noNota}/valid") Observable validasiMNotaTunaiByNoNotaTanggal(@Path("noNota") String noNota); //Generate No Nota @GET("m-nota-tunai/generate/{idtoko}") Observable generateNoNota(@Path("idtoko") String idToko); //Add Nota Tunai @POST("m-nota-tunai/toko/{idtoko}") Observable addMNotaTunai( @Path("idtoko") String idToko, @Body MNotaTunai mNotaTunai); //D-NOTA-TUNAI //Mengambil Detail Nota Tunai by No Nota @GET("d-nota-tunai/no-nota/{noNota}") Observable> getDNotaTunaiByNoNota(@Path("noNota") String noNota); //Add Nota Tunai @POST("d-nota-tunai") Observable addDNotaTunai(@Body DNotaTunai dNotaTunai); //M-NOTA-BAWA // //Mengambil Master Nota Bawa Dulu by No Nota // @GET("m-nota-bawa/no-nota/{noNota}") // Observable getMNotaBawaByNoNota(@Path("noNota") String noNota); // // //Mengambil Master Nota Bon by No Nota // @GET("m-nota-bon/no-nota/{noNota}") // Observable getMNotaBonByNoNota(@Path("noNota") String noNota); //M-NOTA-RETUR //Mengambil Master Nota Retur by No Nota @GET("m-nota-retur/no-nota/{noNota}") Observable getMNotaReturByNoNota(@Path("noNota") String noNota); }