NTP-7163 | App OE - Added api retry for entire app (#14672)
This commit is contained in:
@@ -10,7 +10,6 @@ package com.navi.gold.retrofit
|
||||
import android.content.Context
|
||||
import com.chuckerteam.chucker.api.ChuckerCollector
|
||||
import com.chuckerteam.chucker.api.ChuckerInterceptor
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper.NAVI_GOLD_RETRY_POLICY_ENABLED
|
||||
import com.navi.common.model.NetworkInfo
|
||||
import com.navi.common.network.BaseHttpClient
|
||||
@@ -39,10 +38,7 @@ class NaviHttpClient(networkInfo: NetworkInfo, private val context: Context) :
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
isRetryInterceptorEnabled() &&
|
||||
FirebaseRemoteConfigHelper.getBoolean(NAVI_GOLD_RETRY_POLICY_ENABLED)
|
||||
) {
|
||||
if (isRetryInterceptorEnabled(NAVI_GOLD_RETRY_POLICY_ENABLED)) {
|
||||
okHttpClientBuilder.addInterceptor(RetryInterceptor())
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ interface RetrofitService {
|
||||
@GET("/kuber/home/sub-widgets")
|
||||
suspend fun getDigitalGoldHomePolling(): Response<GenericResponse<WidgetResponse>>
|
||||
|
||||
@RetryPolicy
|
||||
@GET("/kuber/order/get-sell-page-content")
|
||||
suspend fun getDigitalGoldSellPage(
|
||||
@Query("vendorKey") vendorKey: String?
|
||||
@@ -62,13 +63,13 @@ interface RetrofitService {
|
||||
): Response<GenericResponse<WidgetResponse>>
|
||||
|
||||
@GET("/kuber/sip/setup-sip-page-content")
|
||||
@RetryPolicy(retryCount = 3)
|
||||
@RetryPolicy
|
||||
suspend fun getDigitalGoldSetupSipPage(
|
||||
@QueryMap params: Map<String, String>
|
||||
): Response<GenericResponse<WidgetResponse>>
|
||||
|
||||
@GET("/kuber/transactions/transaction-history-page-content")
|
||||
@RetryPolicy(retryCount = 3)
|
||||
@RetryPolicy
|
||||
suspend fun fetchDigitalGoldTransactionHistory(
|
||||
@QueryMap params: Map<String, String>
|
||||
): Response<GenericResponse<WidgetResponse>>
|
||||
@@ -98,6 +99,7 @@ interface RetrofitService {
|
||||
@Path("requestId") requestId: String?
|
||||
): Response<GenericResponse<KycCheckPollingResponse>>
|
||||
|
||||
@RetryPolicy
|
||||
@POST("/kuber/kyc/get-kyc-buy-api-decider")
|
||||
suspend fun getGoldBuyNextPageCta(
|
||||
@Body goldKycVerifyRequest: GoldKycPageRequest?
|
||||
@@ -114,13 +116,13 @@ interface RetrofitService {
|
||||
): Response<GenericResponse<WidgetResponse>>
|
||||
|
||||
@GET("/kuber/home/get-home-content")
|
||||
@RetryPolicy(retryCount = 3)
|
||||
@RetryPolicy
|
||||
suspend fun getDigitalGoldHome(
|
||||
@QueryMap params: Map<String, String>
|
||||
): Response<GenericResponse<WidgetResponse>>
|
||||
|
||||
@POST("/kuber/order/sell")
|
||||
@RetryPolicy(retryCount = 3)
|
||||
@RetryPolicy
|
||||
suspend fun getDigitalGoldSellOrder(
|
||||
@Body goldSellOrderRequest: GoldSellOrderRequest
|
||||
): Response<GenericResponse<GoldSellOrderResponse>>
|
||||
@@ -151,7 +153,7 @@ interface RetrofitService {
|
||||
): Response<GenericResponse<DigitalGoldActionCheckResponse>>
|
||||
|
||||
@GET("/kuber/order/payment-details/get-upi-page-content")
|
||||
@RetryPolicy(retryCount = 3)
|
||||
@RetryPolicy
|
||||
suspend fun fetchDigitalGoldSellUpiScreenData(
|
||||
@Query("exchangeRateId") exchangeRateId: String,
|
||||
@Query("amount") amount: Double,
|
||||
@@ -165,6 +167,7 @@ interface RetrofitService {
|
||||
@GET("/kuber/home/get-gold-blocked-page")
|
||||
suspend fun getKuberBlockerPageDetails(): Response<GenericResponse<ActionCheckResponse>>
|
||||
|
||||
@RetryPolicy
|
||||
@GET("/csat/{featureName}")
|
||||
suspend fun fetchDigitalGoldCsatResponse(
|
||||
@Path("featureName") featureName: String?,
|
||||
@@ -217,6 +220,7 @@ interface RetrofitService {
|
||||
@GET("/kuber/bank/bank-search-page")
|
||||
suspend fun fetchBankSearchPage(): Response<GenericResponse<SearchBankResponse>>
|
||||
|
||||
@RetryPolicy
|
||||
@GET("/kuber/sip/setup-sip-bottomsheet")
|
||||
suspend fun fetchSetupSipBottomSheet(
|
||||
@QueryMap params: Map<String, String?>
|
||||
@@ -237,6 +241,7 @@ interface RetrofitService {
|
||||
@Query("requestId") requestId: String
|
||||
): Response<GenericResponse<DgSipStatusResponse>>
|
||||
|
||||
@RetryPolicy
|
||||
@POST("/kuber/order/v2/buy")
|
||||
suspend fun getDigitalGoldBuyOrderV2(
|
||||
@Body goldBuyOrderRequest: GoldBuyOrderRequest
|
||||
|
||||
Reference in New Issue
Block a user