From 6e6d8610c8ddd0eb07c7a62bcb6b0e3927a42600 Mon Sep 17 00:00:00 2001 From: Dominic Charley-Roy Date: Wed, 2 Mar 2022 10:26:46 -0500 Subject: [PATCH] Codegen for openapi 21965d1 --- invoicelineitem.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/invoicelineitem.go b/invoicelineitem.go index bfeeec6544..da69d2dc7d 100644 --- a/invoicelineitem.go +++ b/invoicelineitem.go @@ -22,6 +22,20 @@ type InvoiceLineDiscountAmount struct { // The discount that was applied to get this discount amount. Discount *Discount `json:"discount"` } + +// For a credit proration `line_item`, the original debit line_items to which the credit proration applies. +type InvoiceLineProrationDetailsCreditedItems struct { + // Invoice containing the credited invoice line items + Invoice string `json:"invoice"` + // Credited invoice line items + InvoiceLineItems []string `json:"invoice_line_items"` +} + +// Additional details for proration line items +type InvoiceLineProrationDetails struct { + // For a credit proration `line_item`, the original debit line_items to which the credit proration applies. + CreditedItems *InvoiceLineProrationDetailsCreditedItems `json:"credited_items"` +} type InvoiceLine struct { // The amount, in %s. Amount int64 `json:"amount"` @@ -52,6 +66,8 @@ type InvoiceLine struct { Price *Price `json:"price"` // Whether this is a proration. Proration bool `json:"proration"` + // Additional details for proration line items + ProrationDetails *InvoiceLineProrationDetails `json:"proration_details"` // The quantity of the subscription, if the line item is a subscription or a proration. Quantity int64 `json:"quantity"` // The subscription that the invoice item pertains to, if any.