Files
purchases-ios/Sources/Purchasing/StoreKitAbstractions/SK2StoreTransaction.swift
T
aboedo f5697de730 renamed Purchases folder to Sources (#1416)
* renamed `Purchases` folder to `Sources`

* temporarily enabling installation test jobs

* re-disabling installation test jobs
2022-03-28 11:53:24 -03:00

36 lines
995 B
Swift

//
// Copyright RevenueCat Inc. All Rights Reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// SK2StoreTransaction.swift
//
// Created by Nacho Soto on 1/4/22.
import StoreKit
@available(iOS 15.0, tvOS 15.0, watchOS 8.0, macOS 12.0, *)
internal struct SK2StoreTransaction: StoreTransactionType {
init(sk2Transaction: SK2Transaction) {
self.underlyingSK2Transaction = sk2Transaction
self.productIdentifier = sk2Transaction.productID
self.purchaseDate = sk2Transaction.purchaseDate
self.transactionIdentifier = String(sk2Transaction.id)
self.quantity = sk2Transaction.purchasedQuantity
}
let underlyingSK2Transaction: SK2Transaction
let productIdentifier: String
let purchaseDate: Date
let transactionIdentifier: String
let quantity: Int
}