Open Gujci opened 4 years ago
Hey @Gujci, thanks for the request. We'll add this to our list for a future release, though it may have to wait until we work out our story for shipping Swift code as part of the SDK.
How would you make a struct implementing Decodable to manually decode this using decodedObject?
Summary
Codable
support forStripePaymentMethod
Code to reproduce
StripePaymentMethod
now conforms to a customSTPAPIResponseDecodable
to enable basic parsing from a serialized network response.However, this provides no conformance to the actual
Decodable
protocol, introduced in Swift 4. Since some of the developers may rely on generic wrappers around network calls, to reduce boilerplate, thus achieve cleaner code,Decodable
conformance would be needed.With the current interface a
Codable
(or justDecodable
) wrapper has to be introduced aroundStripePaymentMethod
.as far as I know, this is the only solution, please correct me if I'm wrong
iOS version
iOS 13
Installation method
Manual
SDK version
17.0.1
Other
Please flag as feature request if approved