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

Adds subscription offers support #104

Merged
merged 2 commits into from
Sep 28, 2020
Merged

Adds subscription offers support #104

merged 2 commits into from
Sep 28, 2020

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Sep 26, 2020

  • Adds getPaymentDiscount to get a signed discount.
  • Creates a purchaseDiscountedProduct and purchaseDiscountedPackage. Since there is no overloads in dart, and upgrade info and type parameters in the regular purchase calls are only relevant to Android I figured it was cleaner to create new functions.

#25

@vegaro vegaro requested a review from aboedo September 26, 2020 00:47
@vegaro vegaro linked an issue Sep 26, 2020 that may be closed by this pull request
Copy link
Member

@aboedo aboedo left a comment

Choose a reason for hiding this comment

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

looks great!

@@ -74,3 +82,61 @@ class IntroductoryPrice {
return 'IntroductoryPrice{introPrice: $introPrice, introPriceString: $introPriceString, introPricePeriod: $introPricePeriod, introPricePeriodUnit: $introPricePeriodUnit, introPricePeriodNumberOfUnits: $introPricePeriodNumberOfUnits, introPriceCycles: $introPriceCycles}';
}
}

/// The details of a discount offer for a subscription product.
class Discount {
Copy link
Member

Choose a reason for hiding this comment

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

NABD, but should this be its own file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, I will extract it

@vegaro vegaro merged commit d060a22 into develop Sep 28, 2020
@vegaro vegaro deleted the offers branch September 28, 2020 22:45
@vegaro vegaro added this to the 1.4.0 milestone Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any plans to support ios subscription offers in the flutter sdk?
2 participants