Explorar o código

adds init to PendingRenewalInfo

Justin Schröder %!s(int64=4) %!d(string=hai) anos
pai
achega
0b78ed3319
Modificáronse 1 ficheiros con 15 adicións e 0 borrados
  1. 15 0
      Sources/SwiftyStoreKit/SwiftyStoreKit+Types.swift

+ 15 - 0
Sources/SwiftyStoreKit/SwiftyStoreKit+Types.swift

@@ -353,6 +353,21 @@ public struct PendingRenewalInfo: Codable {
         case userDidNotConsent = "0"
         case userDidConsent = "1"
     }
+    
+    public init(autoRenewProductId: String, autoRenewStatus: AutoRenewStatus, expirationIntent: ExpirationIntent?, gracePeriodExpiresDate: String?, gracePeriodExpiresDateMS: String?, gracePeriodExpiresDatePST: String?, isInBillingRetryPeriod: BillingRetryPeriod?, offerCodeRefName: String?, originalTransactionId: String, priceConsentStatus: PriceConsentStatus?, productId: String, promotionalOfferId: String?) {
+        self.autoRenewProductId = autoRenewProductId
+        self.autoRenewStatus = autoRenewStatus
+        self.expirationIntent = expirationIntent
+        self.gracePeriodExpiresDate = gracePeriodExpiresDate
+        self.gracePeriodExpiresDateMS = gracePeriodExpiresDateMS
+        self.gracePeriodExpiresDatePST = gracePeriodExpiresDatePST
+        self.isInBillingRetryPeriod = isInBillingRetryPeriod
+        self.offerCodeRefName = offerCodeRefName
+        self.originalTransactionId = originalTransactionId
+        self.priceConsentStatus = priceConsentStatus
+        self.productId = productId
+        self.promotionalOfferId = promotionalOfferId
+    }
 }
 
 /// Status code returned by remote server