You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
3.5 KiB
Java
98 lines
3.5 KiB
Java
/*
|
|
* 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<Barang> getBarangByKodeBarang(@Path("kode") String kode);
|
|
|
|
//Mengambil Barang Berdasarkan Nama Barang
|
|
@GET("barangs/nama/{namaBarang}")
|
|
Observable<Pagination<Barang>> getBarangByNamaBarang(@Path("namaBarang") String namaBarang);
|
|
|
|
//NO-BARANG
|
|
//Mengambil No Barang by Id Gabungan & Ukuran
|
|
@GET("no-barangs/id-gabungan/{idGabungan}/kolom-urut/nomor")
|
|
Observable<List<NoBarang>> getByIdGabunganSortNomor(
|
|
@Path("idGabungan") String idGabungan);
|
|
|
|
//Mengambil No Barang by Id Gabungan & Ukuran
|
|
@GET("no-barangs/id-gabungan/{idGabungan}/nomor/{nomor}")
|
|
Observable<NoBarang> 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<Pagination<Barang>> 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<MNotaTunai> getMNotaTunaiByNoNota(@Path("noNota") String noNota);
|
|
|
|
//Validasi Master Nota Tunai by No Nota
|
|
@GET("m-nota-tunai/no-nota/{noNota}/valid")
|
|
Observable<ResponseBody> validasiMNotaTunaiByNoNotaTanggal(@Path("noNota") String noNota);
|
|
|
|
//Generate No Nota
|
|
@GET("m-nota-tunai/generate/{idtoko}")
|
|
Observable<String> generateNoNota(@Path("idtoko") String idToko);
|
|
|
|
//Add Nota Tunai
|
|
@POST("m-nota-tunai/toko/{idtoko}")
|
|
Observable<MNotaTunai> 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<List<DNotaTunai>> getDNotaTunaiByNoNota(@Path("noNota") String noNota);
|
|
|
|
//Add Nota Tunai
|
|
@POST("d-nota-tunai")
|
|
Observable<Void> addDNotaTunai(@Body DNotaTunai dNotaTunai);
|
|
|
|
//M-NOTA-BAWA
|
|
// //Mengambil Master Nota Bawa Dulu by No Nota
|
|
// @GET("m-nota-bawa/no-nota/{noNota}")
|
|
// Observable<MNotaTunai> getMNotaBawaByNoNota(@Path("noNota") String noNota);
|
|
//
|
|
// //Mengambil Master Nota Bon by No Nota
|
|
// @GET("m-nota-bon/no-nota/{noNota}")
|
|
// Observable<MNotaTunai> getMNotaBonByNoNota(@Path("noNota") String noNota);
|
|
|
|
//M-NOTA-RETUR
|
|
//Mengambil Master Nota Retur by No Nota
|
|
@GET("m-nota-retur/no-nota/{noNota}")
|
|
Observable<MNotaRetur> getMNotaReturByNoNota(@Path("noNota") String noNota);
|
|
}
|