PageRenderTime 49ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/app/src/main/java/com/webplat/merchant/cyberplate/utils/ServiceCallApi.java

https://bitbucket.org/wbplatadmin/cyberplat-merchant-app
Java | 381 lines | 291 code | 86 blank | 4 comment | 0 complexity | f88d4f465201f5db29deebf29c0a05f0 MD5 | raw file
  1. package com.webplat.merchant.cyberplate.utils;
  2. import com.webplat.merchant.cyberplate.dthbooking.pojo.RegionResponse;
  3. import com.webplat.merchant.cyberplate.dthbooking.pojo.RegionResponseData;
  4. import com.webplat.merchant.cyberplate.dthbooking.pojo.productdetails.ProductDetailsResponse;
  5. import com.webplat.merchant.cyberplate.newbbbps.pojo.bbpsbilling.BBPSBilling;
  6. import com.webplat.merchant.cyberplate.pojo.ResponseFromWebService;
  7. import com.webplat.merchant.cyberplate.pojo.TransactionStatus;
  8. import com.webplat.merchant.cyberplate.pojo.VersionCheckRes;
  9. import com.webplat.merchant.cyberplate.pojo.auto_selection.AutoOperatorSelection;
  10. import com.webplat.merchant.cyberplate.pojo.balance.UserBalance;
  11. import com.webplat.merchant.cyberplate.pojo.bank_details.BankDetails;
  12. import com.webplat.merchant.cyberplate.pojo.bbpscategory.OldBBPSCategory;
  13. import com.webplat.merchant.cyberplate.pojo.bbpssubcategory.BBPSSubcategory;
  14. import com.webplat.merchant.cyberplate.pojo.check_jio_bill.CheckJioBIll;
  15. import com.webplat.merchant.cyberplate.pojo.commission.CommissionReport;
  16. import com.webplat.merchant.cyberplate.pojo.dispute_history.DisputesHistory;
  17. import com.webplat.merchant.cyberplate.pojo.giftcard_pojo.gift_card_category_list.GetGiftCategoryList;
  18. import com.webplat.merchant.cyberplate.pojo.giftcard_pojo.gift_card_product.GiftCardProduct;
  19. import com.webplat.merchant.cyberplate.pojo.giftcard_pojo.giftcard_placeorder.GetPlaceOrder;
  20. import com.webplat.merchant.cyberplate.pojo.giftcard_pojo.giftcatd_product_details.ProductDetails;
  21. import com.webplat.merchant.cyberplate.pojo.is_valid_domain.IsValidDomain;
  22. import com.webplat.merchant.cyberplate.pojo.login.LoginCheck;
  23. import com.webplat.merchant.cyberplate.pojo.operator.OperatorListServer;
  24. import com.webplat.merchant.cyberplate.pojo.pattern.PatternList;
  25. import com.webplat.merchant.cyberplate.pojo.payment_transfer_report.PaymentTransferReport;
  26. import com.webplat.merchant.cyberplate.pojo.pending_payment.PendingPaymentReport;
  27. import com.webplat.merchant.cyberplate.pojo.profile.UserProfile;
  28. import com.webplat.merchant.cyberplate.pojo.recharge_history.RechargeHistory;
  29. import com.webplat.merchant.cyberplate.pojo.recharge_response.RechargeResponse;
  30. import com.webplat.merchant.cyberplate.pojo.report.dashboard_usage.DashboardUsageReport;
  31. import com.webplat.merchant.cyberplate.pojo.report.dashboard_usage_details.DashboardUsageDetails;
  32. import com.webplat.merchant.cyberplate.pojo.report.monthly_commsiion.CommissionMonthlyReport;
  33. import com.webplat.merchant.cyberplate.pojo.report.statment.StatementReport;
  34. import com.webplat.merchant.cyberplate.pojo.reportcategory.CategoryHistory;
  35. import com.webplat.merchant.cyberplate.pojo.reportcategory.SubCategoryHistory;
  36. import com.webplat.merchant.cyberplate.pojo.service_auth.ServiceAuth;
  37. import com.webplat.merchant.cyberplate.pojo.summary_report.SuummaryTransaction;
  38. import com.webplat.merchant.cyberplate.pojo.surcharge.SurchargeReport;
  39. import com.webplat.merchant.cyberplate.pojo.utility_bill.CheckUtilityBIll;
  40. import com.webplat.merchant.cyberplate.pojo.view_user.ViewUser;
  41. import okhttp3.MultipartBody;
  42. import okhttp3.RequestBody;
  43. import retrofit2.Call;
  44. import retrofit2.http.Field;
  45. import retrofit2.http.FormUrlEncoded;
  46. import retrofit2.http.GET;
  47. import retrofit2.http.Multipart;
  48. import retrofit2.http.POST;
  49. import retrofit2.http.Part;
  50. import retrofit2.http.Query;
  51. /**
  52. * Created by pc3 on 28/11/2016.
  53. */
  54. public interface ServiceCallApi {
  55. @FormUrlEncoded
  56. @POST("operatorServices/GetOperatorName")
  57. Call<OperatorListServer> getOperator(@Field("ServiceId") String serviceID);
  58. @FormUrlEncoded
  59. @POST("PlanServices/GetCircleOperatorbyNumber")
  60. Call<AutoOperatorSelection> searchOperatorByNumber(@Field("number") String mobileNumberFiveDigit, @Field("ServiceID") String serviceId);
  61. @FormUrlEncoded
  62. @POST("UserLogin/GetSoftversionId")
  63. Call<VersionCheckRes> versionCode(@Field("Data") String packageName);
  64. @POST("UserLogin")
  65. Call<LoginCheck> getLoginInfo(@Query("UserName") String userName, @Query("Password") String password, @Query("IEMINo") String deviceID);
  66. @FormUrlEncoded
  67. @POST("Recharge/GetAllRecharge")
  68. Call<RechargeResponse> doRecharge(@Field("UserName") String userId, @Field("Password") String password, @Field("Amount") String amount,
  69. @Field("MobileNumber") String number, @Field("OPTID") String opcode, @Field("Circle") String circle, @Field("AccountType") String accountType,
  70. @Field("AccountNo") String accountNumber);
  71. @FormUrlEncoded
  72. @POST("ReportServices/GetLastTransaction")
  73. Call<RechargeHistory> getRechargeHistory(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate, @Field("ToDate") String toDate, @Field("Categoryid") String mainCategoryID, @Field("Subcategoryid") String subCategoryID, @Field("Operatorid") String Operatorid, @Field("Status") String sname);
  74. @FormUrlEncoded
  75. @POST("Recharge/TransactionCheckStatus")
  76. Call<TransactionStatus> getRechargeHistoryTransactionCheck(@Field("UserName") String userName, @Field("Password") String password, @Field("TranID") String TranID);
  77. @FormUrlEncoded
  78. @POST("RGUSER/GetUtilityBillPayValidate")
  79. Call<CheckUtilityBIll> validateUtilityBill(@Field("UserName") String userId, @Field("Password") String password, @Field("OperatorCode") String opcode, @Field("Number") String subScriberId,
  80. @Field("BillUnit") String billingUnit, @Field("CycleNo") String cycleNumber);
  81. @FormUrlEncoded
  82. @POST("UserLogin/GetUserbalance")
  83. Call<UserBalance> getUserBalance(@Field("UserName") String userName, @Field("Password") String password);
  84. @POST("UserLogin/PostForgotPin")
  85. Call<ResponseFromWebService> forgetPassword(@Query("MobileNumber") String username);
  86. @FormUrlEncoded
  87. @POST("Recharge/GetUtilityBillPay")
  88. Call<RechargeResponse> submitElectricityRequest(@Field("UserName") String userId,
  89. @Field("Password") String password,
  90. @Field("Amount") String amount,
  91. @Field("Number") String consumerId,
  92. @Field("OperatorCode") String opcode,
  93. @Field("CircleCode") String circleCode,
  94. @Field("Mode") String Mode,
  95. @Field("Param1") String CycleOrBillingUnit,
  96. @Field("Param2") String param2,
  97. @Field("Param3") String contactNumber,
  98. @Field("Param4") String param4,
  99. @Field("Param5") String Param5,
  100. @Field("Param6") String Param6);
  101. @POST("UserLogin/GetUserActivation")
  102. Call<ResponseFromWebService> activationCode(@Query("MobileNumber") String activationCode);
  103. @POST("UserLogin/GetUserActivationConfirm")
  104. Call<ResponseFromWebService> getUserActivationConfirm(@Query("MobileNumber") String mobileNumber, @Query("OTP") String otp);
  105. @POST("UserLogin/GetUserSetPassword")
  106. Call<ResponseFromWebService> setNewPassWord(@Query("MobileNumber") String mobileNumber, @Query("Password") String password);
  107. @FormUrlEncoded
  108. @POST("RGUSER/GetDisputeRaised")
  109. Call<ResponseFromWebService> makeComplain(@Field("UserName") String userId,
  110. @Field("Password") String password, @Field("TransId") String id, @Field("Number") String number);
  111. @FormUrlEncoded
  112. @POST("ReportServices/GetDisputeTransaction")
  113. Call<DisputesHistory> getDisputeHistory(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate, @Field("ToDate") String toDate);
  114. @FormUrlEncoded
  115. @POST("UserLogin/GetIsDomainCheck")
  116. Call<IsValidDomain> getDomainInfo(@Field("Mobile") String mobileNumber);
  117. @FormUrlEncoded
  118. @POST("ReportServices/GetCommissionTransaction")
  119. Call<CommissionReport> getDiscountHistory(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate, @Field("ToDate") String toDate, @Field("Categoryid") String mainCategoryID, @Field("Subcategoryid") String subCategoryID);
  120. @FormUrlEncoded
  121. @POST("ReportServices/GetSurchargeTransaction")
  122. Call<SurchargeReport> getSurchargeHistory(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate, @Field("ToDate") String toDate, @Field("Categoryid") String mainCategoryID, @Field("Subcategoryid") String subCategoryID);
  123. @FormUrlEncoded
  124. @POST("ReportServices/GetSummaryTransaction")
  125. Call<SuummaryTransaction> getSummaryReport(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate, @Field("ToDate") String toDate);
  126. @FormUrlEncoded
  127. @POST("UserLogin/GetChangePassword")
  128. Call<RechargeResponse> ChangePassword(@Field("UserName") String userName, @Field("Password") String oldPw, @Field("NewPassword") String newPw, @Field("OTP") String otp);
  129. @FormUrlEncoded
  130. @POST("UserLogin/GetChangeTPIN")
  131. Call<RechargeResponse> chnagetpin(@Field("UserName") String userName, @Field("Password") String oldPw, @Field("NewPassword") String newPw, @Field("OTP") String trim);
  132. @FormUrlEncoded
  133. @POST("UserLogin/Generateotp")
  134. Call<RechargeResponse> generateOTP(@Field("UserName") String userName, @Field("Password") String oldPw, @Field("Type") String newPw);
  135. @FormUrlEncoded
  136. @POST("UserLogin/GetUserProfileDetails")
  137. Call<UserProfile> getUserDetails(@Field("UserName") String userName, @Field("Password") String password);
  138. @FormUrlEncoded
  139. @POST("ReportServices/GetDashboardUsageChart")
  140. Call<DashboardUsageReport> getDashboardUsage(@Field("UserName") String userName, @Field("Password") String password);
  141. @FormUrlEncoded
  142. @POST("ReportServices/GetDashboardUsageDetails")
  143. Call<DashboardUsageDetails> getDashboardUsageDetailsData(@Field("UserName") String userName, @Field("Password") String password);
  144. @FormUrlEncoded
  145. @POST("ReportServices/GetCommissionMonthlyTransaction")
  146. Call<CommissionMonthlyReport> getMonthlyCommission(@Field("UserName") String userName, @Field("Password") String password);
  147. @FormUrlEncoded
  148. @POST("UserService/GetUserChildByName")
  149. Call<ViewUser> getUserByCatagory(@Field("UserName") String userName, @Field("Password") String password, @Field("UserType") String userSearchType);
  150. @FormUrlEncoded
  151. @POST("UserService/GetWallettowalletcr")
  152. Call<RechargeResponse> transferBalace(@Field("UserName") String userName, @Field("Password") String password, @Field("CrUserName") String name,
  153. @Field("Amount") String amount, @Field("Remarks") String remarks, @Field("Type") String transType, @Field("Credit") Boolean markAsCredit, @Field("TPIN") String tpin);
  154. @FormUrlEncoded
  155. @POST("UserService/GetUserChildByUserName")
  156. Call<ViewUser> getUserById(@Field("UserName") String userName, @Field("Password") String password, @Field("CurrentUserName") String searchUserName);
  157. @FormUrlEncoded
  158. @POST("BankServices/GetBankNameListBy")
  159. Call<BankDetails> getbankList(@Field("UserName") String userName, @Field("Password") String password);
  160. @FormUrlEncoded
  161. @POST("UserService/GetPaymentRequest")
  162. Call<RechargeResponse> paymentRequest(@Field("UserName") String userName, @Field("Password") String password,
  163. @Field("DepositbankId") String strBankCode,
  164. @Field("Amount") String amount, @Field("PaymentMode") String paymentTypeCode,
  165. @Field("RefNo") String refId, @Field("PaymentDate") String paymentDate,
  166. @Field("ChequeNo") String chequeNumber, @Field("ChequeDate") String chequeDate,
  167. @Field("Remarks") String remarks);
  168. @FormUrlEncoded
  169. @POST("ReportServices/GetChildPaymentRequestReport")
  170. Call<PendingPaymentReport> getChildPaymentReport(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate,
  171. @Field("ToDate") String toDate, @Field("Status") String status);
  172. @FormUrlEncoded
  173. @POST("UserService/GetUpdatePaymentRequest")
  174. Call<ResponseFromWebService> updatePendingPayment(@Field("UserName") String userName, @Field("Password") String password,
  175. @Field("Status") String acceptanceType, @Field("Remarks") String reason, @Field("Trxnid") String refNumber);
  176. @FormUrlEncoded
  177. @POST("ReportServices/GetPaymentRequestTransaction")
  178. Call<PendingPaymentReport> getpaymentRequestTransaction(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate,
  179. @Field("ToDate") String toDate, @Field("Status") String status);
  180. @FormUrlEncoded
  181. @POST("ReportServices/GetChildPaymentRequestTransaction")
  182. Call<PendingPaymentReport> getChildAcceptRejectHistory(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate,
  183. @Field("ToDate") String toDate);
  184. @FormUrlEncoded
  185. @POST("RGUSER/GetUtilityBillPayValidate")
  186. Call<CheckJioBIll> getValidateJioBill(@Field("UserName") String userId, @Field("Password") String password, @Field("OperatorCode") String opcode, @Field("Number") String subScriberId,
  187. @Field("BillUnit") String billingUnit, @Field("CycleNo") String cycleNumber);
  188. @FormUrlEncoded
  189. @POST("ReportServices/GetPaymentsTransactions")
  190. Call<PaymentTransferReport> getPaymentTransfer(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate,
  191. @Field("ToDate") String toDate);
  192. @FormUrlEncoded
  193. @POST("ReportServices/GetPaymentTransaction")
  194. Call<PaymentTransferReport> getPaymentTransferReportCredit(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate,
  195. @Field("ToDate") String toDate);
  196. @FormUrlEncoded
  197. @POST("DigipaymentsServices/UPICOllectRequest")
  198. Call<RechargeResponse> upiPayment(@Field("UserName") String userName, @Field("Password") String password, @Field("UPIId") String upiID, @Field("Amount") String amount, @Field("Remarks") String remarks);
  199. @POST("UserLogin/PostUserVerification")
  200. Call<LoginCheck> PostUserVerification(@Query("UserName") String username, @Query("Password") String password, @Query("IEMINo") String imeI, @Query("OTP") String OTP);
  201. @POST("OperatorServices/Categories")
  202. Call<OldBBPSCategory> getBBPSCatagaryURL();
  203. @FormUrlEncoded
  204. @POST("OperatorServices/bbpsOperatorName")
  205. Call<OperatorListServer> getBBPSOperator(@Field("CategoryId") String id);
  206. @FormUrlEncoded
  207. @POST("Recharge/BBPSBillPay")
  208. Call<CheckUtilityBIll> payBBPSBill(@Field("UserName") String userName,
  209. @Field("Password") String password,
  210. @Field("Number")String subscriberID,
  211. @Field("Amount") String amount,
  212. @Field("Mode") String mMode,
  213. @Field("Param1") String param1,
  214. @Field("Param2") String params2,
  215. @Field("Param3") String param3,
  216. @Field("CustomerMobileNo") String customerMobile,
  217. @Field("OperatorCode") String mOurCode,
  218. @Field("CircleCode") String circleCode,
  219. @Field("Geocode") String geoCode);
  220. @FormUrlEncoded
  221. @POST("Manageuser/patternlist")
  222. Call<PatternList> getPatternList(@Field("UserName") String userName, @Field("Password") String password, @Field("PatternType") String PatternType);
  223. @FormUrlEncoded
  224. @POST("Manageuser/ServiceAuthList")
  225. Call<ServiceAuth> getServiceAuth(@Field("UserName") String userName, @Field("Password") String password);
  226. @Multipart
  227. @POST("Manageuser/Userregistration")
  228. Call<RechargeResponse> userRegistration(@Part("Inputdata") RequestBody addUser, @Part MultipartBody.Part mURIPanCard, @Part MultipartBody.Part mURIOUTletImage, @Part MultipartBody.Part mURIPOBImage, @Part MultipartBody.Part mURICancelledCheck);
  229. @FormUrlEncoded
  230. @POST("Manageuser/FOSCreation")
  231. Call<RechargeResponse> addFOS(@Field("InputString") String inputData);
  232. @POST("OperatorServices/GetCategoryName")
  233. Call<CategoryHistory> getCategory();
  234. @FormUrlEncoded
  235. @POST("OperatorServices/GetServiceName")
  236. Call<SubCategoryHistory> getSubCategory(@Field("CategoryId") String id);
  237. @FormUrlEncoded
  238. @POST("ReportServices/Getstatementreport")
  239. Call<StatementReport> getStatmentHistory(@Field("UserName") String userName, @Field("Password") String password, @Field("FromDate") String fromDate, @Field("ToDate") String toDate, @Field("Childusername") String Childusername);
  240. //GiftCard Services
  241. @FormUrlEncoded
  242. @POST("GiftcardCServices/GetGiftCategoryList")
  243. Call<GetGiftCategoryList> giftcard(@Field("UserName") String userId, @Field("Password") String password);
  244. @FormUrlEncoded
  245. @POST("GiftcardCServices/GetGiftProductList")
  246. Call<GiftCardProduct> giftProduct(@Field("UserName") String userId, @Field("Password") String password, @Field("category") String category);
  247. @FormUrlEncoded
  248. @POST("GiftcardCServices/GetProductAndBrand")
  249. Call<ProductDetails> giftProductDetails(@Field("UserName") String userId, @Field("Password") String password, @Field("Productid") String prod_id);
  250. @FormUrlEncoded
  251. @POST("GiftcardCServices/GetPlaceorder")
  252. Call<GetPlaceOrder> productPurchaseOrder(@Field("UserName") String userId, @Field("Password") String password, @Field("Productid") String productid, @Field("Price") String price, @Field("Quantity") String quantity, @Field("Amount") String amount, @Field("Sfname") String sfname, @Field("Slname") String slname, @Field("Semailid") String semailid, @Field("Snumber") String snumber, @Field("Rfname") String rfname, @Field("Rlname") String rlname, @Field("Remailid") String remailid, @Field("Rnumber") String rnumber,
  253. @Field("RechargeMode") String rechargeMode);
  254. @FormUrlEncoded
  255. @POST("Recharge/bbpsbillpay")
  256. Call<CheckUtilityBIll> payBBPSBillURL(@Field("UserName") String userid,
  257. @Field("Password") String password,
  258. @Field("Number") String subscriberID,
  259. @Field("Amount") String amount,
  260. @Field("Mode") String mMode,
  261. @Field("Param1") String param1,
  262. @Field("Param2") String params2,
  263. @Field("PaymentMode") String param3,
  264. @Field("CustomerMobileNo") String customerMobile,
  265. @Field("OperatorCode") String mCode,
  266. @Field("CircleCode") String s,
  267. @Field("Geocode") String geoCode,
  268. @Field("Billername") String billerName,
  269. @Field("Billerno") String billerNo,
  270. @Field("Billdate") String billDate,
  271. @Field("Billduedate") String BilldueDate,
  272. @Field("Partialbill") String partialBill);
  273. @FormUrlEncoded
  274. @POST("RGUSER/GetUtilityBillPayValidate")
  275. Call<com.webplat.merchant.cyberplate.pojo.utility_bbps.BBPSCheckUtilityBIll> BBPS_validateUtilityBill(
  276. @Field("UserName") String userid,
  277. @Field("Password") String password,
  278. @Field("OperatorCode") String opcode,
  279. @Field("Number") String subScriberId,
  280. @Field("BillUnit") String billingUnit,
  281. @Field("CycleNo") String cycleNumber);
  282. @POST("OperatorServices/GetBillerparams")
  283. Call<BBPSBilling> getBBPSUnit(@Query("billerid") int ourcode);
  284. @POST("OperatorServices/SubCategories")
  285. Call<BBPSSubcategory> getBBPSServiceURL(@Query("category") Integer CategoryId);
  286. @FormUrlEncoded
  287. @POST("Dth/GetRegion")
  288. Call<RegionResponse> getReligons(@Field("UserName") String userName, @Field("Password") String password);
  289. @FormUrlEncoded
  290. @POST("Dth/GetproductList")
  291. Call<RegionResponse> getReligonsOperator(@Field("UserName") String userName, @Field("Password") String password,@Field("RegionId") String RegionId);
  292. @FormUrlEncoded
  293. @POST("Dth/GetproductDetails")
  294. Call<ProductDetailsResponse> getProductDetails(@Field("UserName") String userName, @Field("Password") String password, @Field("ProductId") String ProductId);
  295. }