go.stripe
go.stripe copied to clipboard
Missing "data" field for Invoice.Data.Object.Lines type ?
Hi,
I think i spotted an error while using the webhooks. It returns an object which contains "lines". But it contains json field called "data" which is not present in the structure :(
Can you confirm it ?
JSON Webhook payment_succeeded from stripe
"period_start": 1406634003,
"period_end": 1406634003,
"lines": {
"data": [ // <==== HERE
{
"id": "sub_4UY3vxOFvXGlQm",
"object": "line_item",
"type": "subscription",
Struct https://github.com/drone/go.stripe/blob/master/invoice.go
....
Discount *Discount `json:"discount"`
Lines *InvoiceLines `json:"lines"`
StartingBalance int64 `json:"starting_balance"`
EndingBalance Int64 `json:"ending_balance"`
NextPayment Int64 `json:"next_payment_attempt"`
Livemode bool `json:"livemode"`
}
// InvoiceLines represents an individual line items that is part of an invoice.
type InvoiceLines struct {
InvoiceItems []*InvoiceItem `json:"invoiceitems"`
Prorations []*InvoiceItem `json:"prorations"`
Subscriptions []*SubscriptionItem `json:"subscriptions"`
}
type SubscriptionItem struct {
Amount int64 `json:"amount"`
Period *Period `json:"period"`
Plan *Plan `json:"plan"`
}
....