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

Feat(invoice_custom_sections): update go-client with invoice_custom_sections #221

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
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
17 changes: 16 additions & 1 deletion customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand Down
20 changes: 15 additions & 5 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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 {
Expand Down
Loading