orginvoices

package
v0.64.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedInvoice

type AggregatedInvoice struct {
	ID          string    `rql:"name=id,type=string"`
	Amount      int64     `rql:"name=amount,type=number"`
	Currency    string    `rql:"name=currency,type=string"`
	State       string    `rql:"name=state,type=string"`
	InvoiceLink string    `rql:"name=invoice_link,type=string"`
	OrgID       string    `rql:"name=org_id,type=string"`
	CreatedAt   time.Time `rql:"name=created_at,type=datetime"`
}

type Group

type Group struct {
	Name string      `json:"name"`
	Data []GroupData `json:"data"`
}

type GroupData

type GroupData struct {
	Name  string `json:"name"`
	Count int    `json:"count"`
}

type OrganizationInvoices

type OrganizationInvoices struct {
	Invoices   []AggregatedInvoice `json:"invoices"`
	Group      Group               `json:"group"`
	Pagination Page                `json:"pagination"`
}

type Page

type Page struct {
	Limit  int `json:"limit"`
	Offset int `json:"offset"`
}

type Repository

type Repository interface {
	Search(ctx context.Context, orgID string, query *rql.Query) (OrganizationInvoices, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(repository Repository) *Service

func (Service) Search

func (s Service) Search(ctx context.Context, orgID string, query *rql.Query) (OrganizationInvoices, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL