diff --git a/customer.go b/customer.go index 453cdc6..756b303 100644 --- a/customer.go +++ b/customer.go @@ -109,6 +109,8 @@ type CustomerInput struct { IntegrationCustomers []IntegrationCustomer `json:"integration_customers,omitempty"` TaxCodes []string `json:"tax_codes,omitempty"` FinalizeZeroAmountInvoice FinalizeZeroAmountInvoice `json:"finalize_zero_amount_invoice,omitempty"` + SkipInvoiceCustomSections bool `json:"skip_invoice_custom_sections,omitempty"` + InvoiceCustomSectionCodes []string `json:"invoice_custom_section_codes,omitempty"` } type CustomerListInput struct { @@ -153,6 +155,17 @@ type IntegrationCustomer struct { SyncWithProvider bool `json:"sync_with_provider,omitempty"` } +type InvoiceCustomSection struct { + LagoId uuid.UUID `json:"lago_id,omitempty"` + Code string `json:"code,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Details string `json:"details,omitempty"` + DisplayName string `json:"display_name,omitempty"` + AppliedToOrganization bool `json:"applied_to_organization,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` +} + type IntegrationCustomersResponse struct { LagoID uuid.UUID `json:"lago_id,omitempty"` ExternalCustomerId string `json:"external_customer_id,omitempty"` @@ -253,8 +266,10 @@ type Customer struct { Currency Currency `json:"currency,omitempty"` Timezone string `json:"timezone,omitempty"` ApplicableTimezone string `json:"applicable_timezone,omitempty"` + SkipInvoiceCustomSections bool `json:"skip_invoice_custom_sections,omitempty"` - Taxes []Tax `json:"taxes,omitempty"` + Taxes []Tax `json:"taxes,omitempty"` + ApplicableInvoiceCustomSections []InvoiceCustomSection `json:"applicable_invoice_custom_sections,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` diff --git a/invoice.go b/invoice.go index 5f24aaa..3a2a792 100644 --- a/invoice.go +++ b/invoice.go @@ -131,6 +131,15 @@ type InvoiceCredit struct { BeforeTaxes bool `json:"before_taxes,omitempty"` } +type InvoiceAppliedInvoiceCustomSection struct { + LagoId uuid.UUID `json:"lago_id,omitempty"` + LagoInvoiceId uuid.UUID `json:"lago_invoice_id,omitempty"` + Code string `json:"code,omitempty"` + Details string `json:"details,omitempty"` + DisplayName string `json:"display_name,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` +} + type InvoiceAppliedTax struct { LagoId uuid.UUID `json:"lago_id,omitempty"` LagoInvoiceId uuid.UUID `json:"lago_invoice_id,omitempty"` @@ -185,11 +194,12 @@ 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"` - AppliedUsageThreshold []AppliedUsageThreshold `json:"applied_usage_threshold,omitempty"` + Fees []Fee `json:"fees,omitempty"` + Credits []InvoiceCredit `json:"credits,omitempty"` + AppliedInvoiceCustomSections []InvoiceAppliedInvoiceCustomSection `json:"applied_invoice_custom_sections,omitempty"` + AppliedTaxes []InvoiceAppliedTax `json:"applied_taxes,omitempty"` + ErrorDetails []InvoiceErrorDetail `json:"error_details,omitempty"` + AppliedUsageThreshold []AppliedUsageThreshold `json:"applied_usage_threshold,omitempty"` } type InvoicePaymentUrl struct {