mirror of https://github.com/zulip/zulip.git
stripe: Fix type of stripe_customer_id.
This commit is contained in:
parent
3b36532407
commit
0bcc0ca0d8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue