Skip to content
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
1 change: 1 addition & 0 deletions api/spec/src/billing/invoices.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ model InvoicePendingLineCreateResponse {
@visibility(Lifecycle.Read)
lines: InvoiceLine[];

// TODO: For the V3 api let's not return the invoice
/**
* The invoice containing the created lines.
*/
Expand Down
9 changes: 9 additions & 0 deletions openmeter/billing/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Adapter interface {
InvoiceLineAdapter
InvoiceSplitLineGroupAdapter
InvoiceAdapter
GatheringInvoiceAdapter
SequenceAdapter
InvoiceAppAdapter
CustomerSynchronizationAdapter
Expand Down Expand Up @@ -74,6 +75,14 @@ type InvoiceAdapter interface {
GetInvoiceOwnership(ctx context.Context, input GetInvoiceOwnershipAdapterInput) (GetOwnershipAdapterResponse, error)
}

type GatheringInvoiceAdapter interface {
CreateGatheringInvoice(ctx context.Context, input CreateGatheringInvoiceAdapterInput) (GatheringInvoice, error)
UpdateGatheringInvoice(ctx context.Context, input UpdateGatheringInvoiceAdapterInput) error
DeleteGatheringInvoice(ctx context.Context, input DeleteGatheringInvoiceAdapterInput) error
GetGatheringInvoiceById(ctx context.Context, input GetGatheringInvoiceByIdInput) (GatheringInvoice, error)
ListGatheringInvoices(ctx context.Context, input ListGatheringInvoicesInput) (pagination.Result[GatheringInvoice], error)
}

type InvoiceSplitLineGroupAdapter interface {
CreateSplitLineGroup(ctx context.Context, input CreateSplitLineGroupAdapterInput) (SplitLineGroup, error)
UpdateSplitLineGroup(ctx context.Context, input UpdateSplitLineGroupInput) (SplitLineGroup, error)
Expand Down
Loading
Loading