Updated on 2026-08-14
This commit is contained in:
parent
aef7c97866
commit
eda701fed9
21 changed files with 1006 additions and 40 deletions
|
|
@ -398,13 +398,52 @@ internal interface TangemPayDataModule {
|
|||
issueCardRepository: TangemPayIssueCardRepository,
|
||||
startTangemPayOrderPollingUseCase: StartTangemPayOrderPollingUseCase,
|
||||
appCoroutineScope: AppCoroutineScope,
|
||||
paymentAccountStatusFetcher: PaymentAccountStatusFetcher,
|
||||
): CreateTariffPlanTransitionOrderUseCase {
|
||||
return CreateTariffPlanTransitionOrderUseCase(
|
||||
customerOrderRepository = customerOrderRepository,
|
||||
issueCardRepository = issueCardRepository,
|
||||
startTangemPayOrderPollingUseCase = startTangemPayOrderPollingUseCase,
|
||||
paymentAccountStatusFetcher = paymentAccountStatusFetcher,
|
||||
appCoroutineScope = appCoroutineScope,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
fun provideSubmitTariffTransitionUseCase(
|
||||
createTransitionOrder: CreateTariffPlanTransitionOrderUseCase,
|
||||
setPendingTransition: SetTariffPlanPendingTransitionUseCase,
|
||||
): SubmitTariffTransitionUseCase {
|
||||
return SubmitTariffTransitionUseCase(
|
||||
createTransitionOrder = createTransitionOrder,
|
||||
setPendingTransition = setPendingTransition,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
fun provideCancelTariffTransitionUseCase(
|
||||
cancelTangemPayOrderUseCase: CancelTangemPayOrderUseCase,
|
||||
getTariffTransitionUseCase: GetTangemPayTariffPlanTransitionsUseCase,
|
||||
submitTariffTransitionUseCase: SubmitTariffTransitionUseCase,
|
||||
getCurrentTariffUseCase: GetCurrentTariffUseCase,
|
||||
): CancelTariffTransitionUseCase {
|
||||
return CancelTariffTransitionUseCase(
|
||||
cancelTangemPayOrderUseCase = cancelTangemPayOrderUseCase,
|
||||
getTariffTransitionUseCase = getTariffTransitionUseCase,
|
||||
submitTariffTransitionUseCase = submitTariffTransitionUseCase,
|
||||
getCurrentTariffUseCase = getCurrentTariffUseCase,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
fun provideGetCurrentTariffUseCase(
|
||||
paymentAccountStatusFetcher: PaymentAccountStatusFetcher,
|
||||
paymentAccountStatusSupplier: PaymentAccountStatusSupplier,
|
||||
): GetCurrentTariffUseCase {
|
||||
return GetCurrentTariffUseCase(
|
||||
paymentAccountStatusFetcher = paymentAccountStatusFetcher,
|
||||
paymentAccountStatusSupplier = paymentAccountStatusSupplier,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -57,6 +57,7 @@ internal object CustomerInfoConverter : Converter<CustomerMeResponse.Result, Cus
|
|||
val plan = tariffPlan?.toDomain() ?: return null
|
||||
return TangemPayCustomerTariffPlan(
|
||||
status = TangemPayCustomerTariffPlan.Status.fromString(status),
|
||||
source = TangemPayCustomerTariffPlan.Source.fromString(source),
|
||||
plan = plan,
|
||||
nextBillingAt = nextBillingAt.toDateTimeOrNull(),
|
||||
pendingPlan = pendingTariffPlan?.toDomain(),
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ internal class DefaultPaymentAccountStatusFetcherTest {
|
|||
|
||||
private val customerTariffPlan = TangemPayCustomerTariffPlan(
|
||||
status = TangemPayCustomerTariffPlan.Status.ACTIVE,
|
||||
source = TangemPayCustomerTariffPlan.Source.CUSTOMER,
|
||||
plan = basicPlan,
|
||||
nextBillingAt = null,
|
||||
pendingPlan = null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue