TP-32782 | RPD api call changes (#6870)

* TP-32782 | RPD api call changes

* TP-32782 | there was some hardcoding
This commit is contained in:
Ashutosh Y
2023-06-15 09:34:01 +05:30
committed by GitHub Enterprise
parent 11cfc5fab6
commit 6c6d9ea4ec
3 changed files with 3 additions and 9 deletions

View File

@@ -141,11 +141,7 @@ class PennyDropOptionsFragment() : AmcBaseFragment() {
addRewardsBanner(data?.content?.rewards)
data?.footer?.let {
val termsText = it.title?.text + it.name?.text
val style: MutableList<NaviSpan> = ArrayList()
it.name?.style?.let { it1 -> style.addAll(it1) }
it.title?.style?.let { it1 -> style.addAll(it1) }
binding.terms.setSpannableString(TextWithStyle(text = termsText, style = style))
binding.terms.setSpannableString(it.title)
binding.footer.btn.apply {
text = it.nextCta?.title
setTextColor(it.nextCta?.titleColor.parseColorSafe())
@@ -305,4 +301,4 @@ class PennyDropOptionsFragment() : AmcBaseFragment() {
}
}
}
}
}

View File

@@ -11,9 +11,8 @@ class PennyDropOptionsRepository @Inject constructor(private val retrofitService
suspend fun fetchPennyDropOptions(
token: String,
xTarget: String = PAYMENTS,
isUpiAppAvailable: Boolean
) = apiResponseCallback(retrofitService.fetchPennyDropOptions(token, xTarget, isUpiAppAvailable))
) = apiResponseCallback(retrofitService.fetchPennyDropOptions(token, isUpiAppAvailable))
suspend fun fetchInitPaymentMethodDetails(
methodId: String,

View File

@@ -419,7 +419,6 @@ interface RetrofitService {
@GET("/payment-method")
suspend fun fetchPennyDropOptions(
@Header("X-Payments-SDK-Token") token: String,
@Header("X-Target") header: String,
@Query("isUpiPossible") isUpiPossible: Boolean
): Response<GenericResponse<PennyDropOptionsScreenData>>