Updated on 2026-08-14
This commit is contained in:
parent
4faf6e9cb0
commit
e06dc1297d
16 changed files with 287 additions and 8 deletions
|
|
@ -67,6 +67,7 @@ data class CustomerInfo(
|
|||
val actualCardLimit: TangemPayCardLimit?,
|
||||
val adminCardLimit: TangemPayCardLimit?,
|
||||
val status: Status,
|
||||
val specificationDataType: SpecificationDataType,
|
||||
) {
|
||||
enum class Status {
|
||||
NEW,
|
||||
|
|
@ -82,6 +83,12 @@ data class CustomerInfo(
|
|||
CANCELED,
|
||||
UNKNOWN,
|
||||
}
|
||||
|
||||
/** `ACCOUNT` marks a Virtual Account instance (vs. a `CARD`); used by VA MVP0 (TWI-1638). */
|
||||
enum class SpecificationDataType {
|
||||
ACCOUNT,
|
||||
CARD,
|
||||
}
|
||||
}
|
||||
|
||||
data class CardInfo(
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.tangem.domain.pay.repository
|
|||
|
||||
import arrow.core.Either
|
||||
import com.tangem.core.error.UniversalError
|
||||
import com.tangem.domain.models.account.BankCredentials
|
||||
import com.tangem.domain.models.pay.TangemPayEligibilityType
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.pay.model.CustomerInfo
|
||||
|
|
@ -17,6 +18,12 @@ interface OnboardingRepository {
|
|||
|
||||
suspend fun getCustomerInfo(userWalletId: UserWalletId): Either<VisaApiError, CustomerInfo>
|
||||
|
||||
/** Fiat bank requisites for the wallet's Virtual Account on-ramp instance (VA MVP0, TWI-1638). */
|
||||
suspend fun getBankCredentials(
|
||||
userWalletId: UserWalletId,
|
||||
productInstanceId: String,
|
||||
): Either<VisaApiError, BankCredentials>
|
||||
|
||||
suspend fun createOrder(userWalletId: UserWalletId): Either<VisaApiError, String>
|
||||
|
||||
suspend fun clearOrderId(userWalletId: UserWalletId)
|
||||
|
|
@ -28,6 +35,14 @@ interface OnboardingRepository {
|
|||
suspend fun checkCustomerEligibility(): List<TangemPayEligibilityType>
|
||||
suspend fun getCustomerEligibility(): List<TangemPayEligibilityType>
|
||||
|
||||
/**
|
||||
* Fetches eligibility channels fresh via the user token (always hits the network, no cache read/write).
|
||||
* Differs from [checkCustomerEligibility] (static token, caches) and [getCustomerEligibility] (cache only).
|
||||
*/
|
||||
suspend fun fetchCustomerEligibility(
|
||||
userWalletId: UserWalletId,
|
||||
): Either<VisaApiError, List<TangemPayEligibilityType>>
|
||||
|
||||
fun getSavedCustomerInfo(userWalletId: UserWalletId): CustomerInfo?
|
||||
|
||||
suspend fun getHideMainOnboardingBanner(userWalletId: UserWalletId): Boolean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue