billing: Change plan_interval to plan.interval.

There is no attribute called  plan_interval. The reason
this was missed by mypy is moost likely due to us using
Any instead of Subscription in extract_current_subscription.
This commit is contained in:
Vishnu Ks 2018-11-19 12:34:14 +05:30
parent 541bc0afda
commit d8804a2474
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ def estimate_customer_arr(stripe_customer: stripe.Customer) -> int: # nocoverag
return 0
# This is an overestimate for those paying by invoice
estimated_arr = stripe_subscription.plan.amount * stripe_subscription.quantity / 100.
if stripe_subscription.plan_interval == 'month':
if stripe_subscription.plan.interval == 'month':
estimated_arr *= 12
if stripe_customer.discount is not None:
estimated_arr *= 1 - stripe_customer.discount.coupon.percent_off/100.