billing: Rename get_stripe_customer.

This commit is contained in:
Rishi Gupta 2018-08-06 12:22:55 -04:00
parent 086b7d76e5
commit 89ca1d0d97
2 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ def catch_stripe_errors(func: CallableT) -> CallableT:
return wrapped # type: ignore # https://github.com/python/mypy/issues/1927
@catch_stripe_errors
def get_stripe_customer(stripe_customer_id: str) -> stripe.Customer:
def stripe_get_customer(stripe_customer_id: str) -> stripe.Customer:
stripe_customer = stripe.Customer.retrieve(stripe_customer_id, expand=["default_source"])
if PRINT_STRIPE_FIXTURE_DATA:
print(''.join(['"customer_with_subscription": ', str(stripe_customer), ','])) # nocoverage

View File

@ -26,7 +26,7 @@ from zerver.lib.timestamp import timestamp_to_datetime
from zerver.models import UserProfile, Realm
from zerver.views.push_notifications import validate_token
from zilencer.lib.stripe import STRIPE_PUBLISHABLE_KEY, \
get_stripe_customer, get_upcoming_invoice, get_seat_count, \
stripe_get_customer, get_upcoming_invoice, get_seat_count, \
extract_current_subscription, process_initial_upgrade, sign_string, \
unsign_string, BillingError
from zilencer.models import RemotePushDeviceToken, RemoteZulipServer, \
@ -235,7 +235,7 @@ def billing_home(request: HttpRequest) -> HttpResponse:
return render(request, 'zilencer/billing.html', context=context)
context = {'admin_access': True}
stripe_customer = get_stripe_customer(customer.stripe_customer_id)
stripe_customer = stripe_get_customer(customer.stripe_customer_id)
subscription = extract_current_subscription(stripe_customer)
if subscription: