Documentation
¶
Overview ¶
Package v3 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- 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
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type Address
- type AppPagePaginatedResponse
- type BadRequest
- type BadRequestError
- type BaseError
- type BillingAddress
- type BillingApp
- func (t BillingApp) AsBillingAppExternalInvoicing() (BillingAppExternalInvoicing, error)
- func (t BillingApp) AsBillingAppSandbox() (BillingAppSandbox, error)
- func (t BillingApp) AsBillingAppStripe() (BillingAppStripe, error)
- func (t BillingApp) Discriminator() (string, error)
- func (t *BillingApp) FromBillingAppExternalInvoicing(v BillingAppExternalInvoicing) error
- func (t *BillingApp) FromBillingAppSandbox(v BillingAppSandbox) error
- func (t *BillingApp) FromBillingAppStripe(v BillingAppStripe) error
- func (t BillingApp) MarshalJSON() ([]byte, error)
- func (t *BillingApp) MergeBillingAppExternalInvoicing(v BillingAppExternalInvoicing) error
- func (t *BillingApp) MergeBillingAppSandbox(v BillingAppSandbox) error
- func (t *BillingApp) MergeBillingAppStripe(v BillingAppStripe) error
- func (t *BillingApp) UnmarshalJSON(b []byte) error
- func (t BillingApp) ValueByDiscriminator() (interface{}, error)
- type BillingAppCatalogItem
- type BillingAppCustomerData
- type BillingAppCustomerDataExternalInvoicing
- type BillingAppCustomerDataStripe
- type BillingAppExternalInvoicing
- type BillingAppExternalInvoicingType
- type BillingAppReference
- type BillingAppSandbox
- type BillingAppSandboxType
- type BillingAppStatus
- type BillingAppStripe
- type BillingAppStripeCheckoutSessionCustomTextParams
- type BillingAppStripeCheckoutSessionMode
- type BillingAppStripeCheckoutSessionUIMode
- type BillingAppStripeCreateCheckoutSessionBillingAddressCollection
- type BillingAppStripeCreateCheckoutSessionConsentCollection
- type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement
- type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition
- type BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions
- type BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService
- type BillingAppStripeCreateCheckoutSessionCustomerUpdate
- type BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior
- type BillingAppStripeCreateCheckoutSessionRedirectOnCompletion
- type BillingAppStripeCreateCheckoutSessionRequestOptions
- type BillingAppStripeCreateCheckoutSessionResult
- type BillingAppStripeCreateCheckoutSessionTaxIdCollection
- type BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired
- type BillingAppStripeCreateCustomerPortalSessionOptions
- type BillingAppStripeCreateCustomerPortalSessionResult
- type BillingAppStripeType
- type BillingAppType
- type BillingCustomer
- type BillingCustomerData
- type BillingCustomerStripeCreateCheckoutSessionRequest
- type BillingCustomerStripeCreateCustomerPortalSessionRequest
- type BillingCustomerUsageAttribution
- type BillingEntitlementAccessResult
- type BillingEntitlementType
- type BillingParty
- type BillingPartyAddresses
- type BillingPartyTaxIdentity
- type BillingProfile
- type BillingProfileAppReferences
- type BillingProfilePagePaginatedResponse
- type BillingProfileReference
- type BillingSubscription
- type BillingSubscriptionCancel
- type BillingSubscriptionChange
- type BillingSubscriptionChangeResponse
- type BillingSubscriptionCreate
- type BillingSubscriptionEditTiming
- func (t BillingSubscriptionEditTiming) AsBillingSubscriptionEditTimingEnum() (BillingSubscriptionEditTimingEnum, error)
- func (t BillingSubscriptionEditTiming) AsDateTime() (DateTime, error)
- func (t *BillingSubscriptionEditTiming) FromBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error
- func (t *BillingSubscriptionEditTiming) FromDateTime(v DateTime) error
- func (t BillingSubscriptionEditTiming) MarshalJSON() ([]byte, error)
- func (t *BillingSubscriptionEditTiming) MergeBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error
- func (t *BillingSubscriptionEditTiming) MergeDateTime(v DateTime) error
- func (t *BillingSubscriptionEditTiming) UnmarshalJSON(b []byte) error
- type BillingSubscriptionEditTimingEnum
- type BillingSubscriptionStatus
- type BillingTaxBehavior
- type BillingTaxConfig
- type BillingTaxConfigExternalInvoicing
- type BillingTaxConfigStripe
- type BillingTaxIdentificationCode
- type BillingWorkflow
- type BillingWorkflowCollectionAlignment
- func (t BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentAnchored() (BillingWorkflowCollectionAlignmentAnchored, error)
- func (t BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentSubscription() (BillingWorkflowCollectionAlignmentSubscription, error)
- func (t BillingWorkflowCollectionAlignment) Discriminator() (string, error)
- func (t *BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentAnchored(v BillingWorkflowCollectionAlignmentAnchored) error
- func (t *BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentSubscription(v BillingWorkflowCollectionAlignmentSubscription) error
- func (t BillingWorkflowCollectionAlignment) MarshalJSON() ([]byte, error)
- func (t *BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentAnchored(v BillingWorkflowCollectionAlignmentAnchored) error
- func (t *BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentSubscription(v BillingWorkflowCollectionAlignmentSubscription) error
- func (t *BillingWorkflowCollectionAlignment) UnmarshalJSON(b []byte) error
- func (t BillingWorkflowCollectionAlignment) ValueByDiscriminator() (interface{}, error)
- type BillingWorkflowCollectionAlignmentAnchored
- type BillingWorkflowCollectionAlignmentAnchoredType
- type BillingWorkflowCollectionAlignmentSubscription
- type BillingWorkflowCollectionAlignmentSubscriptionType
- type BillingWorkflowCollectionSettings
- type BillingWorkflowInvoicingSettings
- type BillingWorkflowPaymentChargeAutomaticallySettings
- type BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod
- type BillingWorkflowPaymentSendInvoiceSettings
- type BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod
- type BillingWorkflowPaymentSettings
- func (t BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentChargeAutomaticallySettings() (BillingWorkflowPaymentChargeAutomaticallySettings, error)
- func (t BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentSendInvoiceSettings() (BillingWorkflowPaymentSendInvoiceSettings, error)
- func (t BillingWorkflowPaymentSettings) Discriminator() (string, error)
- func (t *BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentChargeAutomaticallySettings(v BillingWorkflowPaymentChargeAutomaticallySettings) error
- func (t *BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentSendInvoiceSettings(v BillingWorkflowPaymentSendInvoiceSettings) error
- func (t BillingWorkflowPaymentSettings) MarshalJSON() ([]byte, error)
- func (t *BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentChargeAutomaticallySettings(v BillingWorkflowPaymentChargeAutomaticallySettings) error
- func (t *BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentSendInvoiceSettings(v BillingWorkflowPaymentSendInvoiceSettings) error
- func (t *BillingWorkflowPaymentSettings) UnmarshalJSON(b []byte) error
- func (t BillingWorkflowPaymentSettings) ValueByDiscriminator() (interface{}, error)
- type BillingWorkflowTaxSettings
- type CancelSubscriptionJSONRequestBody
- type ChangeSubscriptionJSONRequestBody
- type ChiServerOptions
- type Conflict
- type ConflictError
- type CountryCode
- type CreateBillingProfileJSONRequestBody
- type CreateBillingProfileRequest
- type CreateCustomerJSONRequestBody
- type CreateCustomerRequest
- type CreateCustomerStripeCheckoutSessionJSONRequestBody
- type CreateCustomerStripePortalSessionJSONRequestBody
- type CreateMeterJSONRequestBody
- type CreateMeterRequest
- type CreateSubscriptionJSONRequestBody
- type CurrencyCode
- type CustomerPagePaginatedResponse
- type DateTime
- type ExternalResourceKey
- type Forbidden
- type ForbiddenError
- type Gone
- type GoneError
- type ISO8601Duration
- type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody
- type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody
- type IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody
- type IngestMeteringEventsJSONBody
- type IngestMeteringEventsJSONBody1
- type IngestMeteringEventsJSONRequestBody
- type InvalidParamFormatError
- type InvalidParameterChoiceItem
- type InvalidParameterChoiceItemRule
- type InvalidParameterDependentItem
- type InvalidParameterDependentItemRule
- type InvalidParameterMaximumLength
- type InvalidParameterMaximumLengthRule
- type InvalidParameterMinimumLength
- type InvalidParameterMinimumLengthRule
- type InvalidParameterStandard
- type InvalidParameters
- type InvalidParameters_Item
- func (t InvalidParameters_Item) AsInvalidParameterChoiceItem() (InvalidParameterChoiceItem, error)
- func (t InvalidParameters_Item) AsInvalidParameterDependentItem() (InvalidParameterDependentItem, error)
- func (t InvalidParameters_Item) AsInvalidParameterMaximumLength() (InvalidParameterMaximumLength, error)
- func (t InvalidParameters_Item) AsInvalidParameterMinimumLength() (InvalidParameterMinimumLength, error)
- func (t InvalidParameters_Item) AsInvalidParameterStandard() (InvalidParameterStandard, error)
- func (t *InvalidParameters_Item) FromInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error
- func (t *InvalidParameters_Item) FromInvalidParameterDependentItem(v InvalidParameterDependentItem) error
- func (t *InvalidParameters_Item) FromInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error
- func (t *InvalidParameters_Item) FromInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error
- func (t *InvalidParameters_Item) FromInvalidParameterStandard(v InvalidParameterStandard) error
- func (t InvalidParameters_Item) MarshalJSON() ([]byte, error)
- func (t *InvalidParameters_Item) MergeInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error
- func (t *InvalidParameters_Item) MergeInvalidParameterDependentItem(v InvalidParameterDependentItem) error
- func (t *InvalidParameters_Item) MergeInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error
- func (t *InvalidParameters_Item) MergeInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error
- func (t *InvalidParameters_Item) MergeInvalidParameterStandard(v InvalidParameterStandard) error
- func (t *InvalidParameters_Item) UnmarshalJSON(b []byte) error
- type InvalidRules
- type Labels
- type ListAppsParams
- type ListBillingProfilesParams
- type ListCustomerEntitlementAccessResponseData
- type ListCustomersParams
- type ListCustomersParamsFilter
- type ListMetersParams
- type ListSubscriptionsParams
- type Meter
- type MeterAggregation
- type MeterPagePaginatedResponse
- type MeteringEvent
- type MeteringEventDatacontenttype
- type MiddlewareFunc
- type NotFound
- type NotFoundError
- type PageMeta
- type PagePaginationQuery
- type PaginatedMeta
- type RecurringPeriod
- type RequiredHeaderError
- type RequiredParamError
- type ResourceKey
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CancelSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ChangeSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateBillingProfile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateCustomer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteBillingProfile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteCustomer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApp(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetBillingProfile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCustomer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCustomerBilling(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListApps(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListBillingProfiles(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCustomers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListMeters(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSubscriptions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UnscheduleCancelation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateBillingProfile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpsertCustomer(w http.ResponseWriter, r *http.Request)
- type SortQuery
- type SubscriptionPagePaginatedResponse
- type TooManyValuesForParamError
- type ULID
- type Unauthorized
- type UnauthorizedError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
- func (_ Unimplemented) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
- func (_ Unimplemented) CreateBillingProfile(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreateCustomer(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) CreateMeter(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreateSubscription(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
- func (_ Unimplemented) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) DeleteMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
- func (_ Unimplemented) GetApp(w http.ResponseWriter, r *http.Request, appId ULID)
- func (_ Unimplemented) GetBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
- func (_ Unimplemented) GetCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) GetCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
- func (_ Unimplemented) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
- func (_ Unimplemented) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListApps(w http.ResponseWriter, r *http.Request, params ListAppsParams)
- func (_ Unimplemented) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams)
- func (_ Unimplemented) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)
- func (_ Unimplemented) ListMeters(w http.ResponseWriter, r *http.Request, params ListMetersParams)
- func (_ Unimplemented) ListSubscriptions(w http.ResponseWriter, r *http.Request, params ListSubscriptionsParams)
- func (_ Unimplemented) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
- func (_ Unimplemented) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
- func (_ Unimplemented) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
- type UnmarshalingParamError
- type UpdateBillingProfileJSONRequestBody
- type UpdateCustomerBillingAppDataJSONRequestBody
- type UpdateCustomerBillingJSONRequestBody
- type UpsertAppCustomerDataRequest
- type UpsertBillingProfileRequest
- type UpsertCustomerBillingDataRequest
- type UpsertCustomerJSONRequestBody
- type UpsertCustomerRequest
- type UsageAttributionSubjectKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
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 Address ¶
type Address struct {
// City City.
City *string `json:"city,omitempty"`
// Country Country code in [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 format.
Country *CountryCode `json:"country,omitempty"`
// Line1 First line of the address.
Line1 *string `json:"line1,omitempty"`
// Line2 Second line of the address.
Line2 *string `json:"line2,omitempty"`
// PhoneNumber Phone number.
PhoneNumber *string `json:"phone_number,omitempty"`
// PostalCode Postal code.
PostalCode *string `json:"postal_code,omitempty"`
// State State or province.
State *string `json:"state,omitempty"`
}
Address Address
type AppPagePaginatedResponse ¶
type AppPagePaginatedResponse struct {
Data []BillingApp `json:"data"`
// Meta returns the pagination information
Meta PaginatedMeta `json:"meta"`
}
AppPagePaginatedResponse Page paginated response.
type BadRequestError ¶
type BadRequestError struct {
// Detail A human readable explanation specific to this occurence of the problem.
// This field may contain request/entity data to help the user understand
// what went wrong. Enclose variable values in square brackets. Should be
// provided as "Sentence case" for direct use in the UI.
Detail string `json:"detail"`
// Instance Used to return the correlation ID back to the user, in the format
// kong:trace:<correlation_id>. This helps us find the relevant logs
// when a customer reports an issue.
Instance string `json:"instance"`
// InvalidParameters invalid parameters
InvalidParameters InvalidParameters `json:"invalid_parameters"`
// Status The HTTP status code of the error. Useful when passing the response
// body to child properties in a frontend UI. Must be returned as an integer.
Status int `json:"status"`
// Title A short, human-readable summary of the problem. It should not
// change between occurences of a problem, except for localization.
// Should be provided as "Sentence case" for direct use in the UI.
Title string `json:"title"`
// Type The error type.
Type *string `json:"type,omitempty"`
}
BadRequestError defines model for BadRequestError.
type BaseError ¶
type BaseError struct {
// Detail A human readable explanation specific to this occurence of the problem.
// This field may contain request/entity data to help the user understand
// what went wrong. Enclose variable values in square brackets. Should be
// provided as "Sentence case" for direct use in the UI.
Detail string `json:"detail"`
// Instance Used to return the correlation ID back to the user, in the format
// kong:trace:<correlation_id>. This helps us find the relevant logs
// when a customer reports an issue.
Instance string `json:"instance"`
// Status The HTTP status code of the error. Useful when passing the response
// body to child properties in a frontend UI. Must be returned as an integer.
Status int `json:"status"`
// Title A short, human-readable summary of the problem. It should not
// change between occurences of a problem, except for localization.
// Should be provided as "Sentence case" for direct use in the UI.
Title string `json:"title"`
// Type The error type.
Type *string `json:"type,omitempty"`
}
BaseError standard error
type BillingAddress ¶
type BillingAddress struct {
// City City.
City *string `json:"city,omitempty"`
// Country Country code in [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 format.
Country *CountryCode `json:"country,omitempty"`
// Line1 First line of the address.
Line1 *string `json:"line1,omitempty"`
// Line2 Second line of the address.
Line2 *string `json:"line2,omitempty"`
// PhoneNumber Phone number.
PhoneNumber *string `json:"phone_number,omitempty"`
// PostalCode Postal code.
PostalCode *string `json:"postal_code,omitempty"`
// State State or province.
State *string `json:"state,omitempty"`
}
BillingAddress Address
type BillingApp ¶
type BillingApp struct {
// contains filtered or unexported fields
}
BillingApp Installed application.
func (BillingApp) AsBillingAppExternalInvoicing ¶
func (t BillingApp) AsBillingAppExternalInvoicing() (BillingAppExternalInvoicing, error)
AsBillingAppExternalInvoicing returns the union data inside the BillingApp as a BillingAppExternalInvoicing
func (BillingApp) AsBillingAppSandbox ¶
func (t BillingApp) AsBillingAppSandbox() (BillingAppSandbox, error)
AsBillingAppSandbox returns the union data inside the BillingApp as a BillingAppSandbox
func (BillingApp) AsBillingAppStripe ¶
func (t BillingApp) AsBillingAppStripe() (BillingAppStripe, error)
AsBillingAppStripe returns the union data inside the BillingApp as a BillingAppStripe
func (BillingApp) Discriminator ¶
func (t BillingApp) Discriminator() (string, error)
func (*BillingApp) FromBillingAppExternalInvoicing ¶
func (t *BillingApp) FromBillingAppExternalInvoicing(v BillingAppExternalInvoicing) error
FromBillingAppExternalInvoicing overwrites any union data inside the BillingApp as the provided BillingAppExternalInvoicing
func (*BillingApp) FromBillingAppSandbox ¶
func (t *BillingApp) FromBillingAppSandbox(v BillingAppSandbox) error
FromBillingAppSandbox overwrites any union data inside the BillingApp as the provided BillingAppSandbox
func (*BillingApp) FromBillingAppStripe ¶
func (t *BillingApp) FromBillingAppStripe(v BillingAppStripe) error
FromBillingAppStripe overwrites any union data inside the BillingApp as the provided BillingAppStripe
func (BillingApp) MarshalJSON ¶
func (t BillingApp) MarshalJSON() ([]byte, error)
func (*BillingApp) MergeBillingAppExternalInvoicing ¶
func (t *BillingApp) MergeBillingAppExternalInvoicing(v BillingAppExternalInvoicing) error
MergeBillingAppExternalInvoicing performs a merge with any union data inside the BillingApp, using the provided BillingAppExternalInvoicing
func (*BillingApp) MergeBillingAppSandbox ¶
func (t *BillingApp) MergeBillingAppSandbox(v BillingAppSandbox) error
MergeBillingAppSandbox performs a merge with any union data inside the BillingApp, using the provided BillingAppSandbox
func (*BillingApp) MergeBillingAppStripe ¶
func (t *BillingApp) MergeBillingAppStripe(v BillingAppStripe) error
MergeBillingAppStripe performs a merge with any union data inside the BillingApp, using the provided BillingAppStripe
func (*BillingApp) UnmarshalJSON ¶
func (t *BillingApp) UnmarshalJSON(b []byte) error
func (BillingApp) ValueByDiscriminator ¶
func (t BillingApp) ValueByDiscriminator() (interface{}, error)
type BillingAppCatalogItem ¶
type BillingAppCatalogItem struct {
// Description Description of the app.
Description string `json:"description"`
// Name Name of the app.
Name string `json:"name"`
// Type Type of the app.
Type BillingAppType `json:"type"`
}
BillingAppCatalogItem Available apps for billing integrations to connect with third-party services. Apps can have various capabilities like syncing data from or to external systems, integrating with third-party services for tax calculation, delivery of invoices, collection of payments, etc.
type BillingAppCustomerData ¶
type BillingAppCustomerData struct {
// ExternalInvoicing Used if the customer has a linked external invoicing app.
ExternalInvoicing *BillingAppCustomerDataExternalInvoicing `json:"external_invoicing,omitempty"`
// Stripe Used if the customer has a linked Stripe app.
Stripe *BillingAppCustomerDataStripe `json:"stripe,omitempty"`
}
BillingAppCustomerData App customer data.
type BillingAppCustomerDataExternalInvoicing ¶
type BillingAppCustomerDataExternalInvoicing struct {
// Labels Labels for this external invoicing integration on the customer.
Labels *Labels `json:"labels,omitempty"`
}
BillingAppCustomerDataExternalInvoicing External invoicing customer data.
type BillingAppCustomerDataStripe ¶
type BillingAppCustomerDataStripe struct {
// CustomerId The Stripe customer ID used.
CustomerId *string `json:"customer_id,omitempty"`
// DefaultPaymentMethodId The Stripe default payment method ID.
DefaultPaymentMethodId *string `json:"default_payment_method_id,omitempty"`
// Labels Labels for this Stripe integration on the customer.
Labels *Labels `json:"labels,omitempty"`
}
BillingAppCustomerDataStripe Stripe customer data.
type BillingAppExternalInvoicing ¶
type BillingAppExternalInvoicing struct {
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// Definition The app catalog definition that this installed app is based on.
Definition BillingAppCatalogItem `json:"definition"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// EnableDraftSyncHook Enable draft synchronization hook.
//
// When enabled, invoices will pause at the draft state and wait for the integration
// to call the draft synchronized endpoint before progressing to the issuing state.
// This allows the external system to validate and prepare the invoice data.
//
// When disabled, invoices automatically progress through the draft state based on
// the configured workflow timing.
EnableDraftSyncHook bool `json:"enable_draft_sync_hook"`
// EnableIssuingSyncHook Enable issuing synchronization hook.
//
// When enabled, invoices will pause at the issuing state and wait for the integration
// to call the issuing synchronized endpoint before progressing to the issued state.
// This ensures the external invoicing system has successfully created and finalized
// the invoice before it is marked as issued.
//
// When disabled, invoices automatically progress through the issuing state and are
// immediately marked as issued.
EnableIssuingSyncHook bool `json:"enable_issuing_sync_hook"`
Id ULID `json:"id"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// Status Status of the app connection.
Status BillingAppStatus `json:"status"`
// Type The app type.
Type BillingAppExternalInvoicingType `json:"type"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
}
BillingAppExternalInvoicing External Invoicing app enables integration with third-party invoicing or payment system.
The app supports a bi-directional synchronization pattern where OpenMeter Billing manages the invoice lifecycle while the external system handles invoice presentation and payment collection.
Integration workflow: 1. The billing system creates invoices and transitions them through lifecycle states (draft → issuing → issued) 2. The integration receives webhook notifications about invoice state changes 3. The integration calls back to provide external system IDs and metadata 4. The integration reports payment events back via the payment status API
State synchronization is controlled by hooks that pause invoice progression until the external system confirms synchronization via API callbacks.
type BillingAppExternalInvoicingType ¶
type BillingAppExternalInvoicingType string
BillingAppExternalInvoicingType The app type.
const (
BillingAppExternalInvoicingTypeExternalInvoicing BillingAppExternalInvoicingType = "external_invoicing"
)
Defines values for BillingAppExternalInvoicingType.
type BillingAppReference ¶
type BillingAppReference struct {
// Id The ID of the app.
Id ULID `json:"id"`
}
BillingAppReference App reference.
type BillingAppSandbox ¶
type BillingAppSandbox struct {
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// Definition The app catalog definition that this installed app is based on.
Definition BillingAppCatalogItem `json:"definition"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
Id ULID `json:"id"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// Status Status of the app connection.
Status BillingAppStatus `json:"status"`
// Type The app type.
Type BillingAppSandboxType `json:"type"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
}
BillingAppSandbox Sandbox app can be used for testing billing features.
type BillingAppSandboxType ¶
type BillingAppSandboxType string
BillingAppSandboxType The app type.
const (
BillingAppSandboxTypeSandbox BillingAppSandboxType = "sandbox"
)
Defines values for BillingAppSandboxType.
type BillingAppStatus ¶
type BillingAppStatus string
BillingAppStatus Connection status of an installed app.
const ( BillingAppStatusReady BillingAppStatus = "ready" )
Defines values for BillingAppStatus.
type BillingAppStripe ¶
type BillingAppStripe struct {
// AccountId The Stripe account ID associated with the connected Stripe account.
AccountId string `json:"account_id"`
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// Definition The app catalog definition that this installed app is based on.
Definition BillingAppCatalogItem `json:"definition"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
Id ULID `json:"id"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Livemode Indicates whether the app is connected to a live Stripe account.
Livemode bool `json:"livemode"`
// MaskedApiKey The masked Stripe API key that only exposes the first and last few characters.
MaskedApiKey string `json:"masked_api_key"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// Status Status of the app connection.
Status BillingAppStatus `json:"status"`
// Type The app type.
Type BillingAppStripeType `json:"type"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
}
BillingAppStripe Stripe app.
type BillingAppStripeCheckoutSessionCustomTextParams ¶
type BillingAppStripeCheckoutSessionCustomTextParams struct {
// AfterSubmit Text displayed after the payment confirmation button.
AfterSubmit *struct {
// Message The custom message text (max 1200 characters).
Message *string `json:"message,omitempty"`
} `json:"after_submit,omitempty"`
// ShippingAddress Text displayed alongside shipping address collection.
ShippingAddress *struct {
// Message The custom message text (max 1200 characters).
Message *string `json:"message,omitempty"`
} `json:"shipping_address,omitempty"`
// Submit Text displayed alongside the payment confirmation button.
Submit *struct {
// Message The custom message text (max 1200 characters).
Message *string `json:"message,omitempty"`
} `json:"submit,omitempty"`
// TermsOfServiceAcceptance Text replacing the default terms of service agreement text.
TermsOfServiceAcceptance *struct {
// Message The custom message text (max 1200 characters).
Message *string `json:"message,omitempty"`
} `json:"terms_of_service_acceptance,omitempty"`
}
BillingAppStripeCheckoutSessionCustomTextParams Custom text displayed at various stages of the checkout flow.
type BillingAppStripeCheckoutSessionMode ¶
type BillingAppStripeCheckoutSessionMode string
BillingAppStripeCheckoutSessionMode Stripe Checkout Session mode.
Determines the primary purpose of the checkout session.
const (
BillingAppStripeCheckoutSessionModeSetup BillingAppStripeCheckoutSessionMode = "setup"
)
Defines values for BillingAppStripeCheckoutSessionMode.
type BillingAppStripeCheckoutSessionUIMode ¶
type BillingAppStripeCheckoutSessionUIMode string
BillingAppStripeCheckoutSessionUIMode Checkout Session UI mode.
const ( BillingAppStripeCheckoutSessionUIModeEmbedded BillingAppStripeCheckoutSessionUIMode = "embedded" BillingAppStripeCheckoutSessionUIModeHosted BillingAppStripeCheckoutSessionUIMode = "hosted" )
Defines values for BillingAppStripeCheckoutSessionUIMode.
type BillingAppStripeCreateCheckoutSessionBillingAddressCollection ¶
type BillingAppStripeCreateCheckoutSessionBillingAddressCollection string
BillingAppStripeCreateCheckoutSessionBillingAddressCollection Controls whether Checkout collects the customer's billing address.
const ( BillingAppStripeCreateCheckoutSessionBillingAddressCollectionAuto BillingAppStripeCreateCheckoutSessionBillingAddressCollection = "auto" BillingAppStripeCreateCheckoutSessionBillingAddressCollectionRequired BillingAppStripeCreateCheckoutSessionBillingAddressCollection = "required" )
Defines values for BillingAppStripeCreateCheckoutSessionBillingAddressCollection.
type BillingAppStripeCreateCheckoutSessionConsentCollection ¶
type BillingAppStripeCreateCheckoutSessionConsentCollection struct {
// PaymentMethodReuseAgreement Controls the visibility of payment method reuse agreement.
PaymentMethodReuseAgreement *BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement `json:"payment_method_reuse_agreement,omitempty"`
// Promotions Enables collection of promotional communication consent.
//
// Only available to US merchants. When set to "auto", Checkout determines
// whether to show the option based on the customer's locale.
Promotions *BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions `json:"promotions,omitempty"`
// TermsOfService Requires customers to accept terms of service before payment.
//
// Requires a valid terms of service URL in your Stripe Dashboard settings.
TermsOfService *BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService `json:"terms_of_service,omitempty"`
}
BillingAppStripeCreateCheckoutSessionConsentCollection Checkout Session consent collection configuration.
type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement ¶
type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement struct {
// Position Position and visibility of the payment method reuse agreement.
Position *BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition `json:"position,omitempty"`
}
BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement Payment method reuse agreement configuration.
type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition ¶
type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition string
BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition Position of payment method reuse agreement in the UI.
const ( BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionAuto BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "auto" BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionHidden BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "hidden" )
Defines values for BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition.
type BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions ¶
type BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions string
BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions Promotional communication consent collection setting.
const ( BillingAppStripeCreateCheckoutSessionConsentCollectionPromotionsAuto BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions = "auto" BillingAppStripeCreateCheckoutSessionConsentCollectionPromotionsNone BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions = "none" )
Defines values for BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions.
type BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService ¶
type BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService string
BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService Terms of service acceptance requirement.
const ( BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfServiceNone BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService = "none" BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfServiceRequired BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService = "required" )
Defines values for BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService.
type BillingAppStripeCreateCheckoutSessionCustomerUpdate ¶
type BillingAppStripeCreateCheckoutSessionCustomerUpdate struct {
// Address Whether to save the billing address to customer.address.
//
// Defaults to "never".
Address *BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior `json:"address,omitempty"`
// Name Whether to save the customer name to customer.name.
//
// Defaults to "never".
Name *BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior `json:"name,omitempty"`
// Shipping Whether to save shipping information to customer.shipping.
//
// Defaults to "never".
Shipping *BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior `json:"shipping,omitempty"`
}
BillingAppStripeCreateCheckoutSessionCustomerUpdate Controls which customer fields can be updated by the checkout session.
type BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior ¶
type BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior string
BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior Behavior for updating customer fields from checkout session.
const ( BillingAppStripeCreateCheckoutSessionCustomerUpdateBehaviorAuto BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior = "auto" BillingAppStripeCreateCheckoutSessionCustomerUpdateBehaviorNever BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior = "never" )
Defines values for BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior.
type BillingAppStripeCreateCheckoutSessionRedirectOnCompletion ¶
type BillingAppStripeCreateCheckoutSessionRedirectOnCompletion string
BillingAppStripeCreateCheckoutSessionRedirectOnCompletion Redirect behavior for embedded checkout sessions.
const ( BillingAppStripeCreateCheckoutSessionRedirectOnCompletionAlways BillingAppStripeCreateCheckoutSessionRedirectOnCompletion = "always" BillingAppStripeCreateCheckoutSessionRedirectOnCompletionIfRequired BillingAppStripeCreateCheckoutSessionRedirectOnCompletion = "if_required" BillingAppStripeCreateCheckoutSessionRedirectOnCompletionNever BillingAppStripeCreateCheckoutSessionRedirectOnCompletion = "never" )
Defines values for BillingAppStripeCreateCheckoutSessionRedirectOnCompletion.
type BillingAppStripeCreateCheckoutSessionRequestOptions ¶
type BillingAppStripeCreateCheckoutSessionRequestOptions struct {
// BillingAddressCollection Whether to collect the customer's billing address.
//
// Defaults to auto, which only collects the address when necessary for tax calculation.
BillingAddressCollection *BillingAppStripeCreateCheckoutSessionBillingAddressCollection `json:"billing_address_collection,omitempty"`
// CancelUrl URL to redirect customers who cancel the checkout session.
//
// Not allowed when ui_mode is "embedded".
CancelUrl *string `json:"cancel_url,omitempty"`
// ClientReferenceId Unique reference string for reconciling sessions with internal systems.
//
// Can be a customer ID, cart ID, or any other identifier.
ClientReferenceId *string `json:"client_reference_id,omitempty"`
// ConsentCollection Configuration for collecting customer consent during checkout.
ConsentCollection *BillingAppStripeCreateCheckoutSessionConsentCollection `json:"consent_collection,omitempty"`
// Currency Three-letter ISO 4217 currency code in uppercase.
//
// Required for payment mode sessions. Optional for setup mode sessions.
Currency *CurrencyCode `json:"currency,omitempty"`
// CustomText Custom text to display during checkout at various stages.
CustomText *BillingAppStripeCheckoutSessionCustomTextParams `json:"custom_text,omitempty"`
// CustomerUpdate Controls which customer fields can be updated by the checkout session.
CustomerUpdate *BillingAppStripeCreateCheckoutSessionCustomerUpdate `json:"customer_update,omitempty"`
// ExpiresAt Unix timestamp when the checkout session expires.
//
// Can be 30 minutes to 24 hours from creation. Defaults to 24 hours.
ExpiresAt *int64 `json:"expires_at,omitempty"`
// Locale IETF language tag for the checkout UI locale.
//
// If blank or "auto", uses the browser's locale. Example: "en", "fr", "de".
Locale *string `json:"locale,omitempty"`
// Metadata Set of key-value pairs to attach to the checkout session.
//
// Useful for storing additional structured information.
Metadata *map[string]string `json:"metadata,omitempty"`
// PaymentMethodTypes List of payment method types to enable (e.g., "card", "us_bank_account").
//
// If not specified, Stripe enables all relevant payment methods.
PaymentMethodTypes *[]string `json:"payment_method_types,omitempty"`
// RedirectOnCompletion Redirect behavior for embedded checkout sessions.
//
// Controls when to redirect users after completion.
// See: https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form
RedirectOnCompletion *BillingAppStripeCreateCheckoutSessionRedirectOnCompletion `json:"redirect_on_completion,omitempty"`
// ReturnUrl Return URL for embedded checkout sessions after payment authentication.
//
// Required if ui_mode is "embedded" and redirect-based payment methods are enabled.
ReturnUrl *string `json:"return_url,omitempty"`
// SuccessUrl Success URL to redirect customers after completing payment or setup.
//
// Not allowed when ui_mode is "embedded".
// See: https://docs.stripe.com/payments/checkout/custom-success-page
SuccessUrl *string `json:"success_url,omitempty"`
// TaxIdCollection Configuration for collecting tax IDs during checkout.
TaxIdCollection *BillingAppStripeCreateCheckoutSessionTaxIdCollection `json:"tax_id_collection,omitempty"`
// UiMode The UI mode for the checkout session.
//
// "hosted" displays a Stripe-hosted page. "embedded" integrates directly into your app.
// Defaults to "hosted".
UiMode *BillingAppStripeCheckoutSessionUIMode `json:"ui_mode,omitempty"`
}
BillingAppStripeCreateCheckoutSessionRequestOptions Configuration options for creating a Stripe Checkout Session.
Based on Stripe's [Checkout Session API parameters](https://docs.stripe.com/api/checkout/sessions/create).
type BillingAppStripeCreateCheckoutSessionResult ¶
type BillingAppStripeCreateCheckoutSessionResult struct {
// CancelUrl The cancel URL where customers are redirected if they cancel.
CancelUrl *string `json:"cancel_url,omitempty"`
// ClientReferenceId The client reference ID provided in the request.
//
// Useful for reconciling the session with your internal systems.
ClientReferenceId *string `json:"client_reference_id,omitempty"`
// ClientSecret Client secret for initializing Stripe.js on the client side.
//
// Required for embedded checkout sessions.
// See: https://docs.stripe.com/payments/checkout/custom-success-page
ClientSecret *string `json:"client_secret,omitempty"`
// CreatedAt Timestamp when the checkout session was created.
CreatedAt DateTime `json:"created_at"`
// Currency Currency code for the checkout session.
Currency *CurrencyCode `json:"currency,omitempty"`
// CustomerEmail Customer's email address if provided to Stripe.
CustomerEmail *string `json:"customer_email,omitempty"`
// CustomerId The customer ID in the billing system.
CustomerId ULID `json:"customer_id"`
// ExpiresAt Timestamp when the checkout session will expire.
ExpiresAt *DateTime `json:"expires_at,omitempty"`
// Metadata Metadata attached to the checkout session.
Metadata *map[string]string `json:"metadata,omitempty"`
// Mode Mode of the checkout session.
//
// Currently only "setup" mode is supported for collecting payment methods.
Mode BillingAppStripeCheckoutSessionMode `json:"mode"`
// ReturnUrl The return URL for embedded sessions after authentication.
ReturnUrl *string `json:"return_url,omitempty"`
// SessionId The Stripe checkout session ID.
SessionId string `json:"session_id"`
// SetupIntentId The setup intent ID created for collecting the payment method.
SetupIntentId string `json:"setup_intent_id"`
// Status The status of the checkout session.
//
// See: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-status
Status *string `json:"status,omitempty"`
// StripeCustomerId The Stripe customer ID.
StripeCustomerId string `json:"stripe_customer_id"`
// SuccessUrl The success URL where customers are redirected after completion.
SuccessUrl *string `json:"success_url,omitempty"`
// Url URL to redirect customers to the checkout page (for hosted mode).
Url *string `json:"url,omitempty"`
}
BillingAppStripeCreateCheckoutSessionResult Result of creating a Stripe Checkout Session.
Contains all the information needed to redirect customers to the checkout or initialize an embedded checkout flow.
type BillingAppStripeCreateCheckoutSessionTaxIdCollection ¶
type BillingAppStripeCreateCheckoutSessionTaxIdCollection struct {
// Enabled Enable tax ID collection during checkout.
//
// Defaults to false.
Enabled *bool `json:"enabled,omitempty"`
// Required Whether tax ID collection is required.
//
// Defaults to "never".
Required *BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired `json:"required,omitempty"`
}
BillingAppStripeCreateCheckoutSessionTaxIdCollection Tax ID collection configuration for checkout sessions.
type BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired ¶
type BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired string
BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired Tax ID collection requirement level.
const ( BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequiredIfSupported BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired = "if_supported" BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequiredNever BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired = "never" )
Defines values for BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired.
type BillingAppStripeCreateCustomerPortalSessionOptions ¶
type BillingAppStripeCreateCustomerPortalSessionOptions struct {
// ConfigurationId The ID of an existing [Stripe configuration](https://docs.stripe.com/api/customer_portal/configurations) to use for this session,
// describing its functionality and features.
// If not specified, the session uses the default configuration.
ConfigurationId *string `json:"configuration_id,omitempty"`
// Locale The IETF [language tag](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-locale) of the locale customer portal is displayed in.
// If blank or `auto`, the customer's preferred_locales or browser's locale is used.
Locale *string `json:"locale,omitempty"`
// ReturnUrl The [URL to redirect](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) the customer to after they have completed
// their requested actions.
ReturnUrl *string `json:"return_url,omitempty"`
}
BillingAppStripeCreateCustomerPortalSessionOptions Request to create a Stripe Customer Portal Session.
type BillingAppStripeCreateCustomerPortalSessionResult ¶
type BillingAppStripeCreateCustomerPortalSessionResult struct {
// ConfigurationId Configuration used to customize the customer portal.
//
// See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-configuration
ConfigurationId string `json:"configuration_id"`
// CreatedAt Created at.
//
// See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-created
CreatedAt DateTime `json:"created_at"`
// Id The ID of the customer portal session.
//
// See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-id
Id string `json:"id"`
// Livemode Livemode.
//
// See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-livemode
Livemode bool `json:"livemode"`
// Locale The IETF language tag of the locale customer portal is displayed in.
//
// See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-locale
Locale string `json:"locale"`
// ReturnUrl Return URL.
//
// See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-return_url
ReturnUrl string `json:"return_url"`
// StripeCustomerId The ID of the stripe customer.
StripeCustomerId string `json:"stripe_customer_id"`
// Url The URL to redirect the customer to after they have completed
// their requested actions.
Url string `json:"url"`
}
BillingAppStripeCreateCustomerPortalSessionResult Result of creating a [Stripe Customer Portal Session](https://docs.stripe.com/api/customer_portal/sessions/object).
Contains all the information needed to redirect the customer to the Stripe Customer Portal.
type BillingAppStripeType ¶
type BillingAppStripeType string
BillingAppStripeType The app type.
const (
BillingAppStripeTypeStripe BillingAppStripeType = "stripe"
)
Defines values for BillingAppStripeType.
type BillingAppType ¶
type BillingAppType string
BillingAppType The type of the app.
const ( BillingAppTypeExternalInvoicing BillingAppType = "external_invoicing" BillingAppTypeSandbox BillingAppType = "sandbox" BillingAppTypeStripe BillingAppType = "stripe" )
Defines values for BillingAppType.
type BillingCustomer ¶
type BillingCustomer struct {
// BillingAddress The billing address of the customer.
// Used for tax and invoicing.
BillingAddress *BillingAddress `json:"billing_address,omitempty"`
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// Currency Currency of the customer.
// Used for billing, tax and invoicing.
Currency *CurrencyCode `json:"currency,omitempty"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
Id ULID `json:"id"`
// Key ExternalResourceKey is a unique string that is used to identify a resource in an external system.
Key ExternalResourceKey `json:"key"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// PrimaryEmail The primary email address of the customer.
PrimaryEmail *string `json:"primary_email,omitempty"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}
BillingCustomer Customers can be individuals or organizations that can subscribe to plans and have access to features.
type BillingCustomerData ¶
type BillingCustomerData struct {
// AppData App customer data.
AppData *BillingAppCustomerData `json:"app_data,omitempty"`
// BillingProfile The billing profile for the customer.
//
// If not provided, the default billing profile will be used.
BillingProfile *BillingProfileReference `json:"billing_profile,omitempty"`
}
BillingCustomerData Billing customer data.
type BillingCustomerStripeCreateCheckoutSessionRequest ¶
type BillingCustomerStripeCreateCheckoutSessionRequest struct {
// StripeOptions Options for configuring the Stripe Checkout Session.
//
// These options are passed directly to Stripe's [checkout session creation API](https://docs.stripe.com/api/checkout/sessions/create).
StripeOptions BillingAppStripeCreateCheckoutSessionRequestOptions `json:"stripe_options"`
}
BillingCustomerStripeCreateCheckoutSessionRequest Request to create a Stripe Checkout Session for the customer.
Checkout Sessions are used to collect payment method information from customers in a secure, Stripe-hosted interface. This integration uses setup mode to collect payment methods that can be charged later for subscription billing.
type BillingCustomerStripeCreateCustomerPortalSessionRequest ¶
type BillingCustomerStripeCreateCustomerPortalSessionRequest struct {
// StripeOptions Options for configuring the Stripe Customer Portal Session.
StripeOptions BillingAppStripeCreateCustomerPortalSessionOptions `json:"stripe_options"`
}
BillingCustomerStripeCreateCustomerPortalSessionRequest Request to create a Stripe Customer Portal Session for the customer.
Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer.
type BillingCustomerUsageAttribution ¶
type BillingCustomerUsageAttribution struct {
// SubjectKeys The subjects that are attributed to the customer.
// Can be empty when no usage event subjects are associated with the customer.
SubjectKeys []UsageAttributionSubjectKey `json:"subject_keys"`
}
BillingCustomerUsageAttribution Mapping to attribute metered usage to the customer. One customer can have zero or more subjects, but one subject can only belong to one customer.
type BillingEntitlementAccessResult ¶
type BillingEntitlementAccessResult struct {
// Config Only available for static entitlements.
// Config is the JSON parsable configuration of the entitlement.
// Useful to describe per customer configuration.
Config *string `json:"config,omitempty"`
// FeatureKey The feature key of the entitlement.
FeatureKey ResourceKey `json:"feature_key"`
// HasAccess Whether the customer has access to the feature.
// Always true for `boolean` and `static` entitlements.
// Depends on balance for `metered` entitlements.
HasAccess bool `json:"has_access"`
// Type The type of the entitlement.
Type BillingEntitlementType `json:"type"`
}
BillingEntitlementAccessResult Entitlement access result.
type BillingEntitlementType ¶
type BillingEntitlementType string
BillingEntitlementType The type of the entitlement.
const ( BillingEntitlementTypeBoolean BillingEntitlementType = "boolean" BillingEntitlementTypeMetered BillingEntitlementType = "metered" BillingEntitlementTypeStatic BillingEntitlementType = "static" )
Defines values for BillingEntitlementType.
type BillingParty ¶
type BillingParty struct {
// Addresses Address for where information should be sent if needed.
Addresses *BillingPartyAddresses `json:"addresses,omitempty"`
// Id Unique identifier for the party.
Id *string `json:"id,omitempty"`
// Key An optional unique key of the party.
Key *ExternalResourceKey `json:"key,omitempty"`
// Name Legal name or representation of the party.
Name *string `json:"name,omitempty"`
// TaxId The entity's legal identification used for tax purposes. They may have
// other numbers, but we're only interested in those valid for tax purposes.
TaxId *BillingPartyTaxIdentity `json:"tax_id,omitempty"`
}
BillingParty Party represents a person or business entity.
type BillingPartyAddresses ¶
type BillingPartyAddresses struct {
// BillingAddress Billing address.
BillingAddress Address `json:"billing_address"`
}
BillingPartyAddresses A collection of addresses for the party.
type BillingPartyTaxIdentity ¶
type BillingPartyTaxIdentity struct {
// Code Normalized tax identification code shown on the original identity document.
Code *BillingTaxIdentificationCode `json:"code,omitempty"`
}
BillingPartyTaxIdentity Identity stores the details required to identify an entity for tax purposes in a specific country.
type BillingProfile ¶
type BillingProfile struct {
// Apps The applications used by this billing profile.
Apps BillingProfileAppReferences `json:"apps"`
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// Default Whether this is the default profile.
Default bool `json:"default"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
Id ULID `json:"id"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// Supplier The name and contact information for the supplier this billing profile represents
Supplier BillingParty `json:"supplier"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
// Workflow The billing workflow settings for this profile
Workflow BillingWorkflow `json:"workflow"`
}
BillingProfile Billing profiles contain the settings for billing and controls invoice generation.
type BillingProfileAppReferences ¶
type BillingProfileAppReferences struct {
// Invoicing The invoicing app used for this workflow.
Invoicing BillingAppReference `json:"invoicing"`
// Payment The payment app used for this workflow.
Payment BillingAppReference `json:"payment"`
// Tax The tax app used for this workflow.
Tax BillingAppReference `json:"tax"`
}
BillingProfileAppReferences References to the applications used by a billing profile.
type BillingProfilePagePaginatedResponse ¶
type BillingProfilePagePaginatedResponse struct {
Data []BillingProfile `json:"data"`
// Meta returns the pagination information
Meta PaginatedMeta `json:"meta"`
}
BillingProfilePagePaginatedResponse Page paginated response.
type BillingProfileReference ¶
type BillingProfileReference struct {
// Id The ID of the billing profile.
Id ULID `json:"id"`
}
BillingProfileReference Billing profile reference.
type BillingSubscription ¶
type BillingSubscription struct {
// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle.
// It affects when charges occur and how prorations are calculated.
// Common anchors:
// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
// - Subscription anniversary (day customer signed up)
// - Custom date (customer-specified day)
BillingAnchor DateTime `json:"billing_anchor"`
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// CustomerId The customer ID of the subscription.
CustomerId ULID `json:"customer_id"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
Id ULID `json:"id"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// PlanId The plan ID of the subscription.
// Set if subscription is created from a plan.
PlanId *ULID `json:"plan_id,omitempty"`
// Status The status of the subscription.
Status BillingSubscriptionStatus `json:"status"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
}
BillingSubscription Subscription.
type BillingSubscriptionCancel ¶
type BillingSubscriptionCancel struct {
// Timing If not provided the subscription is canceled immediately.
Timing *BillingSubscriptionEditTiming `json:"timing,omitempty"`
}
BillingSubscriptionCancel Request for canceling a subscription.
type BillingSubscriptionChange ¶
type BillingSubscriptionChange struct {
// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle.
// It affects when charges occur and how prorations are calculated.
// Common anchors:
// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
// - Subscription anniversary (day customer signed up)
// - Custom date (customer-specified day)
//
// If not provided, the subscription will be created with the subscription's creation time as the billing anchor.
BillingAnchor *DateTime `json:"billing_anchor,omitempty"`
// Customer The customer to create the subscription for.
Customer struct {
// Id The ID of the customer to create the subscription for.
//
// Either customer ID or customer key must be provided.
// If both are provided, the ID will be used.
Id *ULID `json:"id,omitempty"`
// Key The key of the customer to create the subscription for.
//
// Either customer ID or customer key must be provided.
// If both are provided, the ID will be used.
Key *ExternalResourceKey `json:"key,omitempty"`
} `json:"customer"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Plan The plan reference of the subscription.
Plan struct {
// Id The plan ID of the subscription.
// Set if subscription is created from a plan.
//
// ID or Key of the plan is required if creating a subscription from a plan.
// If both are provided, the ID will be used.
Id *ULID `json:"id,omitempty"`
// Key The plan Key of the subscription, if any.
// Set if subscription is created from a plan.
//
// ID or Key of the plan is required if creating a subscription from a plan.
// If both are provided, the ID will be used.
Key *ResourceKey `json:"key,omitempty"`
// Version The plan version of the subscription, if any.
// If not provided, the latest version of the plan will be used.
Version *int `json:"version,omitempty"`
} `json:"plan"`
// Timing Timing configuration for the change, when the change should take effect.
// For changing a subscription, the accepted values depend on the subscription configuration.
Timing BillingSubscriptionEditTiming `json:"timing"`
}
BillingSubscriptionChange Request for changing a subscription.
type BillingSubscriptionChangeResponse ¶
type BillingSubscriptionChangeResponse struct {
// Current The current subscription before the change.
Current BillingSubscription `json:"current"`
// Next The new state of the subscription after the change.
Next BillingSubscription `json:"next"`
}
BillingSubscriptionChangeResponse Response for changing a subscription.
type BillingSubscriptionCreate ¶
type BillingSubscriptionCreate struct {
// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle.
// It affects when charges occur and how prorations are calculated.
// Common anchors:
// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
// - Subscription anniversary (day customer signed up)
// - Custom date (customer-specified day)
//
// If not provided, the subscription will be created with the subscription's creation time as the billing anchor.
BillingAnchor *DateTime `json:"billing_anchor,omitempty"`
// Customer The customer to create the subscription for.
Customer struct {
// Id The ID of the customer to create the subscription for.
//
// Either customer ID or customer key must be provided.
// If both are provided, the ID will be used.
Id *ULID `json:"id,omitempty"`
// Key The key of the customer to create the subscription for.
//
// Either customer ID or customer key must be provided.
// If both are provided, the ID will be used.
Key *ExternalResourceKey `json:"key,omitempty"`
} `json:"customer"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Plan The plan reference of the subscription.
Plan struct {
// Id The plan ID of the subscription.
// Set if subscription is created from a plan.
//
// ID or Key of the plan is required if creating a subscription from a plan.
// If both are provided, the ID will be used.
Id *ULID `json:"id,omitempty"`
// Key The plan Key of the subscription, if any.
// Set if subscription is created from a plan.
//
// ID or Key of the plan is required if creating a subscription from a plan.
// If both are provided, the ID will be used.
Key *ResourceKey `json:"key,omitempty"`
// Version The plan version of the subscription, if any.
// If not provided, the latest version of the plan will be used.
Version *int `json:"version,omitempty"`
} `json:"plan"`
}
BillingSubscriptionCreate Subscription create request.
type BillingSubscriptionEditTiming ¶
type BillingSubscriptionEditTiming struct {
// contains filtered or unexported fields
}
BillingSubscriptionEditTiming Subscription edit timing defined when the changes should take effect. If the provided configuration is not supported by the subscription, an error will be returned.
func (BillingSubscriptionEditTiming) AsBillingSubscriptionEditTimingEnum ¶
func (t BillingSubscriptionEditTiming) AsBillingSubscriptionEditTimingEnum() (BillingSubscriptionEditTimingEnum, error)
AsBillingSubscriptionEditTimingEnum returns the union data inside the BillingSubscriptionEditTiming as a BillingSubscriptionEditTimingEnum
func (BillingSubscriptionEditTiming) AsDateTime ¶
func (t BillingSubscriptionEditTiming) AsDateTime() (DateTime, error)
AsDateTime returns the union data inside the BillingSubscriptionEditTiming as a DateTime
func (*BillingSubscriptionEditTiming) FromBillingSubscriptionEditTimingEnum ¶
func (t *BillingSubscriptionEditTiming) FromBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error
FromBillingSubscriptionEditTimingEnum overwrites any union data inside the BillingSubscriptionEditTiming as the provided BillingSubscriptionEditTimingEnum
func (*BillingSubscriptionEditTiming) FromDateTime ¶
func (t *BillingSubscriptionEditTiming) FromDateTime(v DateTime) error
FromDateTime overwrites any union data inside the BillingSubscriptionEditTiming as the provided DateTime
func (BillingSubscriptionEditTiming) MarshalJSON ¶
func (t BillingSubscriptionEditTiming) MarshalJSON() ([]byte, error)
func (*BillingSubscriptionEditTiming) MergeBillingSubscriptionEditTimingEnum ¶
func (t *BillingSubscriptionEditTiming) MergeBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error
MergeBillingSubscriptionEditTimingEnum performs a merge with any union data inside the BillingSubscriptionEditTiming, using the provided BillingSubscriptionEditTimingEnum
func (*BillingSubscriptionEditTiming) MergeDateTime ¶
func (t *BillingSubscriptionEditTiming) MergeDateTime(v DateTime) error
MergeDateTime performs a merge with any union data inside the BillingSubscriptionEditTiming, using the provided DateTime
func (*BillingSubscriptionEditTiming) UnmarshalJSON ¶
func (t *BillingSubscriptionEditTiming) UnmarshalJSON(b []byte) error
type BillingSubscriptionEditTimingEnum ¶
type BillingSubscriptionEditTimingEnum string
BillingSubscriptionEditTimingEnum Subscription edit timing. When immediate, the requested changes take effect immediately. When next_billing_cycle, the requested changes take effect at the next billing cycle.
const ( BillingSubscriptionEditTimingEnumImmediate BillingSubscriptionEditTimingEnum = "immediate" BillingSubscriptionEditTimingEnumNextBillingCycle BillingSubscriptionEditTimingEnum = "next_billing_cycle" )
Defines values for BillingSubscriptionEditTimingEnum.
type BillingSubscriptionStatus ¶
type BillingSubscriptionStatus string
BillingSubscriptionStatus Subscription status.
const ( BillingSubscriptionStatusActive BillingSubscriptionStatus = "active" BillingSubscriptionStatusCanceled BillingSubscriptionStatus = "canceled" BillingSubscriptionStatusInactive BillingSubscriptionStatus = "inactive" BillingSubscriptionStatusScheduled BillingSubscriptionStatus = "scheduled" )
Defines values for BillingSubscriptionStatus.
type BillingTaxBehavior ¶
type BillingTaxBehavior string
BillingTaxBehavior Tax behavior.
This enum is used to specify whether tax is included in the price or excluded from the price.
const ( BillingTaxBehaviorExclusive BillingTaxBehavior = "exclusive" BillingTaxBehaviorInclusive BillingTaxBehavior = "inclusive" )
Defines values for BillingTaxBehavior.
type BillingTaxConfig ¶
type BillingTaxConfig struct {
// Behavior Tax behavior.
//
// If not specified the billing profile is used to determine the tax behavior.
// If not specified in the billing profile, the provider's default behavior is used.
Behavior *BillingTaxBehavior `json:"behavior,omitempty"`
// ExternalInvoicing External invoicing tax config.
ExternalInvoicing *BillingTaxConfigExternalInvoicing `json:"external_invoicing,omitempty"`
// Stripe Stripe tax config.
Stripe *BillingTaxConfigStripe `json:"stripe,omitempty"`
}
BillingTaxConfig Set of provider specific tax configs.
type BillingTaxConfigExternalInvoicing ¶
type BillingTaxConfigExternalInvoicing struct {
// Code The tax code should be interpreted by the external invoicing provider.
Code string `json:"code"`
}
BillingTaxConfigExternalInvoicing External invoicing tax config.
type BillingTaxConfigStripe ¶
type BillingTaxConfigStripe struct {
// Code Product [tax code](https://docs.stripe.com/tax/tax-codes).
Code string `json:"code"`
}
BillingTaxConfigStripe The tax config for Stripe.
type BillingTaxIdentificationCode ¶
type BillingTaxIdentificationCode = string
BillingTaxIdentificationCode Tax identifier code is a normalized tax code shown on the original identity document.
type BillingWorkflow ¶
type BillingWorkflow struct {
// Collection The collection settings for this workflow
Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"`
// Invoicing The invoicing settings for this workflow
Invoicing *BillingWorkflowInvoicingSettings `json:"invoicing,omitempty"`
// Payment The payment settings for this workflow
Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"`
// Tax The tax settings for this workflow
Tax *BillingWorkflowTaxSettings `json:"tax,omitempty"`
}
BillingWorkflow Billing workflow settings.
type BillingWorkflowCollectionAlignment ¶
type BillingWorkflowCollectionAlignment struct {
// contains filtered or unexported fields
}
BillingWorkflowCollectionAlignment The alignment for collecting the pending line items into an invoice.
Defaults to subscription, which means that we are to create a new invoice every time the a subscription period starts (for in advance items) or ends (for in arrears items).
func (BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentAnchored ¶
func (t BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentAnchored() (BillingWorkflowCollectionAlignmentAnchored, error)
AsBillingWorkflowCollectionAlignmentAnchored returns the union data inside the BillingWorkflowCollectionAlignment as a BillingWorkflowCollectionAlignmentAnchored
func (BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentSubscription ¶
func (t BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentSubscription() (BillingWorkflowCollectionAlignmentSubscription, error)
AsBillingWorkflowCollectionAlignmentSubscription returns the union data inside the BillingWorkflowCollectionAlignment as a BillingWorkflowCollectionAlignmentSubscription
func (BillingWorkflowCollectionAlignment) Discriminator ¶
func (t BillingWorkflowCollectionAlignment) Discriminator() (string, error)
func (*BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentAnchored ¶
func (t *BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentAnchored(v BillingWorkflowCollectionAlignmentAnchored) error
FromBillingWorkflowCollectionAlignmentAnchored overwrites any union data inside the BillingWorkflowCollectionAlignment as the provided BillingWorkflowCollectionAlignmentAnchored
func (*BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentSubscription ¶
func (t *BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentSubscription(v BillingWorkflowCollectionAlignmentSubscription) error
FromBillingWorkflowCollectionAlignmentSubscription overwrites any union data inside the BillingWorkflowCollectionAlignment as the provided BillingWorkflowCollectionAlignmentSubscription
func (BillingWorkflowCollectionAlignment) MarshalJSON ¶
func (t BillingWorkflowCollectionAlignment) MarshalJSON() ([]byte, error)
func (*BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentAnchored ¶
func (t *BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentAnchored(v BillingWorkflowCollectionAlignmentAnchored) error
MergeBillingWorkflowCollectionAlignmentAnchored performs a merge with any union data inside the BillingWorkflowCollectionAlignment, using the provided BillingWorkflowCollectionAlignmentAnchored
func (*BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentSubscription ¶
func (t *BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentSubscription(v BillingWorkflowCollectionAlignmentSubscription) error
MergeBillingWorkflowCollectionAlignmentSubscription performs a merge with any union data inside the BillingWorkflowCollectionAlignment, using the provided BillingWorkflowCollectionAlignmentSubscription
func (*BillingWorkflowCollectionAlignment) UnmarshalJSON ¶
func (t *BillingWorkflowCollectionAlignment) UnmarshalJSON(b []byte) error
func (BillingWorkflowCollectionAlignment) ValueByDiscriminator ¶
func (t BillingWorkflowCollectionAlignment) ValueByDiscriminator() (interface{}, error)
type BillingWorkflowCollectionAlignmentAnchored ¶
type BillingWorkflowCollectionAlignmentAnchored struct {
// RecurringPeriod The recurring period for the alignment.
RecurringPeriod RecurringPeriod `json:"recurring_period"`
// Type The type of alignment.
Type BillingWorkflowCollectionAlignmentAnchoredType `json:"type"`
}
BillingWorkflowCollectionAlignmentAnchored BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items into an invoice.
type BillingWorkflowCollectionAlignmentAnchoredType ¶
type BillingWorkflowCollectionAlignmentAnchoredType string
BillingWorkflowCollectionAlignmentAnchoredType The type of alignment.
const (
BillingWorkflowCollectionAlignmentAnchoredTypeAnchored BillingWorkflowCollectionAlignmentAnchoredType = "anchored"
)
Defines values for BillingWorkflowCollectionAlignmentAnchoredType.
type BillingWorkflowCollectionAlignmentSubscription ¶
type BillingWorkflowCollectionAlignmentSubscription struct {
// Type The type of alignment.
Type BillingWorkflowCollectionAlignmentSubscriptionType `json:"type"`
}
BillingWorkflowCollectionAlignmentSubscription BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items into an invoice.
type BillingWorkflowCollectionAlignmentSubscriptionType ¶
type BillingWorkflowCollectionAlignmentSubscriptionType string
BillingWorkflowCollectionAlignmentSubscriptionType The type of alignment.
const (
BillingWorkflowCollectionAlignmentSubscriptionTypeSubscription BillingWorkflowCollectionAlignmentSubscriptionType = "subscription"
)
Defines values for BillingWorkflowCollectionAlignmentSubscriptionType.
type BillingWorkflowCollectionSettings ¶
type BillingWorkflowCollectionSettings struct {
// Alignment The alignment for collecting the pending line items into an invoice.
Alignment *BillingWorkflowCollectionAlignment `json:"alignment,omitempty"`
// Interval This grace period can be used to delay the collection of the pending line items specified in
// alignment.
//
// This is useful, in case of multiple subscriptions having slightly different billing periods.
Interval *string `json:"interval,omitempty"`
}
BillingWorkflowCollectionSettings Workflow collection specifies how to collect the pending line items for an invoice.
type BillingWorkflowInvoicingSettings ¶
type BillingWorkflowInvoicingSettings struct {
// AutoAdvance Whether to automatically issue the invoice after the draftPeriod has passed.
AutoAdvance *bool `json:"auto_advance,omitempty"`
// DraftPeriod The period for the invoice to be kept in draft status for manual reviews.
DraftPeriod *string `json:"draft_period,omitempty"`
// ProgressiveBilling Should progressive billing be allowed for this workflow?
ProgressiveBilling *bool `json:"progressive_billing,omitempty"`
}
BillingWorkflowInvoicingSettings Invoice settings for a billing workflow.
type BillingWorkflowPaymentChargeAutomaticallySettings ¶
type BillingWorkflowPaymentChargeAutomaticallySettings struct {
// CollectionMethod The collection method for the invoice.
CollectionMethod BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod `json:"collection_method"`
}
BillingWorkflowPaymentChargeAutomaticallySettings Payment settings for a billing workflow when the collection method is charge automatically.
type BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod ¶
type BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod string
BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod The collection method for the invoice.
const (
BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethodChargeAutomatically BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod = "charge_automatically"
)
Defines values for BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod.
type BillingWorkflowPaymentSendInvoiceSettings ¶
type BillingWorkflowPaymentSendInvoiceSettings struct {
// CollectionMethod The collection method for the invoice.
CollectionMethod BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod `json:"collection_method"`
// DueAfter The period after which the invoice is due.
// With some payment solutions it's only applicable for manual collection method.
DueAfter *string `json:"due_after,omitempty"`
}
BillingWorkflowPaymentSendInvoiceSettings Payment settings for a billing workflow when the collection method is send invoice.
type BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod ¶
type BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod string
BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod The collection method for the invoice.
const (
BillingWorkflowPaymentSendInvoiceSettingsCollectionMethodSendInvoice BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod = "send_invoice"
)
Defines values for BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod.
type BillingWorkflowPaymentSettings ¶
type BillingWorkflowPaymentSettings struct {
// contains filtered or unexported fields
}
BillingWorkflowPaymentSettings Payment settings for a billing workflow.
func (BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentChargeAutomaticallySettings ¶
func (t BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentChargeAutomaticallySettings() (BillingWorkflowPaymentChargeAutomaticallySettings, error)
AsBillingWorkflowPaymentChargeAutomaticallySettings returns the union data inside the BillingWorkflowPaymentSettings as a BillingWorkflowPaymentChargeAutomaticallySettings
func (BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentSendInvoiceSettings ¶
func (t BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentSendInvoiceSettings() (BillingWorkflowPaymentSendInvoiceSettings, error)
AsBillingWorkflowPaymentSendInvoiceSettings returns the union data inside the BillingWorkflowPaymentSettings as a BillingWorkflowPaymentSendInvoiceSettings
func (BillingWorkflowPaymentSettings) Discriminator ¶
func (t BillingWorkflowPaymentSettings) Discriminator() (string, error)
func (*BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentChargeAutomaticallySettings ¶
func (t *BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentChargeAutomaticallySettings(v BillingWorkflowPaymentChargeAutomaticallySettings) error
FromBillingWorkflowPaymentChargeAutomaticallySettings overwrites any union data inside the BillingWorkflowPaymentSettings as the provided BillingWorkflowPaymentChargeAutomaticallySettings
func (*BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentSendInvoiceSettings ¶
func (t *BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentSendInvoiceSettings(v BillingWorkflowPaymentSendInvoiceSettings) error
FromBillingWorkflowPaymentSendInvoiceSettings overwrites any union data inside the BillingWorkflowPaymentSettings as the provided BillingWorkflowPaymentSendInvoiceSettings
func (BillingWorkflowPaymentSettings) MarshalJSON ¶
func (t BillingWorkflowPaymentSettings) MarshalJSON() ([]byte, error)
func (*BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentChargeAutomaticallySettings ¶
func (t *BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentChargeAutomaticallySettings(v BillingWorkflowPaymentChargeAutomaticallySettings) error
MergeBillingWorkflowPaymentChargeAutomaticallySettings performs a merge with any union data inside the BillingWorkflowPaymentSettings, using the provided BillingWorkflowPaymentChargeAutomaticallySettings
func (*BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentSendInvoiceSettings ¶
func (t *BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentSendInvoiceSettings(v BillingWorkflowPaymentSendInvoiceSettings) error
MergeBillingWorkflowPaymentSendInvoiceSettings performs a merge with any union data inside the BillingWorkflowPaymentSettings, using the provided BillingWorkflowPaymentSendInvoiceSettings
func (*BillingWorkflowPaymentSettings) UnmarshalJSON ¶
func (t *BillingWorkflowPaymentSettings) UnmarshalJSON(b []byte) error
func (BillingWorkflowPaymentSettings) ValueByDiscriminator ¶
func (t BillingWorkflowPaymentSettings) ValueByDiscriminator() (interface{}, error)
type BillingWorkflowTaxSettings ¶
type BillingWorkflowTaxSettings struct {
// DefaultTaxConfig Default tax configuration to apply to the invoices for line items.
DefaultTaxConfig *BillingTaxConfig `json:"default_tax_config,omitempty"`
// Enabled Enable automatic tax calculation when tax is supported by the app.
// For example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.
Enabled *bool `json:"enabled,omitempty"`
// Enforced Enforce tax calculation when tax is supported by the app.
// When enabled, the billing system will not allow to create an invoice without tax calculation.
// Enforcement is different per apps, for example, Stripe app requires customer
// to have a tax location when starting a paid subscription.
Enforced *bool `json:"enforced,omitempty"`
}
BillingWorkflowTaxSettings Tax settings for a billing workflow.
type CancelSubscriptionJSONRequestBody ¶
type CancelSubscriptionJSONRequestBody = BillingSubscriptionCancel
CancelSubscriptionJSONRequestBody defines body for CancelSubscription for application/json ContentType.
type ChangeSubscriptionJSONRequestBody ¶
type ChangeSubscriptionJSONRequestBody = BillingSubscriptionChange
ChangeSubscriptionJSONRequestBody defines body for ChangeSubscription for application/json ContentType.
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type ConflictError ¶
type ConflictError struct {
Detail interface{} `json:"detail"`
Instance interface{} `json:"instance"`
Status interface{} `json:"status"`
Title interface{} `json:"title"`
Type interface{} `json:"type,omitempty"`
}
ConflictError defines model for ConflictError.
type CountryCode ¶
type CountryCode = string
CountryCode [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code. Custom two-letter country codes are also supported for convenience.
type CreateBillingProfileJSONRequestBody ¶
type CreateBillingProfileJSONRequestBody = CreateBillingProfileRequest
CreateBillingProfileJSONRequestBody defines body for CreateBillingProfile for application/json ContentType.
type CreateBillingProfileRequest ¶
type CreateBillingProfileRequest struct {
// Apps The applications used by this billing profile.
Apps BillingProfileAppReferences `json:"apps"`
// Default Whether this is the default profile.
Default bool `json:"default"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// Supplier The name and contact information for the supplier this billing profile represents
Supplier BillingParty `json:"supplier"`
// Workflow The billing workflow settings for this profile
Workflow BillingWorkflow `json:"workflow"`
}
CreateBillingProfileRequest BillingProfile create request.
type CreateCustomerJSONRequestBody ¶
type CreateCustomerJSONRequestBody = CreateCustomerRequest
CreateCustomerJSONRequestBody defines body for CreateCustomer for application/json ContentType.
type CreateCustomerRequest ¶
type CreateCustomerRequest struct {
// BillingAddress The billing address of the customer.
// Used for tax and invoicing.
BillingAddress *BillingAddress `json:"billing_address,omitempty"`
// Currency Currency of the customer.
// Used for billing, tax and invoicing.
Currency *CurrencyCode `json:"currency,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Key ExternalResourceKey is a unique string that is used to identify a resource in an external system.
Key ExternalResourceKey `json:"key"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// PrimaryEmail The primary email address of the customer.
PrimaryEmail *string `json:"primary_email,omitempty"`
// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}
CreateCustomerRequest Customer create request.
type CreateCustomerStripeCheckoutSessionJSONRequestBody ¶
type CreateCustomerStripeCheckoutSessionJSONRequestBody = BillingCustomerStripeCreateCheckoutSessionRequest
CreateCustomerStripeCheckoutSessionJSONRequestBody defines body for CreateCustomerStripeCheckoutSession for application/json ContentType.
type CreateCustomerStripePortalSessionJSONRequestBody ¶
type CreateCustomerStripePortalSessionJSONRequestBody = BillingCustomerStripeCreateCustomerPortalSessionRequest
CreateCustomerStripePortalSessionJSONRequestBody defines body for CreateCustomerStripePortalSession for application/json ContentType.
type CreateMeterJSONRequestBody ¶
type CreateMeterJSONRequestBody = CreateMeterRequest
CreateMeterJSONRequestBody defines body for CreateMeter for application/json ContentType.
type CreateMeterRequest ¶
type CreateMeterRequest struct {
// Aggregation The aggregation type to use for the meter.
Aggregation MeterAggregation `json:"aggregation"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Dimensions Named JSONPath expressions to extract the group by values from the event data.
//
// Keys must be unique and consist only alphanumeric and underscore characters.
Dimensions *map[string]string `json:"dimensions,omitempty"`
// EventType The event type to include in the aggregation.
EventType string `json:"event_type"`
// EventsFrom The date since the meter should include events.
// Useful to skip old events.
// If not specified, all historical events are included.
EventsFrom *DateTime `json:"events_from,omitempty"`
// Key A key is a unique string that is used to identify a resource.
Key ResourceKey `json:"key"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// ValueProperty JSONPath expression to extract the value from the ingested event's data property.
//
// The ingested value for sum, avg, min, and max aggregations is a number or a string that can be parsed to a number.
//
// For unique_count aggregation, the ingested value must be a string. For count aggregation the value_property is ignored.
ValueProperty *string `json:"value_property,omitempty"`
}
CreateMeterRequest Meter create request.
type CreateSubscriptionJSONRequestBody ¶
type CreateSubscriptionJSONRequestBody = BillingSubscriptionCreate
CreateSubscriptionJSONRequestBody defines body for CreateSubscription for application/json ContentType.
type CurrencyCode ¶
type CurrencyCode = string
CurrencyCode Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
type CustomerPagePaginatedResponse ¶
type CustomerPagePaginatedResponse struct {
Data []BillingCustomer `json:"data"`
// Meta returns the pagination information
Meta PaginatedMeta `json:"meta"`
}
CustomerPagePaginatedResponse Page paginated response.
type DateTime ¶
DateTime [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
type ExternalResourceKey ¶
type ExternalResourceKey = string
ExternalResourceKey ExternalResourceKey is a unique string that is used to identify a resource in an external system.
type ForbiddenError ¶
type ForbiddenError struct {
Detail interface{} `json:"detail"`
Instance interface{} `json:"instance"`
Status interface{} `json:"status"`
Title interface{} `json:"title"`
Type interface{} `json:"type,omitempty"`
}
ForbiddenError defines model for ForbiddenError.
type GoneError ¶
type GoneError struct {
Detail interface{} `json:"detail"`
Instance interface{} `json:"instance"`
Status interface{} `json:"status"`
Title interface{} `json:"title"`
Type interface{} `json:"type,omitempty"`
}
GoneError defines model for GoneError.
type ISO8601Duration ¶
type ISO8601Duration = string
ISO8601Duration [ISO 8601 Duration](https://docs.digi.com/resources/documentation/digidocs/90001488-13/reference/r_iso_8601_duration_format.htm) string.
type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody ¶
type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody = []MeteringEvent
IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody defines parameters for IngestMeteringEvents.
type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody ¶
type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody = IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody
IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody defines body for IngestMeteringEvents for application/cloudevents-batch+json ContentType.
type IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody ¶
type IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody = MeteringEvent
IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody defines body for IngestMeteringEvents for application/cloudevents+json ContentType.
type IngestMeteringEventsJSONBody ¶
type IngestMeteringEventsJSONBody struct {
// contains filtered or unexported fields
}
IngestMeteringEventsJSONBody defines parameters for IngestMeteringEvents.
type IngestMeteringEventsJSONBody1 ¶
type IngestMeteringEventsJSONBody1 = []MeteringEvent
IngestMeteringEventsJSONBody1 defines parameters for IngestMeteringEvents.
type IngestMeteringEventsJSONRequestBody ¶
type IngestMeteringEventsJSONRequestBody IngestMeteringEventsJSONBody
IngestMeteringEventsJSONRequestBody defines body for IngestMeteringEvents for application/json ContentType.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type InvalidParameterChoiceItem ¶
type InvalidParameterChoiceItem struct {
Choices []interface{} `json:"choices"`
Field string `json:"field"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule InvalidParameterChoiceItemRule `json:"rule"`
Source *string `json:"source,omitempty"`
}
InvalidParameterChoiceItem defines model for InvalidParameterChoiceItem.
type InvalidParameterChoiceItemRule ¶
type InvalidParameterChoiceItemRule string
InvalidParameterChoiceItemRule invalid parameters rules
const (
InvalidParameterChoiceItemRuleEnum InvalidParameterChoiceItemRule = "enum"
)
Defines values for InvalidParameterChoiceItemRule.
type InvalidParameterDependentItem ¶
type InvalidParameterDependentItem struct {
Dependents nullable.Nullable[[]interface{}] `json:"dependents"`
Field string `json:"field"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule nullable.Nullable[InvalidParameterDependentItemRule] `json:"rule"`
Source *string `json:"source,omitempty"`
}
InvalidParameterDependentItem defines model for InvalidParameterDependentItem.
type InvalidParameterDependentItemRule ¶
type InvalidParameterDependentItemRule string
InvalidParameterDependentItemRule invalid parameters rules
const (
InvalidParameterDependentItemRuleDependentFields InvalidParameterDependentItemRule = "dependent_fields"
)
Defines values for InvalidParameterDependentItemRule.
type InvalidParameterMaximumLength ¶
type InvalidParameterMaximumLength struct {
Field string `json:"field"`
Maximum int `json:"maximum"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule InvalidParameterMaximumLengthRule `json:"rule"`
Source *string `json:"source,omitempty"`
}
InvalidParameterMaximumLength defines model for InvalidParameterMaximumLength.
type InvalidParameterMaximumLengthRule ¶
type InvalidParameterMaximumLengthRule string
InvalidParameterMaximumLengthRule invalid parameters rules
const ( InvalidParameterMaximumLengthRuleMax InvalidParameterMaximumLengthRule = "max" InvalidParameterMaximumLengthRuleMaxItems InvalidParameterMaximumLengthRule = "max_items" InvalidParameterMaximumLengthRuleMaxLength InvalidParameterMaximumLengthRule = "max_length" )
Defines values for InvalidParameterMaximumLengthRule.
type InvalidParameterMinimumLength ¶
type InvalidParameterMinimumLength struct {
Field string `json:"field"`
Minimum int `json:"minimum"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule InvalidParameterMinimumLengthRule `json:"rule"`
Source *string `json:"source,omitempty"`
}
InvalidParameterMinimumLength defines model for InvalidParameterMinimumLength.
type InvalidParameterMinimumLengthRule ¶
type InvalidParameterMinimumLengthRule string
InvalidParameterMinimumLengthRule invalid parameters rules
const ( InvalidParameterMinimumLengthRuleMin InvalidParameterMinimumLengthRule = "min" InvalidParameterMinimumLengthRuleMinDigits InvalidParameterMinimumLengthRule = "min_digits" InvalidParameterMinimumLengthRuleMinItems InvalidParameterMinimumLengthRule = "min_items" InvalidParameterMinimumLengthRuleMinLength InvalidParameterMinimumLengthRule = "min_length" InvalidParameterMinimumLengthRuleMinLowercase InvalidParameterMinimumLengthRule = "min_lowercase" InvalidParameterMinimumLengthRuleMinSymbols InvalidParameterMinimumLengthRule = "min_symbols" InvalidParameterMinimumLengthRuleMinUppercase InvalidParameterMinimumLengthRule = "min_uppercase" )
Defines values for InvalidParameterMinimumLengthRule.
type InvalidParameterStandard ¶
type InvalidParameterStandard struct {
Field string `json:"field"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule nullable.Nullable[InvalidRules] `json:"rule,omitempty"`
Source *string `json:"source,omitempty"`
}
InvalidParameterStandard defines model for InvalidParameterStandard.
type InvalidParameters ¶
type InvalidParameters = []InvalidParameters_Item
InvalidParameters invalid parameters
type InvalidParameters_Item ¶
type InvalidParameters_Item struct {
// contains filtered or unexported fields
}
InvalidParameters_Item defines model for InvalidParameters.Item.
func (InvalidParameters_Item) AsInvalidParameterChoiceItem ¶
func (t InvalidParameters_Item) AsInvalidParameterChoiceItem() (InvalidParameterChoiceItem, error)
AsInvalidParameterChoiceItem returns the union data inside the InvalidParameters_Item as a InvalidParameterChoiceItem
func (InvalidParameters_Item) AsInvalidParameterDependentItem ¶
func (t InvalidParameters_Item) AsInvalidParameterDependentItem() (InvalidParameterDependentItem, error)
AsInvalidParameterDependentItem returns the union data inside the InvalidParameters_Item as a InvalidParameterDependentItem
func (InvalidParameters_Item) AsInvalidParameterMaximumLength ¶
func (t InvalidParameters_Item) AsInvalidParameterMaximumLength() (InvalidParameterMaximumLength, error)
AsInvalidParameterMaximumLength returns the union data inside the InvalidParameters_Item as a InvalidParameterMaximumLength
func (InvalidParameters_Item) AsInvalidParameterMinimumLength ¶
func (t InvalidParameters_Item) AsInvalidParameterMinimumLength() (InvalidParameterMinimumLength, error)
AsInvalidParameterMinimumLength returns the union data inside the InvalidParameters_Item as a InvalidParameterMinimumLength
func (InvalidParameters_Item) AsInvalidParameterStandard ¶
func (t InvalidParameters_Item) AsInvalidParameterStandard() (InvalidParameterStandard, error)
AsInvalidParameterStandard returns the union data inside the InvalidParameters_Item as a InvalidParameterStandard
func (*InvalidParameters_Item) FromInvalidParameterChoiceItem ¶
func (t *InvalidParameters_Item) FromInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error
FromInvalidParameterChoiceItem overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterChoiceItem
func (*InvalidParameters_Item) FromInvalidParameterDependentItem ¶
func (t *InvalidParameters_Item) FromInvalidParameterDependentItem(v InvalidParameterDependentItem) error
FromInvalidParameterDependentItem overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterDependentItem
func (*InvalidParameters_Item) FromInvalidParameterMaximumLength ¶
func (t *InvalidParameters_Item) FromInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error
FromInvalidParameterMaximumLength overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterMaximumLength
func (*InvalidParameters_Item) FromInvalidParameterMinimumLength ¶
func (t *InvalidParameters_Item) FromInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error
FromInvalidParameterMinimumLength overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterMinimumLength
func (*InvalidParameters_Item) FromInvalidParameterStandard ¶
func (t *InvalidParameters_Item) FromInvalidParameterStandard(v InvalidParameterStandard) error
FromInvalidParameterStandard overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterStandard
func (InvalidParameters_Item) MarshalJSON ¶
func (t InvalidParameters_Item) MarshalJSON() ([]byte, error)
func (*InvalidParameters_Item) MergeInvalidParameterChoiceItem ¶
func (t *InvalidParameters_Item) MergeInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error
MergeInvalidParameterChoiceItem performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterChoiceItem
func (*InvalidParameters_Item) MergeInvalidParameterDependentItem ¶
func (t *InvalidParameters_Item) MergeInvalidParameterDependentItem(v InvalidParameterDependentItem) error
MergeInvalidParameterDependentItem performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterDependentItem
func (*InvalidParameters_Item) MergeInvalidParameterMaximumLength ¶
func (t *InvalidParameters_Item) MergeInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error
MergeInvalidParameterMaximumLength performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterMaximumLength
func (*InvalidParameters_Item) MergeInvalidParameterMinimumLength ¶
func (t *InvalidParameters_Item) MergeInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error
MergeInvalidParameterMinimumLength performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterMinimumLength
func (*InvalidParameters_Item) MergeInvalidParameterStandard ¶
func (t *InvalidParameters_Item) MergeInvalidParameterStandard(v InvalidParameterStandard) error
MergeInvalidParameterStandard performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterStandard
func (*InvalidParameters_Item) UnmarshalJSON ¶
func (t *InvalidParameters_Item) UnmarshalJSON(b []byte) error
type InvalidRules ¶
type InvalidRules string
InvalidRules invalid parameters rules
const ( InvalidRulesInvalid InvalidRules = "invalid" InvalidRulesIsArn InvalidRules = "is_arn" InvalidRulesIsArray InvalidRules = "is_array" InvalidRulesIsBase64 InvalidRules = "is_base64" InvalidRulesIsBoolean InvalidRules = "is_boolean" InvalidRulesIsDateTime InvalidRules = "is_date_time" InvalidRulesIsFqdn InvalidRules = "is_fqdn" InvalidRulesIsInteger InvalidRules = "is_integer" InvalidRulesIsLabel InvalidRules = "is_label" InvalidRulesIsNull InvalidRules = "is_null" InvalidRulesIsNumber InvalidRules = "is_number" InvalidRulesIsObject InvalidRules = "is_object" InvalidRulesIsString InvalidRules = "is_string" InvalidRulesIsSupportedNetworkAvailabilityZoneList InvalidRules = "is_supported_network_availability_zone_list" InvalidRulesIsSupportedNetworkCidrBlock InvalidRules = "is_supported_network_cidr_block" InvalidRulesIsSupportedProviderRegion InvalidRules = "is_supported_provider_region" InvalidRulesIsUuid InvalidRules = "is_uuid" InvalidRulesMatchesRegex InvalidRules = "matches_regex" InvalidRulesMissingReference InvalidRules = "missing_reference" InvalidRulesRequired InvalidRules = "required" InvalidRulesType InvalidRules = "type" InvalidRulesUnknownProperty InvalidRules = "unknown_property" )
Defines values for InvalidRules.
type Labels ¶
Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
type ListAppsParams ¶
type ListAppsParams struct {
// Page Determines which page of the collection to retrieve.
Page *PagePaginationQuery `json:"page,omitempty"`
}
ListAppsParams defines parameters for ListApps.
type ListBillingProfilesParams ¶
type ListBillingProfilesParams struct {
// Page Determines which page of the collection to retrieve.
Page *PagePaginationQuery `json:"page,omitempty"`
}
ListBillingProfilesParams defines parameters for ListBillingProfiles.
type ListCustomerEntitlementAccessResponseData ¶
type ListCustomerEntitlementAccessResponseData struct {
// Data The list of entitlement access results.
Data []BillingEntitlementAccessResult `json:"data"`
}
ListCustomerEntitlementAccessResponseData List customer entitlement access response data.
type ListCustomersParams ¶
type ListCustomersParams struct {
// Page Determines which page of the collection to retrieve.
Page *PagePaginationQuery `json:"page,omitempty"`
// Sort Sort customers returned in the response.
// Supported sort attributes are:
// - `id`
// - `name` (default)
// - `created_at`
//
// The `asc` suffix is optional as the default sort order is ascending.
// The `desc` suffix is used to specify a descending order.
Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`
// Filter Filter customers returned in the response.
//
// To filter customers by key add the following query param: filter[key]=my-db-id
Filter *ListCustomersParamsFilter `json:"filter,omitempty"`
}
ListCustomersParams defines parameters for ListCustomers.
type ListCustomersParamsFilter ¶
type ListCustomersParamsFilter struct {
// Key Filter customers by key.
// Case-insensitive partial match.
Key *ExternalResourceKey `json:"key,omitempty"`
}
ListCustomersParamsFilter Filter options for listing customers.
type ListMetersParams ¶
type ListMetersParams struct {
// Page Determines which page of the collection to retrieve.
Page *PagePaginationQuery `json:"page,omitempty"`
}
ListMetersParams defines parameters for ListMeters.
type ListSubscriptionsParams ¶
type ListSubscriptionsParams struct {
// Page Determines which page of the collection to retrieve.
Page *PagePaginationQuery `json:"page,omitempty"`
// Filter Filter subscriptions.
Filter *struct {
// CustomerId Filter subscriptions by customer ID.
CustomerId *ULID `json:"customer_id,omitempty"`
} `json:"filter,omitempty"`
}
ListSubscriptionsParams defines parameters for ListSubscriptions.
type Meter ¶
type Meter struct {
// Aggregation The aggregation type to use for the meter.
Aggregation MeterAggregation `json:"aggregation"`
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Dimensions Named JSONPath expressions to extract the group by values from the event data.
//
// Keys must be unique and consist only alphanumeric and underscore characters.
Dimensions *map[string]string `json:"dimensions,omitempty"`
// EventType The event type to include in the aggregation.
EventType string `json:"event_type"`
// EventsFrom The date since the meter should include events.
// Useful to skip old events.
// If not specified, all historical events are included.
EventsFrom *DateTime `json:"events_from,omitempty"`
Id ULID `json:"id"`
// Key A key is a unique string that is used to identify a resource.
Key ResourceKey `json:"key"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
// ValueProperty JSONPath expression to extract the value from the ingested event's data property.
//
// The ingested value for sum, avg, min, and max aggregations is a number or a string that can be parsed to a number.
//
// For unique_count aggregation, the ingested value must be a string. For count aggregation the value_property is ignored.
ValueProperty *string `json:"value_property,omitempty"`
}
Meter A meter is a configuration that defines how to match and aggregate events.
type MeterAggregation ¶
type MeterAggregation string
MeterAggregation The aggregation type to use for the meter.
const ( MeterAggregationAvg MeterAggregation = "avg" MeterAggregationCount MeterAggregation = "count" MeterAggregationLatest MeterAggregation = "latest" MeterAggregationMax MeterAggregation = "max" MeterAggregationMin MeterAggregation = "min" MeterAggregationSum MeterAggregation = "sum" MeterAggregationUniqueCount MeterAggregation = "unique_count" )
Defines values for MeterAggregation.
type MeterPagePaginatedResponse ¶
type MeterPagePaginatedResponse struct {
Data []Meter `json:"data"`
// Meta returns the pagination information
Meta PaginatedMeta `json:"meta"`
}
MeterPagePaginatedResponse Page paginated response.
type MeteringEvent ¶
type MeteringEvent struct {
// Data The event payload.
// Optional, if present it must be a JSON object.
Data nullable.Nullable[map[string]interface{}] `json:"data,omitempty"`
// Datacontenttype Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP.
Datacontenttype nullable.Nullable[MeteringEventDatacontenttype] `json:"datacontenttype,omitempty"`
// Dataschema Identifies the schema that data adheres to.
Dataschema nullable.Nullable[string] `json:"dataschema,omitempty"`
// Id Identifies the event.
Id string `json:"id"`
// Source Identifies the context in which an event happened.
Source string `json:"source"`
// Specversion The version of the CloudEvents specification which the event uses.
Specversion string `json:"specversion"`
// Subject Describes the subject of the event in the context of the event producer (identified by source).
Subject string `json:"subject"`
// Time Timestamp of when the occurrence happened. Must adhere to RFC 3339.
Time nullable.Nullable[DateTime] `json:"time,omitempty"`
// Type Contains a value describing the type of event related to the originating occurrence.
Type string `json:"type"`
}
MeteringEvent Metering event following the CloudEvents specification.
type MeteringEventDatacontenttype ¶
type MeteringEventDatacontenttype string
MeteringEventDatacontenttype Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP.
const (
MeteringEventDatacontenttypeApplicationjson MeteringEventDatacontenttype = "application/json"
)
Defines values for MeteringEventDatacontenttype.
type NotFoundError ¶
type NotFoundError struct {
Detail interface{} `json:"detail"`
Instance interface{} `json:"instance"`
Status interface{} `json:"status"`
Title interface{} `json:"title"`
Type interface{} `json:"type,omitempty"`
}
NotFoundError defines model for NotFoundError.
type PageMeta ¶
type PageMeta struct {
Number float32 `json:"number"`
Size float32 `json:"size"`
Total float32 `json:"total"`
}
PageMeta Contains pagination query parameters and the total number of objects returned.
type PagePaginationQuery ¶
type PagePaginationQuery struct {
Number *int `json:"number,omitempty"`
Size *int `json:"size,omitempty"`
}
PagePaginationQuery defines model for PagePaginationQuery.
type PaginatedMeta ¶
type PaginatedMeta struct {
// Page Contains pagination query parameters and the total number of objects returned.
Page PageMeta `json:"page"`
}
PaginatedMeta returns the pagination information
type RecurringPeriod ¶
type RecurringPeriod struct {
// Anchor A date-time anchor to base the recurring period on.
Anchor DateTime `json:"anchor"`
// Interval The interval duration in ISO 8601 format.
Interval ISO8601Duration `json:"interval"`
}
RecurringPeriod Recurring period with an anchor and an interval.
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 ResourceKey ¶
type ResourceKey = string
ResourceKey A key is a unique string that is used to identify a resource.
type ServerInterface ¶
type ServerInterface interface {
// List apps
// (GET /openmeter/apps)
ListApps(w http.ResponseWriter, r *http.Request, params ListAppsParams)
// Get app
// (GET /openmeter/apps/{appId})
GetApp(w http.ResponseWriter, r *http.Request, appId ULID)
// List customers
// (GET /openmeter/customers)
ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)
// Create customer
// (POST /openmeter/customers)
CreateCustomer(w http.ResponseWriter, r *http.Request)
// Delete customer
// (DELETE /openmeter/customers/{customerId})
DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
// Get customer
// (GET /openmeter/customers/{customerId})
GetCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
// Upsert customer
// (PUT /openmeter/customers/{customerId})
UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
// Get customer billing data
// (GET /openmeter/customers/{customerId}/billing)
GetCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)
// Update customer billing data
// (PUT /openmeter/customers/{customerId}/billing)
UpdateCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)
// Update customer billing app data
// (PUT /openmeter/customers/{customerId}/billing/app-data)
UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request, customerId ULID)
// Create Stripe Checkout Session
// (POST /openmeter/customers/{customerId}/billing/stripe/checkout-sessions)
CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request, customerId ULID)
// Create Stripe customer portal session
// (POST /openmeter/customers/{customerId}/billing/stripe/portal-sessions)
CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request, customerId ULID)
// List customer entitlement access
// (GET /openmeter/customers/{customerId}/entitlement-access)
ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID)
// Ingest metering events
// (POST /openmeter/events)
IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
// List meters
// (GET /openmeter/meters)
ListMeters(w http.ResponseWriter, r *http.Request, params ListMetersParams)
// Create meter
// (POST /openmeter/meters)
CreateMeter(w http.ResponseWriter, r *http.Request)
// Delete meter
// (DELETE /openmeter/meters/{meterId})
DeleteMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
// Get meter
// (GET /openmeter/meters/{meterId})
GetMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
// List billing profiles
// (GET /openmeter/profiles)
ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams)
// Create a new billing profile
// (POST /openmeter/profiles)
CreateBillingProfile(w http.ResponseWriter, r *http.Request)
// Delete a billing profile
// (DELETE /openmeter/profiles/{id})
DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
// Get a billing profile
// (GET /openmeter/profiles/{id})
GetBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
// Update a billing profile
// (PUT /openmeter/profiles/{id})
UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
// List subscriptions
// (GET /openmeter/subscriptions)
ListSubscriptions(w http.ResponseWriter, r *http.Request, params ListSubscriptionsParams)
// Create subscription
// (POST /openmeter/subscriptions)
CreateSubscription(w http.ResponseWriter, r *http.Request)
// Get subscription
// (GET /openmeter/subscriptions/{subscriptionId})
GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
// Cancel subscription
// (POST /openmeter/subscriptions/{subscriptionId}/cancel)
CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
// Change subscription
// (POST /openmeter/subscriptions/{subscriptionId}/change)
ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
// Unschedule subscription cancelation
// (POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation)
UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
}
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) CancelSubscription ¶
func (siw *ServerInterfaceWrapper) CancelSubscription(w http.ResponseWriter, r *http.Request)
CancelSubscription operation middleware
func (*ServerInterfaceWrapper) ChangeSubscription ¶
func (siw *ServerInterfaceWrapper) ChangeSubscription(w http.ResponseWriter, r *http.Request)
ChangeSubscription operation middleware
func (*ServerInterfaceWrapper) CreateBillingProfile ¶
func (siw *ServerInterfaceWrapper) CreateBillingProfile(w http.ResponseWriter, r *http.Request)
CreateBillingProfile operation middleware
func (*ServerInterfaceWrapper) CreateCustomer ¶
func (siw *ServerInterfaceWrapper) CreateCustomer(w http.ResponseWriter, r *http.Request)
CreateCustomer operation middleware
func (*ServerInterfaceWrapper) CreateCustomerStripeCheckoutSession ¶
func (siw *ServerInterfaceWrapper) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request)
CreateCustomerStripeCheckoutSession operation middleware
func (*ServerInterfaceWrapper) CreateCustomerStripePortalSession ¶
func (siw *ServerInterfaceWrapper) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request)
CreateCustomerStripePortalSession operation middleware
func (*ServerInterfaceWrapper) CreateMeter ¶
func (siw *ServerInterfaceWrapper) CreateMeter(w http.ResponseWriter, r *http.Request)
CreateMeter operation middleware
func (*ServerInterfaceWrapper) CreateSubscription ¶
func (siw *ServerInterfaceWrapper) CreateSubscription(w http.ResponseWriter, r *http.Request)
CreateSubscription operation middleware
func (*ServerInterfaceWrapper) DeleteBillingProfile ¶
func (siw *ServerInterfaceWrapper) DeleteBillingProfile(w http.ResponseWriter, r *http.Request)
DeleteBillingProfile operation middleware
func (*ServerInterfaceWrapper) DeleteCustomer ¶
func (siw *ServerInterfaceWrapper) DeleteCustomer(w http.ResponseWriter, r *http.Request)
DeleteCustomer operation middleware
func (*ServerInterfaceWrapper) DeleteMeter ¶
func (siw *ServerInterfaceWrapper) DeleteMeter(w http.ResponseWriter, r *http.Request)
DeleteMeter operation middleware
func (*ServerInterfaceWrapper) GetApp ¶
func (siw *ServerInterfaceWrapper) GetApp(w http.ResponseWriter, r *http.Request)
GetApp operation middleware
func (*ServerInterfaceWrapper) GetBillingProfile ¶
func (siw *ServerInterfaceWrapper) GetBillingProfile(w http.ResponseWriter, r *http.Request)
GetBillingProfile operation middleware
func (*ServerInterfaceWrapper) GetCustomer ¶
func (siw *ServerInterfaceWrapper) GetCustomer(w http.ResponseWriter, r *http.Request)
GetCustomer operation middleware
func (*ServerInterfaceWrapper) GetCustomerBilling ¶
func (siw *ServerInterfaceWrapper) GetCustomerBilling(w http.ResponseWriter, r *http.Request)
GetCustomerBilling operation middleware
func (*ServerInterfaceWrapper) GetMeter ¶
func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)
GetMeter operation middleware
func (*ServerInterfaceWrapper) GetSubscription ¶
func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request)
GetSubscription operation middleware
func (*ServerInterfaceWrapper) IngestMeteringEvents ¶
func (siw *ServerInterfaceWrapper) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
IngestMeteringEvents operation middleware
func (*ServerInterfaceWrapper) ListApps ¶
func (siw *ServerInterfaceWrapper) ListApps(w http.ResponseWriter, r *http.Request)
ListApps operation middleware
func (*ServerInterfaceWrapper) ListBillingProfiles ¶
func (siw *ServerInterfaceWrapper) ListBillingProfiles(w http.ResponseWriter, r *http.Request)
ListBillingProfiles operation middleware
func (*ServerInterfaceWrapper) ListCustomerEntitlementAccess ¶
func (siw *ServerInterfaceWrapper) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request)
ListCustomerEntitlementAccess operation middleware
func (*ServerInterfaceWrapper) ListCustomers ¶
func (siw *ServerInterfaceWrapper) ListCustomers(w http.ResponseWriter, r *http.Request)
ListCustomers operation middleware
func (*ServerInterfaceWrapper) ListMeters ¶
func (siw *ServerInterfaceWrapper) ListMeters(w http.ResponseWriter, r *http.Request)
ListMeters operation middleware
func (*ServerInterfaceWrapper) ListSubscriptions ¶
func (siw *ServerInterfaceWrapper) ListSubscriptions(w http.ResponseWriter, r *http.Request)
ListSubscriptions operation middleware
func (*ServerInterfaceWrapper) UnscheduleCancelation ¶
func (siw *ServerInterfaceWrapper) UnscheduleCancelation(w http.ResponseWriter, r *http.Request)
UnscheduleCancelation operation middleware
func (*ServerInterfaceWrapper) UpdateBillingProfile ¶
func (siw *ServerInterfaceWrapper) UpdateBillingProfile(w http.ResponseWriter, r *http.Request)
UpdateBillingProfile operation middleware
func (*ServerInterfaceWrapper) UpdateCustomerBilling ¶
func (siw *ServerInterfaceWrapper) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request)
UpdateCustomerBilling operation middleware
func (*ServerInterfaceWrapper) UpdateCustomerBillingAppData ¶
func (siw *ServerInterfaceWrapper) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request)
UpdateCustomerBillingAppData operation middleware
func (*ServerInterfaceWrapper) UpsertCustomer ¶
func (siw *ServerInterfaceWrapper) UpsertCustomer(w http.ResponseWriter, r *http.Request)
UpsertCustomer operation middleware
type SortQuery ¶
type SortQuery = string
SortQuery The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order. Multiple sort attributes may be provided via a comma separated list. JSONPath notation may be used to specify a sub-attribute (eg: 'foo.bar desc').
type SubscriptionPagePaginatedResponse ¶
type SubscriptionPagePaginatedResponse struct {
Data []BillingSubscription `json:"data"`
// Meta returns the pagination information
Meta PaginatedMeta `json:"meta"`
}
SubscriptionPagePaginatedResponse Page paginated response.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type ULID ¶
type ULID = string
ULID ULID (Universally Unique Lexicographically Sortable Identifier).
type Unauthorized ¶
type Unauthorized = UnauthorizedError
Unauthorized defines model for Unauthorized.
type UnauthorizedError ¶
type UnauthorizedError struct {
}
UnauthorizedError defines model for UnauthorizedError.
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) CancelSubscription ¶
func (_ Unimplemented) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
Cancel subscription (POST /openmeter/subscriptions/{subscriptionId}/cancel)
func (Unimplemented) ChangeSubscription ¶
func (_ Unimplemented) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
Change subscription (POST /openmeter/subscriptions/{subscriptionId}/change)
func (Unimplemented) CreateBillingProfile ¶
func (_ Unimplemented) CreateBillingProfile(w http.ResponseWriter, r *http.Request)
Create a new billing profile (POST /openmeter/profiles)
func (Unimplemented) CreateCustomer ¶
func (_ Unimplemented) CreateCustomer(w http.ResponseWriter, r *http.Request)
Create customer (POST /openmeter/customers)
func (Unimplemented) CreateCustomerStripeCheckoutSession ¶
func (_ Unimplemented) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request, customerId ULID)
Create Stripe Checkout Session (POST /openmeter/customers/{customerId}/billing/stripe/checkout-sessions)
func (Unimplemented) CreateCustomerStripePortalSession ¶
func (_ Unimplemented) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request, customerId ULID)
Create Stripe customer portal session (POST /openmeter/customers/{customerId}/billing/stripe/portal-sessions)
func (Unimplemented) CreateMeter ¶
func (_ Unimplemented) CreateMeter(w http.ResponseWriter, r *http.Request)
Create meter (POST /openmeter/meters)
func (Unimplemented) CreateSubscription ¶
func (_ Unimplemented) CreateSubscription(w http.ResponseWriter, r *http.Request)
Create subscription (POST /openmeter/subscriptions)
func (Unimplemented) DeleteBillingProfile ¶
func (_ Unimplemented) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
Delete a billing profile (DELETE /openmeter/profiles/{id})
func (Unimplemented) DeleteCustomer ¶
func (_ Unimplemented) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
Delete customer (DELETE /openmeter/customers/{customerId})
func (Unimplemented) DeleteMeter ¶
func (_ Unimplemented) DeleteMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
Delete meter (DELETE /openmeter/meters/{meterId})
func (Unimplemented) GetApp ¶
func (_ Unimplemented) GetApp(w http.ResponseWriter, r *http.Request, appId ULID)
Get app (GET /openmeter/apps/{appId})
func (Unimplemented) GetBillingProfile ¶
func (_ Unimplemented) GetBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
Get a billing profile (GET /openmeter/profiles/{id})
func (Unimplemented) GetCustomer ¶
func (_ Unimplemented) GetCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
Get customer (GET /openmeter/customers/{customerId})
func (Unimplemented) GetCustomerBilling ¶
func (_ Unimplemented) GetCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)
Get customer billing data (GET /openmeter/customers/{customerId}/billing)
func (Unimplemented) GetMeter ¶
func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
Get meter (GET /openmeter/meters/{meterId})
func (Unimplemented) GetSubscription ¶
func (_ Unimplemented) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
Get subscription (GET /openmeter/subscriptions/{subscriptionId})
func (Unimplemented) IngestMeteringEvents ¶
func (_ Unimplemented) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
Ingest metering events (POST /openmeter/events)
func (Unimplemented) ListApps ¶
func (_ Unimplemented) ListApps(w http.ResponseWriter, r *http.Request, params ListAppsParams)
List apps (GET /openmeter/apps)
func (Unimplemented) ListBillingProfiles ¶
func (_ Unimplemented) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams)
List billing profiles (GET /openmeter/profiles)
func (Unimplemented) ListCustomerEntitlementAccess ¶
func (_ Unimplemented) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID)
List customer entitlement access (GET /openmeter/customers/{customerId}/entitlement-access)
func (Unimplemented) ListCustomers ¶
func (_ Unimplemented) ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)
List customers (GET /openmeter/customers)
func (Unimplemented) ListMeters ¶
func (_ Unimplemented) ListMeters(w http.ResponseWriter, r *http.Request, params ListMetersParams)
List meters (GET /openmeter/meters)
func (Unimplemented) ListSubscriptions ¶
func (_ Unimplemented) ListSubscriptions(w http.ResponseWriter, r *http.Request, params ListSubscriptionsParams)
List subscriptions (GET /openmeter/subscriptions)
func (Unimplemented) UnscheduleCancelation ¶
func (_ Unimplemented) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
Unschedule subscription cancelation (POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation)
func (Unimplemented) UpdateBillingProfile ¶
func (_ Unimplemented) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
Update a billing profile (PUT /openmeter/profiles/{id})
func (Unimplemented) UpdateCustomerBilling ¶
func (_ Unimplemented) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)
Update customer billing data (PUT /openmeter/customers/{customerId}/billing)
func (Unimplemented) UpdateCustomerBillingAppData ¶
func (_ Unimplemented) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request, customerId ULID)
Update customer billing app data (PUT /openmeter/customers/{customerId}/billing/app-data)
func (Unimplemented) UpsertCustomer ¶
func (_ Unimplemented) UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
Upsert customer (PUT /openmeter/customers/{customerId})
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateBillingProfileJSONRequestBody ¶
type UpdateBillingProfileJSONRequestBody = UpsertBillingProfileRequest
UpdateBillingProfileJSONRequestBody defines body for UpdateBillingProfile for application/json ContentType.
type UpdateCustomerBillingAppDataJSONRequestBody ¶
type UpdateCustomerBillingAppDataJSONRequestBody = UpsertAppCustomerDataRequest
UpdateCustomerBillingAppDataJSONRequestBody defines body for UpdateCustomerBillingAppData for application/json ContentType.
type UpdateCustomerBillingJSONRequestBody ¶
type UpdateCustomerBillingJSONRequestBody = UpsertCustomerBillingDataRequest
UpdateCustomerBillingJSONRequestBody defines body for UpdateCustomerBilling for application/json ContentType.
type UpsertAppCustomerDataRequest ¶
type UpsertAppCustomerDataRequest struct {
// ExternalInvoicing Used if the customer has a linked external invoicing app.
ExternalInvoicing *BillingAppCustomerDataExternalInvoicing `json:"external_invoicing,omitempty"`
// Stripe Used if the customer has a linked Stripe app.
Stripe *BillingAppCustomerDataStripe `json:"stripe,omitempty"`
}
UpsertAppCustomerDataRequest AppCustomerData upsert request.
type UpsertBillingProfileRequest ¶
type UpsertBillingProfileRequest struct {
// Default Whether this is the default profile.
Default bool `json:"default"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// Supplier The name and contact information for the supplier this billing profile represents
Supplier BillingParty `json:"supplier"`
// Workflow The billing workflow settings for this profile
Workflow BillingWorkflow `json:"workflow"`
}
UpsertBillingProfileRequest BillingProfile upsert request.
type UpsertCustomerBillingDataRequest ¶
type UpsertCustomerBillingDataRequest struct {
// AppData App customer data.
AppData *BillingAppCustomerData `json:"app_data,omitempty"`
// BillingProfile The billing profile for the customer.
//
// If not provided, the default billing profile will be used.
BillingProfile *BillingProfileReference `json:"billing_profile,omitempty"`
}
UpsertCustomerBillingDataRequest CustomerBillingData upsert request.
type UpsertCustomerJSONRequestBody ¶
type UpsertCustomerJSONRequestBody = UpsertCustomerRequest
UpsertCustomerJSONRequestBody defines body for UpsertCustomer for application/json ContentType.
type UpsertCustomerRequest ¶
type UpsertCustomerRequest struct {
// BillingAddress The billing address of the customer.
// Used for tax and invoicing.
BillingAddress *BillingAddress `json:"billing_address,omitempty"`
// Currency Currency of the customer.
// Used for billing, tax and invoicing.
Currency *CurrencyCode `json:"currency,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// PrimaryEmail The primary email address of the customer.
PrimaryEmail *string `json:"primary_email,omitempty"`
// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}
UpsertCustomerRequest Customer upsert request.
type UsageAttributionSubjectKey ¶
type UsageAttributionSubjectKey = string
UsageAttributionSubjectKey Subject key.