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

Flexible billing primitives #538

Merged
merged 1 commit into from
Apr 2, 2018
Merged

Conversation

alexander-stripe
Copy link
Contributor

PR ported from internal internal GHE.

Adds flexible billing primitives to the SDK for beta functionality.

@alexander-stripe
Copy link
Contributor Author

r? @brandur-stripe

plan_test.go Outdated
{"tiers[0][amount]", &PlanParams{Tiers: tiers}, strconv.FormatUint(123, 10)},
{"tiers[0][up_to]", &PlanParams{Tiers: tiers}, strconv.FormatUint(321, 10)},
{"tiers[1][amount]", &PlanParams{Tiers: tiers}, strconv.FormatUint(123, 10)},
{"tiers[1][up_to]", &PlanParams{Tiers: tiers}, "inf"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the nit, but would you mind just alphabetizing these test cases by their leading string?

Quantity: 123,
Timestamp: now,
Action: stripe.UsageRecordParamsActionIncrement,
SubscriptionItem: "si_abc123",
Copy link
Contributor

Choose a reason for hiding this comment

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

Just per convention, mind just changing this to si_123?

@brandur-stripe
Copy link
Contributor

Added two minor asks, but otherwise LGTM.

Would you also mind just rebasing this into one commit with a good title/description? We've been trying to improve our commit hygiene more recently. Thanks!

@alexander-stripe alexander-stripe force-pushed the alexander/flexible-billing branch from e20dba5 to 4fdc1ee Compare April 2, 2018 23:20
@alexander-stripe
Copy link
Contributor Author

Thanks for taking a look! Done.

@brandur-stripe
Copy link
Contributor

Nice! Thanks for the quick fixes.

@brandur-stripe brandur-stripe merged commit c817432 into master Apr 2, 2018
@brandur-stripe brandur-stripe deleted the alexander/flexible-billing branch April 2, 2018 23:32
@brandur-stripe
Copy link
Contributor

Released as 30.3.0.

nadaismail-stripe pushed a commit that referenced this pull request Oct 18, 2024
* Extract subscription term from quote

* Updating test to not use custom price field

* Adjusting tests to pass on missing term on the order item level
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.

2 participants