Skip to content

Commit

Permalink
Don't store all response fields in LinkConsumerIncentive
Browse files Browse the repository at this point in the history
  • Loading branch information
tillh-stripe committed Nov 20, 2024
1 parent 39a1379 commit e6fee12
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ import Foundation
@_spi(STP) public let incentiveParams: IncentiveParams
@_spi(STP) public let incentiveDisplayText: String?

@_spi(STP) public let allResponseFields: [AnyHashable : Any]
@_spi(STP) public private(set) var allResponseFields: [AnyHashable: Any] = [:]

init(
incentiveParams: IncentiveParams,
incentiveDisplayText: String?,
allResponseFields: [AnyHashable: Any]
incentiveDisplayText: String?
) {
self.incentiveParams = incentiveParams
self.incentiveDisplayText = incentiveDisplayText
self.allResponseFields = allResponseFields
}

@_spi(STP) public static func decodedObject(
Expand All @@ -43,8 +41,7 @@ import Foundation

return LinkConsumerIncentive(
incentiveParams: incentiveParams,
incentiveDisplayText: incentiveDisplayText,
allResponseFields: response
incentiveDisplayText: incentiveDisplayText
) as? Self
}

Expand Down

0 comments on commit e6fee12

Please sign in to comment.