Skip to content
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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

facumenzella
Copy link
Contributor

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 to PurchaseInformation
  • Use clock to mock current time and test it
  • Added doc to Clock forced by linter 🙃

Follow-up of #4776

Copy link
Member

@ajpallares ajpallares left a 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

@facumenzella facumenzella requested a review from a team February 18, 2025 08:26
Copy link
Member

@ajpallares ajpallares left a 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 {
Copy link
Contributor

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) ?

Copy link
Contributor Author

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)
        }

Copy link
Contributor

@tonidero tonidero left a 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!

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants