Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 2.71 KB | None | 0 0
  1. @available(iOS 3.0, *)
  2. open class SKProduct : NSObject {
  3.  
  4.    
  5.     @available(iOS 3.0, *)
  6.     open var localizedDescription: String { get }
  7.  
  8.    
  9.     @available(iOS 3.0, *)
  10.     open var localizedTitle: String { get }
  11.  
  12.    
  13.     @available(iOS 3.0, *)
  14.     open var price: NSDecimalNumber { get }
  15.  
  16.    
  17.     @available(iOS 3.0, *)
  18.     open var priceLocale: Locale { get }
  19.  
  20.    
  21.     @available(iOS 3.0, *)
  22.     open var productIdentifier: String { get }
  23.  
  24.    
  25.     // YES if this product has content downloadable using SKDownload
  26.     @available(iOS 6.0, *)
  27.     open var isDownloadable: Bool { get }
  28.  
  29.    
  30.     @available(iOS 6.0, *)
  31.     open var downloadContentLengths: [NSNumber] { get }
  32.  
  33.    
  34.     // Version of the downloadable content
  35.     open var contentVersion: String { get }
  36.  
  37.     @available(iOS 6.0, *)
  38.     open var downloadContentVersion: String { get }
  39.  
  40.    
  41.     @available(iOS 11.2, *)
  42.     open var subscriptionPeriod: SKProductSubscriptionPeriod? { get }
  43.  
  44.    
  45.     @available(iOS 11.2, *)
  46.     open var introductoryPrice: SKProductDiscount? { get }
  47.  
  48.    
  49.     @available(iOS 12.0, *)
  50.     open var subscriptionGroupIdentifier: String? { get }
  51.  
  52.    
  53.     @available(iOS 12.2, *)
  54.     open var discounts: [SKProductDiscount] { get }
  55. }
  56.  
  57. extension SKProduct {
  58.  
  59.    
  60.     @available(iOS 11.2, *)
  61.     public enum PeriodUnit : UInt {
  62.  
  63.        
  64.         case day
  65.  
  66.         case week
  67.  
  68.         case month
  69.  
  70.         case year
  71.     }
  72. }
  73.  
  74. @available(iOS 11.2, *)
  75. open class SKProductSubscriptionPeriod : NSObject {
  76.  
  77.    
  78.     @available(iOS 11.2, *)
  79.     open var numberOfUnits: Int { get }
  80.  
  81.    
  82.     @available(iOS 11.2, *)
  83.     open var unit: SKProduct.PeriodUnit { get }
  84. }
  85.  
  86. @available(iOS 11.2, *)
  87. open class SKProductDiscount : NSObject {
  88.  
  89.    
  90.     @available(iOS 11.2, *)
  91.     open var price: NSDecimalNumber { get }
  92.  
  93.    
  94.     @available(iOS 11.2, *)
  95.     open var priceLocale: Locale { get }
  96.  
  97.    
  98.     @available(iOS 12.2, *)
  99.     open var identifier: String? { get }
  100.  
  101.    
  102.     @available(iOS 11.2, *)
  103.     open var subscriptionPeriod: SKProductSubscriptionPeriod { get }
  104.  
  105.    
  106.     @available(iOS 11.2, *)
  107.     open var numberOfPeriods: Int { get }
  108.  
  109.    
  110.     @available(iOS 11.2, *)
  111.     open var paymentMode: SKProductDiscount.PaymentMode { get }
  112.  
  113.    
  114.     @available(iOS 12.2, *)
  115.     open var type: SKProductDiscount.Type { get }
  116. }
  117.  
  118. extension SKProductDiscount {
  119.  
  120.    
  121.     @available(iOS 11.2, *)
  122.     public enum PaymentMode : UInt {
  123.  
  124.        
  125.         case payAsYouGo
  126.  
  127.         case payUpFront
  128.  
  129.         case freeTrial
  130.     }
  131.  
  132.    
  133.     @available(iOS 12.2, *)
  134.     public enum `Type` : UInt {
  135.  
  136.        
  137.         case introductory
  138.  
  139.         case subscription
  140.     }
  141. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement