-
Notifications
You must be signed in to change notification settings - Fork 448
/
invoicelineitem.go
59 lines (53 loc) · 2.32 KB
/
invoicelineitem.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
//
// File generated from our OpenAPI spec
//
//
package stripe
// A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
type InvoiceLineType string
// List of values that InvoiceLineType can take
const (
InvoiceLineTypeInvoiceItem InvoiceLineType = "invoiceitem"
InvoiceLineTypeSubscription InvoiceLineType = "subscription"
)
// The amount of discount calculated per discount for this line item.
type InvoiceLineDiscountAmount struct {
Amount int64 `json:"amount"`
Discount *Discount `json:"discount"`
}
type InvoiceLine struct {
Amount int64 `json:"amount"`
Currency Currency `json:"currency"`
Description string `json:"description"`
Discountable bool `json:"discountable"`
DiscountAmounts []*InvoiceLineDiscountAmount `json:"discount_amounts"`
Discounts []*Discount `json:"discounts"`
ID string `json:"id"`
InvoiceItem string `json:"invoice_item"`
Livemode bool `json:"livemode"`
Metadata map[string]string `json:"metadata"`
Object string `json:"object"`
Period *Period `json:"period"`
Plan *Plan `json:"plan"`
Price *Price `json:"price"`
Proration bool `json:"proration"`
Quantity int64 `json:"quantity"`
Subscription string `json:"subscription"`
SubscriptionItem string `json:"subscription_item"`
TaxAmounts []*InvoiceTaxAmount `json:"tax_amounts"`
TaxRates []*TaxRate `json:"tax_rates"`
Type InvoiceLineType `json:"type"`
UnifiedProration bool `json:"unified_proration"`
}
// Period is a structure representing a start and end dates.
type Period struct {
End int64 `json:"end"`
Start int64 `json:"start"`
}
// InvoiceLineList is a list of InvoiceLineItems as retrieved from a list endpoint.
type InvoiceLineList struct {
APIResource
ListMeta
Data []*InvoiceLine `json:"data"`
}