-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MBL-1123: Refactor PaymentSourceSelected to be an enum (#1990)
* MBL-1123: Refactor PaymentSourceSelected to be an enum, instead of a struct * Tweak per review #1990
- Loading branch information
1 parent
249d2f9
commit cb0fb9b
Showing
6 changed files
with
71 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Foundation | ||
public enum PaymentSourceSelected: Equatable { | ||
case paymentSourceId(String) | ||
case setupIntentClientSecret(String) | ||
|
||
public var paymentSourceId: String? { | ||
switch self { | ||
case let .paymentSourceId(value): | ||
return value | ||
default: | ||
return nil | ||
} | ||
} | ||
|
||
public var setupIntentClientSecret: String? { | ||
switch self { | ||
case let .setupIntentClientSecret(value): | ||
return value | ||
default: | ||
return nil | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.