//
//  CanPaymentTempRepository.swift
//  SodaLive
//
//  Created by klaus on 5/20/24.
//

import Foundation
import CombineMoya
import Combine
import Moya

class CanPaymentTempRepository {
    private let api = MoyaProvider<CanTempApi>()
    
    func chargeCan(request: CanChargeTempRequest) -> AnyPublisher<Response, MoyaError> {
        return api.requestPublisher(.chargeCan(request: request))
    }
    
    func pgVerify(receiptId: String, orderId: String) -> AnyPublisher<Response, MoyaError> {
        return api.requestPublisher(.verify(request: PgVerifyRequest(receiptId: receiptId, orderId: orderId)))
    }
}
