Skip to content

Commit

Permalink
[feat/#15] Service를 바탕으로 DataSource를 구현합니다.
Browse files Browse the repository at this point in the history
  • Loading branch information
SYAAINN committed Nov 28, 2024
1 parent f32ed45 commit d91aca0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.sopt.korailtalk.data.remote.datasource

import com.sopt.korailtalk.data.remote.model.base.ApiResponse
import com.sopt.korailtalk.data.remote.model.request.TicketBuyingRequestDto
import com.sopt.korailtalk.data.remote.model.response.LPointResponseDto

interface PaymentRemoteDataSource {
suspend fun getLpoint(userId: Long, pointPassword: Int): ApiResponse<LPointResponseDto>
suspend fun buyTicket(ticketBuyingRequestDto: TicketBuyingRequestDto): ApiResponse<Unit>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.sopt.korailtalk.data.remote.datasourceimpl

import com.sopt.korailtalk.data.remote.datasource.PaymentRemoteDataSource
import com.sopt.korailtalk.data.remote.model.request.TicketBuyingRequestDto
import com.sopt.korailtalk.data.remote.service.PaymentService
import javax.inject.Inject

class PaymentRemoteDataSourceImpl @Inject constructor(
private val paymentService: PaymentService
) : PaymentRemoteDataSource {
override suspend fun getLpoint(userId: Long, pointPassword: Int) =
paymentService.getLpoint(userId, pointPassword)

override suspend fun buyTicket(ticketBuyingRequestDto: TicketBuyingRequestDto) =
paymentService.buyTicket(ticketBuyingRequestDto)
}

0 comments on commit d91aca0

Please sign in to comment.