NTP-36644 | Shivam | Enable GZIP Compression on all billpay-gateway APIs (#14909)

This commit is contained in:
Shivam Goyal
2025-02-10 12:21:27 +05:30
committed by GitHub
parent bea68ae659
commit 2181e07de5
12 changed files with 123 additions and 122 deletions

View File

@@ -19,9 +19,6 @@ internal const val BBPS_BILLER_SEARCH_BOX_PLACEHOLDER_TEXT =
// Values
const val CONFIG_IN_DB_REFRESH_MIN_TIMESTAMP = 86400000L // 1 day
const val BILLER_LIST_REFRESH_TIMESTAMP = 604800000L // 7 days
const val ALL_PREPAID_PLANS_REFRESH_TIMESTAMP = 604800000L // 7 days
const val ALL_PHONE_SERIES_MAPPING_REFRESH_TIMESTAMP = 2419200000 // 28 day
const val DEFAULT_RETRY_COUNT = 3
const val RETRY_INTERVAL_IN_SECONDS = 0.5
const val ONE_DAY_IN_MILLIS = 86400000L
@@ -77,7 +74,6 @@ const val ELLIPSIS = "..."
const val DISPLAYABLE_MOBILE_NUMBER_KEY = "Mobile number"
const val CREDIT_CARD_NUMBER_DISPLAY_TYPE = "DISPLAY_TYPE_CC_NUMBER"
const val FOOTER_NEXT_PRESS = "FOOTER_NEXT_PRESS"
const val SCRATCH_CARD_WORTH = "Your scratch card worth "
const val NA = "NA"
// s3 urls icons
@@ -106,15 +102,12 @@ const val KEY_BBPS_PHONE_SERIES_MAPPING_REFRESHED_TIMESTAMP =
const val KEY_BBPS_ABTESTING_LAST_REFRESHED_TIMESTAMP =
"KEY_BBPS_ABTESTING_LAST_REFRESHED_TIMESTAMP"
const val KEY_BBPS_BANNERS_SEEN_MAP = "KEY_BBPS_BANNERS_SEEN_MAP"
const val KEY_BBPS_REWARD_NUDGE_LAST_REFRESHED_TIMESTAMP =
"KEY_BBPS_REWARD_NUDGE_LAST_REFRESHED_TIMESTAMP"
// Fixed values
const val NOTES_REGEX_CONDITION = "^[a-zA-Z0-9 \\-]*\$"
const val INDIA_COUNTRY_CODE = "91"
const val INDIA_COUNTRY_CODE_WITH_PLUS = "+91"
const val FIELD_PLACEHOLDER = "{FIELD_NAME}"
const val SPACE_REGEX = "\\s+" // Constant for space replacement
const val PAYMENT_MODE_UPI = "UPI"
// AB Testing experiments constant
@@ -134,8 +127,6 @@ const val NAVI_BBPS_POST_PAYMENT_SCREEN_CROSS_SELL_REDIRECT = "naviPay/NAVI_PAY_
// Order Details Screen redirection
const val NAVI_BBPS_TSTORE_ORDER_DETAILS_REDIRECTION = "naviPay/NAVI_PAY_ORDER_DETAILS"
// Navi Home Screen
const val NAVI_HOME_SCREEN = "NAVI_HOME"
// Analytics ConstantS
const val NAVI_BBPS_INITIAL_SOURCE = "initialSource"
@@ -158,11 +149,8 @@ const val NAVI_BBPS_CATEGORY_ID = "categoryId"
// Coin Utilisation Constants
const val NAVI_BBPS_MAX_COIN_EARN = "1,000"
const val NAVI_BBPS_BILL_CATEGORY_MAX_COIN_EARN_FLOW = 100
const val NAVI_BBPS_PAY_BILL_MIN_COIN_EARN_FLOW = 10
const val CASH_REWARDS = "\${cashReward}"
const val COINS = "\${coins}"
const val CREDIT_CARD_DISCOUNT_PERCENTAGE = "1%"
// datastore constants
const val NAVI_BBPS_COINS = "navi_bbps_coins"
@@ -191,19 +179,11 @@ const val NAVI_BBPS_NAVIGATION_FINISH = "FINISH"
const val NAVI_BBPS_CATEGORY_GROUP_ID = "categoryGroupId"
const val NAVI_BBPS_PAYLOAD = "payload"
// bbps experiments constants
const val NAVI_BBPS_LITMUS = "LITMUS"
const val MORE_THAN_HUNDRED_PERCENT_AS_FLOAT = 1.1f
// Shared element transition key constants
const val SCRATCH_CARD_SHARED_ELEMENT_KEY = "scratchCardSharedElement"
const val SMALL_FLOAT = 0.000001f
// biller list animation constant
const val BILLER_LIST_ANIMATION_DURATION = 700
// animation constants
const val BILL_ITEM_SLIDE_OUT_DURATION = 450
const val UNPAID_BILL_COUNT_DURATION = 300
@@ -221,7 +201,6 @@ const val RCBP_CATEGORY = "RCBP_CATEGORY"
const val BILLER_UNIQUE_ID = "BILLER_UNIQUE_ID"
const val TXN_AMOUNT = "TXN_AMOUNT"
const val BAU = "BAU"
const val ALL = "ALL"
const val APP_VERSION_CODE = "APP_VERSION"
// url

View File

@@ -26,7 +26,6 @@ import com.navi.bbps.feature.prepaidrecharge.model.view.OperatorCircleSeriesMapp
import com.navi.bbps.feature.prepaidrecharge.model.view.PrepaidRechargeEntity
import com.navi.bbps.network.service.NaviBbpsRetrofitService
import com.navi.common.checkmate.model.MetricInfo
import com.navi.common.constants.GRATIFICATION_SERVICE
import com.navi.common.network.models.RepoResult
import com.navi.common.network.models.isSuccessWithData
import com.navi.common.network.retrofit.ResponseCallback
@@ -53,11 +52,12 @@ constructor(
): RepoResult<BillDetailsResponse> {
val response =
apiResponseCallback(
naviBbpsRetrofitService.getBillDetails(billDetailsRequest = billDetailsRequest),
response =
naviBbpsRetrofitService.getBillDetails(billDetailsRequest = billDetailsRequest),
metricInfo = metricInfo,
)
if (response.isSuccessWithData()) {
myBillsSyncJob.refreshBillsAsync(metricInfo.screen)
myBillsSyncJob.refreshBillsAsync(screenName = metricInfo.screen)
}
return response
}
@@ -67,7 +67,7 @@ constructor(
metricInfo: MetricInfo<RepoResult<BillerDetailsResponse>>,
): RepoResult<BillerDetailsResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.getBillerDetails(billerId = billerId),
response = naviBbpsRetrofitService.getBillerDetails(billerId = billerId),
metricInfo = metricInfo,
)
}
@@ -77,7 +77,10 @@ constructor(
metricInfo: MetricInfo<RepoResult<Any?>>,
): RepoResult<Any?> {
return apiResponseCallback(
naviBbpsRetrofitService.getConfig(commaSeparatedConfigKeys = commaSeparatedConfigKeys),
response =
naviBbpsRetrofitService.getConfig(
commaSeparatedConfigKeys = commaSeparatedConfigKeys
),
metricInfo = metricInfo,
)
}
@@ -86,21 +89,21 @@ constructor(
metricInfo: MetricInfo<RepoResult<BillerItemListResponse>>?
): RepoResult<BillerItemListResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.getFullBillerList(),
response = naviBbpsRetrofitService.getFullBillerList(),
metricInfo = metricInfo,
)
}
suspend fun refreshBillers(billers: List<BillerItemEntity>) {
billerListDao.refreshBillers(billers)
billerListDao.refreshBillers(billers = billers)
}
suspend fun upsertMapping(mapping: List<OperatorCircleSeriesMappingItemEntity>) {
phoneSeriesOperatorCircleMappingDao.upsertMapping(mapping)
phoneSeriesOperatorCircleMappingDao.upsertMapping(mapping = mapping)
}
suspend fun getBillersByCategoryFromLocalDb(categoryId: String): List<BillerItemEntity> {
return billerListDao.getBillersByCategory(categoryId)
return billerListDao.getBillersByCategory(categoryId = categoryId)
}
suspend fun deleteBill(
@@ -108,7 +111,7 @@ constructor(
metricInfo: MetricInfo<RepoResult<BbpsGenericResponse>>,
): RepoResult<BbpsGenericResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.deleteBill(savedBillId = savedBillId),
response = naviBbpsRetrofitService.deleteBill(savedBillId = savedBillId),
metricInfo = metricInfo,
)
}
@@ -117,7 +120,7 @@ constructor(
metricInfo: MetricInfo<RepoResult<OperatorCircleSeriesMappingResponse>>
): RepoResult<OperatorCircleSeriesMappingResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.getOperatorCircleMappingFromPhoneSeries(),
response = naviBbpsRetrofitService.getOperatorCircleMappingFromPhoneSeries(),
metricInfo = metricInfo,
)
}
@@ -125,7 +128,9 @@ constructor(
suspend fun getOperatorCodeAndCircleIdBySeries(
series: String
): OperatorCircleSeriesMappingItemEntity? {
return phoneSeriesOperatorCircleMappingDao.getOperatorCodeAndCircleIdBySeries(series)
return phoneSeriesOperatorCircleMappingDao.getOperatorCodeAndCircleIdBySeries(
series = series
)
}
suspend fun getPrepaidRechargePlansByOperatorAndCircleId(
@@ -146,7 +151,7 @@ constructor(
metricInfo: MetricInfo<RepoResult<AllPrepaidPlansResponse>>?
): RepoResult<AllPrepaidPlansResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.fetchAllPrepaidPlans(),
response = naviBbpsRetrofitService.fetchAllPrepaidPlans(),
metricInfo = metricInfo,
)
}
@@ -155,19 +160,19 @@ constructor(
metricInfo: MetricInfo<RepoResult<BbpsABTestingResponse>>?
): RepoResult<BbpsABTestingResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.fetchABTestingExperiments(),
response = naviBbpsRetrofitService.fetchABTestingExperiments(),
metricInfo = metricInfo,
)
}
suspend fun fetchSavedBillsByCategory(category: String) =
myBillsDao.getBillsByCategory(category)
myBillsDao.getBillsByCategory(categoryId = category)
suspend fun getRewardDetailsV2(
metricInfo: MetricInfo<RepoResult<RewardDetailsV2Response>>?
): RepoResult<RewardDetailsV2Response> {
return apiResponseCallback(
naviBbpsRetrofitService.getRewardDetailsV2(),
response = naviBbpsRetrofitService.getRewardDetailsV2(),
metricInfo = metricInfo,
)
}
@@ -178,10 +183,7 @@ constructor(
): RepoResult<ArcExactOfferResponse> {
return apiResponseCallback(
response =
commonRetrofitService.getExactArcOffer(
arcExactOfferRequest = arcExactOfferRequest,
target = GRATIFICATION_SERVICE,
),
commonRetrofitService.getExactArcOffer(arcExactOfferRequest = arcExactOfferRequest),
metricInfo = metricInfo,
)
}
@@ -191,7 +193,7 @@ constructor(
metricInfo: MetricInfo<RepoResult<Any?>>,
): RepoResult<Any?> {
return apiResponseCallback(
naviBbpsRetrofitService.savedBills(path),
response = naviBbpsRetrofitService.savedBills(url = path),
metricInfo = metricInfo,
)
}

