-
Notifications
You must be signed in to change notification settings - Fork 975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move BillingDetails
model to StripeCore
module, and pass to ElementsSessionContext
#4142
base: master
Are you sure you want to change the base?
Conversation
🚨 New dead code detected in this PR: FinancialConnectionsAPIClient.swift:236 warning: Function 'sharePaymentDetails(consumerSessionClientSecret:paymentDetailsId:expectedPaymentMethodType:billingDetails:)' is unused
FinancialConnectionsAPIClient.swift:243 warning: Function 'paymentMethods(consumerSessionClientSecret:paymentDetailsId:billingDetails:)' is unused Please remove the dead code before merging. If this is intentional, you can bypass this check by adding the label ℹ️ If this comment appears to be left in error, double check that the flagged code is actually used and/or make sure your branch is up-to-date with |
StripeCore- public struct BillingDetails : StripeCore.UnknownFieldsCodable {
- public var address: StripeCore.StripeAPI.BillingDetails.Address?
- public struct Address : StripeCore.UnknownFieldsCodable {
- public var line1: Swift.String?
- public var line2: Swift.String?
- public var city: Swift.String?
- public var state: Swift.String?
- public var postalCode: Swift.String?
- public var country: Swift.String?
- public var _additionalParametersStorage: StripeCore.NonEncodableParameters?
- public var _allResponseFieldsStorage: StripeCore.NonEncodableParameters?
- public init(line1: Swift.String? = nil, line2: Swift.String? = nil, city: Swift.String? = nil, state: Swift.String? = nil, postalCode: Swift.String? = nil, country: Swift.String? = nil)
- public func encode(to encoder: any Swift.Encoder) throws
- public init(from decoder: any Swift.Decoder) throws
+ }
- public var email: Swift.String?
- public var name: Swift.String?
- public var phone: Swift.String?
- public var _additionalParametersStorage: StripeCore.NonEncodableParameters?
- public var _allResponseFieldsStorage: StripeCore.NonEncodableParameters?
- public init(address: StripeCore.StripeAPI.BillingDetails.Address? = nil, email: Swift.String? = nil, name: Swift.String? = nil, phone: Swift.String? = nil)
- public func encode(to encoder: any Swift.Encoder) throws
- public init(from decoder: any Swift.Decoder) throws
+ } StripeApplePay- public struct BillingDetails : StripeCore.UnknownFieldsCodable {
- public var address: StripeCore.StripeAPI.BillingDetails.Address?
- public struct Address : StripeCore.UnknownFieldsCodable {
- public var line1: Swift.String?
- public var line2: Swift.String?
- public var city: Swift.String?
- public var state: Swift.String?
- public var postalCode: Swift.String?
- public var country: Swift.String?
- public var _additionalParametersStorage: StripeCore.NonEncodableParameters?
- public var _allResponseFieldsStorage: StripeCore.NonEncodableParameters?
- public func encode(to encoder: any Swift.Encoder) throws
- public init(from decoder: any Swift.Decoder) throws
- }
- public var email: Swift.String?
- public var name: Swift.String?
- public var phone: Swift.String?
- public var _additionalParametersStorage: StripeCore.NonEncodableParameters?
- public var _allResponseFieldsStorage: StripeCore.NonEncodableParameters?
- public func encode(to encoder: any Swift.Encoder) throws
- public init(from decoder: any Swift.Decoder) throws
- } If you are adding a new public API consider the following:
If you are modifying or removing a public API:
If you confirm these APIs need to be added/updated and have undergone necessary review, add the label ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with |
let encoder = JSONEncoder() | ||
encoder.keyEncodingStrategy = .convertToSnakeCase | ||
let encodedBillingDetails = try encoder.encode(billingDetails) | ||
parameters["billing_details"] = encodedBillingDetails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Motivation
Testing
Changelog