satellite/payments: Fix discount when listing invoices.
The error message Stripe's API was sending: "This property cannot be expanded (total_discount_amounts). You may want to try expanding 'data.total_discount_amounts' instead." Change-Id: I9f8cea4107d826d837755be2c3c04675a36f3c37
This commit is contained in:
parent
56f35e9ea9
commit
1b22525002
@ -75,7 +75,7 @@ func (invoices *invoices) ListWithDiscounts(ctx context.Context, userID uuid.UUI
|
||||
params := &stripe.InvoiceListParams{
|
||||
Customer: &customerID,
|
||||
}
|
||||
params.AddExpand("total_discount_amounts.discount")
|
||||
params.AddExpand("data.total_discount_amounts.discount")
|
||||
|
||||
invoicesIterator := invoices.service.stripeClient.Invoices().List(params)
|
||||
for invoicesIterator.Next() {
|
||||
|
Loading…
Reference in New Issue
Block a user