View File

@@ -24,7 +24,11 @@ constructor(private val naviBbpsRetrofitService: NaviBbpsRetrofitService) : Resp
metricInfo: MetricInfo<RepoResult<BillerListResponse>>,
): RepoResult<BillerListResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.getBillers(categoryId, billerListRequest),
response =
naviBbpsRetrofitService.getBillers(
categoryId = categoryId,
billerListRequest = billerListRequest,
),
metricInfo = metricInfo,
)
}

View File

@@ -22,7 +22,7 @@ constructor(private val naviBbpsRetrofitService: NaviBbpsRetrofitService) : Resp
metricInfo: MetricInfo<RepoResult<BillTransactionHistoryResponse>>,
): RepoResult<BillTransactionHistoryResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.getBillTransactions(savedBillId = savedBillId),
response = naviBbpsRetrofitService.getBillTransactions(savedBillId = savedBillId),
metricInfo = metricInfo,
)
}

View File

@@ -17,7 +17,6 @@ import com.navi.common.checkmate.model.MetricInfo
import com.navi.common.model.ModuleNameV2
import com.navi.common.network.models.RepoResult
import com.navi.common.network.retrofit.ResponseCallback
import com.navi.common.utils.Constants.GZIP
import com.navi.common.utils.getStatusBarHeight
import com.navi.rr.utils.pxToDp
import javax.inject.Inject
@@ -47,7 +46,7 @@ constructor(private val naviBbpsRetrofitService: NaviBbpsRetrofitService) : Resp
metricInfo: MetricInfo<RepoResult<RewardDetailsResponse>>
): RepoResult<RewardDetailsResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.getRewardDetails(),
response = naviBbpsRetrofitService.getRewardDetails(),
metricInfo = metricInfo,
)
}
@@ -56,12 +55,12 @@ constructor(private val naviBbpsRetrofitService: NaviBbpsRetrofitService) : Resp
metricInfo: MetricInfo<RepoResult<AlchemistScreenDefinition>>
): RepoResult<AlchemistScreenDefinition> {
return apiResponseCallback(
naviBbpsRetrofitService.fetchAlchemistScreenUiTronConfigs(
acceptEncoding = GZIP,
target = ModuleNameV2.ALCHEMIST.name,
statusBarHeight = pxToDp(getStatusBarHeight().toFloat()).toInt(),
screenId = NaviBbpsScreen.NAVI_BBPS_BILL_CATEGORIES_V2.name,
),
response =
naviBbpsRetrofitService.fetchAlchemistScreenUiTronConfigs(
target = ModuleNameV2.ALCHEMIST.name,
statusBarHeight = pxToDp(getStatusBarHeight().toFloat()).toInt(),
screenId = NaviBbpsScreen.NAVI_BBPS_BILL_CATEGORIES_V2.name,
),
metricInfo = metricInfo,
)
}

View File

@@ -26,7 +26,7 @@ constructor(
metricInfo: MetricInfo<RepoResult<MyBillsResponse>>
): RepoResult<MyBillsResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.getMySavedBills(),
response = naviBbpsRetrofitService.getMySavedBills(),
metricInfo = metricInfo,
)
}
@@ -34,10 +34,14 @@ constructor(
fun fetchMySavedBills() = myBillsDao.getAllBills()
suspend fun fetchSavedBillsByCategory(category: String) =
myBillsDao.getBillsByCategory(category)
myBillsDao.getBillsByCategory(categoryId = category)
suspend fun markBillAsPaid(
billId: String,
metricInfo: MetricInfo<RepoResult<BillMarkAsPaidResponse>>?,
) = apiResponseCallback(naviBbpsRetrofitService.markBillAsPaid(billId), metricInfo = metricInfo)
) =
apiResponseCallback(
response = naviBbpsRetrofitService.markBillAsPaid(billId = billId),
metricInfo = metricInfo,
)
}

View File

@@ -7,7 +7,6 @@
package com.navi.bbps.feature.paybill
import com.navi.bbps.feature.paybill.model.network.CoinDiscountDetailsResponse
import com.navi.bbps.feature.paybill.model.network.PayBillRequest
import com.navi.bbps.feature.paybill.model.network.PayBillResponse
import com.navi.bbps.network.service.NaviBbpsRetrofitService
@@ -24,16 +23,7 @@ constructor(private val naviBbpsRetrofitService: NaviBbpsRetrofitService) : Resp
metricInfo: MetricInfo<RepoResult<PayBillResponse>>,
): RepoResult<PayBillResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.fetchPaymentToken(payBillRequest),
metricInfo = metricInfo,
)
}
suspend fun fetchCoinDiscount(
metricInfo: MetricInfo<RepoResult<CoinDiscountDetailsResponse>>
): RepoResult<CoinDiscountDetailsResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.fetchCoinDiscount(),
response = naviBbpsRetrofitService.fetchPaymentToken(payBillRequest = payBillRequest),
metricInfo = metricInfo,
)
}

