Documentation ¶
Index ¶
- func BillingGroupStateTypeChoices() []string
- func CreditTypeChoices() []string
- func CurrencyTypeChoices() []string
- func InvoiceStateTypeChoices() []string
- type BillingGroupStateType
- type CreditOut
- type CreditType
- type CurrencyType
- type Handler
- type InvoiceGetOut
- type InvoiceOut
- type InvoiceStateType
- type ProjectBillingHandler
- func (h *ProjectBillingHandler) InvoiceGet(ctx context.Context, invoiceNumber string) (*InvoiceGetOut, error)
- func (h *ProjectBillingHandler) ProjectCreditsClaim(ctx context.Context, project string, in *ProjectCreditsClaimIn) (*ProjectCreditsClaimOut, error)
- func (h *ProjectBillingHandler) ProjectCreditsList(ctx context.Context, project string) ([]CreditOut, error)
- func (h *ProjectBillingHandler) ProjectInvoiceList(ctx context.Context, project string) ([]InvoiceOut, error)
- type ProjectCreditsClaimIn
- type ProjectCreditsClaimOut
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BillingGroupStateTypeChoices ¶ added in v0.3.0
func BillingGroupStateTypeChoices() []string
func CreditTypeChoices ¶ added in v0.3.0
func CreditTypeChoices() []string
func CurrencyTypeChoices ¶ added in v0.3.0
func CurrencyTypeChoices() []string
func InvoiceStateTypeChoices ¶ added in v0.3.0
func InvoiceStateTypeChoices() []string
Types ¶
type BillingGroupStateType ¶ added in v0.3.0
type BillingGroupStateType string
const ( BillingGroupStateTypeActive BillingGroupStateType = "active" BillingGroupStateTypeDeleted BillingGroupStateType = "deleted" )
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 CreditType `json:"type,omitempty"` Value string `json:"value,omitempty"` }
type CreditType ¶ added in v0.3.0
type CreditType string
const ( CreditTypeDiscount CreditType = "discount" CreditTypeEmployee CreditType = "employee" CreditTypeEvaluation CreditType = "evaluation" CreditTypeInternal CreditType = "internal" CreditTypeOther CreditType = "other" CreditTypeOutage CreditType = "outage" CreditTypePartner CreditType = "partner" CreditTypePromotion CreditType = "promotion" CreditTypePurchase CreditType = "purchase" CreditTypeReferral CreditType = "referral" CreditTypeSponsorship CreditType = "sponsorship" CreditTypeTrial CreditType = "trial" CreditTypeTrialOver CreditType = "trial_over" )
type CurrencyType ¶ added in v0.3.0
type CurrencyType string
const ( CurrencyTypeAud CurrencyType = "AUD" CurrencyTypeCad CurrencyType = "CAD" CurrencyTypeChf CurrencyType = "CHF" CurrencyTypeDkk CurrencyType = "DKK" CurrencyTypeEur CurrencyType = "EUR" CurrencyTypeGbp CurrencyType = "GBP" CurrencyTypeJpy CurrencyType = "JPY" CurrencyTypeNok CurrencyType = "NOK" CurrencyTypeNzd CurrencyType = "NZD" CurrencyTypeSek CurrencyType = "SEK" CurrencyTypeSgd CurrencyType = "SGD" CurrencyTypeUsd CurrencyType = "USD" )
type Handler ¶
type Handler interface { // InvoiceGet get a single invoice // GET /v1/invoices/{invoice_number} // https://api.aiven.io/doc/#tag/Billing/operation/InvoiceGet InvoiceGet(ctx context.Context, invoiceNumber string) (*InvoiceGetOut, error) // ProjectCreditsClaim claim a credit code // POST /v1/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 /v1/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 /v1/project/{project}/invoice // https://api.aiven.io/doc/#tag/Project_Billing/operation/ProjectInvoiceList ProjectInvoiceList(ctx context.Context, project string) ([]InvoiceOut, error) }
type InvoiceGetOut ¶ added in v0.8.0
type InvoiceGetOut 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,omitempty"` GeneratedAt time.Time `json:"generated_at"` 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 InvoiceOut ¶
type InvoiceOut struct { BillingGroupId string `json:"billing_group_id"` BillingGroupName string `json:"billing_group_name"` BillingGroupState BillingGroupStateType `json:"billing_group_state"` Currency CurrencyType `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 InvoiceStateType `json:"state"` TotalIncVat string `json:"total_inc_vat"` TotalVatZero string `json:"total_vat_zero"` }
type InvoiceStateType ¶ added in v0.3.0
type InvoiceStateType string
const ( InvoiceStateTypeAccrual InvoiceStateType = "accrual" InvoiceStateTypeConsolidated InvoiceStateType = "consolidated" InvoiceStateTypeDue InvoiceStateType = "due" InvoiceStateTypeEstimate InvoiceStateType = "estimate" InvoiceStateTypeFailedCreditCardCharge InvoiceStateType = "failed_credit_card_charge" InvoiceStateTypeFailedNoCreditCard InvoiceStateType = "failed_no_credit_card" InvoiceStateTypeMailed InvoiceStateType = "mailed" InvoiceStateTypeNoPaymentExpected InvoiceStateType = "no_payment_expected" InvoiceStateTypePaid InvoiceStateType = "paid" InvoiceStateTypePartnerMetering InvoiceStateType = "partner_metering" InvoiceStateTypeUncollectible InvoiceStateType = "uncollectible" InvoiceStateTypeWaived InvoiceStateType = "waived" InvoiceStateTypeDueOnlyProjectChargesCalculated InvoiceStateType = "due_only_project_charges_calculated" InvoiceStateTypeEstimateOnlyProjectChargesCalculated InvoiceStateType = "estimate_only_project_charges_calculated" )
type ProjectBillingHandler ¶
type ProjectBillingHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(doer doer) ProjectBillingHandler
func (*ProjectBillingHandler) InvoiceGet ¶ added in v0.8.0
func (h *ProjectBillingHandler) InvoiceGet(ctx context.Context, invoiceNumber string) (*InvoiceGetOut, error)
func (*ProjectBillingHandler) ProjectCreditsClaim ¶
func (h *ProjectBillingHandler) ProjectCreditsClaim(ctx context.Context, project string, in *ProjectCreditsClaimIn) (*ProjectCreditsClaimOut, error)
func (*ProjectBillingHandler) ProjectCreditsList ¶
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 CreditType `json:"type,omitempty"` Value string `json:"value,omitempty"` }
Click to show internal directories.
Click to hide internal directories.