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

Add Support for Tiered Pricing Plans #629

Open
wants to merge 14 commits into
base: original
Choose a base branch
from
Prev Previous commit
Next Next commit
Update Migrations
  • Loading branch information
jksimoniii committed Feb 3, 2019
commit 17a915b6c199a75be28eca7e91782f721f61ee53
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.2a1 on 2019-02-03 14:44
# Generated by Django 2.2a1 on 2019-02-03 14:49

from django.db import migrations, models
import django.db.models.deletion
Expand Down Expand Up @@ -27,7 +27,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('amount', models.DecimalField(decimal_places=2, max_digits=9)),
('flat_amount', models.DecimalField(decimal_places=2, max_digits=9)),
('up_to', models.DecimalField(blank=True, null=True)),
('up_to', models.IntegerField(blank=True, null=True)),
('plan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tiers', to='pinax_stripe.Plan')),
],
),
Expand Down
2 changes: 1 addition & 1 deletion pinax/stripe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ class Tier(models.Model):
plan = models.ForeignKey(Plan, related_name="tiers", on_delete=models.CASCADE)
amount = models.DecimalField(decimal_places=2, max_digits=9)
flat_amount = models.DecimalField(decimal_places=2, max_digits=9)
up_to = models.DecimalField(blank=True, null=True)
up_to = models.IntegerField(blank=True, null=True)

objects = models.Manager()
pricing = TieredPricingManager()
Expand Down