Skip to content

Commit 4499013

Browse files
committed
Rename BaseComponentState to BasePaymentComponentState
COSDK-480
1 parent 4c3cdc0 commit 4499013

10 files changed

+16
-16
lines changed

core/src/main/java/com/adyen/checkout/core/components/internal/AdvancedComponentEventHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import com.adyen.checkout.core.components.CheckoutCallback
1212
import com.adyen.checkout.core.components.CheckoutResult
1313
import kotlinx.coroutines.CoroutineScope
1414

15-
internal class AdvancedComponentEventHandler<T : BaseComponentState>(
15+
internal class AdvancedComponentEventHandler<T : BasePaymentComponentState>(
1616
private val checkoutCallback: CheckoutCallback
1717
) :
1818
ComponentEventHandler<T> {

core/src/main/java/com/adyen/checkout/core/components/internal/AdvancedPaymentFacilitatorFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ internal class AdvancedPaymentFacilitatorFactory(
3838
)
3939

4040
val componentEventHandler =
41-
AdvancedComponentEventHandler<BaseComponentState>(
41+
AdvancedComponentEventHandler<BasePaymentComponentState>(
4242
checkoutCallback,
4343
)
4444

core/src/main/java/com/adyen/checkout/core/components/internal/BaseComponentState.kt renamed to core/src/main/java/com/adyen/checkout/core/components/internal/BasePaymentComponentState.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ package com.adyen.checkout.core.components.internal
1111
import com.adyen.checkout.core.components.paymentmethod.PaymentComponentState
1212
import com.adyen.checkout.core.components.paymentmethod.PaymentMethodDetails
1313

14-
internal typealias BaseComponentState = PaymentComponentState<out PaymentMethodDetails>
14+
internal typealias BasePaymentComponentState = PaymentComponentState<out PaymentMethodDetails>

core/src/main/java/com/adyen/checkout/core/components/internal/PaymentComponentEvent.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ package com.adyen.checkout.core.components.internal
1111
import androidx.annotation.RestrictTo
1212

1313
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
14-
sealed class PaymentComponentEvent<ComponentStateT : BaseComponentState> {
14+
sealed class PaymentComponentEvent<ComponentStateT : BasePaymentComponentState> {
1515

1616
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
17-
class Submit<ComponentStateT : BaseComponentState>(
17+
class Submit<ComponentStateT : BasePaymentComponentState>(
1818
val state: ComponentStateT
1919
) : PaymentComponentEvent<ComponentStateT>()
2020
}

core/src/main/java/com/adyen/checkout/core/components/internal/PaymentFacilitator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ import kotlinx.coroutines.flow.launchIn
2828
import kotlinx.coroutines.flow.onEach
2929

3030
internal class PaymentFacilitator(
31-
private val paymentComponent: PaymentComponent<BaseComponentState>,
31+
private val paymentComponent: PaymentComponent<BasePaymentComponentState>,
3232
private val coroutineScope: CoroutineScope,
33-
private val componentEventHandler: ComponentEventHandler<BaseComponentState>,
33+
private val componentEventHandler: ComponentEventHandler<BasePaymentComponentState>,
3434
private val actionProvider: ActionProvider,
3535
private val checkoutController: CheckoutController,
3636
) {

core/src/main/java/com/adyen/checkout/core/components/internal/PaymentMethodFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import com.adyen.checkout.core.sessions.internal.model.SessionParams
1515
import kotlinx.coroutines.CoroutineScope
1616

1717
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
18-
interface PaymentMethodFactory<CS : BaseComponentState, T : PaymentComponent<CS>> {
18+
interface PaymentMethodFactory<CS : BasePaymentComponentState, T : PaymentComponent<CS>> {
1919

2020
/**
2121
* Creates a [PaymentComponent].

core/src/main/java/com/adyen/checkout/core/components/internal/PaymentMethodProvider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ object PaymentMethodProvider {
4141
coroutineScope: CoroutineScope,
4242
checkoutConfiguration: CheckoutConfiguration,
4343
componentSessionParams: SessionParams?,
44-
): PaymentComponent<BaseComponentState> {
44+
): PaymentComponent<BasePaymentComponentState> {
4545
@Suppress("UNCHECKED_CAST")
4646
return factories[txVariant]?.create(
4747
coroutineScope = coroutineScope,
4848
checkoutConfiguration = checkoutConfiguration,
4949
componentSessionParams = componentSessionParams,
50-
) as? PaymentComponent<BaseComponentState> ?: run {
50+
) as? PaymentComponent<BasePaymentComponentState> ?: run {
5151
// TODO - Errors Propagation [COSDK-85]. Propagate an initialization error via onError()
5252
error("Factory for payment method type: $txVariant is not registered.")
5353
}

core/src/main/java/com/adyen/checkout/core/components/internal/ui/EventComponent.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
package com.adyen.checkout.core.components.internal.ui
1010

1111
import androidx.annotation.RestrictTo
12-
import com.adyen.checkout.core.components.internal.BaseComponentState
12+
import com.adyen.checkout.core.components.internal.BasePaymentComponentState
1313
import com.adyen.checkout.core.components.internal.PaymentComponentEvent
1414
import kotlinx.coroutines.flow.Flow
1515

1616
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
17-
interface EventComponent<T : BaseComponentState> {
17+
interface EventComponent<T : BasePaymentComponentState> {
1818

1919
val eventFlow: Flow<PaymentComponentEvent<T>>
2020
}

core/src/main/java/com/adyen/checkout/core/components/internal/ui/PaymentComponent.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
package com.adyen.checkout.core.components.internal.ui
1010

1111
import androidx.annotation.RestrictTo
12-
import com.adyen.checkout.core.components.internal.BaseComponentState
12+
import com.adyen.checkout.core.components.internal.BasePaymentComponentState
1313

1414
// TODO - Some components might not be composable,
1515
// Move ComposableComponent to PaymentMethod specific component later
1616
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
17-
interface PaymentComponent<T : BaseComponentState> :
17+
interface PaymentComponent<T : BasePaymentComponentState> :
1818
ComposableComponent,
1919
EventComponent<T> {
2020

core/src/main/java/com/adyen/checkout/core/sessions/internal/SessionsPaymentFacilitatorFactory.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import com.adyen.checkout.core.common.internal.api.HttpClientFactory
1414
import com.adyen.checkout.core.components.CheckoutCallback
1515
import com.adyen.checkout.core.components.CheckoutConfiguration
1616
import com.adyen.checkout.core.components.CheckoutController
17-
import com.adyen.checkout.core.components.internal.BaseComponentState
17+
import com.adyen.checkout.core.components.internal.BasePaymentComponentState
1818
import com.adyen.checkout.core.components.internal.PaymentFacilitator
1919
import com.adyen.checkout.core.components.internal.PaymentFacilitatorFactory
2020
import com.adyen.checkout.core.components.internal.PaymentMethodProvider
@@ -54,7 +54,7 @@ internal class SessionsPaymentFacilitatorFactory(
5454

5555
// TODO - Based on txVariant, needs to be abstracted away
5656
val componentEventHandler =
57-
SessionsComponentEventHandler<BaseComponentState>(
57+
SessionsComponentEventHandler<BasePaymentComponentState>(
5858
sessionInteractor = sessionInteractor,
5959
checkoutCallback = checkoutCallback,
6060
)

0 commit comments

Comments
 (0)