stripe: Fix type of stripe_customer_id.

This commit is contained in:
Vishnu Ks 2018-07-19 18:56:22 +05:30 committed by Rishi Gupta
parent 3b36532407
commit 0bcc0ca0d8
1 changed files with 2 additions and 2 deletions

View File

@ -90,14 +90,14 @@ 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: int) -> stripe.Customer:
def get_stripe_customer(stripe_customer_id: str) -> stripe.Customer:
stripe_customer = stripe.Customer.retrieve(stripe_customer_id)
if PRINT_STRIPE_FIXTURE_DATA:
print(''.join(['"retrieve_customer": ', str(stripe_customer), ','])) # nocoverage
return stripe_customer
@catch_stripe_errors
def get_upcoming_invoice(stripe_customer_id: int) -> stripe.Invoice:
def get_upcoming_invoice(stripe_customer_id: str) -> stripe.Invoice:
stripe_invoice = stripe.Invoice.upcoming(customer=stripe_customer_id)
if PRINT_STRIPE_FIXTURE_DATA:
print(''.join(['"upcoming_invoice": ', str(stripe_invoice), ','])) # nocoverage