Created
January 5, 2022 08:06
-
-
Save paigeshin/e09f4005bbe8b221c7cdaf6002764bc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lazy var receiptRepository: ReceiptRepository = { | |
// you can here also set interceptor | |
var session = Session(interceptor: RetryRequestInterceptor()) | |
let receiptProvider = MoyaProvider<ReceiptProvider>(session: session, plugins: [NetworkLoggerPlugin()]) | |
let receiptRemoteDataSource = ReceiptRemoteDataSourceImpl(receiptProvider: receiptProvider) | |
let receiptLocalDataSource = ReceiptLocalDataSourceImpl() | |
return ReceiptRepositoryImpl(receiptLocalDataSource: receiptLocalDataSource, receiptRemoteDataSource: receiptRemoteDataSource) | |
}() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment