Rishi Gupta
d0e377428a
billing: Fix typo in CONTACT_SUPPORT error message.
2018-08-10 22:48:10 -07:00
Rishi Gupta
2855864f54
billing: Rename RealmAuditLog.REALM_PLAN_QUANTITY_RESET.
2018-08-10 15:54:31 -07:00
Rishi Gupta
abc044e869
billing: Rename RealmAuditLog.REALM_PLAN_STARTED.
2018-08-10 15:54:31 -07:00
Rishi Gupta
d33d7e1c28
billing: Rename RealmAuditLog.REALM_CARD_ADDED.
2018-08-10 15:54:30 -07:00
Rishi Gupta
bdb6d8213f
billing: Rename RealmAuditLog.REALM_STRIPE_INITIALIZED.
2018-08-10 15:46:55 -07:00
Vishnu Ks
132480c031
billing: Pass email to stripe.Customer.create.
2018-08-10 13:52:35 -07:00
Rishi Gupta
2cdcf4b88f
billing: Rename get_upcoming_invoice.
2018-08-06 16:24:09 -04:00
Rishi Gupta
89ca1d0d97
billing: Rename get_stripe_customer.
2018-08-06 16:24:09 -04:00
Rishi Gupta
086b7d76e5
billing: Rename customer_with_active_subscription in fixture generation.
...
Fixes regression introduced in 79dddd5
.
2018-08-06 16:24:09 -04:00
Rishi Gupta
9f2b8a4a11
billing: Move checks from process_initial_upgrade into separate function.
2018-08-06 11:05:33 -04:00
Rishi Gupta
5719633992
billing: Update and unify billing error handling.
2018-08-06 11:05:33 -04:00
Vishnu Ks
e06957bef5
billing: Raise exceptions instead of returning errors in upgrade flow.
2018-08-06 11:05:33 -04:00
Vishnu Ks
8643c681f0
billing: Separate initial upgrade logic to another function.
2018-08-06 11:05:33 -04:00
Vishnu Ks
8bcd4131fe
billing: Rename retrieve_customer fixture.
2018-08-04 19:17:34 -04:00
Vishnu Ks
b7d3a1a0f3
billing: Don't check for stripe key and plan objects in tests.
...
Stripe already returns an appropriate error in prod, and these checks are
just a hassle in tests.
Also fixes an error where the check for Plan.objects.exists() was missing
a "not".
2018-08-04 19:17:34 -04:00
Rishi Gupta
4554b564f7
billing: Rename RealmAuditLog.REALM_PLAN_QUANTITY_UPDATED.
2018-07-31 10:56:31 -04:00
Vishnu Ks
ba7db968d8
billing: Don't check for stripe config while running tests.
2018-07-25 23:03:55 -07:00
Vishnu Ks
51c82b6d4f
models: Rename PLAN_QUANITY_UPDATED event type.
2018-07-25 23:03:55 -07:00
Vishnu Ks
975969aa89
stripe: Check for the existence of Pan objects in dev environment.
2018-07-25 23:03:55 -07:00
Vishnu Ks
b88613fd0b
billing: Expand default_source object when retrieving customer.
2018-07-24 10:20:23 -07:00
Vishnu Ks
1225bfd6ee
billing: Don't use data attribute for iterating through subscriptions.
...
Iterating through data attribute is same as iterating through
subscriptions.
2018-07-24 10:20:23 -07:00
Vishnu Ks
0bcc0ca0d8
stripe: Fix type of stripe_customer_id.
2018-07-24 10:20:23 -07:00
Vishnu Ks
d75054fb15
billing: Add function to sign strings.
2018-07-24 07:16:12 -07:00
Vishnu Ks
f2861442f7
billing: Enforce Customer can have only one live subscription at a time.
2018-07-23 19:03:36 -07:00
Vishnu Ks
db8700513b
stripe: Fix type of stripe_plan_id in do_subscribe_customer_to_plan.
2018-07-23 17:55:15 -07:00
Vishnu Ks
28167585b1
models: Rename several RealmAuditlog event types to past tense.
...
These event types haven't been used in production yet, and thus are
save to change without a migration.
2018-07-22 20:00:05 -07:00
Vishnu Ks
377fac2864
billing: Pass stripe_customer instead of Customer in upgrade functions.
2018-07-12 12:51:38 +05:30
Vishnu Ks
89fefcd1a2
mypy: Replace Any with stripe types in zilencer/lib/stripe.py.
2018-07-09 15:24:57 +05:30
Rishi Gupta
b5753d0ddc
billing: Add initial support for seat based plans.
...
The main remaining todo for correctly populating
RealmAuditLog.requires_billing_update is supporting the de-seating (and
corresponding re-seating) that happens after being offline for two weeks.
2018-07-09 14:33:08 +05:30
Rishi Gupta
16334a1ba7
billing: Update billing system.
2018-07-09 14:33:07 +05:30
Vishnu Ks
54a002c2e2
requirements: Upgrade pyflakes to 2.0.0.
...
We fix a few errors that only the new version finds.
2018-05-24 11:31:36 -07:00
Vishnu Ks
003cb0478a
stripe: Use sources.list instead of sources.all.
...
Sources.all would be depricated soon in favor of sources.list.
See https://github.com/stripe/stripe-python/blob/
v1.77.1/stripe/api_resources/list_object.py#L18
2018-02-12 12:45:46 -08:00
Greg Price
f9b12952f8
stripe: Move error handling into stripe.py too.
...
This completes the separation of our logic for managing Stripe
customers from the view code for the billing page.
As we add more features to our Customer model and to our Stripe
integration, we might further separate those two things; but for now
they're nearly synonymous and there's no problem in them being mixed
together.
2018-01-30 12:44:35 -08:00
Greg Price
0b81762350
billing: Move most Stripe code to its own file.
...
We'll handle the error-handling in a separate commit, as it's still
entangled with the view function.
2018-01-30 12:44:35 -08:00