Skip to content

Instantly share code, notes, and snippets.

@vialyx
Last active October 8, 2018 15:19
Show Gist options
  • Save vialyx/aa7e1a269e44766675b08e32cc8159b8 to your computer and use it in GitHub Desktop.
Save vialyx/aa7e1a269e44766675b08e32cc8159b8 to your computer and use it in GitHub Desktop.
struct Fine {
var id: String = UUID().uuidString
var date: Date? = Date()
var number: String = ""
var amount: NSNumber = NSNumber(value: 0.0)
}
typealias IAPServiceRetriveResult = () -> Void
typealias IAPServicePurchaseResult = () -> Void
typealias IAPServiceRestoreResult = () -> Void
class IAPService {
func loadProducts() {}
func loadProducts(completion: @escaping IAPServiceRetriveResult) {}
func purchase(productID: String, completion: @escaping IAPServicePurchaseResult) {}
func restore(completion: @escaping IAPServiceRestoreResult) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment