Documentation
¶
Index ¶
- func BillingCurrencyTypeChoices() []string
- func BillingGroupStateTypeChoices() []string
- func CreditTypeChoices() []string
- func CurrencyTypeChoices() []string
- func InvoiceStateTypeChoices() []string
- func LineTypeChoices() []string
- func PaymentMethodTypeChoices() []string
- func ServiceTypeChoices() []string
- type BillingCurrencyType
- type BillingEmailIn
- type BillingEmailOut
- type BillingGroupCreateIn
- type BillingGroupCreateOut
- type BillingGroupCreditsClaimIn
- type BillingGroupCreditsClaimOut
- type BillingGroupGetOut
- type BillingGroupHandler
- func (h *BillingGroupHandler) BillingGroupCreate(ctx context.Context, in *BillingGroupCreateIn) (*BillingGroupCreateOut, error)
- func (h *BillingGroupHandler) BillingGroupCreditsClaim(ctx context.Context, billingGroupId string, in *BillingGroupCreditsClaimIn) (*BillingGroupCreditsClaimOut, error)
- func (h *BillingGroupHandler) BillingGroupCreditsList(ctx context.Context, billingGroupId string) ([]CreditOut, error)
- func (h *BillingGroupHandler) BillingGroupDelete(ctx context.Context, billingGroupId string) error
- func (h *BillingGroupHandler) BillingGroupEventList(ctx context.Context, billingGroupId string) ([]EventOut, error)
- func (h *BillingGroupHandler) BillingGroupGet(ctx context.Context, billingGroupId string) (*BillingGroupGetOut, error)
- func (h *BillingGroupHandler) BillingGroupInvoiceLinesList(ctx context.Context, billingGroupId string, invoiceNumber string) ([]LineOut, error)
- func (h *BillingGroupHandler) BillingGroupInvoiceList(ctx context.Context, billingGroupId string) ([]InvoiceOut, error)
- func (h *BillingGroupHandler) BillingGroupList(ctx context.Context) ([]BillingGroupOut, error)
- func (h *BillingGroupHandler) BillingGroupProjectAssign(ctx context.Context, billingGroupId string, project string) error
- func (h *BillingGroupHandler) BillingGroupProjectList(ctx context.Context, billingGroupId string) ([]ProjectOut, error)
- func (h *BillingGroupHandler) BillingGroupProjectsAssign(ctx context.Context, billingGroupId string, in *BillingGroupProjectsAssignIn) error
- func (h *BillingGroupHandler) BillingGroupUpdate(ctx context.Context, billingGroupId string, in *BillingGroupUpdateIn) (*BillingGroupUpdateOut, error)
- type BillingGroupOut
- type BillingGroupProjectsAssignIn
- type BillingGroupStateType
- type BillingGroupUpdateIn
- type BillingGroupUpdateOut
- type CardInfoOut
- type CreditOut
- type CreditType
- type CurrencyType
- type EventOut
- type Handler
- type InvoiceOut
- type InvoiceStateType
- type LineOut
- type LineType
- type PaymentMethodType
- type ProjectOut
- type ServiceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BillingCurrencyTypeChoices ¶
func BillingCurrencyTypeChoices() []string
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
func LineTypeChoices ¶ added in v0.3.0
func LineTypeChoices() []string
func PaymentMethodTypeChoices ¶ added in v0.3.0
func PaymentMethodTypeChoices() []string
func ServiceTypeChoices ¶ added in v0.3.0
func ServiceTypeChoices() []string
Types ¶
type BillingCurrencyType ¶
type BillingCurrencyType string
const ( BillingCurrencyTypeAud BillingCurrencyType = "AUD" BillingCurrencyTypeCad BillingCurrencyType = "CAD" BillingCurrencyTypeChf BillingCurrencyType = "CHF" BillingCurrencyTypeDkk BillingCurrencyType = "DKK" BillingCurrencyTypeEur BillingCurrencyType = "EUR" BillingCurrencyTypeGbp BillingCurrencyType = "GBP" BillingCurrencyTypeJpy BillingCurrencyType = "JPY" BillingCurrencyTypeNok BillingCurrencyType = "NOK" BillingCurrencyTypeNzd BillingCurrencyType = "NZD" BillingCurrencyTypeSek BillingCurrencyType = "SEK" BillingCurrencyTypeSgd BillingCurrencyType = "SGD" BillingCurrencyTypeUsd BillingCurrencyType = "USD" )
type BillingEmailIn ¶
type BillingEmailIn struct {
Email string `json:"email"` // User email address
}
type BillingEmailOut ¶
type BillingEmailOut struct {
Email string `json:"email"` // User email address
}
type BillingGroupCreateIn ¶
type BillingGroupCreateIn struct {
AccountId *string `json:"account_id,omitempty"` // Account ID
AddressLines *[]string `json:"address_lines,omitempty"` // Address lines
BillingAddressId *string `json:"billing_address_id,omitempty"` // Address ID
BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Billing currency
BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` // List of project billing email addresses
BillingExtraText *string `json:"billing_extra_text,omitempty"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number
BillingGroupName string `json:"billing_group_name"` // Billing group name
CardId *string `json:"card_id,omitempty"` // Credit card ID
City *string `json:"city,omitempty"` // Address city
Company *string `json:"company,omitempty"` // Name of a company
CopyFromBillingGroup *string `json:"copy_from_billing_group,omitempty"` // Billing group ID
CountryCode *string `json:"country_code,omitempty"` // Two letter country code for billing country
ShippingAddressId *string `json:"shipping_address_id,omitempty"` // Address ID
State *string `json:"state,omitempty"` // Address state
VatId *string `json:"vat_id,omitempty"` // EU VAT Identification Number
ZipCode *string `json:"zip_code,omitempty"` // Address zip code
}
BillingGroupCreateIn BillingGroupCreateRequestBody
type BillingGroupCreateOut ¶
type BillingGroupCreateOut struct {
AccountId string `json:"account_id"` // Account ID
AccountName string `json:"account_name"` // Account name
AddressLines []string `json:"address_lines"` // Address lines
BillingAddress *string `json:"billing_address,omitempty"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
BillingAddressId *string `json:"billing_address_id,omitempty"` // Address ID
BillingCurrency BillingCurrencyType `json:"billing_currency"` // Billing currency
BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses
BillingExtraText string `json:"billing_extra_text"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number
BillingGroupId string `json:"billing_group_id"` // Billing group ID
BillingGroupName string `json:"billing_group_name"` // Billing group name
BillingType string `json:"billing_type"` // Method of charging/invoicing this project
CardInfo CardInfoOut `json:"card_info"` // Credit card assigned to the project
City string `json:"city"` // Address city
Company string `json:"company"` // Name of a company
Country string `json:"country"` // Billing country
CountryCode string `json:"country_code"` // Two letter ISO country code
CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC
EstimatedBalanceLocal string `json:"estimated_balance_local"` // Estimated balance in billing currency, before tax
EstimatedBalanceUsd string `json:"estimated_balance_usd"` // Estimated balance in USD, before tax
PaymentMethod PaymentMethodType `json:"payment_method"` // Payment method
ShippingAddressId *string `json:"shipping_address_id,omitempty"` // Address ID
State string `json:"state"` // Address state
VatId string `json:"vat_id"` // EU VAT Identification Number
ZipCode string `json:"zip_code"` // Address zip code
}
BillingGroupCreateOut Billing group information
type BillingGroupCreditsClaimIn ¶
type BillingGroupCreditsClaimIn struct {
Code string `json:"code"` // Credit code
}
BillingGroupCreditsClaimIn BillingGroupCreditsClaimRequestBody
type BillingGroupCreditsClaimOut ¶
type BillingGroupCreditsClaimOut struct {
Code *string `json:"code,omitempty"` // Credit code
ExpireTime *time.Time `json:"expire_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC
RemainingValue *string `json:"remaining_value,omitempty"` // Remaining credit value
StartTime *time.Time `json:"start_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC
Type CreditType `json:"type,omitempty"` // Credit type
Value *string `json:"value,omitempty"` // Original credit value, or for expired credits, the consumed credit value
}
BillingGroupCreditsClaimOut Assigned credit
type BillingGroupGetOut ¶
type BillingGroupGetOut struct {
AccountId string `json:"account_id"` // Account ID
AccountName string `json:"account_name"` // Account name
AddressLines []string `json:"address_lines"` // Address lines
BillingAddress *string `json:"billing_address,omitempty"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
BillingAddressId *string `json:"billing_address_id,omitempty"` // Address ID
BillingCurrency BillingCurrencyType `json:"billing_currency"` // Billing currency
BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses
BillingExtraText string `json:"billing_extra_text"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number
BillingGroupId string `json:"billing_group_id"` // Billing group ID
BillingGroupName string `json:"billing_group_name"` // Billing group name
BillingType string `json:"billing_type"` // Method of charging/invoicing this project
CardInfo CardInfoOut `json:"card_info"` // Credit card assigned to the project
City string `json:"city"` // Address city
Company string `json:"company"` // Name of a company
Country string `json:"country"` // Billing country
CountryCode string `json:"country_code"` // Two letter ISO country code
CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC
EstimatedBalanceLocal string `json:"estimated_balance_local"` // Estimated balance in billing currency, before tax
EstimatedBalanceUsd string `json:"estimated_balance_usd"` // Estimated balance in USD, before tax
PaymentMethod PaymentMethodType `json:"payment_method"` // Payment method
ShippingAddressId *string `json:"shipping_address_id,omitempty"` // Address ID
State string `json:"state"` // Address state
VatId string `json:"vat_id"` // EU VAT Identification Number
ZipCode string `json:"zip_code"` // Address zip code
}
BillingGroupGetOut Billing group information
type BillingGroupHandler ¶
type BillingGroupHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(doer doer) BillingGroupHandler
func (*BillingGroupHandler) BillingGroupCreate ¶
func (h *BillingGroupHandler) BillingGroupCreate(ctx context.Context, in *BillingGroupCreateIn) (*BillingGroupCreateOut, error)
func (*BillingGroupHandler) BillingGroupCreditsClaim ¶
func (h *BillingGroupHandler) BillingGroupCreditsClaim(ctx context.Context, billingGroupId string, in *BillingGroupCreditsClaimIn) (*BillingGroupCreditsClaimOut, error)
func (*BillingGroupHandler) BillingGroupCreditsList ¶
func (*BillingGroupHandler) BillingGroupDelete ¶
func (h *BillingGroupHandler) BillingGroupDelete(ctx context.Context, billingGroupId string) error
func (*BillingGroupHandler) BillingGroupEventList ¶
func (*BillingGroupHandler) BillingGroupGet ¶
func (h *BillingGroupHandler) BillingGroupGet(ctx context.Context, billingGroupId string) (*BillingGroupGetOut, error)
func (*BillingGroupHandler) BillingGroupInvoiceLinesList ¶
func (*BillingGroupHandler) BillingGroupInvoiceList ¶
func (h *BillingGroupHandler) BillingGroupInvoiceList(ctx context.Context, billingGroupId string) ([]InvoiceOut, error)
func (*BillingGroupHandler) BillingGroupList ¶
func (h *BillingGroupHandler) BillingGroupList(ctx context.Context) ([]BillingGroupOut, error)
func (*BillingGroupHandler) BillingGroupProjectAssign ¶
func (*BillingGroupHandler) BillingGroupProjectList ¶
func (h *BillingGroupHandler) BillingGroupProjectList(ctx context.Context, billingGroupId string) ([]ProjectOut, error)
func (*BillingGroupHandler) BillingGroupProjectsAssign ¶
func (h *BillingGroupHandler) BillingGroupProjectsAssign(ctx context.Context, billingGroupId string, in *BillingGroupProjectsAssignIn) error
func (*BillingGroupHandler) BillingGroupUpdate ¶
func (h *BillingGroupHandler) BillingGroupUpdate(ctx context.Context, billingGroupId string, in *BillingGroupUpdateIn) (*BillingGroupUpdateOut, error)
type BillingGroupOut ¶
type BillingGroupOut struct {
AccountId string `json:"account_id"` // Account ID
AccountName string `json:"account_name"` // Account name
AddressLines []string `json:"address_lines"` // Address lines
BillingAddress *string `json:"billing_address,omitempty"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
BillingAddressId *string `json:"billing_address_id,omitempty"` // Address ID
BillingCurrency BillingCurrencyType `json:"billing_currency"` // Billing currency
BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses
BillingExtraText string `json:"billing_extra_text"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number
BillingGroupId string `json:"billing_group_id"` // Billing group ID
BillingGroupName string `json:"billing_group_name"` // Billing group name
BillingType string `json:"billing_type"` // Method of charging/invoicing this project
CardInfo CardInfoOut `json:"card_info"` // Credit card assigned to the project
City string `json:"city"` // Address city
Company string `json:"company"` // Name of a company
Country string `json:"country"` // Billing country
CountryCode string `json:"country_code"` // Two letter ISO country code
CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC
EstimatedBalanceLocal string `json:"estimated_balance_local"` // Estimated balance in billing currency, before tax
EstimatedBalanceUsd string `json:"estimated_balance_usd"` // Estimated balance in USD, before tax
PaymentMethod PaymentMethodType `json:"payment_method"` // Payment method
ShippingAddressId *string `json:"shipping_address_id,omitempty"` // Address ID
State string `json:"state"` // Address state
VatId string `json:"vat_id"` // EU VAT Identification Number
ZipCode string `json:"zip_code"` // Address zip code
}
type BillingGroupProjectsAssignIn ¶
type BillingGroupProjectsAssignIn struct {
ProjectsNames []string `json:"projects_names"` // Projects names
}
BillingGroupProjectsAssignIn BillingGroupProjectsAssignRequestBody
type BillingGroupStateType ¶ added in v0.3.0
type BillingGroupStateType string
const ( BillingGroupStateTypeActive BillingGroupStateType = "active" BillingGroupStateTypeDeleted BillingGroupStateType = "deleted" )
type BillingGroupUpdateIn ¶
type BillingGroupUpdateIn struct {
AccountId *string `json:"account_id,omitempty"` // Account ID
AddressLines *[]string `json:"address_lines,omitempty"` // Address lines
BillingAddressId *string `json:"billing_address_id,omitempty"` // Address ID
BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Billing currency
BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` // List of project billing email addresses
BillingExtraText *string `json:"billing_extra_text,omitempty"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number
BillingGroupName *string `json:"billing_group_name,omitempty"` // Billing group name
CardId *string `json:"card_id,omitempty"` // Credit card ID
City *string `json:"city,omitempty"` // Address city
Company *string `json:"company,omitempty"` // Name of a company
CountryCode *string `json:"country_code,omitempty"` // Two letter country code for billing country
ShippingAddressId *string `json:"shipping_address_id,omitempty"` // Address ID
State *string `json:"state,omitempty"` // Address state
VatId *string `json:"vat_id,omitempty"` // EU VAT Identification Number
ZipCode *string `json:"zip_code,omitempty"` // Address zip code
}
BillingGroupUpdateIn BillingGroupUpdateRequestBody
type BillingGroupUpdateOut ¶
type BillingGroupUpdateOut struct {
AccountId string `json:"account_id"` // Account ID
AccountName string `json:"account_name"` // Account name
AddressLines []string `json:"address_lines"` // Address lines
BillingAddress *string `json:"billing_address,omitempty"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead
BillingAddressId *string `json:"billing_address_id,omitempty"` // Address ID
BillingCurrency BillingCurrencyType `json:"billing_currency"` // Billing currency
BillingEmails []BillingEmailOut `json:"billing_emails"` // List of project billing email addresses
BillingExtraText string `json:"billing_extra_text"` // Extra text to be included in all project invoices, e.g. purchase order or cost center number
BillingGroupId string `json:"billing_group_id"` // Billing group ID
BillingGroupName string `json:"billing_group_name"` // Billing group name
BillingType string `json:"billing_type"` // Method of charging/invoicing this project
CardInfo CardInfoOut `json:"card_info"` // Credit card assigned to the project
City string `json:"city"` // Address city
Company string `json:"company"` // Name of a company
Country string `json:"country"` // Billing country
CountryCode string `json:"country_code"` // Two letter ISO country code
CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC
EstimatedBalanceLocal string `json:"estimated_balance_local"` // Estimated balance in billing currency, before tax
EstimatedBalanceUsd string `json:"estimated_balance_usd"` // Estimated balance in USD, before tax
PaymentMethod PaymentMethodType `json:"payment_method"` // Payment method
ShippingAddressId *string `json:"shipping_address_id,omitempty"` // Address ID
State string `json:"state"` // Address state
VatId string `json:"vat_id"` // EU VAT Identification Number
ZipCode string `json:"zip_code"` // Address zip code
}
BillingGroupUpdateOut Billing group information
type CardInfoOut ¶
type CardInfoOut struct {
Brand string `json:"brand"`
CardId string `json:"card_id"` // Credit card ID
Country string `json:"country"`
CountryCode string `json:"country_code"` // Two letter ISO country code
ExpMonth int `json:"exp_month"` // Expiration month
ExpYear int `json:"exp_year"` // Expiration year
Last4 string `json:"last4"` // Credit card last four digits
Name string `json:"name"` // Name on the credit card
UserEmail string `json:"user_email"` // User email address
}
CardInfoOut Credit card assigned to the project
type CreditOut ¶
type CreditOut struct {
Code *string `json:"code,omitempty"` // Credit code
ExpireTime *time.Time `json:"expire_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC
RemainingValue *string `json:"remaining_value,omitempty"` // Remaining credit value
StartTime *time.Time `json:"start_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC
Type CreditType `json:"type,omitempty"` // Credit type
Value *string `json:"value,omitempty"` // Original credit value, or for expired credits, the consumed credit value
}
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 EventOut ¶
type EventOut struct {
Actor *string `json:"actor,omitempty"` // Initiator of the event
BillingGroupId *string `json:"billing_group_id,omitempty"` // Billing group ID
CreateTime *time.Time `json:"create_time,omitempty"` // Timestamp in ISO 8601 format, always in UTC
EventDesc *string `json:"event_desc,omitempty"` // Event description
EventType *string `json:"event_type,omitempty"` // Event type identifier
LogEntryId *int `json:"log_entry_id,omitempty"` // Entry ID
ProjectId *string `json:"project_id,omitempty"` // Identifier of a project
ProjectName *string `json:"project_name,omitempty"` // Project name
}
type Handler ¶
type Handler interface {
// BillingGroupCreate create a billing group
// POST /v1/billing-group
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupCreate
BillingGroupCreate(ctx context.Context, in *BillingGroupCreateIn) (*BillingGroupCreateOut, error)
// BillingGroupCreditsClaim claim a credit code
// POST /v1/billing-group/{billing_group_id}/credits
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupCreditsClaim
BillingGroupCreditsClaim(ctx context.Context, billingGroupId string, in *BillingGroupCreditsClaimIn) (*BillingGroupCreditsClaimOut, error)
// BillingGroupCreditsList list billing group credits
// GET /v1/billing-group/{billing_group_id}/credits
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupCreditsList
BillingGroupCreditsList(ctx context.Context, billingGroupId string) ([]CreditOut, error)
// BillingGroupDelete delete billing group
// DELETE /v1/billing-group/{billing_group_id}
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupDelete
BillingGroupDelete(ctx context.Context, billingGroupId string) error
// BillingGroupEventList list billing group events
// GET /v1/billing-group/{billing_group_id}/events
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupEventList
BillingGroupEventList(ctx context.Context, billingGroupId string) ([]EventOut, error)
// BillingGroupGet get billing group details
// GET /v1/billing-group/{billing_group_id}
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupGet
BillingGroupGet(ctx context.Context, billingGroupId string) (*BillingGroupGetOut, error)
// BillingGroupInvoiceLinesList get invoice lines for a single invoice
// GET /v1/billing-group/{billing_group_id}/invoice/{invoice_number}/lines
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupInvoiceLinesList
BillingGroupInvoiceLinesList(ctx context.Context, billingGroupId string, invoiceNumber string) ([]LineOut, error)
// BillingGroupInvoiceList get invoices generated for billing group
// GET /v1/billing-group/{billing_group_id}/invoice
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupInvoiceList
BillingGroupInvoiceList(ctx context.Context, billingGroupId string) ([]InvoiceOut, error)
// BillingGroupList list billing groups
// GET /v1/billing-group
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupList
BillingGroupList(ctx context.Context) ([]BillingGroupOut, error)
// BillingGroupProjectAssign assign project to billing group
// POST /v1/billing-group/{billing_group_id}/project-assign/{project}
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupProjectAssign
BillingGroupProjectAssign(ctx context.Context, billingGroupId string, project string) error
// BillingGroupProjectList get projects assigned to billing group
// GET /v1/billing-group/{billing_group_id}/projects
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupProjectList
BillingGroupProjectList(ctx context.Context, billingGroupId string) ([]ProjectOut, error)
// BillingGroupProjectsAssign assign projects to billing group
// POST /v1/billing-group/{billing_group_id}/projects-assign
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupProjectsAssign
BillingGroupProjectsAssign(ctx context.Context, billingGroupId string, in *BillingGroupProjectsAssignIn) error
// BillingGroupUpdate update billing group
// PUT /v1/billing-group/{billing_group_id}
// https://api.aiven.io/doc/#tag/BillingGroup/operation/BillingGroupUpdate
BillingGroupUpdate(ctx context.Context, billingGroupId string, in *BillingGroupUpdateIn) (*BillingGroupUpdateOut, error)
}
type InvoiceOut ¶
type InvoiceOut struct {
BillingGroupId string `json:"billing_group_id"` // Billing group ID
BillingGroupName string `json:"billing_group_name"` // Billing group name
BillingGroupState BillingGroupStateType `json:"billing_group_state"` // Billing group state
Currency CurrencyType `json:"currency"` // Billing currency
DownloadCookie string `json:"download_cookie"` // Authentication cookie for downloads
GeneratedAt *time.Time `json:"generated_at,omitempty"` // The time when the invoice was generated
InvoiceNumber string `json:"invoice_number"` // Unique invoice reference code
PeriodBegin string `json:"period_begin"` // Period begin
PeriodEnd string `json:"period_end"` // Period end
State InvoiceStateType `json:"state"` // State of this invoice
TotalIncVat string `json:"total_inc_vat"` // Total including taxes
TotalVatZero string `json:"total_vat_zero"` // Total excluding taxes
}
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 LineOut ¶
type LineOut struct {
CloudName *string `json:"cloud_name,omitempty"` // Name of the cloud, if billed resource is associated with a cloud resource
CommitmentName *string `json:"commitment_name,omitempty"` // Name of the commitment which is referred to this invoice line
Description string `json:"description"` // Human-readable short description of the invoice line
LinePreDiscountLocal *string `json:"line_pre_discount_local,omitempty"` // Pre-tax sum of invoice line, in local currency, before any discounts
LineTotalLocal *string `json:"line_total_local,omitempty"` // Pre-tax sum of invoice line, in the local currency configured for the invoice
LineTotalUsd string `json:"line_total_usd"` // Pre-tax sum of invoice line, in USD
LineType LineType `json:"line_type"` // Type of the invoice line
LocalCurrency *string `json:"local_currency,omitempty"` // Currency used for line_local_total
ProjectName *string `json:"project_name,omitempty"` // Name of the project this line is associated with, if any
ServiceName *string `json:"service_name,omitempty"` // Name of the service, if invoice line is for service use
ServicePlan *string `json:"service_plan,omitempty"` // Service plan name, if invoice line is for service use
ServiceType ServiceType `json:"service_type,omitempty"` // Service type, if invoice line is for service use
Tags map[string]string `json:"tags,omitempty"` // Billing tags
TimestampBegin *string `json:"timestamp_begin,omitempty"` // Begin timestamp of the billed time period, for resources billed by time
TimestampEnd *string `json:"timestamp_end,omitempty"` // End timestamp of the billed time period, for resources billed by time
}
type LineType ¶ added in v0.3.0
type LineType string
const ( LineTypeCommitmentFee LineType = "commitment_fee" LineTypeCreditConsumption LineType = "credit_consumption" LineTypeExtraCharge LineType = "extra_charge" LineTypeMultiplier LineType = "multiplier" LineTypeOtherEvent LineType = "other_event" LineTypeProPlatformCharge LineType = "pro_platform_charge" LineTypeRounding LineType = "rounding" LineTypeServiceCharge LineType = "service_charge" LineTypeSupportCharge LineType = "support_charge" )
type PaymentMethodType ¶ added in v0.3.0
type PaymentMethodType string
const ( PaymentMethodTypeAccrual PaymentMethodType = "accrual" PaymentMethodTypeCard PaymentMethodType = "card" PaymentMethodTypeDisabled PaymentMethodType = "disabled" PaymentMethodTypeEmail PaymentMethodType = "email" PaymentMethodTypeNoPaymentExpected PaymentMethodType = "no_payment_expected" PaymentMethodTypePartner PaymentMethodType = "partner" )
type ProjectOut ¶
type ServiceType ¶ added in v0.3.0
type ServiceType string
const ( ServiceTypeAlertmanager ServiceType = "alertmanager" ServiceTypeAlloydbomni ServiceType = "alloydbomni" ServiceTypeCassandra ServiceType = "cassandra" ServiceTypeClickhouse ServiceType = "clickhouse" ServiceTypeDragonfly ServiceType = "dragonfly" ServiceTypeElasticsearch ServiceType = "elasticsearch" ServiceTypeFlink ServiceType = "flink" ServiceTypeGrafana ServiceType = "grafana" ServiceTypeInfluxdb ServiceType = "influxdb" ServiceTypeKafka ServiceType = "kafka" ServiceTypeKafkaConnect ServiceType = "kafka_connect" ServiceTypeKafkaMirrormaker ServiceType = "kafka_mirrormaker" ServiceTypeM3Aggregator ServiceType = "m3aggregator" ServiceTypeM3Db ServiceType = "m3db" ServiceTypeMysql ServiceType = "mysql" ServiceTypeOpensearch ServiceType = "opensearch" ServiceTypeParca ServiceType = "parca" ServiceTypePg ServiceType = "pg" ServiceTypeRedis ServiceType = "redis" ServiceTypeStresstester ServiceType = "stresstester" ServiceTypeSw ServiceType = "sw" ServiceTypeThanos ServiceType = "thanos" ServiceTypeThanoscompactor ServiceType = "thanoscompactor" ServiceTypeThanosquery ServiceType = "thanosquery" ServiceTypeThanosreceiver ServiceType = "thanosreceiver" ServiceTypeThanosruler ServiceType = "thanosruler" ServiceTypeThanosstore ServiceType = "thanosstore" ServiceTypeValkey ServiceType = "valkey" ServiceTypeVector ServiceType = "vector" ServiceTypeVmalert ServiceType = "vmalert" ServiceTypeWarpstream ServiceType = "warpstream" )
Click to show internal directories.
Click to hide internal directories.