Skip to content

Commit

Permalink
Invoice: Add customer_email in invoice object
Browse files Browse the repository at this point in the history
[Stripe documentation on invoices] describes this field like this:

> customer_email - nullable string
>
> The customer’s email. Until the invoice is finalized, this field will equal
> customer.email. Once the invoice is finalized, this field will no longer be
> updated.

So it's the field to use to know where the invoice was effectively sent if it
was sent by email after being finalized.

[Stripe documentation on invoices]:
https://docs.stripe.com/api/invoices/object#invoice_object-customer_email
  • Loading branch information
feliixx committed Jan 17, 2025
1 parent fdbe945 commit 7242072
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions localstripe/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ def __init__(self, customer=None, subscription=None, metadata=None,
super().__init__()

self.customer = customer
self.customer_email = cus.email
self.subscription = subscription
self.tax_percent = tax_percent
self.default_tax_rates = default_tax_rates
Expand Down

0 comments on commit 7242072

Please sign in to comment.