Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1425

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions invoicelineitem.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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.
Expand Down