Files
purchases-ios/Sources/Purchasing/PurchaseOwnershipType.swift
T
NachoSoto 1d7d54a49a Simplified EntitlementInfo decoding using new @DefaultValue property wrappers (#1540)
Follow up to #1537.
`EntitlementInfo.ProductData` and related types will be moved out as part of #1496, to become part of the `CustomerInfo` response. But this is an intermediate change to simplify the decoding of this part of the data.
2022-05-10 10:29:05 -07:00

44 lines
1.0 KiB
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
//
// PurchaseOwnershipType.swift
//
// Created by Joshua Liebowitz on 6/24/21.
//
import Foundation
/// The types used to describe whether a transaction was purchased by the user,
/// or is available to them through Family Sharing.
@objc(RCPurchaseOwnershipType) public enum PurchaseOwnershipType: Int {
/**
The purchase was made directly by this user.
*/
case purchased = 0
/**
The purchase has been shared to this user by a family member.
*/
case familyShared = 1
/**
The ownership type could not be determined.
*/
case unknown = 2
}
extension PurchaseOwnershipType: CaseIterable {}
extension PurchaseOwnershipType: DefaultValueProvider {
static let defaultValue: Self = .purchased
}