Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. public interface EurobankApi {
  2.  
  3. @GET("/check")
  4. void apiCheck(Callback<Response> response);
  5.  
  6. //region ACCOUNTS
  7. @GET("/accounts/{account}")
  8. List<Account> getAccountInfo();
  9.  
  10. @GET("/accounts/{accountId}")
  11. Response getAccounts(@Path("account") String accountId);
  12.  
  13.  
  14. @GET("/accounts/{accountId}/savings")
  15. Response getSavingAccountTypes(@Path("accountId") String accountId);
  16.  
  17.  
  18. @GET("/accounts/{accountId}/blocked_funds")
  19. Response getAccountBlockedFunds(@Path("accountId") String accountId);
  20.  
  21. @GET("/accounts/{accountId}/blocked_funds")
  22. void getAccountBlockedFunds(@Path("accountId") String accountId,
  23. Callback<BlockadesContainer> callback);
  24.  
  25. @GET("/accounts/{accountId}/recent_operations?limit=3")
  26. Response getAccountRecentOperation(@Path("accountId") int accountId);
  27.  
  28. @GET("/accounts/operation_categories")
  29. void getAccountsOperationCategories(Callback<JsonObject> response);
  30.  
  31. // @GET("/transfers")
  32. // void getTransfers(Callback<JsonObject> response);
  33.  
  34. @GET("/accounts")
  35. void getAccounts(Callback<JsonObject> response);
  36.  
  37. @GET("/accounts")
  38. Response getAccounts();
  39. //endregion
  40.  
  41. //region PHONE
  42. @GET("/prepaid/operators")
  43. void getPrepaidOperators(Callback<JsonObject> response);
  44.  
  45. @GET("/prepaid/numbers")
  46. void getPrepaidNumbers(Callback<JsonObject> response);
  47.  
  48. @GET("/numbers")
  49. Response getPhoneNumbers();
  50.  
  51. @POST("/prepaid/topup")
  52. Response newPrepaidTopup(@Body NewPrepaidTopup body);
  53. //endregion
  54.  
  55. //region DEPOSITS
  56. @GET("/deposits")
  57. void getDeposits(Callback<JsonObject> response);
  58.  
  59. @GET("/deposits?status=ACTIVATED&status=ESTABILISHED")
  60. Response getDeposits();
  61.  
  62. @GET("/deposit_calculator/types")
  63. void getDepositCalculatorTypes(Callback<JsonObject> response);
  64. //endregion
  65.  
  66. //region LOANS
  67. @GET("/loans")
  68. void getLoans(Callback<JsonObject> response);
  69.  
  70. @GET("/loans")
  71. Response getLoans();
  72. //endregion
  73.  
  74. //region CREDIT
  75. @GET("/cards/credit")
  76. void getCreditCards(Callback<JsonObject> response);
  77.  
  78. @GET("/cards/credit")
  79. Response getCreditCards();
  80.  
  81. @POST("/cards/credit/{id}/reserve")
  82. void getCreditCardsReserve(@Path("id") String id, Callback<JsonObject> response);
  83.  
  84. @GET("/cards/credit/{id}/history")
  85. void getCreditCardsHistory(@Path("history") String id, Callback<JsonObject> response);
  86. //endregion
  87.  
  88. //region DEBIT
  89. // @GET("/cards/debit")
  90. // JsonObject getDebitCards(@Query("nrb") String nrb);
  91.  
  92. @GET("/cards/debit")
  93. Response getDebitCards(@Query("nrb") String nrb);
  94.  
  95. @GET("/cards/debit")
  96. Response getDebitCards();
  97.  
  98. @GET("/cards/debit/limit")
  99. Response getDebitCardsLimits();
  100.  
  101. // TODO bartek
  102. @POST("/cards/debit/{card_id}/limit")
  103. // TODO bartek body
  104. Response setDebitCardLimit(@Path("card_id") long cardId);
  105. //endregion
  106.  
  107. @GET("/special_offer")
  108. void getSpecialOffer(Callback<JsonObject> response);
  109.  
  110. @GET("/special_offer")
  111. Response getSpecialOffer();
  112.  
  113. @GET("/receivers")
  114. void getReceivers(Callback<JsonObject> response);
  115.  
  116. @GET("/receivers")
  117. JsonObject getReceivers();
  118.  
  119. @GET("/ids")
  120. void getDocuments(Callback<JsonObject> response);
  121.  
  122. //region HCE
  123. @GET("/cards/debit/hce/activation")
  124. Response getHceCardActivationCode(@Query("id") String cardId);
  125.  
  126. // TODO bartek
  127. @POST("/cards/debit/hce/new")
  128. Response newHceCard(@Body HceNew hceNew);
  129. //endregion
  130.  
  131. @GET("/{dynamicPath}")
  132. Response getRequest(String dynamicPath);
  133.  
  134. @PUT("/device/pushid")
  135. Response putPushId(@Body PushId pushId) throws RestFailException;
  136.  
  137.  
  138.  
  139. public static class RestFailException extends Exception{
  140.  
  141. int status;
  142.  
  143. RestFailException(int status){
  144. this.status = status;
  145. }
  146.  
  147. @Override
  148. public String getMessage() {
  149. return String.format("Nie udalo sie wyslanie push id z bledem %d", status);
  150. }
  151. }
  152.  
  153.  
  154. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement