Vishnu Ks
84b148728f
billing: Don't mock functions in test_extract_current_subscription.
2018-08-04 19:17:34 -04:00
Vishnu Ks
c2023eaaa8
billing: Mention the exact type of stripe.Customers subscriptions attribute.
2018-08-04 19:17:34 -04:00
Vishnu Ks
036ad03b3a
billing: Mention the exact return type for mock functions.
2018-08-04 19:17:34 -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
abf485bfcb
billing: Add mypy stubs to stripe imports.
...
Tweaked by tabbott to add an extra type: ignore.
2018-07-26 16:31:32 -07:00
Vishnu Ks
d7b7430af0
billing: Add test for subscribing customer to second plan.
2018-07-25 23:03:55 -07: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
d6ed2c69be
billing: Don't use self.realm and self.user in tests.
2018-07-25 23:03:55 -07:00
Vishnu Ks
15eff517f4
billing: Verify that plan names are not tampered.
2018-07-24 08:04:00 -07:00
Vishnu Ks
82fc82b7e2
billing: Sign and verify the seat count during upgrade.
2018-07-24 08:04:00 -07:00
Vishnu Ks
d75054fb15
billing: Add function to sign strings.
2018-07-24 07:16:12 -07:00
Tim Abbott
888434e6cd
test_stripe: Delete broken test.
...
This is an expedient way to fix master failing, which it has been
since f2861442f7
.
2018-07-23 22:20: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
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
Max Nussenbaum
8fd900626d
billing: Style billing page.
...
This adds styles to /billing.
2018-07-13 18:30:38 +05:30
Vishnu Ks
895c7703a6
billing: Show the billing page only to admins and billing users.
2018-07-12 12:51:38 +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