mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-10 22:45:55 +05:45
* renamed `Purchases` folder to `Sources` * temporarily enabling installation test jobs * re-disabling installation test jobs
36 lines
995 B
Swift
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
|
|
|
|
}
|