View File

@@ -28,20 +28,26 @@ constructor(
suspend fun fetchOperators(
metricInfo: MetricInfo<RepoResult<OperatorsResponse>>
): RepoResult<OperatorsResponse> {
return apiResponseCallback(naviBbpsRetrofitService.getOperators(), metricInfo = metricInfo)
return apiResponseCallback(
response = naviBbpsRetrofitService.getOperators(),
metricInfo = metricInfo,
)
}
suspend fun fetchCircles(
metricInfo: MetricInfo<RepoResult<CirclesResponse>>
): RepoResult<CirclesResponse> {
return apiResponseCallback(naviBbpsRetrofitService.getCircles(), metricInfo = metricInfo)
return apiResponseCallback(
response = naviBbpsRetrofitService.getCircles(),
metricInfo = metricInfo,
)
}
suspend fun insertPhoneNumberToOperatorCircleMapping(
phoneNumberToOperatorCircleMappingEntity: PhoneNumberToOperatorCircleMappingEntity
) {
phoneNumberToOperatorCircleMappingDao.insertPhoneNumberToOperatorCircleMapping(
phoneNumberToOperatorCircleMappingEntity
mapping = phoneNumberToOperatorCircleMappingEntity
)
}
@@ -49,7 +55,7 @@ constructor(
phoneNumber: String
): PhoneNumberToOperatorCircleMappingEntity? {
return phoneNumberToOperatorCircleMappingDao.getOperatorCodeAndCircleIdByPhoneNumber(
phoneNumber
phoneNumber = phoneNumber
)
}
@@ -59,10 +65,11 @@ constructor(
metricInfo: MetricInfo<RepoResult<PhoneNumberToOperatorCircleCodeMappingResponse>>?,
): RepoResult<PhoneNumberToOperatorCircleCodeMappingResponse> {
return apiResponseCallback(
naviBbpsRetrofitService.getOperatorCircleMappingForPhoneNumber(
phoneNumberToOperatorCircleCodeMappingRequest =
phoneNumberToOperatorCircleCodeMappingRequest
),
response =
naviBbpsRetrofitService.getOperatorCircleMappingForPhoneNumber(
phoneNumberToOperatorCircleCodeMappingRequest =
phoneNumberToOperatorCircleCodeMappingRequest
),
metricInfo = metricInfo,
)
}

View File

@@ -7,6 +7,7 @@
package com.navi.bbps.network.service
import com.google.common.net.HttpHeaders.ACCEPT_ENCODING
import com.navi.bbps.common.model.network.BbpsABTestingResponse
import com.navi.bbps.common.model.network.BbpsGenericResponse
import com.navi.bbps.common.model.network.RewardDetailsV2Response
@@ -22,7 +23,6 @@ import com.navi.bbps.feature.customerinput.model.network.BillDetailsResponse
import com.navi.bbps.feature.customerinput.model.network.BillerDetailsResponse
import com.navi.bbps.feature.mybills.model.network.BillMarkAsPaidResponse
import com.navi.bbps.feature.mybills.model.network.MyBillsResponse
import com.navi.bbps.feature.paybill.model.network.CoinDiscountDetailsResponse
import com.navi.bbps.feature.paybill.model.network.PayBillRequest
import com.navi.bbps.feature.paybill.model.network.PayBillResponse
import com.navi.bbps.feature.prepaidrecharge.model.network.AllPrepaidPlansResponse
@@ -36,7 +36,7 @@ import com.navi.bbps.feature.transactiondetails.model.network.BbpsTransactionSta
import com.navi.common.alchemist.model.AlchemistScreenDefinition
import com.navi.common.network.models.GenericResponse
import com.navi.common.network.retry.annotations.RetryPolicy
import com.navi.rr.common.models.ABSettings
import com.navi.common.utils.Constants.GZIP
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
@@ -54,128 +54,147 @@ interface NaviBbpsRetrofitService {
}
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/categories")
suspend fun getBillCategories(): Response<GenericResponse<BillCategoriesResponse>>
suspend fun getBillCategories(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP
): Response<GenericResponse<BillCategoriesResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION_2/billpay/categories")
suspend fun getBillCategoriesV2(): Response<GenericResponse<BillCategoriesV2Response>>
suspend fun getBillCategoriesV2(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP
): Response<GenericResponse<BillCategoriesV2Response>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/bills/saved")
suspend fun getMySavedBills(
@Query("category") category: String? = null
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Query("category") category: String? = null,
): Response<GenericResponse<MyBillsResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/bills/saved/{savedBillId}/transactions")
suspend fun getBillTransactions(
@Path("savedBillId") savedBillId: String
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Path("savedBillId") savedBillId: String,
): Response<GenericResponse<BillTransactionHistoryResponse>>
@RetryPolicy
@POST("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/categories/{categoryId}/billers")
suspend fun getBillers(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Path("categoryId") categoryId: String,
@Body billerListRequest: BillerListRequest,
): Response<GenericResponse<BillerListResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/prepaid/circle-list")
suspend fun getCircles(): Response<GenericResponse<CirclesResponse>>
suspend fun getCircles(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP
): Response<GenericResponse<CirclesResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/prepaid/operator-list")
suspend fun getOperators(): Response<GenericResponse<OperatorsResponse>>
suspend fun getOperators(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP
): Response<GenericResponse<OperatorsResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/billers/{billerId}")
suspend fun getBillerDetails(
@Path("billerId") billerId: String
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Path("billerId") billerId: String,
): Response<GenericResponse<BillerDetailsResponse>>
@RetryPolicy
@POST("/billpay-gateway/$NAVI_BBPS_API_VERSION_2/billpay/bill-details")
suspend fun getBillDetails(
@Body billDetailsRequest: BillDetailsRequest
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Body billDetailsRequest: BillDetailsRequest,
): Response<GenericResponse<BillDetailsResponse>>
@DELETE("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/bills/saved/{savedBillId}")
suspend fun deleteBill(
@Path("savedBillId") savedBillId: String
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Path("savedBillId") savedBillId: String,
): Response<GenericResponse<BbpsGenericResponse>>
@RetryPolicy
@POST("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/bill-payment-request")
suspend fun fetchPaymentToken(
@Body payBillRequest: PayBillRequest
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Body payBillRequest: PayBillRequest,
): Response<GenericResponse<PayBillResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/transaction-status/{transactionId}")
suspend fun fetchTransactionStatus(
@Path("transactionId") transactionId: String
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Path("transactionId") transactionId: String,
): Response<GenericResponse<BbpsTransactionStatusResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/bill-payment-request/{referenceId}")
suspend fun fetchBillAcknowledgmentStatus(
@Path("referenceId") referenceId: String
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Path("referenceId") referenceId: String,
): Response<GenericResponse<BbpsBillAcknowledgmentStatusResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/config")
suspend fun getConfig(
@Query("configKeyList") commaSeparatedConfigKeys: String
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Query("configKeyList") commaSeparatedConfigKeys: String,
): Response<GenericResponse<Any?>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/categories/billers")
suspend fun getFullBillerList(): Response<GenericResponse<BillerItemListResponse>>
suspend fun getFullBillerList(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP
): Response<GenericResponse<BillerItemListResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/operator-circle-mapping")
suspend fun getOperatorCircleMappingFromPhoneSeries():
Response<GenericResponse<OperatorCircleSeriesMappingResponse>>
suspend fun getOperatorCircleMappingFromPhoneSeries(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP
): Response<GenericResponse<OperatorCircleSeriesMappingResponse>>
@RetryPolicy
@POST("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/phonenumber-operator-circle")
suspend fun getOperatorCircleMappingForPhoneNumber(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Body
phoneNumberToOperatorCircleCodeMappingRequest: PhoneNumberToOperatorCircleCodeMappingRequest
phoneNumberToOperatorCircleCodeMappingRequest: PhoneNumberToOperatorCircleCodeMappingRequest,
): Response<GenericResponse<PhoneNumberToOperatorCircleCodeMappingResponse>>
@RetryPolicy
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/prepaid/plans/all")
suspend fun fetchAllPrepaidPlans(): Response<GenericResponse<AllPrepaidPlansResponse>>
suspend fun fetchAllPrepaidPlans(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP
): Response<GenericResponse<AllPrepaidPlansResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/user-experiments")
suspend fun fetchABTestingExperiments(): Response<GenericResponse<BbpsABTestingResponse>>
suspend fun fetchABTestingExperiments(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP
): Response<GenericResponse<BbpsABTestingResponse>>
@PATCH("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/bills/saved/{billId}/paid")
suspend fun markBillAsPaid(
@Path("billId") billId: String
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Path("billId") billId: String,
): Response<GenericResponse<BillMarkAsPaidResponse>>
@GET("/billpay-gateway/$NAVI_BBPS_API_VERSION/billpay/reward-details")
suspend fun getRewardDetails(): Response<GenericResponse<RewardDetailsResponse>>
suspend fun getRewardDetails(
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP
): Response<GenericResponse<RewardDetailsResponse>>
@RetryPolicy
@GET("/alchemist/inflate/{screenId}")
suspend fun fetchAlchemistScreenUiTronConfigs(
@Header("Accept-Encoding") acceptEncoding: String,
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Header("X-Target") target: String,
@Header("statusBarHeight") statusBarHeight: Int? = null,
@Header("statusBarHeight") statusBarHeight: Int,
@Path("screenId") screenId: String,
): Response<GenericResponse<AlchemistScreenDefinition>>
@GET("/litmus-proxy/v1/proxy/experiment")
suspend fun fetchABExperiment(
@Query("name") name: String,
@Header("X-Target") header: String,
): Response<ABSettings>
@POST("/billpay-gateway/$NAVI_BBPS_API_VERSION_2/billpay/reward-details")
suspend fun getRewardDetailsV2(
@Body category: Map<String, String> = mutableMapOf()
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Body category: Map<String, String> = mutableMapOf(),
): Response<GenericResponse<RewardDetailsV2Response>>
@RetryPolicy
@GET("gullak/v1/discount/coin")
suspend fun fetchCoinDiscount(
@Query("product") product: String = "BBPS"
): Response<GenericResponse<CoinDiscountDetailsResponse>>
@PATCH("{url}")
suspend fun savedBills(
@Path("url", encoded = true) url: String
@Header(ACCEPT_ENCODING) acceptEncoding: String = GZIP,
@Path("url", encoded = true) url: String,
): Response<GenericResponse<Any?>>
}

