Skip to content

Commit

Permalink
fix: parse InvoiceErrorDetail.details as an object correctly (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
steved authored Dec 3, 2024
1 parent d6cdf26 commit 3b61d6c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ type InvoiceAppliedTax struct {
}

type InvoiceErrorDetail struct {
LagoId uuid.UUID `json:"lago_id,omitempty"`
ErrorCode string `json:"error_code,omitempty"`
Details string `json:"details,omitempty"`
LagoId uuid.UUID `json:"lago_id,omitempty"`
ErrorCode string `json:"error_code,omitempty"`
Details map[string]any `json:"details,omitempty"`
}

type Invoice struct {
Expand Down Expand Up @@ -185,10 +185,10 @@ type Invoice struct {
Customer *Customer `json:"customer,omitempty"`
Subscriptions []Subscription `json:"subscriptions,omitempty"`

Fees []Fee `json:"fees,omitempty"`
Credits []InvoiceCredit `json:"credits,omitempty"`
AppliedTaxes []InvoiceAppliedTax `json:"applied_taxes,omitempty"`
ErrorDetails []InvoiceErrorDetail `json:"error_details,omitempty"`
Fees []Fee `json:"fees,omitempty"`
Credits []InvoiceCredit `json:"credits,omitempty"`
AppliedTaxes []InvoiceAppliedTax `json:"applied_taxes,omitempty"`
ErrorDetails []InvoiceErrorDetail `json:"error_details,omitempty"`
AppliedUsageThreshold []AppliedUsageThreshold `json:"applied_usage_threshold,omitempty"`
}

Expand Down

0 comments on commit 3b61d6c

Please sign in to comment.