Skip to content

Commit

Permalink
refactor: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
precious-ossai-cko committed Mar 15, 2024
1 parent 1924081 commit b329614
Showing 1 changed file with 23 additions and 27 deletions.
50 changes: 23 additions & 27 deletions checkout/src/main/java/com/checkout/CheckoutApiServiceFactory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,25 @@ public object CheckoutApiServiceFactory {
context: Context,
publicKey: String,
environment: Environment,
): TokenRepository =
TokenRepositoryImpl(
networkApiClient = provideNetworkApiClient(publicKey, environment.url),
cardToTokenRequestMapper = CardToTokenRequestMapper(),
cvvToTokenNetworkRequestMapper = CVVToTokenNetworkRequestMapper(),
cardTokenizationNetworkDataMapper = CardTokenizationNetworkDataMapper(),
validateTokenizationDataUseCase =
ValidateTokenizationDataUseCase(
CardValidatorFactory.createInternal(),
AddressValidator(),
PhoneValidator(),
AddressToAddressValidationRequestDataMapper(),
),
validateCVVTokenizationDataUseCase =
ValidateCVVTokenizationDataUseCase(
CVVComponentValidatorFactory.create(),
),
logger = TokenizationEventLogger(EventLoggerProvider.provide()),
publicKey = publicKey,
cvvTokenizationNetworkDataMapper = CVVTokenizationNetworkDataMapper(),
riskSdkUseCase = RiskSdkUseCase(environment, context, publicKey, RiskInstanceProvider),
)
): TokenRepository = TokenRepositoryImpl(
networkApiClient = provideNetworkApiClient(publicKey, environment.url),
cardToTokenRequestMapper = CardToTokenRequestMapper(),
cvvToTokenNetworkRequestMapper = CVVToTokenNetworkRequestMapper(),
cardTokenizationNetworkDataMapper = CardTokenizationNetworkDataMapper(),
validateTokenizationDataUseCase = ValidateTokenizationDataUseCase(
CardValidatorFactory.createInternal(),
AddressValidator(),
PhoneValidator(),
AddressToAddressValidationRequestDataMapper(),
),
validateCVVTokenizationDataUseCase = ValidateCVVTokenizationDataUseCase(
CVVComponentValidatorFactory.create(),
),
logger = TokenizationEventLogger(EventLoggerProvider.provide()),
publicKey = publicKey,
cvvTokenizationNetworkDataMapper = CVVTokenizationNetworkDataMapper(),
riskSdkUseCase = RiskSdkUseCase(environment, context, publicKey, RiskInstanceProvider),
)

private fun provideNetworkApiClient(
publicKey: String,
Expand All @@ -83,9 +80,8 @@ public object CheckoutApiServiceFactory {
Moshi.Builder().build(),
)

private fun provideThreeDSExecutor(logger: Logger<LoggingEvent>): Executor<ThreeDSRequest> =
ThreeDSExecutor(
ProcessThreeDSUseCase(),
ThreeDSEventLogger(logger),
)
private fun provideThreeDSExecutor(logger: Logger<LoggingEvent>): Executor<ThreeDSRequest> = ThreeDSExecutor(
ProcessThreeDSUseCase(),
ThreeDSEventLogger(logger),
)
}

0 comments on commit b329614

Please sign in to comment.