View File

@@ -13,6 +13,8 @@ import com.navi.base.utils.EXCLUDE_FROM_HASH_ENCRYPTION
import com.navi.base.utils.USER_DEVICE_DATA_LOCATION_API
import com.navi.common.awsupload.model.AWSPresignedUrlRequest
import com.navi.common.awsupload.model.AWSPresignedUrlResponse
import com.navi.common.constants.GRATIFICATION_SERVICE
import com.navi.common.constants.X_TARGET
import com.navi.common.csat.models.CSATSubmitResponse
import com.navi.common.csat.models.NetPromoterScoreRequest
import com.navi.common.geocoding.model.network.GeocodingRequest
@@ -199,13 +201,13 @@ interface RetrofitService {
@POST("/gratification-service/reward/nudge-data")
suspend fun getArcNudge(
@Header(X_TARGET) xTarget: String = GRATIFICATION_SERVICE,
@Body body: Any = Object(),
@Header("X-Target") target: String,
): Response<GenericResponse<ArcNudgeResponse>>
@POST("/gratification-service/reward/offer-details")
suspend fun getExactArcOffer(
@Header(X_TARGET) xTarget: String = GRATIFICATION_SERVICE,
@Body arcExactOfferRequest: ArcExactOfferRequest,
@Header("X-Target") target: String,
): Response<GenericResponse<ArcExactOfferResponse>>
}

