-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to pass a lambda parameter for action handler
- Loading branch information
Showing
6 changed files
with
53 additions
and
86 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
22 changes: 22 additions & 0 deletions
22
RevenueCatUI/CustomerCenter/Data/CustomerCenterAction.swift
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,22 @@ | ||
import RevenueCat | ||
|
||
/// Typealias for handler for Customer center actions | ||
public typealias CustomerCenterActionHandler = @MainActor @Sendable (CustomerCenterAction) -> Void | ||
|
||
/// Represents an event the customer may perform during the Customer Center flow | ||
public enum CustomerCenterAction { | ||
/// Purchase of a promotional offer is completed. | ||
case purchaseCompleted(_ customerInfo: CustomerInfo) | ||
/// Starting the restoration process | ||
case restoreStarted | ||
/// Restore errored out | ||
case restoreFailed(_ error: Error) | ||
/// Restore completed successfully | ||
case restoreCompleted(_ customerInfo: CustomerInfo) | ||
/// Going to display manage subscription page, whether for cancellation or changing plans. | ||
case showingManageSubscriptions | ||
/// Starting refund request process | ||
case refundRequestStarted(_ productId: String) | ||
/// Refund request process finished, with result provided. | ||
case refundRequestCompleted(_ refundRequestStatus: RefundRequestStatus) | ||
} |
45 changes: 0 additions & 45 deletions
45
RevenueCatUI/CustomerCenter/Data/CustomerCenterActionHandler.swift
This file was deleted.
Oops, something went wrong.
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