Updated on 2026-08-14
This commit is contained in:
parent
3b6eeb7535
commit
8b677a8e6b
25 changed files with 1149 additions and 17 deletions
|
|
@ -0,0 +1,11 @@
|
|||
package com.tangem.domain.pay.repository
|
||||
|
||||
import arrow.core.Either
|
||||
import com.tangem.domain.models.account.TangemPayTariffPlanTransition
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.visa.error.VisaApiError
|
||||
|
||||
interface TangemPayTariffPlanTransitionsRepository {
|
||||
|
||||
suspend fun getTransitions(userWalletId: UserWalletId): Either<VisaApiError, List<TangemPayTariffPlanTransition>>
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.tangem.domain.pay.usecase
|
||||
|
||||
import arrow.core.Either
|
||||
import com.tangem.domain.models.account.TangemPayTariffPlanTransition
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.pay.repository.TangemPayTariffPlanTransitionsRepository
|
||||
import com.tangem.domain.visa.error.VisaApiError
|
||||
|
||||
class GetTangemPayTariffPlanTransitionsUseCase(
|
||||
private val repository: TangemPayTariffPlanTransitionsRepository,
|
||||
) {
|
||||
suspend operator fun invoke(
|
||||
userWalletId: UserWalletId,
|
||||
): Either<VisaApiError, List<TangemPayTariffPlanTransition>> = repository.getTransitions(userWalletId)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue