projectbilling

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreditOut

type CreditOut struct {
	Code           string     `json:"code,omitempty"`
	ExpireTime     *time.Time `json:"expire_time,omitempty"`
	RemainingValue string     `json:"remaining_value,omitempty"`
	StartTime      *time.Time `json:"start_time,omitempty"`
	Type           string     `json:"type,omitempty"`
	Value          string     `json:"value,omitempty"`
}

type Handler

type Handler interface {
	// ProjectCreditsClaim claim a credit code
	// POST /project/{project}/credits
	// https://api.aiven.io/doc/#tag/Project_Billing/operation/ProjectCreditsClaim
	ProjectCreditsClaim(ctx context.Context, project string, in *ProjectCreditsClaimIn) (*ProjectCreditsClaimOut, error)

	// ProjectCreditsList list project credits
	// GET /project/{project}/credits
	// https://api.aiven.io/doc/#tag/Project_Billing/operation/ProjectCreditsList
	ProjectCreditsList(ctx context.Context, project string) ([]CreditOut, error)

	// ProjectInvoiceList list project invoices
	// GET /project/{project}/invoice
	// https://api.aiven.io/doc/#tag/Project_Billing/operation/ProjectInvoiceList
	ProjectInvoiceList(ctx context.Context, project string) ([]InvoiceOut, error)
}

type InvoiceOut

type InvoiceOut struct {
	BillingGroupId    string     `json:"billing_group_id"`
	BillingGroupName  string     `json:"billing_group_name"`
	BillingGroupState string     `json:"billing_group_state"`
	Currency          string     `json:"currency"`
	DownloadCookie    string     `json:"download_cookie"`
	GeneratedAt       *time.Time `json:"generated_at,omitempty"`
	InvoiceNumber     string     `json:"invoice_number"`
	PeriodBegin       string     `json:"period_begin"`
	PeriodEnd         string     `json:"period_end"`
	State             string     `json:"state"`
	TotalIncVat       string     `json:"total_inc_vat"`
	TotalVatZero      string     `json:"total_vat_zero"`
}

type ProjectBillingHandler

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

func NewHandler

func NewHandler(doer doer) ProjectBillingHandler

func (*ProjectBillingHandler) ProjectCreditsClaim

func (h *ProjectBillingHandler) ProjectCreditsClaim(ctx context.Context, project string, in *ProjectCreditsClaimIn) (*ProjectCreditsClaimOut, error)

func (*ProjectBillingHandler) ProjectCreditsList

func (h *ProjectBillingHandler) ProjectCreditsList(ctx context.Context, project string) ([]CreditOut, error)

func (*ProjectBillingHandler) ProjectInvoiceList

func (h *ProjectBillingHandler) ProjectInvoiceList(ctx context.Context, project string) ([]InvoiceOut, error)

type ProjectCreditsClaimIn

type ProjectCreditsClaimIn struct {
	Code string `json:"code"`
}

type ProjectCreditsClaimOut

type ProjectCreditsClaimOut struct {
	Code           string     `json:"code,omitempty"`
	ExpireTime     *time.Time `json:"expire_time,omitempty"`
	RemainingValue string     `json:"remaining_value,omitempty"`
	StartTime      *time.Time `json:"start_time,omitempty"`
	Type           string     `json:"type,omitempty"`
	Value          string     `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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