@@ -41,20 +41,25 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
4141 ///
4242 public let lastEligibilityErrorInfo : EligibilityErrorInfo ?
4343
44+ /// The last time the Jetpack benefits banner is dismissed.
45+ public let lastJetpackBenefitsBannerDismissedTime : Date ?
46+
4447 public init ( installationDate: Date ? ,
4548 feedbacks: [ FeedbackType : FeedbackSettings ] ,
4649 isViewAddOnsSwitchEnabled: Bool ,
4750 isSimplePaymentsSwitchEnabled: Bool ,
4851 isOrderCreationSwitchEnabled: Bool ,
4952 knownCardReaders: [ String ] ,
50- lastEligibilityErrorInfo: EligibilityErrorInfo ? = nil ) {
53+ lastEligibilityErrorInfo: EligibilityErrorInfo ? = nil ,
54+ lastJetpackBenefitsBannerDismissedTime: Date ? = nil ) {
5155 self . installationDate = installationDate
5256 self . feedbacks = feedbacks
5357 self . isViewAddOnsSwitchEnabled = isViewAddOnsSwitchEnabled
5458 self . isSimplePaymentsSwitchEnabled = isSimplePaymentsSwitchEnabled
5559 self . isOrderCreationSwitchEnabled = isOrderCreationSwitchEnabled
5660 self . knownCardReaders = knownCardReaders
5761 self . lastEligibilityErrorInfo = lastEligibilityErrorInfo
62+ self . lastJetpackBenefitsBannerDismissedTime = lastJetpackBenefitsBannerDismissedTime
5863 }
5964
6065 /// Returns the status of a given feedback type. If the feedback is not stored in the feedback array. it is assumed that it has a pending status.
@@ -100,6 +105,7 @@ extension GeneralAppSettings {
100105 self . isOrderCreationSwitchEnabled = try container. decodeIfPresent ( Bool . self, forKey: . isOrderCreationSwitchEnabled) ?? false
101106 self . knownCardReaders = try container. decodeIfPresent ( [ String ] . self, forKey: . knownCardReaders) ?? [ ]
102107 self . lastEligibilityErrorInfo = try container. decodeIfPresent ( EligibilityErrorInfo . self, forKey: . lastEligibilityErrorInfo)
108+ self . lastJetpackBenefitsBannerDismissedTime = try container. decodeIfPresent ( Date . self, forKey: . lastJetpackBenefitsBannerDismissedTime)
103109
104110 // Decode new properties with `decodeIfPresent` and provide a default value if necessary.
105111 }
0 commit comments