import Foundation import SwiftSignalKit import Postbox public extension TelegramEngine { final class Payments { private let account: Account init(account: Account) { self.account = account } public func getBankCardInfo(cardNumber: String) -> Signal { return _internal_getBankCardInfo(account: self.account, cardNumber: cardNumber) } public func fetchBotPaymentInvoice(source: BotPaymentInvoiceSource) -> Signal { return _internal_fetchBotPaymentInvoice(postbox: self.account.postbox, network: self.account.network, source: source) } public func fetchBotPaymentForm(source: BotPaymentInvoiceSource, themeParams: [String: Any]?) -> Signal { return _internal_fetchBotPaymentForm(postbox: self.account.postbox, network: self.account.network, source: source, themeParams: themeParams) } public func validateBotPaymentForm(saveInfo: Bool, source: BotPaymentInvoiceSource, formInfo: BotPaymentRequestedInfo) -> Signal { return _internal_validateBotPaymentForm(account: self.account, saveInfo: saveInfo, source: source, formInfo: formInfo) } public func sendBotPaymentForm(source: BotPaymentInvoiceSource, formId: Int64, validatedInfoId: String?, shippingOptionId: String?, tipAmount: Int64?, credentials: BotPaymentCredentials) -> Signal { return _internal_sendBotPaymentForm(account: self.account, formId: formId, source: source, validatedInfoId: validatedInfoId, shippingOptionId: shippingOptionId, tipAmount: tipAmount, credentials: credentials) } public func requestBotPaymentReceipt(messageId: MessageId) -> Signal { return _internal_requestBotPaymentReceipt(account: self.account, messageId: messageId) } public func clearBotPaymentInfo(info: BotPaymentInfo) -> Signal { return _internal_clearBotPaymentInfo(network: self.account.network, info: info) } public func assignAppStoreTransaction(transactionId: String, receipt: Data, restore: Bool) -> Signal { return _internal_assignAppStoreTransaction(account: self.account, transactionId: transactionId, receipt: receipt, restore: restore) } public func canPurchasePremium() -> Signal { return _internal_canPurchasePremium(account: self.account) } } }