-
Notifications
You must be signed in to change notification settings - Fork 335
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
feat: Introduce refund window to control if a refund is offered for a purchase #4784
base: main
Are you sure you want to change the base?
Conversation
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.
Mostly OK, although there are some unnecessary @_spi(Internal)
that should be removed. I don't think I should approve this one as I lack most of the context, but I've left some comments to improve this PR
RevenueCatUI/CustomerCenter/ViewModels/ManageSubscriptions/ManageSubscriptionsViewModel.swift
Outdated
Show resolved
Hide resolved
RevenueCatUI/CustomerCenter/ViewModels/ManageSubscriptions/ManageSubscriptionsViewModel.swift
Outdated
Show resolved
Hide resolved
RevenueCatUI/CustomerCenter/ViewModels/ManageSubscriptions/ManageSubscriptionsViewModel.swift
Outdated
Show resolved
Hide resolved
Tests/RevenueCatUITests/CustomerCenter/ManageSubscriptionsViewModelTests.swift
Outdated
Show resolved
Hide resolved
Tests/TestingApps/PaywallsTester/PaywallsTester/Config/ConfigItem.swift
Outdated
Show resolved
Hide resolved
Tests/UnitTests/SubscriberAttributes/PurchasesSubscriberAttributesTests.swift
Outdated
Show resolved
Hide resolved
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.
Thanks for the changes! Looks good to me, but as I said before, I leave approval to someone with actual context about the logic behind these changes
@@ -31,41 +31,41 @@ import Foundation | |||
/// - `"P1Y2M3DT4H5M6S"`: 1 year, 2 months, 3 days, 4 hours, 5 minutes, 6 seconds. | |||
/// - `"P3W"`: 3 weeks. | |||
/// - `"PT15M"`: 15 minutes. | |||
struct ISODuration { | |||
public struct ISODuration: Equatable { |
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.
Is this missing.@_spi(Internal)
?
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.
This needs to be public because it's part of
public enum RefundWindowDuration: Equatable {
case forever
case duration(ISODuration)
}
RevenueCatUI/CustomerCenter/ViewModels/ManageSubscriptions/ManageSubscriptionsViewModel.swift
Outdated
Show resolved
Hide resolved
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.
Just a comment about the naming but looking good!
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.
I think this file shouldn't be here. Some leftover from git
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.
damn
Motivation
We're giving more power to users by adding one setting in the dashboard. A default window can be added to show / hide the refund action in the Customer Center
Description
RefundWindowDuration
latestPurchaseDate
added toPurchaseInformation
clock
to mock current time and test itFollow-up of #4776