Documentation
¶
Overview ¶
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT.
Index ¶
- Constants
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- type Attention
- type AttentionAction
- type AttentionActionItem
- type AttentionReason
- type AttentionSeverity
- type ChiServerOptions
- type CreditBalance
- type Customer
- type CustomerStatus
- type Error
- type ErrorErrorType
- type GetV1CreditsGrantsCustomerIdParams
- type GetV1CustomersIdMarginParams
- type GetV1CustomersParams
- type GetV1CustomersParamsDir
- type GetV1InvoicesParams
- type GetV1InvoicesParamsDir
- type GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource
- type GetV1SubscriptionsParams
- type GetV1SubscriptionsParamsDir
- type GetV1UsageEventsParams
- type GetV1Whoami200JSONResponseBodyKeyType
- type InstantiateRecipeJSONBody
- type InstantiateRecipeJSONRequestBody
- type InvalidParamFormatError
- type Invoice
- type InvoiceBillingReason
- type InvoiceLineItem
- type InvoiceLineType
- type InvoicePaymentStatus
- type InvoiceStatus
- type InvoiceTaxStatus
- type InvoiceWithLineItems
- type ItemChangeType
- type MarginReport
- type MemberInvitation
- type MemberInvitationStatus
- type Meter
- type MeterAggregation
- type MiddlewareFunc
- type PatchV1MetersIdJSONBody
- type PatchV1MetersIdJSONBodyAggregation
- type PatchV1MetersIdJSONRequestBody
- type PatchV1WebhookEndpointsEndpointsIdJSONBody
- type PatchV1WebhookEndpointsEndpointsIdJSONRequestBody
- type Plan
- type PlanBaseBillTiming
- type PlanBillingInterval
- type PlanStatus
- type PostV1AuthAcceptInviteJSONBody
- type PostV1AuthAcceptInviteJSONRequestBody
- type PostV1AuthLoginJSONBody
- type PostV1AuthLoginJSONRequestBody
- type PostV1AuthModeJSONBody
- type PostV1AuthModeJSONRequestBody
- type PostV1AuthPasswordResetConfirmJSONBody
- type PostV1AuthPasswordResetConfirmJSONRequestBody
- type PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery
- type PostV1AuthPasswordResetRequestJSONBody
- type PostV1AuthPasswordResetRequestJSONRequestBody
- type PostV1CreditNotesIdSendJSONBody
- type PostV1CreditNotesIdSendJSONRequestBody
- type PostV1CreditNotesJSONBody
- type PostV1CreditNotesJSONRequestBody
- type PostV1CreditsGrantJSONBody
- type PostV1CreditsGrantJSONBodyGrantKind
- type PostV1CreditsGrantJSONRequestBody
- type PostV1CustomersJSONBody
- type PostV1CustomersJSONRequestBody
- type PostV1InvoicesCreatePreviewJSONBody
- type PostV1InvoicesCreatePreviewJSONRequestBody
- type PostV1InvoicesIdSendJSONBody
- type PostV1InvoicesIdSendJSONRequestBody
- type PostV1MembersInviteJSONBody
- type PostV1MembersInviteJSONRequestBody
- type PostV1MetersJSONBody
- type PostV1MetersJSONBodyAggregation
- type PostV1MetersJSONRequestBody
- type PostV1PlansJSONBody
- type PostV1PlansJSONBodyBaseBillTiming
- type PostV1PlansJSONBodyBillingInterval
- type PostV1PlansJSONRequestBody
- type PostV1RatingRulesJSONBody
- type PostV1RatingRulesJSONBodyMode
- type PostV1RatingRulesJSONRequestBody
- type PostV1SubscriptionsJSONBody
- type PostV1SubscriptionsJSONBodyBillingTime
- type PostV1SubscriptionsJSONRequestBody
- type PostV1TestClocksIdAdvanceJSONBody
- type PostV1TestClocksIdAdvanceJSONRequestBody
- type PostV1TestClocksJSONBody
- type PostV1TestClocksJSONRequestBody
- type PostV1UsageEventsBatchJSONBody
- type PostV1UsageEventsBatchJSONBodyQuantity0
- type PostV1UsageEventsBatchJSONBodyQuantity1
- type PostV1UsageEventsBatchJSONBody_Quantity
- func (t PostV1UsageEventsBatchJSONBody_Quantity) AsPostV1UsageEventsBatchJSONBodyQuantity0() (PostV1UsageEventsBatchJSONBodyQuantity0, error)
- func (t PostV1UsageEventsBatchJSONBody_Quantity) AsPostV1UsageEventsBatchJSONBodyQuantity1() (PostV1UsageEventsBatchJSONBodyQuantity1, error)
- func (t *PostV1UsageEventsBatchJSONBody_Quantity) FromPostV1UsageEventsBatchJSONBodyQuantity0(v PostV1UsageEventsBatchJSONBodyQuantity0) error
- func (t *PostV1UsageEventsBatchJSONBody_Quantity) FromPostV1UsageEventsBatchJSONBodyQuantity1(v PostV1UsageEventsBatchJSONBodyQuantity1) error
- func (t PostV1UsageEventsBatchJSONBody_Quantity) MarshalJSON() ([]byte, error)
- func (t *PostV1UsageEventsBatchJSONBody_Quantity) MergePostV1UsageEventsBatchJSONBodyQuantity0(v PostV1UsageEventsBatchJSONBodyQuantity0) error
- func (t *PostV1UsageEventsBatchJSONBody_Quantity) MergePostV1UsageEventsBatchJSONBodyQuantity1(v PostV1UsageEventsBatchJSONBodyQuantity1) error
- func (t *PostV1UsageEventsBatchJSONBody_Quantity) UnmarshalJSON(b []byte) error
- type PostV1UsageEventsBatchJSONRequestBody
- type PostV1UsageEventsJSONBody
- type PostV1UsageEventsJSONBodyQuantity0
- type PostV1UsageEventsJSONBodyQuantity1
- type PostV1UsageEventsJSONBody_Quantity
- func (t PostV1UsageEventsJSONBody_Quantity) AsPostV1UsageEventsJSONBodyQuantity0() (PostV1UsageEventsJSONBodyQuantity0, error)
- func (t PostV1UsageEventsJSONBody_Quantity) AsPostV1UsageEventsJSONBodyQuantity1() (PostV1UsageEventsJSONBodyQuantity1, error)
- func (t *PostV1UsageEventsJSONBody_Quantity) FromPostV1UsageEventsJSONBodyQuantity0(v PostV1UsageEventsJSONBodyQuantity0) error
- func (t *PostV1UsageEventsJSONBody_Quantity) FromPostV1UsageEventsJSONBodyQuantity1(v PostV1UsageEventsJSONBodyQuantity1) error
- func (t PostV1UsageEventsJSONBody_Quantity) MarshalJSON() ([]byte, error)
- func (t *PostV1UsageEventsJSONBody_Quantity) MergePostV1UsageEventsJSONBodyQuantity0(v PostV1UsageEventsJSONBodyQuantity0) error
- func (t *PostV1UsageEventsJSONBody_Quantity) MergePostV1UsageEventsJSONBodyQuantity1(v PostV1UsageEventsJSONBodyQuantity1) error
- func (t *PostV1UsageEventsJSONBody_Quantity) UnmarshalJSON(b []byte) error
- type PostV1UsageEventsJSONRequestBody
- type PostV1WebhookEndpointsEndpointsJSONBody
- type PostV1WebhookEndpointsEndpointsJSONRequestBody
- type PreviewRecipeJSONBody
- type PreviewRecipeJSONRequestBody
- type ProviderCostRate
- type PutV1ProviderCostsJSONBody
- type PutV1ProviderCostsJSONRequestBody
- type RatingRule
- type RatingRuleMode
- type Recipe
- type RecipeCreatedObjects
- type RecipeCreates
- type RecipeDetail
- type RecipeDunningPolicy
- type RecipeDunningPolicyFinalInvoiceAction
- type RecipeDunningPolicyFinalSubscriptionAction
- type RecipeInstance
- type RecipeListItem
- type RecipeMeter
- type RecipeOverride
- type RecipeOverrideType
- type RecipePlan
- type RecipePlanBaseBillTiming
- type RecipePlanBillingInterval
- type RecipePreviewObjects
- type RecipePreviewResult
- type RecipePricingRule
- type RecipePricingRuleAggregationMode
- type RecipeRatingRule
- type RecipeRatingRuleMode
- type RecipeWebhook
- type RecoveryWarning
- type RecoveryWarningCode
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) DeleteV1MembersInvitationsId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteV1MembersUserId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteV1ProviderCostsId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteV1TestClocksId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetInvoice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetRecipe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1AuthInviteToken(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1BillingPreviewSubscriptionId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1CreditsGrantsCustomerId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1Customers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1CustomersIdMargin(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1Invoices(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1InvoicesIdPdf(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1Members(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1Meters(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1Plans(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1ProviderCosts(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1PublicCostDashboardToken(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1RatingRules(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1Subscriptions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1TestClocks(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1TestClocksId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1TestClocksIdSubscriptions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1UsageEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1WebhookEndpointsEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1Whoami(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) InstantiateRecipe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListRecipeInstances(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListRecipes(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PatchV1MetersId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PatchV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1AuthAcceptInvite(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1AuthLogin(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1AuthLogout(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1AuthMode(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1AuthPasswordResetConfirm(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1AuthPasswordResetRequest(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1BillingRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1CreditNotes(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1CreditNotesIdSend(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1CreditsGrant(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1Customers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1CustomersIdRotateCostDashboardToken(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1InvoicesCreatePreview(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1InvoicesIdFinalize(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1InvoicesIdRetryTax(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1InvoicesIdSend(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1MembersInvite(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1Meters(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1Plans(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1RatingRules(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1Subscriptions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1SubscriptionsIdActivate(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1TestClocks(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1TestClocksIdAdvance(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1TestClocksIdRetryAdvance(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1UsageEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1UsageEventsBatch(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1WebhookEndpointsEndpointsIdRotateSecret(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PreviewRecipe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutV1ProviderCosts(w http.ResponseWriter, r *http.Request)
- type Subscription
- type SubscriptionBillingTime
- type SubscriptionStatus
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) DeleteV1MembersInvitationsId(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) DeleteV1MembersUserId(w http.ResponseWriter, r *http.Request, userId string)
- func (_ Unimplemented) DeleteV1ProviderCostsId(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) DeleteV1TestClocksId(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) DeleteV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetInvoice(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetRecipe(w http.ResponseWriter, r *http.Request, key string)
- func (_ Unimplemented) GetV1AuthInviteToken(w http.ResponseWriter, r *http.Request, token string)
- func (_ Unimplemented) GetV1BillingPreviewSubscriptionId(w http.ResponseWriter, r *http.Request, subscriptionId string)
- func (_ Unimplemented) GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request, customerId string)
- func (_ Unimplemented) GetV1CreditsGrantsCustomerId(w http.ResponseWriter, r *http.Request, customerId string, ...)
- func (_ Unimplemented) GetV1Customers(w http.ResponseWriter, r *http.Request, params GetV1CustomersParams)
- func (_ Unimplemented) GetV1CustomersIdMargin(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) GetV1Invoices(w http.ResponseWriter, r *http.Request, params GetV1InvoicesParams)
- func (_ Unimplemented) GetV1InvoicesIdPdf(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetV1Members(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetV1Meters(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetV1Plans(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetV1ProviderCosts(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetV1PublicCostDashboardToken(w http.ResponseWriter, r *http.Request, token string)
- func (_ Unimplemented) GetV1RatingRules(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetV1Subscriptions(w http.ResponseWriter, r *http.Request, params GetV1SubscriptionsParams)
- func (_ Unimplemented) GetV1TestClocks(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetV1TestClocksId(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetV1TestClocksIdSubscriptions(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetV1UsageEvents(w http.ResponseWriter, r *http.Request, params GetV1UsageEventsParams)
- func (_ Unimplemented) GetV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetV1WebhookEndpointsEvents(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetV1Whoami(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) InstantiateRecipe(w http.ResponseWriter, r *http.Request, key string)
- func (_ Unimplemented) ListRecipeInstances(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListRecipes(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PatchV1MetersId(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PatchV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PostV1AuthAcceptInvite(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1AuthLogin(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1AuthLogout(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1AuthMode(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1AuthPasswordResetConfirm(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1AuthPasswordResetRequest(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1BillingRun(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1CreditNotes(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1CreditNotesIdSend(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PostV1CreditsGrant(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1Customers(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1CustomersIdRotateCostDashboardToken(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PostV1InvoicesCreatePreview(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1InvoicesIdFinalize(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PostV1InvoicesIdRetryTax(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PostV1InvoicesIdSend(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PostV1MembersInvite(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1Meters(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1Plans(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1RatingRules(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1Subscriptions(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1SubscriptionsIdActivate(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PostV1TestClocks(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1TestClocksIdAdvance(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PostV1TestClocksIdRetryAdvance(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PostV1UsageEvents(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1UsageEventsBatch(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PostV1WebhookEndpointsEndpointsIdRotateSecret(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) PreviewRecipe(w http.ResponseWriter, r *http.Request, key string)
- func (_ Unimplemented) PutV1ProviderCosts(w http.ResponseWriter, r *http.Request)
- type UnmarshalingParamError
- type UsageEvent
Constants ¶
const (
BearerAuthScopes bearerAuthContextKey = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type Attention ¶
type Attention struct {
// Actions Prescribed next steps. First item is the primary CTA; the
// rest are secondary.
Actions []AttentionActionItem `json:"actions,omitempty"`
// Code Open, dotted, provider-specific code (e.g.
// `tax.customer_data_invalid`, `payment.declined`).
// New codes ship without a contract
// bump. Stripe parity.
Code string `json:"code,omitempty"`
// Detail Raw provider payload (Stripe Tax JSON envelope, last
// payment error message). Disclosed in a collapsible
// section for diagnostic depth.
Detail string `json:"detail,omitempty"`
// DocUrl Deep link to operator-facing documentation for this
// reason. Stripe parity.
DocUrl string `json:"doc_url,omitempty"`
// Message Human-readable headline copy, safe to render verbatim.
Message string `json:"message"`
// Param Dotted-path pointer at the entity field the operator must
// edit to resolve the issue (e.g.
// `customer.address.postal_code`). Stripe parity. Empty
// when the resolution isn't field-scoped.
Param string `json:"param,omitempty"`
// Reason Closed, typed code naming why an invoice needs operator
// attention. Stable public-API contract — codes are never
// repurposed; deprecations keep the code reserved and add a
// successor. See `Attention.code` for the open, provider-specific
// sub-code. `payment_anomaly` (ADR-068) reports money that does
// not reconcile — double charge, captured-vs-booked amount
// mismatch, or a payment on a voided invoice — and is surfaced
// even on paid/voided invoices. `dunning_exhausted` reports a
// no-payment-method invoice whose automatic recovery has ended
// without collecting (2026-07-22). `collection_paused` reports an
// invoice that is queued for auto-charge but whose subscription
// has `pause_collection` set, so the charge sweeps deliberately
// skip it — it will not be charged automatically until
// collection resumes (2026-07-28). `commit_exposure` reports an
// unpaid invoice that funded a prepaid commit whose credit is
// already spendable (ADR-078 funds commits at issue, not at
// payment) — note this reason is only returned when no other
// reason applies; when one does, the exposure is folded into that
// reason's `message` and its `actions` instead, so clients must
// not treat the reason code as the presence test for exposure
// (2026-08-04).
Reason AttentionReason `json:"reason"`
// Severity Urgency of an Attention surface. Operators sort/filter on this
// and the dashboard renders one colour per level. Priority
// descending: Critical > Warning > Info.
Severity AttentionSeverity `json:"severity"`
// Since When the attention condition started — operators triage
// by age. tax_deferred_at for tax reasons; due_at for
// overdue; updated_at as a proxy for payment failures.
Since time.Time `json:"since,omitempty"`
}
Attention Unified "this invoice needs operator attention" surface. Computed server-side from durable invoice fields (`tax_status`, `tax_error_code`, `payment_status`, `last_payment_error`). Never persisted — always derived. Omitted entirely when the invoice is healthy (matches Stripe's `last_finalization_error: null` ergonomic). See ADR-009.
type AttentionAction ¶
type AttentionAction string
AttentionAction Operator's recommended next step. Closed enum because every code maps to a concrete server endpoint or frontend route, and audit logs key off the code. `void_invoice` is offered only on prepaid-commit exposure, and only while some of the granted credit is still unspent: voiding retires the unspent balance (ADR-078) and is the sole recovery for an unpaid invoice whose credit is already live. Credit the customer has already spent is never clawed back (2026-08-04).
const ( AddPaymentMethod AttentionAction = "add_payment_method" ChargeNow AttentionAction = "charge_now" ConnectTaxProvider AttentionAction = "connect_tax_provider" EditBillingProfile AttentionAction = "edit_billing_profile" ReconcilePayment AttentionAction = "reconcile_payment" RetryPayment AttentionAction = "retry_payment" RetryTax AttentionAction = "retry_tax" ReviewRegistration AttentionAction = "review_registration" RotateApiKey AttentionAction = "rotate_api_key" SendReminder AttentionAction = "send_reminder" UpdatePaymentMethod AttentionAction = "update_payment_method" VoidInvoice AttentionAction = "void_invoice" WaitProvider AttentionAction = "wait_provider" )
Defines values for AttentionAction.
func (AttentionAction) Valid ¶
func (e AttentionAction) Valid() bool
Valid indicates whether the value is a known member of the AttentionAction enum.
type AttentionActionItem ¶
type AttentionActionItem struct {
// Code Operator's recommended next step. Closed enum because every
// code maps to a concrete server endpoint or frontend route,
// and audit logs key off the code. `void_invoice` is offered only
// on prepaid-commit exposure, and only while some of the granted
// credit is still unspent: voiding retires the unspent balance
// (ADR-078) and is the sole recovery for an unpaid invoice whose
// credit is already live. Credit the customer has already spent
// is never clawed back (2026-08-04).
Code AttentionAction `json:"code"`
// Label Default rendering label. UIs are free to substitute
// localized copy.
Label string `json:"label,omitempty"`
}
AttentionActionItem defines model for AttentionActionItem.
type AttentionReason ¶
type AttentionReason string
AttentionReason Closed, typed code naming why an invoice needs operator attention. Stable public-API contract — codes are never repurposed; deprecations keep the code reserved and add a successor. See `Attention.code` for the open, provider-specific sub-code. `payment_anomaly` (ADR-068) reports money that does not reconcile — double charge, captured-vs-booked amount mismatch, or a payment on a voided invoice — and is surfaced even on paid/voided invoices. `dunning_exhausted` reports a no-payment-method invoice whose automatic recovery has ended without collecting (2026-07-22). `collection_paused` reports an invoice that is queued for auto-charge but whose subscription has `pause_collection` set, so the charge sweeps deliberately skip it — it will not be charged automatically until collection resumes (2026-07-28). `commit_exposure` reports an unpaid invoice that funded a prepaid commit whose credit is already spendable (ADR-078 funds commits at issue, not at payment) — note this reason is only returned when no other reason applies; when one does, the exposure is folded into that reason's `message` and its `actions` instead, so clients must not treat the reason code as the presence test for exposure (2026-08-04).
const ( AwaitingPayment AttentionReason = "awaiting_payment" CollectionPaused AttentionReason = "collection_paused" CommitExposure AttentionReason = "commit_exposure" DunningExhausted AttentionReason = "dunning_exhausted" NoPaymentMethod AttentionReason = "no_payment_method" PaymentAnomaly AttentionReason = "payment_anomaly" PaymentFailed AttentionReason = "payment_failed" PaymentProcessing AttentionReason = "payment_processing" PaymentScheduled AttentionReason = "payment_scheduled" PaymentUnconfirmed AttentionReason = "payment_unconfirmed" TaxCalculationFailed AttentionReason = "tax_calculation_failed" TaxLocationRequired AttentionReason = "tax_location_required" )
Defines values for AttentionReason.
func (AttentionReason) Valid ¶
func (e AttentionReason) Valid() bool
Valid indicates whether the value is a known member of the AttentionReason enum.
type AttentionSeverity ¶
type AttentionSeverity string
AttentionSeverity Urgency of an Attention surface. Operators sort/filter on this and the dashboard renders one colour per level. Priority descending: Critical > Warning > Info.
const ( Critical AttentionSeverity = "critical" Info AttentionSeverity = "info" Warning AttentionSeverity = "warning" )
Defines values for AttentionSeverity.
func (AttentionSeverity) Valid ¶
func (e AttentionSeverity) Valid() bool
Valid indicates whether the value is a known member of the AttentionSeverity enum.
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type CreditBalance ¶
type CreditBalance struct {
BalanceCents int64 `json:"balance_cents,omitempty"`
CustomerId string `json:"customer_id,omitempty"`
TotalGranted int64 `json:"total_granted,omitempty"`
TotalUsed int64 `json:"total_used,omitempty"`
}
CreditBalance defines model for CreditBalance.
type Customer ¶
type Customer struct {
// AdditionalEmails CC'd on billing documents and billing-state emails (invoice,
// receipt, dunning, payment failed, credit note) — never on
// credential-bearing emails (setup links, resets, invites).
// Normalized to lowercase bare addresses, deduped, capped at 10,
// never equal to the primary email. Stored encrypted at rest.
AdditionalEmails []string `json:"additional_emails,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Email string `json:"email,omitempty"`
ExternalId string `json:"external_id,omitempty"`
Id string `json:"id,omitempty"`
Status CustomerStatus `json:"status,omitempty"`
// TestClockId Test clock this customer is pinned to (test mode only). When set,
// the customer — and any invoices/subscriptions created for it —
// run on the clock's simulated time. Empty for live customers. The
// dashboard reads it to show the "test clock" badge + simulated-time
// banner on the customer and its invoices.
TestClockId string `json:"test_clock_id,omitempty"`
}
Customer defines model for Customer.
type CustomerStatus ¶
type CustomerStatus string
CustomerStatus defines model for Customer.Status.
const ( CustomerStatusActive CustomerStatus = "active" CustomerStatusArchived CustomerStatus = "archived" )
Defines values for CustomerStatus.
func (CustomerStatus) Valid ¶
func (e CustomerStatus) Valid() bool
Valid indicates whether the value is a known member of the CustomerStatus enum.
type Error ¶
type Error struct {
Error struct {
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
RequestId string `json:"request_id,omitempty"`
Type ErrorErrorType `json:"type,omitempty"`
} `json:"error,omitempty"`
}
Error defines model for Error.
type ErrorErrorType ¶
type ErrorErrorType string
ErrorErrorType defines model for Error.Error.Type.
const ( ApiError ErrorErrorType = "api_error" AuthenticationError ErrorErrorType = "authentication_error" InvalidRequestError ErrorErrorType = "invalid_request_error" RateLimitError ErrorErrorType = "rate_limit_error" )
Defines values for ErrorErrorType.
func (ErrorErrorType) Valid ¶
func (e ErrorErrorType) Valid() bool
Valid indicates whether the value is a known member of the ErrorErrorType enum.
type GetV1CreditsGrantsCustomerIdParams ¶ added in v0.2.0
type GetV1CreditsGrantsCustomerIdParams struct {
IncludeExhausted bool `form:"include_exhausted,omitempty" json:"include_exhausted,omitempty"`
}
GetV1CreditsGrantsCustomerIdParams defines parameters for GetV1CreditsGrantsCustomerId.
type GetV1CustomersIdMarginParams ¶
type GetV1CustomersIdMarginParams struct {
From time.Time `form:"from,omitempty" json:"from,omitempty"`
To time.Time `form:"to,omitempty" json:"to,omitempty"`
}
GetV1CustomersIdMarginParams defines parameters for GetV1CustomersIdMargin.
type GetV1CustomersParams ¶
type GetV1CustomersParams struct {
Status string `form:"status,omitempty" json:"status,omitempty"`
// ExternalId Exact-match filter on the caller-assigned external ID.
ExternalId string `form:"external_id,omitempty" json:"external_id,omitempty"`
// Ids Comma-separated customer IDs to fetch exactly.
Ids string `form:"ids,omitempty" json:"ids,omitempty"`
// Search Case-insensitive substring match on display name, email,
// external ID, or ID. Matching runs post-decryption (PII
// columns are encrypted at rest), bounded to the first 5000
// rows of the tenant's filtered set.
Search string `form:"search,omitempty" json:"search,omitempty"`
// Sort One of display_name, email, external_id, status, created_at (default).
Sort string `form:"sort,omitempty" json:"sort,omitempty"`
Dir GetV1CustomersParamsDir `form:"dir,omitempty" json:"dir,omitempty"`
Limit int `form:"limit,omitempty" json:"limit,omitempty"`
Offset int `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1CustomersParams defines parameters for GetV1Customers.
type GetV1CustomersParamsDir ¶
type GetV1CustomersParamsDir string
GetV1CustomersParamsDir defines parameters for GetV1Customers.
const ( GetV1CustomersParamsDirAsc GetV1CustomersParamsDir = "asc" GetV1CustomersParamsDirDesc GetV1CustomersParamsDir = "desc" )
Defines values for GetV1CustomersParamsDir.
func (GetV1CustomersParamsDir) Valid ¶
func (e GetV1CustomersParamsDir) Valid() bool
Valid indicates whether the value is a known member of the GetV1CustomersParamsDir enum.
type GetV1InvoicesParams ¶
type GetV1InvoicesParams struct {
CustomerId string `form:"customer_id,omitempty" json:"customer_id,omitempty"`
SubscriptionId string `form:"subscription_id,omitempty" json:"subscription_id,omitempty"`
Status string `form:"status,omitempty" json:"status,omitempty"`
PaymentStatus string `form:"payment_status,omitempty" json:"payment_status,omitempty"`
// Search Case-insensitive substring match on invoice number.
Search string `form:"search,omitempty" json:"search,omitempty"`
// From Lower bound on created_at, inclusive. RFC3339 instant or
// bare YYYY-MM-DD (anchored at 00:00:00Z).
From string `form:"from,omitempty" json:"from,omitempty"`
// To Upper bound on created_at, inclusive. RFC3339 instant or
// bare YYYY-MM-DD (anchored at 23:59:59Z).
To string `form:"to,omitempty" json:"to,omitempty"`
// Overdue When true, restrict to open invoices past their due date
// that haven't settled (finalized + due_at < now +
// payment_status not succeeded/processing). Backs the
// dashboard's "Past due" segment.
Overdue bool `form:"overdue,omitempty" json:"overdue,omitempty"`
// Ids Comma-separated invoice IDs to fetch exactly.
Ids string `form:"ids,omitempty" json:"ids,omitempty"`
// Sort One of invoice_number, amount_due_cents, billing_period_start, due_at, issued_at, status, payment_status, created_at (default).
Sort string `form:"sort,omitempty" json:"sort,omitempty"`
Dir GetV1InvoicesParamsDir `form:"dir,omitempty" json:"dir,omitempty"`
Limit int `form:"limit,omitempty" json:"limit,omitempty"`
Offset int `form:"offset,omitempty" json:"offset,omitempty"`
// After Opaque cursor (default created_at sort only); takes precedence over offset.
After string `form:"after,omitempty" json:"after,omitempty"`
}
GetV1InvoicesParams defines parameters for GetV1Invoices.
type GetV1InvoicesParamsDir ¶
type GetV1InvoicesParamsDir string
GetV1InvoicesParamsDir defines parameters for GetV1Invoices.
const ( GetV1InvoicesParamsDirAsc GetV1InvoicesParamsDir = "asc" GetV1InvoicesParamsDirDesc GetV1InvoicesParamsDir = "desc" )
Defines values for GetV1InvoicesParamsDir.
func (GetV1InvoicesParamsDir) Valid ¶
func (e GetV1InvoicesParamsDir) Valid() bool
Valid indicates whether the value is a known member of the GetV1InvoicesParamsDir enum.
type GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource ¶ added in v0.2.0
type GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource string
GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource defines parameters for GetV1PublicCostDashboardToken.
const ( GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSourceNoSubscription GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource = "no_subscription" GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSourceSubscription GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource = "subscription" )
Defines values for GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource.
func (GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource) Valid ¶ added in v0.2.0
func (e GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource) Valid() bool
Valid indicates whether the value is a known member of the GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource enum.
type GetV1SubscriptionsParams ¶
type GetV1SubscriptionsParams struct {
CustomerId string `form:"customer_id,omitempty" json:"customer_id,omitempty"`
// PlanId Filter to subscriptions with a live item on this plan.
PlanId string `form:"plan_id,omitempty" json:"plan_id,omitempty"`
Status string `form:"status,omitempty" json:"status,omitempty"`
// Search Case-insensitive substring match on display name or code.
Search string `form:"search,omitempty" json:"search,omitempty"`
// Sort One of display_name, status, next_billing_at, trial_end_at, created_at (default).
Sort string `form:"sort,omitempty" json:"sort,omitempty"`
Dir GetV1SubscriptionsParamsDir `form:"dir,omitempty" json:"dir,omitempty"`
Limit int `form:"limit,omitempty" json:"limit,omitempty"`
Offset int `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1SubscriptionsParams defines parameters for GetV1Subscriptions.
type GetV1SubscriptionsParamsDir ¶
type GetV1SubscriptionsParamsDir string
GetV1SubscriptionsParamsDir defines parameters for GetV1Subscriptions.
const ( Asc GetV1SubscriptionsParamsDir = "asc" Desc GetV1SubscriptionsParamsDir = "desc" )
Defines values for GetV1SubscriptionsParamsDir.
func (GetV1SubscriptionsParamsDir) Valid ¶
func (e GetV1SubscriptionsParamsDir) Valid() bool
Valid indicates whether the value is a known member of the GetV1SubscriptionsParamsDir enum.
type GetV1UsageEventsParams ¶
type GetV1UsageEventsParams struct {
CustomerId string `form:"customer_id,omitempty" json:"customer_id,omitempty"`
MeterId string `form:"meter_id,omitempty" json:"meter_id,omitempty"`
// Dimensions Comma-separated key=value pairs matched against the event's
// dimensions via JSONB containment (multiple pairs AND).
// Values that parse as JSON booleans/numbers are matched
// typed ("cached=true", "attempt=2"); everything else as a
// string. Malformed pairs → 422. Example:
// `model=gpt-4o,token_type=input`.
Dimensions string `form:"dimensions,omitempty" json:"dimensions,omitempty"`
}
GetV1UsageEventsParams defines parameters for GetV1UsageEvents.
type GetV1Whoami200JSONResponseBodyKeyType ¶ added in v0.2.0
type GetV1Whoami200JSONResponseBodyKeyType string
GetV1Whoami200JSONResponseBodyKeyType defines parameters for GetV1Whoami.
const ( Platform GetV1Whoami200JSONResponseBodyKeyType = "platform" Publishable GetV1Whoami200JSONResponseBodyKeyType = "publishable" Secret GetV1Whoami200JSONResponseBodyKeyType = "secret" )
Defines values for GetV1Whoami200JSONResponseBodyKeyType.
func (GetV1Whoami200JSONResponseBodyKeyType) Valid ¶ added in v0.2.0
func (e GetV1Whoami200JSONResponseBodyKeyType) Valid() bool
Valid indicates whether the value is a known member of the GetV1Whoami200JSONResponseBodyKeyType enum.
type InstantiateRecipeJSONBody ¶ added in v0.2.0
type InstantiateRecipeJSONBody struct {
Overrides map[string]interface{} `json:"overrides,omitempty"`
}
InstantiateRecipeJSONBody defines parameters for InstantiateRecipe.
type InstantiateRecipeJSONRequestBody ¶ added in v0.2.0
type InstantiateRecipeJSONRequestBody InstantiateRecipeJSONBody
InstantiateRecipeJSONRequestBody defines body for InstantiateRecipe for application/json ContentType.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type Invoice ¶
type Invoice struct {
AmountDueCents int64 `json:"amount_due_cents"`
AmountPaidCents int64 `json:"amount_paid_cents"`
// Attention Unified "this invoice needs operator attention" surface.
// Computed server-side from durable invoice fields
// (`tax_status`, `tax_error_code`, `payment_status`,
// `last_payment_error`). Never persisted —
// always derived. Omitted entirely when the invoice is healthy
// (matches Stripe's `last_finalization_error: null` ergonomic).
// See ADR-009.
Attention Attention `json:"attention,omitempty"`
AutoChargePending bool `json:"auto_charge_pending,omitempty"`
// BillingPeriodDisplay Human period string with the inclusive last covered day ("Jun 1, 2028 – Jun 30, 2028"), date-only in the invoice's billing timezone (ADR-058 / ADR-077). Computed on read; the raw billing_period_start/end stay half-open. Empty/omitted for one-off invoices with no period.
BillingPeriodDisplay string `json:"billing_period_display,omitempty"`
BillingPeriodEnd time.Time `json:"billing_period_end"`
BillingPeriodStart time.Time `json:"billing_period_start"`
// BillingReason Mirrors Stripe's `invoice.billing_reason`. Classifies the trigger
// that produced the invoice. Stamped at create time and never mutated.
BillingReason InvoiceBillingReason `json:"billing_reason,omitempty"`
// BillingTimezone IANA timezone the period boundaries are anchored in — the org billing timezone resolved and denormalized onto the invoice at issue (ADR-077). billing_period_display is rendered in this zone, so an issued invoice's dates stay fixed even if the org later changes its timezone. Empty for ad-hoc/legacy invoices.
BillingTimezone string `json:"billing_timezone,omitempty"`
CreatedAt time.Time `json:"created_at"`
CreditsAppliedCents int64 `json:"credits_applied_cents"`
Currency string `json:"currency"`
CustomerId string `json:"customer_id"`
DiscountCents int64 `json:"discount_cents"`
DueAt time.Time `json:"due_at,omitempty"`
Id string `json:"id"`
// InvoiceNumber Empty until the invoice is finalized.
InvoiceNumber string `json:"invoice_number"`
// IsSimulated Whether this invoice's domain timestamps (created/issued/due/paid)
// were stamped on a test clock's simulated time rather than
// wall-clock. Captured at write time (engine: the subscription is
// clock-pinned; manual composer: the customer is clock-pinned). The
// dashboard renders a "simulated" badge from this authoritative flag
// instead of inferring it. Always false in live mode.
IsSimulated bool `json:"is_simulated,omitempty"`
// IssuedAt Set when the invoice transitions out of draft.
IssuedAt time.Time `json:"issued_at,omitempty"`
LastPaymentError string `json:"last_payment_error,omitempty"`
Memo string `json:"memo,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
NetPaymentTermDays int `json:"net_payment_term_days"`
PaidAt time.Time `json:"paid_at,omitempty"`
// PaymentStatus Payment-attempt status. `unknown` marks a Stripe charge attempt that
// returned an ambiguous error (5xx, timeout, connection reset) where
// we cannot tell whether Stripe processed the charge — a reconciler
// resolves these by querying Stripe after a cool-off window.
PaymentStatus InvoicePaymentStatus `json:"payment_status"`
// PublicToken Hosted-invoice-URL credential (Stripe-parity
// `hosted_invoice_url`). Generated at finalize; drafts have an
// empty token. Rotatable via `POST
// /v1/invoices/{id}/rotate-public-token`.
PublicToken string `json:"public_token,omitempty"`
// RecoveryWarning What an operator must know BEFORE recording an OFFLINE payment on a
// written-off invoice — a consequence that will go unreconciled, NOT
// a refusal. Absent when there is nothing to say.
RecoveryWarning RecoveryWarning `json:"recovery_warning,omitempty"`
// SourceChangeType Classifies per-item proration artifacts so the dedup index can
// distinguish a plan-change and a quantity-change that happen to
// share the same `(subscription, item, timestamp)`.
SourceChangeType ItemChangeType `json:"source_change_type,omitempty"`
SourcePlanChangedAt time.Time `json:"source_plan_changed_at,omitempty"`
SourceSubscriptionItemId string `json:"source_subscription_item_id,omitempty"`
// Status Lifecycle state of the invoice. `uncollectible` marks an invoice
// a dunning policy has given up collecting (no further retries) while
// keeping it on the books — distinct from `voided` (cancelled, owes
// nothing).
Status InvoiceStatus `json:"status"`
// StripeInvoiceId Source Stripe invoice id (`in_xxx`) for an invoice imported from
// a Stripe account. Currently always empty: the Stripe importer was
// removed (deferred until a design-partner cutover) and nothing
// writes this field today. The column and its unique index remain
// for a future importer. Empty for Velox-native invoices.
StripeInvoiceId string `json:"stripe_invoice_id,omitempty"`
StripePaymentIntentId string `json:"stripe_payment_intent_id,omitempty"`
// SubscriptionId Empty for one-off invoices not tied to a subscription.
SubscriptionId string `json:"subscription_id"`
SubtotalCents int64 `json:"subtotal_cents"`
TaxAmountCents int64 `json:"tax_amount_cents"`
// TaxCalculationId Provider-side calculation reference captured at build time.
// For Stripe Tax this expires after 24 h; persisted so finalized
// invoices remain reconstructable past expiry.
TaxCalculationId string `json:"tax_calculation_id,omitempty"`
TaxCountry string `json:"tax_country,omitempty"`
TaxDeferredAt time.Time `json:"tax_deferred_at,omitempty"`
// TaxErrorCode Typed taxonomy of `tax_pending_reason`. One of
// `customer_data_invalid`, `jurisdiction_unsupported`,
// `provider_outage`, `provider_auth`, `unknown`. Empty for
// invoices deferred before this column existed (migration
// 0067).
TaxErrorCode string `json:"tax_error_code,omitempty"`
TaxExemptReason string `json:"tax_exempt_reason,omitempty"`
TaxId string `json:"tax_id,omitempty"`
TaxName string `json:"tax_name,omitempty"`
TaxPendingReason string `json:"tax_pending_reason,omitempty"`
// TaxProvider Durable audit snapshot of the upstream tax engine that ran the
// calculation (e.g. `stripe`, `none`, `manual`).
TaxProvider string `json:"tax_provider,omitempty"`
// TaxRate Tax rate as a percent (18.50 = 18.50%), up to 4-decimal precision. ADR-042/043.
TaxRate float64 `json:"tax_rate"`
TaxRetryCount int `json:"tax_retry_count,omitempty"`
TaxReverseCharge bool `json:"tax_reverse_charge,omitempty"`
// TaxStatus Whether tax has been successfully calculated. Happy path is `ok`.
// `pending` means a transient calculation failure is awaiting retry;
// `failed` means retries are exhausted (operator resolves manually).
// Pending/failed invoices are blocked from finalize so we never send
// a wrong tax amount.
TaxStatus InvoiceTaxStatus `json:"tax_status,omitempty"`
// TaxTransactionId Provider-side committed transaction reference, captured at
// finalize. For Stripe Tax this is `tx_xxx` and is the handle
// the provider needs for a later reversal when a credit note is
// issued.
TaxTransactionId string `json:"tax_transaction_id,omitempty"`
// TenantId Owning tenant. Returned for diagnostic clarity but redundant
// with the API key (which already determines the tenant).
// Omitted when empty.
TenantId string `json:"tenant_id,omitempty"`
TotalAmountCents int64 `json:"total_amount_cents"`
UpdatedAt time.Time `json:"updated_at"`
VoidedAt time.Time `json:"voided_at,omitempty"`
}
Invoice A Velox invoice. Returned from create, finalize, void, list, get, rotate-public-token, and collect-payment endpoints.
type InvoiceBillingReason ¶
type InvoiceBillingReason string
InvoiceBillingReason Mirrors Stripe's `invoice.billing_reason`. Classifies the trigger that produced the invoice. Stamped at create time and never mutated.
const ( Manual InvoiceBillingReason = "manual" SubscriptionCancel InvoiceBillingReason = "subscription_cancel" SubscriptionCreate InvoiceBillingReason = "subscription_create" SubscriptionCycle InvoiceBillingReason = "subscription_cycle" SubscriptionUpdate InvoiceBillingReason = "subscription_update" Threshold InvoiceBillingReason = "threshold" )
Defines values for InvoiceBillingReason.
func (InvoiceBillingReason) Valid ¶
func (e InvoiceBillingReason) Valid() bool
Valid indicates whether the value is a known member of the InvoiceBillingReason enum.
type InvoiceLineItem ¶
type InvoiceLineItem struct {
AmountCents int64 `json:"amount_cents"`
BillingPeriodEnd time.Time `json:"billing_period_end,omitempty"`
BillingPeriodStart time.Time `json:"billing_period_start,omitempty"`
// CommitExpiresAt Expiry of the granted commit block. Absent/null = the credits
// never expire (the default).
CommitExpiresAt time.Time `json:"commit_expires_at,omitempty"`
// CommitGrantedCents Marks the line as a prepaid-commit purchase (ADR-078): when the
// invoice finalizes, a credit block of this many cents is granted
// to the customer. May differ from the line price — discounted
// commits sell $10k of credits for $9k. add_on lines on manual
// invoices only, at most one per invoice. Absent on normal lines.
CommitGrantedCents int64 `json:"commit_granted_cents,omitempty"`
CreatedAt time.Time `json:"created_at"`
Currency string `json:"currency"`
Description string `json:"description"`
Id string `json:"id"`
InvoiceId string `json:"invoice_id"`
LineType InvoiceLineType `json:"line_type"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
MeterId string `json:"meter_id,omitempty"`
// MeterUnit The meter's unit ("tokens", "seconds", …), stamped on usage lines at write time so invoice surfaces can apply the display-scale convention (token rates read "$3.00 / 1M tokens"). Empty on non-usage lines and on lines written before the 0173 backfill.
MeterUnit string `json:"meter_unit,omitempty"`
PricingMode string `json:"pricing_mode,omitempty"`
Quantity int64 `json:"quantity"`
// QuantityDecimal Exact (possibly fractional) usage quantity as a decimal string (e.g. "1.5"). The integer `quantity` is this truncated, kept for back-compat (Stripe quantity_decimal parity). "0" means none — use `quantity`. Line amounts stay whole cents.
QuantityDecimal string `json:"quantity_decimal,omitempty"`
RatingRuleVersionId string `json:"rating_rule_version_id,omitempty"`
TaxAmountCents int64 `json:"tax_amount_cents"`
TaxCode string `json:"tax_code,omitempty"`
TaxJurisdiction string `json:"tax_jurisdiction,omitempty"`
// TaxRate Tax rate as a percent (18.50 = 18.50%), up to 4-decimal precision. ADR-042/043.
TaxRate float64 `json:"tax_rate"`
// TaxReason Stripe-canonical structured `taxability_reason`
// (`standard_rated`, `reverse_charge`, `not_collecting`,
// `customer_exempt`, `product_exempt`, `zero_rated`, etc.).
// Empty for non-Stripe providers.
TaxReason string `json:"tax_reason,omitempty"`
// TenantId Owning tenant. Omitted when empty.
TenantId string `json:"tenant_id,omitempty"`
TotalAmountCents int64 `json:"total_amount_cents"`
UnitAmountCents int64 `json:"unit_amount_cents"`
// UnitAmountDecimal Full-precision per-unit price in DECIMAL CENTS (e.g. "0.3" = $0.003 per unit), the Stripe unit_amount_decimal model. Derived on read as amount_cents ÷ quantity, so it reconciles with the rounded line amount and, unlike the whole-cent `unit_amount_cents`, never collapses a sub-cent rate to 0. Render with the decimal-aware rate formatter; line amounts/totals stay whole cents.
UnitAmountDecimal string `json:"unit_amount_decimal,omitempty"`
}
InvoiceLineItem A single line on an invoice.
type InvoiceLineType ¶
type InvoiceLineType string
InvoiceLineType defines model for InvoiceLineType.
const ( AddOn InvoiceLineType = "add_on" BaseFee InvoiceLineType = "base_fee" Discount InvoiceLineType = "discount" Tax InvoiceLineType = "tax" Usage InvoiceLineType = "usage" )
Defines values for InvoiceLineType.
func (InvoiceLineType) Valid ¶
func (e InvoiceLineType) Valid() bool
Valid indicates whether the value is a known member of the InvoiceLineType enum.
type InvoicePaymentStatus ¶
type InvoicePaymentStatus string
InvoicePaymentStatus Payment-attempt status. `unknown` marks a Stripe charge attempt that returned an ambiguous error (5xx, timeout, connection reset) where we cannot tell whether Stripe processed the charge — a reconciler resolves these by querying Stripe after a cool-off window.
const ( InvoicePaymentStatusFailed InvoicePaymentStatus = "failed" InvoicePaymentStatusPending InvoicePaymentStatus = "pending" InvoicePaymentStatusProcessing InvoicePaymentStatus = "processing" InvoicePaymentStatusSucceeded InvoicePaymentStatus = "succeeded" InvoicePaymentStatusUnknown InvoicePaymentStatus = "unknown" )
Defines values for InvoicePaymentStatus.
func (InvoicePaymentStatus) Valid ¶
func (e InvoicePaymentStatus) Valid() bool
Valid indicates whether the value is a known member of the InvoicePaymentStatus enum.
type InvoiceStatus ¶
type InvoiceStatus string
InvoiceStatus Lifecycle state of the invoice. `uncollectible` marks an invoice a dunning policy has given up collecting (no further retries) while keeping it on the books — distinct from `voided` (cancelled, owes nothing).
const ( InvoiceStatusDraft InvoiceStatus = "draft" InvoiceStatusFinalized InvoiceStatus = "finalized" InvoiceStatusPaid InvoiceStatus = "paid" InvoiceStatusUncollectible InvoiceStatus = "uncollectible" InvoiceStatusVoided InvoiceStatus = "voided" )
Defines values for InvoiceStatus.
func (InvoiceStatus) Valid ¶
func (e InvoiceStatus) Valid() bool
Valid indicates whether the value is a known member of the InvoiceStatus enum.
type InvoiceTaxStatus ¶
type InvoiceTaxStatus string
InvoiceTaxStatus Whether tax has been successfully calculated. Happy path is `ok`. `pending` means a transient calculation failure is awaiting retry; `failed` means retries are exhausted (operator resolves manually). Pending/failed invoices are blocked from finalize so we never send a wrong tax amount.
const ( InvoiceTaxStatusFailed InvoiceTaxStatus = "failed" InvoiceTaxStatusOk InvoiceTaxStatus = "ok" InvoiceTaxStatusPending InvoiceTaxStatus = "pending" )
Defines values for InvoiceTaxStatus.
func (InvoiceTaxStatus) Valid ¶
func (e InvoiceTaxStatus) Valid() bool
Valid indicates whether the value is a known member of the InvoiceTaxStatus enum.
type InvoiceWithLineItems ¶
type InvoiceWithLineItems struct {
// Invoice A Velox invoice. Returned from create, finalize, void, list, get,
// rotate-public-token, and collect-payment endpoints.
Invoice Invoice `json:"invoice"`
LineItems []InvoiceLineItem `json:"line_items"`
}
InvoiceWithLineItems Response shape for `GET /v1/invoices/{id}`. The handler returns the invoice and its line items as separate top-level keys (rather than nesting `line_items` inside the invoice) so the client can render the two arrays independently.
type ItemChangeType ¶
type ItemChangeType string
ItemChangeType Classifies per-item proration artifacts so the dedup index can distinguish a plan-change and a quantity-change that happen to share the same `(subscription, item, timestamp)`.
const ( ItemChangeTypeAdd ItemChangeType = "add" ItemChangeTypePlan ItemChangeType = "plan" ItemChangeTypeQuantity ItemChangeType = "quantity" ItemChangeTypeRemove ItemChangeType = "remove" )
Defines values for ItemChangeType.
func (ItemChangeType) Valid ¶
func (e ItemChangeType) Valid() bool
Valid indicates whether the value is a known member of the ItemChangeType enum.
type MarginReport ¶
type MarginReport struct {
ByModel []struct {
// Attributed True only when a pricing rule pins this model — margin is never heuristically allocated.
Attributed bool `json:"attributed"`
CostMicros int64 `json:"cost_micros"`
Model string `json:"model"`
RevenueCents int64 `json:"revenue_cents,omitempty"`
} `json:"by_model"`
CacheWriteExcluded bool `json:"cache_write_excluded,omitempty"`
// CostMicros Total stamped provider cost, micro-dollars.
CostMicros int64 `json:"cost_micros"`
CustomerId string `json:"customer_id"`
From time.Time `json:"from"`
// MarginBps (revenue − cost) / revenue in basis points. Omitted when revenue is 0.
MarginBps int64 `json:"margin_bps,omitempty"`
// RevenueCents Total rated usage revenue in the window.
RevenueCents int64 `json:"revenue_cents"`
To time.Time `json:"to"`
UnattributedRevenueCents int64 `json:"unattributed_revenue_cents"`
// UnresolvedEvents Token events with costable dims but no matching rate — add a rate to cost new events.
UnresolvedEvents int64 `json:"unresolved_events"`
}
MarginReport defines model for MarginReport.
type MemberInvitation ¶ added in v0.2.0
type MemberInvitation struct {
AcceptedAt time.Time `json:"accepted_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
Email string `json:"email"`
ExpiresAt time.Time `json:"expires_at"`
Id string `json:"id"`
InvitedByEmail string `json:"invited_by_email,omitempty"`
RevokedAt time.Time `json:"revoked_at,omitempty"`
// Role Recorded for the future role split; not enforced (every member holds the full permission set).
Role string `json:"role"`
// Status Server-derived; treat as authoritative.
Status MemberInvitationStatus `json:"status"`
}
MemberInvitation defines model for MemberInvitation.
type MemberInvitationStatus ¶ added in v0.2.0
type MemberInvitationStatus string
MemberInvitationStatus Server-derived; treat as authoritative.
const ( Accepted MemberInvitationStatus = "accepted" Expired MemberInvitationStatus = "expired" Pending MemberInvitationStatus = "pending" Revoked MemberInvitationStatus = "revoked" )
Defines values for MemberInvitationStatus.
func (MemberInvitationStatus) Valid ¶ added in v0.2.0
func (e MemberInvitationStatus) Valid() bool
Valid indicates whether the value is a known member of the MemberInvitationStatus enum.
type Meter ¶
type Meter struct {
Aggregation MeterAggregation `json:"aggregation,omitempty"`
Id string `json:"id,omitempty"`
Key string `json:"key,omitempty"`
Name string `json:"name,omitempty"`
RatingRuleVersionId string `json:"rating_rule_version_id,omitempty"`
Unit string `json:"unit,omitempty"`
}
Meter defines model for Meter.
type MeterAggregation ¶
type MeterAggregation string
MeterAggregation defines model for Meter.Aggregation.
const ( MeterAggregationCount MeterAggregation = "count" MeterAggregationLast MeterAggregation = "last" MeterAggregationMax MeterAggregation = "max" MeterAggregationSum MeterAggregation = "sum" )
Defines values for MeterAggregation.
func (MeterAggregation) Valid ¶
func (e MeterAggregation) Valid() bool
Valid indicates whether the value is a known member of the MeterAggregation enum.
type PatchV1MetersIdJSONBody ¶
type PatchV1MetersIdJSONBody struct {
Aggregation PatchV1MetersIdJSONBodyAggregation `json:"aggregation,omitempty"`
Name string `json:"name,omitempty"`
// RatingRuleVersionId Default rating rule; empty string clears.
RatingRuleVersionId string `json:"rating_rule_version_id,omitempty"`
Unit string `json:"unit,omitempty"`
}
PatchV1MetersIdJSONBody defines parameters for PatchV1MetersId.
type PatchV1MetersIdJSONBodyAggregation ¶
type PatchV1MetersIdJSONBodyAggregation string
PatchV1MetersIdJSONBodyAggregation defines parameters for PatchV1MetersId.
const ( PatchV1MetersIdJSONBodyAggregationCount PatchV1MetersIdJSONBodyAggregation = "count" PatchV1MetersIdJSONBodyAggregationLast PatchV1MetersIdJSONBodyAggregation = "last" PatchV1MetersIdJSONBodyAggregationMax PatchV1MetersIdJSONBodyAggregation = "max" PatchV1MetersIdJSONBodyAggregationSum PatchV1MetersIdJSONBodyAggregation = "sum" )
Defines values for PatchV1MetersIdJSONBodyAggregation.
func (PatchV1MetersIdJSONBodyAggregation) Valid ¶
func (e PatchV1MetersIdJSONBodyAggregation) Valid() bool
Valid indicates whether the value is a known member of the PatchV1MetersIdJSONBodyAggregation enum.
type PatchV1MetersIdJSONRequestBody ¶
type PatchV1MetersIdJSONRequestBody PatchV1MetersIdJSONBody
PatchV1MetersIdJSONRequestBody defines body for PatchV1MetersId for application/json ContentType.
type PatchV1WebhookEndpointsEndpointsIdJSONBody ¶
type PatchV1WebhookEndpointsEndpointsIdJSONBody struct {
Active bool `json:"active,omitempty"`
Description string `json:"description,omitempty"`
Events []string `json:"events,omitempty"`
Url string `json:"url,omitempty"`
}
PatchV1WebhookEndpointsEndpointsIdJSONBody defines parameters for PatchV1WebhookEndpointsEndpointsId.
type PatchV1WebhookEndpointsEndpointsIdJSONRequestBody ¶
type PatchV1WebhookEndpointsEndpointsIdJSONRequestBody PatchV1WebhookEndpointsEndpointsIdJSONBody
PatchV1WebhookEndpointsEndpointsIdJSONRequestBody defines body for PatchV1WebhookEndpointsEndpointsId for application/json ContentType.
type Plan ¶
type Plan struct {
BaseAmountCents int64 `json:"base_amount_cents,omitempty"`
// BaseBillTiming When the recurring base fee is invoiced relative to the period it covers.
// in_arrears (default): base + usage billed at period end.
// in_advance: base billed at period start (day 1 on create; cycle-close invoice
// carries upcoming period's base + elapsed period's usage). Usage lines are
// always arrears regardless of this flag. See ADR-031.
BaseBillTiming PlanBaseBillTiming `json:"base_bill_timing,omitempty"`
BillingInterval PlanBillingInterval `json:"billing_interval,omitempty"`
Code string `json:"code,omitempty"`
Currency string `json:"currency,omitempty"`
Id string `json:"id,omitempty"`
MeterIds []string `json:"meter_ids,omitempty"`
Name string `json:"name,omitempty"`
Status PlanStatus `json:"status,omitempty"`
}
Plan defines model for Plan.
type PlanBaseBillTiming ¶
type PlanBaseBillTiming string
PlanBaseBillTiming When the recurring base fee is invoiced relative to the period it covers. in_arrears (default): base + usage billed at period end. in_advance: base billed at period start (day 1 on create; cycle-close invoice carries upcoming period's base + elapsed period's usage). Usage lines are always arrears regardless of this flag. See ADR-031.
const ( PlanBaseBillTimingInAdvance PlanBaseBillTiming = "in_advance" PlanBaseBillTimingInArrears PlanBaseBillTiming = "in_arrears" )
Defines values for PlanBaseBillTiming.
func (PlanBaseBillTiming) Valid ¶
func (e PlanBaseBillTiming) Valid() bool
Valid indicates whether the value is a known member of the PlanBaseBillTiming enum.
type PlanBillingInterval ¶
type PlanBillingInterval string
PlanBillingInterval defines model for Plan.BillingInterval.
const ( PlanBillingIntervalMonthly PlanBillingInterval = "monthly" PlanBillingIntervalYearly PlanBillingInterval = "yearly" )
Defines values for PlanBillingInterval.
func (PlanBillingInterval) Valid ¶
func (e PlanBillingInterval) Valid() bool
Valid indicates whether the value is a known member of the PlanBillingInterval enum.
type PlanStatus ¶
type PlanStatus string
PlanStatus defines model for Plan.Status.
const ( PlanStatusActive PlanStatus = "active" PlanStatusArchived PlanStatus = "archived" PlanStatusDraft PlanStatus = "draft" )
Defines values for PlanStatus.
func (PlanStatus) Valid ¶
func (e PlanStatus) Valid() bool
Valid indicates whether the value is a known member of the PlanStatus enum.
type PostV1AuthAcceptInviteJSONBody ¶ added in v0.2.0
type PostV1AuthAcceptInviteJSONBody struct {
// Password Required (and validated) only when no account exists for the invited email; ignored otherwise.
Password string `json:"password,omitempty"`
Token string `json:"token"`
}
PostV1AuthAcceptInviteJSONBody defines parameters for PostV1AuthAcceptInvite.
type PostV1AuthAcceptInviteJSONRequestBody ¶ added in v0.2.0
type PostV1AuthAcceptInviteJSONRequestBody PostV1AuthAcceptInviteJSONBody
PostV1AuthAcceptInviteJSONRequestBody defines body for PostV1AuthAcceptInvite for application/json ContentType.
type PostV1AuthLoginJSONBody ¶
type PostV1AuthLoginJSONBody struct {
Email openapi_types.Email `json:"email"`
Password string `json:"password"`
}
PostV1AuthLoginJSONBody defines parameters for PostV1AuthLogin.
type PostV1AuthLoginJSONRequestBody ¶
type PostV1AuthLoginJSONRequestBody PostV1AuthLoginJSONBody
PostV1AuthLoginJSONRequestBody defines body for PostV1AuthLogin for application/json ContentType.
type PostV1AuthModeJSONBody ¶
type PostV1AuthModeJSONBody struct {
Livemode bool `json:"livemode"`
}
PostV1AuthModeJSONBody defines parameters for PostV1AuthMode.
type PostV1AuthModeJSONRequestBody ¶
type PostV1AuthModeJSONRequestBody PostV1AuthModeJSONBody
PostV1AuthModeJSONRequestBody defines body for PostV1AuthMode for application/json ContentType.
type PostV1AuthPasswordResetConfirmJSONBody ¶
type PostV1AuthPasswordResetConfirmJSONBody struct {
Password string `json:"password"`
Token string `json:"token"`
}
PostV1AuthPasswordResetConfirmJSONBody defines parameters for PostV1AuthPasswordResetConfirm.
type PostV1AuthPasswordResetConfirmJSONRequestBody ¶
type PostV1AuthPasswordResetConfirmJSONRequestBody PostV1AuthPasswordResetConfirmJSONBody
PostV1AuthPasswordResetConfirmJSONRequestBody defines body for PostV1AuthPasswordResetConfirm for application/json ContentType.
type PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery ¶ added in v0.2.0
type PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery string
PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery defines parameters for PostV1AuthPasswordResetRequest.
const ( NotConfigured PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery = "not_configured" Ok PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery = "ok" )
Defines values for PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery.
func (PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery) Valid ¶ added in v0.2.0
func (e PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery) Valid() bool
Valid indicates whether the value is a known member of the PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery enum.
type PostV1AuthPasswordResetRequestJSONBody ¶
type PostV1AuthPasswordResetRequestJSONBody struct {
Email openapi_types.Email `json:"email"`
}
PostV1AuthPasswordResetRequestJSONBody defines parameters for PostV1AuthPasswordResetRequest.
type PostV1AuthPasswordResetRequestJSONRequestBody ¶
type PostV1AuthPasswordResetRequestJSONRequestBody PostV1AuthPasswordResetRequestJSONBody
PostV1AuthPasswordResetRequestJSONRequestBody defines body for PostV1AuthPasswordResetRequest for application/json ContentType.
type PostV1CreditNotesIdSendJSONBody ¶ added in v0.2.0
type PostV1CreditNotesIdSendJSONBody struct {
AdditionalEmails []string `json:"additional_emails,omitempty"`
Email openapi_types.Email `json:"email"`
}
PostV1CreditNotesIdSendJSONBody defines parameters for PostV1CreditNotesIdSend.
type PostV1CreditNotesIdSendJSONRequestBody ¶ added in v0.2.0
type PostV1CreditNotesIdSendJSONRequestBody PostV1CreditNotesIdSendJSONBody
PostV1CreditNotesIdSendJSONRequestBody defines body for PostV1CreditNotesIdSend for application/json ContentType.
type PostV1CreditNotesJSONBody ¶ added in v0.2.0
type PostV1CreditNotesJSONBody struct {
AutoIssue bool `json:"auto_issue,omitempty"`
// CommitRelief Mutually exclusive with lines/credit_amount_cents.
CommitRelief struct {
OutOfBandAmountCents int `json:"out_of_band_amount_cents,omitempty"`
// RefundAmountCents Optional allocation; must sum with out_of_band to the derived cash.
RefundAmountCents int `json:"refund_amount_cents,omitempty"`
// RetireAll Retire the LIVE remaining (absorbs racing drawdowns).
RetireAll bool `json:"retire_all,omitempty"`
// RetireCents Commit credits to retire (1..remaining).
RetireCents int `json:"retire_cents,omitempty"`
} `json:"commit_relief,omitempty"`
CreditAmountCents int `json:"credit_amount_cents,omitempty"`
InvoiceId string `json:"invoice_id"`
Lines []struct {
Description string `json:"description,omitempty"`
Quantity int `json:"quantity,omitempty"`
UnitAmountCents int `json:"unit_amount_cents,omitempty"`
} `json:"lines,omitempty"`
OutOfBandAmountCents int `json:"out_of_band_amount_cents,omitempty"`
Reason string `json:"reason,omitempty"`
RefundAmountCents int `json:"refund_amount_cents,omitempty"`
}
PostV1CreditNotesJSONBody defines parameters for PostV1CreditNotes.
type PostV1CreditNotesJSONRequestBody ¶ added in v0.2.0
type PostV1CreditNotesJSONRequestBody PostV1CreditNotesJSONBody
PostV1CreditNotesJSONRequestBody defines body for PostV1CreditNotes for application/json ContentType.
type PostV1CreditsGrantJSONBody ¶
type PostV1CreditsGrantJSONBody struct {
AmountCents int64 `json:"amount_cents"`
CustomerId string `json:"customer_id"`
Description string `json:"description,omitempty"`
// ExpiresAt Optional expiry; must be in the future. Omitted = never expires.
ExpiresAt time.Time `json:"expires_at,omitempty"`
// GrantKind Optional cost-basis class (ADR-078). `promotional` marks
// free/marketing credits, drained BEFORE all paid-class
// blocks. Omitted = unclassified (drains in the paid
// class). `commit` is reserved for the invoice-finalize
// funding path and rejected here.
GrantKind PostV1CreditsGrantJSONBodyGrantKind `json:"grant_kind,omitempty"`
}
PostV1CreditsGrantJSONBody defines parameters for PostV1CreditsGrant.
type PostV1CreditsGrantJSONBodyGrantKind ¶
type PostV1CreditsGrantJSONBodyGrantKind string
PostV1CreditsGrantJSONBodyGrantKind defines parameters for PostV1CreditsGrant.
const (
Promotional PostV1CreditsGrantJSONBodyGrantKind = "promotional"
)
Defines values for PostV1CreditsGrantJSONBodyGrantKind.
func (PostV1CreditsGrantJSONBodyGrantKind) Valid ¶
func (e PostV1CreditsGrantJSONBodyGrantKind) Valid() bool
Valid indicates whether the value is a known member of the PostV1CreditsGrantJSONBodyGrantKind enum.
type PostV1CreditsGrantJSONRequestBody ¶
type PostV1CreditsGrantJSONRequestBody PostV1CreditsGrantJSONBody
PostV1CreditsGrantJSONRequestBody defines body for PostV1CreditsGrant for application/json ContentType.
type PostV1CustomersJSONBody ¶
type PostV1CustomersJSONBody struct {
AdditionalEmails []string `json:"additional_emails,omitempty"`
DisplayName string `json:"display_name"`
Email string `json:"email,omitempty"`
ExternalId string `json:"external_id"`
}
PostV1CustomersJSONBody defines parameters for PostV1Customers.
type PostV1CustomersJSONRequestBody ¶
type PostV1CustomersJSONRequestBody PostV1CustomersJSONBody
PostV1CustomersJSONRequestBody defines body for PostV1Customers for application/json ContentType.
type PostV1InvoicesCreatePreviewJSONBody ¶
type PostV1InvoicesCreatePreviewJSONBody struct {
// CustomerId Customer to preview the invoice for.
CustomerId string `json:"customer_id"`
// Period Optional explicit window. Both bounds must be
// supplied together; partial windows are rejected.
// Defaults to the resolved subscription's current
// cycle.
Period struct {
From time.Time `json:"from"`
To time.Time `json:"to"`
} `json:"period,omitempty"`
// SubscriptionId Optional. Defaults to the customer's primary active
// subscription if not supplied.
SubscriptionId string `json:"subscription_id,omitempty"`
}
PostV1InvoicesCreatePreviewJSONBody defines parameters for PostV1InvoicesCreatePreview.
type PostV1InvoicesCreatePreviewJSONRequestBody ¶
type PostV1InvoicesCreatePreviewJSONRequestBody PostV1InvoicesCreatePreviewJSONBody
PostV1InvoicesCreatePreviewJSONRequestBody defines body for PostV1InvoicesCreatePreview for application/json ContentType.
type PostV1InvoicesIdSendJSONBody ¶ added in v0.2.0
type PostV1InvoicesIdSendJSONBody struct {
AdditionalEmails []string `json:"additional_emails,omitempty"`
Email openapi_types.Email `json:"email"`
}
PostV1InvoicesIdSendJSONBody defines parameters for PostV1InvoicesIdSend.
type PostV1InvoicesIdSendJSONRequestBody ¶ added in v0.2.0
type PostV1InvoicesIdSendJSONRequestBody PostV1InvoicesIdSendJSONBody
PostV1InvoicesIdSendJSONRequestBody defines body for PostV1InvoicesIdSend for application/json ContentType.
type PostV1MembersInviteJSONBody ¶ added in v0.2.0
type PostV1MembersInviteJSONBody struct {
Email openapi_types.Email `json:"email"`
}
PostV1MembersInviteJSONBody defines parameters for PostV1MembersInvite.
type PostV1MembersInviteJSONRequestBody ¶ added in v0.2.0
type PostV1MembersInviteJSONRequestBody PostV1MembersInviteJSONBody
PostV1MembersInviteJSONRequestBody defines body for PostV1MembersInvite for application/json ContentType.
type PostV1MetersJSONBody ¶
type PostV1MetersJSONBody struct {
Aggregation PostV1MetersJSONBodyAggregation `json:"aggregation,omitempty"`
Key string `json:"key"`
Name string `json:"name"`
RatingRuleVersionId string `json:"rating_rule_version_id,omitempty"`
Unit string `json:"unit,omitempty"`
}
PostV1MetersJSONBody defines parameters for PostV1Meters.
type PostV1MetersJSONBodyAggregation ¶
type PostV1MetersJSONBodyAggregation string
PostV1MetersJSONBodyAggregation defines parameters for PostV1Meters.
const ( PostV1MetersJSONBodyAggregationCount PostV1MetersJSONBodyAggregation = "count" PostV1MetersJSONBodyAggregationLast PostV1MetersJSONBodyAggregation = "last" PostV1MetersJSONBodyAggregationMax PostV1MetersJSONBodyAggregation = "max" PostV1MetersJSONBodyAggregationSum PostV1MetersJSONBodyAggregation = "sum" )
Defines values for PostV1MetersJSONBodyAggregation.
func (PostV1MetersJSONBodyAggregation) Valid ¶
func (e PostV1MetersJSONBodyAggregation) Valid() bool
Valid indicates whether the value is a known member of the PostV1MetersJSONBodyAggregation enum.
type PostV1MetersJSONRequestBody ¶
type PostV1MetersJSONRequestBody PostV1MetersJSONBody
PostV1MetersJSONRequestBody defines body for PostV1Meters for application/json ContentType.
type PostV1PlansJSONBody ¶
type PostV1PlansJSONBody struct {
BaseAmountCents int `json:"base_amount_cents,omitempty"`
// BaseBillTiming Optional. Defaults to in_arrears. See Plan.base_bill_timing
// for semantics (ADR-031).
BaseBillTiming PostV1PlansJSONBodyBaseBillTiming `json:"base_bill_timing,omitempty"`
BillingInterval PostV1PlansJSONBodyBillingInterval `json:"billing_interval"`
Code string `json:"code"`
Currency string `json:"currency"`
MeterIds []string `json:"meter_ids,omitempty"`
Name string `json:"name"`
}
PostV1PlansJSONBody defines parameters for PostV1Plans.
type PostV1PlansJSONBodyBaseBillTiming ¶
type PostV1PlansJSONBodyBaseBillTiming string
PostV1PlansJSONBodyBaseBillTiming defines parameters for PostV1Plans.
const ( InAdvance PostV1PlansJSONBodyBaseBillTiming = "in_advance" InArrears PostV1PlansJSONBodyBaseBillTiming = "in_arrears" )
Defines values for PostV1PlansJSONBodyBaseBillTiming.
func (PostV1PlansJSONBodyBaseBillTiming) Valid ¶
func (e PostV1PlansJSONBodyBaseBillTiming) Valid() bool
Valid indicates whether the value is a known member of the PostV1PlansJSONBodyBaseBillTiming enum.
type PostV1PlansJSONBodyBillingInterval ¶
type PostV1PlansJSONBodyBillingInterval string
PostV1PlansJSONBodyBillingInterval defines parameters for PostV1Plans.
const ( Monthly PostV1PlansJSONBodyBillingInterval = "monthly" Yearly PostV1PlansJSONBodyBillingInterval = "yearly" )
Defines values for PostV1PlansJSONBodyBillingInterval.
func (PostV1PlansJSONBodyBillingInterval) Valid ¶
func (e PostV1PlansJSONBodyBillingInterval) Valid() bool
Valid indicates whether the value is a known member of the PostV1PlansJSONBodyBillingInterval enum.
type PostV1PlansJSONRequestBody ¶
type PostV1PlansJSONRequestBody PostV1PlansJSONBody
PostV1PlansJSONRequestBody defines body for PostV1Plans for application/json ContentType.
type PostV1RatingRulesJSONBody ¶
type PostV1RatingRulesJSONBody struct {
Currency string `json:"currency"`
// FlatAmountCents Per-unit rate in cents, as a decimal string (e.g. "0.0003" = $3.00 per 1,000,000 units).
FlatAmountCents string `json:"flat_amount_cents,omitempty"`
GraduatedTiers []struct {
// UnitAmountCents Per-unit rate in cents, as a decimal string.
UnitAmountCents string `json:"unit_amount_cents,omitempty"`
UpTo int `json:"up_to,omitempty"`
} `json:"graduated_tiers,omitempty"`
Mode PostV1RatingRulesJSONBodyMode `json:"mode"`
Name string `json:"name"`
// OverageUnitAmountCents Package-mode per-unit overage rate in cents, as a decimal string. Fixed fees (package_amount_cents) stay integer cents.
OverageUnitAmountCents string `json:"overage_unit_amount_cents,omitempty"`
PackageAmountCents int `json:"package_amount_cents,omitempty"`
PackageSize int `json:"package_size,omitempty"`
RuleKey string `json:"rule_key"`
}
PostV1RatingRulesJSONBody defines parameters for PostV1RatingRules.
type PostV1RatingRulesJSONBodyMode ¶
type PostV1RatingRulesJSONBodyMode string
PostV1RatingRulesJSONBodyMode defines parameters for PostV1RatingRules.
const ( Flat PostV1RatingRulesJSONBodyMode = "flat" Graduated PostV1RatingRulesJSONBodyMode = "graduated" Package PostV1RatingRulesJSONBodyMode = "package" )
Defines values for PostV1RatingRulesJSONBodyMode.
func (PostV1RatingRulesJSONBodyMode) Valid ¶
func (e PostV1RatingRulesJSONBodyMode) Valid() bool
Valid indicates whether the value is a known member of the PostV1RatingRulesJSONBodyMode enum.
type PostV1RatingRulesJSONRequestBody ¶
type PostV1RatingRulesJSONRequestBody PostV1RatingRulesJSONBody
PostV1RatingRulesJSONRequestBody defines body for PostV1RatingRules for application/json ContentType.
type PostV1SubscriptionsJSONBody ¶
type PostV1SubscriptionsJSONBody struct {
BillingTime PostV1SubscriptionsJSONBodyBillingTime `json:"billing_time,omitempty"`
Code string `json:"code"`
CustomerId string `json:"customer_id"`
DisplayName string `json:"display_name"`
// Items Plan items — a subscription bills one or more plans.
Items []struct {
PlanId string `json:"plan_id"`
Quantity int `json:"quantity,omitempty"`
} `json:"items"`
StartNow bool `json:"start_now,omitempty"`
TrialDays int `json:"trial_days,omitempty"`
}
PostV1SubscriptionsJSONBody defines parameters for PostV1Subscriptions.
type PostV1SubscriptionsJSONBodyBillingTime ¶
type PostV1SubscriptionsJSONBodyBillingTime string
PostV1SubscriptionsJSONBodyBillingTime defines parameters for PostV1Subscriptions.
const ( PostV1SubscriptionsJSONBodyBillingTimeAnniversary PostV1SubscriptionsJSONBodyBillingTime = "anniversary" PostV1SubscriptionsJSONBodyBillingTimeCalendar PostV1SubscriptionsJSONBodyBillingTime = "calendar" )
Defines values for PostV1SubscriptionsJSONBodyBillingTime.
func (PostV1SubscriptionsJSONBodyBillingTime) Valid ¶
func (e PostV1SubscriptionsJSONBodyBillingTime) Valid() bool
Valid indicates whether the value is a known member of the PostV1SubscriptionsJSONBodyBillingTime enum.
type PostV1SubscriptionsJSONRequestBody ¶
type PostV1SubscriptionsJSONRequestBody PostV1SubscriptionsJSONBody
PostV1SubscriptionsJSONRequestBody defines body for PostV1Subscriptions for application/json ContentType.
type PostV1TestClocksIdAdvanceJSONBody ¶
PostV1TestClocksIdAdvanceJSONBody defines parameters for PostV1TestClocksIdAdvance.
type PostV1TestClocksIdAdvanceJSONRequestBody ¶
type PostV1TestClocksIdAdvanceJSONRequestBody PostV1TestClocksIdAdvanceJSONBody
PostV1TestClocksIdAdvanceJSONRequestBody defines body for PostV1TestClocksIdAdvance for application/json ContentType.
type PostV1TestClocksJSONBody ¶
type PostV1TestClocksJSONBody struct {
FrozenTime time.Time `json:"frozen_time"`
Name string `json:"name,omitempty"`
}
PostV1TestClocksJSONBody defines parameters for PostV1TestClocks.
type PostV1TestClocksJSONRequestBody ¶
type PostV1TestClocksJSONRequestBody PostV1TestClocksJSONBody
PostV1TestClocksJSONRequestBody defines body for PostV1TestClocks for application/json ContentType.
type PostV1UsageEventsBatchJSONBody ¶
type PostV1UsageEventsBatchJSONBody = []struct {
Dimensions map[string]interface{} `json:"dimensions,omitempty"`
// EventName The meter key (e.g. "tokens").
EventName string `json:"event_name"`
// ExternalCustomerId The customer's external_id (your identifier), not the internal vlx_cus_ id.
ExternalCustomerId string `json:"external_customer_id"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
// Quantity Decimal quantity — accepts a JSON number (5) or string ("5.5") for exact fractional values.
Quantity PostV1UsageEventsBatchJSONBody_Quantity `json:"quantity"`
Timestamp time.Time `json:"timestamp,omitempty"`
}
PostV1UsageEventsBatchJSONBody defines parameters for PostV1UsageEventsBatch.
type PostV1UsageEventsBatchJSONBodyQuantity0 ¶
type PostV1UsageEventsBatchJSONBodyQuantity0 = float32
PostV1UsageEventsBatchJSONBodyQuantity0 defines parameters for PostV1UsageEventsBatch.
type PostV1UsageEventsBatchJSONBodyQuantity1 ¶
type PostV1UsageEventsBatchJSONBodyQuantity1 = string
PostV1UsageEventsBatchJSONBodyQuantity1 defines parameters for PostV1UsageEventsBatch.
type PostV1UsageEventsBatchJSONBody_Quantity ¶
type PostV1UsageEventsBatchJSONBody_Quantity struct {
// contains filtered or unexported fields
}
PostV1UsageEventsBatchJSONBody_Quantity defines parameters for PostV1UsageEventsBatch.
func (PostV1UsageEventsBatchJSONBody_Quantity) AsPostV1UsageEventsBatchJSONBodyQuantity0 ¶ added in v0.2.0
func (t PostV1UsageEventsBatchJSONBody_Quantity) AsPostV1UsageEventsBatchJSONBodyQuantity0() (PostV1UsageEventsBatchJSONBodyQuantity0, error)
AsPostV1UsageEventsBatchJSONBodyQuantity0 returns the union data inside the PostV1UsageEventsBatchJSONBody_Quantity as a PostV1UsageEventsBatchJSONBodyQuantity0
func (PostV1UsageEventsBatchJSONBody_Quantity) AsPostV1UsageEventsBatchJSONBodyQuantity1 ¶ added in v0.2.0
func (t PostV1UsageEventsBatchJSONBody_Quantity) AsPostV1UsageEventsBatchJSONBodyQuantity1() (PostV1UsageEventsBatchJSONBodyQuantity1, error)
AsPostV1UsageEventsBatchJSONBodyQuantity1 returns the union data inside the PostV1UsageEventsBatchJSONBody_Quantity as a PostV1UsageEventsBatchJSONBodyQuantity1
func (*PostV1UsageEventsBatchJSONBody_Quantity) FromPostV1UsageEventsBatchJSONBodyQuantity0 ¶ added in v0.2.0
func (t *PostV1UsageEventsBatchJSONBody_Quantity) FromPostV1UsageEventsBatchJSONBodyQuantity0(v PostV1UsageEventsBatchJSONBodyQuantity0) error
FromPostV1UsageEventsBatchJSONBodyQuantity0 overwrites any union data inside the PostV1UsageEventsBatchJSONBody_Quantity as the provided PostV1UsageEventsBatchJSONBodyQuantity0
func (*PostV1UsageEventsBatchJSONBody_Quantity) FromPostV1UsageEventsBatchJSONBodyQuantity1 ¶ added in v0.2.0
func (t *PostV1UsageEventsBatchJSONBody_Quantity) FromPostV1UsageEventsBatchJSONBodyQuantity1(v PostV1UsageEventsBatchJSONBodyQuantity1) error
FromPostV1UsageEventsBatchJSONBodyQuantity1 overwrites any union data inside the PostV1UsageEventsBatchJSONBody_Quantity as the provided PostV1UsageEventsBatchJSONBodyQuantity1
func (PostV1UsageEventsBatchJSONBody_Quantity) MarshalJSON ¶ added in v0.2.0
func (t PostV1UsageEventsBatchJSONBody_Quantity) MarshalJSON() ([]byte, error)
func (*PostV1UsageEventsBatchJSONBody_Quantity) MergePostV1UsageEventsBatchJSONBodyQuantity0 ¶ added in v0.2.0
func (t *PostV1UsageEventsBatchJSONBody_Quantity) MergePostV1UsageEventsBatchJSONBodyQuantity0(v PostV1UsageEventsBatchJSONBodyQuantity0) error
MergePostV1UsageEventsBatchJSONBodyQuantity0 performs a merge with any union data inside the PostV1UsageEventsBatchJSONBody_Quantity, using the provided PostV1UsageEventsBatchJSONBodyQuantity0
func (*PostV1UsageEventsBatchJSONBody_Quantity) MergePostV1UsageEventsBatchJSONBodyQuantity1 ¶ added in v0.2.0
func (t *PostV1UsageEventsBatchJSONBody_Quantity) MergePostV1UsageEventsBatchJSONBodyQuantity1(v PostV1UsageEventsBatchJSONBodyQuantity1) error
MergePostV1UsageEventsBatchJSONBodyQuantity1 performs a merge with any union data inside the PostV1UsageEventsBatchJSONBody_Quantity, using the provided PostV1UsageEventsBatchJSONBodyQuantity1
func (*PostV1UsageEventsBatchJSONBody_Quantity) UnmarshalJSON ¶ added in v0.2.0
func (t *PostV1UsageEventsBatchJSONBody_Quantity) UnmarshalJSON(b []byte) error
type PostV1UsageEventsBatchJSONRequestBody ¶
type PostV1UsageEventsBatchJSONRequestBody = PostV1UsageEventsBatchJSONBody
PostV1UsageEventsBatchJSONRequestBody defines body for PostV1UsageEventsBatch for application/json ContentType.
type PostV1UsageEventsJSONBody ¶
type PostV1UsageEventsJSONBody struct {
// Dimensions Scalar dimension values used for pricing-rule dispatch (e.g. {"model", "token_type"}).
Dimensions map[string]interface{} `json:"dimensions,omitempty"`
// EventName The meter key (e.g. "tokens").
EventName string `json:"event_name"`
// ExternalCustomerId The customer's external_id (your identifier), not the internal vlx_cus_ id.
ExternalCustomerId string `json:"external_customer_id"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty"`
// Quantity Decimal quantity — accepts a JSON number (5) or string ("5.5") for exact fractional values.
Quantity PostV1UsageEventsJSONBody_Quantity `json:"quantity"`
Timestamp time.Time `json:"timestamp,omitempty"`
}
PostV1UsageEventsJSONBody defines parameters for PostV1UsageEvents.
type PostV1UsageEventsJSONBodyQuantity0 ¶
type PostV1UsageEventsJSONBodyQuantity0 = float32
PostV1UsageEventsJSONBodyQuantity0 defines parameters for PostV1UsageEvents.
type PostV1UsageEventsJSONBodyQuantity1 ¶
type PostV1UsageEventsJSONBodyQuantity1 = string
PostV1UsageEventsJSONBodyQuantity1 defines parameters for PostV1UsageEvents.
type PostV1UsageEventsJSONBody_Quantity ¶
type PostV1UsageEventsJSONBody_Quantity struct {
// contains filtered or unexported fields
}
PostV1UsageEventsJSONBody_Quantity defines parameters for PostV1UsageEvents.
func (PostV1UsageEventsJSONBody_Quantity) AsPostV1UsageEventsJSONBodyQuantity0 ¶ added in v0.2.0
func (t PostV1UsageEventsJSONBody_Quantity) AsPostV1UsageEventsJSONBodyQuantity0() (PostV1UsageEventsJSONBodyQuantity0, error)
AsPostV1UsageEventsJSONBodyQuantity0 returns the union data inside the PostV1UsageEventsJSONBody_Quantity as a PostV1UsageEventsJSONBodyQuantity0
func (PostV1UsageEventsJSONBody_Quantity) AsPostV1UsageEventsJSONBodyQuantity1 ¶ added in v0.2.0
func (t PostV1UsageEventsJSONBody_Quantity) AsPostV1UsageEventsJSONBodyQuantity1() (PostV1UsageEventsJSONBodyQuantity1, error)
AsPostV1UsageEventsJSONBodyQuantity1 returns the union data inside the PostV1UsageEventsJSONBody_Quantity as a PostV1UsageEventsJSONBodyQuantity1
func (*PostV1UsageEventsJSONBody_Quantity) FromPostV1UsageEventsJSONBodyQuantity0 ¶ added in v0.2.0
func (t *PostV1UsageEventsJSONBody_Quantity) FromPostV1UsageEventsJSONBodyQuantity0(v PostV1UsageEventsJSONBodyQuantity0) error
FromPostV1UsageEventsJSONBodyQuantity0 overwrites any union data inside the PostV1UsageEventsJSONBody_Quantity as the provided PostV1UsageEventsJSONBodyQuantity0
func (*PostV1UsageEventsJSONBody_Quantity) FromPostV1UsageEventsJSONBodyQuantity1 ¶ added in v0.2.0
func (t *PostV1UsageEventsJSONBody_Quantity) FromPostV1UsageEventsJSONBodyQuantity1(v PostV1UsageEventsJSONBodyQuantity1) error
FromPostV1UsageEventsJSONBodyQuantity1 overwrites any union data inside the PostV1UsageEventsJSONBody_Quantity as the provided PostV1UsageEventsJSONBodyQuantity1
func (PostV1UsageEventsJSONBody_Quantity) MarshalJSON ¶ added in v0.2.0
func (t PostV1UsageEventsJSONBody_Quantity) MarshalJSON() ([]byte, error)
func (*PostV1UsageEventsJSONBody_Quantity) MergePostV1UsageEventsJSONBodyQuantity0 ¶ added in v0.2.0
func (t *PostV1UsageEventsJSONBody_Quantity) MergePostV1UsageEventsJSONBodyQuantity0(v PostV1UsageEventsJSONBodyQuantity0) error
MergePostV1UsageEventsJSONBodyQuantity0 performs a merge with any union data inside the PostV1UsageEventsJSONBody_Quantity, using the provided PostV1UsageEventsJSONBodyQuantity0
func (*PostV1UsageEventsJSONBody_Quantity) MergePostV1UsageEventsJSONBodyQuantity1 ¶ added in v0.2.0
func (t *PostV1UsageEventsJSONBody_Quantity) MergePostV1UsageEventsJSONBodyQuantity1(v PostV1UsageEventsJSONBodyQuantity1) error
MergePostV1UsageEventsJSONBodyQuantity1 performs a merge with any union data inside the PostV1UsageEventsJSONBody_Quantity, using the provided PostV1UsageEventsJSONBodyQuantity1
func (*PostV1UsageEventsJSONBody_Quantity) UnmarshalJSON ¶ added in v0.2.0
func (t *PostV1UsageEventsJSONBody_Quantity) UnmarshalJSON(b []byte) error
type PostV1UsageEventsJSONRequestBody ¶
type PostV1UsageEventsJSONRequestBody PostV1UsageEventsJSONBody
PostV1UsageEventsJSONRequestBody defines body for PostV1UsageEvents for application/json ContentType.
type PostV1WebhookEndpointsEndpointsJSONBody ¶
type PostV1WebhookEndpointsEndpointsJSONBody struct {
Description string `json:"description,omitempty"`
Events []string `json:"events,omitempty"`
Url string `json:"url"`
}
PostV1WebhookEndpointsEndpointsJSONBody defines parameters for PostV1WebhookEndpointsEndpoints.
type PostV1WebhookEndpointsEndpointsJSONRequestBody ¶
type PostV1WebhookEndpointsEndpointsJSONRequestBody PostV1WebhookEndpointsEndpointsJSONBody
PostV1WebhookEndpointsEndpointsJSONRequestBody defines body for PostV1WebhookEndpointsEndpoints for application/json ContentType.
type PreviewRecipeJSONBody ¶ added in v0.2.0
type PreviewRecipeJSONBody struct {
Overrides map[string]interface{} `json:"overrides,omitempty"`
}
PreviewRecipeJSONBody defines parameters for PreviewRecipe.
type PreviewRecipeJSONRequestBody ¶ added in v0.2.0
type PreviewRecipeJSONRequestBody PreviewRecipeJSONBody
PreviewRecipeJSONRequestBody defines body for PreviewRecipe for application/json ContentType.
type ProviderCostRate ¶
type ProviderCostRate struct {
// CostPerToken Decimal dollars per token.
CostPerToken string `json:"cost_per_token"`
CreatedAt time.Time `json:"created_at,omitempty"`
Currency string `json:"currency"`
Id string `json:"id"`
Model string `json:"model"`
Provider string `json:"provider"`
TokenType string `json:"token_type"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
ProviderCostRate defines model for ProviderCostRate.
type PutV1ProviderCostsJSONBody ¶
type PutV1ProviderCostsJSONBody struct {
// CostPerToken Decimal dollars per token (e.g. "0.000003").
CostPerToken string `json:"cost_per_token"`
Currency string `json:"currency,omitempty"`
// Model Model family token or raw snapshot id — raw ids match first at ingest.
Model string `json:"model"`
Provider string `json:"provider"`
// TokenType ADR-044 role — input / output / cache_read.
TokenType string `json:"token_type"`
}
PutV1ProviderCostsJSONBody defines parameters for PutV1ProviderCosts.
type PutV1ProviderCostsJSONRequestBody ¶
type PutV1ProviderCostsJSONRequestBody PutV1ProviderCostsJSONBody
PutV1ProviderCostsJSONRequestBody defines body for PutV1ProviderCosts for application/json ContentType.
type RatingRule ¶
type RatingRule struct {
Currency string `json:"currency,omitempty"`
// FlatAmountCents Per-unit rate in cents, as a decimal string (e.g. "0.0003" = $3.00 per 1,000,000 units). Arbitrary precision; invoice line amounts and totals still round to whole cents.
FlatAmountCents string `json:"flat_amount_cents,omitempty"`
GraduatedTiers []struct {
// UnitAmountCents Per-unit rate in cents, as a decimal string (see flat_amount_cents).
UnitAmountCents string `json:"unit_amount_cents,omitempty"`
UpTo int `json:"up_to,omitempty"`
} `json:"graduated_tiers,omitempty"`
Id string `json:"id,omitempty"`
Mode RatingRuleMode `json:"mode,omitempty"`
Name string `json:"name,omitempty"`
RuleKey string `json:"rule_key,omitempty"`
Version int `json:"version,omitempty"`
}
RatingRule defines model for RatingRule.
type RatingRuleMode ¶
type RatingRuleMode string
RatingRuleMode defines model for RatingRule.Mode.
const ( RatingRuleModeFlat RatingRuleMode = "flat" RatingRuleModeGraduated RatingRuleMode = "graduated" RatingRuleModePackage RatingRuleMode = "package" )
Defines values for RatingRuleMode.
func (RatingRuleMode) Valid ¶
func (e RatingRuleMode) Valid() bool
Valid indicates whether the value is a known member of the RatingRuleMode enum.
type Recipe ¶ added in v0.2.0
type Recipe struct {
Description string `json:"description,omitempty"`
DunningPolicy RecipeDunningPolicy `json:"dunning_policy,omitempty"`
Key string `json:"key"`
Meters []RecipeMeter `json:"meters"`
Name string `json:"name"`
Overridable []RecipeOverride `json:"overridable"`
Plans []RecipePlan `json:"plans"`
PricingRules []RecipePricingRule `json:"pricing_rules"`
RatingRules []RecipeRatingRule `json:"rating_rules"`
Summary string `json:"summary"`
Version string `json:"version"`
Webhook RecipeWebhook `json:"webhook,omitempty"`
}
Recipe A recipe template as served by list/detail: the full parsed YAML (meters, rating rules, pricing rules, plans, optional dunning policy and webhook), not just display metadata.
type RecipeCreatedObjects ¶ added in v0.2.0
type RecipeCreatedObjects struct {
DunningPolicyId string `json:"dunning_policy_id,omitempty"`
MeterIds []string `json:"meter_ids,omitempty"`
PlanIds []string `json:"plan_ids,omitempty"`
PricingRuleIds []string `json:"pricing_rule_ids,omitempty"`
RatingRuleIds []string `json:"rating_rule_ids,omitempty"`
WebhookEndpointId string `json:"webhook_endpoint_id,omitempty"`
}
RecipeCreatedObjects Per-role map of entity IDs a recipe apply produced (including ADOPTED catalog objects — apply reconnects to an existing meter/rule graph rather than duplicating it, ADR-085). Every field is omitted when empty; clients must guard reads.
type RecipeCreates ¶ added in v0.2.0
type RecipeCreates struct {
DunningPolicies int `json:"dunning_policies"`
Meters int `json:"meters"`
Plans int `json:"plans"`
PricingRules int `json:"pricing_rules"`
RatingRules int `json:"rating_rules"`
WebhookEndpoints int `json:"webhook_endpoints"`
}
RecipeCreates Per-role count of objects a recipe will produce when instantiated. Recipes create no product entity — there is no `products` count.
type RecipeDetail ¶ added in v0.2.0
type RecipeDetail struct {
// Creates Per-role count of objects a recipe will produce when instantiated. Recipes create no product entity — there is no `products` count.
Creates RecipeCreates `json:"creates"`
Description string `json:"description,omitempty"`
DunningPolicy RecipeDunningPolicy `json:"dunning_policy,omitempty"`
Key string `json:"key"`
Meters []RecipeMeter `json:"meters"`
Name string `json:"name"`
Overridable []RecipeOverride `json:"overridable"`
Plans []RecipePlan `json:"plans"`
PricingRules []RecipePricingRule `json:"pricing_rules"`
RatingRules []RecipeRatingRule `json:"rating_rules"`
Summary string `json:"summary"`
Version string `json:"version"`
Webhook RecipeWebhook `json:"webhook,omitempty"`
}
RecipeDetail defines model for RecipeDetail.
type RecipeDunningPolicy ¶ added in v0.2.0
type RecipeDunningPolicy struct {
// FinalInvoiceAction What exhausting all retries does to the unpaid invoice. `mark_uncollectible` writes it off as bad debt — the receivable closes, the invoice stays on the books for audit, and it remains settleable out of band. `none` leaves it finalized and due, which means it stays open until a human closes or collects it.
// Independent of `final_subscription_action` (ADR-112): the two were one enum until 2026-08-05, which made "cancel and write off" inexpressible.
FinalInvoiceAction RecipeDunningPolicyFinalInvoiceAction `json:"final_invoice_action"`
// FinalSubscriptionAction What exhausting all retries does to the subscription behind the unpaid invoice. `pause` pauses collection only (the cycle keeps drafting invoices); `cancel` cancels the subscription. No-op on a one-off invoice, which has no subscription.
FinalSubscriptionAction RecipeDunningPolicyFinalSubscriptionAction `json:"final_subscription_action"`
IntervalsHours []int `json:"intervals_hours"`
MaxRetries int `json:"max_retries"`
Name string `json:"name"`
}
RecipeDunningPolicy defines model for RecipeDunningPolicy.
type RecipeDunningPolicyFinalInvoiceAction ¶ added in v0.2.0
type RecipeDunningPolicyFinalInvoiceAction string
RecipeDunningPolicyFinalInvoiceAction What exhausting all retries does to the unpaid invoice. `mark_uncollectible` writes it off as bad debt — the receivable closes, the invoice stays on the books for audit, and it remains settleable out of band. `none` leaves it finalized and due, which means it stays open until a human closes or collects it. Independent of `final_subscription_action` (ADR-112): the two were one enum until 2026-08-05, which made "cancel and write off" inexpressible.
const ( RecipeDunningPolicyFinalInvoiceActionMarkUncollectible RecipeDunningPolicyFinalInvoiceAction = "mark_uncollectible" RecipeDunningPolicyFinalInvoiceActionNone RecipeDunningPolicyFinalInvoiceAction = "none" )
Defines values for RecipeDunningPolicyFinalInvoiceAction.
func (RecipeDunningPolicyFinalInvoiceAction) Valid ¶ added in v0.2.0
func (e RecipeDunningPolicyFinalInvoiceAction) Valid() bool
Valid indicates whether the value is a known member of the RecipeDunningPolicyFinalInvoiceAction enum.
type RecipeDunningPolicyFinalSubscriptionAction ¶ added in v0.2.0
type RecipeDunningPolicyFinalSubscriptionAction string
RecipeDunningPolicyFinalSubscriptionAction What exhausting all retries does to the subscription behind the unpaid invoice. `pause` pauses collection only (the cycle keeps drafting invoices); `cancel` cancels the subscription. No-op on a one-off invoice, which has no subscription.
const ( RecipeDunningPolicyFinalSubscriptionActionCancel RecipeDunningPolicyFinalSubscriptionAction = "cancel" RecipeDunningPolicyFinalSubscriptionActionNone RecipeDunningPolicyFinalSubscriptionAction = "none" RecipeDunningPolicyFinalSubscriptionActionPause RecipeDunningPolicyFinalSubscriptionAction = "pause" )
Defines values for RecipeDunningPolicyFinalSubscriptionAction.
func (RecipeDunningPolicyFinalSubscriptionAction) Valid ¶ added in v0.2.0
func (e RecipeDunningPolicyFinalSubscriptionAction) Valid() bool
Valid indicates whether the value is a known member of the RecipeDunningPolicyFinalSubscriptionAction enum.
type RecipeInstance ¶ added in v0.2.0
type RecipeInstance struct {
CreatedAt time.Time `json:"created_at"`
// CreatedBy Operator email or API key ID. Omitted when empty.
CreatedBy string `json:"created_by,omitempty"`
// CreatedObjects Per-role map of entity IDs a recipe apply produced (including ADOPTED catalog objects — apply reconnects to an existing meter/rule graph rather than duplicating it, ADR-085). Every field is omitted when empty; clients must guard reads.
CreatedObjects RecipeCreatedObjects `json:"created_objects"`
Id string `json:"id"`
Overrides map[string]interface{} `json:"overrides"`
RecipeKey string `json:"recipe_key"`
RecipeVersion string `json:"recipe_version"`
// TenantId Omitted when empty.
TenantId string `json:"tenant_id,omitempty"`
}
RecipeInstance The install badge: the record of a recipe being applied for a tenant (scoped per livemode since m0157). Field names are `recipe_key` / `recipe_version` — NOT `key`/`version`, which the recipe template itself uses.
type RecipeListItem ¶ added in v0.2.0
type RecipeListItem struct {
// Creates Per-role count of objects a recipe will produce when instantiated. Recipes create no product entity — there is no `products` count.
Creates RecipeCreates `json:"creates"`
Description string `json:"description,omitempty"`
DunningPolicy RecipeDunningPolicy `json:"dunning_policy,omitempty"`
// Instantiated The install badge: the record of a recipe being applied for a tenant (scoped per livemode since m0157). Field names are `recipe_key` / `recipe_version` — NOT `key`/`version`, which the recipe template itself uses.
Instantiated RecipeInstance `json:"instantiated,omitempty"`
Key string `json:"key"`
Meters []RecipeMeter `json:"meters"`
Name string `json:"name"`
Overridable []RecipeOverride `json:"overridable"`
Plans []RecipePlan `json:"plans"`
PricingRules []RecipePricingRule `json:"pricing_rules"`
RatingRules []RecipeRatingRule `json:"rating_rules"`
Summary string `json:"summary"`
Version string `json:"version"`
Webhook RecipeWebhook `json:"webhook,omitempty"`
}
RecipeListItem defines model for RecipeListItem.
type RecipeMeter ¶ added in v0.2.0
type RecipeMeter struct {
Aggregation string `json:"aggregation"`
Key string `json:"key"`
Name string `json:"name"`
Unit string `json:"unit"`
}
RecipeMeter defines model for RecipeMeter.
type RecipeOverride ¶ added in v0.2.0
type RecipeOverride struct {
// Default Default value applied when the override is not supplied.
Default interface{} `json:"default"`
Enum []string `json:"enum,omitempty"`
Key string `json:"key"`
MaxLength int `json:"max_length,omitempty"`
Pattern string `json:"pattern,omitempty"`
Type RecipeOverrideType `json:"type"`
}
RecipeOverride One override key declared in a recipe's `overridable` list. Drives validation at instantiate time and the override form in the dashboard's preview dialog.
type RecipeOverrideType ¶ added in v0.2.0
type RecipeOverrideType string
RecipeOverrideType defines model for RecipeOverride.Type.
const ( Int RecipeOverrideType = "int" String RecipeOverrideType = "string" )
Defines values for RecipeOverrideType.
func (RecipeOverrideType) Valid ¶ added in v0.2.0
func (e RecipeOverrideType) Valid() bool
Valid indicates whether the value is a known member of the RecipeOverrideType enum.
type RecipePlan ¶ added in v0.2.0
type RecipePlan struct {
BaseAmountCents int64 `json:"base_amount_cents"`
// BaseBillTiming Optional; empty defaults to in_arrears at plan creation (ADR-031).
BaseBillTiming RecipePlanBaseBillTiming `json:"base_bill_timing,omitempty"`
BillingInterval RecipePlanBillingInterval `json:"billing_interval"`
Code string `json:"code"`
Currency string `json:"currency"`
MeterKeys []string `json:"meter_keys"`
Name string `json:"name"`
}
RecipePlan defines model for RecipePlan.
type RecipePlanBaseBillTiming ¶ added in v0.2.0
type RecipePlanBaseBillTiming string
RecipePlanBaseBillTiming Optional; empty defaults to in_arrears at plan creation (ADR-031).
const ( RecipePlanBaseBillTimingInAdvance RecipePlanBaseBillTiming = "in_advance" RecipePlanBaseBillTimingInArrears RecipePlanBaseBillTiming = "in_arrears" )
Defines values for RecipePlanBaseBillTiming.
func (RecipePlanBaseBillTiming) Valid ¶ added in v0.2.0
func (e RecipePlanBaseBillTiming) Valid() bool
Valid indicates whether the value is a known member of the RecipePlanBaseBillTiming enum.
type RecipePlanBillingInterval ¶ added in v0.2.0
type RecipePlanBillingInterval string
RecipePlanBillingInterval defines model for RecipePlan.BillingInterval.
const ( RecipePlanBillingIntervalMonthly RecipePlanBillingInterval = "monthly" RecipePlanBillingIntervalYearly RecipePlanBillingInterval = "yearly" )
Defines values for RecipePlanBillingInterval.
func (RecipePlanBillingInterval) Valid ¶ added in v0.2.0
func (e RecipePlanBillingInterval) Valid() bool
Valid indicates whether the value is a known member of the RecipePlanBillingInterval enum.
type RecipePreviewObjects ¶ added in v0.2.0
type RecipePreviewObjects struct {
DunningPolicies []RecipeDunningPolicy `json:"dunning_policies"`
Meters []RecipeMeter `json:"meters"`
Plans []RecipePlan `json:"plans"`
PricingRules []RecipePricingRule `json:"pricing_rules"`
RatingRules []RecipeRatingRule `json:"rating_rules"`
WebhookEndpoints []RecipeWebhook `json:"webhook_endpoints"`
}
RecipePreviewObjects Would-be-created object graph, grouped by role. All arrays are always present (possibly empty); optional singletons (dunning, webhook) are emitted as 0-or-1-length arrays so clients iterate without null guards.
type RecipePreviewResult ¶ added in v0.2.0
type RecipePreviewResult struct {
Key string `json:"key"`
// Objects Would-be-created object graph, grouped by role. All arrays are always present (possibly empty); optional singletons (dunning, webhook) are emitted as 0-or-1-length arrays so clients iterate without null guards.
Objects RecipePreviewObjects `json:"objects"`
Version string `json:"version"`
Warnings []string `json:"warnings"`
}
RecipePreviewResult defines model for RecipePreviewResult.
type RecipePricingRule ¶ added in v0.2.0
type RecipePricingRule struct {
AggregationMode RecipePricingRuleAggregationMode `json:"aggregation_mode"`
DimensionMatch map[string]interface{} `json:"dimension_match"`
MeterKey string `json:"meter_key"`
Priority int `json:"priority"`
RatingRuleKey string `json:"rating_rule_key"`
}
RecipePricingRule defines model for RecipePricingRule.
type RecipePricingRuleAggregationMode ¶ added in v0.2.0
type RecipePricingRuleAggregationMode string
RecipePricingRuleAggregationMode defines model for RecipePricingRule.AggregationMode.
const ( RecipePricingRuleAggregationModeCount RecipePricingRuleAggregationMode = "count" RecipePricingRuleAggregationModeLastDuringPeriod RecipePricingRuleAggregationMode = "last_during_period" RecipePricingRuleAggregationModeLastEver RecipePricingRuleAggregationMode = "last_ever" RecipePricingRuleAggregationModeMax RecipePricingRuleAggregationMode = "max" RecipePricingRuleAggregationModeSum RecipePricingRuleAggregationMode = "sum" )
Defines values for RecipePricingRuleAggregationMode.
func (RecipePricingRuleAggregationMode) Valid ¶ added in v0.2.0
func (e RecipePricingRuleAggregationMode) Valid() bool
Valid indicates whether the value is a known member of the RecipePricingRuleAggregationMode enum.
type RecipeRatingRule ¶ added in v0.2.0
type RecipeRatingRule struct {
Currency string `json:"currency"`
// FlatAmountCents Per-unit rate in cents, as a decimal string (see RatingRule.flat_amount_cents).
FlatAmountCents string `json:"flat_amount_cents"`
GraduatedTiers []struct {
// UnitAmountCents Per-unit rate in cents, as a decimal string.
UnitAmountCents string `json:"unit_amount_cents,omitempty"`
UpTo int `json:"up_to,omitempty"`
} `json:"graduated_tiers,omitempty"`
Key string `json:"key"`
Mode RecipeRatingRuleMode `json:"mode"`
Name string `json:"name,omitempty"`
// OverageUnitAmountCents Per-unit overage rate in cents, as a decimal string.
OverageUnitAmountCents string `json:"overage_unit_amount_cents"`
PackageAmountCents int64 `json:"package_amount_cents,omitempty"`
PackageSize int64 `json:"package_size,omitempty"`
}
RecipeRatingRule defines model for RecipeRatingRule.
type RecipeRatingRuleMode ¶ added in v0.2.0
type RecipeRatingRuleMode string
RecipeRatingRuleMode defines model for RecipeRatingRule.Mode.
const ( RecipeRatingRuleModeFlat RecipeRatingRuleMode = "flat" RecipeRatingRuleModeGraduated RecipeRatingRuleMode = "graduated" RecipeRatingRuleModePackage RecipeRatingRuleMode = "package" )
Defines values for RecipeRatingRuleMode.
func (RecipeRatingRuleMode) Valid ¶ added in v0.2.0
func (e RecipeRatingRuleMode) Valid() bool
Valid indicates whether the value is a known member of the RecipeRatingRuleMode enum.
type RecipeWebhook ¶ added in v0.2.0
type RecipeWebhook struct {
Events []string `json:"events"`
UrlPlaceholder string `json:"url_placeholder"`
}
RecipeWebhook defines model for RecipeWebhook.
type RecoveryWarning ¶ added in v0.2.0
type RecoveryWarning struct {
// Blocked Always false — this shape only ever warns.
Blocked bool `json:"blocked"`
Code RecoveryWarningCode `json:"code,omitempty"`
// Message Operator-facing sentence naming the consequence that will go unreconciled if the payment is recorded.
Message string `json:"message,omitempty"`
}
RecoveryWarning What an operator must know BEFORE recording an OFFLINE payment on a written-off invoice (`status = uncollectible`) — a consequence that will go unreconciled, never a refusal. The money already arrived, and refusing to record it would only make the books wrong too.
A written-off invoice is settled by RECORDING writers only — an offline payment, or the provider-search reconciler adopting a charge that turns out to have succeeded (ADR-108). Nothing initiates a card charge against one (ADR-113): recovery of a returned customer runs on normal rails via a fresh recovery invoice.
`tax_reversed_unrecoverable` — the invoice's tax was reversed with the tax provider and cannot be re-reported automatically; the recorded payment collects tax already reported as not collected. `recovery_superseded` — the invoice was billed on a usage threshold and that usage has since been re-billed; the payment double-collects. `relief_not_reissued` — a credit the invoice was owed was never applied, so `amount_due_cents` is higher than what is owed and the customer may have overpaid.
type RecoveryWarningCode ¶ added in v0.2.0
type RecoveryWarningCode string
RecoveryWarningCode defines model for RecoveryWarning.Code.
const ( RecoverySuperseded RecoveryWarningCode = "recovery_superseded" ReliefNotReissued RecoveryWarningCode = "relief_not_reissued" TaxReversedUnrecoverable RecoveryWarningCode = "tax_reversed_unrecoverable" )
Defines values for RecoveryWarningCode.
func (RecoveryWarningCode) Valid ¶ added in v0.2.0
func (e RecoveryWarningCode) Valid() bool
Valid indicates whether the value is a known member of the RecoveryWarningCode enum.
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServerInterface ¶
type ServerInterface interface {
// Health check
// (GET /health)
GetHealth(w http.ResponseWriter, r *http.Request)
// Accept a team invitation
// (POST /v1/auth/accept-invite)
PostV1AuthAcceptInvite(w http.ResponseWriter, r *http.Request)
// Preview a team invitation (accept-page context)
// (GET /v1/auth/invite/{token})
GetV1AuthInviteToken(w http.ResponseWriter, r *http.Request, token string)
// Sign in with email and password; mint an httpOnly session cookie
// (POST /v1/auth/login)
PostV1AuthLogin(w http.ResponseWriter, r *http.Request)
// Revoke the current session and clear the cookie
// (POST /v1/auth/logout)
PostV1AuthLogout(w http.ResponseWriter, r *http.Request)
// Switch the dashboard session between test and live mode
// (POST /v1/auth/mode)
PostV1AuthMode(w http.ResponseWriter, r *http.Request)
// Set a new password using a reset token
// (POST /v1/auth/password-reset/confirm)
PostV1AuthPasswordResetConfirm(w http.ResponseWriter, r *http.Request)
// Request a password reset link
// (POST /v1/auth/password-reset/request)
PostV1AuthPasswordResetRequest(w http.ResponseWriter, r *http.Request)
// Invoice preview (dry run)
// (GET /v1/billing/preview/{subscription_id})
GetV1BillingPreviewSubscriptionId(w http.ResponseWriter, r *http.Request, subscriptionId string)
// Trigger billing cycle
// (POST /v1/billing/run)
PostV1BillingRun(w http.ResponseWriter, r *http.Request)
// Create a credit note (line-based, or commit relief)
// (POST /v1/credit-notes)
PostV1CreditNotes(w http.ResponseWriter, r *http.Request)
// Email the credit-note document (PDF attached)
// (POST /v1/credit-notes/{id}/send)
PostV1CreditNotesIdSend(w http.ResponseWriter, r *http.Request, id string)
// Get customer credit balance
// (GET /v1/credits/balance/{customer_id})
GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request, customerId string)
// Grant credits to customer
// (POST /v1/credits/grant)
PostV1CreditsGrant(w http.ResponseWriter, r *http.Request)
// Per-grant burndown + kind subtotals
// (GET /v1/credits/grants/{customer_id})
GetV1CreditsGrantsCustomerId(w http.ResponseWriter, r *http.Request, customerId string, params GetV1CreditsGrantsCustomerIdParams)
// List customers
// (GET /v1/customers)
GetV1Customers(w http.ResponseWriter, r *http.Request, params GetV1CustomersParams)
// Create customer
// (POST /v1/customers)
PostV1Customers(w http.ResponseWriter, r *http.Request)
// Per-customer margin report (operator only)
// (GET /v1/customers/{id}/margin)
GetV1CustomersIdMargin(w http.ResponseWriter, r *http.Request, id string, params GetV1CustomersIdMarginParams)
// Rotate the public cost-dashboard token (ADR-032)
// (POST /v1/customers/{id}/rotate-cost-dashboard-token)
PostV1CustomersIdRotateCostDashboardToken(w http.ResponseWriter, r *http.Request, id string)
// List invoices
// (GET /v1/invoices)
GetV1Invoices(w http.ResponseWriter, r *http.Request, params GetV1InvoicesParams)
// Preview the next invoice for a customer (Stripe-equivalent)
// (POST /v1/invoices/create_preview)
PostV1InvoicesCreatePreview(w http.ResponseWriter, r *http.Request)
// Get invoice with line items
// (GET /v1/invoices/{id})
GetInvoice(w http.ResponseWriter, r *http.Request, id string)
// Finalize draft invoice
// (POST /v1/invoices/{id}/finalize)
PostV1InvoicesIdFinalize(w http.ResponseWriter, r *http.Request, id string)
// Download invoice PDF
// (GET /v1/invoices/{id}/pdf)
GetV1InvoicesIdPdf(w http.ResponseWriter, r *http.Request, id string)
// Retry tax calculation on a deferred invoice
// (POST /v1/invoices/{id}/retry-tax)
PostV1InvoicesIdRetryTax(w http.ResponseWriter, r *http.Request, id string)
// Email the invoice (PDF attached) to a recipient
// (POST /v1/invoices/{id}/send)
PostV1InvoicesIdSend(w http.ResponseWriter, r *http.Request, id string)
// List workspace members and invitations
// (GET /v1/members/)
GetV1Members(w http.ResponseWriter, r *http.Request)
// Revoke a pending invitation
// (DELETE /v1/members/invitations/{id})
DeleteV1MembersInvitationsId(w http.ResponseWriter, r *http.Request, id string)
// Invite a teammate by email
// (POST /v1/members/invite)
PostV1MembersInvite(w http.ResponseWriter, r *http.Request)
// Remove a member from the workspace
// (DELETE /v1/members/{user_id})
DeleteV1MembersUserId(w http.ResponseWriter, r *http.Request, userId string)
// List meters
// (GET /v1/meters)
GetV1Meters(w http.ResponseWriter, r *http.Request)
// Create meter
// (POST /v1/meters)
PostV1Meters(w http.ResponseWriter, r *http.Request)
// Update meter (incl. the default rating-rule binding)
// (PATCH /v1/meters/{id})
PatchV1MetersId(w http.ResponseWriter, r *http.Request, id string)
// List plans
// (GET /v1/plans)
GetV1Plans(w http.ResponseWriter, r *http.Request)
// Create plan
// (POST /v1/plans)
PostV1Plans(w http.ResponseWriter, r *http.Request)
// List provider cost rates
// (GET /v1/provider-costs)
GetV1ProviderCosts(w http.ResponseWriter, r *http.Request)
// Create or update a provider cost rate
// (PUT /v1/provider-costs)
PutV1ProviderCosts(w http.ResponseWriter, r *http.Request)
// Delete a provider cost rate
// (DELETE /v1/provider-costs/{id})
DeleteV1ProviderCostsId(w http.ResponseWriter, r *http.Request, id string)
// Public cost-dashboard projection (ADR-032)
// (GET /v1/public/cost-dashboard/{token})
GetV1PublicCostDashboardToken(w http.ResponseWriter, r *http.Request, token string)
// List rating rules
// (GET /v1/rating-rules)
GetV1RatingRules(w http.ResponseWriter, r *http.Request)
// Create rating rule
// (POST /v1/rating-rules)
PostV1RatingRules(w http.ResponseWriter, r *http.Request)
// List recipes
// (GET /v1/recipes)
ListRecipes(w http.ResponseWriter, r *http.Request)
// List installed recipe instances
// (GET /v1/recipes/instances)
ListRecipeInstances(w http.ResponseWriter, r *http.Request)
// Get recipe
// (GET /v1/recipes/{key})
GetRecipe(w http.ResponseWriter, r *http.Request, key string)
// Instantiate recipe (idempotent apply)
// (POST /v1/recipes/{key}/instantiate)
InstantiateRecipe(w http.ResponseWriter, r *http.Request, key string)
// Preview recipe
// (POST /v1/recipes/{key}/preview)
PreviewRecipe(w http.ResponseWriter, r *http.Request, key string)
// List subscriptions
// (GET /v1/subscriptions)
GetV1Subscriptions(w http.ResponseWriter, r *http.Request, params GetV1SubscriptionsParams)
// Create subscription
// (POST /v1/subscriptions)
PostV1Subscriptions(w http.ResponseWriter, r *http.Request)
// Activate draft subscription
// (POST /v1/subscriptions/{id}/activate)
PostV1SubscriptionsIdActivate(w http.ResponseWriter, r *http.Request, id string)
// List test clocks for the active tenant
// (GET /v1/test-clocks)
GetV1TestClocks(w http.ResponseWriter, r *http.Request)
// Create a test clock
// (POST /v1/test-clocks)
PostV1TestClocks(w http.ResponseWriter, r *http.Request)
// Delete a test clock (cascades to pinned subscriptions)
// (DELETE /v1/test-clocks/{id})
DeleteV1TestClocksId(w http.ResponseWriter, r *http.Request, id string)
// Get a test clock by id
// (GET /v1/test-clocks/{id})
GetV1TestClocksId(w http.ResponseWriter, r *http.Request, id string)
// Advance the clock to a new frozen_time
// (POST /v1/test-clocks/{id}/advance)
PostV1TestClocksIdAdvance(w http.ResponseWriter, r *http.Request, id string)
// Retry catchup on a clock parked in internal_failure
// (POST /v1/test-clocks/{id}/retry-advance)
PostV1TestClocksIdRetryAdvance(w http.ResponseWriter, r *http.Request, id string)
// List subscriptions pinned to this clock
// (GET /v1/test-clocks/{id}/subscriptions)
GetV1TestClocksIdSubscriptions(w http.ResponseWriter, r *http.Request, id string)
// List usage events
// (GET /v1/usage-events)
GetV1UsageEvents(w http.ResponseWriter, r *http.Request, params GetV1UsageEventsParams)
// Ingest usage event
// (POST /v1/usage-events)
PostV1UsageEvents(w http.ResponseWriter, r *http.Request)
// Batch ingest usage events (max 1000, all-or-nothing)
// (POST /v1/usage-events/batch)
PostV1UsageEventsBatch(w http.ResponseWriter, r *http.Request)
// List webhook endpoints
// (GET /v1/webhook-endpoints/endpoints)
GetV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
// Create webhook endpoint
// (POST /v1/webhook-endpoints/endpoints)
PostV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
// Delete (disable) webhook endpoint
// (DELETE /v1/webhook-endpoints/endpoints/{id})
DeleteV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request, id string)
// Update webhook endpoint (no secret rotation)
// (PATCH /v1/webhook-endpoints/endpoints/{id})
PatchV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request, id string)
// Rotate signing secret (72h dual-signing grace)
// (POST /v1/webhook-endpoints/endpoints/{id}/rotate-secret)
PostV1WebhookEndpointsEndpointsIdRotateSecret(w http.ResponseWriter, r *http.Request, id string)
// List recent outbound events (newest 50)
// (GET /v1/webhook-endpoints/events)
GetV1WebhookEndpointsEvents(w http.ResponseWriter, r *http.Request)
// Resolve the current credential to its tenant context
// (GET /v1/whoami)
GetV1Whoami(w http.ResponseWriter, r *http.Request)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) DeleteV1MembersInvitationsId ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) DeleteV1MembersInvitationsId(w http.ResponseWriter, r *http.Request)
DeleteV1MembersInvitationsId operation middleware
func (*ServerInterfaceWrapper) DeleteV1MembersUserId ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) DeleteV1MembersUserId(w http.ResponseWriter, r *http.Request)
DeleteV1MembersUserId operation middleware
func (*ServerInterfaceWrapper) DeleteV1ProviderCostsId ¶
func (siw *ServerInterfaceWrapper) DeleteV1ProviderCostsId(w http.ResponseWriter, r *http.Request)
DeleteV1ProviderCostsId operation middleware
func (*ServerInterfaceWrapper) DeleteV1TestClocksId ¶
func (siw *ServerInterfaceWrapper) DeleteV1TestClocksId(w http.ResponseWriter, r *http.Request)
DeleteV1TestClocksId operation middleware
func (*ServerInterfaceWrapper) DeleteV1WebhookEndpointsEndpointsId ¶
func (siw *ServerInterfaceWrapper) DeleteV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request)
DeleteV1WebhookEndpointsEndpointsId operation middleware
func (*ServerInterfaceWrapper) GetHealth ¶
func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
GetHealth operation middleware
func (*ServerInterfaceWrapper) GetInvoice ¶
func (siw *ServerInterfaceWrapper) GetInvoice(w http.ResponseWriter, r *http.Request)
GetInvoice operation middleware
func (*ServerInterfaceWrapper) GetRecipe ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) GetRecipe(w http.ResponseWriter, r *http.Request)
GetRecipe operation middleware
func (*ServerInterfaceWrapper) GetV1AuthInviteToken ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) GetV1AuthInviteToken(w http.ResponseWriter, r *http.Request)
GetV1AuthInviteToken operation middleware
func (*ServerInterfaceWrapper) GetV1BillingPreviewSubscriptionId ¶
func (siw *ServerInterfaceWrapper) GetV1BillingPreviewSubscriptionId(w http.ResponseWriter, r *http.Request)
GetV1BillingPreviewSubscriptionId operation middleware
func (*ServerInterfaceWrapper) GetV1CreditsBalanceCustomerId ¶
func (siw *ServerInterfaceWrapper) GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request)
GetV1CreditsBalanceCustomerId operation middleware
func (*ServerInterfaceWrapper) GetV1CreditsGrantsCustomerId ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) GetV1CreditsGrantsCustomerId(w http.ResponseWriter, r *http.Request)
GetV1CreditsGrantsCustomerId operation middleware
func (*ServerInterfaceWrapper) GetV1Customers ¶
func (siw *ServerInterfaceWrapper) GetV1Customers(w http.ResponseWriter, r *http.Request)
GetV1Customers operation middleware
func (*ServerInterfaceWrapper) GetV1CustomersIdMargin ¶
func (siw *ServerInterfaceWrapper) GetV1CustomersIdMargin(w http.ResponseWriter, r *http.Request)
GetV1CustomersIdMargin operation middleware
func (*ServerInterfaceWrapper) GetV1Invoices ¶
func (siw *ServerInterfaceWrapper) GetV1Invoices(w http.ResponseWriter, r *http.Request)
GetV1Invoices operation middleware
func (*ServerInterfaceWrapper) GetV1InvoicesIdPdf ¶
func (siw *ServerInterfaceWrapper) GetV1InvoicesIdPdf(w http.ResponseWriter, r *http.Request)
GetV1InvoicesIdPdf operation middleware
func (*ServerInterfaceWrapper) GetV1Members ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) GetV1Members(w http.ResponseWriter, r *http.Request)
GetV1Members operation middleware
func (*ServerInterfaceWrapper) GetV1Meters ¶
func (siw *ServerInterfaceWrapper) GetV1Meters(w http.ResponseWriter, r *http.Request)
GetV1Meters operation middleware
func (*ServerInterfaceWrapper) GetV1Plans ¶
func (siw *ServerInterfaceWrapper) GetV1Plans(w http.ResponseWriter, r *http.Request)
GetV1Plans operation middleware
func (*ServerInterfaceWrapper) GetV1ProviderCosts ¶
func (siw *ServerInterfaceWrapper) GetV1ProviderCosts(w http.ResponseWriter, r *http.Request)
GetV1ProviderCosts operation middleware
func (*ServerInterfaceWrapper) GetV1PublicCostDashboardToken ¶
func (siw *ServerInterfaceWrapper) GetV1PublicCostDashboardToken(w http.ResponseWriter, r *http.Request)
GetV1PublicCostDashboardToken operation middleware
func (*ServerInterfaceWrapper) GetV1RatingRules ¶
func (siw *ServerInterfaceWrapper) GetV1RatingRules(w http.ResponseWriter, r *http.Request)
GetV1RatingRules operation middleware
func (*ServerInterfaceWrapper) GetV1Subscriptions ¶
func (siw *ServerInterfaceWrapper) GetV1Subscriptions(w http.ResponseWriter, r *http.Request)
GetV1Subscriptions operation middleware
func (*ServerInterfaceWrapper) GetV1TestClocks ¶
func (siw *ServerInterfaceWrapper) GetV1TestClocks(w http.ResponseWriter, r *http.Request)
GetV1TestClocks operation middleware
func (*ServerInterfaceWrapper) GetV1TestClocksId ¶
func (siw *ServerInterfaceWrapper) GetV1TestClocksId(w http.ResponseWriter, r *http.Request)
GetV1TestClocksId operation middleware
func (*ServerInterfaceWrapper) GetV1TestClocksIdSubscriptions ¶
func (siw *ServerInterfaceWrapper) GetV1TestClocksIdSubscriptions(w http.ResponseWriter, r *http.Request)
GetV1TestClocksIdSubscriptions operation middleware
func (*ServerInterfaceWrapper) GetV1UsageEvents ¶
func (siw *ServerInterfaceWrapper) GetV1UsageEvents(w http.ResponseWriter, r *http.Request)
GetV1UsageEvents operation middleware
func (*ServerInterfaceWrapper) GetV1WebhookEndpointsEndpoints ¶
func (siw *ServerInterfaceWrapper) GetV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
GetV1WebhookEndpointsEndpoints operation middleware
func (*ServerInterfaceWrapper) GetV1WebhookEndpointsEvents ¶
func (siw *ServerInterfaceWrapper) GetV1WebhookEndpointsEvents(w http.ResponseWriter, r *http.Request)
GetV1WebhookEndpointsEvents operation middleware
func (*ServerInterfaceWrapper) GetV1Whoami ¶
func (siw *ServerInterfaceWrapper) GetV1Whoami(w http.ResponseWriter, r *http.Request)
GetV1Whoami operation middleware
func (*ServerInterfaceWrapper) InstantiateRecipe ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) InstantiateRecipe(w http.ResponseWriter, r *http.Request)
InstantiateRecipe operation middleware
func (*ServerInterfaceWrapper) ListRecipeInstances ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) ListRecipeInstances(w http.ResponseWriter, r *http.Request)
ListRecipeInstances operation middleware
func (*ServerInterfaceWrapper) ListRecipes ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) ListRecipes(w http.ResponseWriter, r *http.Request)
ListRecipes operation middleware
func (*ServerInterfaceWrapper) PatchV1MetersId ¶
func (siw *ServerInterfaceWrapper) PatchV1MetersId(w http.ResponseWriter, r *http.Request)
PatchV1MetersId operation middleware
func (*ServerInterfaceWrapper) PatchV1WebhookEndpointsEndpointsId ¶
func (siw *ServerInterfaceWrapper) PatchV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request)
PatchV1WebhookEndpointsEndpointsId operation middleware
func (*ServerInterfaceWrapper) PostV1AuthAcceptInvite ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) PostV1AuthAcceptInvite(w http.ResponseWriter, r *http.Request)
PostV1AuthAcceptInvite operation middleware
func (*ServerInterfaceWrapper) PostV1AuthLogin ¶
func (siw *ServerInterfaceWrapper) PostV1AuthLogin(w http.ResponseWriter, r *http.Request)
PostV1AuthLogin operation middleware
func (*ServerInterfaceWrapper) PostV1AuthLogout ¶
func (siw *ServerInterfaceWrapper) PostV1AuthLogout(w http.ResponseWriter, r *http.Request)
PostV1AuthLogout operation middleware
func (*ServerInterfaceWrapper) PostV1AuthMode ¶
func (siw *ServerInterfaceWrapper) PostV1AuthMode(w http.ResponseWriter, r *http.Request)
PostV1AuthMode operation middleware
func (*ServerInterfaceWrapper) PostV1AuthPasswordResetConfirm ¶
func (siw *ServerInterfaceWrapper) PostV1AuthPasswordResetConfirm(w http.ResponseWriter, r *http.Request)
PostV1AuthPasswordResetConfirm operation middleware
func (*ServerInterfaceWrapper) PostV1AuthPasswordResetRequest ¶
func (siw *ServerInterfaceWrapper) PostV1AuthPasswordResetRequest(w http.ResponseWriter, r *http.Request)
PostV1AuthPasswordResetRequest operation middleware
func (*ServerInterfaceWrapper) PostV1BillingRun ¶
func (siw *ServerInterfaceWrapper) PostV1BillingRun(w http.ResponseWriter, r *http.Request)
PostV1BillingRun operation middleware
func (*ServerInterfaceWrapper) PostV1CreditNotes ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) PostV1CreditNotes(w http.ResponseWriter, r *http.Request)
PostV1CreditNotes operation middleware
func (*ServerInterfaceWrapper) PostV1CreditNotesIdSend ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) PostV1CreditNotesIdSend(w http.ResponseWriter, r *http.Request)
PostV1CreditNotesIdSend operation middleware
func (*ServerInterfaceWrapper) PostV1CreditsGrant ¶
func (siw *ServerInterfaceWrapper) PostV1CreditsGrant(w http.ResponseWriter, r *http.Request)
PostV1CreditsGrant operation middleware
func (*ServerInterfaceWrapper) PostV1Customers ¶
func (siw *ServerInterfaceWrapper) PostV1Customers(w http.ResponseWriter, r *http.Request)
PostV1Customers operation middleware
func (*ServerInterfaceWrapper) PostV1CustomersIdRotateCostDashboardToken ¶
func (siw *ServerInterfaceWrapper) PostV1CustomersIdRotateCostDashboardToken(w http.ResponseWriter, r *http.Request)
PostV1CustomersIdRotateCostDashboardToken operation middleware
func (*ServerInterfaceWrapper) PostV1InvoicesCreatePreview ¶
func (siw *ServerInterfaceWrapper) PostV1InvoicesCreatePreview(w http.ResponseWriter, r *http.Request)
PostV1InvoicesCreatePreview operation middleware
func (*ServerInterfaceWrapper) PostV1InvoicesIdFinalize ¶
func (siw *ServerInterfaceWrapper) PostV1InvoicesIdFinalize(w http.ResponseWriter, r *http.Request)
PostV1InvoicesIdFinalize operation middleware
func (*ServerInterfaceWrapper) PostV1InvoicesIdRetryTax ¶
func (siw *ServerInterfaceWrapper) PostV1InvoicesIdRetryTax(w http.ResponseWriter, r *http.Request)
PostV1InvoicesIdRetryTax operation middleware
func (*ServerInterfaceWrapper) PostV1InvoicesIdSend ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) PostV1InvoicesIdSend(w http.ResponseWriter, r *http.Request)
PostV1InvoicesIdSend operation middleware
func (*ServerInterfaceWrapper) PostV1MembersInvite ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) PostV1MembersInvite(w http.ResponseWriter, r *http.Request)
PostV1MembersInvite operation middleware
func (*ServerInterfaceWrapper) PostV1Meters ¶
func (siw *ServerInterfaceWrapper) PostV1Meters(w http.ResponseWriter, r *http.Request)
PostV1Meters operation middleware
func (*ServerInterfaceWrapper) PostV1Plans ¶
func (siw *ServerInterfaceWrapper) PostV1Plans(w http.ResponseWriter, r *http.Request)
PostV1Plans operation middleware
func (*ServerInterfaceWrapper) PostV1RatingRules ¶
func (siw *ServerInterfaceWrapper) PostV1RatingRules(w http.ResponseWriter, r *http.Request)
PostV1RatingRules operation middleware
func (*ServerInterfaceWrapper) PostV1Subscriptions ¶
func (siw *ServerInterfaceWrapper) PostV1Subscriptions(w http.ResponseWriter, r *http.Request)
PostV1Subscriptions operation middleware
func (*ServerInterfaceWrapper) PostV1SubscriptionsIdActivate ¶
func (siw *ServerInterfaceWrapper) PostV1SubscriptionsIdActivate(w http.ResponseWriter, r *http.Request)
PostV1SubscriptionsIdActivate operation middleware
func (*ServerInterfaceWrapper) PostV1TestClocks ¶
func (siw *ServerInterfaceWrapper) PostV1TestClocks(w http.ResponseWriter, r *http.Request)
PostV1TestClocks operation middleware
func (*ServerInterfaceWrapper) PostV1TestClocksIdAdvance ¶
func (siw *ServerInterfaceWrapper) PostV1TestClocksIdAdvance(w http.ResponseWriter, r *http.Request)
PostV1TestClocksIdAdvance operation middleware
func (*ServerInterfaceWrapper) PostV1TestClocksIdRetryAdvance ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) PostV1TestClocksIdRetryAdvance(w http.ResponseWriter, r *http.Request)
PostV1TestClocksIdRetryAdvance operation middleware
func (*ServerInterfaceWrapper) PostV1UsageEvents ¶
func (siw *ServerInterfaceWrapper) PostV1UsageEvents(w http.ResponseWriter, r *http.Request)
PostV1UsageEvents operation middleware
func (*ServerInterfaceWrapper) PostV1UsageEventsBatch ¶
func (siw *ServerInterfaceWrapper) PostV1UsageEventsBatch(w http.ResponseWriter, r *http.Request)
PostV1UsageEventsBatch operation middleware
func (*ServerInterfaceWrapper) PostV1WebhookEndpointsEndpoints ¶
func (siw *ServerInterfaceWrapper) PostV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
PostV1WebhookEndpointsEndpoints operation middleware
func (*ServerInterfaceWrapper) PostV1WebhookEndpointsEndpointsIdRotateSecret ¶
func (siw *ServerInterfaceWrapper) PostV1WebhookEndpointsEndpointsIdRotateSecret(w http.ResponseWriter, r *http.Request)
PostV1WebhookEndpointsEndpointsIdRotateSecret operation middleware
func (*ServerInterfaceWrapper) PreviewRecipe ¶ added in v0.2.0
func (siw *ServerInterfaceWrapper) PreviewRecipe(w http.ResponseWriter, r *http.Request)
PreviewRecipe operation middleware
func (*ServerInterfaceWrapper) PutV1ProviderCosts ¶
func (siw *ServerInterfaceWrapper) PutV1ProviderCosts(w http.ResponseWriter, r *http.Request)
PutV1ProviderCosts operation middleware
type Subscription ¶
type Subscription struct {
BillingTime SubscriptionBillingTime `json:"billing_time,omitempty"`
Code string `json:"code,omitempty"`
CustomerId string `json:"customer_id,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Id string `json:"id,omitempty"`
PlanId string `json:"plan_id,omitempty"`
Status SubscriptionStatus `json:"status,omitempty"`
TrialEndAt time.Time `json:"trial_end_at,omitempty"`
TrialStartAt time.Time `json:"trial_start_at,omitempty"`
}
Subscription defines model for Subscription.
type SubscriptionBillingTime ¶
type SubscriptionBillingTime string
SubscriptionBillingTime defines model for Subscription.BillingTime.
const ( SubscriptionBillingTimeAnniversary SubscriptionBillingTime = "anniversary" SubscriptionBillingTimeCalendar SubscriptionBillingTime = "calendar" )
Defines values for SubscriptionBillingTime.
func (SubscriptionBillingTime) Valid ¶
func (e SubscriptionBillingTime) Valid() bool
Valid indicates whether the value is a known member of the SubscriptionBillingTime enum.
type SubscriptionStatus ¶
type SubscriptionStatus string
SubscriptionStatus defines model for Subscription.Status.
const ( SubscriptionStatusActive SubscriptionStatus = "active" SubscriptionStatusArchived SubscriptionStatus = "archived" SubscriptionStatusCanceled SubscriptionStatus = "canceled" SubscriptionStatusDraft SubscriptionStatus = "draft" SubscriptionStatusTrialing SubscriptionStatus = "trialing" )
Defines values for SubscriptionStatus.
func (SubscriptionStatus) Valid ¶
func (e SubscriptionStatus) Valid() bool
Valid indicates whether the value is a known member of the SubscriptionStatus enum.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) DeleteV1MembersInvitationsId ¶ added in v0.2.0
func (_ Unimplemented) DeleteV1MembersInvitationsId(w http.ResponseWriter, r *http.Request, id string)
Revoke a pending invitation (DELETE /v1/members/invitations/{id})
func (Unimplemented) DeleteV1MembersUserId ¶ added in v0.2.0
func (_ Unimplemented) DeleteV1MembersUserId(w http.ResponseWriter, r *http.Request, userId string)
Remove a member from the workspace (DELETE /v1/members/{user_id})
func (Unimplemented) DeleteV1ProviderCostsId ¶
func (_ Unimplemented) DeleteV1ProviderCostsId(w http.ResponseWriter, r *http.Request, id string)
Delete a provider cost rate (DELETE /v1/provider-costs/{id})
func (Unimplemented) DeleteV1TestClocksId ¶
func (_ Unimplemented) DeleteV1TestClocksId(w http.ResponseWriter, r *http.Request, id string)
Delete a test clock (cascades to pinned subscriptions) (DELETE /v1/test-clocks/{id})
func (Unimplemented) DeleteV1WebhookEndpointsEndpointsId ¶
func (_ Unimplemented) DeleteV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request, id string)
Delete (disable) webhook endpoint (DELETE /v1/webhook-endpoints/endpoints/{id})
func (Unimplemented) GetHealth ¶
func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
Health check (GET /health)
func (Unimplemented) GetInvoice ¶
func (_ Unimplemented) GetInvoice(w http.ResponseWriter, r *http.Request, id string)
Get invoice with line items (GET /v1/invoices/{id})
func (Unimplemented) GetRecipe ¶ added in v0.2.0
func (_ Unimplemented) GetRecipe(w http.ResponseWriter, r *http.Request, key string)
Get recipe (GET /v1/recipes/{key})
func (Unimplemented) GetV1AuthInviteToken ¶ added in v0.2.0
func (_ Unimplemented) GetV1AuthInviteToken(w http.ResponseWriter, r *http.Request, token string)
Preview a team invitation (accept-page context) (GET /v1/auth/invite/{token})
func (Unimplemented) GetV1BillingPreviewSubscriptionId ¶
func (_ Unimplemented) GetV1BillingPreviewSubscriptionId(w http.ResponseWriter, r *http.Request, subscriptionId string)
Invoice preview (dry run) (GET /v1/billing/preview/{subscription_id})
func (Unimplemented) GetV1CreditsBalanceCustomerId ¶
func (_ Unimplemented) GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request, customerId string)
Get customer credit balance (GET /v1/credits/balance/{customer_id})
func (Unimplemented) GetV1CreditsGrantsCustomerId ¶ added in v0.2.0
func (_ Unimplemented) GetV1CreditsGrantsCustomerId(w http.ResponseWriter, r *http.Request, customerId string, params GetV1CreditsGrantsCustomerIdParams)
Per-grant burndown + kind subtotals (GET /v1/credits/grants/{customer_id})
func (Unimplemented) GetV1Customers ¶
func (_ Unimplemented) GetV1Customers(w http.ResponseWriter, r *http.Request, params GetV1CustomersParams)
List customers (GET /v1/customers)
func (Unimplemented) GetV1CustomersIdMargin ¶
func (_ Unimplemented) GetV1CustomersIdMargin(w http.ResponseWriter, r *http.Request, id string, params GetV1CustomersIdMarginParams)
Per-customer margin report (operator only) (GET /v1/customers/{id}/margin)
func (Unimplemented) GetV1Invoices ¶
func (_ Unimplemented) GetV1Invoices(w http.ResponseWriter, r *http.Request, params GetV1InvoicesParams)
List invoices (GET /v1/invoices)
func (Unimplemented) GetV1InvoicesIdPdf ¶
func (_ Unimplemented) GetV1InvoicesIdPdf(w http.ResponseWriter, r *http.Request, id string)
Download invoice PDF (GET /v1/invoices/{id}/pdf)
func (Unimplemented) GetV1Members ¶ added in v0.2.0
func (_ Unimplemented) GetV1Members(w http.ResponseWriter, r *http.Request)
List workspace members and invitations (GET /v1/members/)
func (Unimplemented) GetV1Meters ¶
func (_ Unimplemented) GetV1Meters(w http.ResponseWriter, r *http.Request)
List meters (GET /v1/meters)
func (Unimplemented) GetV1Plans ¶
func (_ Unimplemented) GetV1Plans(w http.ResponseWriter, r *http.Request)
List plans (GET /v1/plans)
func (Unimplemented) GetV1ProviderCosts ¶
func (_ Unimplemented) GetV1ProviderCosts(w http.ResponseWriter, r *http.Request)
List provider cost rates (GET /v1/provider-costs)
func (Unimplemented) GetV1PublicCostDashboardToken ¶
func (_ Unimplemented) GetV1PublicCostDashboardToken(w http.ResponseWriter, r *http.Request, token string)
Public cost-dashboard projection (ADR-032) (GET /v1/public/cost-dashboard/{token})
func (Unimplemented) GetV1RatingRules ¶
func (_ Unimplemented) GetV1RatingRules(w http.ResponseWriter, r *http.Request)
List rating rules (GET /v1/rating-rules)
func (Unimplemented) GetV1Subscriptions ¶
func (_ Unimplemented) GetV1Subscriptions(w http.ResponseWriter, r *http.Request, params GetV1SubscriptionsParams)
List subscriptions (GET /v1/subscriptions)
func (Unimplemented) GetV1TestClocks ¶
func (_ Unimplemented) GetV1TestClocks(w http.ResponseWriter, r *http.Request)
List test clocks for the active tenant (GET /v1/test-clocks)
func (Unimplemented) GetV1TestClocksId ¶
func (_ Unimplemented) GetV1TestClocksId(w http.ResponseWriter, r *http.Request, id string)
Get a test clock by id (GET /v1/test-clocks/{id})
func (Unimplemented) GetV1TestClocksIdSubscriptions ¶
func (_ Unimplemented) GetV1TestClocksIdSubscriptions(w http.ResponseWriter, r *http.Request, id string)
List subscriptions pinned to this clock (GET /v1/test-clocks/{id}/subscriptions)
func (Unimplemented) GetV1UsageEvents ¶
func (_ Unimplemented) GetV1UsageEvents(w http.ResponseWriter, r *http.Request, params GetV1UsageEventsParams)
List usage events (GET /v1/usage-events)
func (Unimplemented) GetV1WebhookEndpointsEndpoints ¶
func (_ Unimplemented) GetV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
List webhook endpoints (GET /v1/webhook-endpoints/endpoints)
func (Unimplemented) GetV1WebhookEndpointsEvents ¶
func (_ Unimplemented) GetV1WebhookEndpointsEvents(w http.ResponseWriter, r *http.Request)
List recent outbound events (newest 50) (GET /v1/webhook-endpoints/events)
func (Unimplemented) GetV1Whoami ¶
func (_ Unimplemented) GetV1Whoami(w http.ResponseWriter, r *http.Request)
Resolve the current credential to its tenant context (GET /v1/whoami)
func (Unimplemented) InstantiateRecipe ¶ added in v0.2.0
func (_ Unimplemented) InstantiateRecipe(w http.ResponseWriter, r *http.Request, key string)
Instantiate recipe (idempotent apply) (POST /v1/recipes/{key}/instantiate)
func (Unimplemented) ListRecipeInstances ¶ added in v0.2.0
func (_ Unimplemented) ListRecipeInstances(w http.ResponseWriter, r *http.Request)
List installed recipe instances (GET /v1/recipes/instances)
func (Unimplemented) ListRecipes ¶ added in v0.2.0
func (_ Unimplemented) ListRecipes(w http.ResponseWriter, r *http.Request)
List recipes (GET /v1/recipes)
func (Unimplemented) PatchV1MetersId ¶
func (_ Unimplemented) PatchV1MetersId(w http.ResponseWriter, r *http.Request, id string)
Update meter (incl. the default rating-rule binding) (PATCH /v1/meters/{id})
func (Unimplemented) PatchV1WebhookEndpointsEndpointsId ¶
func (_ Unimplemented) PatchV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request, id string)
Update webhook endpoint (no secret rotation) (PATCH /v1/webhook-endpoints/endpoints/{id})
func (Unimplemented) PostV1AuthAcceptInvite ¶ added in v0.2.0
func (_ Unimplemented) PostV1AuthAcceptInvite(w http.ResponseWriter, r *http.Request)
Accept a team invitation (POST /v1/auth/accept-invite)
func (Unimplemented) PostV1AuthLogin ¶
func (_ Unimplemented) PostV1AuthLogin(w http.ResponseWriter, r *http.Request)
Sign in with email and password; mint an httpOnly session cookie (POST /v1/auth/login)
func (Unimplemented) PostV1AuthLogout ¶
func (_ Unimplemented) PostV1AuthLogout(w http.ResponseWriter, r *http.Request)
Revoke the current session and clear the cookie (POST /v1/auth/logout)
func (Unimplemented) PostV1AuthMode ¶
func (_ Unimplemented) PostV1AuthMode(w http.ResponseWriter, r *http.Request)
Switch the dashboard session between test and live mode (POST /v1/auth/mode)
func (Unimplemented) PostV1AuthPasswordResetConfirm ¶
func (_ Unimplemented) PostV1AuthPasswordResetConfirm(w http.ResponseWriter, r *http.Request)
Set a new password using a reset token (POST /v1/auth/password-reset/confirm)
func (Unimplemented) PostV1AuthPasswordResetRequest ¶
func (_ Unimplemented) PostV1AuthPasswordResetRequest(w http.ResponseWriter, r *http.Request)
Request a password reset link (POST /v1/auth/password-reset/request)
func (Unimplemented) PostV1BillingRun ¶
func (_ Unimplemented) PostV1BillingRun(w http.ResponseWriter, r *http.Request)
Trigger billing cycle (POST /v1/billing/run)
func (Unimplemented) PostV1CreditNotes ¶ added in v0.2.0
func (_ Unimplemented) PostV1CreditNotes(w http.ResponseWriter, r *http.Request)
Create a credit note (line-based, or commit relief) (POST /v1/credit-notes)
func (Unimplemented) PostV1CreditNotesIdSend ¶ added in v0.2.0
func (_ Unimplemented) PostV1CreditNotesIdSend(w http.ResponseWriter, r *http.Request, id string)
Email the credit-note document (PDF attached) (POST /v1/credit-notes/{id}/send)
func (Unimplemented) PostV1CreditsGrant ¶
func (_ Unimplemented) PostV1CreditsGrant(w http.ResponseWriter, r *http.Request)
Grant credits to customer (POST /v1/credits/grant)
func (Unimplemented) PostV1Customers ¶
func (_ Unimplemented) PostV1Customers(w http.ResponseWriter, r *http.Request)
Create customer (POST /v1/customers)
func (Unimplemented) PostV1CustomersIdRotateCostDashboardToken ¶
func (_ Unimplemented) PostV1CustomersIdRotateCostDashboardToken(w http.ResponseWriter, r *http.Request, id string)
Rotate the public cost-dashboard token (ADR-032) (POST /v1/customers/{id}/rotate-cost-dashboard-token)
func (Unimplemented) PostV1InvoicesCreatePreview ¶
func (_ Unimplemented) PostV1InvoicesCreatePreview(w http.ResponseWriter, r *http.Request)
Preview the next invoice for a customer (Stripe-equivalent) (POST /v1/invoices/create_preview)
func (Unimplemented) PostV1InvoicesIdFinalize ¶
func (_ Unimplemented) PostV1InvoicesIdFinalize(w http.ResponseWriter, r *http.Request, id string)
Finalize draft invoice (POST /v1/invoices/{id}/finalize)
func (Unimplemented) PostV1InvoicesIdRetryTax ¶
func (_ Unimplemented) PostV1InvoicesIdRetryTax(w http.ResponseWriter, r *http.Request, id string)
Retry tax calculation on a deferred invoice (POST /v1/invoices/{id}/retry-tax)
func (Unimplemented) PostV1InvoicesIdSend ¶ added in v0.2.0
func (_ Unimplemented) PostV1InvoicesIdSend(w http.ResponseWriter, r *http.Request, id string)
Email the invoice (PDF attached) to a recipient (POST /v1/invoices/{id}/send)
func (Unimplemented) PostV1MembersInvite ¶ added in v0.2.0
func (_ Unimplemented) PostV1MembersInvite(w http.ResponseWriter, r *http.Request)
Invite a teammate by email (POST /v1/members/invite)
func (Unimplemented) PostV1Meters ¶
func (_ Unimplemented) PostV1Meters(w http.ResponseWriter, r *http.Request)
Create meter (POST /v1/meters)
func (Unimplemented) PostV1Plans ¶
func (_ Unimplemented) PostV1Plans(w http.ResponseWriter, r *http.Request)
Create plan (POST /v1/plans)
func (Unimplemented) PostV1RatingRules ¶
func (_ Unimplemented) PostV1RatingRules(w http.ResponseWriter, r *http.Request)
Create rating rule (POST /v1/rating-rules)
func (Unimplemented) PostV1Subscriptions ¶
func (_ Unimplemented) PostV1Subscriptions(w http.ResponseWriter, r *http.Request)
Create subscription (POST /v1/subscriptions)
func (Unimplemented) PostV1SubscriptionsIdActivate ¶
func (_ Unimplemented) PostV1SubscriptionsIdActivate(w http.ResponseWriter, r *http.Request, id string)
Activate draft subscription (POST /v1/subscriptions/{id}/activate)
func (Unimplemented) PostV1TestClocks ¶
func (_ Unimplemented) PostV1TestClocks(w http.ResponseWriter, r *http.Request)
Create a test clock (POST /v1/test-clocks)
func (Unimplemented) PostV1TestClocksIdAdvance ¶
func (_ Unimplemented) PostV1TestClocksIdAdvance(w http.ResponseWriter, r *http.Request, id string)
Advance the clock to a new frozen_time (POST /v1/test-clocks/{id}/advance)
func (Unimplemented) PostV1TestClocksIdRetryAdvance ¶ added in v0.2.0
func (_ Unimplemented) PostV1TestClocksIdRetryAdvance(w http.ResponseWriter, r *http.Request, id string)
Retry catchup on a clock parked in internal_failure (POST /v1/test-clocks/{id}/retry-advance)
func (Unimplemented) PostV1UsageEvents ¶
func (_ Unimplemented) PostV1UsageEvents(w http.ResponseWriter, r *http.Request)
Ingest usage event (POST /v1/usage-events)
func (Unimplemented) PostV1UsageEventsBatch ¶
func (_ Unimplemented) PostV1UsageEventsBatch(w http.ResponseWriter, r *http.Request)
Batch ingest usage events (max 1000, all-or-nothing) (POST /v1/usage-events/batch)
func (Unimplemented) PostV1WebhookEndpointsEndpoints ¶
func (_ Unimplemented) PostV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request)
Create webhook endpoint (POST /v1/webhook-endpoints/endpoints)
func (Unimplemented) PostV1WebhookEndpointsEndpointsIdRotateSecret ¶
func (_ Unimplemented) PostV1WebhookEndpointsEndpointsIdRotateSecret(w http.ResponseWriter, r *http.Request, id string)
Rotate signing secret (72h dual-signing grace) (POST /v1/webhook-endpoints/endpoints/{id}/rotate-secret)
func (Unimplemented) PreviewRecipe ¶ added in v0.2.0
func (_ Unimplemented) PreviewRecipe(w http.ResponseWriter, r *http.Request, key string)
Preview recipe (POST /v1/recipes/{key}/preview)
func (Unimplemented) PutV1ProviderCosts ¶
func (_ Unimplemented) PutV1ProviderCosts(w http.ResponseWriter, r *http.Request)
Create or update a provider cost rate (PUT /v1/provider-costs)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UsageEvent ¶
type UsageEvent struct {
CustomerId string `json:"customer_id,omitempty"`
Id string `json:"id,omitempty"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
MeterId string `json:"meter_id,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty"`
Quantity int64 `json:"quantity,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty"`
}
UsageEvent defines model for UsageEvent.