Skip to content

Commit

Permalink
Merge pull request #404 from frogg/master
Browse files Browse the repository at this point in the history
Added new property "isInIntroOfferPeriod" to ReceiptItem
  • Loading branch information
bizz84 authored Oct 16, 2018
2 parents eaa51b7 + aef8f20 commit ca9d3ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SwiftyStoreKit/InAppReceipt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ extension ReceiptItem {
} else {
self.isTrialPeriod = false
}
if let isInIntroOfferPeriod = receiptInfo["is_in_intro_offer_period"] as? String {
self.isInIntroOfferPeriod = Bool(isInIntroOfferPeriod) ?? false
} else {
self.isInIntroOfferPeriod = false
}
}

private static func parseDate(from receiptInfo: ReceiptInfo, key: String) -> Date? {
Expand Down
2 changes: 2 additions & 0 deletions SwiftyStoreKit/SwiftyStoreKit+Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ public struct ReceiptItem {
public let cancellationDate: Date?

public let isTrialPeriod: Bool

public let isInIntroOfferPeriod: Bool
}

// Error when managing receipt
Expand Down

0 comments on commit ca9d3ff

Please sign in to comment.