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 APIKey
- type APIKeyCreated
- type APIKeyKeyType
- type APIKeyRotation
- type ActivityActor
- type ActivityActorKind
- type ActivityActorVia
- type ActivityLine
- type ActivityLineTone
- type ActivityLink
- type ActivityLinkKind
- type ActivityMoney
- type ActivityPart
- type AddInvoiceLineItemJSONRequestBody
- type AddInvoiceLineItemParams
- type AddPlanPriceJSONRequestBody
- type AddPlanPriceParams
- type AddSubscriptionItemJSONBody
- type AddSubscriptionItemJSONRequestBody
- type AddSubscriptionItemParams
- type AdjustCreditsJSONBody
- type AdjustCreditsJSONRequestBody
- type AdjustCreditsParams
- type AggregateUsageEventsParams
- type AnalyticsMrrMovementPoint
- type AnalyticsMrrMovementTotals
- type AnalyticsOverview
- type AnalyticsPeriod
- type AnalyticsRevenuePoint
- type AnalyticsTopMeter
- type AnalyticsUsagePoint
- type Attention
- type AttentionAction
- type AttentionActionItem
- type AttentionReason
- type AttentionSeverity
- type AuditLogEntry
- type AuditLogEntryActorType
- type AuditLogFilters
- type BackfillUsageEventJSONBody
- type BackfillUsageEventJSONBodyQuantity0
- type BackfillUsageEventJSONBodyQuantity1
- type BackfillUsageEventJSONBody_Quantity
- func (t BackfillUsageEventJSONBody_Quantity) AsBackfillUsageEventJSONBodyQuantity0() (BackfillUsageEventJSONBodyQuantity0, error)
- func (t BackfillUsageEventJSONBody_Quantity) AsBackfillUsageEventJSONBodyQuantity1() (BackfillUsageEventJSONBodyQuantity1, error)
- func (t *BackfillUsageEventJSONBody_Quantity) FromBackfillUsageEventJSONBodyQuantity0(v BackfillUsageEventJSONBodyQuantity0) error
- func (t *BackfillUsageEventJSONBody_Quantity) FromBackfillUsageEventJSONBodyQuantity1(v BackfillUsageEventJSONBodyQuantity1) error
- func (t BackfillUsageEventJSONBody_Quantity) MarshalJSON() ([]byte, error)
- func (t *BackfillUsageEventJSONBody_Quantity) MergeBackfillUsageEventJSONBodyQuantity0(v BackfillUsageEventJSONBodyQuantity0) error
- func (t *BackfillUsageEventJSONBody_Quantity) MergeBackfillUsageEventJSONBodyQuantity1(v BackfillUsageEventJSONBodyQuantity1) error
- func (t *BackfillUsageEventJSONBody_Quantity) UnmarshalJSON(b []byte) error
- type BackfillUsageEventJSONRequestBody
- type BillingFailure
- type BootstrapJSONBody
- type BootstrapJSONRequestBody
- type BootstrapResult
- type CancelSubscriptionParams
- type CheckPasswordResetToken200JSONResponseBodyValid
- type CheckPasswordResetTokenParams
- type ChiServerOptions
- type CollectInvoicePaymentParams
- type ConnectStripeJSONBody
- type ConnectStripeJSONRequestBody
- type ConnectStripeParams
- type CreateApiKeyJSONBody
- type CreateApiKeyJSONBodyKeyType
- type CreateApiKeyJSONRequestBody
- type CreateApiKeyParams
- type CreateCustomerPaymentSetupSessionJSONBody
- type CreateCustomerPaymentSetupSessionJSONRequestBody
- type CreateCustomerPaymentSetupSessionParams
- type CreateDunningPolicyJSONRequestBody
- type CreateDunningPolicyParams
- type CreateInvoiceJSONRequestBody
- type CreateInvoiceParams
- type CreatePriceOverrideJSONBody
- type CreatePriceOverrideJSONBodyMode
- type CreatePriceOverrideJSONRequestBody
- type CreatePriceOverrideParams
- type CreateTenantJSONBody
- type CreateTenantJSONRequestBody
- type CreditBalance
- type CreditGrantBlock
- type CreditGrantBlockGrantKind
- type CreditGrants
- type CreditLedgerEntry
- type CreditLedgerEntryEntryType
- type CreditLedgerEntryGrantKind
- type CreditLiveBalance
- type CreditLiveCurrency
- type CreditNote
- type CreditNoteRefundStatus
- type CreditNoteStats
- type CreditNoteStatus
- type Customer
- type CustomerBillingProfile
- type CustomerBillingProfileInput
- type CustomerBillingProfileInputTaxStatus
- type CustomerBillingProfileProfileStatus
- type CustomerBillingProfileTaxStatus
- type CustomerEmailStatus
- type CustomerOverview
- type CustomerPriceOverride
- type CustomerPriceOverrideMode
- type CustomerStatus
- type CustomerUsage
- type CustomerUsageMeter
- type CustomerUsagePeriodSource
- type DeleteDunningPolicy200JSONResponseBodyStatus
- type DeleteV1TestClocksId200JSONResponseBodyStatus
- type DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatus
- type DiscardHeldUsageJSONBody
- type DiscardHeldUsageJSONRequestBody
- type DisconnectStripeParamsMode
- type DisputeWebhookEventData
- type DocumentBillTo
- type DocumentSupplier
- type DunningPolicy
- type DunningPolicyFinalInvoiceAction
- type DunningPolicyFinalSubscriptionAction
- type DunningPolicyInput
- type DunningPolicyInputFinalInvoiceAction
- type DunningPolicyInputFinalSubscriptionAction
- type DunningPolicyListItem
- type DunningPolicyListItemFinalInvoiceAction
- type DunningPolicyListItemFinalSubscriptionAction
- type DunningRun
- type DunningRunDetail
- type DunningRunDetailDegraded
- type DunningRunEvent
- type DunningRunEventEventType
- type DunningRunEventState
- type DunningRunResolution
- type DunningRunState
- type DunningStats
- type EndSubscriptionTrialParams
- type Error
- type ExportAuditLogCsvParams
- type ExportCustomersCsvParams
- type ExportInvoicesCsvParams
- type ExportSubscriptionsCsvParams
- type ExportUsageEventsCsvParams
- type ExtendSubscriptionTrialJSONBody
- type ExtendSubscriptionTrialJSONRequestBody
- type ExtendSubscriptionTrialParams
- type GetAnalyticsMrrMovementParams
- type GetAnalyticsOverviewParams
- type GetAnalyticsRevenueChartParams
- type GetAnalyticsUsageParams
- type GetCustomerUsageParams
- type GetEmailSettings200JSONResponseBodyLinksEnv
- type GetEmailSettings200JSONResponseBodyTlsMode
- type GetHealth200JSONResponseBodyStatus
- type GetV1CreditsGrantsCustomerIdParams
- type GetV1CustomersIdMarginParams
- type GetV1CustomersParams
- type GetV1CustomersParamsDir
- type GetV1InvoicesParams
- type GetV1InvoicesParamsDir
- type GetV1MetersParams
- type GetV1PlansParams
- type GetV1ProviderCostsParams
- type GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource
- type GetV1SubscriptionsParams
- type GetV1SubscriptionsParamsBilling
- type GetV1SubscriptionsParamsCollection
- type GetV1SubscriptionsParamsDir
- type GetV1SubscriptionsParamsStatus
- type GetV1TestClocksIdSubscriptionsParams
- type GetV1TestClocksParams
- type GetV1UsageEventsParams
- type GetV1WebhookEndpointsEndpointsParams
- type GetV1WebhookEndpointsEventsParams
- type GetV1Whoami200JSONResponseBodyKeyType
- type GetWebhookEndpointStatsParams
- type HeldUsageGroup
- type HeldUsageGroupReason
- type HeldUsageReleaseResult
- type HostedInvoice
- type HostedInvoicePayUnavailableReason
- type IdempotencyKey
- type IngestLitellmSpendJSONBody
- func (t IngestLitellmSpendJSONBody) AsIngestLitellmSpendJSONBody1() (IngestLitellmSpendJSONBody1, error)
- func (t IngestLitellmSpendJSONBody) AsIngestLitellmSpendJSONBody2() (IngestLitellmSpendJSONBody2, error)
- func (t IngestLitellmSpendJSONBody) AsLitellmSpendLog() (LitellmSpendLog, error)
- func (t *IngestLitellmSpendJSONBody) FromIngestLitellmSpendJSONBody1(v IngestLitellmSpendJSONBody1) error
- func (t *IngestLitellmSpendJSONBody) FromIngestLitellmSpendJSONBody2(v IngestLitellmSpendJSONBody2) error
- func (t *IngestLitellmSpendJSONBody) FromLitellmSpendLog(v LitellmSpendLog) error
- func (t IngestLitellmSpendJSONBody) MarshalJSON() ([]byte, error)
- func (t *IngestLitellmSpendJSONBody) MergeIngestLitellmSpendJSONBody1(v IngestLitellmSpendJSONBody1) error
- func (t *IngestLitellmSpendJSONBody) MergeIngestLitellmSpendJSONBody2(v IngestLitellmSpendJSONBody2) error
- func (t *IngestLitellmSpendJSONBody) MergeLitellmSpendLog(v LitellmSpendLog) error
- func (t *IngestLitellmSpendJSONBody) UnmarshalJSON(b []byte) error
- type IngestLitellmSpendJSONBody1
- type IngestLitellmSpendJSONBody2
- type IngestLitellmSpendJSONRequestBody
- type InstantiateRecipeJSONBody
- type InstantiateRecipeJSONRequestBody
- type InstantiateRecipeParams
- type InvalidPage
- type InvalidParamFormatError
- type InviteMemberJSONBody
- type InviteMemberJSONRequestBody
- type InviteMemberParams
- type Invoice
- type InvoiceBillingReason
- type InvoiceCreateRequest
- type InvoiceDispute
- type InvoiceDisputeList
- type InvoiceDisputeStatus
- type InvoiceLineItem
- type InvoiceLineItemInput
- type InvoiceLineItemInputLineType
- type InvoiceLineType
- type InvoicePaymentStatus
- type InvoicePaymentTimeline
- type InvoicePaymentTimelineDegraded
- type InvoicePreview
- type InvoicePreviewLine
- type InvoicePreviewLineLineType
- type InvoicePreviewLinePricingMode
- type InvoicePreviewTotal
- type InvoiceStatus
- type InvoiceTaxErrorCode
- type InvoiceTaxStatus
- type InvoiceTimelineEvent
- type InvoiceTimelineEventSource
- type InvoiceTimelineEventStatus
- type InvoiceWithLineItems
- type IssueCreditNoteParams
- type ItemChangeType
- type Limit
- type ListApiKeysParams
- type ListAuditLogParams
- type ListAuditLogParamsOrder
- type ListCreditBalancesParams
- type ListCreditLedgerEntriesParams
- type ListCreditLedgerEntriesParamsDir
- type ListCreditLedgerEntriesParamsEntryType
- type ListCreditNotesParams
- type ListCreditNotesParamsDir
- type ListCreditNotesParamsRefundStatus
- type ListCreditNotesParamsStatus
- type ListCustomerPaymentMethodsParams
- type ListCustomerSentEmailsParams
- type ListDunningPoliciesParams
- type ListDunningRunsParams
- type ListDunningRunsParamsState
- type ListInvoiceDisputesParams
- type ListPlanPricesParams
- type ListPriceOverridesParams
- type ListRecipeInstancesParams
- type ListRecipesParams
- type ListTenantsParams
- type ListTenantsParamsStatus
- type ListTestClockCustomersParams
- type ListTotal
- type ListWebhookEndpointDeliveriesParams
- type LitellmSpendLog
- type LitellmSpendResult
- type MarginReport
- type MarkInvoiceUncollectibleParams
- type MemberInvitation
- type MemberInvitationStatus
- type Meter
- type MeterAggregation
- type MiddlewareFunc
- type Offset
- type PatchV1MetersIdJSONBody
- type PatchV1MetersIdJSONBodyAggregation
- type PatchV1MetersIdJSONRequestBody
- type PatchV1MetersIdParams
- type PatchV1WebhookEndpointsEndpointsIdJSONBody
- type PatchV1WebhookEndpointsEndpointsIdJSONRequestBody
- type PatchV1WebhookEndpointsEndpointsIdParams
- type PauseSubscriptionCollectionJSONBody
- type PauseSubscriptionCollectionJSONBodyBehavior
- type PauseSubscriptionCollectionJSONRequestBody
- type PauseSubscriptionCollectionParams
- type PaymentMethod
- type Plan
- type PlanBaseBillTiming
- type PlanBillingInterval
- type PlanDetail
- type PlanDetailBaseBillTiming
- type PlanDetailBillingInterval
- type PlanDetailStatus
- type PlanPrice
- type PlanPriceMode
- 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 PostV1BillingRunParams
- type PostV1CreditNotesIdSend200JSONResponseBodyStatus
- type PostV1CreditNotesIdSendJSONBody
- type PostV1CreditNotesIdSendJSONRequestBody
- type PostV1CreditNotesIdSendParams
- type PostV1CreditNotesJSONBody
- type PostV1CreditNotesJSONBodyRefundType
- type PostV1CreditNotesJSONRequestBody
- type PostV1CreditNotesParams
- type PostV1CreditsGrantJSONBody
- type PostV1CreditsGrantJSONBodyGrantKind
- type PostV1CreditsGrantJSONRequestBody
- type PostV1CreditsGrantParams
- type PostV1CustomersIdRotateCostDashboardTokenParams
- type PostV1CustomersJSONBody
- type PostV1CustomersJSONRequestBody
- type PostV1CustomersParams
- type PostV1InvoicesCreatePreviewJSONBody
- type PostV1InvoicesCreatePreviewJSONRequestBody
- type PostV1InvoicesCreatePreviewParams
- type PostV1InvoicesIdFinalizeParams
- type PostV1InvoicesIdRetryTaxParams
- type PostV1InvoicesIdSend200JSONResponseBodyStatus
- type PostV1InvoicesIdSendJSONBody
- type PostV1InvoicesIdSendJSONRequestBody
- type PostV1InvoicesIdSendParams
- type PostV1MetersJSONBody
- type PostV1MetersJSONBodyAggregation
- type PostV1MetersJSONRequestBody
- type PostV1MetersParams
- type PostV1PlansJSONBody
- type PostV1PlansJSONBodyBaseBillTiming
- type PostV1PlansJSONBodyBillingInterval
- type PostV1PlansJSONBodyStatus
- type PostV1PlansJSONRequestBody
- type PostV1PlansParams
- type PostV1SubscriptionsIdActivateParams
- type PostV1SubscriptionsIdRetryBillingParams
- type PostV1SubscriptionsJSONBody
- type PostV1SubscriptionsJSONBodyBillingTime
- type PostV1SubscriptionsJSONBodyStatus
- type PostV1SubscriptionsJSONRequestBody
- type PostV1SubscriptionsParams
- type PostV1TestClocksIdAdvanceJSONBody
- type PostV1TestClocksIdAdvanceJSONRequestBody
- type PostV1TestClocksIdAdvanceParams
- type PostV1TestClocksIdRetryAdvanceParams
- type PostV1TestClocksJSONBody
- type PostV1TestClocksJSONRequestBody
- type PostV1TestClocksParams
- 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 PostV1WebhookEndpointsEndpointsIdRotateSecretParams
- type PostV1WebhookEndpointsEndpointsJSONBody
- type PostV1WebhookEndpointsEndpointsJSONRequestBody
- type PostV1WebhookEndpointsEndpointsParams
- type PreviewRecipeJSONBody
- type PreviewRecipeJSONRequestBody
- type PreviewRecipeParams
- type PriceInput
- type PriceInputMode
- type PriceShape
- type PriceShapeMode
- type PriceTier
- type PriceWrite
- type PriceWriteEffective
- type PriceWriteMode
- type ProviderCostRate
- type ProviderCostRateCurrency
- type PublicPaymentUpdate
- type PutV1ProviderCostsJSONBody
- type PutV1ProviderCostsJSONBodyCurrency
- type PutV1ProviderCostsJSONRequestBody
- type PutV1ProviderCostsParams
- type ReadinessReport
- type ReadinessReportStatus
- type ReceivePostmarkWebhook200JSONResponseBodyStatus
- type ReceivePostmarkWebhookJSONBody
- type ReceivePostmarkWebhookJSONRequestBody
- type ReceiveStripeWebhook200JSONResponseBodyStatus
- type ReceiveStripeWebhookJSONBody
- type ReceiveStripeWebhookJSONRequestBody
- type ReceiveStripeWebhookParams
- type Recipe
- type RecipeCreatedObjects
- type RecipeCreates
- type RecipeDetail
- type RecipeInstance
- type RecipeListItem
- type RecipeMeter
- type RecipeOverride
- type RecipeOverrideType
- type RecipePlan
- type RecipePlanBaseBillTiming
- type RecipePlanBillingInterval
- type RecipePreviewObjects
- type RecipePreviewResult
- type RecipePrice
- type RecipePriceMode
- type RecordInvoicePaymentJSONBody
- type RecordInvoicePaymentJSONRequestBody
- type RecordInvoicePaymentParams
- type RecoveryWarning
- type RecoveryWarningCode
- type RefundInvoiceJSONBody
- type RefundInvoiceJSONBodyReason
- type RefundInvoiceJSONRequestBody
- type RefundInvoiceParams
- type ReleaseHeldUsageJSONBody
- type ReleaseHeldUsageJSONRequestBody
- type ReplayWebhookDeliveryParams
- type ReplayWebhookEventParams
- type RequiredHeaderError
- type RequiredParamError
- type ResendInvoiceSetupLink200JSONResponseBodyStatus
- type ResendInvoiceSetupLinkParams
- type ResolveDunningRunJSONBody
- type ResolveDunningRunJSONBodyResolution
- type ResolveDunningRunJSONRequestBody
- type ResolveDunningRunParams
- type RetryCreditNoteRefundParams
- type RotateApiKeyJSONBody
- type RotateApiKeyJSONRequestBody
- type RotateApiKeyParams
- type RotateInvoicePublicTokenParams
- type ScheduleSubscriptionCancelJSONBody
- type ScheduleSubscriptionCancelJSONRequestBody
- type ScheduleSubscriptionCancelParams
- type SendCustomerPaymentSetupEmailJSONBody
- type SendCustomerPaymentSetupEmailJSONRequestBody
- type SendCustomerPaymentSetupEmailParams
- type SendTestEmailParams
- type SentEmail
- type SentEmailDeliveryState
- type SentEmailEmailType
- type SentEmailStatus
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) AddInvoiceLineItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) AddPlanPrice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) AddSubscriptionItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) AdjustCredits(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) AggregateUsageEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) BackfillUsageEvent(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Bootstrap(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CancelSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CancelSubscriptionItemPendingChange(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CheckPasswordResetToken(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ClearSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ClearSubscriptionScheduledCancel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CollectInvoicePayment(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ConnectStripe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateApiKey(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateCustomerPaymentSetupSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateDunningPolicy(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateHostedInvoiceCheckout(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateInvoice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreatePriceOverride(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreatePublicPaymentUpdateCheckout(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateTenant(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteDunningPolicy(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeletePriceOverride(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) DetachCustomerPaymentMethod(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DiscardHeldUsage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DisconnectStripe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) EndSubscriptionTrial(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ExportAuditLogCsv(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ExportCustomersCsv(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ExportInvoicesCsv(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ExportSubscriptionsCsv(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ExportUsageEventsCsv(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ExtendSubscriptionTrial(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAnalyticsMrrMovement(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAnalyticsOverview(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAnalyticsRevenueChart(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAnalyticsUsage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAuditLogFilters(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCreditNote(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCreditNotePdf(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCreditNoteStats(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCustomer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCustomerBillingProfile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCustomerOverview(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCustomerUsage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDunningPolicy(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDunningRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDunningStats(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetEmailSettings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetHealthReady(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetHostedInvoice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetHostedInvoicePdf(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetInvoice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetInvoicePaymentTimeline(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetMetrics(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPlan(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPublicPaymentUpdate(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetRecipe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSubscriptionTimeline(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTenant(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTenantSettings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1AuthInviteToken(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetV1CreditsBalanceCustomerIdLive(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) 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) 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) GetWebhookEndpoint(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetWebhookEndpointStats(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) IngestLitellmSpend(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) InstantiateRecipe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) InviteMember(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) IssueCreditNote(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListApiKeys(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListAuditLog(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCreditBalances(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCreditLedgerEntries(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCreditNotes(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCustomerPaymentMethods(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCustomerSentEmails(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListDunningPolicies(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListDunningRuns(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListHeldUsage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListInvoiceDisputes(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListMembers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListPlanPrices(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListPriceOverrides(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) ListStripeConnections(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListTenants(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListTestClockCustomers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListWebhookEndpointDeliveries(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListWebhookEventDeliveries(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) MarkInvoiceUncollectible(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) PauseSubscriptionCollection(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) PostV1Meters(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostV1Plans(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) PostV1SubscriptionsIdRetryBilling(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)
- func (siw *ServerInterfaceWrapper) ReceivePostmarkWebhook(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReceiveStripeWebhook(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RecordInvoicePayment(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RefundInvoice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReleaseHeldUsage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RemoveMember(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RemovePlanPrice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RemoveSubscriptionItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReplayWebhookDelivery(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReplayWebhookEvent(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ResendInvoiceSetupLink(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ResolveDunningRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ResumeSubscriptionCollection(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RetryCreditNoteRefund(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RevokeApiKey(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RevokeMemberInvitation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RotateApiKey(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RotateInvoicePublicToken(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ScheduleSubscriptionCancel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SendCustomerPaymentSetupEmail(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SendTestEmail(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SetCustomerDefaultPaymentMethod(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SetDefaultDunningPolicy(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SetStripeWebhookSecret(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SetSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) StreamWebhookEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateCustomer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateDunningPolicy(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdatePlan(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdatePlanPrice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateSubscriptionItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateTenantSettings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpsertCustomerBillingProfile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) VoidCreditNote(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) VoidInvoice(w http.ResponseWriter, r *http.Request)
- type SetCustomerDefaultPaymentMethodParams
- type SetDefaultDunningPolicy200JSONResponseBodyStatus
- type SetDefaultDunningPolicyParams
- type SetStripeWebhookSecretJSONBody
- type SetStripeWebhookSecretJSONRequestBody
- type SetStripeWebhookSecretParams
- type SetStripeWebhookSecretParamsMode
- type SetSubscriptionBillingThresholdsJSONBody
- type SetSubscriptionBillingThresholdsJSONRequestBody
- type SetSubscriptionBillingThresholdsParams
- type StripeConnection
- type StripeConnectionLastVerifiedErrorKind
- type Subscription
- type SubscriptionBillingThresholds
- type SubscriptionBillingTime
- type SubscriptionItem
- type SubscriptionItemChangeResult
- type SubscriptionItemProration
- type SubscriptionItemProrationType
- type SubscriptionItemThreshold
- type SubscriptionNewPeriodInvoice
- type SubscriptionNewPeriodInvoiceStatus
- type SubscriptionPauseCollection
- type SubscriptionPauseCollectionBehavior
- type SubscriptionPauseCollectionSetBy
- type SubscriptionStatus
- type SubscriptionTimelineEvent
- type SubscriptionTimelineEventSource
- type SubscriptionTimelineEventStatus
- type Tenant
- type TenantSettings
- type TenantSettingsInput
- type TenantSettingsInputTaxOnFailure
- type TenantSettingsInputTaxProvider
- type TenantSettingsTaxOnFailure
- type TenantSettingsTaxProvider
- type TenantStatus
- type TestClock
- type TestClockAdvanceSummary
- type TestClockStatus
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) AddInvoiceLineItem(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) AddPlanPrice(w http.ResponseWriter, r *http.Request, id string, params AddPlanPriceParams)
- func (_ Unimplemented) AddSubscriptionItem(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) AdjustCredits(w http.ResponseWriter, r *http.Request, params AdjustCreditsParams)
- func (_ Unimplemented) AggregateUsageEvents(w http.ResponseWriter, r *http.Request, params AggregateUsageEventsParams)
- func (_ Unimplemented) BackfillUsageEvent(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) Bootstrap(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CancelSubscription(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) CancelSubscriptionItemPendingChange(w http.ResponseWriter, r *http.Request, id string, itemID string)
- func (_ Unimplemented) CheckPasswordResetToken(w http.ResponseWriter, r *http.Request, params CheckPasswordResetTokenParams)
- func (_ Unimplemented) ClearSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) ClearSubscriptionScheduledCancel(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) CollectInvoicePayment(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ConnectStripe(w http.ResponseWriter, r *http.Request, params ConnectStripeParams)
- func (_ Unimplemented) CreateApiKey(w http.ResponseWriter, r *http.Request, params CreateApiKeyParams)
- func (_ Unimplemented) CreateCustomerPaymentSetupSession(w http.ResponseWriter, r *http.Request, customerId string, ...)
- func (_ Unimplemented) CreateDunningPolicy(w http.ResponseWriter, r *http.Request, params CreateDunningPolicyParams)
- func (_ Unimplemented) CreateHostedInvoiceCheckout(w http.ResponseWriter, r *http.Request, token string)
- func (_ Unimplemented) CreateInvoice(w http.ResponseWriter, r *http.Request, params CreateInvoiceParams)
- func (_ Unimplemented) CreatePriceOverride(w http.ResponseWriter, r *http.Request, params CreatePriceOverrideParams)
- func (_ Unimplemented) CreatePublicPaymentUpdateCheckout(w http.ResponseWriter, r *http.Request, token string)
- func (_ Unimplemented) CreateTenant(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) DeleteDunningPolicy(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) DeletePriceOverride(w http.ResponseWriter, r *http.Request, id 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) DetachCustomerPaymentMethod(w http.ResponseWriter, r *http.Request, customerId string, pmid string)
- func (_ Unimplemented) DiscardHeldUsage(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) DisconnectStripe(w http.ResponseWriter, r *http.Request, mode DisconnectStripeParamsMode)
- func (_ Unimplemented) EndSubscriptionTrial(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ExportAuditLogCsv(w http.ResponseWriter, r *http.Request, params ExportAuditLogCsvParams)
- func (_ Unimplemented) ExportCustomersCsv(w http.ResponseWriter, r *http.Request, params ExportCustomersCsvParams)
- func (_ Unimplemented) ExportInvoicesCsv(w http.ResponseWriter, r *http.Request, params ExportInvoicesCsvParams)
- func (_ Unimplemented) ExportSubscriptionsCsv(w http.ResponseWriter, r *http.Request, params ExportSubscriptionsCsvParams)
- func (_ Unimplemented) ExportUsageEventsCsv(w http.ResponseWriter, r *http.Request, params ExportUsageEventsCsvParams)
- func (_ Unimplemented) ExtendSubscriptionTrial(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) GetAnalyticsMrrMovement(w http.ResponseWriter, r *http.Request, params GetAnalyticsMrrMovementParams)
- func (_ Unimplemented) GetAnalyticsOverview(w http.ResponseWriter, r *http.Request, params GetAnalyticsOverviewParams)
- func (_ Unimplemented) GetAnalyticsRevenueChart(w http.ResponseWriter, r *http.Request, params GetAnalyticsRevenueChartParams)
- func (_ Unimplemented) GetAnalyticsUsage(w http.ResponseWriter, r *http.Request, params GetAnalyticsUsageParams)
- func (_ Unimplemented) GetAuditLogFilters(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetCreditNote(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetCreditNotePdf(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetCreditNoteStats(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetCustomer(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetCustomerBillingProfile(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetCustomerOverview(w http.ResponseWriter, r *http.Request, customerId string)
- func (_ Unimplemented) GetCustomerUsage(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) GetDunningPolicy(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetDunningRun(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetDunningStats(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetEmailSettings(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetHealthReady(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetHostedInvoice(w http.ResponseWriter, r *http.Request, token string)
- func (_ Unimplemented) GetHostedInvoicePdf(w http.ResponseWriter, r *http.Request, token string)
- func (_ Unimplemented) GetInvoice(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetInvoicePaymentTimeline(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetMetrics(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetPlan(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetPublicPaymentUpdate(w http.ResponseWriter, r *http.Request, token string)
- func (_ Unimplemented) GetRecipe(w http.ResponseWriter, r *http.Request, key string)
- func (_ Unimplemented) GetSubscription(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetSubscriptionTimeline(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetTenant(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetTenantSettings(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetV1AuthInviteToken(w http.ResponseWriter, r *http.Request, token string)
- func (_ Unimplemented) GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request, customerId string)
- func (_ Unimplemented) GetV1CreditsBalanceCustomerIdLive(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) GetV1Meters(w http.ResponseWriter, r *http.Request, params GetV1MetersParams)
- func (_ Unimplemented) GetV1Plans(w http.ResponseWriter, r *http.Request, params GetV1PlansParams)
- func (_ Unimplemented) GetV1ProviderCosts(w http.ResponseWriter, r *http.Request, params GetV1ProviderCostsParams)
- func (_ Unimplemented) GetV1PublicCostDashboardToken(w http.ResponseWriter, r *http.Request, token string)
- func (_ Unimplemented) GetV1Subscriptions(w http.ResponseWriter, r *http.Request, params GetV1SubscriptionsParams)
- func (_ Unimplemented) GetV1TestClocks(w http.ResponseWriter, r *http.Request, params GetV1TestClocksParams)
- 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) GetWebhookEndpoint(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) GetWebhookEndpointStats(w http.ResponseWriter, r *http.Request, params GetWebhookEndpointStatsParams)
- func (_ Unimplemented) IngestLitellmSpend(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) InstantiateRecipe(w http.ResponseWriter, r *http.Request, key string, ...)
- func (_ Unimplemented) InviteMember(w http.ResponseWriter, r *http.Request, params InviteMemberParams)
- func (_ Unimplemented) IssueCreditNote(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ListApiKeys(w http.ResponseWriter, r *http.Request, params ListApiKeysParams)
- func (_ Unimplemented) ListAuditLog(w http.ResponseWriter, r *http.Request, params ListAuditLogParams)
- func (_ Unimplemented) ListCreditBalances(w http.ResponseWriter, r *http.Request, params ListCreditBalancesParams)
- func (_ Unimplemented) ListCreditLedgerEntries(w http.ResponseWriter, r *http.Request, customerId string, ...)
- func (_ Unimplemented) ListCreditNotes(w http.ResponseWriter, r *http.Request, params ListCreditNotesParams)
- func (_ Unimplemented) ListCustomerPaymentMethods(w http.ResponseWriter, r *http.Request, customerId string, ...)
- func (_ Unimplemented) ListCustomerSentEmails(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ListDunningPolicies(w http.ResponseWriter, r *http.Request, params ListDunningPoliciesParams)
- func (_ Unimplemented) ListDunningRuns(w http.ResponseWriter, r *http.Request, params ListDunningRunsParams)
- func (_ Unimplemented) ListHeldUsage(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListInvoiceDisputes(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ListMembers(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListPlanPrices(w http.ResponseWriter, r *http.Request, id string, params ListPlanPricesParams)
- func (_ Unimplemented) ListPriceOverrides(w http.ResponseWriter, r *http.Request, params ListPriceOverridesParams)
- func (_ Unimplemented) ListRecipeInstances(w http.ResponseWriter, r *http.Request, params ListRecipeInstancesParams)
- func (_ Unimplemented) ListRecipes(w http.ResponseWriter, r *http.Request, params ListRecipesParams)
- func (_ Unimplemented) ListStripeConnections(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListTenants(w http.ResponseWriter, r *http.Request, params ListTenantsParams)
- func (_ Unimplemented) ListTestClockCustomers(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ListWebhookEndpointDeliveries(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ListWebhookEventDeliveries(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) MarkInvoiceUncollectible(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) PatchV1MetersId(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) PatchV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) PauseSubscriptionCollection(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, params PostV1BillingRunParams)
- func (_ Unimplemented) PostV1CreditNotes(w http.ResponseWriter, r *http.Request, params PostV1CreditNotesParams)
- func (_ Unimplemented) PostV1CreditNotesIdSend(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) PostV1CreditsGrant(w http.ResponseWriter, r *http.Request, params PostV1CreditsGrantParams)
- func (_ Unimplemented) PostV1Customers(w http.ResponseWriter, r *http.Request, params PostV1CustomersParams)
- 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) PostV1Meters(w http.ResponseWriter, r *http.Request, params PostV1MetersParams)
- func (_ Unimplemented) PostV1Plans(w http.ResponseWriter, r *http.Request, params PostV1PlansParams)
- func (_ Unimplemented) PostV1Subscriptions(w http.ResponseWriter, r *http.Request, params PostV1SubscriptionsParams)
- func (_ Unimplemented) PostV1SubscriptionsIdActivate(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) PostV1SubscriptionsIdRetryBilling(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) PostV1TestClocks(w http.ResponseWriter, r *http.Request, params PostV1TestClocksParams)
- 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, params PreviewRecipeParams)
- func (_ Unimplemented) PutV1ProviderCosts(w http.ResponseWriter, r *http.Request, params PutV1ProviderCostsParams)
- func (_ Unimplemented) ReceivePostmarkWebhook(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ReceiveStripeWebhook(w http.ResponseWriter, r *http.Request, endpointId string, ...)
- func (_ Unimplemented) RecordInvoicePayment(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) RefundInvoice(w http.ResponseWriter, r *http.Request, id string, params RefundInvoiceParams)
- func (_ Unimplemented) ReleaseHeldUsage(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) RemoveMember(w http.ResponseWriter, r *http.Request, userID string)
- func (_ Unimplemented) RemovePlanPrice(w http.ResponseWriter, r *http.Request, id string, priceId string)
- func (_ Unimplemented) RemoveSubscriptionItem(w http.ResponseWriter, r *http.Request, id string, itemID string)
- func (_ Unimplemented) ReplayWebhookDelivery(w http.ResponseWriter, r *http.Request, id string, deliveryID string, ...)
- func (_ Unimplemented) ReplayWebhookEvent(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ResendInvoiceSetupLink(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ResolveDunningRun(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ResumeSubscriptionCollection(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) RetryCreditNoteRefund(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) RevokeApiKey(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) RevokeMemberInvitation(w http.ResponseWriter, r *http.Request, id string)
- func (_ Unimplemented) RotateApiKey(w http.ResponseWriter, r *http.Request, id string, params RotateApiKeyParams)
- func (_ Unimplemented) RotateInvoicePublicToken(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) ScheduleSubscriptionCancel(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) SendCustomerPaymentSetupEmail(w http.ResponseWriter, r *http.Request, customerId string, ...)
- func (_ Unimplemented) SendTestEmail(w http.ResponseWriter, r *http.Request, params SendTestEmailParams)
- func (_ Unimplemented) SetCustomerDefaultPaymentMethod(w http.ResponseWriter, r *http.Request, customerId string, pmid string, ...)
- func (_ Unimplemented) SetDefaultDunningPolicy(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) SetStripeWebhookSecret(w http.ResponseWriter, r *http.Request, mode SetStripeWebhookSecretParamsMode, ...)
- func (_ Unimplemented) SetSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) StreamWebhookEvents(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) UpdateCustomer(w http.ResponseWriter, r *http.Request, id string, params UpdateCustomerParams)
- func (_ Unimplemented) UpdateDunningPolicy(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) UpdatePlan(w http.ResponseWriter, r *http.Request, id string, params UpdatePlanParams)
- func (_ Unimplemented) UpdatePlanPrice(w http.ResponseWriter, r *http.Request, id string, priceId string, ...)
- func (_ Unimplemented) UpdateSubscriptionItem(w http.ResponseWriter, r *http.Request, id string, itemID string, ...)
- func (_ Unimplemented) UpdateTenantSettings(w http.ResponseWriter, r *http.Request, params UpdateTenantSettingsParams)
- func (_ Unimplemented) UpsertCustomerBillingProfile(w http.ResponseWriter, r *http.Request, id string, ...)
- func (_ Unimplemented) VoidCreditNote(w http.ResponseWriter, r *http.Request, id string, params VoidCreditNoteParams)
- func (_ Unimplemented) VoidInvoice(w http.ResponseWriter, r *http.Request, id string, params VoidInvoiceParams)
- type UnmarshalingParamError
- type UpdateCustomerJSONBody
- type UpdateCustomerJSONBodyStatus
- type UpdateCustomerJSONRequestBody
- type UpdateCustomerParams
- type UpdateDunningPolicyJSONRequestBody
- type UpdateDunningPolicyParams
- type UpdatePlanJSONBody
- type UpdatePlanJSONBodyBaseBillTiming
- type UpdatePlanJSONBodyStatus
- type UpdatePlanJSONRequestBody
- type UpdatePlanParams
- type UpdatePlanPriceJSONRequestBody
- type UpdatePlanPriceParams
- type UpdateSubscriptionItemJSONBody
- type UpdateSubscriptionItemJSONRequestBody
- type UpdateSubscriptionItemParams
- type UpdateTenantSettingsJSONRequestBody
- type UpdateTenantSettingsParams
- type UpsertCustomerBillingProfileJSONRequestBody
- type UpsertCustomerBillingProfileParams
- type UsageAggregate
- type UsageBillingStatus
- type UsageEvent
- type UsageEventBatchEventResult
- type UsageEventBatchEventResultStatus
- type UsageEventBatchResult
- type UsageEventOrigin
- type UsageEventProviderCostSource
- type VoidCreditNoteParams
- type VoidInvoiceParams
- type WebhookDeliveryReplayResult
- type WebhookDeliveryReplayResultStatus
- type WebhookEndpoint
- type WebhookEndpointCreated
- type WebhookEndpointDelivery
- type WebhookEndpointDeliveryStatus
- type WebhookEndpointStats
- type WebhookEvent
- type WebhookEventDeliveryAttempt
- type WebhookEventDeliveryAttemptStatus
- type WebhookReplayResult
- type WebhookReplayResultStatus
- type WebhookSecretRotation
- type WebhookStreamFrame
Constants ¶
const ( BearerAuthScopes bearerAuthContextKey = "BearerAuth.Scopes" MetricsTokenScopes metricsTokenContextKey = "MetricsToken.Scopes" PostmarkBasicAuthScopes postmarkBasicAuthContextKey = "PostmarkBasicAuth.Scopes" SessionCookieScopes sessionCookieContextKey = "SessionCookie.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 APIKey ¶
type APIKey struct {
CreatedAt time.Time `json:"created_at"`
// ExpiresAt When the key stops working. Also set on the old key during a rotation grace period.
ExpiresAt time.Time `json:"expires_at,omitempty"`
Id string `json:"id"`
// KeyPrefix The start of the key (type, mode and a few characters), enough to tell keys apart. Never the full key.
KeyPrefix string `json:"key_prefix"`
KeyType APIKeyKeyType `json:"key_type"`
// LastUsedAt Updated at most about once per interval, so it can lag a little.
LastUsedAt time.Time `json:"last_used_at,omitempty"`
Livemode bool `json:"livemode"`
Name string `json:"name"`
RevokedAt time.Time `json:"revoked_at,omitempty"`
TenantId string `json:"tenant_id"`
}
APIKey defines model for APIKey.
type APIKeyCreated ¶
type APIKeyCreated struct {
Key APIKey `json:"key"`
// RawKey The full key. Shown only once; store it now.
RawKey string `json:"raw_key"`
}
APIKeyCreated defines model for APIKeyCreated.
type APIKeyKeyType ¶
type APIKeyKeyType string
APIKeyKeyType defines model for APIKey.KeyType.
const ( APIKeyKeyTypePlatform APIKeyKeyType = "platform" APIKeyKeyTypeSecret APIKeyKeyType = "secret" )
Defines values for APIKeyKeyType.
func (APIKeyKeyType) Valid ¶
func (e APIKeyKeyType) Valid() bool
Valid indicates whether the value is a known member of the APIKeyKeyType enum.
type APIKeyRotation ¶
type APIKeyRotation struct {
NewKey APIKey `json:"new_key"`
OldKey APIKey `json:"old_key"`
// RawKey The new key's full value. Shown only once.
RawKey string `json:"raw_key"`
}
APIKeyRotation defines model for APIKeyRotation.
type ActivityActor ¶
type ActivityActor struct {
Kind ActivityActorKind `json:"kind"`
Name string `json:"name,omitempty"`
Via ActivityActorVia `json:"via,omitempty"`
}
ActivityActor Who did it. `person` and `api_key` carry the name (a person's email when they have no name), `customer` says where through `via`, and `automatic` is anything Hardcount did on its own. Absent when no fact written with the row names one.
type ActivityActorKind ¶
type ActivityActorKind string
ActivityActorKind defines model for ActivityActor.Kind.
const ( ActivityActorKindApiKey ActivityActorKind = "api_key" ActivityActorKindAutomatic ActivityActorKind = "automatic" ActivityActorKindCustomer ActivityActorKind = "customer" ActivityActorKindPerson ActivityActorKind = "person" )
Defines values for ActivityActorKind.
func (ActivityActorKind) Valid ¶
func (e ActivityActorKind) Valid() bool
Valid indicates whether the value is a known member of the ActivityActorKind enum.
type ActivityActorVia ¶
type ActivityActorVia string
ActivityActorVia defines model for ActivityActor.Via.
const ( PaymentPage ActivityActorVia = "payment_page" Portal ActivityActorVia = "portal" )
Defines values for ActivityActorVia.
func (ActivityActorVia) Valid ¶
func (e ActivityActorVia) Valid() bool
Valid indicates whether the value is a known member of the ActivityActorVia enum.
type ActivityLine ¶
type ActivityLine struct {
// Actor Who did it. `person` and `api_key` carry the name (a person's email
// when they have no name), `customer` says where through `via`, and
// `automatic` is anything Hardcount did on its own. Absent when no fact
// written with the row names one.
Actor ActivityActor `json:"actor,omitempty"`
Amount ActivityMoney `json:"amount,omitempty"`
// Detail The meta line before the actor. Each item is one segment, shown
// joined by " · "; a segment's parts read as one phrase, for
// example a money part followed by the text " refunded to card".
Detail [][]ActivityPart `json:"detail"`
// Id The row's stable key: the event's `id` on an invoice timeline
// row, the audit entry's id on a subscription timeline row,
// `dunning:` and the event's id on a dunning run event (the same
// key the invoice timeline gives that event), and `email:` and
// the email's id on a sent email (likewise).
Id string `json:"id"`
// Kind Machine name of the event.
Kind string `json:"kind"`
OccurredAt time.Time `json:"occurred_at"`
Problem string `json:"problem,omitempty"`
RecordedAt time.Time `json:"recorded_at,omitempty"`
Title string `json:"title"`
// Tone neutral: something happened. success: money arrived, or was
// returned as intended. warning: needs a look, or money will not
// be collected. failure: an attempt failed.
Tone ActivityLineTone `json:"tone"`
}
ActivityLine One activity row in the words of the activity line standard (ADR-128): a title with no values, the amount when the event moves money, asks for it or cancels money owed, a problem line on failure and warning rows, the meta line's parts and the actor, a tone, and the event's time on the entity's calendar. `recorded_at` is the real-world time, set only for an entity on a test clock.
type ActivityLineTone ¶
type ActivityLineTone string
ActivityLineTone neutral: something happened. success: money arrived, or was returned as intended. warning: needs a look, or money will not be collected. failure: an attempt failed.
const ( ActivityLineToneFailure ActivityLineTone = "failure" ActivityLineToneNeutral ActivityLineTone = "neutral" ActivityLineToneSuccess ActivityLineTone = "success" ActivityLineToneWarning ActivityLineTone = "warning" )
Defines values for ActivityLineTone.
func (ActivityLineTone) Valid ¶
func (e ActivityLineTone) Valid() bool
Valid indicates whether the value is a known member of the ActivityLineTone enum.
type ActivityLink ¶
type ActivityLink struct {
Id string `json:"id"`
Kind ActivityLinkKind `json:"kind"`
Label string `json:"label"`
}
ActivityLink An object the row's own data names, which still exists.
type ActivityLinkKind ¶
type ActivityLinkKind string
ActivityLinkKind defines model for ActivityLink.Kind.
const ( ActivityLinkKindCreditNote ActivityLinkKind = "credit_note" ActivityLinkKindInvoice ActivityLinkKind = "invoice" ActivityLinkKindSubscription ActivityLinkKind = "subscription" )
Defines values for ActivityLinkKind.
func (ActivityLinkKind) Valid ¶
func (e ActivityLinkKind) Valid() bool
Valid indicates whether the value is a known member of the ActivityLinkKind enum.
type ActivityMoney ¶
ActivityMoney defines model for ActivityMoney.
type ActivityPart ¶
type ActivityPart struct {
// Link An object the row's own data names, which still exists.
Link ActivityLink `json:"link,omitempty"`
Money ActivityMoney `json:"money,omitempty"`
Text string `json:"text,omitempty"`
Time time.Time `json:"time,omitempty"`
}
ActivityPart One piece of a meta segment. Exactly one field is set.
type AddInvoiceLineItemJSONRequestBody ¶
type AddInvoiceLineItemJSONRequestBody = InvoiceLineItemInput
AddInvoiceLineItemJSONRequestBody defines body for AddInvoiceLineItem for application/json ContentType.
type AddInvoiceLineItemParams ¶
type AddInvoiceLineItemParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
AddInvoiceLineItemParams defines parameters for AddInvoiceLineItem.
type AddPlanPriceJSONRequestBody ¶
type AddPlanPriceJSONRequestBody = PriceInput
AddPlanPriceJSONRequestBody defines body for AddPlanPrice for application/json ContentType.
type AddPlanPriceParams ¶
type AddPlanPriceParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
AddPlanPriceParams defines parameters for AddPlanPrice.
type AddSubscriptionItemJSONBody ¶
type AddSubscriptionItemJSONBody struct {
PlanId string `json:"plan_id"`
Quantity int64 `json:"quantity,omitempty"`
}
AddSubscriptionItemJSONBody defines parameters for AddSubscriptionItem.
type AddSubscriptionItemJSONRequestBody ¶
type AddSubscriptionItemJSONRequestBody AddSubscriptionItemJSONBody
AddSubscriptionItemJSONRequestBody defines body for AddSubscriptionItem for application/json ContentType.
type AddSubscriptionItemParams ¶
type AddSubscriptionItemParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
AddSubscriptionItemParams defines parameters for AddSubscriptionItem.
type AdjustCreditsJSONBody ¶
type AdjustCreditsJSONBody struct {
// AmountCents Positive adds credit, negative removes it. Not zero.
AmountCents int64 `json:"amount_cents"`
// Currency ISO 4217 code of the balance to change. Case-insensitive; stored uppercase.
Currency string `json:"currency"`
CustomerId string `json:"customer_id"`
Description string `json:"description"`
}
AdjustCreditsJSONBody defines parameters for AdjustCredits.
type AdjustCreditsJSONRequestBody ¶
type AdjustCreditsJSONRequestBody AdjustCreditsJSONBody
AdjustCreditsJSONRequestBody defines body for AdjustCredits for application/json ContentType.
type AdjustCreditsParams ¶
type AdjustCreditsParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
AdjustCreditsParams defines parameters for AdjustCredits.
type AggregateUsageEventsParams ¶
type AggregateUsageEventsParams struct {
CustomerId string `form:"customer_id,omitempty" json:"customer_id,omitempty"`
MeterId string `form:"meter_id,omitempty" json:"meter_id,omitempty"`
// From Events at or after this time. RFC 3339, or a date (YYYY-MM-DD) meaning 00:00:00 UTC.
From string `form:"from,omitempty" json:"from,omitempty"`
// To Events before this time, exclusive. RFC 3339, or a date (YYYY-MM-DD) meaning 23:59:59.999999 UTC that day, so the day is included.
To string `form:"to,omitempty" json:"to,omitempty"`
// Dimensions Comma-separated key=value pairs matched against event dimensions,
// same syntax as `GET /v1/usage-events`. Example:
// `model=gpt-4o,token_type=input`.
Dimensions string `form:"dimensions,omitempty" json:"dimensions,omitempty"`
// Tz IANA time zone for the calendar days of `by_meter[].daily`
// (default UTC). An unknown name returns 422.
Tz string `form:"tz,omitempty" json:"tz,omitempty"`
}
AggregateUsageEventsParams defines parameters for AggregateUsageEvents.
type AnalyticsMrrMovementPoint ¶
type AnalyticsMrrMovementPoint struct {
Churned int64 `json:"churned"`
Contraction int64 `json:"contraction"`
// Date Bucket start, `YYYY-MM-DD` (or `YYYY-MM` for `12m`), in UTC.
Date string `json:"date"`
Expansion int64 `json:"expansion"`
Net int64 `json:"net"`
New int64 `json:"new"`
}
AnalyticsMrrMovementPoint defines model for AnalyticsMrrMovementPoint.
type AnalyticsMrrMovementTotals ¶
type AnalyticsMrrMovementTotals struct {
Churned int64 `json:"churned"`
Contraction int64 `json:"contraction"`
Expansion int64 `json:"expansion"`
Net int64 `json:"net"`
New int64 `json:"new"`
}
AnalyticsMrrMovementTotals MRR change in cents. `churned` and `contraction` are positive amounts. `net` = `new` + `expansion` - `contraction` - `churned`.
type AnalyticsOverview ¶
type AnalyticsOverview struct {
// ActiveCustomers Customer records with status `active`. Includes customers with
// no subscription or only canceled ones; `live_customers` counts
// the customers you bill.
ActiveCustomers int `json:"active_customers"`
// ActiveSubscriptions Subscriptions with status `active`.
ActiveSubscriptions int `json:"active_subscriptions"`
// Arr `mrr` times 12.
Arr int64 `json:"arr"`
// ArrPrev `mrr_prev` times 12.
ArrPrev int64 `json:"arr_prev"`
// AvgInvoiceValue Average total of invoices paid in the window.
AvgInvoiceValue int64 `json:"avg_invoice_value"`
// CreditBalanceByCurrency Customers' credit balances added up per currency, `currency` first, then largest. A currency whose balance is zero is left out. Customers on a test clock are not counted.
CreditBalanceByCurrency []struct {
AmountCents int64 `json:"amount_cents"`
Currency string `json:"currency"`
} `json:"credit_balance_by_currency"`
// Currency The tenant's default currency. Every money field uses it, except `credit_balance_by_currency` and `outstanding_by_currency`, which carry their own.
Currency string `json:"currency"`
// DunningActive Dunning runs (automatic payment retries) still in progress.
DunningActive int `json:"dunning_active"`
// DunningRecoveryRate Dunning runs opened in the window that a payment closed (`resolution` is `payment_recovered` and the invoice has `amount_paid_cents` above 0), divided by all runs opened in the window. A run closed by a void, a write-off, or a credit note or customer credit that left nothing due is not recovered. 0 when none were opened.
DunningRecoveryRate float64 `json:"dunning_recovery_rate"`
// FailedPayments Open invoices created in the window whose payment failed. A voided or written-off invoice is not counted. All currencies.
FailedPayments int `json:"failed_payments"`
// FailedPaymentsPrev `failed_payments` for the previous window.
FailedPaymentsPrev int `json:"failed_payments_prev"`
// LiveCustomers Customers with at least one `active` or `trialing` subscription now.
LiveCustomers int `json:"live_customers"`
// LiveCustomersPrev `live_customers` at the start of the window, rebuilt from
// subscription start and cancel times.
LiveCustomersPrev int `json:"live_customers_prev"`
// LogoChurnRate Subscriptions canceled in the window, divided by subscriptions active at its start. 0 when none were active.
LogoChurnRate float64 `json:"logo_churn_rate"`
// Mrr MRR of active subscriptions now.
Mrr int64 `json:"mrr"`
// MrrMovement MRR change in cents. `churned` and `contraction` are positive
// amounts. `net` = `new` + `expansion` - `contraction` - `churned`.
MrrMovement AnalyticsMrrMovementTotals `json:"mrr_movement"`
// MrrPrev MRR at the start of the window, rebuilt from item change history.
MrrPrev int64 `json:"mrr_prev"`
// NewCustomers Customers created in the window.
NewCustomers int `json:"new_customers"`
// Nrr Net revenue retention: (`mrr_prev` + expansion - contraction -
// churned) divided by `mrr_prev`. Can be above 1. 0 when
// `mrr_prev` is 0.
Nrr float64 `json:"nrr"`
// OpenInvoices Finalized invoices whose payment has not succeeded. All currencies.
OpenInvoices int `json:"open_invoices"`
// OutstandingAr Amount due on finalized invoices whose payment has not succeeded, in `currency` only.
OutstandingAr int64 `json:"outstanding_ar"`
// OutstandingByCurrency Amount due on the invoices `open_invoices` counts, one entry per
// currency. `currency` comes first, then the largest amount. Empty
// when nothing is owed.
OutstandingByCurrency []struct {
AmountCents int64 `json:"amount_cents"`
Currency string `json:"currency"`
} `json:"outstanding_by_currency"`
// PaidInvoices Invoices paid in the window.
PaidInvoices int `json:"paid_invoices"`
Period AnalyticsPeriod `json:"period"`
// RefundsNeedingAttention Issued credit notes whose refund failed, has an unknown result,
// has been pending for more than 72 hours, or has not started an
// hour after issue.
RefundsNeedingAttention int `json:"refunds_needing_attention"`
// Revenue What paid the invoices paid in the window (payment plus customer credit applied). A credit note that lowered an invoice before it was paid is not counted.
Revenue int64 `json:"revenue"`
// RevenueChurnRate Churned MRR divided by `mrr_prev`. 0 when `mrr_prev` is 0.
RevenueChurnRate float64 `json:"revenue_churn_rate"`
// RevenuePrev `revenue` for the previous window.
RevenuePrev int64 `json:"revenue_prev"`
// TrialingSubscriptions Subscriptions with status `trialing`.
TrialingSubscriptions int `json:"trialing_subscriptions"`
// UsageEvents Usage events with a timestamp in the window.
UsageEvents int64 `json:"usage_events"`
}
AnalyticsOverview "The window" is the requested period, ending now. "The previous window" is the one of equal length before it. Money is in cents of `currency`.
type AnalyticsPeriod ¶
type AnalyticsPeriod string
AnalyticsPeriod defines model for AnalyticsPeriod.
const ( N12m AnalyticsPeriod = "12m" N30d AnalyticsPeriod = "30d" N7d AnalyticsPeriod = "7d" N90d AnalyticsPeriod = "90d" )
Defines values for AnalyticsPeriod.
func (AnalyticsPeriod) Valid ¶
func (e AnalyticsPeriod) Valid() bool
Valid indicates whether the value is a known member of the AnalyticsPeriod enum.
type AnalyticsRevenuePoint ¶
type AnalyticsRevenuePoint struct {
// Date Bucket start, `YYYY-MM-DD` (or `YYYY-MM` for `12m`), in UTC.
Date string `json:"date"`
InvoiceCount int `json:"invoice_count"`
// RevenueCents What paid the invoices paid in the bucket (payment plus customer credit applied). A credit note that lowered an invoice before it was paid is not counted.
RevenueCents int64 `json:"revenue_cents"`
}
AnalyticsRevenuePoint defines model for AnalyticsRevenuePoint.
type AnalyticsTopMeter ¶
type AnalyticsTopMeter struct {
EventName string `json:"event_name"`
Events int64 `json:"events"`
MeterId string `json:"meter_id"`
MeterName string `json:"meter_name"`
// Quantity Summed quantity, as a decimal string.
Quantity string `json:"quantity"`
}
AnalyticsTopMeter defines model for AnalyticsTopMeter.
type AnalyticsUsagePoint ¶
type AnalyticsUsagePoint struct {
// Date Bucket start, `YYYY-MM-DD` (or `YYYY-MM` for `12m`), in UTC.
Date string `json:"date"`
Events int64 `json:"events"`
// Quantity Summed quantity, as a decimal string.
Quantity string `json:"quantity"`
}
AnalyticsUsagePoint defines model for AnalyticsUsagePoint.
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 Hardcount's own explanation behind `message`: why the state
// holds, what Hardcount does on its own, and ids support may ask
// for (for example the payment intent ids of a payment
// anomaly). Plain text; may contain blank-line paragraph
// breaks. Never a provider payload — that is
// `provider_response`.
Detail string `json:"detail,omitempty"`
// DocUrl Deep link to operator-facing documentation for this
// reason. Stripe parity.
DocUrl string `json:"doc_url,omitempty"`
// DueBy The invoice's payment deadline (its `due_at`). Hardcount does not
// act on this date; it is shown so the operator knows it.
// Absent when the invoice has no due date.
DueBy time.Time `json:"due_by,omitempty"`
// Message Human-readable copy, safe to render verbatim: one plain
// sentence saying what happens and what to do. Facts that must
// show up front follow on more lines, separated by a newline
// (`\n`), one sentence each and up to three lines in all: the
// setup-link email on `no_payment_method` (and on
// `dunning_exhausted` when no link can be emailed), and the
// prepaid credit at risk on an unpaid commit invoice. A no-card
// commit invoice carries all three. Wording may change between
// releases; switch on `reason` and `code`, not on this text.
Message string `json:"message"`
// NextAttemptAt When Hardcount will next retry on its own. Today only a tax
// retry sets it. Absent when no automatic retry is scheduled.
NextAttemptAt time.Time `json:"next_attempt_at,omitempty"`
// 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"`
// ProviderResponse The provider's own response (Stripe Tax error envelope,
// Stripe's last payment error), exactly as received. Present
// only when Hardcount called the provider.
ProviderResponse string `json:"provider_response,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 (2026-07-28). A dunning run already open on the invoice
// keeps retrying it through the pause, and `message` then says so;
// with no open run it is not charged automatically until
// collection resumes. `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). `dispute_lost` reports a payment on the invoice that
// the customer disputed with their bank and that the dispute took
// back (the dispute closed as `lost`). Hardcount leaves the invoice paid
// and moves no money; the operator records the loss. Surfaced on paid
// invoices. On an invoice that bought prepaid credit, the message
// also says how much of the credit is still spendable and names
// commit relief, because an ordinary credit note is refused there.
// When the invoice also has `payment_anomaly`, that reason stays and
// its message asks the operator to check Stripe before any refund.
// The disputes themselves are at `GET /v1/invoices/{id}/disputes`
// (2026-10-19). `amount_below_minimum` reports an invoice Stripe
// refused to charge, or refused a payment page for, because the amount
// is below Stripe's minimum charge. The minimum depends on the
// currency the Stripe account settles in; Stripe's reply, in
// `provider_response`, names it. Nothing was charged, the invoice
// stays `finalized` with `payment_status` `pending`, it is not
// charged again automatically, dunning does not start (a run already
// open ends), and the customer is not emailed. The operator voids it
// or records a payment; Collect payment applies the customer's credit
// balance and pays it if that covers the amount, and otherwise asks
// Stripe again. Stripe's answer can change (for a converted charge the
// minimum is the settlement currency's), and a different answer ends
// this reason (2026-10-23).
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. `reconcile_payment` opens the payment in Stripe; it is offered on `payment_anomaly`, where the refund or correction is made there. `mark_uncollectible` opens the write-off and is offered only on a parked invoice (payment status unknown with no payment intent recorded), for a customer who paid another way: Hardcount records a payment that Stripe shows, and charges the invoice again if none appears within 24 hours. Dashboards render it as a secondary action. `void_invoice` is offered on prepaid-commit exposure, 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). It is also offered on `amount_below_minimum`, an amount Stripe will not charge (2026-10-23).
const ( AttentionActionAddPaymentMethod AttentionAction = "add_payment_method" AttentionActionChargeNow AttentionAction = "charge_now" AttentionActionConnectTaxProvider AttentionAction = "connect_tax_provider" AttentionActionEditBillingProfile AttentionAction = "edit_billing_profile" AttentionActionMarkUncollectible AttentionAction = "mark_uncollectible" AttentionActionReconcilePayment AttentionAction = "reconcile_payment" AttentionActionRetryPayment AttentionAction = "retry_payment" AttentionActionRetryTax AttentionAction = "retry_tax" AttentionActionReviewRegistration AttentionAction = "review_registration" AttentionActionRotateApiKey AttentionAction = "rotate_api_key" AttentionActionSendReminder AttentionAction = "send_reminder" AttentionActionUpdatePaymentMethod AttentionAction = "update_payment_method" AttentionActionVoidInvoice AttentionAction = "void_invoice" AttentionActionWaitProvider 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. `reconcile_payment` opens the
// payment in Stripe; it is offered on `payment_anomaly`, where the
// refund or correction is made there. `mark_uncollectible` opens
// the write-off and is offered only on a parked invoice (payment
// status unknown with no payment intent recorded), for a customer
// who paid another way: Hardcount records a payment that Stripe shows,
// and charges the invoice again if none appears within 24 hours.
// Dashboards render it as a secondary action. `void_invoice` is offered
// on prepaid-commit exposure, 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). It is also offered on
// `amount_below_minimum`, an amount Stripe will not charge
// (2026-10-23).
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 (2026-07-28). A dunning run already open on the invoice keeps retrying it through the pause, and `message` then says so; with no open run it is not charged automatically until collection resumes. `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). `dispute_lost` reports a payment on the invoice that the customer disputed with their bank and that the dispute took back (the dispute closed as `lost`). Hardcount leaves the invoice paid and moves no money; the operator records the loss. Surfaced on paid invoices. On an invoice that bought prepaid credit, the message also says how much of the credit is still spendable and names commit relief, because an ordinary credit note is refused there. When the invoice also has `payment_anomaly`, that reason stays and its message asks the operator to check Stripe before any refund. The disputes themselves are at `GET /v1/invoices/{id}/disputes` (2026-10-19). `amount_below_minimum` reports an invoice Stripe refused to charge, or refused a payment page for, because the amount is below Stripe's minimum charge. The minimum depends on the currency the Stripe account settles in; Stripe's reply, in `provider_response`, names it. Nothing was charged, the invoice stays `finalized` with `payment_status` `pending`, it is not charged again automatically, dunning does not start (a run already open ends), and the customer is not emailed. The operator voids it or records a payment; Collect payment applies the customer's credit balance and pays it if that covers the amount, and otherwise asks Stripe again. Stripe's answer can change (for a converted charge the minimum is the settlement currency's), and a different answer ends this reason (2026-10-23).
const ( AttentionReasonAmountBelowMinimum AttentionReason = "amount_below_minimum" AttentionReasonAwaitingPayment AttentionReason = "awaiting_payment" AttentionReasonCollectionPaused AttentionReason = "collection_paused" AttentionReasonCommitExposure AttentionReason = "commit_exposure" AttentionReasonDisputeLost AttentionReason = "dispute_lost" AttentionReasonDunningExhausted AttentionReason = "dunning_exhausted" AttentionReasonNoPaymentMethod AttentionReason = "no_payment_method" AttentionReasonPaymentAnomaly AttentionReason = "payment_anomaly" AttentionReasonPaymentFailed AttentionReason = "payment_failed" AttentionReasonPaymentProcessing AttentionReason = "payment_processing" AttentionReasonPaymentScheduled AttentionReason = "payment_scheduled" AttentionReasonPaymentUnconfirmed AttentionReason = "payment_unconfirmed" AttentionReasonTaxCalculationFailed AttentionReason = "tax_calculation_failed" AttentionReasonTaxLocationRequired 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 ( AttentionSeverityCritical AttentionSeverity = "critical" AttentionSeverityInfo AttentionSeverity = "info" AttentionSeverityWarning 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 AuditLogEntry ¶
type AuditLogEntry struct {
// Action For example `create`, `update`, `revoke`, `finalize`.
Action string `json:"action"`
// ActorId User id, API key id, or `system`.
ActorId string `json:"actor_id"`
// ActorName Name of the API key, when the actor is a key.
ActorName string `json:"actor_name,omitempty"`
ActorType AuditLogEntryActorType `json:"actor_type"`
CreatedAt time.Time `json:"created_at"`
Id string `json:"id"`
IpAddress string `json:"ip_address,omitempty"`
// Metadata Action details. A settings change lists each changed field with `from` and `to`.
Metadata map[string]interface{} `json:"metadata,omitempty"`
// RequestId Matches the `Hardcount-Request-Id` header of the request that made the change.
RequestId string `json:"request_id,omitempty"`
// ResourceId Can be empty for tenant-wide resources such as settings.
ResourceId string `json:"resource_id"`
ResourceLabel string `json:"resource_label,omitempty"`
ResourceType string `json:"resource_type"`
// SimEffectiveAt Simulated time, for entries made inside a test clock.
SimEffectiveAt time.Time `json:"sim_effective_at,omitempty"`
// SubjectDeleted The resource no longer exists because its test clock was deleted. The entry is kept.
SubjectDeleted bool `json:"subject_deleted,omitempty"`
TenantId string `json:"tenant_id,omitempty"`
TestClockId string `json:"test_clock_id,omitempty"`
}
AuditLogEntry defines model for AuditLogEntry.
type AuditLogEntryActorType ¶
type AuditLogEntryActorType string
AuditLogEntryActorType defines model for AuditLogEntry.ActorType.
const ( AuditLogEntryActorTypeApiKey AuditLogEntryActorType = "api_key" AuditLogEntryActorTypeSystem AuditLogEntryActorType = "system" AuditLogEntryActorTypeUser AuditLogEntryActorType = "user" )
Defines values for AuditLogEntryActorType.
func (AuditLogEntryActorType) Valid ¶
func (e AuditLogEntryActorType) Valid() bool
Valid indicates whether the value is a known member of the AuditLogEntryActorType enum.
type AuditLogFilters ¶
type AuditLogFilters struct {
Actions []string `json:"actions"`
ResourceTypes []string `json:"resource_types"`
// TestClocks Test clocks seen in the log, most recent activity first.
TestClocks []struct {
Id string `json:"id"`
Name string `json:"name"`
} `json:"test_clocks"`
}
AuditLogFilters defines model for AuditLogFilters.
type BackfillUsageEventJSONBody ¶
type BackfillUsageEventJSONBody struct {
// Dimensions Scalar labels of the event. A price takes an event whose labels include the price's `dimension_match`.
Dimensions map[string]interface{} `json:"dimensions,omitempty"`
// EventName The meter's `event_name` (e.g. "tokens").
EventName string `json:"event_name"`
// ExternalCustomerId The customer's external_id (your identifier), not the internal hc_cus_ id.
ExternalCustomerId string `json:"external_customer_id"`
// IdempotencyKey Your unique ID for this event. Pick it once, before the
// first send, and send the same key on every retry of the
// event. Keys are unique per tenant and mode (live or
// test), forever. An event whose key was already used is
// not stored again: the first event wins and the new body
// is discarded. So never reuse a key for a different
// event, such as a batch index or a timestamp that can
// repeat, or that usage is lost. Empty or whitespace-only
// keys are refused with 422, and so are keys longer than
// 255 characters. This is the only dedup key: the usage
// routes ignore the `Idempotency-Key` header.
IdempotencyKey string `json:"idempotency_key"`
// Quantity A JSON number (`5`) or a string holding one (`"5.5"`,
// for exact decimals). At most 12 decimal places; trailing
// zeros do not count. Its size must be under 10^26, and it
// is at most 100 characters. A negative value is a
// correction. A missing quantity, or any other value, is
// refused with 422 and `param: quantity`.
Quantity BackfillUsageEventJSONBody_Quantity `json:"quantity"`
// Timestamp RFC 3339. Must not be in the future.
Timestamp time.Time `json:"timestamp"`
}
BackfillUsageEventJSONBody defines parameters for BackfillUsageEvent.
type BackfillUsageEventJSONBodyQuantity0 ¶
type BackfillUsageEventJSONBodyQuantity0 = float32
BackfillUsageEventJSONBodyQuantity0 defines parameters for BackfillUsageEvent.
type BackfillUsageEventJSONBodyQuantity1 ¶
type BackfillUsageEventJSONBodyQuantity1 = string
BackfillUsageEventJSONBodyQuantity1 defines parameters for BackfillUsageEvent.
type BackfillUsageEventJSONBody_Quantity ¶
type BackfillUsageEventJSONBody_Quantity struct {
// contains filtered or unexported fields
}
BackfillUsageEventJSONBody_Quantity defines parameters for BackfillUsageEvent.
func (BackfillUsageEventJSONBody_Quantity) AsBackfillUsageEventJSONBodyQuantity0 ¶
func (t BackfillUsageEventJSONBody_Quantity) AsBackfillUsageEventJSONBodyQuantity0() (BackfillUsageEventJSONBodyQuantity0, error)
AsBackfillUsageEventJSONBodyQuantity0 returns the union data inside the BackfillUsageEventJSONBody_Quantity as a BackfillUsageEventJSONBodyQuantity0
func (BackfillUsageEventJSONBody_Quantity) AsBackfillUsageEventJSONBodyQuantity1 ¶
func (t BackfillUsageEventJSONBody_Quantity) AsBackfillUsageEventJSONBodyQuantity1() (BackfillUsageEventJSONBodyQuantity1, error)
AsBackfillUsageEventJSONBodyQuantity1 returns the union data inside the BackfillUsageEventJSONBody_Quantity as a BackfillUsageEventJSONBodyQuantity1
func (*BackfillUsageEventJSONBody_Quantity) FromBackfillUsageEventJSONBodyQuantity0 ¶
func (t *BackfillUsageEventJSONBody_Quantity) FromBackfillUsageEventJSONBodyQuantity0(v BackfillUsageEventJSONBodyQuantity0) error
FromBackfillUsageEventJSONBodyQuantity0 overwrites any union data inside the BackfillUsageEventJSONBody_Quantity as the provided BackfillUsageEventJSONBodyQuantity0
func (*BackfillUsageEventJSONBody_Quantity) FromBackfillUsageEventJSONBodyQuantity1 ¶
func (t *BackfillUsageEventJSONBody_Quantity) FromBackfillUsageEventJSONBodyQuantity1(v BackfillUsageEventJSONBodyQuantity1) error
FromBackfillUsageEventJSONBodyQuantity1 overwrites any union data inside the BackfillUsageEventJSONBody_Quantity as the provided BackfillUsageEventJSONBodyQuantity1
func (BackfillUsageEventJSONBody_Quantity) MarshalJSON ¶
func (t BackfillUsageEventJSONBody_Quantity) MarshalJSON() ([]byte, error)
func (*BackfillUsageEventJSONBody_Quantity) MergeBackfillUsageEventJSONBodyQuantity0 ¶
func (t *BackfillUsageEventJSONBody_Quantity) MergeBackfillUsageEventJSONBodyQuantity0(v BackfillUsageEventJSONBodyQuantity0) error
MergeBackfillUsageEventJSONBodyQuantity0 performs a merge with any union data inside the BackfillUsageEventJSONBody_Quantity, using the provided BackfillUsageEventJSONBodyQuantity0
func (*BackfillUsageEventJSONBody_Quantity) MergeBackfillUsageEventJSONBodyQuantity1 ¶
func (t *BackfillUsageEventJSONBody_Quantity) MergeBackfillUsageEventJSONBodyQuantity1(v BackfillUsageEventJSONBodyQuantity1) error
MergeBackfillUsageEventJSONBodyQuantity1 performs a merge with any union data inside the BackfillUsageEventJSONBody_Quantity, using the provided BackfillUsageEventJSONBodyQuantity1
func (*BackfillUsageEventJSONBody_Quantity) UnmarshalJSON ¶
func (t *BackfillUsageEventJSONBody_Quantity) UnmarshalJSON(b []byte) error
type BackfillUsageEventJSONRequestBody ¶
type BackfillUsageEventJSONRequestBody BackfillUsageEventJSONBody
BackfillUsageEventJSONRequestBody defines body for BackfillUsageEvent for application/json ContentType.
type BillingFailure ¶
type BillingFailure struct {
// Attempts Failed attempts on the work that is due now. At least 1.
Attempts int `json:"attempts"`
// FailedAt When the latest attempt failed.
FailedAt time.Time `json:"failed_at"`
// LastError Why the latest attempt failed: a sentence an operator can act
// on, or a generic line carrying the subscription id as the
// reference to search the server log for. Never raw error text.
LastError string `json:"last_error"`
// MaxAttempts The attempt at which the subscription parks (8).
MaxAttempts int `json:"max_attempts"`
// NextAttemptAt The billing run does not attempt the subscription before this
// instant. The attempt happens on the first run at or after it,
// so on an hourly schedule it can be up to an hour later. Absent
// when parked.
NextAttemptAt time.Time `json:"next_attempt_at,omitempty"`
// Parked True when automatic attempts have stopped.
Parked bool `json:"parked"`
}
BillingFailure Present on a subscription while the billing run is failing on the work that subscription has due now (a period close, or a scheduled mid-period cancel). Absent otherwise: a subscription that bills cleanly, or whose due work changed, carries no `billing_failure`.
After each failed attempt the billing run waits before the next one: 15 minutes, 1 hour, 4 hours, 12 hours, then 24 hours three times. The eighth failure parks the subscription (`parked: true`, no `next_attempt_at`). A parked subscription is not attempted again until `POST /v1/subscriptions/{id}/retry-billing` is called.
Never set on a subscription attached to a test clock.
type BootstrapJSONBody ¶
type BootstrapJSONBody struct {
// OwnerEmail Must contain `@`.
OwnerEmail string `json:"owner_email,omitempty"`
// OwnerPassword 12 or more characters, at most 72 bytes, and not a common password from a leaked-password list. Omit to have Hardcount generate one.
OwnerPassword string `json:"owner_password,omitempty"`
TenantName string `json:"tenant_name,omitempty"`
// Token The value of `HARDCOUNT_BOOTSTRAP_TOKEN`. Or send it as a Bearer token.
Token string `json:"token,omitempty"`
}
BootstrapJSONBody defines parameters for Bootstrap.
type BootstrapJSONRequestBody ¶
type BootstrapJSONRequestBody BootstrapJSONBody
BootstrapJSONRequestBody defines body for Bootstrap for application/json ContentType.
type BootstrapResult ¶
type BootstrapResult struct {
Message string `json:"message"`
// OwnerEmail Dashboard login email.
OwnerEmail string `json:"owner_email"`
// OwnerPassword Dashboard login password (the one you sent, or the generated one).
OwnerPassword string `json:"owner_password"`
PasswordGenerated bool `json:"password_generated"`
// SecretKeyLive Live-mode secret key (`hc_secret_live_...`).
SecretKeyLive string `json:"secret_key_live"`
// SecretKeyTest Test-mode secret key (`hc_secret_test_...`).
SecretKeyTest string `json:"secret_key_test"`
Tenant Tenant `json:"tenant"`
}
BootstrapResult defines model for BootstrapResult.
type CancelSubscriptionParams ¶
type CancelSubscriptionParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CancelSubscriptionParams defines parameters for CancelSubscription.
type CheckPasswordResetToken200JSONResponseBodyValid ¶
type CheckPasswordResetToken200JSONResponseBodyValid bool
CheckPasswordResetToken200JSONResponseBodyValid defines parameters for CheckPasswordResetToken.
const (
True CheckPasswordResetToken200JSONResponseBodyValid = true
)
Defines values for CheckPasswordResetToken200JSONResponseBodyValid.
func (CheckPasswordResetToken200JSONResponseBodyValid) Valid ¶
func (e CheckPasswordResetToken200JSONResponseBodyValid) Valid() bool
Valid indicates whether the value is a known member of the CheckPasswordResetToken200JSONResponseBodyValid enum.
type CheckPasswordResetTokenParams ¶
type CheckPasswordResetTokenParams struct {
// Token The token from the reset link.
Token string `form:"token" json:"token"`
}
CheckPasswordResetTokenParams defines parameters for CheckPasswordResetToken.
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type CollectInvoicePaymentParams ¶
type CollectInvoicePaymentParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CollectInvoicePaymentParams defines parameters for CollectInvoicePayment.
type ConnectStripeJSONBody ¶
type ConnectStripeJSONBody struct {
// Livemode false = test-mode keys, true = live-mode keys.
Livemode bool `json:"livemode"`
// PublishableKey Publishable (`pk_`) key for this mode.
PublishableKey string `json:"publishable_key"`
// SecretKey Secret (`sk_`) or restricted (`rk_`) key for this mode.
SecretKey string `json:"secret_key"`
// WebhookSecret Optional. The `whsec_` signing secret of the Stripe webhook endpoint. Can be added later with PATCH.
WebhookSecret string `json:"webhook_secret,omitempty"`
}
ConnectStripeJSONBody defines parameters for ConnectStripe.
type ConnectStripeJSONRequestBody ¶
type ConnectStripeJSONRequestBody ConnectStripeJSONBody
ConnectStripeJSONRequestBody defines body for ConnectStripe for application/json ContentType.
type ConnectStripeParams ¶
type ConnectStripeParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
ConnectStripeParams defines parameters for ConnectStripe.
type CreateApiKeyJSONBody ¶
type CreateApiKeyJSONBody struct {
// ExpiresAt Optional. Must be in the future. Omit for a key that does not expire.
ExpiresAt time.Time `json:"expires_at,omitempty"`
KeyType CreateApiKeyJSONBodyKeyType `json:"key_type,omitempty"`
// Name Label shown in the key list. Must not be blank.
Name string `json:"name"`
}
CreateApiKeyJSONBody defines parameters for CreateApiKey.
type CreateApiKeyJSONBodyKeyType ¶
type CreateApiKeyJSONBodyKeyType string
CreateApiKeyJSONBodyKeyType defines parameters for CreateApiKey.
const ( CreateApiKeyJSONBodyKeyTypePlatform CreateApiKeyJSONBodyKeyType = "platform" CreateApiKeyJSONBodyKeyTypeSecret CreateApiKeyJSONBodyKeyType = "secret" )
Defines values for CreateApiKeyJSONBodyKeyType.
func (CreateApiKeyJSONBodyKeyType) Valid ¶
func (e CreateApiKeyJSONBodyKeyType) Valid() bool
Valid indicates whether the value is a known member of the CreateApiKeyJSONBodyKeyType enum.
type CreateApiKeyJSONRequestBody ¶
type CreateApiKeyJSONRequestBody CreateApiKeyJSONBody
CreateApiKeyJSONRequestBody defines body for CreateApiKey for application/json ContentType.
type CreateApiKeyParams ¶
type CreateApiKeyParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateApiKeyParams defines parameters for CreateApiKey.
type CreateCustomerPaymentSetupSessionJSONBody ¶
type CreateCustomerPaymentSetupSessionJSONBody struct {
// ReturnUrl Where Stripe sends the customer afterwards. Defaults to
// the dashboard's setup-complete page.
ReturnUrl string `json:"return_url,omitempty"`
}
CreateCustomerPaymentSetupSessionJSONBody defines parameters for CreateCustomerPaymentSetupSession.
type CreateCustomerPaymentSetupSessionJSONRequestBody ¶
type CreateCustomerPaymentSetupSessionJSONRequestBody CreateCustomerPaymentSetupSessionJSONBody
CreateCustomerPaymentSetupSessionJSONRequestBody defines body for CreateCustomerPaymentSetupSession for application/json ContentType.
type CreateCustomerPaymentSetupSessionParams ¶
type CreateCustomerPaymentSetupSessionParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateCustomerPaymentSetupSessionParams defines parameters for CreateCustomerPaymentSetupSession.
type CreateDunningPolicyJSONRequestBody ¶
type CreateDunningPolicyJSONRequestBody = DunningPolicyInput
CreateDunningPolicyJSONRequestBody defines body for CreateDunningPolicy for application/json ContentType.
type CreateDunningPolicyParams ¶
type CreateDunningPolicyParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateDunningPolicyParams defines parameters for CreateDunningPolicy.
type CreateInvoiceJSONRequestBody ¶
type CreateInvoiceJSONRequestBody = InvoiceCreateRequest
CreateInvoiceJSONRequestBody defines body for CreateInvoice for application/json ContentType.
type CreateInvoiceParams ¶
type CreateInvoiceParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateInvoiceParams defines parameters for CreateInvoice.
type CreatePriceOverrideJSONBody ¶
type CreatePriceOverrideJSONBody struct {
CustomerId string `json:"customer_id"`
// Mode As on PriceShape, also for the fields a mode does not use.
Mode CreatePriceOverrideJSONBodyMode `json:"mode"`
// PackageAmountCents Price of one package in cents, as a decimal string, with the limits of `unit_amount_cents`. Used when `mode` is `package`.
PackageAmountCents string `json:"package_amount_cents,omitempty"`
// PackageSize Used when `mode` is `package`. Must be above 0.
PackageSize int64 `json:"package_size,omitempty"`
// PriceId The plan price to override.
PriceId string `json:"price_id"`
Reason string `json:"reason,omitempty"`
// Tiers Used when `mode` is `graduated`. Each `up_to` is a whole number above the one before. The last tier has `up_to: null` (no upper bound), and only the last. Otherwise 422 with `param` `tiers`.
Tiers []struct {
// UnitAmountCents Price per unit in cents in this tier, as a decimal string, with the limits of `unit_amount_cents`. A refusal names `tiers[i].unit_amount_cents` (i counts from 0).
UnitAmountCents string `json:"unit_amount_cents,omitempty"`
UpTo int64 `json:"up_to,omitempty"`
} `json:"tiers,omitempty"`
// UnitAmountCents Price per unit in cents, as a decimal string. Used when `mode` is `per_unit`. 0 or more, under 10^18, at most 12 decimal places (trailing zeros do not count), and at most 100 characters. A JSON number is also read. A value outside them is refused with 422 and `param` naming the field.
UnitAmountCents string `json:"unit_amount_cents,omitempty"`
}
CreatePriceOverrideJSONBody defines parameters for CreatePriceOverride.
type CreatePriceOverrideJSONBodyMode ¶
type CreatePriceOverrideJSONBodyMode string
CreatePriceOverrideJSONBodyMode defines parameters for CreatePriceOverride.
const ( CreatePriceOverrideJSONBodyModeGraduated CreatePriceOverrideJSONBodyMode = "graduated" CreatePriceOverrideJSONBodyModePackage CreatePriceOverrideJSONBodyMode = "package" CreatePriceOverrideJSONBodyModePerUnit CreatePriceOverrideJSONBodyMode = "per_unit" )
Defines values for CreatePriceOverrideJSONBodyMode.
func (CreatePriceOverrideJSONBodyMode) Valid ¶
func (e CreatePriceOverrideJSONBodyMode) Valid() bool
Valid indicates whether the value is a known member of the CreatePriceOverrideJSONBodyMode enum.
type CreatePriceOverrideJSONRequestBody ¶
type CreatePriceOverrideJSONRequestBody CreatePriceOverrideJSONBody
CreatePriceOverrideJSONRequestBody defines body for CreatePriceOverride for application/json ContentType.
type CreatePriceOverrideParams ¶
type CreatePriceOverrideParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreatePriceOverrideParams defines parameters for CreatePriceOverride.
type CreateTenantJSONBody ¶
type CreateTenantJSONBody struct {
// Name Must not be blank.
Name string `json:"name"`
}
CreateTenantJSONBody defines parameters for CreateTenant.
type CreateTenantJSONRequestBody ¶
type CreateTenantJSONRequestBody CreateTenantJSONBody
CreateTenantJSONRequestBody defines body for CreateTenant for application/json ContentType.
type CreditBalance ¶
type CreditBalance struct {
BalanceCents int64 `json:"balance_cents"`
// Currency The currency of this balance, uppercase. Each credit ledger entry stores its own currency, and credit pays only invoices in that currency. A customer with credit in two currencies has two balances; they are never added together or converted.
Currency string `json:"currency"`
CustomerId string `json:"customer_id"`
// TotalDeducted Credit an operator deducted (a negative adjustment).
TotalDeducted int64 `json:"total_deducted"`
// TotalExpired Credit written off by expiry.
TotalExpired int64 `json:"total_expired"`
// TotalGranted Every credit added: grants, positive adjustments, and credit given back when an invoice it was applied to was voided.
TotalGranted int64 `json:"total_granted"`
// TotalRetired Prepaid commit credit taken back because the invoice that funded it was voided or refunded by a credit note.
TotalRetired int64 `json:"total_retired"`
// TotalUsed Credit applied to invoices.
TotalUsed int64 `json:"total_used"`
}
CreditBalance A customer's credit balance in one currency and where that credit went. Every cent granted is either still in the balance or in one of the totals: total_granted = total_used + total_expired + total_retired + total_deducted + balance_cents.
type CreditGrantBlock ¶
type CreditGrantBlock struct {
// AmountCents The credit the block started with.
AmountCents int64 `json:"amount_cents"`
// ConsumedCents Everything drawn from the block: used by invoices, expired,
// retired and deducted.
ConsumedCents int64 `json:"consumed_cents"`
CreatedAt time.Time `json:"created_at"`
// Currency The block's currency, uppercase.
Currency string `json:"currency"`
// DeductedCents The part an operator removed with a negative adjustment.
DeductedCents int64 `json:"deducted_cents"`
Description string `json:"description"`
// EntryType `grant` or `adjustment`.
EntryType string `json:"entry_type"`
// ExpiredCents The part that expired unused.
ExpiredCents int64 `json:"expired_cents"`
// ExpiresAt The credit can be drawn up to and including this instant; a
// period invoice draws it when its period ends at or before it.
// The dashboard sends the local midnight after the picked day.
ExpiresAt time.Time `json:"expires_at,omitempty"`
// GrantKind Absent for unclassified credit.
GrantKind CreditGrantBlockGrantKind `json:"grant_kind,omitempty"`
// Id The ledger entry that added the credit.
Id string `json:"id"`
RemainingCents int64 `json:"remaining_cents"`
// RetiredCents Commit credit taken back when the invoice that paid for it was
// voided, or refunded by a credit note.
RetiredCents int64 `json:"retired_cents"`
// SourceInvoiceId For a `commit` block, the invoice that paid for it.
SourceInvoiceId string `json:"source_invoice_id,omitempty"`
}
CreditGrantBlock One block of credit on a customer's balance (a grant or a positive adjustment) and how much of it is left.
type CreditGrantBlockGrantKind ¶
type CreditGrantBlockGrantKind string
CreditGrantBlockGrantKind Absent for unclassified credit.
const ( CreditGrantBlockGrantKindCommit CreditGrantBlockGrantKind = "commit" CreditGrantBlockGrantKindPromotional CreditGrantBlockGrantKind = "promotional" )
Defines values for CreditGrantBlockGrantKind.
func (CreditGrantBlockGrantKind) Valid ¶
func (e CreditGrantBlockGrantKind) Valid() bool
Valid indicates whether the value is a known member of the CreditGrantBlockGrantKind enum.
type CreditGrants ¶
type CreditGrants struct {
Grants []CreditGrantBlock `json:"grants"`
// RemainingByCurrency One entry per currency with credit left, ordered by currency.
RemainingByCurrency []struct {
// CommitRemainingCents Remaining credit the customer paid for (`commit`).
CommitRemainingCents int64 `json:"commit_remaining_cents"`
Currency string `json:"currency"`
// OtherRemainingCents Remaining credit with no kind, such as adjustments and credit-note credit.
OtherRemainingCents int64 `json:"other_remaining_cents"`
// PromotionalRemainingCents Remaining free credit (`promotional`).
PromotionalRemainingCents int64 `json:"promotional_remaining_cents"`
} `json:"remaining_by_currency"`
}
CreditGrants A customer's credit blocks, newest first, with the remaining credit added up by currency and kind.
type CreditLedgerEntry ¶
type CreditLedgerEntry struct {
// AmountCents Positive adds credit, negative removes it.
AmountCents int64 `json:"amount_cents"`
// BalanceAfter The customer's credit balance in this entry's currency after it, in cents.
BalanceAfter int64 `json:"balance_after"`
// ConsumedCents For entries that add credit, how much has been used or expired.
ConsumedCents int64 `json:"consumed_cents,omitempty"`
CreatedAt time.Time `json:"created_at"`
// Currency The entry's currency, uppercase. Credit pays only invoices in its own currency.
Currency string `json:"currency"`
CustomerId string `json:"customer_id"`
Description string `json:"description"`
EntryType CreditLedgerEntryEntryType `json:"entry_type"`
// ExpiresAt On a grant, its expiry. The credit can be drawn up to and
// including this instant; a period invoice draws it when its
// period ends at or before it. The dashboard sends the local
// midnight after the picked day.
ExpiresAt time.Time `json:"expires_at,omitempty"`
GrantKind CreditLedgerEntryGrantKind `json:"grant_kind,omitempty"`
Id string `json:"id"`
InvoiceId string `json:"invoice_id,omitempty"`
Metadata map[string]interface{} `json:"metadata,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"`
// SourceCreditNoteId The credit note that granted this credit to the balance.
SourceCreditNoteId string `json:"source_credit_note_id,omitempty"`
// SourceInvoiceId For a `commit` grant, the invoice that paid for it.
SourceInvoiceId string `json:"source_invoice_id,omitempty"`
// SourceInvoiceReversalId The voided invoice whose applied credit this entry gave back.
SourceInvoiceReversalId string `json:"source_invoice_reversal_id,omitempty"`
SourcePlanChangedAt time.Time `json:"source_plan_changed_at,omitempty"`
// SourceSubscriptionId With `source_subscription_item_id`, `source_plan_changed_at` and
// `source_change_type`, set on a proration credit: the subscription
// change that produced it.
SourceSubscriptionId string `json:"source_subscription_id,omitempty"`
SourceSubscriptionItemId string `json:"source_subscription_item_id,omitempty"`
TenantId string `json:"tenant_id,omitempty"`
}
CreditLedgerEntry defines model for CreditLedgerEntry.
type CreditLedgerEntryEntryType ¶
type CreditLedgerEntryEntryType string
CreditLedgerEntryEntryType defines model for CreditLedgerEntry.EntryType.
const ( CreditLedgerEntryEntryTypeAdjustment CreditLedgerEntryEntryType = "adjustment" CreditLedgerEntryEntryTypeExpiry CreditLedgerEntryEntryType = "expiry" CreditLedgerEntryEntryTypeGrant CreditLedgerEntryEntryType = "grant" CreditLedgerEntryEntryTypeUsage CreditLedgerEntryEntryType = "usage" )
Defines values for CreditLedgerEntryEntryType.
func (CreditLedgerEntryEntryType) Valid ¶
func (e CreditLedgerEntryEntryType) Valid() bool
Valid indicates whether the value is a known member of the CreditLedgerEntryEntryType enum.
type CreditLedgerEntryGrantKind ¶
type CreditLedgerEntryGrantKind string
CreditLedgerEntryGrantKind defines model for CreditLedgerEntry.GrantKind.
const ( CreditLedgerEntryGrantKindCommit CreditLedgerEntryGrantKind = "commit" CreditLedgerEntryGrantKindPromotional CreditLedgerEntryGrantKind = "promotional" )
Defines values for CreditLedgerEntryGrantKind.
func (CreditLedgerEntryGrantKind) Valid ¶
func (e CreditLedgerEntryGrantKind) Valid() bool
Valid indicates whether the value is a known member of the CreditLedgerEntryGrantKind enum.
type CreditLiveBalance ¶
type CreditLiveBalance struct {
// Balances Ordered by currency.
Balances []CreditLiveCurrency `json:"balances"`
// ComputedAt When the server computed these figures.
ComputedAt time.Time `json:"computed_at"`
CustomerId string `json:"customer_id"`
}
CreditLiveBalance A customer's credit position right now, one entry per currency: every currency the customer holds credit in, and every currency a live subscription will invoice usage in. Amounts in two currencies are never added together.
type CreditLiveCurrency ¶
type CreditLiveCurrency struct {
// BalanceCents Settled ledger balance in this currency, less what is left of any grant past its expiry date that the hourly expiry run has not written off yet (an invoice cannot draw on such a grant). Can be negative.
BalanceCents int64 `json:"balance_cents"`
Currency string `json:"currency"`
// EstimatedRemainingCents `balance_cents` minus `unbilled_usage_cents`, floored at zero. To see how far past zero a customer is, subtract the two parts yourself.
EstimatedRemainingCents int64 `json:"estimated_remaining_cents"`
// UnbilledUsageCents Metered usage that the next invoice of each subscription invoiced in this currency will bill, priced as the period close prices it. Usage that a mid-period threshold invoice already billed is not counted again. After a mid-period plan change each meter is counted for the time a plan carrying it was on the subscription. For a trialing subscription only usage inside its first paid period counts; that period starts at the beginning of the day the trial ends.
UnbilledUsageCents int64 `json:"unbilled_usage_cents"`
}
CreditLiveCurrency The live position in one currency. `balance_cents` is the credit the customer can spend in it: the settled ledger balance, which moves only when an invoice, grant, adjustment or expiry is written, less any grant that is past its expiry date and not yet written off. `unbilled_usage_cents` is the usage of the current period that no invoice has billed yet and that will be invoiced in this currency. `estimated_remaining_cents` is the first minus the second, never below zero.
type CreditNote ¶
type CreditNote struct {
// BillToSnapshot What an issued invoice or credit note prints about its buyer, copied
// when the document was issued (ADR-109). The printed name is
// `legal_name` when set, otherwise `display_name`.
BillToSnapshot DocumentBillTo `json:"bill_to_snapshot,omitempty"`
// CommitRetiredCents Prepaid commit credits this note retired. Absent on other notes.
CommitRetiredCents int64 `json:"commit_retired_cents,omitempty"`
CreatedAt time.Time `json:"created_at"`
CreditAmountCents int64 `json:"credit_amount_cents"`
CreditNoteNumber string `json:"credit_note_number"`
Currency string `json:"currency"`
CustomerId string `json:"customer_id"`
Id string `json:"id"`
InvoiceId string `json:"invoice_id"`
// IsSimulated True when `issued_at` is test-clock time.
IsSimulated bool `json:"is_simulated"`
// IssuePending True on a draft that Hardcount will issue automatically.
IssuePending bool `json:"issue_pending"`
IssuedAt time.Time `json:"issued_at,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
OutOfBandAmountCents int64 `json:"out_of_band_amount_cents"`
Reason string `json:"reason"`
// RecordedAt Real-world time the row was written, when `created_at` is test-clock time.
RecordedAt time.Time `json:"recorded_at,omitempty"`
RefundAmountCents int64 `json:"refund_amount_cents"`
// RefundStatus The refund part's state at Stripe. `unknown`: Stripe gave no
// clear answer (a timeout, a network error, a Stripe 5xx, a 409 or
// a 429), so the customer may already be refunded. Don't refund it
// again in the Stripe Dashboard. Retry it with
// `POST /v1/credit-notes/{id}/retry-refund`, which looks for the
// refund at Stripe first and then resends the same request with
// the same idempotency key.
RefundStatus CreditNoteRefundStatus `json:"refund_status"`
Status CreditNoteStatus `json:"status"`
StripeRefundId string `json:"stripe_refund_id,omitempty"`
SubtotalCents int64 `json:"subtotal_cents"`
// SupplierSnapshot What an issued invoice or credit note prints about its seller (the
// tenant's company), copied when the document was issued (ADR-109).
SupplierSnapshot DocumentSupplier `json:"supplier_snapshot,omitempty"`
TaxAmountCents int64 `json:"tax_amount_cents"`
// TaxReversalPending True when the tax reversal failed and will be retried.
TaxReversalPending bool `json:"tax_reversal_pending"`
// TaxTransactionId Tax provider's reversal transaction, set when the note is issued.
TaxTransactionId string `json:"tax_transaction_id,omitempty"`
TenantId string `json:"tenant_id,omitempty"`
TotalCents int64 `json:"total_cents"`
UpdatedAt time.Time `json:"updated_at"`
VoidedAt time.Time `json:"voided_at,omitempty"`
}
CreditNote A credit note reduces what a customer owes on an invoice, or gives money back after it was paid. Its total is split three ways: refund to the card (`refund_amount_cents`), credit to the customer's balance (`credit_amount_cents`), and money returned outside Hardcount (`out_of_band_amount_cents`).
type CreditNoteRefundStatus ¶
type CreditNoteRefundStatus string
CreditNoteRefundStatus The refund part's state at Stripe. `unknown`: Stripe gave no clear answer (a timeout, a network error, a Stripe 5xx, a 409 or a 429), so the customer may already be refunded. Don't refund it again in the Stripe Dashboard. Retry it with `POST /v1/credit-notes/{id}/retry-refund`, which looks for the refund at Stripe first and then resends the same request with the same idempotency key.
const ( CreditNoteRefundStatusFailed CreditNoteRefundStatus = "failed" CreditNoteRefundStatusNone CreditNoteRefundStatus = "none" CreditNoteRefundStatusPending CreditNoteRefundStatus = "pending" CreditNoteRefundStatusSucceeded CreditNoteRefundStatus = "succeeded" CreditNoteRefundStatusUnknown CreditNoteRefundStatus = "unknown" )
Defines values for CreditNoteRefundStatus.
func (CreditNoteRefundStatus) Valid ¶
func (e CreditNoteRefundStatus) Valid() bool
Valid indicates whether the value is a known member of the CreditNoteRefundStatus enum.
type CreditNoteStats ¶
type CreditNoteStats struct {
// ByCurrency Money on issued notes, one entry per currency, the tenant's
// default currency first. Empty when no note is issued.
ByCurrency []struct {
// CreditedCents Added to customers' credit balances.
CreditedCents int64 `json:"credited_cents"`
Currency string `json:"currency"`
// OutOfBandCents Recorded as paid back outside Stripe.
OutOfBandCents int64 `json:"out_of_band_cents"`
// RefundFailedCents Refunds that failed. No money went back to the card.
RefundFailedCents int64 `json:"refund_failed_cents"`
// RefundPendingCents Refunds not confirmed yet. Neither succeeded nor failed, the refund is waiting on Stripe, Stripe's answer was unclear, or its result was never recorded.
RefundPendingCents int64 `json:"refund_pending_cents"`
// RefundedCents Refunds that succeeded. A refund still pending or one that failed is not counted here.
RefundedCents int64 `json:"refunded_cents"`
// TotalCents Total of the issued notes.
TotalCents int64 `json:"total_cents"`
} `json:"by_currency"`
DraftCount int `json:"draft_count"`
IssuedCount int `json:"issued_count"`
VoidedCount int `json:"voided_count"`
}
CreditNoteStats defines model for CreditNoteStats.
type CreditNoteStatus ¶
type CreditNoteStatus string
CreditNoteStatus defines model for CreditNote.Status.
const ( CreditNoteStatusDraft CreditNoteStatus = "draft" CreditNoteStatusIssued CreditNoteStatus = "issued" CreditNoteStatusVoided CreditNoteStatus = "voided" )
Defines values for CreditNoteStatus.
func (CreditNoteStatus) Valid ¶
func (e CreditNoteStatus) Valid() bool
Valid indicates whether the value is a known member of the CreditNoteStatus enum.
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"`
DisplayName string `json:"display_name"`
// DunningPolicyId Assigned dunning policy; absent means the tenant default.
DunningPolicyId string `json:"dunning_policy_id,omitempty"`
Email string `json:"email,omitempty"`
EmailBounceReason string `json:"email_bounce_reason,omitempty"`
EmailLastBouncedAt time.Time `json:"email_last_bounced_at,omitempty"`
// EmailStatus Deliverability of `email`, learned from bounce and complaint reports.
EmailStatus CustomerEmailStatus `json:"email_status,omitempty"`
ExternalId string `json:"external_id"`
Id string `json:"id"`
Livemode bool `json:"livemode,omitempty"`
Status CustomerStatus `json:"status"`
// StripeCustomerId The Stripe customer. Absent until the first payment-method action.
StripeCustomerId string `json:"stripe_customer_id,omitempty"`
TenantId string `json:"tenant_id,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"`
UpdatedAt time.Time `json:"updated_at"`
}
Customer defines model for Customer.
type CustomerBillingProfile ¶
type CustomerBillingProfile struct {
AddressLine1 string `json:"address_line1,omitempty"`
AddressLine2 string `json:"address_line2,omitempty"`
City string `json:"city,omitempty"`
// Country ISO 3166 alpha-2 code, such as `US` or `IN`.
Country string `json:"country,omitempty"`
CreatedAt time.Time `json:"created_at"`
// Currency ISO 4217 code, such as `USD`. When set, invoices for this
// customer use it instead of the plan currency.
Currency string `json:"currency,omitempty"`
CustomerId string `json:"customer_id"`
LegalName string `json:"legal_name,omitempty"`
// Phone 7 to 20 characters of digits, spaces, `+`, `-`, `(`, `)`.
Phone string `json:"phone,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
// ProfileStatus Set by the server. `ready` when legal name, address line
// 1, city and country are all set.
ProfileStatus CustomerBillingProfileProfileStatus `json:"profile_status"`
State string `json:"state,omitempty"`
// TaxExemptReason Required when `tax_status` is `exempt`.
TaxExemptReason string `json:"tax_exempt_reason,omitempty"`
// TaxId Buyer tax ID. Required when `tax_status` is `reverse_charge`.
TaxId string `json:"tax_id"`
// TaxIdType Tax ID kind, stored as its Stripe code (for example `eu_vat`, `in_gst`).
TaxIdType string `json:"tax_id_type"`
// TaxStatus Defaults to `standard`.
TaxStatus CustomerBillingProfileTaxStatus `json:"tax_status"`
TenantId string `json:"tenant_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
CustomerBillingProfile defines model for CustomerBillingProfile.
type CustomerBillingProfileInput ¶
type CustomerBillingProfileInput struct {
AddressLine1 string `json:"address_line1,omitempty"`
AddressLine2 string `json:"address_line2,omitempty"`
City string `json:"city,omitempty"`
// Country ISO 3166 alpha-2 code, such as `US` or `IN`.
Country string `json:"country,omitempty"`
// Currency ISO 4217 code, such as `USD`. When set, invoices for this
// customer use it instead of the plan currency.
Currency string `json:"currency,omitempty"`
LegalName string `json:"legal_name,omitempty"`
// Phone 7 to 20 characters of digits, spaces, `+`, `-`, `(`, `)`.
Phone string `json:"phone,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
State string `json:"state,omitempty"`
// TaxExemptReason Required when `tax_status` is `exempt`.
TaxExemptReason string `json:"tax_exempt_reason,omitempty"`
// TaxId Buyer tax ID. Required when `tax_status` is `reverse_charge`.
TaxId string `json:"tax_id,omitempty"`
// TaxIdType Tax ID kind, stored as its Stripe code (for example `eu_vat`, `in_gst`).
TaxIdType string `json:"tax_id_type,omitempty"`
// TaxStatus Defaults to `standard`.
TaxStatus CustomerBillingProfileInputTaxStatus `json:"tax_status,omitempty"`
}
CustomerBillingProfileInput The billing details printed on invoices and used for tax. The whole profile is replaced on every write.
type CustomerBillingProfileInputTaxStatus ¶
type CustomerBillingProfileInputTaxStatus string
CustomerBillingProfileInputTaxStatus Defaults to `standard`.
const ( CustomerBillingProfileInputTaxStatusExempt CustomerBillingProfileInputTaxStatus = "exempt" CustomerBillingProfileInputTaxStatusReverseCharge CustomerBillingProfileInputTaxStatus = "reverse_charge" CustomerBillingProfileInputTaxStatusStandard CustomerBillingProfileInputTaxStatus = "standard" )
Defines values for CustomerBillingProfileInputTaxStatus.
func (CustomerBillingProfileInputTaxStatus) Valid ¶
func (e CustomerBillingProfileInputTaxStatus) Valid() bool
Valid indicates whether the value is a known member of the CustomerBillingProfileInputTaxStatus enum.
type CustomerBillingProfileProfileStatus ¶
type CustomerBillingProfileProfileStatus string
CustomerBillingProfileProfileStatus Set by the server. `ready` when legal name, address line 1, city and country are all set.
const ( CustomerBillingProfileProfileStatusIncomplete CustomerBillingProfileProfileStatus = "incomplete" CustomerBillingProfileProfileStatusReady CustomerBillingProfileProfileStatus = "ready" )
Defines values for CustomerBillingProfileProfileStatus.
func (CustomerBillingProfileProfileStatus) Valid ¶
func (e CustomerBillingProfileProfileStatus) Valid() bool
Valid indicates whether the value is a known member of the CustomerBillingProfileProfileStatus enum.
type CustomerBillingProfileTaxStatus ¶
type CustomerBillingProfileTaxStatus string
CustomerBillingProfileTaxStatus Defaults to `standard`.
const ( CustomerBillingProfileTaxStatusExempt CustomerBillingProfileTaxStatus = "exempt" CustomerBillingProfileTaxStatusReverseCharge CustomerBillingProfileTaxStatus = "reverse_charge" CustomerBillingProfileTaxStatusStandard CustomerBillingProfileTaxStatus = "standard" )
Defines values for CustomerBillingProfileTaxStatus.
func (CustomerBillingProfileTaxStatus) Valid ¶
func (e CustomerBillingProfileTaxStatus) Valid() bool
Valid indicates whether the value is a known member of the CustomerBillingProfileTaxStatus enum.
type CustomerEmailStatus ¶
type CustomerEmailStatus string
CustomerEmailStatus Deliverability of `email`, learned from bounce and complaint reports.
const ( CustomerEmailStatusBounced CustomerEmailStatus = "bounced" CustomerEmailStatusComplained CustomerEmailStatus = "complained" CustomerEmailStatusOk CustomerEmailStatus = "ok" CustomerEmailStatusUnknown CustomerEmailStatus = "unknown" )
Defines values for CustomerEmailStatus.
func (CustomerEmailStatus) Valid ¶
func (e CustomerEmailStatus) Valid() bool
Valid indicates whether the value is a known member of the CustomerEmailStatus enum.
type CustomerOverview ¶
type CustomerOverview struct {
ActiveSubscriptions []Subscription `json:"active_subscriptions"`
CustomerId string `json:"customer_id"`
// OutstandingBalance Invoices that are not draft, voided or uncollectible and
// whose payment is pending, failed or unknown.
OutstandingBalance struct {
// ByCurrency Amount due on the same invoices, one entry per currency, largest first. Empty when nothing is owed.
ByCurrency []struct {
AmountCents int64 `json:"amount_cents"`
Currency string `json:"currency"`
} `json:"by_currency"`
// TotalCents Sum of `amount_due_cents`. Amounts in different currencies are added together, so use `by_currency` to show an amount.
TotalCents int64 `json:"total_cents"`
UnpaidCount int `json:"unpaid_count"`
} `json:"outstanding_balance"`
// RecentInvoices The 5 newest invoices.
RecentInvoices []Invoice `json:"recent_invoices"`
}
CustomerOverview defines model for CustomerOverview.
type CustomerPriceOverride ¶
type CustomerPriceOverride struct {
Active bool `json:"active"`
// CreatedAt When the override starts, in the customer's time: wall time, or
// its test clock's time. A subscription already on the plan gets
// it from its next period; one that first joins the plan in a
// period after this instant gets it from the join.
CreatedAt time.Time `json:"created_at"`
CustomerId string `json:"customer_id"`
// DeactivatedAt When the override ended, in the customer's time. Absent while it is active.
DeactivatedAt time.Time `json:"deactivated_at,omitempty"`
Id string `json:"id"`
// Mode As on PriceShape.
Mode CustomerPriceOverrideMode `json:"mode"`
// PackageAmountCents Price of one package in cents, as a decimal string.
PackageAmountCents string `json:"package_amount_cents"`
PackageSize int64 `json:"package_size"`
// PriceId The plan price this override replaces the rate of, for this customer.
PriceId string `json:"price_id"`
Reason string `json:"reason,omitempty"`
TenantId string `json:"tenant_id,omitempty"`
// Tiers Empty (`[]`) unless `mode` is `graduated`.
Tiers []PriceTier `json:"tiers"`
// UnitAmountCents Price per unit in cents, as a decimal string.
UnitAmountCents string `json:"unit_amount_cents"`
UpdatedAt time.Time `json:"updated_at"`
}
CustomerPriceOverride A customer's negotiated rate for one plan price. It keeps applying when the price's rate changes, and ends when the price is removed. It takes the plan's currency.
type CustomerPriceOverrideMode ¶
type CustomerPriceOverrideMode string
CustomerPriceOverrideMode As on PriceShape.
const ( CustomerPriceOverrideModeGraduated CustomerPriceOverrideMode = "graduated" CustomerPriceOverrideModePackage CustomerPriceOverrideMode = "package" CustomerPriceOverrideModePerUnit CustomerPriceOverrideMode = "per_unit" )
Defines values for CustomerPriceOverrideMode.
func (CustomerPriceOverrideMode) Valid ¶
func (e CustomerPriceOverrideMode) Valid() bool
Valid indicates whether the value is a known member of the CustomerPriceOverrideMode enum.
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 CustomerUsage ¶
type CustomerUsage struct {
// Buckets One entry per UTC day in the period, including days with no usage.
Buckets []struct {
BucketStart time.Time `json:"bucket_start"`
// PerMeter Quantity per meter ID for that day, as a decimal string.
PerMeter map[string]string `json:"per_meter"`
} `json:"buckets"`
CustomerId string `json:"customer_id"`
Meters []CustomerUsageMeter `json:"meters"`
// Period The window the response covers. With no `from` and `to`
// (`current_billing_cycle`), each subscription is rated over its
// own current billing period, and the period runs from the
// earliest start to the latest end of those periods. A meter's
// totals and daily `buckets` cover its own subscription's whole
// period, including usage a threshold invoice already billed.
Period struct {
From time.Time `json:"from"`
// Source `current_billing_cycle`: no `from` and `to` were sent, and
// the amounts are what the period's invoices bill.
// `explicit`: the window you sent. Its amounts are an
// estimate, so a past window can differ from its invoices.
// Only active and trialing subscriptions are counted: the
// usage of a canceled subscription is left out. Each
// subscription's usage in the window is priced at the
// prices of its current billing period.
Source CustomerUsagePeriodSource `json:"source"`
To time.Time `json:"to"`
} `json:"period"`
// Subscriptions One entry per item of each active or trialing subscription. A
// subscription with several plans appears once per plan, with the
// same `id`.
Subscriptions []struct {
Currency string `json:"currency"`
CurrentPeriodEnd time.Time `json:"current_period_end"`
CurrentPeriodStart time.Time `json:"current_period_start"`
Id string `json:"id"`
PlanId string `json:"plan_id"`
PlanName string `json:"plan_name"`
} `json:"subscriptions"`
// Totals One entry per currency.
Totals []struct {
AmountCents int64 `json:"amount_cents"`
Currency string `json:"currency"`
} `json:"totals"`
// Warnings Problems found working out this usage, in words, such as usage
// that no price takes or a meter whose usage went below zero.
Warnings []string `json:"warnings"`
}
CustomerUsage defines model for CustomerUsage.
type CustomerUsageMeter ¶
type CustomerUsageMeter struct {
Currency string `json:"currency"`
EventName string `json:"event_name"`
MeterId string `json:"meter_id"`
MeterName string `json:"meter_name"`
// Prices One row per (plan, price) that took usage, and a `no_price` row
// per plan for the usage no price of that plan took. Two plans can
// price one meter differently.
Prices []struct {
AmountCents int64 `json:"amount_cents"`
// DimensionMatch The labels the price takes. Absent for a price that takes every event.
DimensionMatch map[string]string `json:"dimension_match,omitempty"`
// NoPrice True for usage no price of the plan took. Hardcount bills
// nothing for it, and it is left out of the meter's totals.
NoPrice bool `json:"no_price,omitempty"`
PlanId string `json:"plan_id"`
// PriceId Absent on a `no_price` row.
PriceId string `json:"price_id,omitempty"`
// Quantity Decimal string.
Quantity string `json:"quantity"`
// UnitAmountDecimal Price per unit in cents, as a decimal string; the same figure the invoice line shows.
UnitAmountDecimal string `json:"unit_amount_decimal,omitempty"`
} `json:"prices"`
TotalAmountCents int64 `json:"total_amount_cents"`
// TotalQuantity Decimal string.
TotalQuantity string `json:"total_quantity"`
Unit string `json:"unit"`
}
CustomerUsageMeter defines model for CustomerUsageMeter.
type CustomerUsagePeriodSource ¶
type CustomerUsagePeriodSource string
CustomerUsagePeriodSource `current_billing_cycle`: no `from` and `to` were sent, and the amounts are what the period's invoices bill. `explicit`: the window you sent. Its amounts are an estimate, so a past window can differ from its invoices. Only active and trialing subscriptions are counted: the usage of a canceled subscription is left out. Each subscription's usage in the window is priced at the prices of its current billing period.
const ( CurrentBillingCycle CustomerUsagePeriodSource = "current_billing_cycle" Explicit CustomerUsagePeriodSource = "explicit" )
Defines values for CustomerUsagePeriodSource.
func (CustomerUsagePeriodSource) Valid ¶
func (e CustomerUsagePeriodSource) Valid() bool
Valid indicates whether the value is a known member of the CustomerUsagePeriodSource enum.
type DeleteDunningPolicy200JSONResponseBodyStatus ¶
type DeleteDunningPolicy200JSONResponseBodyStatus string
DeleteDunningPolicy200JSONResponseBodyStatus defines parameters for DeleteDunningPolicy.
const (
DeleteDunningPolicy200JSONResponseBodyStatusDeleted DeleteDunningPolicy200JSONResponseBodyStatus = "deleted"
)
Defines values for DeleteDunningPolicy200JSONResponseBodyStatus.
func (DeleteDunningPolicy200JSONResponseBodyStatus) Valid ¶
func (e DeleteDunningPolicy200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the DeleteDunningPolicy200JSONResponseBodyStatus enum.
type DeleteV1TestClocksId200JSONResponseBodyStatus ¶
type DeleteV1TestClocksId200JSONResponseBodyStatus string
DeleteV1TestClocksId200JSONResponseBodyStatus defines parameters for DeleteV1TestClocksId.
const (
DeleteV1TestClocksId200JSONResponseBodyStatusDeleted DeleteV1TestClocksId200JSONResponseBodyStatus = "deleted"
)
Defines values for DeleteV1TestClocksId200JSONResponseBodyStatus.
func (DeleteV1TestClocksId200JSONResponseBodyStatus) Valid ¶
func (e DeleteV1TestClocksId200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the DeleteV1TestClocksId200JSONResponseBodyStatus enum.
type DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatus ¶
type DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatus string
DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatus defines parameters for DeleteV1WebhookEndpointsEndpointsId.
const (
DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatusDeleted DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatus = "deleted"
)
Defines values for DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatus.
func (DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatus) Valid ¶
func (e DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the DeleteV1WebhookEndpointsEndpointsId200JSONResponseBodyStatus enum.
type DiscardHeldUsageJSONBody ¶
type DiscardHeldUsageJSONBody struct {
// EventName Discard only the rows with this `event_name`. Omit for all.
EventName string `json:"event_name,omitempty"`
ExternalCustomerId string `json:"external_customer_id"`
}
DiscardHeldUsageJSONBody defines parameters for DiscardHeldUsage.
type DiscardHeldUsageJSONRequestBody ¶
type DiscardHeldUsageJSONRequestBody DiscardHeldUsageJSONBody
DiscardHeldUsageJSONRequestBody defines body for DiscardHeldUsage for application/json ContentType.
type DisconnectStripeParamsMode ¶
type DisconnectStripeParamsMode string
DisconnectStripeParamsMode defines parameters for DisconnectStripe.
const ( DisconnectStripeParamsModeLive DisconnectStripeParamsMode = "live" DisconnectStripeParamsModeTest DisconnectStripeParamsMode = "test" )
Defines values for DisconnectStripeParamsMode.
func (DisconnectStripeParamsMode) Valid ¶
func (e DisconnectStripeParamsMode) Valid() bool
Valid indicates whether the value is a known member of the DisconnectStripeParamsMode enum.
type DisputeWebhookEventData ¶
type DisputeWebhookEventData struct {
// Dispute A card dispute (chargeback) Stripe reported against one of the
// invoice's payments, recorded from Stripe's `charge.dispute.created`,
// `.updated` and `.closed` webhook events. It holds the dispute as the
// newest of those events showed it, whatever order they arrived in.
// Hardcount records and reports a dispute, and nothing else: the invoice
// stays paid and no money moves.
Dispute InvoiceDispute `json:"dispute"`
// Invoice A Hardcount invoice. Returned from create, finalize, void, list, get,
// rotate-public-token, and collect-payment endpoints.
Invoice Invoice `json:"invoice"`
}
DisputeWebhookEventData The `data` of the outbound webhook events `payment.dispute_opened` and `payment.dispute_closed` (docs/webhooks.md): the invoice the disputed payment paid and the dispute, each as the API returns it. Both are saved in the same transaction that records the dispute, so a crash cannot drop them. `payment.dispute_opened` is sent once per dispute, when Hardcount first records it; if the first event Hardcount receives is already the close, both are sent, and both carry the closed status and `closed_at`. Their delivery order is not guaranteed. `payment.dispute_closed` is sent when the dispute reaches a closed status it did not have: `won`, `lost`, `warning_closed` or `prevented`. A lost dispute that Stripe later marks won sends it again.
type DocumentBillTo ¶
type DocumentBillTo struct {
AddressLine1 string `json:"address_line1,omitempty"`
AddressLine2 string `json:"address_line2,omitempty"`
City string `json:"city,omitempty"`
Country string `json:"country,omitempty"`
DisplayName string `json:"display_name"`
Email string `json:"email,omitempty"`
LegalName string `json:"legal_name,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
State string `json:"state,omitempty"`
// TaxId On an invoice, the tax ID its tax was calculated with when set,
// otherwise the billing profile's tax ID at issue.
TaxId string `json:"tax_id,omitempty"`
TaxIdType string `json:"tax_id_type,omitempty"`
}
DocumentBillTo What an issued invoice or credit note prints about its buyer, copied when the document was issued (ADR-109). The printed name is `legal_name` when set, otherwise `display_name`.
type DocumentSupplier ¶
type DocumentSupplier struct {
AddressLine1 string `json:"address_line1,omitempty"`
AddressLine2 string `json:"address_line2,omitempty"`
City string `json:"city,omitempty"`
Country string `json:"country,omitempty"`
Email string `json:"email,omitempty"`
Name string `json:"name,omitempty"`
Phone string `json:"phone,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
State string `json:"state,omitempty"`
TaxId string `json:"tax_id,omitempty"`
}
DocumentSupplier What an issued invoice or credit note prints about its seller (the tenant's company), copied when the document was issued (ADR-109).
type DunningPolicy ¶
type DunningPolicy struct {
CreatedAt time.Time `json:"created_at"`
Enabled bool `json:"enabled"`
FinalInvoiceAction DunningPolicyFinalInvoiceAction `json:"final_invoice_action"`
FinalSubscriptionAction DunningPolicyFinalSubscriptionAction `json:"final_subscription_action"`
Id string `json:"id"`
// IsDefault Customers without an assigned policy use the default.
IsDefault bool `json:"is_default"`
Name string `json:"name"`
// RetryDays Days to wait before each retry; the number of retries is its length.
RetryDays []int `json:"retry_days"`
// Seeded True for the "Default retries" policy the account was created
// with, until you edit it or make it the default. While it is
// true, the next enabled policy you create becomes the default
// instead. Set by the server: a request body that sends it is
// refused with 422.
Seeded bool `json:"seeded"`
TenantId string `json:"tenant_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
DunningPolicy defines model for DunningPolicy.
type DunningPolicyFinalInvoiceAction ¶
type DunningPolicyFinalInvoiceAction string
DunningPolicyFinalInvoiceAction defines model for DunningPolicy.FinalInvoiceAction.
const ( DunningPolicyFinalInvoiceActionMarkUncollectible DunningPolicyFinalInvoiceAction = "mark_uncollectible" DunningPolicyFinalInvoiceActionNone DunningPolicyFinalInvoiceAction = "none" )
Defines values for DunningPolicyFinalInvoiceAction.
func (DunningPolicyFinalInvoiceAction) Valid ¶
func (e DunningPolicyFinalInvoiceAction) Valid() bool
Valid indicates whether the value is a known member of the DunningPolicyFinalInvoiceAction enum.
type DunningPolicyFinalSubscriptionAction ¶
type DunningPolicyFinalSubscriptionAction string
DunningPolicyFinalSubscriptionAction defines model for DunningPolicy.FinalSubscriptionAction.
const ( DunningPolicyFinalSubscriptionActionCancel DunningPolicyFinalSubscriptionAction = "cancel" DunningPolicyFinalSubscriptionActionNone DunningPolicyFinalSubscriptionAction = "none" DunningPolicyFinalSubscriptionActionPause DunningPolicyFinalSubscriptionAction = "pause" )
Defines values for DunningPolicyFinalSubscriptionAction.
func (DunningPolicyFinalSubscriptionAction) Valid ¶
func (e DunningPolicyFinalSubscriptionAction) Valid() bool
Valid indicates whether the value is a known member of the DunningPolicyFinalSubscriptionAction enum.
type DunningPolicyInput ¶
type DunningPolicyInput struct {
// Enabled A disabled policy starts no dunning.
Enabled bool `json:"enabled,omitempty"`
// FinalInvoiceAction What happens to the invoice when retries run out.
FinalInvoiceAction DunningPolicyInputFinalInvoiceAction `json:"final_invoice_action,omitempty"`
// FinalSubscriptionAction What happens to the subscription when retries run out. `pause`
// pauses collection and sends `subscription.collection_paused`
// with `triggered_by: dunning`. It does nothing if collection is
// already paused, the subscription is canceled, or the invoice
// was paid first. `cancel` cancels the subscription and sends
// `subscription.canceled` with `canceled_by: dunning`. It does
// nothing if the subscription is already canceled. If a scheduled
// cancel was already due, that cancel happens instead, and its
// event says `canceled_by: schedule`.
FinalSubscriptionAction DunningPolicyInputFinalSubscriptionAction `json:"final_subscription_action,omitempty"`
Name string `json:"name,omitempty"`
// RetryDays Days to wait before each retry. The first counts from the failed
// payment, or, with no card on file, from the collection that found
// none. Each later one counts from the retry before it: `[3, 4, 7]`
// retries on day 3, 7 and 14. The number of retries is the length
// of the list. A day is 24 hours. `retry_schedule`,
// `max_retry_attempts` and `grace_period_days` are refused.
RetryDays []int `json:"retry_days"`
}
DunningPolicyInput defines model for DunningPolicyInput.
type DunningPolicyInputFinalInvoiceAction ¶
type DunningPolicyInputFinalInvoiceAction string
DunningPolicyInputFinalInvoiceAction What happens to the invoice when retries run out.
const ( DunningPolicyInputFinalInvoiceActionMarkUncollectible DunningPolicyInputFinalInvoiceAction = "mark_uncollectible" DunningPolicyInputFinalInvoiceActionNone DunningPolicyInputFinalInvoiceAction = "none" )
Defines values for DunningPolicyInputFinalInvoiceAction.
func (DunningPolicyInputFinalInvoiceAction) Valid ¶
func (e DunningPolicyInputFinalInvoiceAction) Valid() bool
Valid indicates whether the value is a known member of the DunningPolicyInputFinalInvoiceAction enum.
type DunningPolicyInputFinalSubscriptionAction ¶
type DunningPolicyInputFinalSubscriptionAction string
DunningPolicyInputFinalSubscriptionAction What happens to the subscription when retries run out. `pause` pauses collection and sends `subscription.collection_paused` with `triggered_by: dunning`. It does nothing if collection is already paused, the subscription is canceled, or the invoice was paid first. `cancel` cancels the subscription and sends `subscription.canceled` with `canceled_by: dunning`. It does nothing if the subscription is already canceled. If a scheduled cancel was already due, that cancel happens instead, and its event says `canceled_by: schedule`.
const ( DunningPolicyInputFinalSubscriptionActionCancel DunningPolicyInputFinalSubscriptionAction = "cancel" DunningPolicyInputFinalSubscriptionActionNone DunningPolicyInputFinalSubscriptionAction = "none" DunningPolicyInputFinalSubscriptionActionPause DunningPolicyInputFinalSubscriptionAction = "pause" )
Defines values for DunningPolicyInputFinalSubscriptionAction.
func (DunningPolicyInputFinalSubscriptionAction) Valid ¶
func (e DunningPolicyInputFinalSubscriptionAction) Valid() bool
Valid indicates whether the value is a known member of the DunningPolicyInputFinalSubscriptionAction enum.
type DunningPolicyListItem ¶
type DunningPolicyListItem struct {
// AssignedCustomers Customers explicitly assigned to this policy. Customers using it only as the default are not counted.
AssignedCustomers int `json:"assigned_customers"`
CreatedAt time.Time `json:"created_at"`
Enabled bool `json:"enabled"`
FinalInvoiceAction DunningPolicyListItemFinalInvoiceAction `json:"final_invoice_action"`
FinalSubscriptionAction DunningPolicyListItemFinalSubscriptionAction `json:"final_subscription_action"`
Id string `json:"id"`
// IsDefault Customers without an assigned policy use the default.
IsDefault bool `json:"is_default"`
Name string `json:"name"`
// RetryDays Days to wait before each retry; the number of retries is its length.
RetryDays []int `json:"retry_days"`
// Seeded True for the "Default retries" policy the account was created
// with, until you edit it or make it the default. While it is
// true, the next enabled policy you create becomes the default
// instead. Set by the server: a request body that sends it is
// refused with 422.
Seeded bool `json:"seeded"`
TenantId string `json:"tenant_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
DunningPolicyListItem defines model for DunningPolicyListItem.
type DunningPolicyListItemFinalInvoiceAction ¶
type DunningPolicyListItemFinalInvoiceAction string
DunningPolicyListItemFinalInvoiceAction defines model for DunningPolicyListItem.FinalInvoiceAction.
const ( DunningPolicyListItemFinalInvoiceActionMarkUncollectible DunningPolicyListItemFinalInvoiceAction = "mark_uncollectible" DunningPolicyListItemFinalInvoiceActionNone DunningPolicyListItemFinalInvoiceAction = "none" )
Defines values for DunningPolicyListItemFinalInvoiceAction.
func (DunningPolicyListItemFinalInvoiceAction) Valid ¶
func (e DunningPolicyListItemFinalInvoiceAction) Valid() bool
Valid indicates whether the value is a known member of the DunningPolicyListItemFinalInvoiceAction enum.
type DunningPolicyListItemFinalSubscriptionAction ¶
type DunningPolicyListItemFinalSubscriptionAction string
DunningPolicyListItemFinalSubscriptionAction defines model for DunningPolicyListItem.FinalSubscriptionAction.
const ( DunningPolicyListItemFinalSubscriptionActionCancel DunningPolicyListItemFinalSubscriptionAction = "cancel" DunningPolicyListItemFinalSubscriptionActionNone DunningPolicyListItemFinalSubscriptionAction = "none" DunningPolicyListItemFinalSubscriptionActionPause DunningPolicyListItemFinalSubscriptionAction = "pause" )
Defines values for DunningPolicyListItemFinalSubscriptionAction.
func (DunningPolicyListItemFinalSubscriptionAction) Valid ¶
func (e DunningPolicyListItemFinalSubscriptionAction) Valid() bool
Valid indicates whether the value is a known member of the DunningPolicyListItemFinalSubscriptionAction enum.
type DunningRun ¶
type DunningRun struct {
AttemptCount int `json:"attempt_count"`
CreatedAt time.Time `json:"created_at"`
CustomerId string `json:"customer_id,omitempty"`
// EffectiveNow The test clock's current time, when the customer is on a test clock. Filled in on list responses.
EffectiveNow time.Time `json:"effective_now,omitempty"`
Id string `json:"id"`
// InvoiceAmountDueCents Filled in on list responses.
InvoiceAmountDueCents int64 `json:"invoice_amount_due_cents,omitempty"`
// InvoiceCurrency Filled in on list responses.
InvoiceCurrency string `json:"invoice_currency,omitempty"`
InvoiceId string `json:"invoice_id"`
// InvoiceNumber Filled in on list responses.
InvoiceNumber string `json:"invoice_number,omitempty"`
LastAttemptAt time.Time `json:"last_attempt_at,omitempty"`
// MaxRetryAttempts How many retries the run's policy makes: the length of its
// `retry_days`. Filled in on list responses.
// When `attempt_count` has reached it, no charge is retried:
// `next_action_at` is when the final action (pause, cancel or
// mark uncollectible) runs.
MaxRetryAttempts int `json:"max_retry_attempts,omitempty"`
NextActionAt time.Time `json:"next_action_at,omitempty"`
Paused bool `json:"paused"`
PolicyId string `json:"policy_id"`
Reason string `json:"reason,omitempty"`
// Resolution How the run ended, set when it is resolved. Exception:
// `action_failed` is set on a run that is still `active`. The
// final action (pause, cancel or mark uncollectible) failed and
// will be retried at `next_action_at`. `amount_below_minimum`: a
// charge on the invoice was refused by Stripe because the amount is
// below its minimum charge, so the run ended without its final
// action.
Resolution DunningRunResolution `json:"resolution,omitempty"`
ResolvedAt time.Time `json:"resolved_at,omitempty"`
// State `active`: retries are running. `escalated`: retries ran out
// (`resolution` is `retries_exhausted`). `resolved`: the run ended
// another way; see `resolution`.
State DunningRunState `json:"state"`
TenantId string `json:"tenant_id,omitempty"`
// TestClockId Filled in on list responses.
TestClockId string `json:"test_clock_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
DunningRun defines model for DunningRun.
type DunningRunDetail ¶
type DunningRunDetail struct {
// Degraded Sources that could not be read. `events`: the event history, so
// `events` is empty. `invoice`: the run's invoice, so no event has
// a `line`. The others leave the lines without what they would
// add: `emails` the reminder and final-notice clauses,
// `charge_attempts` the decline reason and amount, `audit` who
// resolved the run.
Degraded []DunningRunDetailDegraded `json:"degraded"`
Events []DunningRunEvent `json:"events"`
Run DunningRun `json:"run"`
}
DunningRunDetail defines model for DunningRunDetail.
type DunningRunDetailDegraded ¶
type DunningRunDetailDegraded string
DunningRunDetailDegraded defines model for DunningRunDetail.Degraded.
const ( DunningRunDetailDegradedAudit DunningRunDetailDegraded = "audit" DunningRunDetailDegradedChargeAttempts DunningRunDetailDegraded = "charge_attempts" DunningRunDetailDegradedEmails DunningRunDetailDegraded = "emails" DunningRunDetailDegradedEvents DunningRunDetailDegraded = "events" DunningRunDetailDegradedInvoice DunningRunDetailDegraded = "invoice" )
Defines values for DunningRunDetailDegraded.
func (DunningRunDetailDegraded) Valid ¶
func (e DunningRunDetailDegraded) Valid() bool
Valid indicates whether the value is a known member of the DunningRunDetailDegraded enum.
type DunningRunEvent ¶
type DunningRunEvent struct {
AttemptCount int `json:"attempt_count"`
CreatedAt time.Time `json:"created_at"`
EventType DunningRunEventEventType `json:"event_type"`
Id string `json:"id"`
InvoiceId string `json:"invoice_id"`
// Line The event in the words of the activity line standard (ADR-128):
// the line the invoice's payment timeline shows for the same
// event, without that timeline's folds. Absent when the run's
// invoice could not be read (`degraded` names `invoice`).
Line ActivityLine `json:"line,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Reason string `json:"reason,omitempty"`
RecordedAt time.Time `json:"recorded_at,omitempty"`
RunId string `json:"run_id"`
State DunningRunEventState `json:"state"`
TenantId string `json:"tenant_id,omitempty"`
}
DunningRunEvent defines model for DunningRunEvent.
type DunningRunEventEventType ¶
type DunningRunEventEventType string
DunningRunEventEventType defines model for DunningRunEvent.EventType.
const ( DunningRunEventEventTypeDunningStarted DunningRunEventEventType = "dunning_started" DunningRunEventEventTypeEscalated DunningRunEventEventType = "escalated" DunningRunEventEventTypeResolved DunningRunEventEventType = "resolved" DunningRunEventEventTypeRetryAttempted DunningRunEventEventType = "retry_attempted" )
Defines values for DunningRunEventEventType.
func (DunningRunEventEventType) Valid ¶
func (e DunningRunEventEventType) Valid() bool
Valid indicates whether the value is a known member of the DunningRunEventEventType enum.
type DunningRunEventState ¶
type DunningRunEventState string
DunningRunEventState defines model for DunningRunEvent.State.
const ( DunningRunEventStateActive DunningRunEventState = "active" DunningRunEventStateEscalated DunningRunEventState = "escalated" DunningRunEventStateResolved DunningRunEventState = "resolved" )
Defines values for DunningRunEventState.
func (DunningRunEventState) Valid ¶
func (e DunningRunEventState) Valid() bool
Valid indicates whether the value is a known member of the DunningRunEventState enum.
type DunningRunResolution ¶
type DunningRunResolution string
DunningRunResolution How the run ended, set when it is resolved. Exception: `action_failed` is set on a run that is still `active`. The final action (pause, cancel or mark uncollectible) failed and will be retried at `next_action_at`. `amount_below_minimum`: a charge on the invoice was refused by Stripe because the amount is below its minimum charge, so the run ended without its final action.
const ( DunningRunResolutionActionFailed DunningRunResolution = "action_failed" DunningRunResolutionAmountBelowMinimum DunningRunResolution = "amount_below_minimum" DunningRunResolutionInvoiceNotCollectible DunningRunResolution = "invoice_not_collectible" DunningRunResolutionInvoiceVoided DunningRunResolution = "invoice_voided" DunningRunResolutionPaymentRecovered DunningRunResolution = "payment_recovered" DunningRunResolutionRetriesExhausted DunningRunResolution = "retries_exhausted" )
Defines values for DunningRunResolution.
func (DunningRunResolution) Valid ¶
func (e DunningRunResolution) Valid() bool
Valid indicates whether the value is a known member of the DunningRunResolution enum.
type DunningRunState ¶
type DunningRunState string
DunningRunState `active`: retries are running. `escalated`: retries ran out (`resolution` is `retries_exhausted`). `resolved`: the run ended another way; see `resolution`.
const ( DunningRunStateActive DunningRunState = "active" DunningRunStateEscalated DunningRunState = "escalated" DunningRunStateResolved DunningRunState = "resolved" )
Defines values for DunningRunState.
func (DunningRunState) Valid ¶
func (e DunningRunState) Valid() bool
Valid indicates whether the value is a known member of the DunningRunState enum.
type DunningStats ¶
type DunningStats struct {
ActiveCount int `json:"active_count"`
// AtRiskByCurrency Amount due on active and escalated runs whose invoice is still
// open, one entry per currency. `currency` comes first, then the
// largest amount. Empty when no run is at risk.
AtRiskByCurrency []struct {
AmountCents int64 `json:"amount_cents"`
Currency string `json:"currency"`
} `json:"at_risk_by_currency"`
// AtRiskCents Amount due on active and escalated runs whose invoice is still open, in `currency` only. A voided or written-off invoice is not at risk.
AtRiskCents int64 `json:"at_risk_cents"`
// Currency The tenant's default currency.
Currency string `json:"currency"`
EscalatedCount int `json:"escalated_count"`
// RecoveredCount Resolved runs that a payment closed (`resolution` is `payment_recovered` and the invoice has `amount_paid_cents` above 0). A run closed by a credit note or customer credit that left nothing due is resolved, not recovered.
RecoveredCount int `json:"recovered_count"`
// ResolvedCount Resolved runs, whatever closed them (a payment, a void or a write-off).
ResolvedCount int `json:"resolved_count"`
}
DunningStats defines model for DunningStats.
type EndSubscriptionTrialParams ¶
type EndSubscriptionTrialParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
EndSubscriptionTrialParams defines parameters for EndSubscriptionTrial.
type Error ¶
type Error struct {
Error struct {
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
// Param The request field the error is about. Sent only when the error
// names one. A request body may hold only the fields its
// operation lists, spelled and cased as listed: any other
// field, or one the server sets (such as `id`), is refused
// with 422 and `param` naming it. An operation with no request body lists no fields: send
// no body, `{}` or `null`. The Stripe and Postmark webhooks and
// the LiteLLM callback take their sender's body as it comes.
Param string `json:"param,omitempty"`
RequestId string `json:"request_id,omitempty"`
// Type One of `invalid_request_error`, `authentication_error`,
// `rate_limit_error` or `api_error`. Every error the API
// answers has this shape, including an unknown path (404,
// code `route_not_found`) and a method the path does not take
// (405, code `method_not_allowed`, with an `Allow` header).
// The few exceptions are listed in docs/api-surface.md.
Type string `json:"type,omitempty"`
} `json:"error,omitempty"`
}
Error defines model for Error.
type ExportAuditLogCsvParams ¶
type ExportAuditLogCsvParams struct {
// DateFrom Lower bound on created_at, inclusive. RFC 3339 or `YYYY-MM-DD`.
DateFrom string `form:"date_from,omitempty" json:"date_from,omitempty"`
// DateTo Upper bound on created_at, inclusive. RFC 3339 or `YYYY-MM-DD` (end of that day, UTC).
DateTo string `form:"date_to,omitempty" json:"date_to,omitempty"`
ResourceType string `form:"resource_type,omitempty" json:"resource_type,omitempty"`
ResourceId string `form:"resource_id,omitempty" json:"resource_id,omitempty"`
Action string `form:"action,omitempty" json:"action,omitempty"`
ActorId string `form:"actor_id,omitempty" json:"actor_id,omitempty"`
// TestClockId Only rows from this test clock's simulation.
TestClockId string `form:"test_clock_id,omitempty" json:"test_clock_id,omitempty"`
// SimFrom Lower bound on simulated time (sim_effective_at). RFC 3339 or `YYYY-MM-DD`.
SimFrom string `form:"sim_from,omitempty" json:"sim_from,omitempty"`
// SimTo Upper bound on simulated time (sim_effective_at). RFC 3339 or `YYYY-MM-DD`.
SimTo string `form:"sim_to,omitempty" json:"sim_to,omitempty"`
}
ExportAuditLogCsvParams defines parameters for ExportAuditLogCsv.
type ExportCustomersCsvParams ¶
type ExportCustomersCsvParams struct {
// From Lower bound on created_at, inclusive. RFC 3339 or `YYYY-MM-DD`.
From string `form:"from,omitempty" json:"from,omitempty"`
// To Upper bound on created_at, inclusive. RFC 3339 or `YYYY-MM-DD` (end of that day, UTC).
To string `form:"to,omitempty" json:"to,omitempty"`
}
ExportCustomersCsvParams defines parameters for ExportCustomersCsv.
type ExportInvoicesCsvParams ¶
type ExportInvoicesCsvParams struct {
// From Lower bound on created_at, inclusive. RFC 3339 or `YYYY-MM-DD`.
From string `form:"from,omitempty" json:"from,omitempty"`
// To Upper bound on created_at, inclusive. RFC 3339 or `YYYY-MM-DD` (end of that day, UTC).
To string `form:"to,omitempty" json:"to,omitempty"`
}
ExportInvoicesCsvParams defines parameters for ExportInvoicesCsv.
type ExportSubscriptionsCsvParams ¶
type ExportSubscriptionsCsvParams struct {
// From Lower bound on created_at, inclusive. RFC 3339 or `YYYY-MM-DD`.
From string `form:"from,omitempty" json:"from,omitempty"`
// To Upper bound on created_at, inclusive. RFC 3339 or `YYYY-MM-DD` (end of that day, UTC).
To string `form:"to,omitempty" json:"to,omitempty"`
}
ExportSubscriptionsCsvParams defines parameters for ExportSubscriptionsCsv.
type ExportUsageEventsCsvParams ¶
type ExportUsageEventsCsvParams struct {
// From Lower bound on the event timestamp, inclusive. RFC 3339 or `YYYY-MM-DD`.
From string `form:"from" json:"from"`
// To Upper bound on the event timestamp, inclusive. RFC 3339 or `YYYY-MM-DD` (end of that day, UTC).
To string `form:"to" json:"to"`
// CustomerId Only this customer's events.
CustomerId string `form:"customer_id,omitempty" json:"customer_id,omitempty"`
// MeterId Only this meter's events.
MeterId string `form:"meter_id,omitempty" json:"meter_id,omitempty"`
// Dimensions Comma-separated key=value pairs, same syntax as `GET /v1/usage-events`.
Dimensions string `form:"dimensions,omitempty" json:"dimensions,omitempty"`
}
ExportUsageEventsCsvParams defines parameters for ExportUsageEventsCsv.
type ExtendSubscriptionTrialJSONBody ¶
type ExtendSubscriptionTrialJSONBody struct {
// TrialEnd The new trial end. Must be in the future, after the current `trial_end_at`, and at most 730 days after `trial_start_at`.
TrialEnd time.Time `json:"trial_end"`
}
ExtendSubscriptionTrialJSONBody defines parameters for ExtendSubscriptionTrial.
type ExtendSubscriptionTrialJSONRequestBody ¶
type ExtendSubscriptionTrialJSONRequestBody ExtendSubscriptionTrialJSONBody
ExtendSubscriptionTrialJSONRequestBody defines body for ExtendSubscriptionTrial for application/json ContentType.
type ExtendSubscriptionTrialParams ¶
type ExtendSubscriptionTrialParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
ExtendSubscriptionTrialParams defines parameters for ExtendSubscriptionTrial.
type GetAnalyticsMrrMovementParams ¶
type GetAnalyticsMrrMovementParams struct {
// Period The window. Any other value is treated as `30d`. `12m` is 365 days.
Period AnalyticsPeriod `form:"period,omitempty" json:"period,omitempty"`
}
GetAnalyticsMrrMovementParams defines parameters for GetAnalyticsMrrMovement.
type GetAnalyticsOverviewParams ¶
type GetAnalyticsOverviewParams struct {
// Period The window. Any other value is treated as `30d`. `12m` is 365 days.
Period AnalyticsPeriod `form:"period,omitempty" json:"period,omitempty"`
}
GetAnalyticsOverviewParams defines parameters for GetAnalyticsOverview.
type GetAnalyticsRevenueChartParams ¶
type GetAnalyticsRevenueChartParams struct {
// Period The window. Any other value is treated as `30d`. `12m` is 365 days.
Period AnalyticsPeriod `form:"period,omitempty" json:"period,omitempty"`
}
GetAnalyticsRevenueChartParams defines parameters for GetAnalyticsRevenueChart.
type GetAnalyticsUsageParams ¶
type GetAnalyticsUsageParams struct {
// Period The window. Any other value is treated as `30d`. `12m` is 365 days.
Period AnalyticsPeriod `form:"period,omitempty" json:"period,omitempty"`
}
GetAnalyticsUsageParams defines parameters for GetAnalyticsUsage.
type GetCustomerUsageParams ¶
type GetCustomerUsageParams struct {
// From Start of the window. RFC 3339 instant or `YYYY-MM-DD` (start of that day, UTC).
From string `form:"from,omitempty" json:"from,omitempty"`
// To End of the window, exclusive. RFC 3339 instant or `YYYY-MM-DD` (23:59:59.999999 UTC that day, so the day is included).
To string `form:"to,omitempty" json:"to,omitempty"`
}
GetCustomerUsageParams defines parameters for GetCustomerUsage.
type GetEmailSettings200JSONResponseBodyLinksEnv ¶
type GetEmailSettings200JSONResponseBodyLinksEnv string
GetEmailSettings200JSONResponseBodyLinksEnv defines parameters for GetEmailSettings.
const ( DASHBOARDBASEURL GetEmailSettings200JSONResponseBodyLinksEnv = "DASHBOARD_BASE_URL" HOSTEDINVOICEBASEURL GetEmailSettings200JSONResponseBodyLinksEnv = "HOSTED_INVOICE_BASE_URL" PAYMENTUPDATEURL GetEmailSettings200JSONResponseBodyLinksEnv = "PAYMENT_UPDATE_URL" )
Defines values for GetEmailSettings200JSONResponseBodyLinksEnv.
func (GetEmailSettings200JSONResponseBodyLinksEnv) Valid ¶
func (e GetEmailSettings200JSONResponseBodyLinksEnv) Valid() bool
Valid indicates whether the value is a known member of the GetEmailSettings200JSONResponseBodyLinksEnv enum.
type GetEmailSettings200JSONResponseBodyTlsMode ¶
type GetEmailSettings200JSONResponseBodyTlsMode string
GetEmailSettings200JSONResponseBodyTlsMode defines parameters for GetEmailSettings.
const ( Implicit GetEmailSettings200JSONResponseBodyTlsMode = "implicit" None GetEmailSettings200JSONResponseBodyTlsMode = "none" Starttls GetEmailSettings200JSONResponseBodyTlsMode = "starttls" )
Defines values for GetEmailSettings200JSONResponseBodyTlsMode.
func (GetEmailSettings200JSONResponseBodyTlsMode) Valid ¶
func (e GetEmailSettings200JSONResponseBodyTlsMode) Valid() bool
Valid indicates whether the value is a known member of the GetEmailSettings200JSONResponseBodyTlsMode enum.
type GetHealth200JSONResponseBodyStatus ¶
type GetHealth200JSONResponseBodyStatus string
GetHealth200JSONResponseBodyStatus defines parameters for GetHealth.
const (
GetHealth200JSONResponseBodyStatusOk GetHealth200JSONResponseBodyStatus = "ok"
)
Defines values for GetHealth200JSONResponseBodyStatus.
func (GetHealth200JSONResponseBodyStatus) Valid ¶
func (e GetHealth200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the GetHealth200JSONResponseBodyStatus enum.
type GetV1CreditsGrantsCustomerIdParams ¶
type GetV1CreditsGrantsCustomerIdParams struct {
IncludeExhausted bool `form:"include_exhausted,omitempty" json:"include_exhausted,omitempty"`
}
GetV1CreditsGrantsCustomerIdParams defines parameters for GetV1CreditsGrantsCustomerId.
type GetV1CustomersIdMarginParams ¶
type GetV1CustomersIdMarginParams struct {
// From Window start, inclusive. RFC 3339. Default is 30 days before the customer's current time.
From time.Time `form:"from,omitempty" json:"from,omitempty"`
// To Window end, exclusive. RFC 3339. Default is the customer's current time (test clock time for a customer on a test clock).
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; the rows and `total` stop
// there.
Search string `form:"search,omitempty" json:"search,omitempty"`
// Sort One of display_name, email, external_id, status, created_at
// (default). A sort by display_name or email looks at 5,000
// customers at most; the rows and `total` stop there.
Sort string `form:"sort,omitempty" json:"sort,omitempty"`
Dir GetV1CustomersParamsDir `form:"dir,omitempty" json:"dir,omitempty"`
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `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:59.999999Z, the end of that day).
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). amount_due_cents sorts a paid invoice by what paid it (`amount_paid_cents` plus `credits_applied_cents`, since paying zeroes `amount_due_cents`) and every other invoice by `amount_due_cents`, which a voided or written-off invoice keeps.
Sort string `form:"sort,omitempty" json:"sort,omitempty"`
Dir GetV1InvoicesParamsDir `form:"dir,omitempty" json:"dir,omitempty"`
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,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 GetV1MetersParams ¶
type GetV1MetersParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1MetersParams defines parameters for GetV1Meters.
type GetV1PlansParams ¶
type GetV1PlansParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1PlansParams defines parameters for GetV1Plans.
type GetV1ProviderCostsParams ¶
type GetV1ProviderCostsParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1ProviderCostsParams defines parameters for GetV1ProviderCosts.
type GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource ¶
type GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource string
GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource defines parameters for GetV1PublicCostDashboardToken.
const ( GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSourceNoSubscription GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource = "no_subscription" GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSourceSubscription GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource = "subscription" )
Defines values for GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource.
func (GetV1PublicCostDashboardToken200JSONResponseBodyBillingPeriodSource) Valid ¶
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 Exact status. Any other value is a 400. Paused collection is not
// a status: use `collection=paused`.
Status GetV1SubscriptionsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
// Billing `failing` returns only subscriptions that carry a
// `billing_failure`: those waiting for their next billing attempt
// and those that are parked. Any other value is a 400.
Billing GetV1SubscriptionsParamsBilling `form:"billing,omitempty" json:"billing,omitempty"`
// Collection `paused` returns only active and trialing subscriptions whose
// `pause_collection` is in force, whether an operator or dunning set
// it. A timed pause ends at `resumes_at` (on the subscription's test
// clock, if it has one), even while the response still carries it.
// Any other value is a 400.
Collection GetV1SubscriptionsParamsCollection `form:"collection,omitempty" json:"collection,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 Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1SubscriptionsParams defines parameters for GetV1Subscriptions.
type GetV1SubscriptionsParamsBilling ¶
type GetV1SubscriptionsParamsBilling string
GetV1SubscriptionsParamsBilling defines parameters for GetV1Subscriptions.
const (
Failing GetV1SubscriptionsParamsBilling = "failing"
)
Defines values for GetV1SubscriptionsParamsBilling.
func (GetV1SubscriptionsParamsBilling) Valid ¶
func (e GetV1SubscriptionsParamsBilling) Valid() bool
Valid indicates whether the value is a known member of the GetV1SubscriptionsParamsBilling enum.
type GetV1SubscriptionsParamsCollection ¶
type GetV1SubscriptionsParamsCollection string
GetV1SubscriptionsParamsCollection defines parameters for GetV1Subscriptions.
const (
Paused GetV1SubscriptionsParamsCollection = "paused"
)
Defines values for GetV1SubscriptionsParamsCollection.
func (GetV1SubscriptionsParamsCollection) Valid ¶
func (e GetV1SubscriptionsParamsCollection) Valid() bool
Valid indicates whether the value is a known member of the GetV1SubscriptionsParamsCollection enum.
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 GetV1SubscriptionsParamsStatus ¶
type GetV1SubscriptionsParamsStatus string
GetV1SubscriptionsParamsStatus defines parameters for GetV1Subscriptions.
const ( GetV1SubscriptionsParamsStatusActive GetV1SubscriptionsParamsStatus = "active" GetV1SubscriptionsParamsStatusCanceled GetV1SubscriptionsParamsStatus = "canceled" GetV1SubscriptionsParamsStatusDraft GetV1SubscriptionsParamsStatus = "draft" GetV1SubscriptionsParamsStatusTrialing GetV1SubscriptionsParamsStatus = "trialing" )
Defines values for GetV1SubscriptionsParamsStatus.
func (GetV1SubscriptionsParamsStatus) Valid ¶
func (e GetV1SubscriptionsParamsStatus) Valid() bool
Valid indicates whether the value is a known member of the GetV1SubscriptionsParamsStatus enum.
type GetV1TestClocksIdSubscriptionsParams ¶
type GetV1TestClocksIdSubscriptionsParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1TestClocksIdSubscriptionsParams defines parameters for GetV1TestClocksIdSubscriptions.
type GetV1TestClocksParams ¶
type GetV1TestClocksParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1TestClocksParams defines parameters for GetV1TestClocks.
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"`
// From Only events at or after this time. RFC 3339, or a date (YYYY-MM-DD) meaning 00:00:00 UTC.
From string `form:"from,omitempty" json:"from,omitempty"`
// To Only events before this time, exclusive. RFC 3339, or a date (YYYY-MM-DD) meaning 23:59:59.999999 UTC that day, so the day is included.
To string `form:"to,omitempty" json:"to,omitempty"`
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1UsageEventsParams defines parameters for GetV1UsageEvents.
type GetV1WebhookEndpointsEndpointsParams ¶
type GetV1WebhookEndpointsEndpointsParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1WebhookEndpointsEndpointsParams defines parameters for GetV1WebhookEndpointsEndpoints.
type GetV1WebhookEndpointsEventsParams ¶
type GetV1WebhookEndpointsEventsParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetV1WebhookEndpointsEventsParams defines parameters for GetV1WebhookEndpointsEvents.
type GetV1Whoami200JSONResponseBodyKeyType ¶
type GetV1Whoami200JSONResponseBodyKeyType string
GetV1Whoami200JSONResponseBodyKeyType defines parameters for GetV1Whoami.
const ( Platform GetV1Whoami200JSONResponseBodyKeyType = "platform" Secret GetV1Whoami200JSONResponseBodyKeyType = "secret" )
Defines values for GetV1Whoami200JSONResponseBodyKeyType.
func (GetV1Whoami200JSONResponseBodyKeyType) Valid ¶
func (e GetV1Whoami200JSONResponseBodyKeyType) Valid() bool
Valid indicates whether the value is a known member of the GetV1Whoami200JSONResponseBodyKeyType enum.
type GetWebhookEndpointStatsParams ¶
type GetWebhookEndpointStatsParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
GetWebhookEndpointStatsParams defines parameters for GetWebhookEndpointStats.
type HeldUsageGroup ¶
type HeldUsageGroup struct {
// CustomerId The customer whose external ID now matches, or empty when none does yet.
CustomerId string `json:"customer_id"`
// EventName The `event_name` the rows carried.
EventName string `json:"event_name"`
// ExternalCustomerId The LiteLLM `user` value the rows carried.
ExternalCustomerId string `json:"external_customer_id"`
FirstEventAt time.Time `json:"first_event_at"`
LastEventAt time.Time `json:"last_event_at"`
// LastReceivedAt When Hardcount last received a row for this group.
LastReceivedAt time.Time `json:"last_received_at"`
// MeterExists Whether a meter with this `event_name` exists now.
MeterExists bool `json:"meter_exists"`
// Reason What was missing when the rows arrived.
Reason HeldUsageGroupReason `json:"reason"`
Rows int `json:"rows"`
// TotalQuantity Sum of the held quantities, as a decimal string.
TotalQuantity string `json:"total_quantity"`
}
HeldUsageGroup The usage rows still held for one external customer ID, event name and reason.
type HeldUsageGroupReason ¶
type HeldUsageGroupReason string
HeldUsageGroupReason What was missing when the rows arrived.
const ( CustomerNotFound HeldUsageGroupReason = "customer_not_found" MeterNotFound HeldUsageGroupReason = "meter_not_found" )
Defines values for HeldUsageGroupReason.
func (HeldUsageGroupReason) Valid ¶
func (e HeldUsageGroupReason) Valid() bool
Valid indicates whether the value is a known member of the HeldUsageGroupReason enum.
type HeldUsageReleaseResult ¶
type HeldUsageReleaseResult struct {
// CustomerId The customer the rows were ingested for.
CustomerId string `json:"customer_id"`
// Deduplicated Rows that were already usage events under the same idempotency
// key (LiteLLM resent the call after the customer existed), and
// LiteLLM cache-write rows whose call is already billed with the
// writes inside its input row. Marked released, not written again.
Deduplicated int `json:"deduplicated"`
// InOpenPeriod Released rows in a billing period not invoiced yet that a price
// of its plan takes. Rows Hardcount does not check count here too:
// rows after the current period's end, while the subscription
// continues, and rows after a trial's end while the subscription
// still trials. Rows of a sum or count meter stamped before the end
// of this period's spend-threshold invoice are not counted here:
// see `pending_threshold_invoice` and `outside_open_period`.
InOpenPeriod int `json:"in_open_period"`
// MoreToRelease Rows for this external ID still held only because one release
// takes at most 5,000 rows. Release again to take them.
MoreToRelease int `json:"more_to_release"`
// NoPrice Released rows in a billing period not invoiced yet whose plan
// prices the meter, but no price of that plan takes them (their
// dimensions do not include any price's `dimension_match`).
NoPrice int `json:"no_price"`
// NotOnPlan Released rows in a billing period not invoiced yet whose plan
// does not price the meter.
NotOnPlan int `json:"not_on_plan"`
// OutsideOpenPeriod Released rows outside every subscription's time (before it
// started, in a free trial, after it ended or after its scheduled
// cancel, or in another, ended subscription's time), and rows in a
// period already invoiced. Also rows of a sum or count meter
// stamped before the end of this period's paid spend-threshold
// invoice. Bill them with a one-off invoice if they should be
// charged.
OutsideOpenPeriod int `json:"outside_open_period"`
// PendingThresholdInvoice Released rows of a sum or count meter stamped before the end of
// this period's spend-threshold invoice, while that invoice is not
// paid. The period's invoice counts them only if that invoice is
// voided before the period closes. A written-off invoice can still
// be voided.
PendingThresholdInvoice int `json:"pending_threshold_invoice"`
// Released Rows newly written as usage events.
Released int `json:"released"`
// StillHeld Rows for this external ID still held that a release cannot take
// yet: their meter does not exist yet, or their time is after the
// customer's current time (a customer on a test clock).
StillHeld int `json:"still_held"`
}
HeldUsageReleaseResult The counts are what Hardcount found when the release wrote the rows, as for `billing_status` (see `UsageBillingStatus`). The invoice is the final answer.
type HostedInvoice ¶
type HostedInvoice struct {
BillTo struct {
AddressLine1 string `json:"address_line1,omitempty"`
AddressLine2 string `json:"address_line2,omitempty"`
City string `json:"city,omitempty"`
Country string `json:"country,omitempty"`
Email string `json:"email,omitempty"`
Name string `json:"name,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
State string `json:"state,omitempty"`
} `json:"bill_to"`
Branding struct {
BrandColor string `json:"brand_color,omitempty"`
CompanyAddressLine1 string `json:"company_address_line1,omitempty"`
CompanyAddressLine2 string `json:"company_address_line2,omitempty"`
CompanyCity string `json:"company_city,omitempty"`
CompanyCountry string `json:"company_country,omitempty"`
CompanyEmail string `json:"company_email,omitempty"`
CompanyName string `json:"company_name,omitempty"`
CompanyPhone string `json:"company_phone,omitempty"`
CompanyPostalCode string `json:"company_postal_code,omitempty"`
CompanyState string `json:"company_state,omitempty"`
LogoUrl string `json:"logo_url,omitempty"`
SupportUrl string `json:"support_url,omitempty"`
} `json:"branding"`
Invoice struct {
AmountDueCents int64 `json:"amount_due_cents"`
AmountPaidCents int64 `json:"amount_paid_cents"`
// BillingTimezone The time zone to show the dates in, so they match the PDF.
BillingTimezone string `json:"billing_timezone,omitempty"`
CreditsAppliedCents int64 `json:"credits_applied_cents"`
Currency string `json:"currency"`
DiscountCents int64 `json:"discount_cents"`
DueAt time.Time `json:"due_at,omitempty"`
// Footer The footer this invoice was issued with.
Footer string `json:"footer,omitempty"`
InvoiceNumber string `json:"invoice_number"`
IssuedAt time.Time `json:"issued_at,omitempty"`
Memo string `json:"memo,omitempty"`
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. With a payment
// intent recorded, Hardcount asks Stripe for it after a short wait. With
// none (a parked invoice), Hardcount lists the customer's payments at
// Stripe every billing tick: it records a payment for the invoice that
// appears, and if none has appeared 24 hours after the attempt the
// invoice goes back to `pending` (`failed` after a dunning retry) and
// is charged again as usual.
PaymentStatus InvoicePaymentStatus `json:"payment_status"`
// 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"`
SubtotalCents int64 `json:"subtotal_cents"`
TaxAmountCents int64 `json:"tax_amount_cents"`
TaxExemptReason string `json:"tax_exempt_reason,omitempty"`
TaxName string `json:"tax_name,omitempty"`
// TaxRate Tax rate in percent, for example `18` for 18%.
TaxRate float32 `json:"tax_rate"`
TaxReverseCharge bool `json:"tax_reverse_charge,omitempty"`
TotalAmountCents int64 `json:"total_amount_cents"`
VoidedAt time.Time `json:"voided_at,omitempty"`
} `json:"invoice"`
LineItems []struct {
AmountCents int64 `json:"amount_cents"`
Currency string `json:"currency"`
Description string `json:"description"`
MeterUnit string `json:"meter_unit,omitempty"`
// Quantity The exact quantity as a decimal string, for example `3` or `1.5`.
Quantity string `json:"quantity"`
TaxAmountCents int64 `json:"tax_amount_cents,omitempty"`
TotalAmountCents int64 `json:"total_amount_cents"`
// UnitAmountDecimal The unit price in cents at full precision, for example `0.3` for $0.003.
UnitAmountDecimal string `json:"unit_amount_decimal"`
} `json:"line_items"`
// Livemode False for a test-mode invoice. The page shows a test-mode banner.
Livemode bool `json:"livemode"`
// PayEnabled True when the customer can pay online now: the invoice is
// finalized, something is owed, no payment is in progress, the
// seller has Stripe connected for the invoice's mode, and Stripe's
// latest answer for the amount was not that it is below its
// minimum charge.
PayEnabled bool `json:"pay_enabled"`
// `online_payment_unavailable` when the seller has no payment
// provider connected for this mode, `amount_below_minimum` when
// Stripe's latest answer refused the amount as below its minimum
// charge.
PayUnavailableReason HostedInvoicePayUnavailableReason `json:"pay_unavailable_reason,omitempty"`
}
HostedInvoice What the hosted invoice page shows. It leaves out internal ids and Stripe details. `bill_to` and the company details in `branding` come from the same place as the invoice PDF's.
type HostedInvoicePayUnavailableReason ¶
type HostedInvoicePayUnavailableReason string
HostedInvoicePayUnavailableReason Sent only when money is owed but can't be paid online: `online_payment_unavailable` when the seller has no payment provider connected for this mode, `amount_below_minimum` when Stripe's latest answer refused the amount as below its minimum charge.
const ( AmountBelowMinimum HostedInvoicePayUnavailableReason = "amount_below_minimum" )
Defines values for HostedInvoicePayUnavailableReason.
func (HostedInvoicePayUnavailableReason) Valid ¶
func (e HostedInvoicePayUnavailableReason) Valid() bool
Valid indicates whether the value is a known member of the HostedInvoicePayUnavailableReason enum.
type IngestLitellmSpendJSONBody ¶
type IngestLitellmSpendJSONBody struct {
// contains filtered or unexported fields
}
IngestLitellmSpendJSONBody defines parameters for IngestLitellmSpend.
func (IngestLitellmSpendJSONBody) AsIngestLitellmSpendJSONBody1 ¶
func (t IngestLitellmSpendJSONBody) AsIngestLitellmSpendJSONBody1() (IngestLitellmSpendJSONBody1, error)
AsIngestLitellmSpendJSONBody1 returns the union data inside the IngestLitellmSpendJSONBody as a IngestLitellmSpendJSONBody1
func (IngestLitellmSpendJSONBody) AsIngestLitellmSpendJSONBody2 ¶
func (t IngestLitellmSpendJSONBody) AsIngestLitellmSpendJSONBody2() (IngestLitellmSpendJSONBody2, error)
AsIngestLitellmSpendJSONBody2 returns the union data inside the IngestLitellmSpendJSONBody as a IngestLitellmSpendJSONBody2
func (IngestLitellmSpendJSONBody) AsLitellmSpendLog ¶
func (t IngestLitellmSpendJSONBody) AsLitellmSpendLog() (LitellmSpendLog, error)
AsLitellmSpendLog returns the union data inside the IngestLitellmSpendJSONBody as a LitellmSpendLog
func (*IngestLitellmSpendJSONBody) FromIngestLitellmSpendJSONBody1 ¶
func (t *IngestLitellmSpendJSONBody) FromIngestLitellmSpendJSONBody1(v IngestLitellmSpendJSONBody1) error
FromIngestLitellmSpendJSONBody1 overwrites any union data inside the IngestLitellmSpendJSONBody as the provided IngestLitellmSpendJSONBody1
func (*IngestLitellmSpendJSONBody) FromIngestLitellmSpendJSONBody2 ¶
func (t *IngestLitellmSpendJSONBody) FromIngestLitellmSpendJSONBody2(v IngestLitellmSpendJSONBody2) error
FromIngestLitellmSpendJSONBody2 overwrites any union data inside the IngestLitellmSpendJSONBody as the provided IngestLitellmSpendJSONBody2
func (*IngestLitellmSpendJSONBody) FromLitellmSpendLog ¶
func (t *IngestLitellmSpendJSONBody) FromLitellmSpendLog(v LitellmSpendLog) error
FromLitellmSpendLog overwrites any union data inside the IngestLitellmSpendJSONBody as the provided LitellmSpendLog
func (IngestLitellmSpendJSONBody) MarshalJSON ¶
func (t IngestLitellmSpendJSONBody) MarshalJSON() ([]byte, error)
func (*IngestLitellmSpendJSONBody) MergeIngestLitellmSpendJSONBody1 ¶
func (t *IngestLitellmSpendJSONBody) MergeIngestLitellmSpendJSONBody1(v IngestLitellmSpendJSONBody1) error
MergeIngestLitellmSpendJSONBody1 performs a merge with any union data inside the IngestLitellmSpendJSONBody, using the provided IngestLitellmSpendJSONBody1
func (*IngestLitellmSpendJSONBody) MergeIngestLitellmSpendJSONBody2 ¶
func (t *IngestLitellmSpendJSONBody) MergeIngestLitellmSpendJSONBody2(v IngestLitellmSpendJSONBody2) error
MergeIngestLitellmSpendJSONBody2 performs a merge with any union data inside the IngestLitellmSpendJSONBody, using the provided IngestLitellmSpendJSONBody2
func (*IngestLitellmSpendJSONBody) MergeLitellmSpendLog ¶
func (t *IngestLitellmSpendJSONBody) MergeLitellmSpendLog(v LitellmSpendLog) error
MergeLitellmSpendLog performs a merge with any union data inside the IngestLitellmSpendJSONBody, using the provided LitellmSpendLog
func (*IngestLitellmSpendJSONBody) UnmarshalJSON ¶
func (t *IngestLitellmSpendJSONBody) UnmarshalJSON(b []byte) error
type IngestLitellmSpendJSONBody1 ¶
type IngestLitellmSpendJSONBody1 = []LitellmSpendLog
IngestLitellmSpendJSONBody1 defines parameters for IngestLitellmSpend.
type IngestLitellmSpendJSONBody2 ¶
type IngestLitellmSpendJSONBody2 struct {
Events []LitellmSpendLog `json:"events"`
}
IngestLitellmSpendJSONBody2 defines parameters for IngestLitellmSpend.
type IngestLitellmSpendJSONRequestBody ¶
type IngestLitellmSpendJSONRequestBody IngestLitellmSpendJSONBody
IngestLitellmSpendJSONRequestBody defines body for IngestLitellmSpend for application/json ContentType.
type InstantiateRecipeJSONBody ¶
type InstantiateRecipeJSONBody struct {
Overrides map[string]interface{} `json:"overrides,omitempty"`
}
InstantiateRecipeJSONBody defines parameters for InstantiateRecipe.
type InstantiateRecipeJSONRequestBody ¶
type InstantiateRecipeJSONRequestBody InstantiateRecipeJSONBody
InstantiateRecipeJSONRequestBody defines body for InstantiateRecipe for application/json ContentType.
type InstantiateRecipeParams ¶
type InstantiateRecipeParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
InstantiateRecipeParams defines parameters for InstantiateRecipe.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type InviteMemberJSONBody ¶
type InviteMemberJSONBody struct {
Email openapi_types.Email `json:"email"`
}
InviteMemberJSONBody defines parameters for InviteMember.
type InviteMemberJSONRequestBody ¶
type InviteMemberJSONRequestBody InviteMemberJSONBody
InviteMemberJSONRequestBody defines body for InviteMember for application/json ContentType.
type InviteMemberParams ¶
type InviteMemberParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
InviteMemberParams defines parameters for InviteMember.
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"`
// BillToSnapshot The buyer details this invoice was issued with (ADR-109), copied
// when it left draft. The PDF, the hosted page and the dashboard
// render an issued invoice from this copy, so a later edit to the
// customer or billing profile does not change it. Absent on drafts
// and on invoices issued before this field existed; those render
// from the current customer details.
BillToSnapshot DocumentBillTo `json:"bill_to_snapshot,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 only on legacy invoices created before the zone was stamped (cycle invoices before migration 0134, manual invoices before 2026-10-16).
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"`
// Footer The tenant's `invoice_footer` as it was when this invoice was
// issued. Printed on the PDF and the hosted invoice page. Empty on
// a draft.
Id string `json:"id"`
// InvoiceNumber Set when the invoice is created, including drafts.
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"`
// 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"`
// NoPmNotifiedAt When the customer was emailed a link to add a payment method for
// this invoice. The email is sent once.
NoPmNotifiedAt time.Time `json:"no_pm_notified_at,omitempty"`
PaidAt time.Time `json:"paid_at,omitempty"`
// PaidOutOfBand True when the payment was recorded as made outside Hardcount, such as
// a bank transfer or cheque (`POST /v1/invoices/{id}/record-payment`,
// or a payment recovery run resolved as `payment_recovered`). Such
// an invoice has no `stripe_payment_intent_id`, so there is no card
// to refund.
PaidOutOfBand bool `json:"paid_out_of_band"`
// PaymentAnomalyCapturedCents The amount Stripe took in that unexpected payment.
PaymentAnomalyCapturedCents int64 `json:"payment_anomaly_captured_cents,omitempty"`
// PaymentAnomalyKind Set when a payment arrived that the invoice did not expect. The
// webhook event name of the cause: `payment.duplicate_charge`,
// `payment.amount_mismatch`, `payment.currency_mismatch` or
// `payment.received_on_voided_invoice`.
// Only the latest one is kept.
PaymentAnomalyKind string `json:"payment_anomaly_kind,omitempty"`
// PaymentAnomalyPaymentIntentId The Stripe PaymentIntent of that unexpected payment.
PaymentAnomalyPaymentIntentId string `json:"payment_anomaly_payment_intent_id,omitempty"`
// PaymentCardBrand Brand of the saved card that paid the invoice. Absent when the card is unknown.
PaymentCardBrand string `json:"payment_card_brand,omitempty"`
// PaymentCardLast4 Last four digits of the saved card that paid the invoice.
PaymentCardLast4 string `json:"payment_card_last4,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. With a payment
// intent recorded, Hardcount asks Stripe for it after a short wait. With
// none (a parked invoice), Hardcount lists the customer's payments at
// Stripe every billing tick: it records a payment for the invoice that
// appears, and if none has appeared 24 hours after the attempt the
// invoice goes back to `pending` (`failed` after a dunning retry) and
// is charged again as usual.
PaymentStatus InvoicePaymentStatus `json:"payment_status"`
// ProviderPaymentStatus Stripe's PaymentIntent status the last time Hardcount checked it,
// word for word. For information only: `payment_status` is the
// invoice's payment state. Absent until Hardcount has checked. An
// invoice checked by the Stripe Search sweep of releases before
// this one may still show `search_not_found`,
// `search_terminal_only` or `search_error`.
ProviderPaymentStatus string `json:"provider_payment_status,omitempty"`
// ProviderSyncedAt When Hardcount last asked Stripe about this invoice's payment, whether
// or not Stripe answered: a read of `provider_payment_status`, or a
// check of a charge whose result was lost.
ProviderSyncedAt time.Time `json:"provider_synced_at,omitempty"`
// 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"`
// StripePaymentIntentId The Stripe PaymentIntent of the card charge that paid the
// invoice, or of its last charge that is in progress or failed. It
// can be absent after a charge was sent: for example when the
// invoice was then paid without a card (by credits, with nothing
// due, or outside Hardcount: `paid_out_of_band`), or when Stripe
// refused the last charge as below its minimum.
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"`
// SupplierSnapshot The seller (company) details this invoice was issued with
// (ADR-109), copied when it left draft. Absent on drafts and on
// invoices issued before this field existed. Branding (logo, brand
// color) is not part of it.
SupplierSnapshot DocumentSupplier `json:"supplier_snapshot,omitempty"`
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 Why tax could not be calculated, as a code. Set while
// `tax_status` is `pending`; `tax_pending_reason` has the
// detail.
TaxErrorCode InvoiceTaxErrorCode `json:"tax_error_code,omitempty"`
TaxExemptReason string `json:"tax_exempt_reason,omitempty"`
TaxId string `json:"tax_id,omitempty"`
TaxName string `json:"tax_name,omitempty"`
// TaxNextRetryAt The earliest time the background retry may calculate tax again,
// after a failed attempt. Absent when a retry may run now.
TaxNextRetryAt time.Time `json:"tax_next_retry_at,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"`
// TaxReversedAt When the provider's tax transaction was reversed after a void or
// write-off, or found to need no reversal. Absent while the
// reversal is not confirmed.
TaxReversedAt time.Time `json:"tax_reversed_at,omitempty"`
// TaxStatus Whether tax has been calculated. `ok`: it has. `pending`: the
// calculation failed, and `tax_error_code` says why and whether
// Hardcount retries it. A pending invoice cannot be finalized, so a wrong
// tax amount is never sent.
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"`
// TestClockId The test clock this invoice's dates follow: the clock its customer
// is pinned to, for cycle and one-off invoices alike. Read from the
// customer on `GET /v1/invoices` and `GET /v1/invoices/{id}`; other
// responses may leave it out. Left out for a customer on wall-clock
// time, and always in live mode.
TestClockId string `json:"test_clock_id,omitempty"`
TotalAmountCents int64 `json:"total_amount_cents"`
// UncollectibleAt When the invoice was marked uncollectible.
UncollectibleAt time.Time `json:"uncollectible_at,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
VoidedAt time.Time `json:"voided_at,omitempty"`
}
Invoice A Hardcount 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 ( InvoiceBillingReasonManual InvoiceBillingReason = "manual" InvoiceBillingReasonSubscriptionCancel InvoiceBillingReason = "subscription_cancel" InvoiceBillingReasonSubscriptionCreate InvoiceBillingReason = "subscription_create" InvoiceBillingReasonSubscriptionCycle InvoiceBillingReason = "subscription_cycle" InvoiceBillingReasonSubscriptionUpdate InvoiceBillingReason = "subscription_update" InvoiceBillingReasonThreshold 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 InvoiceCreateRequest ¶
type InvoiceCreateRequest struct {
BillingPeriodEnd time.Time `json:"billing_period_end,omitempty"`
BillingPeriodStart time.Time `json:"billing_period_start,omitempty"`
// Currency ISO 4217 code. Must be the customer's currency (see 409). Defaults to the billing-profile currency, then the live subscriptions' plan currency, then the tenant default.
Currency string `json:"currency,omitempty"`
CustomerId string `json:"customer_id"`
// LineItems Lines created in the same transaction as the invoice.
LineItems []InvoiceLineItemInput `json:"line_items,omitempty"`
Memo string `json:"memo,omitempty"`
// NetPaymentTermDays Days until the invoice is due. 0 means due on receipt. Defaults to the tenant's net payment terms.
NetPaymentTermDays int `json:"net_payment_term_days,omitempty"`
// SubscriptionId Optional. Must belong to `customer_id`. Leave out for a one-off invoice. The subscription's own cycle invoices are still billed, also for the same period.
SubscriptionId string `json:"subscription_id,omitempty"`
}
InvoiceCreateRequest defines model for InvoiceCreateRequest.
type InvoiceDispute ¶
type InvoiceDispute struct {
// AmountCents The disputed amount. It can differ from the payment.
AmountCents int64 `json:"amount_cents"`
// ClosedAt When Stripe closed it. Absent while it is open.
ClosedAt time.Time `json:"closed_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
Currency string `json:"currency"`
// EvidenceDueBy The deadline to respond in Stripe. Absent when Stripe gave none.
EvidenceDueBy time.Time `json:"evidence_due_by,omitempty"`
Id string `json:"id"`
InvoiceId string `json:"invoice_id"`
Livemode bool `json:"livemode"`
// OpenedAt When Stripe opened the dispute.
OpenedAt time.Time `json:"opened_at"`
// Reason The reason the cardholder gave, for example `fraudulent`.
Reason string `json:"reason,omitempty"`
// Status Stripe's dispute status, as Stripe sends it. The `warning_`
// statuses are an inquiry, which comes before a chargeback or
// instead of one. `won`, `lost`, `warning_closed` and `prevented`
// are closed.
Status InvoiceDisputeStatus `json:"status"`
StripeChargeId string `json:"stripe_charge_id,omitempty"`
StripeDisputeId string `json:"stripe_dispute_id"`
// StripePaymentIntentId The disputed payment.
StripePaymentIntentId string `json:"stripe_payment_intent_id"`
UpdatedAt time.Time `json:"updated_at"`
}
InvoiceDispute A card dispute (chargeback) Stripe reported against one of the invoice's payments, recorded from Stripe's `charge.dispute.created`, `.updated` and `.closed` webhook events. It holds the dispute as the newest of those events showed it, whatever order they arrived in. Hardcount records and reports a dispute, and nothing else: the invoice stays paid and no money moves.
type InvoiceDisputeList ¶
type InvoiceDisputeList struct {
Data []InvoiceDispute `json:"data"`
// Total How many rows match the request's filters, on every page, not only
// this one. The audit log and the customer list's search and name or
// email sort say where they stop counting.
Total ListTotal `json:"total"`
}
InvoiceDisputeList defines model for InvoiceDisputeList.
type InvoiceDisputeStatus ¶
type InvoiceDisputeStatus string
InvoiceDisputeStatus Stripe's dispute status, as Stripe sends it. The `warning_` statuses are an inquiry, which comes before a chargeback or instead of one. `won`, `lost`, `warning_closed` and `prevented` are closed.
const ( Lost InvoiceDisputeStatus = "lost" NeedsResponse InvoiceDisputeStatus = "needs_response" Prevented InvoiceDisputeStatus = "prevented" UnderReview InvoiceDisputeStatus = "under_review" WarningClosed InvoiceDisputeStatus = "warning_closed" WarningNeedsResponse InvoiceDisputeStatus = "warning_needs_response" WarningUnderReview InvoiceDisputeStatus = "warning_under_review" Won InvoiceDisputeStatus = "won" )
Defines values for InvoiceDisputeStatus.
func (InvoiceDisputeStatus) Valid ¶
func (e InvoiceDisputeStatus) Valid() bool
Valid indicates whether the value is a known member of the InvoiceDisputeStatus 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. The credit can be drawn up
// to and including this instant; a period invoice draws it when
// its period ends at or before it. The dashboard sends the local
// midnight after the picked day. 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"`
// DimensionMatch On a usage line, the labels its price takes. Absent for a price that takes every event, and on other lines.
DimensionMatch map[string]string `json:"dimension_match,omitempty"`
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"`
// PriceId On a usage line, the plan price that billed it. Absent on other lines.
PriceId string `json:"price_id,omitempty"`
// PricingMode On a usage line, the shape of its price: `per_unit`, `graduated` or `package`. Absent on other lines.
PricingMode string `json:"pricing_mode,omitempty"`
// Quantity The line's exact quantity as a decimal string, for example "3" or "1.5". Line amounts stay whole cents.
Quantity string `json:"quantity"`
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.).
// `prepaid_credit_purchase` is Hardcount's own value, on a prepaid
// commit purchase line under the manual or Stripe Tax provider:
// the line is not taxed, and the usage the credit pays for is
// taxed when invoiced. Otherwise 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"`
// UnitAmountDecimal The unit price in cents at full precision, for example "0.3" for $0.003. On a usage line priced `per_unit` it is that rate; on any other line it is amount_cents ÷ quantity. Line amounts and totals stay whole cents.
UnitAmountDecimal string `json:"unit_amount_decimal"`
}
InvoiceLineItem A single line on an invoice.
type InvoiceLineItemInput ¶
type InvoiceLineItemInput struct {
// CommitExpiresAt When the granted credit expires. The credit can be drawn up to
// and including this instant; a period invoice draws it when its
// period ends at or before it. The dashboard sends the local
// midnight after the picked day. Must be in the future. Needs
// `commit_granted_cents`. Absent means it never expires.
CommitExpiresAt time.Time `json:"commit_expires_at,omitempty"`
// CommitGrantedCents Makes this line a prepaid commit purchase: when the invoice is
// finalized, the customer gets this many cents of credit. Only on
// `add_on` lines of manual invoices, at most one per invoice.
CommitGrantedCents int64 `json:"commit_granted_cents,omitempty"`
Description string `json:"description"`
// LineType Defaults to `add_on`.
LineType InvoiceLineItemInputLineType `json:"line_type,omitempty"`
Quantity int64 `json:"quantity"`
UnitAmountCents int64 `json:"unit_amount_cents"`
}
InvoiceLineItemInput A line to add to a draft invoice.
type InvoiceLineItemInputLineType ¶
type InvoiceLineItemInputLineType string
InvoiceLineItemInputLineType Defaults to `add_on`.
const ( InvoiceLineItemInputLineTypeAddOn InvoiceLineItemInputLineType = "add_on" InvoiceLineItemInputLineTypeBaseFee InvoiceLineItemInputLineType = "base_fee" InvoiceLineItemInputLineTypeUsage InvoiceLineItemInputLineType = "usage" )
Defines values for InvoiceLineItemInputLineType.
func (InvoiceLineItemInputLineType) Valid ¶
func (e InvoiceLineItemInputLineType) Valid() bool
Valid indicates whether the value is a known member of the InvoiceLineItemInputLineType enum.
type InvoiceLineType ¶
type InvoiceLineType string
InvoiceLineType defines model for InvoiceLineType.
const ( InvoiceLineTypeAddOn InvoiceLineType = "add_on" InvoiceLineTypeBaseFee InvoiceLineType = "base_fee" InvoiceLineTypeUsage 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. With a payment intent recorded, Hardcount asks Stripe for it after a short wait. With none (a parked invoice), Hardcount lists the customer's payments at Stripe every billing tick: it records a payment for the invoice that appears, and if none has appeared 24 hours after the attempt the invoice goes back to `pending` (`failed` after a dunning retry) and is charged again as usual.
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 InvoicePaymentTimeline ¶
type InvoicePaymentTimeline struct {
// Degraded Sources that could not be read, so their rows are missing.
Degraded []InvoicePaymentTimelineDegraded `json:"degraded"`
Events []InvoiceTimelineEvent `json:"events"`
// Truncated True when the credit-note source hit its limit of 100 rows.
Truncated bool `json:"truncated"`
}
InvoicePaymentTimeline defines model for InvoicePaymentTimeline.
type InvoicePaymentTimelineDegraded ¶
type InvoicePaymentTimelineDegraded string
InvoicePaymentTimelineDegraded defines model for InvoicePaymentTimeline.Degraded.
const ( InvoicePaymentTimelineDegradedAudit InvoicePaymentTimelineDegraded = "audit" InvoicePaymentTimelineDegradedChargeAttempts InvoicePaymentTimelineDegraded = "charge_attempts" InvoicePaymentTimelineDegradedCreditNotes InvoicePaymentTimelineDegraded = "credit_notes" InvoicePaymentTimelineDegradedDisputes InvoicePaymentTimelineDegraded = "disputes" InvoicePaymentTimelineDegradedDunning InvoicePaymentTimelineDegraded = "dunning" InvoicePaymentTimelineDegradedEmails InvoicePaymentTimelineDegraded = "emails" )
Defines values for InvoicePaymentTimelineDegraded.
func (InvoicePaymentTimelineDegraded) Valid ¶
func (e InvoicePaymentTimelineDegraded) Valid() bool
Valid indicates whether the value is a known member of the InvoicePaymentTimelineDegraded enum.
type InvoicePreview ¶
type InvoicePreview struct {
BillingPeriodEnd time.Time `json:"billing_period_end"`
BillingPeriodStart time.Time `json:"billing_period_start"`
CustomerId string `json:"customer_id"`
GeneratedAt time.Time `json:"generated_at"`
Lines []InvoicePreviewLine `json:"lines"`
// PlanName The names of the subscription's plans, comma-separated.
PlanName string `json:"plan_name"`
SubscriptionId string `json:"subscription_id"`
// Totals One total per currency on the lines.
Totals []InvoicePreviewTotal `json:"totals"`
// Warnings Ways the real invoice can differ from this preview.
Warnings []string `json:"warnings"`
}
InvoicePreview A dry-run invoice built from the usage recorded so far. Nothing is saved.
type InvoicePreviewLine ¶
type InvoicePreviewLine struct {
AmountCents int64 `json:"amount_cents"`
Currency string `json:"currency"`
Description string `json:"description"`
// DimensionMatch On a usage line, the labels its price takes. Absent for a price that takes every event.
DimensionMatch map[string]string `json:"dimension_match,omitempty"`
LineType InvoicePreviewLineLineType `json:"line_type"`
MeterId string `json:"meter_id,omitempty"`
MeterUnit string `json:"meter_unit,omitempty"`
// PriceId On a usage line, the plan price that priced it.
PriceId string `json:"price_id,omitempty"`
PricingMode InvoicePreviewLinePricingMode `json:"pricing_mode,omitempty"`
// Quantity Exact quantity as a decimal string.
Quantity string `json:"quantity"`
UnitAmountCents int64 `json:"unit_amount_cents"`
}
InvoicePreviewLine defines model for InvoicePreviewLine.
type InvoicePreviewLineLineType ¶
type InvoicePreviewLineLineType string
InvoicePreviewLineLineType defines model for InvoicePreviewLine.LineType.
const ( InvoicePreviewLineLineTypeBaseFee InvoicePreviewLineLineType = "base_fee" InvoicePreviewLineLineTypeUsage InvoicePreviewLineLineType = "usage" )
Defines values for InvoicePreviewLineLineType.
func (InvoicePreviewLineLineType) Valid ¶
func (e InvoicePreviewLineLineType) Valid() bool
Valid indicates whether the value is a known member of the InvoicePreviewLineLineType enum.
type InvoicePreviewLinePricingMode ¶
type InvoicePreviewLinePricingMode string
InvoicePreviewLinePricingMode defines model for InvoicePreviewLine.PricingMode.
const ( InvoicePreviewLinePricingModeGraduated InvoicePreviewLinePricingMode = "graduated" InvoicePreviewLinePricingModePackage InvoicePreviewLinePricingMode = "package" InvoicePreviewLinePricingModePerUnit InvoicePreviewLinePricingMode = "per_unit" )
Defines values for InvoicePreviewLinePricingMode.
func (InvoicePreviewLinePricingMode) Valid ¶
func (e InvoicePreviewLinePricingMode) Valid() bool
Valid indicates whether the value is a known member of the InvoicePreviewLinePricingMode enum.
type InvoicePreviewTotal ¶
type InvoicePreviewTotal struct {
AmountCents int64 `json:"amount_cents"`
Currency string `json:"currency"`
}
InvoicePreviewTotal defines model for InvoicePreviewTotal.
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 InvoiceTaxErrorCode ¶
type InvoiceTaxErrorCode string
InvoiceTaxErrorCode Why tax could not be calculated, as a code. Set while `tax_status` is `pending`; `tax_pending_reason` has the detail.
const ( InvoiceTaxErrorCodeCustomerDataInvalid InvoiceTaxErrorCode = "customer_data_invalid" InvoiceTaxErrorCodeJurisdictionUnsupported InvoiceTaxErrorCode = "jurisdiction_unsupported" InvoiceTaxErrorCodeProviderAuth InvoiceTaxErrorCode = "provider_auth" InvoiceTaxErrorCodeProviderNotConfigured InvoiceTaxErrorCode = "provider_not_configured" InvoiceTaxErrorCodeProviderOutage InvoiceTaxErrorCode = "provider_outage" InvoiceTaxErrorCodeUnknown InvoiceTaxErrorCode = "unknown" )
Defines values for InvoiceTaxErrorCode.
func (InvoiceTaxErrorCode) Valid ¶
func (e InvoiceTaxErrorCode) Valid() bool
Valid indicates whether the value is a known member of the InvoiceTaxErrorCode enum.
type InvoiceTaxStatus ¶
type InvoiceTaxStatus string
InvoiceTaxStatus Whether tax has been calculated. `ok`: it has. `pending`: the calculation failed, and `tax_error_code` says why and whether Hardcount retries it. A pending invoice cannot be finalized, so a wrong tax amount is never sent.
const ( 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 InvoiceTimelineEvent ¶
type InvoiceTimelineEvent struct {
AmountCents int64 `json:"amount_cents,omitempty"`
AttemptCount int `json:"attempt_count,omitempty"`
Currency string `json:"currency,omitempty"`
// Description The line's title.
Description string `json:"description"`
// Detail The line's meta line as text, its actor last, for example "Visa •••• 4242 · After 2 retries".
Detail string `json:"detail,omitempty"`
// Error The line's problem.
Error string `json:"error,omitempty"`
EventType string `json:"event_type"`
// Id Stable key for the row.
Id string `json:"id"`
// IsSimulated True when `timestamp` is test-clock time.
IsSimulated bool `json:"is_simulated,omitempty"`
// Line One activity row in the words of the activity line standard
// (ADR-128): a title with no values, the amount when the event moves
// money, asks for it or cancels money owed, a problem line on failure
// and warning rows, the meta line's parts and the actor, a tone, and
// the event's time on the entity's calendar. `recorded_at` is the
// real-world time, set only for an entity on a test clock.
Line ActivityLine `json:"line"`
PaymentIntentId string `json:"payment_intent_id,omitempty"`
// RecordedAt Real-world time of a row whose `timestamp` is test-clock time.
RecordedAt time.Time `json:"recorded_at,omitempty"`
Source InvoiceTimelineEventSource `json:"source"`
// Status The line's tone in older words, read by the dashboard's dot.
Status InvoiceTimelineEventStatus `json:"status"`
Timestamp time.Time `json:"timestamp"`
}
InvoiceTimelineEvent defines model for InvoiceTimelineEvent.
type InvoiceTimelineEventSource ¶
type InvoiceTimelineEventSource string
InvoiceTimelineEventSource defines model for InvoiceTimelineEvent.Source.
const ( InvoiceTimelineEventSourceCreditNote InvoiceTimelineEventSource = "credit_note" InvoiceTimelineEventSourceDispute InvoiceTimelineEventSource = "dispute" InvoiceTimelineEventSourceDunning InvoiceTimelineEventSource = "dunning" InvoiceTimelineEventSourceEmail InvoiceTimelineEventSource = "email" InvoiceTimelineEventSourceLifecycle InvoiceTimelineEventSource = "lifecycle" InvoiceTimelineEventSourcePayment InvoiceTimelineEventSource = "payment" )
Defines values for InvoiceTimelineEventSource.
func (InvoiceTimelineEventSource) Valid ¶
func (e InvoiceTimelineEventSource) Valid() bool
Valid indicates whether the value is a known member of the InvoiceTimelineEventSource enum.
type InvoiceTimelineEventStatus ¶
type InvoiceTimelineEventStatus string
InvoiceTimelineEventStatus The line's tone in older words, read by the dashboard's dot.
const ( InvoiceTimelineEventStatusFailed InvoiceTimelineEventStatus = "failed" InvoiceTimelineEventStatusNeutral InvoiceTimelineEventStatus = "neutral" InvoiceTimelineEventStatusSucceeded InvoiceTimelineEventStatus = "succeeded" InvoiceTimelineEventStatusWarning InvoiceTimelineEventStatus = "warning" )
Defines values for InvoiceTimelineEventStatus.
func (InvoiceTimelineEventStatus) Valid ¶
func (e InvoiceTimelineEventStatus) Valid() bool
Valid indicates whether the value is a known member of the InvoiceTimelineEventStatus enum.
type InvoiceWithLineItems ¶
type InvoiceWithLineItems struct {
// Invoice A Hardcount 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 IssueCreditNoteParams ¶
type IssueCreditNoteParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
IssueCreditNoteParams defines parameters for IssueCreditNote.
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 ListApiKeysParams ¶
type ListApiKeysParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListApiKeysParams defines parameters for ListApiKeys.
type ListAuditLogParams ¶
type ListAuditLogParams struct {
// ResourceType For example `invoice`, `api_key`, `setting`. See `/v1/audit-log/filters`.
ResourceType string `form:"resource_type,omitempty" json:"resource_type,omitempty"`
ResourceId string `form:"resource_id,omitempty" json:"resource_id,omitempty"`
// Action For example `create`, `update`, `revoke`. See `/v1/audit-log/filters`.
Action string `form:"action,omitempty" json:"action,omitempty"`
// ActorId A user id or an API key id.
ActorId string `form:"actor_id,omitempty" json:"actor_id,omitempty"`
// DateFrom Lower bound on `created_at`, inclusive. RFC3339 or YYYY-MM-DD (start of day, UTC).
DateFrom string `form:"date_from,omitempty" json:"date_from,omitempty"`
// DateTo Upper bound on `created_at`, inclusive. RFC3339 or YYYY-MM-DD (23:59:59.999999 UTC, the end of that day).
DateTo string `form:"date_to,omitempty" json:"date_to,omitempty"`
// TestClockId Only entries made inside this test clock's simulation. Works for deleted clocks too.
TestClockId string `form:"test_clock_id,omitempty" json:"test_clock_id,omitempty"`
// SimFrom Lower bound on `sim_effective_at` (simulated time), inclusive. Excludes entries with no simulated time.
SimFrom string `form:"sim_from,omitempty" json:"sim_from,omitempty"`
// SimTo Upper bound on `sim_effective_at`, inclusive.
SimTo string `form:"sim_to,omitempty" json:"sim_to,omitempty"`
// Order The only supported order. Any other value is a 400.
Order ListAuditLogParamsOrder `form:"order,omitempty" json:"order,omitempty"`
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListAuditLogParams defines parameters for ListAuditLog.
type ListAuditLogParamsOrder ¶
type ListAuditLogParamsOrder string
ListAuditLogParamsOrder defines parameters for ListAuditLog.
const (
CreatedAt ListAuditLogParamsOrder = "created_at"
)
Defines values for ListAuditLogParamsOrder.
func (ListAuditLogParamsOrder) Valid ¶
func (e ListAuditLogParamsOrder) Valid() bool
Valid indicates whether the value is a known member of the ListAuditLogParamsOrder enum.
type ListCreditBalancesParams ¶
type ListCreditBalancesParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListCreditBalancesParams defines parameters for ListCreditBalances.
type ListCreditLedgerEntriesParams ¶
type ListCreditLedgerEntriesParams struct {
EntryType ListCreditLedgerEntriesParamsEntryType `form:"entry_type,omitempty" json:"entry_type,omitempty"`
// Sort One of created_at (default), amount_cents, entry_type, expires_at.
Sort string `form:"sort,omitempty" json:"sort,omitempty"`
// Dir Default desc.
Dir ListCreditLedgerEntriesParamsDir `form:"dir,omitempty" json:"dir,omitempty"`
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListCreditLedgerEntriesParams defines parameters for ListCreditLedgerEntries.
type ListCreditLedgerEntriesParamsDir ¶
type ListCreditLedgerEntriesParamsDir string
ListCreditLedgerEntriesParamsDir defines parameters for ListCreditLedgerEntries.
const ( ListCreditLedgerEntriesParamsDirAsc ListCreditLedgerEntriesParamsDir = "asc" ListCreditLedgerEntriesParamsDirDesc ListCreditLedgerEntriesParamsDir = "desc" )
Defines values for ListCreditLedgerEntriesParamsDir.
func (ListCreditLedgerEntriesParamsDir) Valid ¶
func (e ListCreditLedgerEntriesParamsDir) Valid() bool
Valid indicates whether the value is a known member of the ListCreditLedgerEntriesParamsDir enum.
type ListCreditLedgerEntriesParamsEntryType ¶
type ListCreditLedgerEntriesParamsEntryType string
ListCreditLedgerEntriesParamsEntryType defines parameters for ListCreditLedgerEntries.
const ( Adjustment ListCreditLedgerEntriesParamsEntryType = "adjustment" Expiry ListCreditLedgerEntriesParamsEntryType = "expiry" Grant ListCreditLedgerEntriesParamsEntryType = "grant" Usage ListCreditLedgerEntriesParamsEntryType = "usage" )
Defines values for ListCreditLedgerEntriesParamsEntryType.
func (ListCreditLedgerEntriesParamsEntryType) Valid ¶
func (e ListCreditLedgerEntriesParamsEntryType) Valid() bool
Valid indicates whether the value is a known member of the ListCreditLedgerEntriesParamsEntryType enum.
type ListCreditNotesParams ¶
type ListCreditNotesParams struct {
InvoiceId string `form:"invoice_id,omitempty" json:"invoice_id,omitempty"`
CustomerId string `form:"customer_id,omitempty" json:"customer_id,omitempty"`
Status ListCreditNotesParamsStatus `form:"status,omitempty" json:"status,omitempty"`
// RefundStatus `needs_attention` returns issued, non-test-clock notes whose
// refund failed or has an unknown result, has been pending more
// than 72 hours, or has a refund amount still at `none` after 1
// hour.
RefundStatus ListCreditNotesParamsRefundStatus `form:"refund_status,omitempty" json:"refund_status,omitempty"`
// Sort One of credit_note_number, total_cents (alias amount), status, issued_at, created_at (default).
Sort string `form:"sort,omitempty" json:"sort,omitempty"`
Dir ListCreditNotesParamsDir `form:"dir,omitempty" json:"dir,omitempty"`
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListCreditNotesParams defines parameters for ListCreditNotes.
type ListCreditNotesParamsDir ¶
type ListCreditNotesParamsDir string
ListCreditNotesParamsDir defines parameters for ListCreditNotes.
const ( ListCreditNotesParamsDirAsc ListCreditNotesParamsDir = "asc" ListCreditNotesParamsDirDesc ListCreditNotesParamsDir = "desc" )
Defines values for ListCreditNotesParamsDir.
func (ListCreditNotesParamsDir) Valid ¶
func (e ListCreditNotesParamsDir) Valid() bool
Valid indicates whether the value is a known member of the ListCreditNotesParamsDir enum.
type ListCreditNotesParamsRefundStatus ¶
type ListCreditNotesParamsRefundStatus string
ListCreditNotesParamsRefundStatus defines parameters for ListCreditNotes.
const ( ListCreditNotesParamsRefundStatusFailed ListCreditNotesParamsRefundStatus = "failed" ListCreditNotesParamsRefundStatusNeedsAttention ListCreditNotesParamsRefundStatus = "needs_attention" ListCreditNotesParamsRefundStatusNone ListCreditNotesParamsRefundStatus = "none" ListCreditNotesParamsRefundStatusPending ListCreditNotesParamsRefundStatus = "pending" ListCreditNotesParamsRefundStatusSucceeded ListCreditNotesParamsRefundStatus = "succeeded" ListCreditNotesParamsRefundStatusUnknown ListCreditNotesParamsRefundStatus = "unknown" )
Defines values for ListCreditNotesParamsRefundStatus.
func (ListCreditNotesParamsRefundStatus) Valid ¶
func (e ListCreditNotesParamsRefundStatus) Valid() bool
Valid indicates whether the value is a known member of the ListCreditNotesParamsRefundStatus enum.
type ListCreditNotesParamsStatus ¶
type ListCreditNotesParamsStatus string
ListCreditNotesParamsStatus defines parameters for ListCreditNotes.
const ( ListCreditNotesParamsStatusDraft ListCreditNotesParamsStatus = "draft" ListCreditNotesParamsStatusIssued ListCreditNotesParamsStatus = "issued" ListCreditNotesParamsStatusVoided ListCreditNotesParamsStatus = "voided" )
Defines values for ListCreditNotesParamsStatus.
func (ListCreditNotesParamsStatus) Valid ¶
func (e ListCreditNotesParamsStatus) Valid() bool
Valid indicates whether the value is a known member of the ListCreditNotesParamsStatus enum.
type ListCustomerPaymentMethodsParams ¶
type ListCustomerPaymentMethodsParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListCustomerPaymentMethodsParams defines parameters for ListCustomerPaymentMethods.
type ListCustomerSentEmailsParams ¶
type ListCustomerSentEmailsParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListCustomerSentEmailsParams defines parameters for ListCustomerSentEmails.
type ListDunningPoliciesParams ¶
type ListDunningPoliciesParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListDunningPoliciesParams defines parameters for ListDunningPolicies.
type ListDunningRunsParams ¶
type ListDunningRunsParams struct {
InvoiceId string `form:"invoice_id,omitempty" json:"invoice_id,omitempty"`
State ListDunningRunsParamsState `form:"state,omitempty" json:"state,omitempty"`
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListDunningRunsParams defines parameters for ListDunningRuns.
type ListDunningRunsParamsState ¶
type ListDunningRunsParamsState string
ListDunningRunsParamsState defines parameters for ListDunningRuns.
const ( ListDunningRunsParamsStateActive ListDunningRunsParamsState = "active" ListDunningRunsParamsStateEscalated ListDunningRunsParamsState = "escalated" ListDunningRunsParamsStateResolved ListDunningRunsParamsState = "resolved" )
Defines values for ListDunningRunsParamsState.
func (ListDunningRunsParamsState) Valid ¶
func (e ListDunningRunsParamsState) Valid() bool
Valid indicates whether the value is a known member of the ListDunningRunsParamsState enum.
type ListInvoiceDisputesParams ¶
type ListInvoiceDisputesParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListInvoiceDisputesParams defines parameters for ListInvoiceDisputes.
type ListPlanPricesParams ¶
type ListPlanPricesParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListPlanPricesParams defines parameters for ListPlanPrices.
type ListPriceOverridesParams ¶
type ListPriceOverridesParams struct {
// CustomerId Only this customer's overrides.
CustomerId string `form:"customer_id,omitempty" json:"customer_id,omitempty"`
// PriceId Only this price's overrides.
PriceId string `form:"price_id,omitempty" json:"price_id,omitempty"`
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListPriceOverridesParams defines parameters for ListPriceOverrides.
type ListRecipeInstancesParams ¶
type ListRecipeInstancesParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListRecipeInstancesParams defines parameters for ListRecipeInstances.
type ListRecipesParams ¶
type ListRecipesParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListRecipesParams defines parameters for ListRecipes.
type ListTenantsParams ¶
type ListTenantsParams struct {
Status ListTenantsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListTenantsParams defines parameters for ListTenants.
type ListTenantsParamsStatus ¶
type ListTenantsParamsStatus string
ListTenantsParamsStatus defines parameters for ListTenants.
const ( ListTenantsParamsStatusActive ListTenantsParamsStatus = "active" ListTenantsParamsStatusDeleted ListTenantsParamsStatus = "deleted" ListTenantsParamsStatusSuspended ListTenantsParamsStatus = "suspended" )
Defines values for ListTenantsParamsStatus.
func (ListTenantsParamsStatus) Valid ¶
func (e ListTenantsParamsStatus) Valid() bool
Valid indicates whether the value is a known member of the ListTenantsParamsStatus enum.
type ListTestClockCustomersParams ¶
type ListTestClockCustomersParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListTestClockCustomersParams defines parameters for ListTestClockCustomers.
type ListTotal ¶
type ListTotal = int
ListTotal How many rows match the request's filters, on every page, not only this one. The audit log and the customer list's search and name or email sort say where they stop counting.
type ListWebhookEndpointDeliveriesParams ¶
type ListWebhookEndpointDeliveriesParams struct {
// Limit Rows per page, from 1 to 100. Default 50. Any other value, or one
// that is not a whole number, is a 422 with `param: limit`.
Limit Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset Rows to skip, 0 or more. Default 0. A negative value, or one that is
// not a whole number, is a 422 with `param: offset`.
Offset Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListWebhookEndpointDeliveriesParams defines parameters for ListWebhookEndpointDeliveries.
type LitellmSpendLog ¶
type LitellmSpendLog struct {
// CacheHit `true` when LiteLLM answered from its own response cache. The
// record is skipped and counted in `cache_hits`: the provider
// charged nothing.
CacheHit bool `json:"cache_hit,omitempty"`
// CallType A record bills on its token counts unless its call type is one
// Hardcount does not bill (images, audio, realtime, moderation,
// batches, files, A2A, response retrieval, ...); those are
// skipped, and a skipped record that carries tokens is logged.
CallType string `json:"call_type,omitempty"`
CompletionTokens int64 `json:"completion_tokens,omitempty"`
// CostBreakdown The provider's own cost, in dollars. When present, each event's
// provider cost comes from its part (input, output, cache read or
// cache write) instead of the provider-costs table. A part that is
// missing or negative falls back to the table. `input_cost`
// includes cache reads and cache writes, so the input event gets
// `input_cost` minus `cache_read_cost` and `cache_creation_cost`.
// If there were cache reads but no `cache_read_cost`, or split-off
// cache writes but no `cache_creation_cost`, the input-side events
// use the provider-costs table. With 1-hour cache writes they
// always do: LiteLLM prices `cache_creation_cost` at the 5-minute
// rate.
CostBreakdown struct {
CacheCreationCost float32 `json:"cache_creation_cost,omitempty"`
CacheReadCost float32 `json:"cache_read_cost,omitempty"`
InputCost float32 `json:"input_cost,omitempty"`
OutputCost float32 `json:"output_cost,omitempty"`
ToolUsageCost float32 `json:"tool_usage_cost,omitempty"`
TotalCost float32 `json:"total_cost,omitempty"`
} `json:"cost_breakdown,omitempty"`
CustomLlmProvider string `json:"custom_llm_provider,omitempty"`
// EndTime Unix seconds. The event time. With neither, the customer's current time is used.
EndTime float32 `json:"endTime,omitempty"`
// EndUser Where LiteLLM Proxy puts the caller's `user`. Used when `user` is empty.
EndUser string `json:"end_user,omitempty"`
// Id LiteLLM's call id. Used to build the events' idempotency keys.
Id string `json:"id,omitempty"`
// Metadata `team_id` and `request_tags` become event dimensions;
// `usage_object` is read for token counts; other keys are ignored.
Metadata map[string]interface{} `json:"metadata,omitempty"`
Model string `json:"model,omitempty"`
// PromptTokens Used when there is no `usage` object.
PromptTokens int64 `json:"prompt_tokens,omitempty"`
// ResponseCost Accepted but not stored.
ResponseCost float32 `json:"response_cost,omitempty"`
// StartTime Unix seconds. Event time when `endTime` is absent.
StartTime float32 `json:"startTime,omitempty"`
// Status A `failure` record (a call the provider refused or that timed out) is skipped, whatever token counts it carries.
Status string `json:"status,omitempty"`
TotalTokens int64 `json:"total_tokens,omitempty"`
Usage struct {
// CacheCreationInputTokens Cache-write tokens, included in prompt_tokens. Split into `cache_write_5m` and `cache_write_1h` by `prompt_tokens_details.cache_creation_token_details`.
CacheCreationInputTokens int64 `json:"cache_creation_input_tokens,omitempty"`
CacheReadInputTokens int64 `json:"cache_read_input_tokens,omitempty"`
CompletionTokens int64 `json:"completion_tokens,omitempty"`
// PromptTokens Includes cache-read tokens.
PromptTokens int64 `json:"prompt_tokens,omitempty"`
PromptTokensDetails struct {
// CacheCreationTokenDetails Anthropic's cache writes by cache lifetime. They become
// `cache_write_5m` and `cache_write_1h` events, taken out
// of `input`. Without this split, or when it does not add
// up to the cache-write count, the writes stay in `input`.
CacheCreationTokenDetails struct {
Ephemeral1hInputTokens int64 `json:"ephemeral_1h_input_tokens,omitempty"`
Ephemeral5mInputTokens int64 `json:"ephemeral_5m_input_tokens,omitempty"`
} `json:"cache_creation_token_details,omitempty"`
CacheCreationTokens int64 `json:"cache_creation_tokens,omitempty"`
CachedTokens int64 `json:"cached_tokens,omitempty"`
} `json:"prompt_tokens_details,omitempty"`
TotalTokens int64 `json:"total_tokens,omitempty"`
} `json:"usage,omitempty"`
// User The customer's external_id.
User string `json:"user,omitempty"`
}
LitellmSpendLog The fields of a LiteLLM `StandardLoggingPayload` that Hardcount reads. Other fields are accepted and ignored.
type LitellmSpendResult ¶
type LitellmSpendResult struct {
// Accepted Usage events newly recorded.
Accepted int `json:"accepted"`
// AfterClose Of `accepted`, the events answered `billing_status:
// after_close`: their time was already invoiced. A replay never
// counts here.
AfterClose int `json:"after_close"`
// CacheHits The LiteLLM response-cache hits among `skipped`. LiteLLM's own spend counts them as $0.
CacheHits int `json:"cache_hits"`
// Deduplicated Usage events already recorded, or already held, by an earlier delivery.
Deduplicated int `json:"deduplicated"`
// Errors One entry per record that was not recorded. A record's events are recorded together or not at all.
Errors []struct {
Error string `json:"error"`
// Id The LiteLLM record id.
Id string `json:"id"`
} `json:"errors,omitempty"`
// Held Usage events kept because their customer or meter does not
// exist yet. Not billed until released with
// `POST /v1/usage-events/held/release`.
Held int `json:"held"`
// NoPrice Of `accepted`, the events no price of the subscription's plan
// takes (`billing_status: no_price`), such as a model no price
// names. A replay never counts here.
NoPrice int `json:"no_price"`
// NotOnPlan Of `accepted`, the events whose meter the subscription's plan
// does not price (`billing_status: not_on_plan`). A replay never
// counts here.
NotOnPlan int `json:"not_on_plan"`
// OutsideSubscription Of `accepted`, the events whose time no subscription of the
// customer bills (`billing_status: outside_subscription`). A replay
// never counts here.
OutsideSubscription int `json:"outside_subscription"`
// Skipped Records that bill nothing - a call type with no tokens, zero tokens, a failed call (`status` `failure`) or a LiteLLM response-cache hit.
Skipped int `json:"skipped"`
}
LitellmSpendResult defines model for LitellmSpendResult.
type MarginReport ¶
type MarginReport struct {
ByModel []struct {
// Attributed True only when the price that billed the usage names this model — margin is never heuristically allocated.
Attributed bool `json:"attributed"`
// CostCents This model's stamped provider cost in US cents, as a decimal string.
CostCents string `json:"cost_cents"`
// MarginBps This model's (revenue − cost) / revenue in basis points, by the same formula as the report's margin_bps. Omitted whenever the report's margin_bps is omitted for currency or unresolved_events, and when the row is not attributed or has no provider cost of its own.
MarginBps int64 `json:"margin_bps,omitempty"`
Model string `json:"model"`
RevenueCents int64 `json:"revenue_cents,omitempty"`
} `json:"by_model"`
// CostCents Total stamped provider cost in US cents, as a decimal string (e.g. "275.75").
CostCents string `json:"cost_cents"`
// CostCurrency Currency of cost_cents. Always USD.
CostCurrency string `json:"cost_currency"`
// CostRatesConfigured Whether the tenant has any provider cost rate. False with costed_events 0 means no rates are set up.
CostRatesConfigured bool `json:"cost_rates_configured"`
// CostedEvents Events in the window that carry a stamped provider cost (zero cost included). 0 means the cost side is unknown.
CostedEvents int64 `json:"costed_events"`
CustomerId string `json:"customer_id"`
From time.Time `json:"from"`
// MarginBps (revenue − cost) / revenue in basis points. Omitted when revenue is 0, when revenue_currency is not cost_currency, when costed_events is 0 (no provider cost known), or when unresolved_events is above 0 (part of the cost unknown, so the margin would read too high).
MarginBps int64 `json:"margin_bps,omitempty"`
// RevenueCents Total rated usage revenue in the window, an estimate at each subscription's current prices. Only active and trialing subscriptions are counted.
RevenueCents int64 `json:"revenue_cents"`
// RevenueCurrency Currency of revenue_cents (the customer's price rules). Omitted when the window's revenue spans more than one currency or the customer has no priced meter.
RevenueCurrency string `json:"revenue_currency,omitempty"`
To time.Time `json:"to"`
UnattributedRevenueCents int64 `json:"unattributed_revenue_cents"`
// UnresolvedEvents Token events with costable dims but no cost — no rate matched (add a rate to cost new events), or the cost, quantity × `unit_cost_cents`, was too large to record (about $9.2 trillion or more, either sign).
UnresolvedEvents int64 `json:"unresolved_events"`
}
MarginReport defines model for MarginReport.
type MarkInvoiceUncollectibleParams ¶
type MarkInvoiceUncollectibleParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
MarkInvoiceUncollectibleParams defines parameters for MarkInvoiceUncollectible.
type MemberInvitation ¶
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 ¶
type MemberInvitationStatus string
MemberInvitationStatus Server-derived; treat as authoritative.
const ( MemberInvitationStatusAccepted MemberInvitationStatus = "accepted" MemberInvitationStatusExpired MemberInvitationStatus = "expired" MemberInvitationStatusPending MemberInvitationStatus = "pending" MemberInvitationStatusRevoked MemberInvitationStatus = "revoked" )
Defines values for MemberInvitationStatus.
func (MemberInvitationStatus) Valid ¶
func (e MemberInvitationStatus) Valid() bool
Valid indicates whether the value is a known member of the MemberInvitationStatus enum.
type Meter ¶
type Meter struct {
// Aggregation How the meter rolls its events into one quantity per billing
// period. Every price of the meter bills under it. `last`
// is the latest event by timestamp, then by id. Fixed once the
// meter has a usage event (see `has_usage`).
Aggregation MeterAggregation `json:"aggregation"`
CreatedAt time.Time `json:"created_at"`
// EventName The `event_name` usage events send for this meter.
EventName string `json:"event_name"`
// HasUsage Whether the meter has usage events. Once it has, its
// `aggregation` cannot change. Held usage for its `event_name`
// does not count until it is released. Returned when you create,
// get or update one meter; the meter list leaves it out. A create
// or update that succeeded leaves it out if it could not be read.
HasUsage bool `json:"has_usage,omitempty"`
Id string `json:"id"`
Name string `json:"name"`
TenantId string `json:"tenant_id,omitempty"`
Unit string `json:"unit"`
UpdatedAt time.Time `json:"updated_at"`
}
Meter defines model for Meter.
type MeterAggregation ¶
type MeterAggregation string
MeterAggregation How the meter rolls its events into one quantity per billing period. Every price of the meter bills under it. `last` is the latest event by timestamp, then by id. Fixed once the meter has a usage event (see `has_usage`).
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"`
Unit string `json:"unit,omitempty"`
}
PatchV1MetersIdJSONBody defines parameters for PatchV1MetersId.
type PatchV1MetersIdJSONBodyAggregation ¶
type PatchV1MetersIdJSONBodyAggregation string
PatchV1MetersIdJSONBodyAggregation defines parameters for PatchV1MetersId.
const ( Count PatchV1MetersIdJSONBodyAggregation = "count" Last PatchV1MetersIdJSONBodyAggregation = "last" Max PatchV1MetersIdJSONBodyAggregation = "max" Sum 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 PatchV1MetersIdParams ¶
type PatchV1MetersIdParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PatchV1MetersIdParams defines parameters for PatchV1MetersId.
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 PatchV1WebhookEndpointsEndpointsIdParams ¶
type PatchV1WebhookEndpointsEndpointsIdParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PatchV1WebhookEndpointsEndpointsIdParams defines parameters for PatchV1WebhookEndpointsEndpointsId.
type PauseSubscriptionCollectionJSONBody ¶
type PauseSubscriptionCollectionJSONBody struct {
Behavior PauseSubscriptionCollectionJSONBodyBehavior `json:"behavior"`
// ResumesAt When collection resumes. Must be in the future.
ResumesAt time.Time `json:"resumes_at,omitempty"`
}
PauseSubscriptionCollectionJSONBody defines parameters for PauseSubscriptionCollection.
type PauseSubscriptionCollectionJSONBodyBehavior ¶
type PauseSubscriptionCollectionJSONBodyBehavior string
PauseSubscriptionCollectionJSONBodyBehavior defines parameters for PauseSubscriptionCollection.
const (
PauseSubscriptionCollectionJSONBodyBehaviorKeepAsDraft PauseSubscriptionCollectionJSONBodyBehavior = "keep_as_draft"
)
Defines values for PauseSubscriptionCollectionJSONBodyBehavior.
func (PauseSubscriptionCollectionJSONBodyBehavior) Valid ¶
func (e PauseSubscriptionCollectionJSONBodyBehavior) Valid() bool
Valid indicates whether the value is a known member of the PauseSubscriptionCollectionJSONBodyBehavior enum.
type PauseSubscriptionCollectionJSONRequestBody ¶
type PauseSubscriptionCollectionJSONRequestBody PauseSubscriptionCollectionJSONBody
PauseSubscriptionCollectionJSONRequestBody defines body for PauseSubscriptionCollection for application/json ContentType.
type PauseSubscriptionCollectionParams ¶
type PauseSubscriptionCollectionParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PauseSubscriptionCollectionParams defines parameters for PauseSubscriptionCollection.
type PaymentMethod ¶
type PaymentMethod struct {
CardBrand string `json:"card_brand,omitempty"`
CardExpMonth int `json:"card_exp_month,omitempty"`
CardExpYear int `json:"card_exp_year,omitempty"`
CardLast4 string `json:"card_last4,omitempty"`
CreatedAt time.Time `json:"created_at"`
CustomerId string `json:"customer_id"`
Id string `json:"id"`
IsDefault bool `json:"is_default"`
Type string `json:"type"`
}
PaymentMethod defines model for PaymentMethod.
type Plan ¶
type Plan struct {
BaseAmountCents int64 `json:"base_amount_cents"`
// BaseBillTiming When the recurring base fee is invoiced relative to the period it covers.
// in_arrears: 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 field. A plan with no base fee is
// in_arrears. See ADR-031.
BaseBillTiming PlanBaseBillTiming `json:"base_bill_timing"`
BillingInterval PlanBillingInterval `json:"billing_interval"`
Code string `json:"code"`
CreatedAt time.Time `json:"created_at"`
Currency string `json:"currency"`
Description string `json:"description,omitempty"`
Id string `json:"id"`
Name string `json:"name"`
// Prices The plan's usage prices from now on. A plan's meters are the
// meters it has a price for.
Prices []PlanPrice `json:"prices"`
Status PlanStatus `json:"status"`
// TaxCode Stripe tax code for this plan. Absent means the tenant's `default_product_tax_code`.
TaxCode string `json:"tax_code,omitempty"`
TenantId string `json:"tenant_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
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: 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 field. A plan with no base fee is in_arrears. 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 PlanDetail ¶
type PlanDetail struct {
BaseAmountCents int64 `json:"base_amount_cents"`
// BaseBillTiming When the recurring base fee is invoiced relative to the period it covers.
// in_arrears: 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 field. A plan with no base fee is
// in_arrears. See ADR-031.
BaseBillTiming PlanDetailBaseBillTiming `json:"base_bill_timing"`
BillingInterval PlanDetailBillingInterval `json:"billing_interval"`
Code string `json:"code"`
CreatedAt time.Time `json:"created_at"`
Currency string `json:"currency"`
Description string `json:"description,omitempty"`
Id string `json:"id"`
// LiveSubscriptionCount Subscriptions on this plan that are not canceled. While it
// is above 0, `base_amount_cents` cannot change (see Update
// plan).
LiveSubscriptionCount int `json:"live_subscription_count"`
Name string `json:"name"`
// Prices The plan's usage prices from now on. A plan's meters are the
// meters it has a price for.
Prices []PlanPrice `json:"prices"`
Status PlanDetailStatus `json:"status"`
// TaxCode Stripe tax code for this plan. Absent means the tenant's `default_product_tax_code`.
TaxCode string `json:"tax_code,omitempty"`
TenantId string `json:"tenant_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
// Used Whether a subscription has ever used the plan (canceled ones
// and scheduled plan changes included). On a plan no one has
// used, a price change applies at once; on a used plan, from
// each subscriber's next billing period, and from the join for
// a subscriber who first joins the plan in a period after it.
Used bool `json:"used"`
}
PlanDetail defines model for PlanDetail.
type PlanDetailBaseBillTiming ¶
type PlanDetailBaseBillTiming string
PlanDetailBaseBillTiming When the recurring base fee is invoiced relative to the period it covers. in_arrears: 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 field. A plan with no base fee is in_arrears. See ADR-031.
const ( PlanDetailBaseBillTimingInAdvance PlanDetailBaseBillTiming = "in_advance" PlanDetailBaseBillTimingInArrears PlanDetailBaseBillTiming = "in_arrears" )
Defines values for PlanDetailBaseBillTiming.
func (PlanDetailBaseBillTiming) Valid ¶
func (e PlanDetailBaseBillTiming) Valid() bool
Valid indicates whether the value is a known member of the PlanDetailBaseBillTiming enum.
type PlanDetailBillingInterval ¶
type PlanDetailBillingInterval string
PlanDetailBillingInterval defines model for PlanDetail.BillingInterval.
const ( PlanDetailBillingIntervalMonthly PlanDetailBillingInterval = "monthly" PlanDetailBillingIntervalYearly PlanDetailBillingInterval = "yearly" )
Defines values for PlanDetailBillingInterval.
func (PlanDetailBillingInterval) Valid ¶
func (e PlanDetailBillingInterval) Valid() bool
Valid indicates whether the value is a known member of the PlanDetailBillingInterval enum.
type PlanDetailStatus ¶
type PlanDetailStatus string
PlanDetailStatus defines model for PlanDetail.Status.
const ( PlanDetailStatusActive PlanDetailStatus = "active" PlanDetailStatusArchived PlanDetailStatus = "archived" )
Defines values for PlanDetailStatus.
func (PlanDetailStatus) Valid ¶
func (e PlanDetailStatus) Valid() bool
Valid indicates whether the value is a known member of the PlanDetailStatus enum.
type PlanPrice ¶
type PlanPrice struct {
CreatedAt time.Time `json:"created_at"`
// DimensionMatch The labels an event must carry for this price to take it, for
// example `{"model": "claude-opus-4.5", "token_type": "input"}`.
// `{}` takes every event of the meter. Of the prices whose labels
// an event carries, the one with the most labels takes it.
DimensionMatch map[string]string `json:"dimension_match"`
Id string `json:"id"`
MeterId string `json:"meter_id"`
// Mode As on PriceShape.
Mode PlanPriceMode `json:"mode"`
// PackageAmountCents Price of one package in cents, as a decimal string.
PackageAmountCents string `json:"package_amount_cents"`
PackageSize int64 `json:"package_size"`
PlanId string `json:"plan_id"`
TenantId string `json:"tenant_id,omitempty"`
// Tiers Empty (`[]`) unless `mode` is `graduated`.
Tiers []PriceTier `json:"tiers"`
// UnitAmountCents Price per unit in cents, as a decimal string.
UnitAmountCents string `json:"unit_amount_cents"`
// UpdatedAt When the content shown was saved.
UpdatedAt time.Time `json:"updated_at"`
}
PlanPrice One usage price of a plan: a meter, the events it takes (`dimension_match`) and its rate. The price takes the plan's currency. Its id stays the same when its rate changes; its meter and `dimension_match` are its identity and never change.
type PlanPriceMode ¶
type PlanPriceMode string
PlanPriceMode As on PriceShape.
const ( PlanPriceModeGraduated PlanPriceMode = "graduated" PlanPriceModePackage PlanPriceMode = "package" PlanPriceModePerUnit PlanPriceMode = "per_unit" )
Defines values for PlanPriceMode.
func (PlanPriceMode) Valid ¶
func (e PlanPriceMode) Valid() bool
Valid indicates whether the value is a known member of the PlanPriceMode enum.
type PlanStatus ¶
type PlanStatus string
PlanStatus defines model for Plan.Status.
const ( PlanStatusActive PlanStatus = "active" PlanStatusArchived PlanStatus = "archived" )
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 ¶
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 ¶
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 ¶
type PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery string
PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery defines parameters for PostV1AuthPasswordResetRequest.
const ( NotConfigured PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery = "not_configured" Ok PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery = "ok" )
Defines values for PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery.
func (PostV1AuthPasswordResetRequest200JSONResponseBodyEmailDelivery) Valid ¶
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 PostV1BillingRunParams ¶
type PostV1BillingRunParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1BillingRunParams defines parameters for PostV1BillingRun.
type PostV1CreditNotesIdSend200JSONResponseBodyStatus ¶
type PostV1CreditNotesIdSend200JSONResponseBodyStatus string
PostV1CreditNotesIdSend200JSONResponseBodyStatus defines parameters for PostV1CreditNotesIdSend.
const (
PostV1CreditNotesIdSend200JSONResponseBodyStatusSent PostV1CreditNotesIdSend200JSONResponseBodyStatus = "sent"
)
Defines values for PostV1CreditNotesIdSend200JSONResponseBodyStatus.
func (PostV1CreditNotesIdSend200JSONResponseBodyStatus) Valid ¶
func (e PostV1CreditNotesIdSend200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the PostV1CreditNotesIdSend200JSONResponseBodyStatus enum.
type PostV1CreditNotesIdSendJSONBody ¶
type PostV1CreditNotesIdSendJSONBody struct {
AdditionalEmails []string `json:"additional_emails,omitempty"`
Email openapi_types.Email `json:"email"`
}
PostV1CreditNotesIdSendJSONBody defines parameters for PostV1CreditNotesIdSend.
type PostV1CreditNotesIdSendJSONRequestBody ¶
type PostV1CreditNotesIdSendJSONRequestBody PostV1CreditNotesIdSendJSONBody
PostV1CreditNotesIdSendJSONRequestBody defines body for PostV1CreditNotesIdSend for application/json ContentType.
type PostV1CreditNotesIdSendParams ¶
type PostV1CreditNotesIdSendParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1CreditNotesIdSendParams defines parameters for PostV1CreditNotesIdSend.
type PostV1CreditNotesJSONBody ¶
type PostV1CreditNotesJSONBody struct {
AutoIssue bool `json:"auto_issue,omitempty"`
// CommitRelief Mutually exclusive with lines and credit_amount_cents. The
// relief's split goes in here, not at the top level: a top-level
// `refund_amount_cents`, `out_of_band_amount_cents` or
// `refund_type` is a 422. Example after a lost dispute:
// `{"invoice_id": "inv_…", "commit_relief": {"retire_all": true, "out_of_band_amount_cents": 5000}}`.
CommitRelief struct {
// InvoiceId Optional. Defaults to the top-level invoice_id.
InvoiceId string `json:"invoice_id,omitempty"`
OutOfBandAmountCents int `json:"out_of_band_amount_cents,omitempty"`
// Reason Optional. Defaults to the top-level reason.
Reason string `json:"reason,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"`
// InvoiceLineItemId Optional. The invoice line this credit line reverses.
InvoiceLineItemId string `json:"invoice_line_item_id,omitempty"`
Quantity int `json:"quantity,omitempty"`
UnitAmountCents int `json:"unit_amount_cents,omitempty"`
} `json:"lines,omitempty"`
// OutOfBandAmountCents Not with commit_relief; put the relief's split inside commit_relief.
OutOfBandAmountCents int `json:"out_of_band_amount_cents,omitempty"`
Reason string `json:"reason,omitempty"`
// RefundAmountCents Not with commit_relief; put the relief's split inside commit_relief.
RefundAmountCents int `json:"refund_amount_cents,omitempty"`
// RefundType Older single-channel form. On a paid invoice whose three
// `*_amount_cents` fields are all 0, `refund` or `credit`
// puts the whole note in that channel. Not with commit_relief.
RefundType PostV1CreditNotesJSONBodyRefundType `json:"refund_type,omitempty"`
}
PostV1CreditNotesJSONBody defines parameters for PostV1CreditNotes.
type PostV1CreditNotesJSONBodyRefundType ¶
type PostV1CreditNotesJSONBodyRefundType string
PostV1CreditNotesJSONBodyRefundType defines parameters for PostV1CreditNotes.
const ( Credit PostV1CreditNotesJSONBodyRefundType = "credit" Refund PostV1CreditNotesJSONBodyRefundType = "refund" )
Defines values for PostV1CreditNotesJSONBodyRefundType.
func (PostV1CreditNotesJSONBodyRefundType) Valid ¶
func (e PostV1CreditNotesJSONBodyRefundType) Valid() bool
Valid indicates whether the value is a known member of the PostV1CreditNotesJSONBodyRefundType enum.
type PostV1CreditNotesJSONRequestBody ¶
type PostV1CreditNotesJSONRequestBody PostV1CreditNotesJSONBody
PostV1CreditNotesJSONRequestBody defines body for PostV1CreditNotes for application/json ContentType.
type PostV1CreditNotesParams ¶
type PostV1CreditNotesParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1CreditNotesParams defines parameters for PostV1CreditNotes.
type PostV1CreditsGrantJSONBody ¶
type PostV1CreditsGrantJSONBody struct {
AmountCents int64 `json:"amount_cents"`
// Currency ISO 4217 code of the credit. Required. Case-insensitive;
// stored uppercase. Zero-decimal currencies (such as JPY)
// are not supported yet.
Currency string `json:"currency"`
CustomerId string `json:"customer_id"`
Description string `json:"description,omitempty"`
// ExpiresAt Optional expiry; must be in the future. Omitted = never
// expires. The credit can be drawn up to and including this
// instant; a period invoice draws it when its period ends
// at or before it. The dashboard sends the local midnight
// after the picked day.
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 PostV1CreditsGrantParams ¶
type PostV1CreditsGrantParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1CreditsGrantParams defines parameters for PostV1CreditsGrant.
type PostV1CustomersIdRotateCostDashboardTokenParams ¶
type PostV1CustomersIdRotateCostDashboardTokenParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1CustomersIdRotateCostDashboardTokenParams defines parameters for PostV1CustomersIdRotateCostDashboardToken.
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"`
// TestClockId Test mode only. Attaches the customer to a test clock.
TestClockId string `json:"test_clock_id,omitempty"`
}
PostV1CustomersJSONBody defines parameters for PostV1Customers.
type PostV1CustomersJSONRequestBody ¶
type PostV1CustomersJSONRequestBody PostV1CustomersJSONBody
PostV1CustomersJSONRequestBody defines body for PostV1Customers for application/json ContentType.
type PostV1CustomersParams ¶
type PostV1CustomersParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1CustomersParams defines parameters for PostV1Customers.
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 PostV1InvoicesCreatePreviewParams ¶
type PostV1InvoicesCreatePreviewParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1InvoicesCreatePreviewParams defines parameters for PostV1InvoicesCreatePreview.
type PostV1InvoicesIdFinalizeParams ¶
type PostV1InvoicesIdFinalizeParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1InvoicesIdFinalizeParams defines parameters for PostV1InvoicesIdFinalize.
type PostV1InvoicesIdRetryTaxParams ¶
type PostV1InvoicesIdRetryTaxParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1InvoicesIdRetryTaxParams defines parameters for PostV1InvoicesIdRetryTax.
type PostV1InvoicesIdSend200JSONResponseBodyStatus ¶
type PostV1InvoicesIdSend200JSONResponseBodyStatus string
PostV1InvoicesIdSend200JSONResponseBodyStatus defines parameters for PostV1InvoicesIdSend.
const (
Sent PostV1InvoicesIdSend200JSONResponseBodyStatus = "sent"
)
Defines values for PostV1InvoicesIdSend200JSONResponseBodyStatus.
func (PostV1InvoicesIdSend200JSONResponseBodyStatus) Valid ¶
func (e PostV1InvoicesIdSend200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the PostV1InvoicesIdSend200JSONResponseBodyStatus enum.
type PostV1InvoicesIdSendJSONBody ¶
type PostV1InvoicesIdSendJSONBody struct {
AdditionalEmails []string `json:"additional_emails,omitempty"`
Email openapi_types.Email `json:"email"`
}
PostV1InvoicesIdSendJSONBody defines parameters for PostV1InvoicesIdSend.
type PostV1InvoicesIdSendJSONRequestBody ¶
type PostV1InvoicesIdSendJSONRequestBody PostV1InvoicesIdSendJSONBody
PostV1InvoicesIdSendJSONRequestBody defines body for PostV1InvoicesIdSend for application/json ContentType.
type PostV1InvoicesIdSendParams ¶
type PostV1InvoicesIdSendParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1InvoicesIdSendParams defines parameters for PostV1InvoicesIdSend.
type PostV1MetersJSONBody ¶
type PostV1MetersJSONBody struct {
// Aggregation How the meter rolls its events into one quantity per billing period. Fixed once the meter has a usage event.
Aggregation PostV1MetersJSONBodyAggregation `json:"aggregation,omitempty"`
// EventName The `event_name` usage events will send for this meter. Letters, digits, `-` and `_`; at most 100 characters.
EventName string `json:"event_name"`
Name string `json:"name"`
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 PostV1MetersParams ¶
type PostV1MetersParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1MetersParams defines parameters for PostV1Meters.
type PostV1PlansJSONBody ¶
type PostV1PlansJSONBody struct {
BaseAmountCents int64 `json:"base_amount_cents,omitempty"`
// BaseBillTiming Required when `base_amount_cents` is above 0. With a base
// of 0 it may be left out, and the plan is in_arrears;
// `in_advance` with a base of 0 is refused. See
// Plan.base_bill_timing (ADR-031).
BaseBillTiming PostV1PlansJSONBodyBaseBillTiming `json:"base_bill_timing,omitempty"`
BillingInterval PostV1PlansJSONBodyBillingInterval `json:"billing_interval"`
Code string `json:"code"`
Currency string `json:"currency"`
Description string `json:"description,omitempty"`
Name string `json:"name"`
// Prices The plan's usage prices, created with it in one request.
// Each takes the plan's currency.
Prices []PriceInput `json:"prices,omitempty"`
// Status Optional. A plan is created active; archive it with PATCH.
Status PostV1PlansJSONBodyStatus `json:"status,omitempty"`
// TaxCode Stripe product tax code for the base fee, such as
// `txcd_10103001`. Empty or omitted means the tenant's
// `default_product_tax_code`.
TaxCode string `json:"tax_code,omitempty"`
}
PostV1PlansJSONBody defines parameters for PostV1Plans.
type PostV1PlansJSONBodyBaseBillTiming ¶
type PostV1PlansJSONBodyBaseBillTiming string
PostV1PlansJSONBodyBaseBillTiming defines parameters for PostV1Plans.
const ( PostV1PlansJSONBodyBaseBillTimingInAdvance PostV1PlansJSONBodyBaseBillTiming = "in_advance" PostV1PlansJSONBodyBaseBillTimingInArrears 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 ( PostV1PlansJSONBodyBillingIntervalMonthly PostV1PlansJSONBodyBillingInterval = "monthly" PostV1PlansJSONBodyBillingIntervalYearly 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 PostV1PlansJSONBodyStatus ¶
type PostV1PlansJSONBodyStatus string
PostV1PlansJSONBodyStatus defines parameters for PostV1Plans.
const (
PostV1PlansJSONBodyStatusActive PostV1PlansJSONBodyStatus = "active"
)
Defines values for PostV1PlansJSONBodyStatus.
func (PostV1PlansJSONBodyStatus) Valid ¶
func (e PostV1PlansJSONBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the PostV1PlansJSONBodyStatus enum.
type PostV1PlansJSONRequestBody ¶
type PostV1PlansJSONRequestBody PostV1PlansJSONBody
PostV1PlansJSONRequestBody defines body for PostV1Plans for application/json ContentType.
type PostV1PlansParams ¶
type PostV1PlansParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1PlansParams defines parameters for PostV1Plans.
type PostV1SubscriptionsIdActivateParams ¶
type PostV1SubscriptionsIdActivateParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1SubscriptionsIdActivateParams defines parameters for PostV1SubscriptionsIdActivate.
type PostV1SubscriptionsIdRetryBillingParams ¶
type PostV1SubscriptionsIdRetryBillingParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1SubscriptionsIdRetryBillingParams defines parameters for PostV1SubscriptionsIdRetryBilling.
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"`
// Status Leave it out and the subscription starts now. Without
// `trial_days` it is `active`, its first period starts
// today in the account's billing time zone (the clock's
// day for a customer on a test clock), and a non-zero base
// fee billed in advance is invoiced now. With `trial_days`
// above 0 it is `trialing` from now. Send `draft` to create it
// without starting it: it bills nothing until you activate
// it with `POST /v1/subscriptions/{id}/activate`. A draft
// cannot have a trial (`trial_days` above 0). An empty or
// null `status` is refused.
Status PostV1SubscriptionsJSONBodyStatus `json:"status,omitempty"`
// TrialDays Days of free trial; 0 means no trial. Above 0, the
// subscription is `trialing` from now and its first paid
// period starts on the day the trial ends.
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 PostV1SubscriptionsJSONBodyStatus ¶
type PostV1SubscriptionsJSONBodyStatus string
PostV1SubscriptionsJSONBodyStatus defines parameters for PostV1Subscriptions.
const (
Draft PostV1SubscriptionsJSONBodyStatus = "draft"
)
Defines values for PostV1SubscriptionsJSONBodyStatus.
func (PostV1SubscriptionsJSONBodyStatus) Valid ¶
func (e PostV1SubscriptionsJSONBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the PostV1SubscriptionsJSONBodyStatus enum.
type PostV1SubscriptionsJSONRequestBody ¶
type PostV1SubscriptionsJSONRequestBody PostV1SubscriptionsJSONBody
PostV1SubscriptionsJSONRequestBody defines body for PostV1Subscriptions for application/json ContentType.
type PostV1SubscriptionsParams ¶
type PostV1SubscriptionsParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1SubscriptionsParams defines parameters for PostV1Subscriptions.
type PostV1TestClocksIdAdvanceJSONBody ¶
PostV1TestClocksIdAdvanceJSONBody defines parameters for PostV1TestClocksIdAdvance.
type PostV1TestClocksIdAdvanceJSONRequestBody ¶
type PostV1TestClocksIdAdvanceJSONRequestBody PostV1TestClocksIdAdvanceJSONBody
PostV1TestClocksIdAdvanceJSONRequestBody defines body for PostV1TestClocksIdAdvance for application/json ContentType.
type PostV1TestClocksIdAdvanceParams ¶
type PostV1TestClocksIdAdvanceParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1TestClocksIdAdvanceParams defines parameters for PostV1TestClocksIdAdvance.
type PostV1TestClocksIdRetryAdvanceParams ¶
type PostV1TestClocksIdRetryAdvanceParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1TestClocksIdRetryAdvanceParams defines parameters for PostV1TestClocksIdRetryAdvance.
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 PostV1TestClocksParams ¶
type PostV1TestClocksParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1TestClocksParams defines parameters for PostV1TestClocks.
type PostV1UsageEventsBatchJSONBody ¶
type PostV1UsageEventsBatchJSONBody = []struct {
Dimensions map[string]interface{} `json:"dimensions,omitempty"`
// EventName The meter's `event_name` (e.g. "tokens").
EventName string `json:"event_name"`
// ExternalCustomerId The customer's external_id (your identifier), not the internal hc_cus_ id.
ExternalCustomerId string `json:"external_customer_id"`
// IdempotencyKey Your unique ID for this event. Pick it once, before the
// first send, and send the same key on every retry of the
// event. Keys are unique per tenant and mode (live or
// test), forever. An event whose key was already used is
// not stored again: the first event wins and the new body
// is discarded. So never reuse a key for a different
// event, such as a batch index or a timestamp that can
// repeat, or that usage is lost. Empty or whitespace-only
// keys are refused with 422, and so are keys longer than
// 255 characters. This is the only dedup key: the usage
// routes ignore the `Idempotency-Key` header.
IdempotencyKey string `json:"idempotency_key"`
// Quantity A JSON number (`5`) or a string holding one (`"5.5"`,
// for exact decimals). At most 12 decimal places;
// trailing zeros do not count. Its size must be under
// 10^26, and it is at most 100 characters. A negative
// value is a correction. A missing quantity, or any
// other value, fails validation.
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 ¶
func (t PostV1UsageEventsBatchJSONBody_Quantity) AsPostV1UsageEventsBatchJSONBodyQuantity0() (PostV1UsageEventsBatchJSONBodyQuantity0, error)
AsPostV1UsageEventsBatchJSONBodyQuantity0 returns the union data inside the PostV1UsageEventsBatchJSONBody_Quantity as a PostV1UsageEventsBatchJSONBodyQuantity0
func (PostV1UsageEventsBatchJSONBody_Quantity) AsPostV1UsageEventsBatchJSONBodyQuantity1 ¶
func (t PostV1UsageEventsBatchJSONBody_Quantity) AsPostV1UsageEventsBatchJSONBodyQuantity1() (PostV1UsageEventsBatchJSONBodyQuantity1, error)
AsPostV1UsageEventsBatchJSONBodyQuantity1 returns the union data inside the PostV1UsageEventsBatchJSONBody_Quantity as a PostV1UsageEventsBatchJSONBodyQuantity1
func (*PostV1UsageEventsBatchJSONBody_Quantity) FromPostV1UsageEventsBatchJSONBodyQuantity0 ¶
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 ¶
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 ¶
func (t PostV1UsageEventsBatchJSONBody_Quantity) MarshalJSON() ([]byte, error)
func (*PostV1UsageEventsBatchJSONBody_Quantity) MergePostV1UsageEventsBatchJSONBodyQuantity0 ¶
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 ¶
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 ¶
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 labels of the event (e.g. {"model", "token_type"}). A price takes an event whose labels include the price's `dimension_match`.
Dimensions map[string]interface{} `json:"dimensions,omitempty"`
// EventName The meter's `event_name` (e.g. "tokens").
EventName string `json:"event_name"`
// ExternalCustomerId The customer's external_id (your identifier), not the internal hc_cus_ id.
ExternalCustomerId string `json:"external_customer_id"`
// IdempotencyKey Your unique ID for this event. Pick it once, before the
// first send, and send the same key on every retry of the
// event. Keys are unique per tenant and mode (live or
// test), forever. An event whose key was already used is
// not stored again: the first event wins and the new body
// is discarded. So never reuse a key for a different
// event, such as a batch index or a timestamp that can
// repeat, or that usage is lost. Empty or whitespace-only
// keys are refused with 422, and so are keys longer than
// 255 characters. This is the only dedup key: the usage
// routes ignore the `Idempotency-Key` header.
IdempotencyKey string `json:"idempotency_key"`
// Quantity A JSON number (`5`) or a string holding one (`"5.5"`,
// for exact decimals). At most 12 decimal places; trailing
// zeros do not count. Its size must be under 10^26, and it
// is at most 100 characters. A negative value is a
// correction. A missing quantity, or any other value, is
// refused with 422 and `param: quantity`.
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 ¶
func (t PostV1UsageEventsJSONBody_Quantity) AsPostV1UsageEventsJSONBodyQuantity0() (PostV1UsageEventsJSONBodyQuantity0, error)
AsPostV1UsageEventsJSONBodyQuantity0 returns the union data inside the PostV1UsageEventsJSONBody_Quantity as a PostV1UsageEventsJSONBodyQuantity0
func (PostV1UsageEventsJSONBody_Quantity) AsPostV1UsageEventsJSONBodyQuantity1 ¶
func (t PostV1UsageEventsJSONBody_Quantity) AsPostV1UsageEventsJSONBodyQuantity1() (PostV1UsageEventsJSONBodyQuantity1, error)
AsPostV1UsageEventsJSONBodyQuantity1 returns the union data inside the PostV1UsageEventsJSONBody_Quantity as a PostV1UsageEventsJSONBodyQuantity1
func (*PostV1UsageEventsJSONBody_Quantity) FromPostV1UsageEventsJSONBodyQuantity0 ¶
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 ¶
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 ¶
func (t PostV1UsageEventsJSONBody_Quantity) MarshalJSON() ([]byte, error)
func (*PostV1UsageEventsJSONBody_Quantity) MergePostV1UsageEventsJSONBodyQuantity0 ¶
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 ¶
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 ¶
func (t *PostV1UsageEventsJSONBody_Quantity) UnmarshalJSON(b []byte) error
type PostV1UsageEventsJSONRequestBody ¶
type PostV1UsageEventsJSONRequestBody PostV1UsageEventsJSONBody
PostV1UsageEventsJSONRequestBody defines body for PostV1UsageEvents for application/json ContentType.
type PostV1WebhookEndpointsEndpointsIdRotateSecretParams ¶
type PostV1WebhookEndpointsEndpointsIdRotateSecretParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1WebhookEndpointsEndpointsIdRotateSecretParams defines parameters for PostV1WebhookEndpointsEndpointsIdRotateSecret.
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 PostV1WebhookEndpointsEndpointsParams ¶
type PostV1WebhookEndpointsEndpointsParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PostV1WebhookEndpointsEndpointsParams defines parameters for PostV1WebhookEndpointsEndpoints.
type PreviewRecipeJSONBody ¶
type PreviewRecipeJSONBody struct {
Overrides map[string]interface{} `json:"overrides,omitempty"`
}
PreviewRecipeJSONBody defines parameters for PreviewRecipe.
type PreviewRecipeJSONRequestBody ¶
type PreviewRecipeJSONRequestBody PreviewRecipeJSONBody
PreviewRecipeJSONRequestBody defines body for PreviewRecipe for application/json ContentType.
type PreviewRecipeParams ¶
type PreviewRecipeParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PreviewRecipeParams defines parameters for PreviewRecipe.
type PriceInput ¶
type PriceInput struct {
// DimensionMatch The labels an event must carry for the price to take it.
// Values are strings of 1 to 100 characters, keys too; at
// most 16 labels. Omitted or `{}` takes every event of the
// meter. Two prices of one plan and meter that could both take
// one event with the same number of labels are refused (409
// `price_conflict`).
DimensionMatch map[string]string `json:"dimension_match,omitempty"`
MeterId string `json:"meter_id"`
// Mode `per_unit` bills quantity × `unit_amount_cents`. `graduated` bills each tier's part of the quantity at that tier's rate. `package` bills ceil(quantity ÷ `package_size`) × `package_amount_cents`: a part package bills as a whole one.
Mode PriceInputMode `json:"mode"`
// PackageAmountCents Price of one package in cents, as a decimal string (e.g. "0.2" with `package_size` 1000 = $0.002 per 1,000 units), with the limits of `unit_amount_cents`. Used when `mode` is `package`.
PackageAmountCents string `json:"package_amount_cents,omitempty"`
// PackageSize Used when `mode` is `package`. Must be above 0.
PackageSize int64 `json:"package_size,omitempty"`
// Tiers Used when `mode` is `graduated`. Each `up_to` is a whole number above the one before. The last tier has `up_to: null` (no upper bound), and only the last. Otherwise 422 with `param` `tiers`. A tier's rate takes the limits of `unit_amount_cents`; a refusal names `tiers[i].unit_amount_cents` (i counts from 0).
Tiers []PriceTier `json:"tiers,omitempty"`
// UnitAmountCents Price per unit in cents, as a decimal string (e.g. "0.0003" = $3.00 per 1,000,000 units). Used when `mode` is `per_unit`. 0 or more, under 10^18, at most 12 decimal places (trailing zeros do not count), and at most 100 characters. A JSON number is also read. A value outside them is refused with 422 and `param` naming the field. Invoice line amounts round to whole cents.
UnitAmountCents string `json:"unit_amount_cents,omitempty"`
}
PriceInput defines model for PriceInput.
type PriceInputMode ¶
type PriceInputMode string
PriceInputMode `per_unit` bills quantity × `unit_amount_cents`. `graduated` bills each tier's part of the quantity at that tier's rate. `package` bills ceil(quantity ÷ `package_size`) × `package_amount_cents`: a part package bills as a whole one.
const ( PriceInputModeGraduated PriceInputMode = "graduated" PriceInputModePackage PriceInputMode = "package" PriceInputModePerUnit PriceInputMode = "per_unit" )
Defines values for PriceInputMode.
func (PriceInputMode) Valid ¶
func (e PriceInputMode) Valid() bool
Valid indicates whether the value is a known member of the PriceInputMode enum.
type PriceShape ¶
type PriceShape struct {
// Mode `per_unit` bills quantity × `unit_amount_cents`. `graduated` bills each tier's part of the quantity at that tier's rate. `package` bills ceil(quantity ÷ `package_size`) × `package_amount_cents`: a part package bills as a whole one.
Mode PriceShapeMode `json:"mode"`
// PackageAmountCents Price of one package in cents, as a decimal string (e.g. "0.2" with `package_size` 1000 = $0.002 per 1,000 units), with the limits of `unit_amount_cents`. Used when `mode` is `package`.
PackageAmountCents string `json:"package_amount_cents,omitempty"`
// PackageSize Used when `mode` is `package`. Must be above 0.
PackageSize int64 `json:"package_size,omitempty"`
// Tiers Used when `mode` is `graduated`. Each `up_to` is a whole number above the one before. The last tier has `up_to: null` (no upper bound), and only the last. Otherwise 422 with `param` `tiers`. A tier's rate takes the limits of `unit_amount_cents`; a refusal names `tiers[i].unit_amount_cents` (i counts from 0).
Tiers []PriceTier `json:"tiers,omitempty"`
// UnitAmountCents Price per unit in cents, as a decimal string (e.g. "0.0003" = $3.00 per 1,000,000 units). Used when `mode` is `per_unit`. 0 or more, under 10^18, at most 12 decimal places (trailing zeros do not count), and at most 100 characters. A JSON number is also read. A value outside them is refused with 422 and `param` naming the field. Invoice line amounts round to whole cents.
UnitAmountCents string `json:"unit_amount_cents,omitempty"`
}
PriceShape How a price bills a quantity. Send only the mode's fields: a field the mode does not use must be 0 or left out (`tiers`: `[]` or left out), or the request is refused with 422 and `param` naming it.
type PriceShapeMode ¶
type PriceShapeMode string
PriceShapeMode `per_unit` bills quantity × `unit_amount_cents`. `graduated` bills each tier's part of the quantity at that tier's rate. `package` bills ceil(quantity ÷ `package_size`) × `package_amount_cents`: a part package bills as a whole one.
const ( PriceShapeModeGraduated PriceShapeMode = "graduated" PriceShapeModePackage PriceShapeMode = "package" PriceShapeModePerUnit PriceShapeMode = "per_unit" )
Defines values for PriceShapeMode.
func (PriceShapeMode) Valid ¶
func (e PriceShapeMode) Valid() bool
Valid indicates whether the value is a known member of the PriceShapeMode enum.
type PriceTier ¶
type PriceTier struct {
// UnitAmountCents Price per unit in cents in this tier, as a decimal string.
UnitAmountCents string `json:"unit_amount_cents"`
// UpTo The tier's upper bound in whole units: the tier prices the quantity above the previous tier's bound, up to this one. `null` on the last tier, which has no upper bound. Only the last tier is `null`, and it must be.
UpTo int64 `json:"up_to"`
}
PriceTier defines model for PriceTier.
type PriceWrite ¶
type PriceWrite struct {
CreatedAt time.Time `json:"created_at"`
// DimensionMatch The labels an event must carry for this price to take it, for
// example `{"model": "claude-opus-4.5", "token_type": "input"}`.
// `{}` takes every event of the meter. Of the prices whose labels
// an event carries, the one with the most labels takes it.
DimensionMatch map[string]string `json:"dimension_match"`
Effective PriceWriteEffective `json:"effective"`
// EndedOverrides On a removal, the customer overrides of the price it ended.
// Each ends when the removal takes effect for its customer.
EndedOverrides []struct {
CustomerId string `json:"customer_id"`
Id string `json:"id"`
} `json:"ended_overrides,omitempty"`
Id string `json:"id"`
MeterId string `json:"meter_id"`
// Mode As on PriceShape.
Mode PriceWriteMode `json:"mode"`
// PackageAmountCents Price of one package in cents, as a decimal string.
PackageAmountCents string `json:"package_amount_cents"`
PackageSize int64 `json:"package_size"`
PlanId string `json:"plan_id"`
// Removed True on the answer to a removal.
Removed bool `json:"removed,omitempty"`
TenantId string `json:"tenant_id,omitempty"`
// Tiers Empty (`[]`) unless `mode` is `graduated`.
Tiers []PriceTier `json:"tiers"`
// UnitAmountCents Price per unit in cents, as a decimal string.
UnitAmountCents string `json:"unit_amount_cents"`
// UpdatedAt When the content shown was saved.
UpdatedAt time.Time `json:"updated_at"`
}
PriceWrite defines model for PriceWrite.
type PriceWriteEffective ¶
type PriceWriteEffective string
PriceWriteEffective defines model for PriceWrite.Effective.
const ( NextPeriod PriceWriteEffective = "next_period" Now PriceWriteEffective = "now" )
Defines values for PriceWriteEffective.
func (PriceWriteEffective) Valid ¶
func (e PriceWriteEffective) Valid() bool
Valid indicates whether the value is a known member of the PriceWriteEffective enum.
type PriceWriteMode ¶
type PriceWriteMode string
PriceWriteMode As on PriceShape.
const ( PriceWriteModeGraduated PriceWriteMode = "graduated" PriceWriteModePackage PriceWriteMode = "package" PriceWriteModePerUnit PriceWriteMode = "per_unit" )
Defines values for PriceWriteMode.
func (PriceWriteMode) Valid ¶
func (e PriceWriteMode) Valid() bool
Valid indicates whether the value is a known member of the PriceWriteMode enum.
type ProviderCostRate ¶
type ProviderCostRate struct {
CreatedAt time.Time `json:"created_at"`
// Currency Always USD. Cost and margin count every rate in US cents.
Currency ProviderCostRateCurrency `json:"currency"`
Id string `json:"id"`
Model string `json:"model"`
Provider string `json:"provider"`
TenantId string `json:"tenant_id,omitempty"`
TokenType string `json:"token_type"`
// UnitCostCents US cents per token, as a decimal string (e.g. "0.0003" = $3.00 per 1,000,000 tokens).
UnitCostCents string `json:"unit_cost_cents"`
UpdatedAt time.Time `json:"updated_at"`
}
ProviderCostRate defines model for ProviderCostRate.
type ProviderCostRateCurrency ¶
type ProviderCostRateCurrency string
ProviderCostRateCurrency Always USD. Cost and margin count every rate in US cents.
const (
ProviderCostRateCurrencyUSD ProviderCostRateCurrency = "USD"
)
Defines values for ProviderCostRateCurrency.
func (ProviderCostRateCurrency) Valid ¶
func (e ProviderCostRateCurrency) Valid() bool
Valid indicates whether the value is a known member of the ProviderCostRateCurrency enum.
type PublicPaymentUpdate ¶
type PublicPaymentUpdate struct {
// AmountDueCents Not cleared when the invoice is voided. Check `invoice_status` before asking for payment.
AmountDueCents int64 `json:"amount_due_cents"`
Branding struct {
BrandColor string `json:"brand_color,omitempty"`
CompanyEmail string `json:"company_email,omitempty"`
CompanyName string `json:"company_name,omitempty"`
LogoUrl string `json:"logo_url,omitempty"`
SupportUrl string `json:"support_url,omitempty"`
} `json:"branding"`
Currency string `json:"currency"`
CustomerName string `json:"customer_name"`
InvoiceNumber string `json:"invoice_number"`
// 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).
InvoiceStatus InvoiceStatus `json:"invoice_status"`
}
PublicPaymentUpdate What the payment-update page shows before the customer adds a card.
type PutV1ProviderCostsJSONBody ¶
type PutV1ProviderCostsJSONBody struct {
// Currency Rates are in USD only, the currency LiteLLM reports cost
// in. Any other value is 422.
Currency PutV1ProviderCostsJSONBodyCurrency `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"`
// UnitCostCents US cents per token, as a decimal string (e.g. "0.0003" = $3.00 per 1,000,000 tokens). 0 or more, under 10^10, at most 12 decimal places (trailing zeros do not count), and at most 100 characters. A JSON number is also read.
UnitCostCents string `json:"unit_cost_cents"`
}
PutV1ProviderCostsJSONBody defines parameters for PutV1ProviderCosts.
type PutV1ProviderCostsJSONBodyCurrency ¶
type PutV1ProviderCostsJSONBodyCurrency string
PutV1ProviderCostsJSONBodyCurrency defines parameters for PutV1ProviderCosts.
const (
PutV1ProviderCostsJSONBodyCurrencyUSD PutV1ProviderCostsJSONBodyCurrency = "USD"
)
Defines values for PutV1ProviderCostsJSONBodyCurrency.
func (PutV1ProviderCostsJSONBodyCurrency) Valid ¶
func (e PutV1ProviderCostsJSONBodyCurrency) Valid() bool
Valid indicates whether the value is a known member of the PutV1ProviderCostsJSONBodyCurrency enum.
type PutV1ProviderCostsJSONRequestBody ¶
type PutV1ProviderCostsJSONRequestBody PutV1ProviderCostsJSONBody
PutV1ProviderCostsJSONRequestBody defines body for PutV1ProviderCosts for application/json ContentType.
type PutV1ProviderCostsParams ¶
type PutV1ProviderCostsParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PutV1ProviderCostsParams defines parameters for PutV1ProviderCosts.
type ReadinessReport ¶
type ReadinessReport struct {
// Checks One entry per check. `api` is `ok` or `draining`. `database` is
// `ok` or `error`. `scheduler` starts with `ok` or `degraded`,
// followed by detail such as `ok: last run 12s ago`. While
// draining, only `api` is sent.
Checks map[string]string `json:"checks"`
Status ReadinessReportStatus `json:"status"`
}
ReadinessReport defines model for ReadinessReport.
type ReadinessReportStatus ¶
type ReadinessReportStatus string
ReadinessReportStatus defines model for ReadinessReport.Status.
const ( ReadinessReportStatusDegraded ReadinessReportStatus = "degraded" ReadinessReportStatusDraining ReadinessReportStatus = "draining" ReadinessReportStatusOk ReadinessReportStatus = "ok" )
Defines values for ReadinessReportStatus.
func (ReadinessReportStatus) Valid ¶
func (e ReadinessReportStatus) Valid() bool
Valid indicates whether the value is a known member of the ReadinessReportStatus enum.
type ReceivePostmarkWebhook200JSONResponseBodyStatus ¶
type ReceivePostmarkWebhook200JSONResponseBodyStatus string
ReceivePostmarkWebhook200JSONResponseBodyStatus defines parameters for ReceivePostmarkWebhook.
const ( ReceivePostmarkWebhook200JSONResponseBodyStatusIgnored ReceivePostmarkWebhook200JSONResponseBodyStatus = "ignored" ReceivePostmarkWebhook200JSONResponseBodyStatusProcessed ReceivePostmarkWebhook200JSONResponseBodyStatus = "processed" ReceivePostmarkWebhook200JSONResponseBodyStatusSkipped ReceivePostmarkWebhook200JSONResponseBodyStatus = "skipped" )
Defines values for ReceivePostmarkWebhook200JSONResponseBodyStatus.
func (ReceivePostmarkWebhook200JSONResponseBodyStatus) Valid ¶
func (e ReceivePostmarkWebhook200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the ReceivePostmarkWebhook200JSONResponseBodyStatus enum.
type ReceivePostmarkWebhookJSONBody ¶
type ReceivePostmarkWebhookJSONBody map[string]interface{}
ReceivePostmarkWebhookJSONBody defines parameters for ReceivePostmarkWebhook.
type ReceivePostmarkWebhookJSONRequestBody ¶
type ReceivePostmarkWebhookJSONRequestBody ReceivePostmarkWebhookJSONBody
ReceivePostmarkWebhookJSONRequestBody defines body for ReceivePostmarkWebhook for application/json ContentType.
type ReceiveStripeWebhook200JSONResponseBodyStatus ¶
type ReceiveStripeWebhook200JSONResponseBodyStatus string
ReceiveStripeWebhook200JSONResponseBodyStatus defines parameters for ReceiveStripeWebhook.
const ( ReceiveStripeWebhook200JSONResponseBodyStatusProcessed ReceiveStripeWebhook200JSONResponseBodyStatus = "processed" ReceiveStripeWebhook200JSONResponseBodyStatusSkipped ReceiveStripeWebhook200JSONResponseBodyStatus = "skipped" )
Defines values for ReceiveStripeWebhook200JSONResponseBodyStatus.
func (ReceiveStripeWebhook200JSONResponseBodyStatus) Valid ¶
func (e ReceiveStripeWebhook200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the ReceiveStripeWebhook200JSONResponseBodyStatus enum.
type ReceiveStripeWebhookJSONBody ¶
type ReceiveStripeWebhookJSONBody map[string]interface{}
ReceiveStripeWebhookJSONBody defines parameters for ReceiveStripeWebhook.
type ReceiveStripeWebhookJSONRequestBody ¶
type ReceiveStripeWebhookJSONRequestBody ReceiveStripeWebhookJSONBody
ReceiveStripeWebhookJSONRequestBody defines body for ReceiveStripeWebhook for application/json ContentType.
type ReceiveStripeWebhookParams ¶
type ReceiveStripeWebhookParams struct {
StripeSignature string `json:"Stripe-Signature"`
}
ReceiveStripeWebhookParams defines parameters for ReceiveStripeWebhook.
type Recipe ¶
type Recipe struct {
Description string `json:"description,omitempty"`
Key string `json:"key"`
Meters []RecipeMeter `json:"meters"`
Name string `json:"name"`
Overridable []RecipeOverride `json:"overridable"`
Plans []RecipePlan `json:"plans"`
Summary string `json:"summary"`
Version string `json:"version"`
}
Recipe A recipe template as served by list/detail: the full parsed YAML, its meters and its plans with their prices, not just display metadata. A recipe creates nothing else.
type RecipeCreatedObjects ¶
type RecipeCreatedObjects struct {
MeterIds []string `json:"meter_ids,omitempty"`
PlanIds []string `json:"plan_ids,omitempty"`
PriceIds []string `json:"price_ids,omitempty"`
}
RecipeCreatedObjects Per-role map of entity IDs a recipe apply produced (including ADOPTED meters — apply reconnects to an existing meter rather than duplicating it, ADR-085). Every field is omitted when empty; clients must guard reads.
type RecipeCreates ¶
type RecipeCreates struct {
Meters int `json:"meters"`
Plans int `json:"plans"`
// Prices The prices the install puts on its plans.
Prices int `json:"prices"`
}
RecipeCreates Per-role count of objects a recipe will produce when instantiated. Recipes create no product entity — there is no `products` count.
type RecipeDetail ¶
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"`
Key string `json:"key"`
Meters []RecipeMeter `json:"meters"`
Name string `json:"name"`
Overridable []RecipeOverride `json:"overridable"`
Plans []RecipePlan `json:"plans"`
Summary string `json:"summary"`
Version string `json:"version"`
}
RecipeDetail defines model for RecipeDetail.
type RecipeInstance ¶
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 meters — apply reconnects to an existing meter 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 ¶
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"`
// 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"`
Summary string `json:"summary"`
Version string `json:"version"`
}
RecipeListItem defines model for RecipeListItem.
type RecipeMeter ¶
type RecipeMeter struct {
Aggregation string `json:"aggregation"`
EventName string `json:"event_name"`
Name string `json:"name"`
Unit string `json:"unit"`
}
RecipeMeter defines model for RecipeMeter.
type RecipeOverride ¶
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 ¶
type RecipeOverrideType string
RecipeOverrideType defines model for RecipeOverride.Type.
const ( Int RecipeOverrideType = "int" String RecipeOverrideType = "string" )
Defines values for RecipeOverrideType.
func (RecipeOverrideType) Valid ¶
func (e RecipeOverrideType) Valid() bool
Valid indicates whether the value is a known member of the RecipeOverrideType enum.
type RecipePlan ¶
type RecipePlan struct {
BaseAmountCents int64 `json:"base_amount_cents"`
// BaseBillTiming Optional when the base fee is 0; the plan is then in_arrears (ADR-031).
BaseBillTiming RecipePlanBaseBillTiming `json:"base_bill_timing,omitempty"`
BillingInterval RecipePlanBillingInterval `json:"billing_interval"`
Code string `json:"code"`
Currency string `json:"currency"`
Name string `json:"name"`
// Prices The plan's usage prices. Each takes the plan's currency.
Prices []RecipePrice `json:"prices"`
}
RecipePlan defines model for RecipePlan.
type RecipePlanBaseBillTiming ¶
type RecipePlanBaseBillTiming string
RecipePlanBaseBillTiming Optional when the base fee is 0; the plan is then in_arrears (ADR-031).
const ( RecipePlanBaseBillTimingInAdvance RecipePlanBaseBillTiming = "in_advance" RecipePlanBaseBillTimingInArrears RecipePlanBaseBillTiming = "in_arrears" )
Defines values for RecipePlanBaseBillTiming.
func (RecipePlanBaseBillTiming) Valid ¶
func (e RecipePlanBaseBillTiming) Valid() bool
Valid indicates whether the value is a known member of the RecipePlanBaseBillTiming enum.
type RecipePlanBillingInterval ¶
type RecipePlanBillingInterval string
RecipePlanBillingInterval defines model for RecipePlan.BillingInterval.
const ( RecipePlanBillingIntervalMonthly RecipePlanBillingInterval = "monthly" RecipePlanBillingIntervalYearly RecipePlanBillingInterval = "yearly" )
Defines values for RecipePlanBillingInterval.
func (RecipePlanBillingInterval) Valid ¶
func (e RecipePlanBillingInterval) Valid() bool
Valid indicates whether the value is a known member of the RecipePlanBillingInterval enum.
type RecipePreviewObjects ¶
type RecipePreviewObjects struct {
Meters []RecipeMeter `json:"meters"`
Plans []RecipePlan `json:"plans"`
}
RecipePreviewObjects What an install creates: the meters, and each plan with its prices. Both arrays are always present. An install reuses a meter that already exists with the same `event_name` and aggregation.
type RecipePreviewResult ¶
type RecipePreviewResult struct {
Key string `json:"key"`
// Objects What an install creates: the meters, and each plan with its prices. Both arrays are always present. An install reuses a meter that already exists with the same `event_name` and aggregation.
Objects RecipePreviewObjects `json:"objects"`
Version string `json:"version"`
Warnings []string `json:"warnings"`
}
RecipePreviewResult defines model for RecipePreviewResult.
type RecipePrice ¶
type RecipePrice struct {
DimensionMatch map[string]string `json:"dimension_match"`
// Meter The `event_name` of the recipe meter the price is on.
Meter string `json:"meter"`
// Mode `per_unit` bills quantity × `unit_amount_cents`. `graduated` bills each tier's part of the quantity at that tier's rate. `package` bills ceil(quantity ÷ `package_size`) × `package_amount_cents`: a part package bills as a whole one.
Mode RecipePriceMode `json:"mode"`
// PackageAmountCents Price of one package in cents, as a decimal string (e.g. "0.2" with `package_size` 1000 = $0.002 per 1,000 units), with the limits of `unit_amount_cents`. Used when `mode` is `package`.
PackageAmountCents string `json:"package_amount_cents,omitempty"`
// PackageSize Used when `mode` is `package`. Must be above 0.
PackageSize int64 `json:"package_size,omitempty"`
// Tiers Used when `mode` is `graduated`. Each `up_to` is a whole number above the one before. The last tier has `up_to: null` (no upper bound), and only the last. Otherwise 422 with `param` `tiers`. A tier's rate takes the limits of `unit_amount_cents`; a refusal names `tiers[i].unit_amount_cents` (i counts from 0).
Tiers []PriceTier `json:"tiers,omitempty"`
// UnitAmountCents Price per unit in cents, as a decimal string (e.g. "0.0003" = $3.00 per 1,000,000 units). Used when `mode` is `per_unit`. 0 or more, under 10^18, at most 12 decimal places (trailing zeros do not count), and at most 100 characters. A JSON number is also read. A value outside them is refused with 422 and `param` naming the field. Invoice line amounts round to whole cents.
UnitAmountCents string `json:"unit_amount_cents,omitempty"`
}
RecipePrice defines model for RecipePrice.
type RecipePriceMode ¶
type RecipePriceMode string
RecipePriceMode `per_unit` bills quantity × `unit_amount_cents`. `graduated` bills each tier's part of the quantity at that tier's rate. `package` bills ceil(quantity ÷ `package_size`) × `package_amount_cents`: a part package bills as a whole one.
const ( RecipePriceModeGraduated RecipePriceMode = "graduated" RecipePriceModePackage RecipePriceMode = "package" RecipePriceModePerUnit RecipePriceMode = "per_unit" )
Defines values for RecipePriceMode.
func (RecipePriceMode) Valid ¶
func (e RecipePriceMode) Valid() bool
Valid indicates whether the value is a known member of the RecipePriceMode enum.
type RecordInvoicePaymentJSONBody ¶
type RecordInvoicePaymentJSONBody struct {
// Note Free text, for example "Cheque 1234". Do not put personal data here: the audit log cannot be edited.
Note string `json:"note,omitempty"`
}
RecordInvoicePaymentJSONBody defines parameters for RecordInvoicePayment.
type RecordInvoicePaymentJSONRequestBody ¶
type RecordInvoicePaymentJSONRequestBody RecordInvoicePaymentJSONBody
RecordInvoicePaymentJSONRequestBody defines body for RecordInvoicePayment for application/json ContentType.
type RecordInvoicePaymentParams ¶
type RecordInvoicePaymentParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
RecordInvoicePaymentParams defines parameters for RecordInvoicePayment.
type RecoveryWarning ¶
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 Hardcount recording a card charge that Stripe shows succeeded (its webhook, or the check of an unresolved charge). 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. `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 ¶
type RecoveryWarningCode string
RecoveryWarningCode defines model for RecoveryWarning.Code.
const ( ReliefNotReissued RecoveryWarningCode = "relief_not_reissued" TaxReversedUnrecoverable RecoveryWarningCode = "tax_reversed_unrecoverable" )
Defines values for RecoveryWarningCode.
func (RecoveryWarningCode) Valid ¶
func (e RecoveryWarningCode) Valid() bool
Valid indicates whether the value is a known member of the RecoveryWarningCode enum.
type RefundInvoiceJSONBody ¶
type RefundInvoiceJSONBody struct {
// AmountCents Amount to refund. 0 or absent refunds what was paid by card less the refunds on the invoice's credit notes that are not voided, up to what is left of the invoice total.
AmountCents int64 `json:"amount_cents,omitempty"`
// Description Text for the credit note line. Defaults to "Refund: <reason>".
Description string `json:"description,omitempty"`
Reason RefundInvoiceJSONBodyReason `json:"reason"`
}
RefundInvoiceJSONBody defines parameters for RefundInvoice.
type RefundInvoiceJSONBodyReason ¶
type RefundInvoiceJSONBodyReason string
RefundInvoiceJSONBodyReason defines parameters for RefundInvoice.
const ( Duplicate RefundInvoiceJSONBodyReason = "duplicate" Fraudulent RefundInvoiceJSONBodyReason = "fraudulent" Other RefundInvoiceJSONBodyReason = "other" RequestedByCustomer RefundInvoiceJSONBodyReason = "requested_by_customer" )
Defines values for RefundInvoiceJSONBodyReason.
func (RefundInvoiceJSONBodyReason) Valid ¶
func (e RefundInvoiceJSONBodyReason) Valid() bool
Valid indicates whether the value is a known member of the RefundInvoiceJSONBodyReason enum.
type RefundInvoiceJSONRequestBody ¶
type RefundInvoiceJSONRequestBody RefundInvoiceJSONBody
RefundInvoiceJSONRequestBody defines body for RefundInvoice for application/json ContentType.
type RefundInvoiceParams ¶
type RefundInvoiceParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
RefundInvoiceParams defines parameters for RefundInvoice.
type ReleaseHeldUsageJSONBody ¶
type ReleaseHeldUsageJSONBody struct {
// CustomerId Release into this customer (an `hc_cus_` id) instead of
// the one whose external ID matches, for a `user` value
// that had a typo.
CustomerId string `json:"customer_id,omitempty"`
// ExternalCustomerId The external ID the rows were held under.
ExternalCustomerId string `json:"external_customer_id"`
}
ReleaseHeldUsageJSONBody defines parameters for ReleaseHeldUsage.
type ReleaseHeldUsageJSONRequestBody ¶
type ReleaseHeldUsageJSONRequestBody ReleaseHeldUsageJSONBody
ReleaseHeldUsageJSONRequestBody defines body for ReleaseHeldUsage for application/json ContentType.
type ReplayWebhookDeliveryParams ¶
type ReplayWebhookDeliveryParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
ReplayWebhookDeliveryParams defines parameters for ReplayWebhookDelivery.
type ReplayWebhookEventParams ¶
type ReplayWebhookEventParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
ReplayWebhookEventParams defines parameters for ReplayWebhookEvent.
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 ResendInvoiceSetupLink200JSONResponseBodyStatus ¶
type ResendInvoiceSetupLink200JSONResponseBodyStatus string
ResendInvoiceSetupLink200JSONResponseBodyStatus defines parameters for ResendInvoiceSetupLink.
const (
ResendInvoiceSetupLink200JSONResponseBodyStatusSent ResendInvoiceSetupLink200JSONResponseBodyStatus = "sent"
)
Defines values for ResendInvoiceSetupLink200JSONResponseBodyStatus.
func (ResendInvoiceSetupLink200JSONResponseBodyStatus) Valid ¶
func (e ResendInvoiceSetupLink200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the ResendInvoiceSetupLink200JSONResponseBodyStatus enum.
type ResendInvoiceSetupLinkParams ¶
type ResendInvoiceSetupLinkParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
ResendInvoiceSetupLinkParams defines parameters for ResendInvoiceSetupLink.
type ResolveDunningRunJSONBody ¶
type ResolveDunningRunJSONBody struct {
Resolution ResolveDunningRunJSONBodyResolution `json:"resolution"`
}
ResolveDunningRunJSONBody defines parameters for ResolveDunningRun.
type ResolveDunningRunJSONBodyResolution ¶
type ResolveDunningRunJSONBodyResolution string
ResolveDunningRunJSONBodyResolution defines parameters for ResolveDunningRun.
const ( InvoiceNotCollectible ResolveDunningRunJSONBodyResolution = "invoice_not_collectible" InvoiceVoided ResolveDunningRunJSONBodyResolution = "invoice_voided" PaymentRecovered ResolveDunningRunJSONBodyResolution = "payment_recovered" )
Defines values for ResolveDunningRunJSONBodyResolution.
func (ResolveDunningRunJSONBodyResolution) Valid ¶
func (e ResolveDunningRunJSONBodyResolution) Valid() bool
Valid indicates whether the value is a known member of the ResolveDunningRunJSONBodyResolution enum.
type ResolveDunningRunJSONRequestBody ¶
type ResolveDunningRunJSONRequestBody ResolveDunningRunJSONBody
ResolveDunningRunJSONRequestBody defines body for ResolveDunningRun for application/json ContentType.
type ResolveDunningRunParams ¶
type ResolveDunningRunParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
ResolveDunningRunParams defines parameters for ResolveDunningRun.
type RetryCreditNoteRefundParams ¶
type RetryCreditNoteRefundParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
RetryCreditNoteRefundParams defines parameters for RetryCreditNoteRefund.
type RotateApiKeyJSONBody ¶
type RotateApiKeyJSONBody struct {
// ExpiresInSeconds Grace period for the old key. 0 revokes it immediately.
ExpiresInSeconds int64 `json:"expires_in_seconds,omitempty"`
}
RotateApiKeyJSONBody defines parameters for RotateApiKey.
type RotateApiKeyJSONRequestBody ¶
type RotateApiKeyJSONRequestBody RotateApiKeyJSONBody
RotateApiKeyJSONRequestBody defines body for RotateApiKey for application/json ContentType.
type RotateApiKeyParams ¶
type RotateApiKeyParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
RotateApiKeyParams defines parameters for RotateApiKey.
type RotateInvoicePublicTokenParams ¶
type RotateInvoicePublicTokenParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
RotateInvoicePublicTokenParams defines parameters for RotateInvoicePublicToken.
type ScheduleSubscriptionCancelJSONBody ¶
type ScheduleSubscriptionCancelJSONBody struct {
// AtPeriodEnd Cancel at the end of the current period (or of the trial, while trialing).
AtPeriodEnd bool `json:"at_period_end,omitempty"`
// CancelAt Cancel at this instant. Must be in the future.
CancelAt time.Time `json:"cancel_at,omitempty"`
}
ScheduleSubscriptionCancelJSONBody defines parameters for ScheduleSubscriptionCancel.
type ScheduleSubscriptionCancelJSONRequestBody ¶
type ScheduleSubscriptionCancelJSONRequestBody ScheduleSubscriptionCancelJSONBody
ScheduleSubscriptionCancelJSONRequestBody defines body for ScheduleSubscriptionCancel for application/json ContentType.
type ScheduleSubscriptionCancelParams ¶
type ScheduleSubscriptionCancelParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
ScheduleSubscriptionCancelParams defines parameters for ScheduleSubscriptionCancel.
type SendCustomerPaymentSetupEmailJSONBody ¶
type SendCustomerPaymentSetupEmailJSONBody struct {
// Note Optional text shown at the top of the email. At most
// 2000 bytes (UTF-8) after trimming whitespace.
Note string `json:"note,omitempty"`
}
SendCustomerPaymentSetupEmailJSONBody defines parameters for SendCustomerPaymentSetupEmail.
type SendCustomerPaymentSetupEmailJSONRequestBody ¶
type SendCustomerPaymentSetupEmailJSONRequestBody SendCustomerPaymentSetupEmailJSONBody
SendCustomerPaymentSetupEmailJSONRequestBody defines body for SendCustomerPaymentSetupEmail for application/json ContentType.
type SendCustomerPaymentSetupEmailParams ¶
type SendCustomerPaymentSetupEmailParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
SendCustomerPaymentSetupEmailParams defines parameters for SendCustomerPaymentSetupEmail.
type SendTestEmailParams ¶
type SendTestEmailParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
SendTestEmailParams defines parameters for SendTestEmail.
type SentEmail ¶
type SentEmail struct {
CreatedAt time.Time `json:"created_at"`
// DeliveryState What the email provider reported back, if anything.
DeliveryState SentEmailDeliveryState `json:"delivery_state"`
DispatchedAt time.Time `json:"dispatched_at,omitempty"`
EmailType SentEmailEmailType `json:"email_type"`
Id string `json:"id"`
InvoiceNumber string `json:"invoice_number,omitempty"`
LastError string `json:"last_error,omitempty"`
// Line The email in the words of the activity line standard (ADR-128),
// the same as on the invoice's payment timeline: its name and
// what happened to it ("Receipt email delivered"), why it was not
// sent, the invoice it was about, and who it went to. Dated at the
// time on the customer's test clock that caused it, with the real
// send time as `recorded_at`. Present for every email type this
// list returns.
Line ActivityLine `json:"line,omitempty"`
Recipient string `json:"recipient"`
// Status Hardcount's send state. `dispatched` means the mail server accepted it.
Status SentEmailStatus `json:"status"`
}
SentEmail defines model for SentEmail.
type SentEmailDeliveryState ¶
type SentEmailDeliveryState string
SentEmailDeliveryState What the email provider reported back, if anything.
const ( SentEmailDeliveryStateBounced SentEmailDeliveryState = "bounced" SentEmailDeliveryStateComplained SentEmailDeliveryState = "complained" SentEmailDeliveryStateDelivered SentEmailDeliveryState = "delivered" SentEmailDeliveryStateUnknown SentEmailDeliveryState = "unknown" )
Defines values for SentEmailDeliveryState.
func (SentEmailDeliveryState) Valid ¶
func (e SentEmailDeliveryState) Valid() bool
Valid indicates whether the value is a known member of the SentEmailDeliveryState enum.
type SentEmailEmailType ¶
type SentEmailEmailType string
SentEmailEmailType defines model for SentEmail.EmailType.
const ( SentEmailEmailTypeCreditNote SentEmailEmailType = "credit_note" SentEmailEmailTypeDunningEscalation SentEmailEmailType = "dunning_escalation" SentEmailEmailTypeDunningWarning SentEmailEmailType = "dunning_warning" SentEmailEmailTypeInvoice SentEmailEmailType = "invoice" SentEmailEmailTypePaymentFailed SentEmailEmailType = "payment_failed" SentEmailEmailTypePaymentReceipt SentEmailEmailType = "payment_receipt" SentEmailEmailTypePaymentSetupRequest SentEmailEmailType = "payment_setup_request" )
Defines values for SentEmailEmailType.
func (SentEmailEmailType) Valid ¶
func (e SentEmailEmailType) Valid() bool
Valid indicates whether the value is a known member of the SentEmailEmailType enum.
type SentEmailStatus ¶
type SentEmailStatus string
SentEmailStatus Hardcount's send state. `dispatched` means the mail server accepted it.
const ( SentEmailStatusDispatched SentEmailStatus = "dispatched" SentEmailStatusFailed SentEmailStatus = "failed" SentEmailStatusPending SentEmailStatus = "pending" SentEmailStatusSkipped SentEmailStatus = "skipped" )
Defines values for SentEmailStatus.
func (SentEmailStatus) Valid ¶
func (e SentEmailStatus) Valid() bool
Valid indicates whether the value is a known member of the SentEmailStatus enum.
type ServerInterface ¶
type ServerInterface interface {
// Health check
// (GET /health)
GetHealth(w http.ResponseWriter, r *http.Request)
// Readiness check for load balancers
// (GET /health/ready)
GetHealthReady(w http.ResponseWriter, r *http.Request)
// Prometheus metrics
// (GET /metrics)
GetMetrics(w http.ResponseWriter, r *http.Request)
// Get MRR movement over time
// (GET /v1/analytics/mrr-movement)
GetAnalyticsMrrMovement(w http.ResponseWriter, r *http.Request, params GetAnalyticsMrrMovementParams)
// Get headline billing metrics
// (GET /v1/analytics/overview)
GetAnalyticsOverview(w http.ResponseWriter, r *http.Request, params GetAnalyticsOverviewParams)
// Get revenue over time
// (GET /v1/analytics/revenue-chart)
GetAnalyticsRevenueChart(w http.ResponseWriter, r *http.Request, params GetAnalyticsRevenueChartParams)
// Get usage over time
// (GET /v1/analytics/usage)
GetAnalyticsUsage(w http.ResponseWriter, r *http.Request, params GetAnalyticsUsageParams)
// List API keys
// (GET /v1/api-keys)
ListApiKeys(w http.ResponseWriter, r *http.Request, params ListApiKeysParams)
// Create an API key
// (POST /v1/api-keys)
CreateApiKey(w http.ResponseWriter, r *http.Request, params CreateApiKeyParams)
// Revoke an API key
// (DELETE /v1/api-keys/{id})
RevokeApiKey(w http.ResponseWriter, r *http.Request, id string)
// Rotate an API key
// (POST /v1/api-keys/{id}/rotate)
RotateApiKey(w http.ResponseWriter, r *http.Request, id string, params RotateApiKeyParams)
// List audit log entries
// (GET /v1/audit-log)
ListAuditLog(w http.ResponseWriter, r *http.Request, params ListAuditLogParams)
// List audit log filter values
// (GET /v1/audit-log/filters)
GetAuditLogFilters(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)
// Check a password reset token
// (GET /v1/auth/password-reset/check)
CheckPasswordResetToken(w http.ResponseWriter, r *http.Request, params CheckPasswordResetTokenParams)
// 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)
// Trigger billing cycle
// (POST /v1/billing/run)
PostV1BillingRun(w http.ResponseWriter, r *http.Request, params PostV1BillingRunParams)
// Set up a new installation
// (POST /v1/bootstrap)
Bootstrap(w http.ResponseWriter, r *http.Request)
// List credit notes
// (GET /v1/credit-notes)
ListCreditNotes(w http.ResponseWriter, r *http.Request, params ListCreditNotesParams)
// Create a credit note (line-based, or commit relief)
// (POST /v1/credit-notes)
PostV1CreditNotes(w http.ResponseWriter, r *http.Request, params PostV1CreditNotesParams)
// Get credit note totals
// (GET /v1/credit-notes/stats)
GetCreditNoteStats(w http.ResponseWriter, r *http.Request)
// Get a credit note
// (GET /v1/credit-notes/{id})
GetCreditNote(w http.ResponseWriter, r *http.Request, id string)
// Issue a draft credit note
// (POST /v1/credit-notes/{id}/issue)
IssueCreditNote(w http.ResponseWriter, r *http.Request, id string, params IssueCreditNoteParams)
// Download credit note PDF
// (GET /v1/credit-notes/{id}/pdf)
GetCreditNotePdf(w http.ResponseWriter, r *http.Request, id string)
// Retry a failed credit-note refund
// (POST /v1/credit-notes/{id}/retry-refund)
RetryCreditNoteRefund(w http.ResponseWriter, r *http.Request, id string, params RetryCreditNoteRefundParams)
// Email the credit-note document (PDF attached)
// (POST /v1/credit-notes/{id}/send)
PostV1CreditNotesIdSend(w http.ResponseWriter, r *http.Request, id string, params PostV1CreditNotesIdSendParams)
// Void a draft credit note
// (POST /v1/credit-notes/{id}/void)
VoidCreditNote(w http.ResponseWriter, r *http.Request, id string, params VoidCreditNoteParams)
// Add or remove credit
// (POST /v1/credits/adjust)
AdjustCredits(w http.ResponseWriter, r *http.Request, params AdjustCreditsParams)
// Get customer credit balance
// (GET /v1/credits/balance/{customer_id})
GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request, customerId string)
// Get customer live credit balance
// (GET /v1/credits/balance/{customer_id}/live)
GetV1CreditsBalanceCustomerIdLive(w http.ResponseWriter, r *http.Request, customerId string)
// List credit balances for all customers
// (GET /v1/credits/balances)
ListCreditBalances(w http.ResponseWriter, r *http.Request, params ListCreditBalancesParams)
// Grant credits to customer
// (POST /v1/credits/grant)
PostV1CreditsGrant(w http.ResponseWriter, r *http.Request, params PostV1CreditsGrantParams)
// Per-grant burndown + kind subtotals
// (GET /v1/credits/grants/{customer_id})
GetV1CreditsGrantsCustomerId(w http.ResponseWriter, r *http.Request, customerId string, params GetV1CreditsGrantsCustomerIdParams)
// List a customer's credit ledger
// (GET /v1/credits/ledger/{customer_id})
ListCreditLedgerEntries(w http.ResponseWriter, r *http.Request, customerId string, params ListCreditLedgerEntriesParams)
// 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, params PostV1CustomersParams)
// Get a customer overview
// (GET /v1/customers/{customer_id}/overview)
GetCustomerOverview(w http.ResponseWriter, r *http.Request, customerId string)
// List the customer's payment methods
// (GET /v1/customers/{customer_id}/payment-methods)
ListCustomerPaymentMethods(w http.ResponseWriter, r *http.Request, customerId string, params ListCustomerPaymentMethodsParams)
// Email the customer a link to add a payment method
// (POST /v1/customers/{customer_id}/payment-methods/send-setup-email)
SendCustomerPaymentSetupEmail(w http.ResponseWriter, r *http.Request, customerId string, params SendCustomerPaymentSetupEmailParams)
// Create a link for the customer to add a payment method
// (POST /v1/customers/{customer_id}/payment-methods/setup-session)
CreateCustomerPaymentSetupSession(w http.ResponseWriter, r *http.Request, customerId string, params CreateCustomerPaymentSetupSessionParams)
// Detach a payment method
// (DELETE /v1/customers/{customer_id}/payment-methods/{pmID})
DetachCustomerPaymentMethod(w http.ResponseWriter, r *http.Request, customerId string, pmid string)
// Make a payment method the default
// (POST /v1/customers/{customer_id}/payment-methods/{pmID}/default)
SetCustomerDefaultPaymentMethod(w http.ResponseWriter, r *http.Request, customerId string, pmid string, params SetCustomerDefaultPaymentMethodParams)
// Get customer
// (GET /v1/customers/{id})
GetCustomer(w http.ResponseWriter, r *http.Request, id string)
// Update customer
// (PATCH /v1/customers/{id})
UpdateCustomer(w http.ResponseWriter, r *http.Request, id string, params UpdateCustomerParams)
// Get the customer's billing profile
// (GET /v1/customers/{id}/billing-profile)
GetCustomerBillingProfile(w http.ResponseWriter, r *http.Request, id string)
// Create or replace the customer's billing profile
// (PUT /v1/customers/{id}/billing-profile)
UpsertCustomerBillingProfile(w http.ResponseWriter, r *http.Request, id string, params UpsertCustomerBillingProfileParams)
// 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, params PostV1CustomersIdRotateCostDashboardTokenParams)
// List emails sent to the customer
// (GET /v1/customers/{id}/sent-emails)
ListCustomerSentEmails(w http.ResponseWriter, r *http.Request, id string, params ListCustomerSentEmailsParams)
// Get the customer's usage and cost for a period
// (GET /v1/customers/{id}/usage)
GetCustomerUsage(w http.ResponseWriter, r *http.Request, id string, params GetCustomerUsageParams)
// List dunning policies
// (GET /v1/dunning/policies)
ListDunningPolicies(w http.ResponseWriter, r *http.Request, params ListDunningPoliciesParams)
// Create dunning policy
// (POST /v1/dunning/policies)
CreateDunningPolicy(w http.ResponseWriter, r *http.Request, params CreateDunningPolicyParams)
// Delete dunning policy
// (DELETE /v1/dunning/policies/{id})
DeleteDunningPolicy(w http.ResponseWriter, r *http.Request, id string)
// Get dunning policy
// (GET /v1/dunning/policies/{id})
GetDunningPolicy(w http.ResponseWriter, r *http.Request, id string)
// Replace dunning policy settings
// (PATCH /v1/dunning/policies/{id})
UpdateDunningPolicy(w http.ResponseWriter, r *http.Request, id string, params UpdateDunningPolicyParams)
// Make a dunning policy the default
// (POST /v1/dunning/policies/{id}/set-default)
SetDefaultDunningPolicy(w http.ResponseWriter, r *http.Request, id string, params SetDefaultDunningPolicyParams)
// List dunning runs
// (GET /v1/dunning/runs)
ListDunningRuns(w http.ResponseWriter, r *http.Request, params ListDunningRunsParams)
// Get a dunning run with its events
// (GET /v1/dunning/runs/{id})
GetDunningRun(w http.ResponseWriter, r *http.Request, id string)
// Resolve a dunning run
// (POST /v1/dunning/runs/{id}/resolve)
ResolveDunningRun(w http.ResponseWriter, r *http.Request, id string, params ResolveDunningRunParams)
// Get dunning totals
// (GET /v1/dunning/stats)
GetDunningStats(w http.ResponseWriter, r *http.Request)
// Export the audit log as CSV
// (GET /v1/exports/audit-log.csv)
ExportAuditLogCsv(w http.ResponseWriter, r *http.Request, params ExportAuditLogCsvParams)
// Export customers as CSV
// (GET /v1/exports/customers.csv)
ExportCustomersCsv(w http.ResponseWriter, r *http.Request, params ExportCustomersCsvParams)
// Export invoices as CSV
// (GET /v1/exports/invoices.csv)
ExportInvoicesCsv(w http.ResponseWriter, r *http.Request, params ExportInvoicesCsvParams)
// Export subscriptions as CSV
// (GET /v1/exports/subscriptions.csv)
ExportSubscriptionsCsv(w http.ResponseWriter, r *http.Request, params ExportSubscriptionsCsvParams)
// Export usage events as CSV
// (GET /v1/exports/usage-events.csv)
ExportUsageEventsCsv(w http.ResponseWriter, r *http.Request, params ExportUsageEventsCsvParams)
// Ingest LiteLLM spend logs
// (POST /v1/integrations/litellm/spend)
IngestLitellmSpend(w http.ResponseWriter, r *http.Request)
// List invoices
// (GET /v1/invoices)
GetV1Invoices(w http.ResponseWriter, r *http.Request, params GetV1InvoicesParams)
// Create a draft invoice
// (POST /v1/invoices)
CreateInvoice(w http.ResponseWriter, r *http.Request, params CreateInvoiceParams)
// Preview the next invoice for a customer (Stripe-equivalent)
// (POST /v1/invoices/create_preview)
PostV1InvoicesCreatePreview(w http.ResponseWriter, r *http.Request, params PostV1InvoicesCreatePreviewParams)
// Get invoice with line items
// (GET /v1/invoices/{id})
GetInvoice(w http.ResponseWriter, r *http.Request, id string)
// Charge a finalized invoice now
// (POST /v1/invoices/{id}/collect)
CollectInvoicePayment(w http.ResponseWriter, r *http.Request, id string, params CollectInvoicePaymentParams)
// List the card disputes on an invoice
// (GET /v1/invoices/{id}/disputes)
ListInvoiceDisputes(w http.ResponseWriter, r *http.Request, id string, params ListInvoiceDisputesParams)
// Finalize draft invoice
// (POST /v1/invoices/{id}/finalize)
PostV1InvoicesIdFinalize(w http.ResponseWriter, r *http.Request, id string, params PostV1InvoicesIdFinalizeParams)
// Add a line item to a draft invoice
// (POST /v1/invoices/{id}/line-items)
AddInvoiceLineItem(w http.ResponseWriter, r *http.Request, id string, params AddInvoiceLineItemParams)
// Write off an invoice as uncollectible
// (POST /v1/invoices/{id}/mark-uncollectible)
MarkInvoiceUncollectible(w http.ResponseWriter, r *http.Request, id string, params MarkInvoiceUncollectibleParams)
// Get the invoice activity timeline
// (GET /v1/invoices/{id}/payment-timeline)
GetInvoicePaymentTimeline(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)
// Record a payment made outside Stripe
// (POST /v1/invoices/{id}/record-payment)
RecordInvoicePayment(w http.ResponseWriter, r *http.Request, id string, params RecordInvoicePaymentParams)
// Refund a paid invoice
// (POST /v1/invoices/{id}/refund)
RefundInvoice(w http.ResponseWriter, r *http.Request, id string, params RefundInvoiceParams)
// Resend the payment-method setup link
// (POST /v1/invoices/{id}/resend-setup-link)
ResendInvoiceSetupLink(w http.ResponseWriter, r *http.Request, id string, params ResendInvoiceSetupLinkParams)
// Retry tax calculation on a deferred invoice
// (POST /v1/invoices/{id}/retry-tax)
PostV1InvoicesIdRetryTax(w http.ResponseWriter, r *http.Request, id string, params PostV1InvoicesIdRetryTaxParams)
// Replace the hosted invoice link
// (POST /v1/invoices/{id}/rotate-public-token)
RotateInvoicePublicToken(w http.ResponseWriter, r *http.Request, id string, params RotateInvoicePublicTokenParams)
// Email the invoice (PDF attached) to a recipient
// (POST /v1/invoices/{id}/send)
PostV1InvoicesIdSend(w http.ResponseWriter, r *http.Request, id string, params PostV1InvoicesIdSendParams)
// Void an invoice
// (POST /v1/invoices/{id}/void)
VoidInvoice(w http.ResponseWriter, r *http.Request, id string, params VoidInvoiceParams)
// List workspace members and invitations
// (GET /v1/members)
ListMembers(w http.ResponseWriter, r *http.Request)
// Revoke a pending invitation
// (DELETE /v1/members/invitations/{id})
RevokeMemberInvitation(w http.ResponseWriter, r *http.Request, id string)
// Invite a teammate by email
// (POST /v1/members/invite)
InviteMember(w http.ResponseWriter, r *http.Request, params InviteMemberParams)
// Remove a member from the workspace
// (DELETE /v1/members/{userID})
RemoveMember(w http.ResponseWriter, r *http.Request, userID string)
// List meters
// (GET /v1/meters)
GetV1Meters(w http.ResponseWriter, r *http.Request, params GetV1MetersParams)
// Create meter
// (POST /v1/meters)
PostV1Meters(w http.ResponseWriter, r *http.Request, params PostV1MetersParams)
// Get meter
// (GET /v1/meters/{id})
GetMeter(w http.ResponseWriter, r *http.Request, id string)
// Update meter
// (PATCH /v1/meters/{id})
PatchV1MetersId(w http.ResponseWriter, r *http.Request, id string, params PatchV1MetersIdParams)
// List plans
// (GET /v1/plans)
GetV1Plans(w http.ResponseWriter, r *http.Request, params GetV1PlansParams)
// Create plan
// (POST /v1/plans)
PostV1Plans(w http.ResponseWriter, r *http.Request, params PostV1PlansParams)
// Get plan
// (GET /v1/plans/{id})
GetPlan(w http.ResponseWriter, r *http.Request, id string)
// Update plan
// (PATCH /v1/plans/{id})
UpdatePlan(w http.ResponseWriter, r *http.Request, id string, params UpdatePlanParams)
// List a plan's prices
// (GET /v1/plans/{id}/prices)
ListPlanPrices(w http.ResponseWriter, r *http.Request, id string, params ListPlanPricesParams)
// Add a price to a plan
// (POST /v1/plans/{id}/prices)
AddPlanPrice(w http.ResponseWriter, r *http.Request, id string, params AddPlanPriceParams)
// Remove a price from a plan
// (DELETE /v1/plans/{id}/prices/{price_id})
RemovePlanPrice(w http.ResponseWriter, r *http.Request, id string, priceId string)
// Change a price's rate
// (PATCH /v1/plans/{id}/prices/{price_id})
UpdatePlanPrice(w http.ResponseWriter, r *http.Request, id string, priceId string, params UpdatePlanPriceParams)
// List active price overrides
// (GET /v1/price-overrides)
ListPriceOverrides(w http.ResponseWriter, r *http.Request, params ListPriceOverridesParams)
// Create a customer price override
// (POST /v1/price-overrides)
CreatePriceOverride(w http.ResponseWriter, r *http.Request, params CreatePriceOverrideParams)
// End a customer price override
// (DELETE /v1/price-overrides/{id})
DeletePriceOverride(w http.ResponseWriter, r *http.Request, id string)
// List provider cost rates
// (GET /v1/provider-costs)
GetV1ProviderCosts(w http.ResponseWriter, r *http.Request, params GetV1ProviderCostsParams)
// Create or update a provider cost rate
// (PUT /v1/provider-costs)
PutV1ProviderCosts(w http.ResponseWriter, r *http.Request, params PutV1ProviderCostsParams)
// 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)
// Data behind the hosted invoice page
// (GET /v1/public/invoices/{token})
GetHostedInvoice(w http.ResponseWriter, r *http.Request, token string)
// Start paying the invoice in Stripe Checkout
// (POST /v1/public/invoices/{token}/checkout)
CreateHostedInvoiceCheckout(w http.ResponseWriter, r *http.Request, token string)
// Download the hosted invoice PDF
// (GET /v1/public/invoices/{token}/pdf)
GetHostedInvoicePdf(w http.ResponseWriter, r *http.Request, token string)
// Data behind the payment-update page
// (GET /v1/public/payment-updates/{token})
GetPublicPaymentUpdate(w http.ResponseWriter, r *http.Request, token string)
// Start adding a card in Stripe Checkout
// (POST /v1/public/payment-updates/{token}/checkout)
CreatePublicPaymentUpdateCheckout(w http.ResponseWriter, r *http.Request, token string)
// List recipes
// (GET /v1/recipes)
ListRecipes(w http.ResponseWriter, r *http.Request, params ListRecipesParams)
// List installed recipe instances
// (GET /v1/recipes/instances)
ListRecipeInstances(w http.ResponseWriter, r *http.Request, params ListRecipeInstancesParams)
// 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, params InstantiateRecipeParams)
// Preview recipe
// (POST /v1/recipes/{key}/preview)
PreviewRecipe(w http.ResponseWriter, r *http.Request, key string, params PreviewRecipeParams)
// Get workspace settings
// (GET /v1/settings)
GetTenantSettings(w http.ResponseWriter, r *http.Request)
// Update workspace settings
// (PUT /v1/settings)
UpdateTenantSettings(w http.ResponseWriter, r *http.Request, params UpdateTenantSettingsParams)
// Email setup status
// (GET /v1/settings/email)
GetEmailSettings(w http.ResponseWriter, r *http.Request)
// Send a test email
// (POST /v1/settings/email/test)
SendTestEmail(w http.ResponseWriter, r *http.Request, params SendTestEmailParams)
// List Stripe connections
// (GET /v1/settings/stripe)
ListStripeConnections(w http.ResponseWriter, r *http.Request)
// Connect a Stripe account
// (POST /v1/settings/stripe)
ConnectStripe(w http.ResponseWriter, r *http.Request, params ConnectStripeParams)
// Disconnect Stripe for one mode
// (DELETE /v1/settings/stripe/{mode})
DisconnectStripe(w http.ResponseWriter, r *http.Request, mode DisconnectStripeParamsMode)
// Set the Stripe webhook signing secret
// (PATCH /v1/settings/stripe/{mode}/webhook)
SetStripeWebhookSecret(w http.ResponseWriter, r *http.Request, mode SetStripeWebhookSecretParamsMode, params SetStripeWebhookSecretParams)
// 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, params PostV1SubscriptionsParams)
// Get subscription
// (GET /v1/subscriptions/{id})
GetSubscription(w http.ResponseWriter, r *http.Request, id string)
// Activate draft subscription
// (POST /v1/subscriptions/{id}/activate)
PostV1SubscriptionsIdActivate(w http.ResponseWriter, r *http.Request, id string, params PostV1SubscriptionsIdActivateParams)
// Clear billing thresholds
// (DELETE /v1/subscriptions/{id}/billing-thresholds)
ClearSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request, id string)
// Set billing thresholds
// (PUT /v1/subscriptions/{id}/billing-thresholds)
SetSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request, id string, params SetSubscriptionBillingThresholdsParams)
// Cancel subscription now
// (POST /v1/subscriptions/{id}/cancel)
CancelSubscription(w http.ResponseWriter, r *http.Request, id string, params CancelSubscriptionParams)
// End trial now
// (POST /v1/subscriptions/{id}/end-trial)
EndSubscriptionTrial(w http.ResponseWriter, r *http.Request, id string, params EndSubscriptionTrialParams)
// Extend trial
// (POST /v1/subscriptions/{id}/extend-trial)
ExtendSubscriptionTrial(w http.ResponseWriter, r *http.Request, id string, params ExtendSubscriptionTrialParams)
// Add subscription item
// (POST /v1/subscriptions/{id}/items)
AddSubscriptionItem(w http.ResponseWriter, r *http.Request, id string, params AddSubscriptionItemParams)
// Remove subscription item
// (DELETE /v1/subscriptions/{id}/items/{itemID})
RemoveSubscriptionItem(w http.ResponseWriter, r *http.Request, id string, itemID string)
// Change subscription item
// (PATCH /v1/subscriptions/{id}/items/{itemID})
UpdateSubscriptionItem(w http.ResponseWriter, r *http.Request, id string, itemID string, params UpdateSubscriptionItemParams)
// Cancel a scheduled plan change
// (DELETE /v1/subscriptions/{id}/items/{itemID}/pending-change)
CancelSubscriptionItemPendingChange(w http.ResponseWriter, r *http.Request, id string, itemID string)
// Resume collection
// (DELETE /v1/subscriptions/{id}/pause-collection)
ResumeSubscriptionCollection(w http.ResponseWriter, r *http.Request, id string)
// Pause collection
// (PUT /v1/subscriptions/{id}/pause-collection)
PauseSubscriptionCollection(w http.ResponseWriter, r *http.Request, id string, params PauseSubscriptionCollectionParams)
// Retry billing on a subscription whose billing is failing
// (POST /v1/subscriptions/{id}/retry-billing)
PostV1SubscriptionsIdRetryBilling(w http.ResponseWriter, r *http.Request, id string, params PostV1SubscriptionsIdRetryBillingParams)
// Schedule a cancel
// (POST /v1/subscriptions/{id}/schedule-cancel)
ScheduleSubscriptionCancel(w http.ResponseWriter, r *http.Request, id string, params ScheduleSubscriptionCancelParams)
// Clear a scheduled cancel
// (DELETE /v1/subscriptions/{id}/scheduled-cancel)
ClearSubscriptionScheduledCancel(w http.ResponseWriter, r *http.Request, id string)
// Get subscription activity timeline
// (GET /v1/subscriptions/{id}/timeline)
GetSubscriptionTimeline(w http.ResponseWriter, r *http.Request, id string)
// List tenants
// (GET /v1/tenants)
ListTenants(w http.ResponseWriter, r *http.Request, params ListTenantsParams)
// Create a tenant
// (POST /v1/tenants)
CreateTenant(w http.ResponseWriter, r *http.Request)
// Get a tenant
// (GET /v1/tenants/{id})
GetTenant(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, params GetV1TestClocksParams)
// Create a test clock
// (POST /v1/test-clocks)
PostV1TestClocks(w http.ResponseWriter, r *http.Request, params PostV1TestClocksParams)
// 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, params PostV1TestClocksIdAdvanceParams)
// List customers attached to a test clock
// (GET /v1/test-clocks/{id}/customers)
ListTestClockCustomers(w http.ResponseWriter, r *http.Request, id string, params ListTestClockCustomersParams)
// 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, params PostV1TestClocksIdRetryAdvanceParams)
// List subscriptions pinned to this clock
// (GET /v1/test-clocks/{id}/subscriptions)
GetV1TestClocksIdSubscriptions(w http.ResponseWriter, r *http.Request, id string, params GetV1TestClocksIdSubscriptionsParams)
// 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)
// Usage totals
// (GET /v1/usage-events/aggregate)
AggregateUsageEvents(w http.ResponseWriter, r *http.Request, params AggregateUsageEventsParams)
// Backfill a past usage event
// (POST /v1/usage-events/backfill)
BackfillUsageEvent(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 held usage
// (GET /v1/usage-events/held)
ListHeldUsage(w http.ResponseWriter, r *http.Request)
// Discard held usage
// (POST /v1/usage-events/held/discard)
DiscardHeldUsage(w http.ResponseWriter, r *http.Request)
// Release held usage
// (POST /v1/usage-events/held/release)
ReleaseHeldUsage(w http.ResponseWriter, r *http.Request)
// List webhook endpoints
// (GET /v1/webhook-endpoints/endpoints)
GetV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request, params GetV1WebhookEndpointsEndpointsParams)
// Create webhook endpoint
// (POST /v1/webhook-endpoints/endpoints)
PostV1WebhookEndpointsEndpoints(w http.ResponseWriter, r *http.Request, params PostV1WebhookEndpointsEndpointsParams)
// Delivery counts per webhook endpoint
// (GET /v1/webhook-endpoints/endpoints/stats)
GetWebhookEndpointStats(w http.ResponseWriter, r *http.Request, params GetWebhookEndpointStatsParams)
// Delete (disable) webhook endpoint
// (DELETE /v1/webhook-endpoints/endpoints/{id})
DeleteV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request, id string)
// Get a webhook endpoint
// (GET /v1/webhook-endpoints/endpoints/{id})
GetWebhookEndpoint(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, params PatchV1WebhookEndpointsEndpointsIdParams)
// List an endpoint's recent deliveries
// (GET /v1/webhook-endpoints/endpoints/{id}/deliveries)
ListWebhookEndpointDeliveries(w http.ResponseWriter, r *http.Request, id string, params ListWebhookEndpointDeliveriesParams)
// Resend one delivery to its endpoint
// (POST /v1/webhook-endpoints/endpoints/{id}/deliveries/{deliveryID}/replay)
ReplayWebhookDelivery(w http.ResponseWriter, r *http.Request, id string, deliveryID string, params ReplayWebhookDeliveryParams)
// Rotate signing secret (72h dual-signing grace)
// (POST /v1/webhook-endpoints/endpoints/{id}/rotate-secret)
PostV1WebhookEndpointsEndpointsIdRotateSecret(w http.ResponseWriter, r *http.Request, id string, params PostV1WebhookEndpointsEndpointsIdRotateSecretParams)
// List outbound events, newest first
// (GET /v1/webhook-endpoints/events)
GetV1WebhookEndpointsEvents(w http.ResponseWriter, r *http.Request, params GetV1WebhookEndpointsEventsParams)
// Stream webhook events live (Server-Sent Events)
// (GET /v1/webhook_events/stream)
StreamWebhookEvents(w http.ResponseWriter, r *http.Request)
// List all delivery attempts for an event
// (GET /v1/webhook_events/{id}/deliveries)
ListWebhookEventDeliveries(w http.ResponseWriter, r *http.Request, id string)
// Replay an event to all matching endpoints
// (POST /v1/webhook_events/{id}/replay)
ReplayWebhookEvent(w http.ResponseWriter, r *http.Request, id string, params ReplayWebhookEventParams)
// Receive a Postmark delivery webhook
// (POST /v1/webhooks/postmark)
ReceivePostmarkWebhook(w http.ResponseWriter, r *http.Request)
// Receive a Stripe webhook
// (POST /v1/webhooks/stripe/{endpoint_id})
ReceiveStripeWebhook(w http.ResponseWriter, r *http.Request, endpointId string, params ReceiveStripeWebhookParams)
// 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) AddInvoiceLineItem ¶
func (siw *ServerInterfaceWrapper) AddInvoiceLineItem(w http.ResponseWriter, r *http.Request)
AddInvoiceLineItem operation middleware
func (*ServerInterfaceWrapper) AddPlanPrice ¶
func (siw *ServerInterfaceWrapper) AddPlanPrice(w http.ResponseWriter, r *http.Request)
AddPlanPrice operation middleware
func (*ServerInterfaceWrapper) AddSubscriptionItem ¶
func (siw *ServerInterfaceWrapper) AddSubscriptionItem(w http.ResponseWriter, r *http.Request)
AddSubscriptionItem operation middleware
func (*ServerInterfaceWrapper) AdjustCredits ¶
func (siw *ServerInterfaceWrapper) AdjustCredits(w http.ResponseWriter, r *http.Request)
AdjustCredits operation middleware
func (*ServerInterfaceWrapper) AggregateUsageEvents ¶
func (siw *ServerInterfaceWrapper) AggregateUsageEvents(w http.ResponseWriter, r *http.Request)
AggregateUsageEvents operation middleware
func (*ServerInterfaceWrapper) BackfillUsageEvent ¶
func (siw *ServerInterfaceWrapper) BackfillUsageEvent(w http.ResponseWriter, r *http.Request)
BackfillUsageEvent operation middleware
func (*ServerInterfaceWrapper) Bootstrap ¶
func (siw *ServerInterfaceWrapper) Bootstrap(w http.ResponseWriter, r *http.Request)
Bootstrap operation middleware
func (*ServerInterfaceWrapper) CancelSubscription ¶
func (siw *ServerInterfaceWrapper) CancelSubscription(w http.ResponseWriter, r *http.Request)
CancelSubscription operation middleware
func (*ServerInterfaceWrapper) CancelSubscriptionItemPendingChange ¶
func (siw *ServerInterfaceWrapper) CancelSubscriptionItemPendingChange(w http.ResponseWriter, r *http.Request)
CancelSubscriptionItemPendingChange operation middleware
func (*ServerInterfaceWrapper) CheckPasswordResetToken ¶
func (siw *ServerInterfaceWrapper) CheckPasswordResetToken(w http.ResponseWriter, r *http.Request)
CheckPasswordResetToken operation middleware
func (*ServerInterfaceWrapper) ClearSubscriptionBillingThresholds ¶
func (siw *ServerInterfaceWrapper) ClearSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request)
ClearSubscriptionBillingThresholds operation middleware
func (*ServerInterfaceWrapper) ClearSubscriptionScheduledCancel ¶
func (siw *ServerInterfaceWrapper) ClearSubscriptionScheduledCancel(w http.ResponseWriter, r *http.Request)
ClearSubscriptionScheduledCancel operation middleware
func (*ServerInterfaceWrapper) CollectInvoicePayment ¶
func (siw *ServerInterfaceWrapper) CollectInvoicePayment(w http.ResponseWriter, r *http.Request)
CollectInvoicePayment operation middleware
func (*ServerInterfaceWrapper) ConnectStripe ¶
func (siw *ServerInterfaceWrapper) ConnectStripe(w http.ResponseWriter, r *http.Request)
ConnectStripe operation middleware
func (*ServerInterfaceWrapper) CreateApiKey ¶
func (siw *ServerInterfaceWrapper) CreateApiKey(w http.ResponseWriter, r *http.Request)
CreateApiKey operation middleware
func (*ServerInterfaceWrapper) CreateCustomerPaymentSetupSession ¶
func (siw *ServerInterfaceWrapper) CreateCustomerPaymentSetupSession(w http.ResponseWriter, r *http.Request)
CreateCustomerPaymentSetupSession operation middleware
func (*ServerInterfaceWrapper) CreateDunningPolicy ¶
func (siw *ServerInterfaceWrapper) CreateDunningPolicy(w http.ResponseWriter, r *http.Request)
CreateDunningPolicy operation middleware
func (*ServerInterfaceWrapper) CreateHostedInvoiceCheckout ¶
func (siw *ServerInterfaceWrapper) CreateHostedInvoiceCheckout(w http.ResponseWriter, r *http.Request)
CreateHostedInvoiceCheckout operation middleware
func (*ServerInterfaceWrapper) CreateInvoice ¶
func (siw *ServerInterfaceWrapper) CreateInvoice(w http.ResponseWriter, r *http.Request)
CreateInvoice operation middleware
func (*ServerInterfaceWrapper) CreatePriceOverride ¶
func (siw *ServerInterfaceWrapper) CreatePriceOverride(w http.ResponseWriter, r *http.Request)
CreatePriceOverride operation middleware
func (*ServerInterfaceWrapper) CreatePublicPaymentUpdateCheckout ¶
func (siw *ServerInterfaceWrapper) CreatePublicPaymentUpdateCheckout(w http.ResponseWriter, r *http.Request)
CreatePublicPaymentUpdateCheckout operation middleware
func (*ServerInterfaceWrapper) CreateTenant ¶
func (siw *ServerInterfaceWrapper) CreateTenant(w http.ResponseWriter, r *http.Request)
CreateTenant operation middleware
func (*ServerInterfaceWrapper) DeleteDunningPolicy ¶
func (siw *ServerInterfaceWrapper) DeleteDunningPolicy(w http.ResponseWriter, r *http.Request)
DeleteDunningPolicy operation middleware
func (*ServerInterfaceWrapper) DeletePriceOverride ¶
func (siw *ServerInterfaceWrapper) DeletePriceOverride(w http.ResponseWriter, r *http.Request)
DeletePriceOverride 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) DetachCustomerPaymentMethod ¶
func (siw *ServerInterfaceWrapper) DetachCustomerPaymentMethod(w http.ResponseWriter, r *http.Request)
DetachCustomerPaymentMethod operation middleware
func (*ServerInterfaceWrapper) DiscardHeldUsage ¶
func (siw *ServerInterfaceWrapper) DiscardHeldUsage(w http.ResponseWriter, r *http.Request)
DiscardHeldUsage operation middleware
func (*ServerInterfaceWrapper) DisconnectStripe ¶
func (siw *ServerInterfaceWrapper) DisconnectStripe(w http.ResponseWriter, r *http.Request)
DisconnectStripe operation middleware
func (*ServerInterfaceWrapper) EndSubscriptionTrial ¶
func (siw *ServerInterfaceWrapper) EndSubscriptionTrial(w http.ResponseWriter, r *http.Request)
EndSubscriptionTrial operation middleware
func (*ServerInterfaceWrapper) ExportAuditLogCsv ¶
func (siw *ServerInterfaceWrapper) ExportAuditLogCsv(w http.ResponseWriter, r *http.Request)
ExportAuditLogCsv operation middleware
func (*ServerInterfaceWrapper) ExportCustomersCsv ¶
func (siw *ServerInterfaceWrapper) ExportCustomersCsv(w http.ResponseWriter, r *http.Request)
ExportCustomersCsv operation middleware
func (*ServerInterfaceWrapper) ExportInvoicesCsv ¶
func (siw *ServerInterfaceWrapper) ExportInvoicesCsv(w http.ResponseWriter, r *http.Request)
ExportInvoicesCsv operation middleware
func (*ServerInterfaceWrapper) ExportSubscriptionsCsv ¶
func (siw *ServerInterfaceWrapper) ExportSubscriptionsCsv(w http.ResponseWriter, r *http.Request)
ExportSubscriptionsCsv operation middleware
func (*ServerInterfaceWrapper) ExportUsageEventsCsv ¶
func (siw *ServerInterfaceWrapper) ExportUsageEventsCsv(w http.ResponseWriter, r *http.Request)
ExportUsageEventsCsv operation middleware
func (*ServerInterfaceWrapper) ExtendSubscriptionTrial ¶
func (siw *ServerInterfaceWrapper) ExtendSubscriptionTrial(w http.ResponseWriter, r *http.Request)
ExtendSubscriptionTrial operation middleware
func (*ServerInterfaceWrapper) GetAnalyticsMrrMovement ¶
func (siw *ServerInterfaceWrapper) GetAnalyticsMrrMovement(w http.ResponseWriter, r *http.Request)
GetAnalyticsMrrMovement operation middleware
func (*ServerInterfaceWrapper) GetAnalyticsOverview ¶
func (siw *ServerInterfaceWrapper) GetAnalyticsOverview(w http.ResponseWriter, r *http.Request)
GetAnalyticsOverview operation middleware
func (*ServerInterfaceWrapper) GetAnalyticsRevenueChart ¶
func (siw *ServerInterfaceWrapper) GetAnalyticsRevenueChart(w http.ResponseWriter, r *http.Request)
GetAnalyticsRevenueChart operation middleware
func (*ServerInterfaceWrapper) GetAnalyticsUsage ¶
func (siw *ServerInterfaceWrapper) GetAnalyticsUsage(w http.ResponseWriter, r *http.Request)
GetAnalyticsUsage operation middleware
func (*ServerInterfaceWrapper) GetAuditLogFilters ¶
func (siw *ServerInterfaceWrapper) GetAuditLogFilters(w http.ResponseWriter, r *http.Request)
GetAuditLogFilters operation middleware
func (*ServerInterfaceWrapper) GetCreditNote ¶
func (siw *ServerInterfaceWrapper) GetCreditNote(w http.ResponseWriter, r *http.Request)
GetCreditNote operation middleware
func (*ServerInterfaceWrapper) GetCreditNotePdf ¶
func (siw *ServerInterfaceWrapper) GetCreditNotePdf(w http.ResponseWriter, r *http.Request)
GetCreditNotePdf operation middleware
func (*ServerInterfaceWrapper) GetCreditNoteStats ¶
func (siw *ServerInterfaceWrapper) GetCreditNoteStats(w http.ResponseWriter, r *http.Request)
GetCreditNoteStats operation middleware
func (*ServerInterfaceWrapper) GetCustomer ¶
func (siw *ServerInterfaceWrapper) GetCustomer(w http.ResponseWriter, r *http.Request)
GetCustomer operation middleware
func (*ServerInterfaceWrapper) GetCustomerBillingProfile ¶
func (siw *ServerInterfaceWrapper) GetCustomerBillingProfile(w http.ResponseWriter, r *http.Request)
GetCustomerBillingProfile operation middleware
func (*ServerInterfaceWrapper) GetCustomerOverview ¶
func (siw *ServerInterfaceWrapper) GetCustomerOverview(w http.ResponseWriter, r *http.Request)
GetCustomerOverview operation middleware
func (*ServerInterfaceWrapper) GetCustomerUsage ¶
func (siw *ServerInterfaceWrapper) GetCustomerUsage(w http.ResponseWriter, r *http.Request)
GetCustomerUsage operation middleware
func (*ServerInterfaceWrapper) GetDunningPolicy ¶
func (siw *ServerInterfaceWrapper) GetDunningPolicy(w http.ResponseWriter, r *http.Request)
GetDunningPolicy operation middleware
func (*ServerInterfaceWrapper) GetDunningRun ¶
func (siw *ServerInterfaceWrapper) GetDunningRun(w http.ResponseWriter, r *http.Request)
GetDunningRun operation middleware
func (*ServerInterfaceWrapper) GetDunningStats ¶
func (siw *ServerInterfaceWrapper) GetDunningStats(w http.ResponseWriter, r *http.Request)
GetDunningStats operation middleware
func (*ServerInterfaceWrapper) GetEmailSettings ¶
func (siw *ServerInterfaceWrapper) GetEmailSettings(w http.ResponseWriter, r *http.Request)
GetEmailSettings operation middleware
func (*ServerInterfaceWrapper) GetHealth ¶
func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
GetHealth operation middleware
func (*ServerInterfaceWrapper) GetHealthReady ¶
func (siw *ServerInterfaceWrapper) GetHealthReady(w http.ResponseWriter, r *http.Request)
GetHealthReady operation middleware
func (*ServerInterfaceWrapper) GetHostedInvoice ¶
func (siw *ServerInterfaceWrapper) GetHostedInvoice(w http.ResponseWriter, r *http.Request)
GetHostedInvoice operation middleware
func (*ServerInterfaceWrapper) GetHostedInvoicePdf ¶
func (siw *ServerInterfaceWrapper) GetHostedInvoicePdf(w http.ResponseWriter, r *http.Request)
GetHostedInvoicePdf operation middleware
func (*ServerInterfaceWrapper) GetInvoice ¶
func (siw *ServerInterfaceWrapper) GetInvoice(w http.ResponseWriter, r *http.Request)
GetInvoice operation middleware
func (*ServerInterfaceWrapper) GetInvoicePaymentTimeline ¶
func (siw *ServerInterfaceWrapper) GetInvoicePaymentTimeline(w http.ResponseWriter, r *http.Request)
GetInvoicePaymentTimeline operation middleware
func (*ServerInterfaceWrapper) GetMeter ¶
func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)
GetMeter operation middleware
func (*ServerInterfaceWrapper) GetMetrics ¶
func (siw *ServerInterfaceWrapper) GetMetrics(w http.ResponseWriter, r *http.Request)
GetMetrics operation middleware
func (*ServerInterfaceWrapper) GetPlan ¶
func (siw *ServerInterfaceWrapper) GetPlan(w http.ResponseWriter, r *http.Request)
GetPlan operation middleware
func (*ServerInterfaceWrapper) GetPublicPaymentUpdate ¶
func (siw *ServerInterfaceWrapper) GetPublicPaymentUpdate(w http.ResponseWriter, r *http.Request)
GetPublicPaymentUpdate operation middleware
func (*ServerInterfaceWrapper) GetRecipe ¶
func (siw *ServerInterfaceWrapper) GetRecipe(w http.ResponseWriter, r *http.Request)
GetRecipe operation middleware
func (*ServerInterfaceWrapper) GetSubscription ¶
func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request)
GetSubscription operation middleware
func (*ServerInterfaceWrapper) GetSubscriptionTimeline ¶
func (siw *ServerInterfaceWrapper) GetSubscriptionTimeline(w http.ResponseWriter, r *http.Request)
GetSubscriptionTimeline operation middleware
func (*ServerInterfaceWrapper) GetTenant ¶
func (siw *ServerInterfaceWrapper) GetTenant(w http.ResponseWriter, r *http.Request)
GetTenant operation middleware
func (*ServerInterfaceWrapper) GetTenantSettings ¶
func (siw *ServerInterfaceWrapper) GetTenantSettings(w http.ResponseWriter, r *http.Request)
GetTenantSettings operation middleware
func (*ServerInterfaceWrapper) GetV1AuthInviteToken ¶
func (siw *ServerInterfaceWrapper) GetV1AuthInviteToken(w http.ResponseWriter, r *http.Request)
GetV1AuthInviteToken operation middleware
func (*ServerInterfaceWrapper) GetV1CreditsBalanceCustomerId ¶
func (siw *ServerInterfaceWrapper) GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request)
GetV1CreditsBalanceCustomerId operation middleware
func (*ServerInterfaceWrapper) GetV1CreditsBalanceCustomerIdLive ¶
func (siw *ServerInterfaceWrapper) GetV1CreditsBalanceCustomerIdLive(w http.ResponseWriter, r *http.Request)
GetV1CreditsBalanceCustomerIdLive operation middleware
func (*ServerInterfaceWrapper) GetV1CreditsGrantsCustomerId ¶
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) 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) 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) GetWebhookEndpoint ¶
func (siw *ServerInterfaceWrapper) GetWebhookEndpoint(w http.ResponseWriter, r *http.Request)
GetWebhookEndpoint operation middleware
func (*ServerInterfaceWrapper) GetWebhookEndpointStats ¶
func (siw *ServerInterfaceWrapper) GetWebhookEndpointStats(w http.ResponseWriter, r *http.Request)
GetWebhookEndpointStats operation middleware
func (*ServerInterfaceWrapper) IngestLitellmSpend ¶
func (siw *ServerInterfaceWrapper) IngestLitellmSpend(w http.ResponseWriter, r *http.Request)
IngestLitellmSpend operation middleware
func (*ServerInterfaceWrapper) InstantiateRecipe ¶
func (siw *ServerInterfaceWrapper) InstantiateRecipe(w http.ResponseWriter, r *http.Request)
InstantiateRecipe operation middleware
func (*ServerInterfaceWrapper) InviteMember ¶
func (siw *ServerInterfaceWrapper) InviteMember(w http.ResponseWriter, r *http.Request)
InviteMember operation middleware
func (*ServerInterfaceWrapper) IssueCreditNote ¶
func (siw *ServerInterfaceWrapper) IssueCreditNote(w http.ResponseWriter, r *http.Request)
IssueCreditNote operation middleware
func (*ServerInterfaceWrapper) ListApiKeys ¶
func (siw *ServerInterfaceWrapper) ListApiKeys(w http.ResponseWriter, r *http.Request)
ListApiKeys operation middleware
func (*ServerInterfaceWrapper) ListAuditLog ¶
func (siw *ServerInterfaceWrapper) ListAuditLog(w http.ResponseWriter, r *http.Request)
ListAuditLog operation middleware
func (*ServerInterfaceWrapper) ListCreditBalances ¶
func (siw *ServerInterfaceWrapper) ListCreditBalances(w http.ResponseWriter, r *http.Request)
ListCreditBalances operation middleware
func (*ServerInterfaceWrapper) ListCreditLedgerEntries ¶
func (siw *ServerInterfaceWrapper) ListCreditLedgerEntries(w http.ResponseWriter, r *http.Request)
ListCreditLedgerEntries operation middleware
func (*ServerInterfaceWrapper) ListCreditNotes ¶
func (siw *ServerInterfaceWrapper) ListCreditNotes(w http.ResponseWriter, r *http.Request)
ListCreditNotes operation middleware
func (*ServerInterfaceWrapper) ListCustomerPaymentMethods ¶
func (siw *ServerInterfaceWrapper) ListCustomerPaymentMethods(w http.ResponseWriter, r *http.Request)
ListCustomerPaymentMethods operation middleware
func (*ServerInterfaceWrapper) ListCustomerSentEmails ¶
func (siw *ServerInterfaceWrapper) ListCustomerSentEmails(w http.ResponseWriter, r *http.Request)
ListCustomerSentEmails operation middleware
func (*ServerInterfaceWrapper) ListDunningPolicies ¶
func (siw *ServerInterfaceWrapper) ListDunningPolicies(w http.ResponseWriter, r *http.Request)
ListDunningPolicies operation middleware
func (*ServerInterfaceWrapper) ListDunningRuns ¶
func (siw *ServerInterfaceWrapper) ListDunningRuns(w http.ResponseWriter, r *http.Request)
ListDunningRuns operation middleware
func (*ServerInterfaceWrapper) ListHeldUsage ¶
func (siw *ServerInterfaceWrapper) ListHeldUsage(w http.ResponseWriter, r *http.Request)
ListHeldUsage operation middleware
func (*ServerInterfaceWrapper) ListInvoiceDisputes ¶
func (siw *ServerInterfaceWrapper) ListInvoiceDisputes(w http.ResponseWriter, r *http.Request)
ListInvoiceDisputes operation middleware
func (*ServerInterfaceWrapper) ListMembers ¶
func (siw *ServerInterfaceWrapper) ListMembers(w http.ResponseWriter, r *http.Request)
ListMembers operation middleware
func (*ServerInterfaceWrapper) ListPlanPrices ¶
func (siw *ServerInterfaceWrapper) ListPlanPrices(w http.ResponseWriter, r *http.Request)
ListPlanPrices operation middleware
func (*ServerInterfaceWrapper) ListPriceOverrides ¶
func (siw *ServerInterfaceWrapper) ListPriceOverrides(w http.ResponseWriter, r *http.Request)
ListPriceOverrides operation middleware
func (*ServerInterfaceWrapper) ListRecipeInstances ¶
func (siw *ServerInterfaceWrapper) ListRecipeInstances(w http.ResponseWriter, r *http.Request)
ListRecipeInstances operation middleware
func (*ServerInterfaceWrapper) ListRecipes ¶
func (siw *ServerInterfaceWrapper) ListRecipes(w http.ResponseWriter, r *http.Request)
ListRecipes operation middleware
func (*ServerInterfaceWrapper) ListStripeConnections ¶
func (siw *ServerInterfaceWrapper) ListStripeConnections(w http.ResponseWriter, r *http.Request)
ListStripeConnections operation middleware
func (*ServerInterfaceWrapper) ListTenants ¶
func (siw *ServerInterfaceWrapper) ListTenants(w http.ResponseWriter, r *http.Request)
ListTenants operation middleware
func (*ServerInterfaceWrapper) ListTestClockCustomers ¶
func (siw *ServerInterfaceWrapper) ListTestClockCustomers(w http.ResponseWriter, r *http.Request)
ListTestClockCustomers operation middleware
func (*ServerInterfaceWrapper) ListWebhookEndpointDeliveries ¶
func (siw *ServerInterfaceWrapper) ListWebhookEndpointDeliveries(w http.ResponseWriter, r *http.Request)
ListWebhookEndpointDeliveries operation middleware
func (*ServerInterfaceWrapper) ListWebhookEventDeliveries ¶
func (siw *ServerInterfaceWrapper) ListWebhookEventDeliveries(w http.ResponseWriter, r *http.Request)
ListWebhookEventDeliveries operation middleware
func (*ServerInterfaceWrapper) MarkInvoiceUncollectible ¶
func (siw *ServerInterfaceWrapper) MarkInvoiceUncollectible(w http.ResponseWriter, r *http.Request)
MarkInvoiceUncollectible 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) PauseSubscriptionCollection ¶
func (siw *ServerInterfaceWrapper) PauseSubscriptionCollection(w http.ResponseWriter, r *http.Request)
PauseSubscriptionCollection operation middleware
func (*ServerInterfaceWrapper) PostV1AuthAcceptInvite ¶
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 ¶
func (siw *ServerInterfaceWrapper) PostV1CreditNotes(w http.ResponseWriter, r *http.Request)
PostV1CreditNotes operation middleware
func (*ServerInterfaceWrapper) PostV1CreditNotesIdSend ¶
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 ¶
func (siw *ServerInterfaceWrapper) PostV1InvoicesIdSend(w http.ResponseWriter, r *http.Request)
PostV1InvoicesIdSend 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) 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) PostV1SubscriptionsIdRetryBilling ¶
func (siw *ServerInterfaceWrapper) PostV1SubscriptionsIdRetryBilling(w http.ResponseWriter, r *http.Request)
PostV1SubscriptionsIdRetryBilling 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 ¶
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 ¶
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
func (*ServerInterfaceWrapper) ReceivePostmarkWebhook ¶
func (siw *ServerInterfaceWrapper) ReceivePostmarkWebhook(w http.ResponseWriter, r *http.Request)
ReceivePostmarkWebhook operation middleware
func (*ServerInterfaceWrapper) ReceiveStripeWebhook ¶
func (siw *ServerInterfaceWrapper) ReceiveStripeWebhook(w http.ResponseWriter, r *http.Request)
ReceiveStripeWebhook operation middleware
func (*ServerInterfaceWrapper) RecordInvoicePayment ¶
func (siw *ServerInterfaceWrapper) RecordInvoicePayment(w http.ResponseWriter, r *http.Request)
RecordInvoicePayment operation middleware
func (*ServerInterfaceWrapper) RefundInvoice ¶
func (siw *ServerInterfaceWrapper) RefundInvoice(w http.ResponseWriter, r *http.Request)
RefundInvoice operation middleware
func (*ServerInterfaceWrapper) ReleaseHeldUsage ¶
func (siw *ServerInterfaceWrapper) ReleaseHeldUsage(w http.ResponseWriter, r *http.Request)
ReleaseHeldUsage operation middleware
func (*ServerInterfaceWrapper) RemoveMember ¶
func (siw *ServerInterfaceWrapper) RemoveMember(w http.ResponseWriter, r *http.Request)
RemoveMember operation middleware
func (*ServerInterfaceWrapper) RemovePlanPrice ¶
func (siw *ServerInterfaceWrapper) RemovePlanPrice(w http.ResponseWriter, r *http.Request)
RemovePlanPrice operation middleware
func (*ServerInterfaceWrapper) RemoveSubscriptionItem ¶
func (siw *ServerInterfaceWrapper) RemoveSubscriptionItem(w http.ResponseWriter, r *http.Request)
RemoveSubscriptionItem operation middleware
func (*ServerInterfaceWrapper) ReplayWebhookDelivery ¶
func (siw *ServerInterfaceWrapper) ReplayWebhookDelivery(w http.ResponseWriter, r *http.Request)
ReplayWebhookDelivery operation middleware
func (*ServerInterfaceWrapper) ReplayWebhookEvent ¶
func (siw *ServerInterfaceWrapper) ReplayWebhookEvent(w http.ResponseWriter, r *http.Request)
ReplayWebhookEvent operation middleware
func (*ServerInterfaceWrapper) ResendInvoiceSetupLink ¶
func (siw *ServerInterfaceWrapper) ResendInvoiceSetupLink(w http.ResponseWriter, r *http.Request)
ResendInvoiceSetupLink operation middleware
func (*ServerInterfaceWrapper) ResolveDunningRun ¶
func (siw *ServerInterfaceWrapper) ResolveDunningRun(w http.ResponseWriter, r *http.Request)
ResolveDunningRun operation middleware
func (*ServerInterfaceWrapper) ResumeSubscriptionCollection ¶
func (siw *ServerInterfaceWrapper) ResumeSubscriptionCollection(w http.ResponseWriter, r *http.Request)
ResumeSubscriptionCollection operation middleware
func (*ServerInterfaceWrapper) RetryCreditNoteRefund ¶
func (siw *ServerInterfaceWrapper) RetryCreditNoteRefund(w http.ResponseWriter, r *http.Request)
RetryCreditNoteRefund operation middleware
func (*ServerInterfaceWrapper) RevokeApiKey ¶
func (siw *ServerInterfaceWrapper) RevokeApiKey(w http.ResponseWriter, r *http.Request)
RevokeApiKey operation middleware
func (*ServerInterfaceWrapper) RevokeMemberInvitation ¶
func (siw *ServerInterfaceWrapper) RevokeMemberInvitation(w http.ResponseWriter, r *http.Request)
RevokeMemberInvitation operation middleware
func (*ServerInterfaceWrapper) RotateApiKey ¶
func (siw *ServerInterfaceWrapper) RotateApiKey(w http.ResponseWriter, r *http.Request)
RotateApiKey operation middleware
func (*ServerInterfaceWrapper) RotateInvoicePublicToken ¶
func (siw *ServerInterfaceWrapper) RotateInvoicePublicToken(w http.ResponseWriter, r *http.Request)
RotateInvoicePublicToken operation middleware
func (*ServerInterfaceWrapper) ScheduleSubscriptionCancel ¶
func (siw *ServerInterfaceWrapper) ScheduleSubscriptionCancel(w http.ResponseWriter, r *http.Request)
ScheduleSubscriptionCancel operation middleware
func (*ServerInterfaceWrapper) SendCustomerPaymentSetupEmail ¶
func (siw *ServerInterfaceWrapper) SendCustomerPaymentSetupEmail(w http.ResponseWriter, r *http.Request)
SendCustomerPaymentSetupEmail operation middleware
func (*ServerInterfaceWrapper) SendTestEmail ¶
func (siw *ServerInterfaceWrapper) SendTestEmail(w http.ResponseWriter, r *http.Request)
SendTestEmail operation middleware
func (*ServerInterfaceWrapper) SetCustomerDefaultPaymentMethod ¶
func (siw *ServerInterfaceWrapper) SetCustomerDefaultPaymentMethod(w http.ResponseWriter, r *http.Request)
SetCustomerDefaultPaymentMethod operation middleware
func (*ServerInterfaceWrapper) SetDefaultDunningPolicy ¶
func (siw *ServerInterfaceWrapper) SetDefaultDunningPolicy(w http.ResponseWriter, r *http.Request)
SetDefaultDunningPolicy operation middleware
func (*ServerInterfaceWrapper) SetStripeWebhookSecret ¶
func (siw *ServerInterfaceWrapper) SetStripeWebhookSecret(w http.ResponseWriter, r *http.Request)
SetStripeWebhookSecret operation middleware
func (*ServerInterfaceWrapper) SetSubscriptionBillingThresholds ¶
func (siw *ServerInterfaceWrapper) SetSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request)
SetSubscriptionBillingThresholds operation middleware
func (*ServerInterfaceWrapper) StreamWebhookEvents ¶
func (siw *ServerInterfaceWrapper) StreamWebhookEvents(w http.ResponseWriter, r *http.Request)
StreamWebhookEvents operation middleware
func (*ServerInterfaceWrapper) UpdateCustomer ¶
func (siw *ServerInterfaceWrapper) UpdateCustomer(w http.ResponseWriter, r *http.Request)
UpdateCustomer operation middleware
func (*ServerInterfaceWrapper) UpdateDunningPolicy ¶
func (siw *ServerInterfaceWrapper) UpdateDunningPolicy(w http.ResponseWriter, r *http.Request)
UpdateDunningPolicy operation middleware
func (*ServerInterfaceWrapper) UpdatePlan ¶
func (siw *ServerInterfaceWrapper) UpdatePlan(w http.ResponseWriter, r *http.Request)
UpdatePlan operation middleware
func (*ServerInterfaceWrapper) UpdatePlanPrice ¶
func (siw *ServerInterfaceWrapper) UpdatePlanPrice(w http.ResponseWriter, r *http.Request)
UpdatePlanPrice operation middleware
func (*ServerInterfaceWrapper) UpdateSubscriptionItem ¶
func (siw *ServerInterfaceWrapper) UpdateSubscriptionItem(w http.ResponseWriter, r *http.Request)
UpdateSubscriptionItem operation middleware
func (*ServerInterfaceWrapper) UpdateTenantSettings ¶
func (siw *ServerInterfaceWrapper) UpdateTenantSettings(w http.ResponseWriter, r *http.Request)
UpdateTenantSettings operation middleware
func (*ServerInterfaceWrapper) UpsertCustomerBillingProfile ¶
func (siw *ServerInterfaceWrapper) UpsertCustomerBillingProfile(w http.ResponseWriter, r *http.Request)
UpsertCustomerBillingProfile operation middleware
func (*ServerInterfaceWrapper) VoidCreditNote ¶
func (siw *ServerInterfaceWrapper) VoidCreditNote(w http.ResponseWriter, r *http.Request)
VoidCreditNote operation middleware
func (*ServerInterfaceWrapper) VoidInvoice ¶
func (siw *ServerInterfaceWrapper) VoidInvoice(w http.ResponseWriter, r *http.Request)
VoidInvoice operation middleware
type SetCustomerDefaultPaymentMethodParams ¶
type SetCustomerDefaultPaymentMethodParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
SetCustomerDefaultPaymentMethodParams defines parameters for SetCustomerDefaultPaymentMethod.
type SetDefaultDunningPolicy200JSONResponseBodyStatus ¶
type SetDefaultDunningPolicy200JSONResponseBodyStatus string
SetDefaultDunningPolicy200JSONResponseBodyStatus defines parameters for SetDefaultDunningPolicy.
const (
DefaultUpdated SetDefaultDunningPolicy200JSONResponseBodyStatus = "default_updated"
)
Defines values for SetDefaultDunningPolicy200JSONResponseBodyStatus.
func (SetDefaultDunningPolicy200JSONResponseBodyStatus) Valid ¶
func (e SetDefaultDunningPolicy200JSONResponseBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the SetDefaultDunningPolicy200JSONResponseBodyStatus enum.
type SetDefaultDunningPolicyParams ¶
type SetDefaultDunningPolicyParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
SetDefaultDunningPolicyParams defines parameters for SetDefaultDunningPolicy.
type SetStripeWebhookSecretJSONBody ¶
type SetStripeWebhookSecretJSONBody struct {
// WebhookSecret Must start with `whsec_`.
WebhookSecret string `json:"webhook_secret"`
}
SetStripeWebhookSecretJSONBody defines parameters for SetStripeWebhookSecret.
type SetStripeWebhookSecretJSONRequestBody ¶
type SetStripeWebhookSecretJSONRequestBody SetStripeWebhookSecretJSONBody
SetStripeWebhookSecretJSONRequestBody defines body for SetStripeWebhookSecret for application/json ContentType.
type SetStripeWebhookSecretParams ¶
type SetStripeWebhookSecretParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
SetStripeWebhookSecretParams defines parameters for SetStripeWebhookSecret.
type SetStripeWebhookSecretParamsMode ¶
type SetStripeWebhookSecretParamsMode string
SetStripeWebhookSecretParamsMode defines parameters for SetStripeWebhookSecret.
const ( SetStripeWebhookSecretParamsModeLive SetStripeWebhookSecretParamsMode = "live" SetStripeWebhookSecretParamsModeTest SetStripeWebhookSecretParamsMode = "test" )
Defines values for SetStripeWebhookSecretParamsMode.
func (SetStripeWebhookSecretParamsMode) Valid ¶
func (e SetStripeWebhookSecretParamsMode) Valid() bool
Valid indicates whether the value is a known member of the SetStripeWebhookSecretParamsMode enum.
type SetSubscriptionBillingThresholdsJSONBody ¶
type SetSubscriptionBillingThresholdsJSONBody struct {
// AmountGte Invoice early when the period's usage so far reaches this amount, in cents of the subscription's currency. The base fee is not counted.
AmountGte int64 `json:"amount_gte,omitempty"`
ItemThresholds []struct {
// SubscriptionItemId An item of this subscription. Each item can appear once.
SubscriptionItemId string `json:"subscription_item_id"`
// UsageGte Invoice early when the item's usage in the period reaches this quantity. A decimal string (e.g. "1000" or "3.14"): more than 0, under 10^26, at most 12 decimal places (trailing zeros do not count), and at most 100 characters.
UsageGte string `json:"usage_gte"`
} `json:"item_thresholds,omitempty"`
}
SetSubscriptionBillingThresholdsJSONBody defines parameters for SetSubscriptionBillingThresholds.
type SetSubscriptionBillingThresholdsJSONRequestBody ¶
type SetSubscriptionBillingThresholdsJSONRequestBody SetSubscriptionBillingThresholdsJSONBody
SetSubscriptionBillingThresholdsJSONRequestBody defines body for SetSubscriptionBillingThresholds for application/json ContentType.
type SetSubscriptionBillingThresholdsParams ¶
type SetSubscriptionBillingThresholdsParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
SetSubscriptionBillingThresholdsParams defines parameters for SetSubscriptionBillingThresholds.
type StripeConnection ¶
type StripeConnection struct {
CreatedAt time.Time `json:"created_at"`
HasWebhookSecret bool `json:"has_webhook_secret"`
// Id Also the `{id}` in the Stripe webhook URL `/v1/webhooks/stripe/{id}`.
Id string `json:"id"`
// LastVerifiedError Why the last Stripe check failed, in Stripe's own words (or the
// network error when Stripe was not reached). Empty when it passed.
LastVerifiedError string `json:"last_verified_error,omitempty"`
// LastVerifiedErrorKind What kind of failure `last_verified_error` is. `rejected`: Stripe
// answered and refused the key (invalid, revoked, or without access).
// `unavailable`: Stripe was not reached, or answered 429/5xx, so the
// key was not checked; connecting again may work. Absent when the
// check passed, and on keys that failed before this field existed.
LastVerifiedErrorKind StripeConnectionLastVerifiedErrorKind `json:"last_verified_error_kind,omitempty"`
Livemode bool `json:"livemode"`
PublishableKey string `json:"publishable_key"`
// RetriesQueued Connect response only. Number of stuck invoices being retried in the background.
RetriesQueued int `json:"retries_queued,omitempty"`
SecretKeyLast4 string `json:"secret_key_last4"`
// SecretKeyPrefix First 12 characters of the secret key.
SecretKeyPrefix string `json:"secret_key_prefix,omitempty"`
// StripeAccountId Set after Stripe accepted the key.
StripeAccountId string `json:"stripe_account_id,omitempty"`
StripeAccountName string `json:"stripe_account_name,omitempty"`
TenantId string `json:"tenant_id"`
UpdatedAt time.Time `json:"updated_at"`
// VerifiedAt Last time Stripe accepted the key.
VerifiedAt time.Time `json:"verified_at,omitempty"`
WebhookSecretLast4 string `json:"webhook_secret_last4,omitempty"`
}
StripeConnection defines model for StripeConnection.
type StripeConnectionLastVerifiedErrorKind ¶
type StripeConnectionLastVerifiedErrorKind string
StripeConnectionLastVerifiedErrorKind What kind of failure `last_verified_error` is. `rejected`: Stripe answered and refused the key (invalid, revoked, or without access). `unavailable`: Stripe was not reached, or answered 429/5xx, so the key was not checked; connecting again may work. Absent when the check passed, and on keys that failed before this field existed.
const ( Rejected StripeConnectionLastVerifiedErrorKind = "rejected" )
Defines values for StripeConnectionLastVerifiedErrorKind.
func (StripeConnectionLastVerifiedErrorKind) Valid ¶
func (e StripeConnectionLastVerifiedErrorKind) Valid() bool
Valid indicates whether the value is a known member of the StripeConnectionLastVerifiedErrorKind enum.
type Subscription ¶
type Subscription struct {
ActivatedAt time.Time `json:"activated_at,omitempty"`
// BillingAnchorDay Day of the month the subscription bills on (1-31). Absent for calendar-monthly subscriptions.
BillingAnchorDay int `json:"billing_anchor_day,omitempty"`
// BillingFailure Present on a subscription while the billing run is failing on the
// work that subscription has due now (a period close, or a scheduled
// mid-period cancel). Absent otherwise: a subscription that bills
// cleanly, or whose due work changed, carries no `billing_failure`.
//
// After each failed attempt the billing run waits before the next one:
// 15 minutes, 1 hour, 4 hours, 12 hours, then 24 hours three times.
// The eighth failure parks the subscription (`parked: true`, no
// `next_attempt_at`). A parked subscription is not attempted again
// until `POST /v1/subscriptions/{id}/retry-billing` is called.
//
// Never set on a subscription attached to a test clock.
BillingFailure BillingFailure `json:"billing_failure,omitempty"`
// BillingThresholds Limits that make Hardcount invoice before the period ends. A threshold
// invoice bills the period's usage so far, and no base fee. The period
// keeps its dates, the base fee is billed as it would be with no
// threshold, and the period's next invoice bills the rest of the usage.
BillingThresholds SubscriptionBillingThresholds `json:"billing_thresholds,omitempty"`
BillingTime SubscriptionBillingTime `json:"billing_time"`
// CancelAt A scheduled cancel time, if one is set.
CancelAt time.Time `json:"cancel_at,omitempty"`
// CancelAtPeriodEnd True when the subscription cancels at the end of the current period.
CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
// CancelEffectiveAt When a scheduled cancel takes effect. Absent when no cancel is scheduled.
CancelEffectiveAt time.Time `json:"cancel_effective_at,omitempty"`
// CanceledAt When the subscription was canceled. Absent until then.
CanceledAt time.Time `json:"canceled_at,omitempty"`
Code string `json:"code"`
CreatedAt time.Time `json:"created_at"`
// CurrentBillingPeriodDisplay The current period as text, with the last day included, in the tenant's billing time zone.
CurrentBillingPeriodDisplay string `json:"current_billing_period_display,omitempty"`
// CurrentBillingPeriodEnd End of the current period (exclusive).
CurrentBillingPeriodEnd time.Time `json:"current_billing_period_end,omitempty"`
CurrentBillingPeriodStart time.Time `json:"current_billing_period_start,omitempty"`
CustomerId string `json:"customer_id"`
DisplayName string `json:"display_name"`
Id string `json:"id"`
// Items The subscription's priced lines. Each item names its plan.
Items []SubscriptionItem `json:"items,omitempty"`
NextBillingAt time.Time `json:"next_billing_at,omitempty"`
// PauseCollection Present on a subscription while collection is paused. New invoices
// are still created, but stay drafts and are not charged.
PauseCollection SubscriptionPauseCollection `json:"pause_collection,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
Status SubscriptionStatus `json:"status"`
TenantId string `json:"tenant_id,omitempty"`
TestClockId string `json:"test_clock_id,omitempty"`
TrialEndAt time.Time `json:"trial_end_at,omitempty"`
TrialStartAt time.Time `json:"trial_start_at,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
Subscription defines model for Subscription.
type SubscriptionBillingThresholds ¶
type SubscriptionBillingThresholds struct {
// AmountGte Usage threshold in cents, compared with the period's usage so far (the base fee is not counted). Absent when not set.
AmountGte int64 `json:"amount_gte,omitempty"`
ItemThresholds []SubscriptionItemThreshold `json:"item_thresholds"`
}
SubscriptionBillingThresholds Limits that make Hardcount invoice before the period ends. A threshold invoice bills the period's usage so far, and no base fee. The period keeps its dates, the base fee is billed as it would be with no threshold, and the period's next invoice bills the rest of the usage.
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 SubscriptionItem ¶
type SubscriptionItem struct {
CreatedAt time.Time `json:"created_at"`
Id string `json:"id"`
// Metadata The item's stored metadata. Absent when empty.
Metadata map[string]interface{} `json:"metadata,omitempty"`
PendingPlanEffectiveAt time.Time `json:"pending_plan_effective_at,omitempty"`
// PendingPlanId Plan the item moves to at `pending_plan_effective_at`. Absent when no change is scheduled.
PendingPlanId string `json:"pending_plan_id,omitempty"`
// PlanChangedAt When the plan was last changed immediately. Absent until the first such change.
PlanChangedAt time.Time `json:"plan_changed_at,omitempty"`
PlanId string `json:"plan_id"`
Quantity int64 `json:"quantity"`
SubscriptionId string `json:"subscription_id"`
TenantId string `json:"tenant_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
SubscriptionItem One priced line of a subscription. It pairs a plan with a quantity.
type SubscriptionItemChangeResult ¶
type SubscriptionItemChangeResult struct {
// EffectiveAt When the change takes effect. For a scheduled plan change, the end of the current period.
EffectiveAt time.Time `json:"effective_at"`
// Item One priced line of a subscription. It pairs a plan with a quantity.
Item SubscriptionItem `json:"item"`
// NewPeriodInvoice The invoice an immediate change to a plan with another billing
// interval created for the new period it starts.
NewPeriodInvoice SubscriptionNewPeriodInvoice `json:"new_period_invoice,omitempty"`
// Proration What Hardcount did to settle the rest of the period for an item change.
Proration SubscriptionItemProration `json:"proration,omitempty"`
}
SubscriptionItemChangeResult defines model for SubscriptionItemChangeResult.
type SubscriptionItemProration ¶
type SubscriptionItemProration struct {
// AmountCents Gross amount, tax included: the invoice total (`invoice`), or
// the whole credit for unused time (`credit` and `adjustment`).
// `credited_to_balance_cents`, `reduced_open_invoices_cents` and
// `held_on_draft_invoices_cents` say where the credit went.
AmountCents int64 `json:"amount_cents"`
// CreditedToBalanceCents The part of the credit added to the customer's balance, tax
// included. On a paid invoice, all of its part. On an open invoice
// paid partly with credits, the part above what it still asks for:
// those credits go back to the balance. A part on an invoice whose
// payment is still processing counts here; if that payment fails,
// it reduces the invoice instead. 0 when `type` is `invoice`.
CreditedToBalanceCents int64 `json:"credited_to_balance_cents"`
// HeldOnDraftInvoicesCents The part of the credit on draft invoices, tax included. It is
// held until the draft is finalized, then applied by how the
// invoice stands: if paid, to the customer's balance; if still
// open, off what it asks for first, as above. 0 when `type` is
// `invoice`.
HeldOnDraftInvoicesCents int64 `json:"held_on_draft_invoices_cents"`
// InvoiceId The proration invoice. Present when `type` is `invoice`.
InvoiceId string `json:"invoice_id,omitempty"`
NewPlanId string `json:"new_plan_id"`
OldPlanId string `json:"old_plan_id"`
// ProrationFactor Share of the full billing cycle that was left, from 0 to 1.
ProrationFactor float64 `json:"proration_factor"`
// ReducedOpenInvoicesCents The part of the credit taken off the amount due on open
// invoices, tax included. 0 when `type` is `invoice`.
ReducedOpenInvoicesCents int64 `json:"reduced_open_invoices_cents"`
// Type `invoice`: a proration invoice was created. `credit`: some of
// the credit went to the customer's balance, or no invoice had
// room for any of it (`amount_cents` is then 0). `adjustment`:
// none of it went to the balance.
Type SubscriptionItemProrationType `json:"type"`
}
SubscriptionItemProration What Hardcount did to settle the rest of the period for an item change.
type SubscriptionItemProrationType ¶
type SubscriptionItemProrationType string
SubscriptionItemProrationType `invoice`: a proration invoice was created. `credit`: some of the credit went to the customer's balance, or no invoice had room for any of it (`amount_cents` is then 0). `adjustment`: none of it went to the balance.
const ( SubscriptionItemProrationTypeAdjustment SubscriptionItemProrationType = "adjustment" SubscriptionItemProrationTypeCredit SubscriptionItemProrationType = "credit" SubscriptionItemProrationTypeInvoice SubscriptionItemProrationType = "invoice" )
Defines values for SubscriptionItemProrationType.
func (SubscriptionItemProrationType) Valid ¶
func (e SubscriptionItemProrationType) Valid() bool
Valid indicates whether the value is a known member of the SubscriptionItemProrationType enum.
type SubscriptionItemThreshold ¶
type SubscriptionItemThreshold struct {
SubscriptionItemId string `json:"subscription_item_id"`
// UsageGte Usage quantity threshold, as a decimal string.
UsageGte string `json:"usage_gte"`
}
SubscriptionItemThreshold defines model for SubscriptionItemThreshold.
type SubscriptionNewPeriodInvoice ¶
type SubscriptionNewPeriodInvoice struct {
Currency string `json:"currency"`
Id string `json:"id"`
InvoiceNumber string `json:"invoice_number"`
// Status `draft` when the invoice was not issued yet: collection is
// paused, or its tax could not be calculated yet. Its total may
// then change before it is finalized.
Status SubscriptionNewPeriodInvoiceStatus `json:"status"`
// TotalAmountCents The invoice total when the change created it. On a `draft`
// whose tax could not be calculated yet, it has no tax in it.
TotalAmountCents int64 `json:"total_amount_cents"`
}
SubscriptionNewPeriodInvoice The invoice an immediate change to a plan with another billing interval created for the new period it starts.
type SubscriptionNewPeriodInvoiceStatus ¶
type SubscriptionNewPeriodInvoiceStatus string
SubscriptionNewPeriodInvoiceStatus `draft` when the invoice was not issued yet: collection is paused, or its tax could not be calculated yet. Its total may then change before it is finalized.
const ( SubscriptionNewPeriodInvoiceStatusDraft SubscriptionNewPeriodInvoiceStatus = "draft" SubscriptionNewPeriodInvoiceStatusFinalized SubscriptionNewPeriodInvoiceStatus = "finalized" )
Defines values for SubscriptionNewPeriodInvoiceStatus.
func (SubscriptionNewPeriodInvoiceStatus) Valid ¶
func (e SubscriptionNewPeriodInvoiceStatus) Valid() bool
Valid indicates whether the value is a known member of the SubscriptionNewPeriodInvoiceStatus enum.
type SubscriptionPauseCollection ¶
type SubscriptionPauseCollection struct {
Behavior SubscriptionPauseCollectionBehavior `json:"behavior"`
// ResumesAt When collection resumes. Absent when the pause lasts until it is
// cleared. On a pause set by dunning, it is when Hardcount recorded the
// payment of the invoice the pause was set for.
ResumesAt time.Time `json:"resumes_at,omitempty"`
// SetBy Who paused collection. `operator`: you, through the API or the
// dashboard; the pause lasts until you resume it or until
// `resumes_at`. `dunning`: a dunning policy's `pause` final action.
// A dunning pause lifts by itself once the invoice whose dunning
// set it is paid, even if another invoice is still owed. Periods
// that ended during the pause keep their draft invoices.
SetBy SubscriptionPauseCollectionSetBy `json:"set_by,omitempty"`
}
SubscriptionPauseCollection Present on a subscription while collection is paused. New invoices are still created, but stay drafts and are not charged.
type SubscriptionPauseCollectionBehavior ¶
type SubscriptionPauseCollectionBehavior string
SubscriptionPauseCollectionBehavior defines model for SubscriptionPauseCollection.Behavior.
const (
SubscriptionPauseCollectionBehaviorKeepAsDraft SubscriptionPauseCollectionBehavior = "keep_as_draft"
)
Defines values for SubscriptionPauseCollectionBehavior.
func (SubscriptionPauseCollectionBehavior) Valid ¶
func (e SubscriptionPauseCollectionBehavior) Valid() bool
Valid indicates whether the value is a known member of the SubscriptionPauseCollectionBehavior enum.
type SubscriptionPauseCollectionSetBy ¶
type SubscriptionPauseCollectionSetBy string
SubscriptionPauseCollectionSetBy Who paused collection. `operator`: you, through the API or the dashboard; the pause lasts until you resume it or until `resumes_at`. `dunning`: a dunning policy's `pause` final action. A dunning pause lifts by itself once the invoice whose dunning set it is paid, even if another invoice is still owed. Periods that ended during the pause keep their draft invoices.
const ( Dunning SubscriptionPauseCollectionSetBy = "dunning" Operator SubscriptionPauseCollectionSetBy = "operator" )
Defines values for SubscriptionPauseCollectionSetBy.
func (SubscriptionPauseCollectionSetBy) Valid ¶
func (e SubscriptionPauseCollectionSetBy) Valid() bool
Valid indicates whether the value is a known member of the SubscriptionPauseCollectionSetBy enum.
type SubscriptionStatus ¶
type SubscriptionStatus string
SubscriptionStatus defines model for Subscription.Status.
const ( SubscriptionStatusActive SubscriptionStatus = "active" 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 SubscriptionTimelineEvent ¶
type SubscriptionTimelineEvent struct {
ActorId string `json:"actor_id,omitempty"`
ActorName string `json:"actor_name,omitempty"`
ActorType string `json:"actor_type,omitempty"`
// Description The line's title, for example "Subscription canceled".
Description string `json:"description"`
// Detail The line's meta line as text, without the actor (see
// `actor_name`) and without a date at its end, which is in
// `detail_timestamp`. For example "Starter → Pro".
Detail string `json:"detail,omitempty"`
// DetailTimestamp The date the end of `detail` refers to, for the client to format, as in "Trial now ends" followed by this date.
DetailTimestamp time.Time `json:"detail_timestamp,omitempty"`
// Error The line's problem.
Error string `json:"error,omitempty"`
// EventType The audit action, e.g. `create`, `cancel`, `subscription.item_updated`.
EventType string `json:"event_type"`
// IsSimulated True when the action affected a subscription on a test clock.
IsSimulated bool `json:"is_simulated,omitempty"`
// Line One activity row in the words of the activity line standard
// (ADR-128): a title with no values, the amount when the event moves
// money, asks for it or cancels money owed, a problem line on failure
// and warning rows, the meta line's parts and the actor, a tone, and
// the event's time on the entity's calendar. `recorded_at` is the
// real-world time, set only for an entity on a test clock.
Line ActivityLine `json:"line"`
// SimEffectiveAt The test clock's simulated time when the action took effect.
SimEffectiveAt time.Time `json:"sim_effective_at,omitempty"`
Source SubscriptionTimelineEventSource `json:"source"`
// Status The line's tone in older words, read by the dashboard's dot.
Status SubscriptionTimelineEventStatus `json:"status"`
TestClockId string `json:"test_clock_id,omitempty"`
// Timestamp When the action was recorded (wall-clock time).
Timestamp time.Time `json:"timestamp"`
}
SubscriptionTimelineEvent defines model for SubscriptionTimelineEvent.
type SubscriptionTimelineEventSource ¶
type SubscriptionTimelineEventSource string
SubscriptionTimelineEventSource defines model for SubscriptionTimelineEvent.Source.
const (
Audit SubscriptionTimelineEventSource = "audit"
)
Defines values for SubscriptionTimelineEventSource.
func (SubscriptionTimelineEventSource) Valid ¶
func (e SubscriptionTimelineEventSource) Valid() bool
Valid indicates whether the value is a known member of the SubscriptionTimelineEventSource enum.
type SubscriptionTimelineEventStatus ¶
type SubscriptionTimelineEventStatus string
SubscriptionTimelineEventStatus The line's tone in older words, read by the dashboard's dot.
const ( SubscriptionTimelineEventStatusFailed SubscriptionTimelineEventStatus = "failed" SubscriptionTimelineEventStatusNeutral SubscriptionTimelineEventStatus = "neutral" SubscriptionTimelineEventStatusSucceeded SubscriptionTimelineEventStatus = "succeeded" SubscriptionTimelineEventStatusWarning SubscriptionTimelineEventStatus = "warning" )
Defines values for SubscriptionTimelineEventStatus.
func (SubscriptionTimelineEventStatus) Valid ¶
func (e SubscriptionTimelineEventStatus) Valid() bool
Valid indicates whether the value is a known member of the SubscriptionTimelineEventStatus enum.
type Tenant ¶
type Tenant struct {
CreatedAt time.Time `json:"created_at"`
Id string `json:"id"`
Name string `json:"name"`
Status TenantStatus `json:"status"`
UpdatedAt time.Time `json:"updated_at"`
}
Tenant defines model for Tenant.
type TenantSettings ¶
type TenantSettings struct {
// BrandColor Accent color on invoice PDFs, as `#rrggbb`.
BrandColor string `json:"brand_color,omitempty"`
CompanyAddressLine1 string `json:"company_address_line1,omitempty"`
CompanyAddressLine2 string `json:"company_address_line2,omitempty"`
CompanyCity string `json:"company_city,omitempty"`
// CompanyCountry ISO 3166 alpha-2 code, such as `US`. Empty is allowed.
// Whitespace is trimmed and the code is upper-cased before it is
// checked and stored.
CompanyCountry string `json:"company_country,omitempty"`
CompanyEmail string `json:"company_email,omitempty"`
// CompanyName Shown on invoices and as the sender name on emails. No line breaks.
CompanyName string `json:"company_name,omitempty"`
// CompanyPhone 7 to 20 characters of digits, spaces, `+`, `-`, `(` and `)`.
CompanyPhone string `json:"company_phone,omitempty"`
CompanyPostalCode string `json:"company_postal_code,omitempty"`
CompanyState string `json:"company_state,omitempty"`
// CreatedAt Zero time when the tenant has never saved settings.
CreatedAt time.Time `json:"created_at"`
// CreditBalanceLowThresholdCents When a customer's credit in one currency drops below this
// amount, in that currency's minor units, the `credit.balance_low`
// webhook fires: 1000 means $10.00 of USD credit and €10.00 of EUR
// credit. null turns it off.
CreditBalanceLowThresholdCents int64 `json:"credit_balance_low_threshold_cents,omitempty"`
// CreditNotePrefix Starts every credit note number, such as `CN-000001`. A change
// applies to new credit notes only. Issued notes keep their
// numbers. It must differ from `invoice_prefix`, or an invoice and
// a credit note would get the same number.
CreditNotePrefix string `json:"credit_note_prefix"`
// DefaultCurrency ISO 4217 code. Zero-decimal currencies (such as JPY) are not supported yet.
DefaultCurrency string `json:"default_currency"`
// DefaultProductTaxCode Stripe product tax code used when a plan has none, such as
// `txcd_10103001`. Empty is allowed. Surrounding whitespace is
// trimmed before the check.
DefaultProductTaxCode string `json:"default_product_tax_code,omitempty"`
// invoice page. Each invoice keeps the footer it was issued with,
// so a change applies to invoices issued after it. A draft shows
// the current text.
InvoiceFooter string `json:"invoice_footer,omitempty"`
// InvoicePrefix Starts every invoice number, such as `HC-000001`.
InvoicePrefix string `json:"invoice_prefix"`
// LogoUrl Shown in emails and on the hosted invoice page. PDFs do not print it.
LogoUrl string `json:"logo_url,omitempty"`
// NetPaymentTerms Days until an invoice is due. 0 means due on issue.
NetPaymentTerms int `json:"net_payment_terms"`
// NextInvoiceSequence The number the next invoice in this mode (test or live) gets,
// before the prefix: 43 means the next invoice is
// `<invoice_prefix>-000043`. Test and live count separately, and
// changing `invoice_prefix` keeps the count. Not a setting:
// sending it on `PUT` does nothing.
NextInvoiceSequence int `json:"next_invoice_sequence"`
// SupportUrl Must start with `http://` or `https://`. Linked in emails and on
// the hosted invoice page, and printed at the foot of invoice and
// credit-note PDFs.
SupportUrl string `json:"support_url,omitempty"`
// TaxId Your own tax number (VAT, EIN, GSTIN), printed on invoices.
TaxId string `json:"tax_id,omitempty"`
// TaxInclusive Whether prices already include tax.
TaxInclusive bool `json:"tax_inclusive"`
// TaxName Label for the tax line, such as `VAT`.
TaxName string `json:"tax_name,omitempty"`
// TaxOnFailure What to do when the tax provider fails. `block` holds the invoice until tax succeeds.
TaxOnFailure TenantSettingsTaxOnFailure `json:"tax_on_failure,omitempty"`
// TaxProvider `none` = no tax, `manual` = the flat `tax_rate`, `stripe_tax` = Stripe Tax.
TaxProvider TenantSettingsTaxProvider `json:"tax_provider"`
// TaxRate Percent, up to 4 decimal places (18.5 = 18.5%). Used by the `manual` provider.
TaxRate float32 `json:"tax_rate"`
TenantId string `json:"tenant_id"`
// Timezone IANA zone name, such as `America/New_York`. `Local` is rejected. All billing date math uses this zone.
Timezone string `json:"timezone"`
UpdatedAt time.Time `json:"updated_at"`
}
TenantSettings defines model for TenantSettings.
type TenantSettingsInput ¶
type TenantSettingsInput struct {
// BrandColor Accent color on invoice PDFs, as `#rrggbb`.
BrandColor string `json:"brand_color,omitempty"`
CompanyAddressLine1 string `json:"company_address_line1,omitempty"`
CompanyAddressLine2 string `json:"company_address_line2,omitempty"`
CompanyCity string `json:"company_city,omitempty"`
// CompanyCountry ISO 3166 alpha-2 code, such as `US`. Empty is allowed.
// Whitespace is trimmed and the code is upper-cased before it is
// checked and stored.
CompanyCountry string `json:"company_country,omitempty"`
CompanyEmail string `json:"company_email,omitempty"`
// CompanyName Shown on invoices and as the sender name on emails. No line breaks.
CompanyName string `json:"company_name,omitempty"`
// CompanyPhone 7 to 20 characters of digits, spaces, `+`, `-`, `(` and `)`.
CompanyPhone string `json:"company_phone,omitempty"`
CompanyPostalCode string `json:"company_postal_code,omitempty"`
CompanyState string `json:"company_state,omitempty"`
// CreditBalanceLowThresholdCents When a customer's credit in one currency drops below this
// amount, in that currency's minor units, the `credit.balance_low`
// webhook fires: 1000 means $10.00 of USD credit and €10.00 of EUR
// credit. null turns it off.
CreditBalanceLowThresholdCents int64 `json:"credit_balance_low_threshold_cents,omitempty"`
// CreditNotePrefix Starts every credit note number, such as `CN-000001`. A change
// applies to new credit notes only. Issued notes keep their
// numbers. It must differ from `invoice_prefix`, or an invoice and
// a credit note would get the same number.
CreditNotePrefix string `json:"credit_note_prefix,omitempty"`
// DefaultCurrency ISO 4217 code. Zero-decimal currencies (such as JPY) are not supported yet.
DefaultCurrency string `json:"default_currency,omitempty"`
// DefaultProductTaxCode Stripe product tax code used when a plan has none, such as
// `txcd_10103001`. Empty is allowed. Surrounding whitespace is
// trimmed before the check.
DefaultProductTaxCode string `json:"default_product_tax_code,omitempty"`
// invoice page. Each invoice keeps the footer it was issued with,
// so a change applies to invoices issued after it. A draft shows
// the current text.
InvoiceFooter string `json:"invoice_footer,omitempty"`
// InvoicePrefix Starts every invoice number, such as `HC-000001`.
InvoicePrefix string `json:"invoice_prefix,omitempty"`
// LogoUrl Shown in emails and on the hosted invoice page. PDFs do not print it.
LogoUrl string `json:"logo_url,omitempty"`
// NetPaymentTerms Days until an invoice is due. 0 means due on issue.
NetPaymentTerms int `json:"net_payment_terms,omitempty"`
// SupportUrl Must start with `http://` or `https://`. Linked in emails and on
// the hosted invoice page, and printed at the foot of invoice and
// credit-note PDFs.
SupportUrl string `json:"support_url,omitempty"`
// TaxId Your own tax number (VAT, EIN, GSTIN), printed on invoices.
TaxId string `json:"tax_id,omitempty"`
// TaxInclusive Whether prices already include tax.
TaxInclusive bool `json:"tax_inclusive,omitempty"`
// TaxName Label for the tax line, such as `VAT`.
TaxName string `json:"tax_name,omitempty"`
// TaxOnFailure What to do when the tax provider fails. `block` holds the invoice until tax succeeds.
TaxOnFailure TenantSettingsInputTaxOnFailure `json:"tax_on_failure,omitempty"`
// TaxProvider `none` = no tax, `manual` = the flat `tax_rate`, `stripe_tax` = Stripe Tax.
TaxProvider TenantSettingsInputTaxProvider `json:"tax_provider,omitempty"`
// TaxRate Percent, up to 4 decimal places (18.5 = 18.5%). Used by the `manual` provider.
TaxRate float32 `json:"tax_rate,omitempty"`
// Timezone IANA zone name, such as `America/New_York`. `Local` is rejected. All billing date math uses this zone.
Timezone string `json:"timezone,omitempty"`
}
TenantSettingsInput Every field is optional. Fields you leave out keep their stored value.
type TenantSettingsInputTaxOnFailure ¶
type TenantSettingsInputTaxOnFailure string
TenantSettingsInputTaxOnFailure What to do when the tax provider fails. `block` holds the invoice until tax succeeds.
const ( TenantSettingsInputTaxOnFailureBlock TenantSettingsInputTaxOnFailure = "block" TenantSettingsInputTaxOnFailureFallbackManual TenantSettingsInputTaxOnFailure = "fallback_manual" )
Defines values for TenantSettingsInputTaxOnFailure.
func (TenantSettingsInputTaxOnFailure) Valid ¶
func (e TenantSettingsInputTaxOnFailure) Valid() bool
Valid indicates whether the value is a known member of the TenantSettingsInputTaxOnFailure enum.
type TenantSettingsInputTaxProvider ¶
type TenantSettingsInputTaxProvider string
TenantSettingsInputTaxProvider `none` = no tax, `manual` = the flat `tax_rate`, `stripe_tax` = Stripe Tax.
const ( TenantSettingsInputTaxProviderManual TenantSettingsInputTaxProvider = "manual" TenantSettingsInputTaxProviderNone TenantSettingsInputTaxProvider = "none" TenantSettingsInputTaxProviderStripeTax TenantSettingsInputTaxProvider = "stripe_tax" )
Defines values for TenantSettingsInputTaxProvider.
func (TenantSettingsInputTaxProvider) Valid ¶
func (e TenantSettingsInputTaxProvider) Valid() bool
Valid indicates whether the value is a known member of the TenantSettingsInputTaxProvider enum.
type TenantSettingsTaxOnFailure ¶
type TenantSettingsTaxOnFailure string
TenantSettingsTaxOnFailure What to do when the tax provider fails. `block` holds the invoice until tax succeeds.
const ( TenantSettingsTaxOnFailureBlock TenantSettingsTaxOnFailure = "block" TenantSettingsTaxOnFailureFallbackManual TenantSettingsTaxOnFailure = "fallback_manual" )
Defines values for TenantSettingsTaxOnFailure.
func (TenantSettingsTaxOnFailure) Valid ¶
func (e TenantSettingsTaxOnFailure) Valid() bool
Valid indicates whether the value is a known member of the TenantSettingsTaxOnFailure enum.
type TenantSettingsTaxProvider ¶
type TenantSettingsTaxProvider string
TenantSettingsTaxProvider `none` = no tax, `manual` = the flat `tax_rate`, `stripe_tax` = Stripe Tax.
const ( TenantSettingsTaxProviderManual TenantSettingsTaxProvider = "manual" TenantSettingsTaxProviderNone TenantSettingsTaxProvider = "none" TenantSettingsTaxProviderStripeTax TenantSettingsTaxProvider = "stripe_tax" )
Defines values for TenantSettingsTaxProvider.
func (TenantSettingsTaxProvider) Valid ¶
func (e TenantSettingsTaxProvider) Valid() bool
Valid indicates whether the value is a known member of the TenantSettingsTaxProvider enum.
type TenantStatus ¶
type TenantStatus string
TenantStatus defines model for Tenant.Status.
const ( TenantStatusActive TenantStatus = "active" TenantStatusDeleted TenantStatus = "deleted" TenantStatusSuspended TenantStatus = "suspended" )
Defines values for TenantStatus.
func (TenantStatus) Valid ¶
func (e TenantStatus) Valid() bool
Valid indicates whether the value is a known member of the TenantStatus enum.
type TestClock ¶
type TestClock struct {
CreatedAt time.Time `json:"created_at"`
// FrozenTime The clock's current time.
FrozenTime time.Time `json:"frozen_time"`
Id string `json:"id"`
// LastAdvanceSummary What the latest advance did: the time span it covered and how many
// of each billing step it ran. Absent until the clock is first
// advanced.
LastAdvanceSummary TestClockAdvanceSummary `json:"last_advance_summary,omitempty"`
// LastFailureReason Why the last advance failed. Cleared by the next successful advance.
LastFailureReason string `json:"last_failure_reason,omitempty"`
Name string `json:"name"`
// Status `ready`: it can be advanced or deleted. `advancing`: billing is
// catching up to the new time. `internal_failure`: the last advance
// failed partway; resume it with `POST /v1/test-clocks/{id}/retry-advance`.
Status TestClockStatus `json:"status"`
TenantId string `json:"tenant_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
TestClock A clock for test mode. Customers and subscriptions attached to it are billed on its time, not the real time.
type TestClockAdvanceSummary ¶
type TestClockAdvanceSummary struct {
AdvancedFrom time.Time `json:"advanced_from"`
AdvancedTo time.Time `json:"advanced_to"`
ChargesRetried int `json:"charges_retried"`
ClawbacksIssued int `json:"clawbacks_issued"`
CreditsExpired int `json:"credits_expired"`
DunningAdvanced int `json:"dunning_advanced"`
// HadErrors True when a step failed. The counts then cover only the work done before the failure.
HadErrors bool `json:"had_errors"`
InvoicesGenerated int `json:"invoices_generated"`
PausesResumed int `json:"pauses_resumed"`
TaxRetried int `json:"tax_retried"`
ThresholdsFired int `json:"thresholds_fired"`
TrialsActivated int `json:"trials_activated"`
}
TestClockAdvanceSummary What the latest advance did: the time span it covered and how many of each billing step it ran. Absent until the clock is first advanced.
type TestClockStatus ¶
type TestClockStatus string
TestClockStatus `ready`: it can be advanced or deleted. `advancing`: billing is catching up to the new time. `internal_failure`: the last advance failed partway; resume it with `POST /v1/test-clocks/{id}/retry-advance`.
const ( TestClockStatusAdvancing TestClockStatus = "advancing" TestClockStatusInternalFailure TestClockStatus = "internal_failure" TestClockStatusReady TestClockStatus = "ready" )
Defines values for TestClockStatus.
func (TestClockStatus) Valid ¶
func (e TestClockStatus) Valid() bool
Valid indicates whether the value is a known member of the TestClockStatus 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) AddInvoiceLineItem ¶
func (_ Unimplemented) AddInvoiceLineItem(w http.ResponseWriter, r *http.Request, id string, params AddInvoiceLineItemParams)
Add a line item to a draft invoice (POST /v1/invoices/{id}/line-items)
func (Unimplemented) AddPlanPrice ¶
func (_ Unimplemented) AddPlanPrice(w http.ResponseWriter, r *http.Request, id string, params AddPlanPriceParams)
Add a price to a plan (POST /v1/plans/{id}/prices)
func (Unimplemented) AddSubscriptionItem ¶
func (_ Unimplemented) AddSubscriptionItem(w http.ResponseWriter, r *http.Request, id string, params AddSubscriptionItemParams)
Add subscription item (POST /v1/subscriptions/{id}/items)
func (Unimplemented) AdjustCredits ¶
func (_ Unimplemented) AdjustCredits(w http.ResponseWriter, r *http.Request, params AdjustCreditsParams)
Add or remove credit (POST /v1/credits/adjust)
func (Unimplemented) AggregateUsageEvents ¶
func (_ Unimplemented) AggregateUsageEvents(w http.ResponseWriter, r *http.Request, params AggregateUsageEventsParams)
Usage totals (GET /v1/usage-events/aggregate)
func (Unimplemented) BackfillUsageEvent ¶
func (_ Unimplemented) BackfillUsageEvent(w http.ResponseWriter, r *http.Request)
Backfill a past usage event (POST /v1/usage-events/backfill)
func (Unimplemented) Bootstrap ¶
func (_ Unimplemented) Bootstrap(w http.ResponseWriter, r *http.Request)
Set up a new installation (POST /v1/bootstrap)
func (Unimplemented) CancelSubscription ¶
func (_ Unimplemented) CancelSubscription(w http.ResponseWriter, r *http.Request, id string, params CancelSubscriptionParams)
Cancel subscription now (POST /v1/subscriptions/{id}/cancel)
func (Unimplemented) CancelSubscriptionItemPendingChange ¶
func (_ Unimplemented) CancelSubscriptionItemPendingChange(w http.ResponseWriter, r *http.Request, id string, itemID string)
Cancel a scheduled plan change (DELETE /v1/subscriptions/{id}/items/{itemID}/pending-change)
func (Unimplemented) CheckPasswordResetToken ¶
func (_ Unimplemented) CheckPasswordResetToken(w http.ResponseWriter, r *http.Request, params CheckPasswordResetTokenParams)
Check a password reset token (GET /v1/auth/password-reset/check)
func (Unimplemented) ClearSubscriptionBillingThresholds ¶
func (_ Unimplemented) ClearSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request, id string)
Clear billing thresholds (DELETE /v1/subscriptions/{id}/billing-thresholds)
func (Unimplemented) ClearSubscriptionScheduledCancel ¶
func (_ Unimplemented) ClearSubscriptionScheduledCancel(w http.ResponseWriter, r *http.Request, id string)
Clear a scheduled cancel (DELETE /v1/subscriptions/{id}/scheduled-cancel)
func (Unimplemented) CollectInvoicePayment ¶
func (_ Unimplemented) CollectInvoicePayment(w http.ResponseWriter, r *http.Request, id string, params CollectInvoicePaymentParams)
Charge a finalized invoice now (POST /v1/invoices/{id}/collect)
func (Unimplemented) ConnectStripe ¶
func (_ Unimplemented) ConnectStripe(w http.ResponseWriter, r *http.Request, params ConnectStripeParams)
Connect a Stripe account (POST /v1/settings/stripe)
func (Unimplemented) CreateApiKey ¶
func (_ Unimplemented) CreateApiKey(w http.ResponseWriter, r *http.Request, params CreateApiKeyParams)
Create an API key (POST /v1/api-keys)
func (Unimplemented) CreateCustomerPaymentSetupSession ¶
func (_ Unimplemented) CreateCustomerPaymentSetupSession(w http.ResponseWriter, r *http.Request, customerId string, params CreateCustomerPaymentSetupSessionParams)
Create a link for the customer to add a payment method (POST /v1/customers/{customer_id}/payment-methods/setup-session)
func (Unimplemented) CreateDunningPolicy ¶
func (_ Unimplemented) CreateDunningPolicy(w http.ResponseWriter, r *http.Request, params CreateDunningPolicyParams)
Create dunning policy (POST /v1/dunning/policies)
func (Unimplemented) CreateHostedInvoiceCheckout ¶
func (_ Unimplemented) CreateHostedInvoiceCheckout(w http.ResponseWriter, r *http.Request, token string)
Start paying the invoice in Stripe Checkout (POST /v1/public/invoices/{token}/checkout)
func (Unimplemented) CreateInvoice ¶
func (_ Unimplemented) CreateInvoice(w http.ResponseWriter, r *http.Request, params CreateInvoiceParams)
Create a draft invoice (POST /v1/invoices)
func (Unimplemented) CreatePriceOverride ¶
func (_ Unimplemented) CreatePriceOverride(w http.ResponseWriter, r *http.Request, params CreatePriceOverrideParams)
Create a customer price override (POST /v1/price-overrides)
func (Unimplemented) CreatePublicPaymentUpdateCheckout ¶
func (_ Unimplemented) CreatePublicPaymentUpdateCheckout(w http.ResponseWriter, r *http.Request, token string)
Start adding a card in Stripe Checkout (POST /v1/public/payment-updates/{token}/checkout)
func (Unimplemented) CreateTenant ¶
func (_ Unimplemented) CreateTenant(w http.ResponseWriter, r *http.Request)
Create a tenant (POST /v1/tenants)
func (Unimplemented) DeleteDunningPolicy ¶
func (_ Unimplemented) DeleteDunningPolicy(w http.ResponseWriter, r *http.Request, id string)
Delete dunning policy (DELETE /v1/dunning/policies/{id})
func (Unimplemented) DeletePriceOverride ¶
func (_ Unimplemented) DeletePriceOverride(w http.ResponseWriter, r *http.Request, id string)
End a customer price override (DELETE /v1/price-overrides/{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) DetachCustomerPaymentMethod ¶
func (_ Unimplemented) DetachCustomerPaymentMethod(w http.ResponseWriter, r *http.Request, customerId string, pmid string)
Detach a payment method (DELETE /v1/customers/{customer_id}/payment-methods/{pmID})
func (Unimplemented) DiscardHeldUsage ¶
func (_ Unimplemented) DiscardHeldUsage(w http.ResponseWriter, r *http.Request)
Discard held usage (POST /v1/usage-events/held/discard)
func (Unimplemented) DisconnectStripe ¶
func (_ Unimplemented) DisconnectStripe(w http.ResponseWriter, r *http.Request, mode DisconnectStripeParamsMode)
Disconnect Stripe for one mode (DELETE /v1/settings/stripe/{mode})
func (Unimplemented) EndSubscriptionTrial ¶
func (_ Unimplemented) EndSubscriptionTrial(w http.ResponseWriter, r *http.Request, id string, params EndSubscriptionTrialParams)
End trial now (POST /v1/subscriptions/{id}/end-trial)
func (Unimplemented) ExportAuditLogCsv ¶
func (_ Unimplemented) ExportAuditLogCsv(w http.ResponseWriter, r *http.Request, params ExportAuditLogCsvParams)
Export the audit log as CSV (GET /v1/exports/audit-log.csv)
func (Unimplemented) ExportCustomersCsv ¶
func (_ Unimplemented) ExportCustomersCsv(w http.ResponseWriter, r *http.Request, params ExportCustomersCsvParams)
Export customers as CSV (GET /v1/exports/customers.csv)
func (Unimplemented) ExportInvoicesCsv ¶
func (_ Unimplemented) ExportInvoicesCsv(w http.ResponseWriter, r *http.Request, params ExportInvoicesCsvParams)
Export invoices as CSV (GET /v1/exports/invoices.csv)
func (Unimplemented) ExportSubscriptionsCsv ¶
func (_ Unimplemented) ExportSubscriptionsCsv(w http.ResponseWriter, r *http.Request, params ExportSubscriptionsCsvParams)
Export subscriptions as CSV (GET /v1/exports/subscriptions.csv)
func (Unimplemented) ExportUsageEventsCsv ¶
func (_ Unimplemented) ExportUsageEventsCsv(w http.ResponseWriter, r *http.Request, params ExportUsageEventsCsvParams)
Export usage events as CSV (GET /v1/exports/usage-events.csv)
func (Unimplemented) ExtendSubscriptionTrial ¶
func (_ Unimplemented) ExtendSubscriptionTrial(w http.ResponseWriter, r *http.Request, id string, params ExtendSubscriptionTrialParams)
Extend trial (POST /v1/subscriptions/{id}/extend-trial)
func (Unimplemented) GetAnalyticsMrrMovement ¶
func (_ Unimplemented) GetAnalyticsMrrMovement(w http.ResponseWriter, r *http.Request, params GetAnalyticsMrrMovementParams)
Get MRR movement over time (GET /v1/analytics/mrr-movement)
func (Unimplemented) GetAnalyticsOverview ¶
func (_ Unimplemented) GetAnalyticsOverview(w http.ResponseWriter, r *http.Request, params GetAnalyticsOverviewParams)
Get headline billing metrics (GET /v1/analytics/overview)
func (Unimplemented) GetAnalyticsRevenueChart ¶
func (_ Unimplemented) GetAnalyticsRevenueChart(w http.ResponseWriter, r *http.Request, params GetAnalyticsRevenueChartParams)
Get revenue over time (GET /v1/analytics/revenue-chart)
func (Unimplemented) GetAnalyticsUsage ¶
func (_ Unimplemented) GetAnalyticsUsage(w http.ResponseWriter, r *http.Request, params GetAnalyticsUsageParams)
Get usage over time (GET /v1/analytics/usage)
func (Unimplemented) GetAuditLogFilters ¶
func (_ Unimplemented) GetAuditLogFilters(w http.ResponseWriter, r *http.Request)
List audit log filter values (GET /v1/audit-log/filters)
func (Unimplemented) GetCreditNote ¶
func (_ Unimplemented) GetCreditNote(w http.ResponseWriter, r *http.Request, id string)
Get a credit note (GET /v1/credit-notes/{id})
func (Unimplemented) GetCreditNotePdf ¶
func (_ Unimplemented) GetCreditNotePdf(w http.ResponseWriter, r *http.Request, id string)
Download credit note PDF (GET /v1/credit-notes/{id}/pdf)
func (Unimplemented) GetCreditNoteStats ¶
func (_ Unimplemented) GetCreditNoteStats(w http.ResponseWriter, r *http.Request)
Get credit note totals (GET /v1/credit-notes/stats)
func (Unimplemented) GetCustomer ¶
func (_ Unimplemented) GetCustomer(w http.ResponseWriter, r *http.Request, id string)
Get customer (GET /v1/customers/{id})
func (Unimplemented) GetCustomerBillingProfile ¶
func (_ Unimplemented) GetCustomerBillingProfile(w http.ResponseWriter, r *http.Request, id string)
Get the customer's billing profile (GET /v1/customers/{id}/billing-profile)
func (Unimplemented) GetCustomerOverview ¶
func (_ Unimplemented) GetCustomerOverview(w http.ResponseWriter, r *http.Request, customerId string)
Get a customer overview (GET /v1/customers/{customer_id}/overview)
func (Unimplemented) GetCustomerUsage ¶
func (_ Unimplemented) GetCustomerUsage(w http.ResponseWriter, r *http.Request, id string, params GetCustomerUsageParams)
Get the customer's usage and cost for a period (GET /v1/customers/{id}/usage)
func (Unimplemented) GetDunningPolicy ¶
func (_ Unimplemented) GetDunningPolicy(w http.ResponseWriter, r *http.Request, id string)
Get dunning policy (GET /v1/dunning/policies/{id})
func (Unimplemented) GetDunningRun ¶
func (_ Unimplemented) GetDunningRun(w http.ResponseWriter, r *http.Request, id string)
Get a dunning run with its events (GET /v1/dunning/runs/{id})
func (Unimplemented) GetDunningStats ¶
func (_ Unimplemented) GetDunningStats(w http.ResponseWriter, r *http.Request)
Get dunning totals (GET /v1/dunning/stats)
func (Unimplemented) GetEmailSettings ¶
func (_ Unimplemented) GetEmailSettings(w http.ResponseWriter, r *http.Request)
Email setup status (GET /v1/settings/email)
func (Unimplemented) GetHealth ¶
func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
Health check (GET /health)
func (Unimplemented) GetHealthReady ¶
func (_ Unimplemented) GetHealthReady(w http.ResponseWriter, r *http.Request)
Readiness check for load balancers (GET /health/ready)
func (Unimplemented) GetHostedInvoice ¶
func (_ Unimplemented) GetHostedInvoice(w http.ResponseWriter, r *http.Request, token string)
Data behind the hosted invoice page (GET /v1/public/invoices/{token})
func (Unimplemented) GetHostedInvoicePdf ¶
func (_ Unimplemented) GetHostedInvoicePdf(w http.ResponseWriter, r *http.Request, token string)
Download the hosted invoice PDF (GET /v1/public/invoices/{token}/pdf)
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) GetInvoicePaymentTimeline ¶
func (_ Unimplemented) GetInvoicePaymentTimeline(w http.ResponseWriter, r *http.Request, id string)
Get the invoice activity timeline (GET /v1/invoices/{id}/payment-timeline)
func (Unimplemented) GetMeter ¶
func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, id string)
Get meter (GET /v1/meters/{id})
func (Unimplemented) GetMetrics ¶
func (_ Unimplemented) GetMetrics(w http.ResponseWriter, r *http.Request)
Prometheus metrics (GET /metrics)
func (Unimplemented) GetPlan ¶
func (_ Unimplemented) GetPlan(w http.ResponseWriter, r *http.Request, id string)
Get plan (GET /v1/plans/{id})
func (Unimplemented) GetPublicPaymentUpdate ¶
func (_ Unimplemented) GetPublicPaymentUpdate(w http.ResponseWriter, r *http.Request, token string)
Data behind the payment-update page (GET /v1/public/payment-updates/{token})
func (Unimplemented) GetRecipe ¶
func (_ Unimplemented) GetRecipe(w http.ResponseWriter, r *http.Request, key string)
Get recipe (GET /v1/recipes/{key})
func (Unimplemented) GetSubscription ¶
func (_ Unimplemented) GetSubscription(w http.ResponseWriter, r *http.Request, id string)
Get subscription (GET /v1/subscriptions/{id})
func (Unimplemented) GetSubscriptionTimeline ¶
func (_ Unimplemented) GetSubscriptionTimeline(w http.ResponseWriter, r *http.Request, id string)
Get subscription activity timeline (GET /v1/subscriptions/{id}/timeline)
func (Unimplemented) GetTenant ¶
func (_ Unimplemented) GetTenant(w http.ResponseWriter, r *http.Request, id string)
Get a tenant (GET /v1/tenants/{id})
func (Unimplemented) GetTenantSettings ¶
func (_ Unimplemented) GetTenantSettings(w http.ResponseWriter, r *http.Request)
Get workspace settings (GET /v1/settings)
func (Unimplemented) GetV1AuthInviteToken ¶
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) GetV1CreditsBalanceCustomerId ¶
func (_ Unimplemented) GetV1CreditsBalanceCustomerId(w http.ResponseWriter, r *http.Request, customerId string)
Get customer credit balance (GET /v1/credits/balance/{customer_id})
func (Unimplemented) GetV1CreditsBalanceCustomerIdLive ¶
func (_ Unimplemented) GetV1CreditsBalanceCustomerIdLive(w http.ResponseWriter, r *http.Request, customerId string)
Get customer live credit balance (GET /v1/credits/balance/{customer_id}/live)
func (Unimplemented) GetV1CreditsGrantsCustomerId ¶
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) GetV1Meters ¶
func (_ Unimplemented) GetV1Meters(w http.ResponseWriter, r *http.Request, params GetV1MetersParams)
List meters (GET /v1/meters)
func (Unimplemented) GetV1Plans ¶
func (_ Unimplemented) GetV1Plans(w http.ResponseWriter, r *http.Request, params GetV1PlansParams)
List plans (GET /v1/plans)
func (Unimplemented) GetV1ProviderCosts ¶
func (_ Unimplemented) GetV1ProviderCosts(w http.ResponseWriter, r *http.Request, params GetV1ProviderCostsParams)
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) 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, params GetV1TestClocksParams)
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, params GetV1TestClocksIdSubscriptionsParams)
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, params GetV1WebhookEndpointsEndpointsParams)
List webhook endpoints (GET /v1/webhook-endpoints/endpoints)
func (Unimplemented) GetV1WebhookEndpointsEvents ¶
func (_ Unimplemented) GetV1WebhookEndpointsEvents(w http.ResponseWriter, r *http.Request, params GetV1WebhookEndpointsEventsParams)
List outbound events, newest first (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) GetWebhookEndpoint ¶
func (_ Unimplemented) GetWebhookEndpoint(w http.ResponseWriter, r *http.Request, id string)
Get a webhook endpoint (GET /v1/webhook-endpoints/endpoints/{id})
func (Unimplemented) GetWebhookEndpointStats ¶
func (_ Unimplemented) GetWebhookEndpointStats(w http.ResponseWriter, r *http.Request, params GetWebhookEndpointStatsParams)
Delivery counts per webhook endpoint (GET /v1/webhook-endpoints/endpoints/stats)
func (Unimplemented) IngestLitellmSpend ¶
func (_ Unimplemented) IngestLitellmSpend(w http.ResponseWriter, r *http.Request)
Ingest LiteLLM spend logs (POST /v1/integrations/litellm/spend)
func (Unimplemented) InstantiateRecipe ¶
func (_ Unimplemented) InstantiateRecipe(w http.ResponseWriter, r *http.Request, key string, params InstantiateRecipeParams)
Instantiate recipe (idempotent apply) (POST /v1/recipes/{key}/instantiate)
func (Unimplemented) InviteMember ¶
func (_ Unimplemented) InviteMember(w http.ResponseWriter, r *http.Request, params InviteMemberParams)
Invite a teammate by email (POST /v1/members/invite)
func (Unimplemented) IssueCreditNote ¶
func (_ Unimplemented) IssueCreditNote(w http.ResponseWriter, r *http.Request, id string, params IssueCreditNoteParams)
Issue a draft credit note (POST /v1/credit-notes/{id}/issue)
func (Unimplemented) ListApiKeys ¶
func (_ Unimplemented) ListApiKeys(w http.ResponseWriter, r *http.Request, params ListApiKeysParams)
List API keys (GET /v1/api-keys)
func (Unimplemented) ListAuditLog ¶
func (_ Unimplemented) ListAuditLog(w http.ResponseWriter, r *http.Request, params ListAuditLogParams)
List audit log entries (GET /v1/audit-log)
func (Unimplemented) ListCreditBalances ¶
func (_ Unimplemented) ListCreditBalances(w http.ResponseWriter, r *http.Request, params ListCreditBalancesParams)
List credit balances for all customers (GET /v1/credits/balances)
func (Unimplemented) ListCreditLedgerEntries ¶
func (_ Unimplemented) ListCreditLedgerEntries(w http.ResponseWriter, r *http.Request, customerId string, params ListCreditLedgerEntriesParams)
List a customer's credit ledger (GET /v1/credits/ledger/{customer_id})
func (Unimplemented) ListCreditNotes ¶
func (_ Unimplemented) ListCreditNotes(w http.ResponseWriter, r *http.Request, params ListCreditNotesParams)
List credit notes (GET /v1/credit-notes)
func (Unimplemented) ListCustomerPaymentMethods ¶
func (_ Unimplemented) ListCustomerPaymentMethods(w http.ResponseWriter, r *http.Request, customerId string, params ListCustomerPaymentMethodsParams)
List the customer's payment methods (GET /v1/customers/{customer_id}/payment-methods)
func (Unimplemented) ListCustomerSentEmails ¶
func (_ Unimplemented) ListCustomerSentEmails(w http.ResponseWriter, r *http.Request, id string, params ListCustomerSentEmailsParams)
List emails sent to the customer (GET /v1/customers/{id}/sent-emails)
func (Unimplemented) ListDunningPolicies ¶
func (_ Unimplemented) ListDunningPolicies(w http.ResponseWriter, r *http.Request, params ListDunningPoliciesParams)
List dunning policies (GET /v1/dunning/policies)
func (Unimplemented) ListDunningRuns ¶
func (_ Unimplemented) ListDunningRuns(w http.ResponseWriter, r *http.Request, params ListDunningRunsParams)
List dunning runs (GET /v1/dunning/runs)
func (Unimplemented) ListHeldUsage ¶
func (_ Unimplemented) ListHeldUsage(w http.ResponseWriter, r *http.Request)
List held usage (GET /v1/usage-events/held)
func (Unimplemented) ListInvoiceDisputes ¶
func (_ Unimplemented) ListInvoiceDisputes(w http.ResponseWriter, r *http.Request, id string, params ListInvoiceDisputesParams)
List the card disputes on an invoice (GET /v1/invoices/{id}/disputes)
func (Unimplemented) ListMembers ¶
func (_ Unimplemented) ListMembers(w http.ResponseWriter, r *http.Request)
List workspace members and invitations (GET /v1/members)
func (Unimplemented) ListPlanPrices ¶
func (_ Unimplemented) ListPlanPrices(w http.ResponseWriter, r *http.Request, id string, params ListPlanPricesParams)
List a plan's prices (GET /v1/plans/{id}/prices)
func (Unimplemented) ListPriceOverrides ¶
func (_ Unimplemented) ListPriceOverrides(w http.ResponseWriter, r *http.Request, params ListPriceOverridesParams)
List active price overrides (GET /v1/price-overrides)
func (Unimplemented) ListRecipeInstances ¶
func (_ Unimplemented) ListRecipeInstances(w http.ResponseWriter, r *http.Request, params ListRecipeInstancesParams)
List installed recipe instances (GET /v1/recipes/instances)
func (Unimplemented) ListRecipes ¶
func (_ Unimplemented) ListRecipes(w http.ResponseWriter, r *http.Request, params ListRecipesParams)
List recipes (GET /v1/recipes)
func (Unimplemented) ListStripeConnections ¶
func (_ Unimplemented) ListStripeConnections(w http.ResponseWriter, r *http.Request)
List Stripe connections (GET /v1/settings/stripe)
func (Unimplemented) ListTenants ¶
func (_ Unimplemented) ListTenants(w http.ResponseWriter, r *http.Request, params ListTenantsParams)
List tenants (GET /v1/tenants)
func (Unimplemented) ListTestClockCustomers ¶
func (_ Unimplemented) ListTestClockCustomers(w http.ResponseWriter, r *http.Request, id string, params ListTestClockCustomersParams)
List customers attached to a test clock (GET /v1/test-clocks/{id}/customers)
func (Unimplemented) ListWebhookEndpointDeliveries ¶
func (_ Unimplemented) ListWebhookEndpointDeliveries(w http.ResponseWriter, r *http.Request, id string, params ListWebhookEndpointDeliveriesParams)
List an endpoint's recent deliveries (GET /v1/webhook-endpoints/endpoints/{id}/deliveries)
func (Unimplemented) ListWebhookEventDeliveries ¶
func (_ Unimplemented) ListWebhookEventDeliveries(w http.ResponseWriter, r *http.Request, id string)
List all delivery attempts for an event (GET /v1/webhook_events/{id}/deliveries)
func (Unimplemented) MarkInvoiceUncollectible ¶
func (_ Unimplemented) MarkInvoiceUncollectible(w http.ResponseWriter, r *http.Request, id string, params MarkInvoiceUncollectibleParams)
Write off an invoice as uncollectible (POST /v1/invoices/{id}/mark-uncollectible)
func (Unimplemented) PatchV1MetersId ¶
func (_ Unimplemented) PatchV1MetersId(w http.ResponseWriter, r *http.Request, id string, params PatchV1MetersIdParams)
Update meter (PATCH /v1/meters/{id})
func (Unimplemented) PatchV1WebhookEndpointsEndpointsId ¶
func (_ Unimplemented) PatchV1WebhookEndpointsEndpointsId(w http.ResponseWriter, r *http.Request, id string, params PatchV1WebhookEndpointsEndpointsIdParams)
Update webhook endpoint (no secret rotation) (PATCH /v1/webhook-endpoints/endpoints/{id})
func (Unimplemented) PauseSubscriptionCollection ¶
func (_ Unimplemented) PauseSubscriptionCollection(w http.ResponseWriter, r *http.Request, id string, params PauseSubscriptionCollectionParams)
Pause collection (PUT /v1/subscriptions/{id}/pause-collection)
func (Unimplemented) PostV1AuthAcceptInvite ¶
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, params PostV1BillingRunParams)
Trigger billing cycle (POST /v1/billing/run)
func (Unimplemented) PostV1CreditNotes ¶
func (_ Unimplemented) PostV1CreditNotes(w http.ResponseWriter, r *http.Request, params PostV1CreditNotesParams)
Create a credit note (line-based, or commit relief) (POST /v1/credit-notes)
func (Unimplemented) PostV1CreditNotesIdSend ¶
func (_ Unimplemented) PostV1CreditNotesIdSend(w http.ResponseWriter, r *http.Request, id string, params PostV1CreditNotesIdSendParams)
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, params PostV1CreditsGrantParams)
Grant credits to customer (POST /v1/credits/grant)
func (Unimplemented) PostV1Customers ¶
func (_ Unimplemented) PostV1Customers(w http.ResponseWriter, r *http.Request, params PostV1CustomersParams)
Create customer (POST /v1/customers)
func (Unimplemented) PostV1CustomersIdRotateCostDashboardToken ¶
func (_ Unimplemented) PostV1CustomersIdRotateCostDashboardToken(w http.ResponseWriter, r *http.Request, id string, params PostV1CustomersIdRotateCostDashboardTokenParams)
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, params PostV1InvoicesCreatePreviewParams)
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, params PostV1InvoicesIdFinalizeParams)
Finalize draft invoice (POST /v1/invoices/{id}/finalize)
func (Unimplemented) PostV1InvoicesIdRetryTax ¶
func (_ Unimplemented) PostV1InvoicesIdRetryTax(w http.ResponseWriter, r *http.Request, id string, params PostV1InvoicesIdRetryTaxParams)
Retry tax calculation on a deferred invoice (POST /v1/invoices/{id}/retry-tax)
func (Unimplemented) PostV1InvoicesIdSend ¶
func (_ Unimplemented) PostV1InvoicesIdSend(w http.ResponseWriter, r *http.Request, id string, params PostV1InvoicesIdSendParams)
Email the invoice (PDF attached) to a recipient (POST /v1/invoices/{id}/send)
func (Unimplemented) PostV1Meters ¶
func (_ Unimplemented) PostV1Meters(w http.ResponseWriter, r *http.Request, params PostV1MetersParams)
Create meter (POST /v1/meters)
func (Unimplemented) PostV1Plans ¶
func (_ Unimplemented) PostV1Plans(w http.ResponseWriter, r *http.Request, params PostV1PlansParams)
Create plan (POST /v1/plans)
func (Unimplemented) PostV1Subscriptions ¶
func (_ Unimplemented) PostV1Subscriptions(w http.ResponseWriter, r *http.Request, params PostV1SubscriptionsParams)
Create subscription (POST /v1/subscriptions)
func (Unimplemented) PostV1SubscriptionsIdActivate ¶
func (_ Unimplemented) PostV1SubscriptionsIdActivate(w http.ResponseWriter, r *http.Request, id string, params PostV1SubscriptionsIdActivateParams)
Activate draft subscription (POST /v1/subscriptions/{id}/activate)
func (Unimplemented) PostV1SubscriptionsIdRetryBilling ¶
func (_ Unimplemented) PostV1SubscriptionsIdRetryBilling(w http.ResponseWriter, r *http.Request, id string, params PostV1SubscriptionsIdRetryBillingParams)
Retry billing on a subscription whose billing is failing (POST /v1/subscriptions/{id}/retry-billing)
func (Unimplemented) PostV1TestClocks ¶
func (_ Unimplemented) PostV1TestClocks(w http.ResponseWriter, r *http.Request, params PostV1TestClocksParams)
Create a test clock (POST /v1/test-clocks)
func (Unimplemented) PostV1TestClocksIdAdvance ¶
func (_ Unimplemented) PostV1TestClocksIdAdvance(w http.ResponseWriter, r *http.Request, id string, params PostV1TestClocksIdAdvanceParams)
Advance the clock to a new frozen_time (POST /v1/test-clocks/{id}/advance)
func (Unimplemented) PostV1TestClocksIdRetryAdvance ¶
func (_ Unimplemented) PostV1TestClocksIdRetryAdvance(w http.ResponseWriter, r *http.Request, id string, params PostV1TestClocksIdRetryAdvanceParams)
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, params PostV1WebhookEndpointsEndpointsParams)
Create webhook endpoint (POST /v1/webhook-endpoints/endpoints)
func (Unimplemented) PostV1WebhookEndpointsEndpointsIdRotateSecret ¶
func (_ Unimplemented) PostV1WebhookEndpointsEndpointsIdRotateSecret(w http.ResponseWriter, r *http.Request, id string, params PostV1WebhookEndpointsEndpointsIdRotateSecretParams)
Rotate signing secret (72h dual-signing grace) (POST /v1/webhook-endpoints/endpoints/{id}/rotate-secret)
func (Unimplemented) PreviewRecipe ¶
func (_ Unimplemented) PreviewRecipe(w http.ResponseWriter, r *http.Request, key string, params PreviewRecipeParams)
Preview recipe (POST /v1/recipes/{key}/preview)
func (Unimplemented) PutV1ProviderCosts ¶
func (_ Unimplemented) PutV1ProviderCosts(w http.ResponseWriter, r *http.Request, params PutV1ProviderCostsParams)
Create or update a provider cost rate (PUT /v1/provider-costs)
func (Unimplemented) ReceivePostmarkWebhook ¶
func (_ Unimplemented) ReceivePostmarkWebhook(w http.ResponseWriter, r *http.Request)
Receive a Postmark delivery webhook (POST /v1/webhooks/postmark)
func (Unimplemented) ReceiveStripeWebhook ¶
func (_ Unimplemented) ReceiveStripeWebhook(w http.ResponseWriter, r *http.Request, endpointId string, params ReceiveStripeWebhookParams)
Receive a Stripe webhook (POST /v1/webhooks/stripe/{endpoint_id})
func (Unimplemented) RecordInvoicePayment ¶
func (_ Unimplemented) RecordInvoicePayment(w http.ResponseWriter, r *http.Request, id string, params RecordInvoicePaymentParams)
Record a payment made outside Stripe (POST /v1/invoices/{id}/record-payment)
func (Unimplemented) RefundInvoice ¶
func (_ Unimplemented) RefundInvoice(w http.ResponseWriter, r *http.Request, id string, params RefundInvoiceParams)
Refund a paid invoice (POST /v1/invoices/{id}/refund)
func (Unimplemented) ReleaseHeldUsage ¶
func (_ Unimplemented) ReleaseHeldUsage(w http.ResponseWriter, r *http.Request)
Release held usage (POST /v1/usage-events/held/release)
func (Unimplemented) RemoveMember ¶
func (_ Unimplemented) RemoveMember(w http.ResponseWriter, r *http.Request, userID string)
Remove a member from the workspace (DELETE /v1/members/{userID})
func (Unimplemented) RemovePlanPrice ¶
func (_ Unimplemented) RemovePlanPrice(w http.ResponseWriter, r *http.Request, id string, priceId string)
Remove a price from a plan (DELETE /v1/plans/{id}/prices/{price_id})
func (Unimplemented) RemoveSubscriptionItem ¶
func (_ Unimplemented) RemoveSubscriptionItem(w http.ResponseWriter, r *http.Request, id string, itemID string)
Remove subscription item (DELETE /v1/subscriptions/{id}/items/{itemID})
func (Unimplemented) ReplayWebhookDelivery ¶
func (_ Unimplemented) ReplayWebhookDelivery(w http.ResponseWriter, r *http.Request, id string, deliveryID string, params ReplayWebhookDeliveryParams)
Resend one delivery to its endpoint (POST /v1/webhook-endpoints/endpoints/{id}/deliveries/{deliveryID}/replay)
func (Unimplemented) ReplayWebhookEvent ¶
func (_ Unimplemented) ReplayWebhookEvent(w http.ResponseWriter, r *http.Request, id string, params ReplayWebhookEventParams)
Replay an event to all matching endpoints (POST /v1/webhook_events/{id}/replay)
func (Unimplemented) ResendInvoiceSetupLink ¶
func (_ Unimplemented) ResendInvoiceSetupLink(w http.ResponseWriter, r *http.Request, id string, params ResendInvoiceSetupLinkParams)
Resend the payment-method setup link (POST /v1/invoices/{id}/resend-setup-link)
func (Unimplemented) ResolveDunningRun ¶
func (_ Unimplemented) ResolveDunningRun(w http.ResponseWriter, r *http.Request, id string, params ResolveDunningRunParams)
Resolve a dunning run (POST /v1/dunning/runs/{id}/resolve)
func (Unimplemented) ResumeSubscriptionCollection ¶
func (_ Unimplemented) ResumeSubscriptionCollection(w http.ResponseWriter, r *http.Request, id string)
Resume collection (DELETE /v1/subscriptions/{id}/pause-collection)
func (Unimplemented) RetryCreditNoteRefund ¶
func (_ Unimplemented) RetryCreditNoteRefund(w http.ResponseWriter, r *http.Request, id string, params RetryCreditNoteRefundParams)
Retry a failed credit-note refund (POST /v1/credit-notes/{id}/retry-refund)
func (Unimplemented) RevokeApiKey ¶
func (_ Unimplemented) RevokeApiKey(w http.ResponseWriter, r *http.Request, id string)
Revoke an API key (DELETE /v1/api-keys/{id})
func (Unimplemented) RevokeMemberInvitation ¶
func (_ Unimplemented) RevokeMemberInvitation(w http.ResponseWriter, r *http.Request, id string)
Revoke a pending invitation (DELETE /v1/members/invitations/{id})
func (Unimplemented) RotateApiKey ¶
func (_ Unimplemented) RotateApiKey(w http.ResponseWriter, r *http.Request, id string, params RotateApiKeyParams)
Rotate an API key (POST /v1/api-keys/{id}/rotate)
func (Unimplemented) RotateInvoicePublicToken ¶
func (_ Unimplemented) RotateInvoicePublicToken(w http.ResponseWriter, r *http.Request, id string, params RotateInvoicePublicTokenParams)
Replace the hosted invoice link (POST /v1/invoices/{id}/rotate-public-token)
func (Unimplemented) ScheduleSubscriptionCancel ¶
func (_ Unimplemented) ScheduleSubscriptionCancel(w http.ResponseWriter, r *http.Request, id string, params ScheduleSubscriptionCancelParams)
Schedule a cancel (POST /v1/subscriptions/{id}/schedule-cancel)
func (Unimplemented) SendCustomerPaymentSetupEmail ¶
func (_ Unimplemented) SendCustomerPaymentSetupEmail(w http.ResponseWriter, r *http.Request, customerId string, params SendCustomerPaymentSetupEmailParams)
Email the customer a link to add a payment method (POST /v1/customers/{customer_id}/payment-methods/send-setup-email)
func (Unimplemented) SendTestEmail ¶
func (_ Unimplemented) SendTestEmail(w http.ResponseWriter, r *http.Request, params SendTestEmailParams)
Send a test email (POST /v1/settings/email/test)
func (Unimplemented) SetCustomerDefaultPaymentMethod ¶
func (_ Unimplemented) SetCustomerDefaultPaymentMethod(w http.ResponseWriter, r *http.Request, customerId string, pmid string, params SetCustomerDefaultPaymentMethodParams)
Make a payment method the default (POST /v1/customers/{customer_id}/payment-methods/{pmID}/default)
func (Unimplemented) SetDefaultDunningPolicy ¶
func (_ Unimplemented) SetDefaultDunningPolicy(w http.ResponseWriter, r *http.Request, id string, params SetDefaultDunningPolicyParams)
Make a dunning policy the default (POST /v1/dunning/policies/{id}/set-default)
func (Unimplemented) SetStripeWebhookSecret ¶
func (_ Unimplemented) SetStripeWebhookSecret(w http.ResponseWriter, r *http.Request, mode SetStripeWebhookSecretParamsMode, params SetStripeWebhookSecretParams)
Set the Stripe webhook signing secret (PATCH /v1/settings/stripe/{mode}/webhook)
func (Unimplemented) SetSubscriptionBillingThresholds ¶
func (_ Unimplemented) SetSubscriptionBillingThresholds(w http.ResponseWriter, r *http.Request, id string, params SetSubscriptionBillingThresholdsParams)
Set billing thresholds (PUT /v1/subscriptions/{id}/billing-thresholds)
func (Unimplemented) StreamWebhookEvents ¶
func (_ Unimplemented) StreamWebhookEvents(w http.ResponseWriter, r *http.Request)
Stream webhook events live (Server-Sent Events) (GET /v1/webhook_events/stream)
func (Unimplemented) UpdateCustomer ¶
func (_ Unimplemented) UpdateCustomer(w http.ResponseWriter, r *http.Request, id string, params UpdateCustomerParams)
Update customer (PATCH /v1/customers/{id})
func (Unimplemented) UpdateDunningPolicy ¶
func (_ Unimplemented) UpdateDunningPolicy(w http.ResponseWriter, r *http.Request, id string, params UpdateDunningPolicyParams)
Replace dunning policy settings (PATCH /v1/dunning/policies/{id})
func (Unimplemented) UpdatePlan ¶
func (_ Unimplemented) UpdatePlan(w http.ResponseWriter, r *http.Request, id string, params UpdatePlanParams)
Update plan (PATCH /v1/plans/{id})
func (Unimplemented) UpdatePlanPrice ¶
func (_ Unimplemented) UpdatePlanPrice(w http.ResponseWriter, r *http.Request, id string, priceId string, params UpdatePlanPriceParams)
Change a price's rate (PATCH /v1/plans/{id}/prices/{price_id})
func (Unimplemented) UpdateSubscriptionItem ¶
func (_ Unimplemented) UpdateSubscriptionItem(w http.ResponseWriter, r *http.Request, id string, itemID string, params UpdateSubscriptionItemParams)
Change subscription item (PATCH /v1/subscriptions/{id}/items/{itemID})
func (Unimplemented) UpdateTenantSettings ¶
func (_ Unimplemented) UpdateTenantSettings(w http.ResponseWriter, r *http.Request, params UpdateTenantSettingsParams)
Update workspace settings (PUT /v1/settings)
func (Unimplemented) UpsertCustomerBillingProfile ¶
func (_ Unimplemented) UpsertCustomerBillingProfile(w http.ResponseWriter, r *http.Request, id string, params UpsertCustomerBillingProfileParams)
Create or replace the customer's billing profile (PUT /v1/customers/{id}/billing-profile)
func (Unimplemented) VoidCreditNote ¶
func (_ Unimplemented) VoidCreditNote(w http.ResponseWriter, r *http.Request, id string, params VoidCreditNoteParams)
Void a draft credit note (POST /v1/credit-notes/{id}/void)
func (Unimplemented) VoidInvoice ¶
func (_ Unimplemented) VoidInvoice(w http.ResponseWriter, r *http.Request, id string, params VoidInvoiceParams)
Void an invoice (POST /v1/invoices/{id}/void)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateCustomerJSONBody ¶
type UpdateCustomerJSONBody struct {
AdditionalEmails []string `json:"additional_emails,omitempty"`
DisplayName string `json:"display_name,omitempty"`
// DunningPolicyId Policy ID, or `""` to use the tenant default.
DunningPolicyId string `json:"dunning_policy_id,omitempty"`
Email string `json:"email,omitempty"`
Status UpdateCustomerJSONBodyStatus `json:"status,omitempty"`
}
UpdateCustomerJSONBody defines parameters for UpdateCustomer.
type UpdateCustomerJSONBodyStatus ¶
type UpdateCustomerJSONBodyStatus string
UpdateCustomerJSONBodyStatus defines parameters for UpdateCustomer.
const ( UpdateCustomerJSONBodyStatusActive UpdateCustomerJSONBodyStatus = "active" UpdateCustomerJSONBodyStatusArchived UpdateCustomerJSONBodyStatus = "archived" )
Defines values for UpdateCustomerJSONBodyStatus.
func (UpdateCustomerJSONBodyStatus) Valid ¶
func (e UpdateCustomerJSONBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the UpdateCustomerJSONBodyStatus enum.
type UpdateCustomerJSONRequestBody ¶
type UpdateCustomerJSONRequestBody UpdateCustomerJSONBody
UpdateCustomerJSONRequestBody defines body for UpdateCustomer for application/json ContentType.
type UpdateCustomerParams ¶
type UpdateCustomerParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
UpdateCustomerParams defines parameters for UpdateCustomer.
type UpdateDunningPolicyJSONRequestBody ¶
type UpdateDunningPolicyJSONRequestBody = DunningPolicyInput
UpdateDunningPolicyJSONRequestBody defines body for UpdateDunningPolicy for application/json ContentType.
type UpdateDunningPolicyParams ¶
type UpdateDunningPolicyParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
UpdateDunningPolicyParams defines parameters for UpdateDunningPolicy.
type UpdatePlanJSONBody ¶
type UpdatePlanJSONBody struct {
// BaseAmountCents 0 or more. Omit to keep the current base fee.
BaseAmountCents int64 `json:"base_amount_cents,omitempty"`
BaseBillTiming UpdatePlanJSONBodyBaseBillTiming `json:"base_bill_timing,omitempty"`
// Description Whitespace is trimmed. Omit to keep the current description; an empty string clears it.
Description string `json:"description,omitempty"`
// Name Whitespace is trimmed. Empty or omitted keeps the current name.
Name string `json:"name,omitempty"`
Status UpdatePlanJSONBodyStatus `json:"status,omitempty"`
// TaxCode Stripe product tax code. Omit to keep the current code; an empty string clears it, and the base fee then uses the tenant's `default_product_tax_code`.
TaxCode string `json:"tax_code,omitempty"`
}
UpdatePlanJSONBody defines parameters for UpdatePlan.
type UpdatePlanJSONBodyBaseBillTiming ¶
type UpdatePlanJSONBodyBaseBillTiming string
UpdatePlanJSONBodyBaseBillTiming defines parameters for UpdatePlan.
const ( InAdvance UpdatePlanJSONBodyBaseBillTiming = "in_advance" InArrears UpdatePlanJSONBodyBaseBillTiming = "in_arrears" )
Defines values for UpdatePlanJSONBodyBaseBillTiming.
func (UpdatePlanJSONBodyBaseBillTiming) Valid ¶
func (e UpdatePlanJSONBodyBaseBillTiming) Valid() bool
Valid indicates whether the value is a known member of the UpdatePlanJSONBodyBaseBillTiming enum.
type UpdatePlanJSONBodyStatus ¶
type UpdatePlanJSONBodyStatus string
UpdatePlanJSONBodyStatus defines parameters for UpdatePlan.
const ( Active UpdatePlanJSONBodyStatus = "active" Archived UpdatePlanJSONBodyStatus = "archived" )
Defines values for UpdatePlanJSONBodyStatus.
func (UpdatePlanJSONBodyStatus) Valid ¶
func (e UpdatePlanJSONBodyStatus) Valid() bool
Valid indicates whether the value is a known member of the UpdatePlanJSONBodyStatus enum.
type UpdatePlanJSONRequestBody ¶
type UpdatePlanJSONRequestBody UpdatePlanJSONBody
UpdatePlanJSONRequestBody defines body for UpdatePlan for application/json ContentType.
type UpdatePlanParams ¶
type UpdatePlanParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
UpdatePlanParams defines parameters for UpdatePlan.
type UpdatePlanPriceJSONRequestBody ¶
type UpdatePlanPriceJSONRequestBody = PriceShape
UpdatePlanPriceJSONRequestBody defines body for UpdatePlanPrice for application/json ContentType.
type UpdatePlanPriceParams ¶
type UpdatePlanPriceParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
UpdatePlanPriceParams defines parameters for UpdatePlanPrice.
type UpdateSubscriptionItemJSONBody ¶
type UpdateSubscriptionItemJSONBody struct {
// Immediate Apply a plan change now instead of at the end of the period. Ignored for quantity changes.
Immediate bool `json:"immediate,omitempty"`
// NewPlanId The plan to move the item to. Must differ from the current one and use the same base-fee billing timing (in advance or in arrears).
NewPlanId string `json:"new_plan_id,omitempty"`
// Quantity The new quantity. Must differ from the current one.
Quantity int64 `json:"quantity,omitempty"`
}
UpdateSubscriptionItemJSONBody defines parameters for UpdateSubscriptionItem.
type UpdateSubscriptionItemJSONRequestBody ¶
type UpdateSubscriptionItemJSONRequestBody UpdateSubscriptionItemJSONBody
UpdateSubscriptionItemJSONRequestBody defines body for UpdateSubscriptionItem for application/json ContentType.
type UpdateSubscriptionItemParams ¶
type UpdateSubscriptionItemParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
UpdateSubscriptionItemParams defines parameters for UpdateSubscriptionItem.
type UpdateTenantSettingsJSONRequestBody ¶
type UpdateTenantSettingsJSONRequestBody = TenantSettingsInput
UpdateTenantSettingsJSONRequestBody defines body for UpdateTenantSettings for application/json ContentType.
type UpdateTenantSettingsParams ¶
type UpdateTenantSettingsParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
UpdateTenantSettingsParams defines parameters for UpdateTenantSettings.
type UpsertCustomerBillingProfileJSONRequestBody ¶
type UpsertCustomerBillingProfileJSONRequestBody = CustomerBillingProfileInput
UpsertCustomerBillingProfileJSONRequestBody defines body for UpsertCustomerBillingProfile for application/json ContentType.
type UpsertCustomerBillingProfileParams ¶
type UpsertCustomerBillingProfileParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
UpsertCustomerBillingProfileParams defines parameters for UpsertCustomerBillingProfile.
type UsageAggregate ¶
type UsageAggregate struct {
// ActiveCustomers Distinct customers among the matching events.
ActiveCustomers int `json:"active_customers"`
// ActiveMeters Distinct meters among the matching events.
ActiveMeters int `json:"active_meters"`
// ByMeter One row per meter, largest total first.
ByMeter []struct {
// Aggregation The meter's aggregation (`sum`, `count`, `max`, `last`),
// which every price of the meter bills under. Empty when
// unknown.
Aggregation string `json:"aggregation"`
// Customers Distinct customers with events on this meter.
Customers int `json:"customers"`
// Daily One entry per calendar day (in `tz`) with events, oldest first.
Daily []struct {
Date openapi_types.Date `json:"date"`
// Value The day's usage under the meter's aggregation.
Value string `json:"value"`
} `json:"daily"`
Events int `json:"events"`
MeterId string `json:"meter_id"`
// Peak Highest single reported quantity, as a decimal string.
Peak string `json:"peak"`
// Total Plain sum of reported quantities, as a decimal string.
Total string `json:"total"`
// Value Usage under the meter's aggregation, as a decimal string.
// `max` and `last` take each customer's peak or latest
// reading in the window and add them across customers.
// Billing applies them per billing period.
Value string `json:"value"`
} `json:"by_meter"`
TotalEvents int `json:"total_events"`
// TotalUnits Sum of all matching quantities across meters, as a decimal
// string. It adds different units and ignores each meter's
// aggregation; use `by_meter[].value` instead.
TotalUnits string `json:"total_units"`
}
UsageAggregate defines model for UsageAggregate.
type UsageBillingStatus ¶
type UsageBillingStatus string
UsageBillingStatus What Hardcount found when the event arrived. It checked the event against the customer's subscriptions, the plans and prices in force, and the invoices already built at that moment. Sent only on the answer that wrote the event; the event is stored all the same.
A status that is present was true at that moment:
- `after_close`: the event's time is already invoiced. A spend-threshold invoice counts only once it is paid. Bill the event with a one-off invoice if it should be charged.
- `not_on_plan`: a billing period not invoiced yet holds the event's time, but its plan has no price for this meter.
- `outside_subscription`: no active or trialing subscription of the customer bills the event's time. For example, it has none, or the time is before one starts, in a free trial, or after one ends or its scheduled cancel.
- `no_price`: the plan that bills the event's time prices this meter, but no price of that plan takes the event's `dimensions`. A price takes an event whose dimensions include all of its `dimension_match`, compared as strings: the number `1` is not the string `"1"`.
No `billing_status` means Hardcount found no reason then. It is not a promise that the event will be billed. Hardcount checks only the customer's current billing periods: time after a period end whose invoice is not built yet is not checked, nor is time after a trial's end before Hardcount ends the trial. A later change can change the outcome either way: a subscription created, activated or changed, a trial extended, a scheduled cancel undone, or a price added. The invoice is the final answer.
Two cases can make a present status wrong: a price change whose save began before a billing period started and finished after the request read the prices, and a subscription change saved while the request is in flight. Absent on a replay and on a read.
const ( AfterClose UsageBillingStatus = "after_close" NoPrice UsageBillingStatus = "no_price" NotOnPlan UsageBillingStatus = "not_on_plan" OutsideSubscription UsageBillingStatus = "outside_subscription" )
Defines values for UsageBillingStatus.
func (UsageBillingStatus) Valid ¶
func (e UsageBillingStatus) Valid() bool
Valid indicates whether the value is a known member of the UsageBillingStatus enum.
type UsageEvent ¶
type UsageEvent struct {
// BillingStatus What Hardcount found when the event arrived. It checked the event
// against the customer's subscriptions, the plans and prices in force,
// and the invoices already built at that moment. Sent only on the
// answer that wrote the event; the event is stored all the same.
//
// A status that is present was true at that moment:
//
// - `after_close`: the event's time is already invoiced. A
// spend-threshold invoice counts only once it is paid. Bill the
// event with a one-off invoice if it should be charged.
// - `not_on_plan`: a billing period not invoiced yet holds the event's
// time, but its plan has no price for this meter.
// - `outside_subscription`: no active or trialing subscription of the
// customer bills the event's time. For example, it has none, or the
// time is before one starts, in a free trial, or after one ends or
// its scheduled cancel.
// - `no_price`: the plan that bills the event's time prices this
// meter, but no price of that plan takes the event's `dimensions`.
// A price takes an event whose dimensions include all of its
// `dimension_match`, compared as strings: the number `1` is not the
// string `"1"`.
//
// No `billing_status` means Hardcount found no reason then. It is not a
// promise that the event will be billed. Hardcount checks only the
// customer's current billing periods: time after a period end whose
// invoice is not built yet is not checked, nor is time after a trial's
// end before Hardcount ends the trial. A later change can change the
// outcome either way: a subscription created, activated or changed, a
// trial extended, a scheduled cancel undone, or a price added. The
// invoice is the final answer.
//
// Two cases can make a present status wrong: a price change whose
// save began before a billing period started and finished after the
// request read the prices, and a subscription change saved while the
// request is in flight. Absent on a replay and on a read.
BillingStatus UsageBillingStatus `json:"billing_status,omitempty"`
CustomerId string `json:"customer_id"`
// Dimensions The dimension values sent with the event. Absent when none were sent.
Dimensions map[string]interface{} `json:"dimensions,omitempty"`
Id string `json:"id"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
MeterId string `json:"meter_id"`
// Origin How the event arrived. `backfill` means `POST /v1/usage-events/backfill`.
Origin UsageEventOrigin `json:"origin,omitempty"`
// ProviderCostCents What serving this event cost you at your provider, in US cents as
// a decimal string (e.g. "0.45"), set when the event arrived: from
// your provider cost rates, or the cost the sender reported (see
// `provider_cost_source`). Absent when the cost is unknown or the
// event has no costed dimensions.
ProviderCostCents string `json:"provider_cost_cents,omitempty"`
// ProviderCostSource Where `provider_cost_cents` came from: `table` (your provider
// cost rates), `observed` (the cost the sender reported), or
// `not_applicable` (the meter has no costed dimensions). Absent when
// the cost is unknown.
ProviderCostSource UsageEventProviderCostSource `json:"provider_cost_source,omitempty"`
// Quantity Exact quantity as a decimal string (e.g. "1.5").
Quantity string `json:"quantity"`
TenantId string `json:"tenant_id,omitempty"`
Timestamp time.Time `json:"timestamp"`
}
UsageEvent defines model for UsageEvent.
type UsageEventBatchEventResult ¶
type UsageEventBatchEventResult struct {
// BillingStatus What Hardcount found when the event arrived. It checked the event
// against the customer's subscriptions, the plans and prices in force,
// and the invoices already built at that moment. Sent only on the
// answer that wrote the event; the event is stored all the same.
//
// A status that is present was true at that moment:
//
// - `after_close`: the event's time is already invoiced. A
// spend-threshold invoice counts only once it is paid. Bill the
// event with a one-off invoice if it should be charged.
// - `not_on_plan`: a billing period not invoiced yet holds the event's
// time, but its plan has no price for this meter.
// - `outside_subscription`: no active or trialing subscription of the
// customer bills the event's time. For example, it has none, or the
// time is before one starts, in a free trial, or after one ends or
// its scheduled cancel.
// - `no_price`: the plan that bills the event's time prices this
// meter, but no price of that plan takes the event's `dimensions`.
// A price takes an event whose dimensions include all of its
// `dimension_match`, compared as strings: the number `1` is not the
// string `"1"`.
//
// No `billing_status` means Hardcount found no reason then. It is not a
// promise that the event will be billed. Hardcount checks only the
// customer's current billing periods: time after a period end whose
// invoice is not built yet is not checked, nor is time after a trial's
// end before Hardcount ends the trial. A later change can change the
// outcome either way: a subscription created, activated or changed, a
// trial extended, a scheduled cancel undone, or a price added. The
// invoice is the final answer.
//
// Two cases can make a present status wrong: a price change whose
// save began before a billing period started and finished after the
// request read the prices, and a subscription change saved while the
// request is in flight. Absent on a replay and on a read.
BillingStatus UsageBillingStatus `json:"billing_status,omitempty"`
// Status `ingested`: the batch wrote the event. `deduplicated`: an event
// with its `idempotency_key` was already stored, earlier or in
// this batch, so it was not stored again.
Status UsageEventBatchEventResultStatus `json:"status"`
}
UsageEventBatchEventResult defines model for UsageEventBatchEventResult.
type UsageEventBatchEventResultStatus ¶
type UsageEventBatchEventResultStatus string
UsageEventBatchEventResultStatus `ingested`: the batch wrote the event. `deduplicated`: an event with its `idempotency_key` was already stored, earlier or in this batch, so it was not stored again.
const ( Deduplicated UsageEventBatchEventResultStatus = "deduplicated" Ingested UsageEventBatchEventResultStatus = "ingested" )
Defines values for UsageEventBatchEventResultStatus.
func (UsageEventBatchEventResultStatus) Valid ¶
func (e UsageEventBatchEventResultStatus) Valid() bool
Valid indicates whether the value is a known member of the UsageEventBatchEventResultStatus enum.
type UsageEventBatchResult ¶
type UsageEventBatchResult struct {
// AfterClose Of `ingested`, the events answered `billing_status` `after_close`.
AfterClose int `json:"after_close"`
// Deduplicated Idempotency replays — already ingested, counted as success.
Deduplicated int `json:"deduplicated"`
// Ingested Newly written events.
Ingested int `json:"ingested"`
// NoPrice Of `ingested`, the events answered `billing_status` `no_price`.
NoPrice int `json:"no_price"`
// NotOnPlan Of `ingested`, the events answered `billing_status` `not_on_plan`.
NotOnPlan int `json:"not_on_plan"`
// OutsideSubscription Of `ingested`, the events answered `billing_status` `outside_subscription`.
OutsideSubscription int `json:"outside_subscription"`
// Results One entry per event, in the order sent: `results[i]` is the
// request's event `i`.
Results []UsageEventBatchEventResult `json:"results"`
// Total Events in the request.
Total int `json:"total"`
}
UsageEventBatchResult defines model for UsageEventBatchResult.
type UsageEventOrigin ¶
type UsageEventOrigin string
UsageEventOrigin How the event arrived. `backfill` means `POST /v1/usage-events/backfill`.
const ( Api UsageEventOrigin = "api" Backfill UsageEventOrigin = "backfill" )
Defines values for UsageEventOrigin.
func (UsageEventOrigin) Valid ¶
func (e UsageEventOrigin) Valid() bool
Valid indicates whether the value is a known member of the UsageEventOrigin enum.
type UsageEventProviderCostSource ¶
type UsageEventProviderCostSource string
UsageEventProviderCostSource Where `provider_cost_cents` came from: `table` (your provider cost rates), `observed` (the cost the sender reported), or `not_applicable` (the meter has no costed dimensions). Absent when the cost is unknown.
const ( NotApplicable UsageEventProviderCostSource = "not_applicable" Observed UsageEventProviderCostSource = "observed" Table UsageEventProviderCostSource = "table" )
Defines values for UsageEventProviderCostSource.
func (UsageEventProviderCostSource) Valid ¶
func (e UsageEventProviderCostSource) Valid() bool
Valid indicates whether the value is a known member of the UsageEventProviderCostSource enum.
type VoidCreditNoteParams ¶
type VoidCreditNoteParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
VoidCreditNoteParams defines parameters for VoidCreditNote.
type VoidInvoiceParams ¶
type VoidInvoiceParams struct {
// IdempotencyKey Makes the call safe to retry. Send a unique value (a UUID works) and
// the same value on every retry. For 24 hours, a repeat with the same
// key, method, path and body gets the first response again, with an
// `Idempotent-Replayed: true` header, instead of running again. The
// error cases are in docs/api-surface.md. The usage routes do not take
// it: each usage event carries its own `idempotency_key`.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
VoidInvoiceParams defines parameters for VoidInvoice.
type WebhookDeliveryReplayResult ¶
type WebhookDeliveryReplayResult struct {
// DeliveryId The new delivery to this endpoint.
DeliveryId string `json:"delivery_id"`
// EventId The new event created by the replay.
EventId string `json:"event_id"`
// ReplayOf The original event.
ReplayOf string `json:"replay_of"`
Status WebhookDeliveryReplayResultStatus `json:"status"`
}
WebhookDeliveryReplayResult defines model for WebhookDeliveryReplayResult.
type WebhookDeliveryReplayResultStatus ¶
type WebhookDeliveryReplayResultStatus string
WebhookDeliveryReplayResultStatus defines model for WebhookDeliveryReplayResult.Status.
const (
WebhookDeliveryReplayResultStatusQueued WebhookDeliveryReplayResultStatus = "queued"
)
Defines values for WebhookDeliveryReplayResultStatus.
func (WebhookDeliveryReplayResultStatus) Valid ¶
func (e WebhookDeliveryReplayResultStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookDeliveryReplayResultStatus enum.
type WebhookEndpoint ¶
type WebhookEndpoint struct {
// Active false = paused.
Active bool `json:"active"`
CreatedAt time.Time `json:"created_at"`
Description string `json:"description,omitempty"`
// Events Subscribed event types. `*` means all.
Events []string `json:"events"`
Id string `json:"id"`
Livemode bool `json:"livemode"`
SecondarySecretExpiresAt time.Time `json:"secondary_secret_expires_at,omitempty"`
// SecondarySecretLast4 The previous signing secret, during a rotation grace period.
SecondarySecretLast4 string `json:"secondary_secret_last4,omitempty"`
SecretLast4 string `json:"secret_last4"`
TenantId string `json:"tenant_id,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
Url string `json:"url"`
}
WebhookEndpoint defines model for WebhookEndpoint.
type WebhookEndpointCreated ¶
type WebhookEndpointCreated struct {
Endpoint WebhookEndpoint `json:"endpoint"`
// Secret The signing secret (`whsec_…`). Store it now; Hardcount does not show it again.
Secret string `json:"secret"`
}
WebhookEndpointCreated A new webhook endpoint and its signing secret. The secret is shown only here.
type WebhookEndpointDelivery ¶
type WebhookEndpointDelivery struct {
AttemptCount int `json:"attempt_count"`
CompletedAt time.Time `json:"completed_at"`
CreatedAt time.Time `json:"created_at"`
Error string `json:"error"`
EventId string `json:"event_id"`
EventType string `json:"event_type"`
Id string `json:"id"`
// IsReplay The delivery came from a replay.
IsReplay bool `json:"is_replay"`
NextRetryAt time.Time `json:"next_retry_at"`
ReplayOfEventId string `json:"replay_of_event_id,omitempty"`
// ResponseBody First 4 KB of the receiver's response.
ResponseBody string `json:"response_body"`
Status WebhookEndpointDeliveryStatus `json:"status"`
// StatusCode HTTP status from the receiver. 0 when there was no response.
StatusCode int `json:"status_code"`
}
WebhookEndpointDelivery defines model for WebhookEndpointDelivery.
type WebhookEndpointDeliveryStatus ¶
type WebhookEndpointDeliveryStatus string
WebhookEndpointDeliveryStatus defines model for WebhookEndpointDelivery.Status.
const ( WebhookEndpointDeliveryStatusFailed WebhookEndpointDeliveryStatus = "failed" WebhookEndpointDeliveryStatusPending WebhookEndpointDeliveryStatus = "pending" WebhookEndpointDeliveryStatusSucceeded WebhookEndpointDeliveryStatus = "succeeded" )
Defines values for WebhookEndpointDeliveryStatus.
func (WebhookEndpointDeliveryStatus) Valid ¶
func (e WebhookEndpointDeliveryStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookEndpointDeliveryStatus enum.
type WebhookEndpointStats ¶
type WebhookEndpointStats struct {
EndpointId string `json:"endpoint_id"`
Failed int `json:"failed"`
Succeeded int `json:"succeeded"`
// SuccessRate Percent (0-100) of finished deliveries that succeeded. Pending deliveries are not counted. 0 when none finished.
SuccessRate float32 `json:"success_rate"`
// TotalDeliveries All deliveries, including pending ones.
TotalDeliveries int `json:"total_deliveries"`
}
WebhookEndpointStats defines model for WebhookEndpointStats.
type WebhookEvent ¶
type WebhookEvent struct {
CreatedAt time.Time `json:"created_at"`
EventType string `json:"event_type"`
Id string `json:"id"`
Livemode bool `json:"livemode"`
// Payload The event's data: the resource the event is about, under the
// resource's name (`invoice`, `subscription`, `customer`,
// `payment_method`, `dunning_run` or `credit_balance`), as the
// API returns it, and the few keys the event adds beside it.
// docs/webhooks.md lists what each event carries;
// `payment.dispute_opened` and `payment.dispute_closed` carry a
// `DisputeWebhookEventData`.
Payload map[string]interface{} `json:"payload"`
// ReplayOfEventId Set on a replay. The event the replay was made from.
ReplayOfEventId string `json:"replay_of_event_id,omitempty"`
TenantId string `json:"tenant_id,omitempty"`
}
WebhookEvent One outbound webhook event, as Hardcount created it.
type WebhookEventDeliveryAttempt ¶
type WebhookEventDeliveryAttempt struct {
// AttemptNo Position in the timeline, starting at 1.
AttemptNo int `json:"attempt_no"`
AttemptedAt time.Time `json:"attempted_at"`
CompletedAt time.Time `json:"completed_at"`
EndpointDescription string `json:"endpoint_description"`
EndpointId string `json:"endpoint_id"`
EndpointUrl string `json:"endpoint_url"`
Error string `json:"error"`
// EventId The event this delivery belongs to. When `is_replay` is true, the replay's own id; the message it sent carries the original event's `id` (`root_event_id`).
EventId string `json:"event_id"`
Id string `json:"id"`
IsReplay bool `json:"is_replay"`
NextRetryAt time.Time `json:"next_retry_at"`
// ReplayEventId The replay's event id when `is_replay` is true; otherwise empty.
ReplayEventId string `json:"replay_event_id"`
// RequestPayloadSha256 SHA-256 of the event payload. Equal values mean the same payload was sent.
RequestPayloadSha256 string `json:"request_payload_sha256"`
// ResponseBody First 4 KB of the receiver's response.
ResponseBody string `json:"response_body"`
Status WebhookEventDeliveryAttemptStatus `json:"status"`
StatusCode int `json:"status_code"`
}
WebhookEventDeliveryAttempt defines model for WebhookEventDeliveryAttempt.
type WebhookEventDeliveryAttemptStatus ¶
type WebhookEventDeliveryAttemptStatus string
WebhookEventDeliveryAttemptStatus defines model for WebhookEventDeliveryAttempt.Status.
const ( Failed WebhookEventDeliveryAttemptStatus = "failed" Pending WebhookEventDeliveryAttemptStatus = "pending" Succeeded WebhookEventDeliveryAttemptStatus = "succeeded" )
Defines values for WebhookEventDeliveryAttemptStatus.
func (WebhookEventDeliveryAttemptStatus) Valid ¶
func (e WebhookEventDeliveryAttemptStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookEventDeliveryAttemptStatus enum.
type WebhookReplayResult ¶
type WebhookReplayResult struct {
// EventId The new event created by the replay.
EventId string `json:"event_id"`
// ReplayOf The original event.
ReplayOf string `json:"replay_of"`
Status WebhookReplayResultStatus `json:"status"`
}
WebhookReplayResult defines model for WebhookReplayResult.
type WebhookReplayResultStatus ¶
type WebhookReplayResultStatus string
WebhookReplayResultStatus defines model for WebhookReplayResult.Status.
const ( WebhookReplayResultStatusNoMatchingEndpoints WebhookReplayResultStatus = "no_matching_endpoints" WebhookReplayResultStatusQueued WebhookReplayResultStatus = "queued" )
Defines values for WebhookReplayResultStatus.
func (WebhookReplayResultStatus) Valid ¶
func (e WebhookReplayResultStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookReplayResultStatus enum.
type WebhookSecretRotation ¶
type WebhookSecretRotation struct {
// SecondaryValidUntil Until this time, deliveries are also signed with the old secret.
SecondaryValidUntil time.Time `json:"secondary_valid_until,omitempty"`
Secret string `json:"secret"`
}
WebhookSecretRotation The endpoint's new signing secret. It is shown only here.
type WebhookStreamFrame ¶
type WebhookStreamFrame struct {
CreatedAt time.Time `json:"created_at"`
// CustomerId The customer the event is about: the `customer_id` of the
// resource in `data` (its `id` for a `customer.*` event), or empty.
// For an event queued before `data` held the resource, its
// `data.customer_id`.
CustomerId string `json:"customer_id"`
EventId string `json:"event_id"`
EventType string `json:"event_type"`
LastAttemptAt time.Time `json:"last_attempt_at"`
Livemode bool `json:"livemode"`
ReplayOfEventId string `json:"replay_of_event_id"`
// Status Delivery state. Live frames send `pending`, `succeeded` or
// `failed`. Frames in the first batch send `pending`, `failed`,
// `delivered` (all deliveries succeeded) or `no_endpoints`.
Status string `json:"status"`
}
WebhookStreamFrame The JSON in each `data:` line of `/v1/webhook_events/stream`.