View File

@@ -7,7 +7,6 @@
package com.navi.common.repo
import com.navi.common.constants.GRATIFICATION_SERVICE
import com.navi.common.model.ModuleName
import com.navi.common.network.models.LitmusExperimentsRequest
import com.navi.common.network.models.RepoResult
@@ -23,6 +22,6 @@ class NaviCommonRepository @Inject constructor() : ResponseCallback() {
.fetchLitmusExperiments(experiments = experiments, header = ModuleName.LITMUS.name)
suspend fun getArcNudge(): RepoResult<ArcNudgeResponse> {
return apiResponseCallback(retrofitService().getArcNudge(target = GRATIFICATION_SERVICE))
return apiResponseCallback(response = retrofitService().getArcNudge())
}
}

View File

@@ -8,7 +8,6 @@
package com.navi.pay.tstore.details.repository
import com.navi.common.checkmate.model.MetricInfo
import com.navi.common.constants.GRATIFICATION_SERVICE
import com.navi.common.model.NotificationSettings
import com.navi.common.model.NotificationSettingsRequest
import com.navi.common.network.models.RepoResult
@@ -64,10 +63,7 @@ constructor(
): RepoResult<ArcExactOfferResponse> {
return apiResponseCallback(
response =
commonRetrofitService.getExactArcOffer(
arcExactOfferRequest = arcExactOfferRequest,
target = GRATIFICATION_SERVICE,
)
commonRetrofitService.getExactArcOffer(arcExactOfferRequest = arcExactOfferRequest)
)
}
}