diff --git a/api/api.gen.go b/api/api.gen.go index a5342cbb8..8def8ccd0 100644 --- a/api/api.gen.go +++ b/api/api.gen.go @@ -49,105 +49,9 @@ const ( AppTypeStripe AppType = "stripe" ) -// Defines values for BillingCustomerOverrideOrderBy. +// Defines values for BillingProfileCustomerOverrideOrderBy. const ( - BillingCustomerOverrideOrderById BillingCustomerOverrideOrderBy = "id" -) - -// Defines values for BillingDocumentRefType. -const ( - BillingDocumentRefTypeCreditNodeOriginalInvoice BillingDocumentRefType = "credit_node_original_invoice" -) - -// Defines values for BillingFlatFeeLineType. -const ( - BillingFlatFeeLineTypeFlatFee BillingFlatFeeLineType = "flat_fee" -) - -// Defines values for BillingFlatFeeLineCreateType. -const ( - BillingFlatFeeLineCreateTypeFlatFee BillingFlatFeeLineCreateType = "flat_fee" -) - -// Defines values for BillingFlatFeeLineCreateItemType. -const ( - BillingFlatFeeLineCreateItemTypeFlatFee BillingFlatFeeLineCreateItemType = "flat_fee" -) - -// Defines values for BillingInvoiceAction. -const ( - BillingInvoiceActionAdvance BillingInvoiceAction = "advance" - BillingInvoiceActionApprove BillingInvoiceAction = "approve" - BillingInvoiceActionDelete BillingInvoiceAction = "delete" - BillingInvoiceActionRetry BillingInvoiceAction = "retry" - BillingInvoiceActionVoid BillingInvoiceAction = "void" -) - -// Defines values for BillingInvoiceExpand. -const ( - BillingInvoiceExpandAll BillingInvoiceExpand = "*" - BillingInvoiceExpandLines BillingInvoiceExpand = "lines" - BillingInvoiceExpandPreceding BillingInvoiceExpand = "preceding" - BillingInvoiceExpandWorkflow BillingInvoiceExpand = "workflow" - BillingInvoiceExpandWorkflowApps BillingInvoiceExpand = "workflow.apps" -) - -// Defines values for BillingInvoiceExtendedStatus. -const ( - BillingInvoiceExtendedStatusDraft BillingInvoiceExtendedStatus = "draft" - BillingInvoiceExtendedStatusDraftCreated BillingInvoiceExtendedStatus = "draft_created" - BillingInvoiceExtendedStatusDraftInvalid BillingInvoiceExtendedStatus = "draft_invalid" - BillingInvoiceExtendedStatusDraftManualApprovalNeeded BillingInvoiceExtendedStatus = "draft_manual_approval_needed" - BillingInvoiceExtendedStatusDraftReadyToIssue BillingInvoiceExtendedStatus = "draft_ready_to_issue" - BillingInvoiceExtendedStatusDraftSyncFailed BillingInvoiceExtendedStatus = "draft_sync_failed" - BillingInvoiceExtendedStatusDraftSyncing BillingInvoiceExtendedStatus = "draft_syncing" - BillingInvoiceExtendedStatusDraftValidating BillingInvoiceExtendedStatus = "draft_validating" - BillingInvoiceExtendedStatusDraftWaitingAutoApproval BillingInvoiceExtendedStatus = "draft_waiting_auto_approval" - BillingInvoiceExtendedStatusGathering BillingInvoiceExtendedStatus = "gathering" - BillingInvoiceExtendedStatusIssued BillingInvoiceExtendedStatus = "issued" - BillingInvoiceExtendedStatusIssuing BillingInvoiceExtendedStatus = "issuing" - BillingInvoiceExtendedStatusIssuingSyncFailed BillingInvoiceExtendedStatus = "issuing_sync_failed" - BillingInvoiceExtendedStatusIssuingSyncing BillingInvoiceExtendedStatus = "issuing_syncing" -) - -// Defines values for BillingInvoiceOrderBy. -const ( - BillingInvoiceOrderByCreatedAt BillingInvoiceOrderBy = "createdAt" - BillingInvoiceOrderByCustomerName BillingInvoiceOrderBy = "customer.name" - BillingInvoiceOrderByIssuedAt BillingInvoiceOrderBy = "issuedAt" - BillingInvoiceOrderByStatus BillingInvoiceOrderBy = "status" - BillingInvoiceOrderByUpdatedAt BillingInvoiceOrderBy = "updatedAt" -) - -// Defines values for BillingInvoiceStatus. -const ( - BillingInvoiceStatusDraft BillingInvoiceStatus = "draft" - BillingInvoiceStatusGathering BillingInvoiceStatus = "gathering" - BillingInvoiceStatusIssued BillingInvoiceStatus = "issued" - BillingInvoiceStatusIssuing BillingInvoiceStatus = "issuing" -) - -// Defines values for BillingInvoiceType. -const ( - BillingInvoiceTypeCreditNote BillingInvoiceType = "credit_note" - BillingInvoiceTypeStandard BillingInvoiceType = "standard" -) - -// Defines values for BillingLineStatus. -const ( - BillingLineStatusDeleted BillingLineStatus = "deleted" - BillingLineStatusSplit BillingLineStatus = "split" - BillingLineStatusValid BillingLineStatus = "valid" -) - -// Defines values for BillingPaymentTermDueDateType. -const ( - BillingPaymentTermDueDateTypeDueDate BillingPaymentTermDueDateType = "due_date" -) - -// Defines values for BillingPaymentTermInstantType. -const ( - BillingPaymentTermInstantTypeInstant BillingPaymentTermInstantType = "instant" + BillingProfileCustomerOverrideOrderById BillingProfileCustomerOverrideOrderBy = "id" ) // Defines values for BillingProfileExpand. @@ -164,49 +68,9 @@ const ( BillingProfileOrderByUpdatedAt BillingProfileOrderBy = "updatedAt" ) -// Defines values for BillingTaxBehavior. -const ( - BillingTaxBehaviorExclusive BillingTaxBehavior = "exclusive" - BillingTaxBehaviorInclusive BillingTaxBehavior = "inclusive" -) - -// Defines values for BillingUsageBasedLineType. -const ( - BillingUsageBasedLineTypeUsageBased BillingUsageBasedLineType = "usage_based" -) - -// Defines values for BillingUsageBasedLineCreateType. -const ( - BillingUsageBasedLineCreateTypeUsageBased BillingUsageBasedLineCreateType = "usage_based" -) - -// Defines values for BillingUsageBasedLineCreateItemType. +// Defines values for BillingWorkflowCollectionAlignmentSubscriptionType. const ( - BillingUsageBasedLineCreateItemTypeUsageBased BillingUsageBasedLineCreateItemType = "usage_based" -) - -// Defines values for BillingValidationIssueSeverity. -const ( - BillingValidationIssueSeverityCritical BillingValidationIssueSeverity = "critical" - BillingValidationIssueSeverityWarning BillingValidationIssueSeverity = "warning" -) - -// Defines values for BillingVoidInvoiceLineAction. -const ( - BillingVoidInvoiceLineActionDiscard BillingVoidInvoiceLineAction = "discard" - BillingVoidInvoiceLineActionPending BillingVoidInvoiceLineAction = "pending" - BillingVoidInvoiceLineActionPendingNextCycle BillingVoidInvoiceLineAction = "pending_next_cycle" -) - -// Defines values for BillingWorkflowCollectionAlignment. -const ( - BillingWorkflowCollectionAlignmentSubscription BillingWorkflowCollectionAlignment = "subscription" -) - -// Defines values for BillingWorkflowCollectionMethod. -const ( - BillingWorkflowCollectionMethodChargeAutomatically BillingWorkflowCollectionMethod = "charge_automatically" - BillingWorkflowCollectionMethodSendInvoice BillingWorkflowCollectionMethod = "send_invoice" + BillingWorkflowCollectionAlignmentSubscriptionTypeSubscription BillingWorkflowCollectionAlignmentSubscriptionType = "subscription" ) // Defines values for CheckoutSessionUIMode. @@ -215,6 +79,12 @@ const ( CheckoutSessionUIModeHosted CheckoutSessionUIMode = "hosted" ) +// Defines values for CollectionMethod. +const ( + CollectionMethodChargeAutomatically CollectionMethod = "charge_automatically" + CollectionMethodSendInvoice CollectionMethod = "send_invoice" +) + // Defines values for CustomerOrderBy. const ( CustomerOrderByCreatedAt CustomerOrderBy = "createdAt" @@ -291,6 +161,94 @@ const ( GrantOrderByUpdatedAt GrantOrderBy = "updatedAt" ) +// Defines values for InvoiceAction. +const ( + InvoiceActionAdvance InvoiceAction = "advance" + InvoiceActionApprove InvoiceAction = "approve" + InvoiceActionDelete InvoiceAction = "delete" + InvoiceActionRetry InvoiceAction = "retry" + InvoiceActionVoid InvoiceAction = "void" +) + +// Defines values for InvoiceDocumentRefType. +const ( + InvoiceDocumentRefTypeCreditNodeOriginalInvoice InvoiceDocumentRefType = "credit_node_original_invoice" +) + +// Defines values for InvoiceExpand. +const ( + InvoiceExpandAll InvoiceExpand = "*" + InvoiceExpandLines InvoiceExpand = "lines" + InvoiceExpandPreceding InvoiceExpand = "preceding" + InvoiceExpandWorkflowApps InvoiceExpand = "workflow.apps" +) + +// Defines values for InvoiceFlatFeeLineType. +const ( + InvoiceFlatFeeLineTypeFlatFee InvoiceFlatFeeLineType = "flat_fee" +) + +// Defines values for InvoiceFlatFeeLineCreateType. +const ( + InvoiceFlatFeeLineCreateTypeFlatFee InvoiceFlatFeeLineCreateType = "flat_fee" +) + +// Defines values for InvoiceFlatFeeLineReplaceUpdateType. +const ( + InvoiceFlatFeeLineReplaceUpdateTypeFlatFee InvoiceFlatFeeLineReplaceUpdateType = "flat_fee" +) + +// Defines values for InvoiceLineStatus. +const ( + InvoiceLineStatusDetail InvoiceLineStatus = "detail" + InvoiceLineStatusSplit InvoiceLineStatus = "split" + InvoiceLineStatusValid InvoiceLineStatus = "valid" +) + +// Defines values for InvoiceLineTaxBehavior. +const ( + InvoiceLineTaxBehaviorExclusive InvoiceLineTaxBehavior = "exclusive" + InvoiceLineTaxBehaviorInclusive InvoiceLineTaxBehavior = "inclusive" +) + +// Defines values for InvoiceOrderBy. +const ( + InvoiceOrderByCreatedAt InvoiceOrderBy = "createdAt" + InvoiceOrderByCustomerName InvoiceOrderBy = "customer.name" + InvoiceOrderByIssuedAt InvoiceOrderBy = "issuedAt" + InvoiceOrderByStatus InvoiceOrderBy = "status" + InvoiceOrderByUpdatedAt InvoiceOrderBy = "updatedAt" +) + +// Defines values for InvoiceStatus. +const ( + InvoiceStatusDraft InvoiceStatus = "draft" + InvoiceStatusGathering InvoiceStatus = "gathering" + InvoiceStatusIssued InvoiceStatus = "issued" + InvoiceStatusIssuing InvoiceStatus = "issuing" +) + +// Defines values for InvoiceType. +const ( + InvoiceTypeCreditNote InvoiceType = "credit_note" + InvoiceTypeStandard InvoiceType = "standard" +) + +// Defines values for InvoiceUsageBasedLineType. +const ( + InvoiceUsageBasedLineTypeUsageBased InvoiceUsageBasedLineType = "usage_based" +) + +// Defines values for InvoiceUsageBasedLineCreateType. +const ( + InvoiceUsageBasedLineCreateTypeUsageBased InvoiceUsageBasedLineCreateType = "usage_based" +) + +// Defines values for InvoiceUsageBasedLineReplaceUpdateType. +const ( + InvoiceUsageBasedLineReplaceUpdateTypeUsageBased InvoiceUsageBasedLineReplaceUpdateType = "usage_based" +) + // Defines values for MeasureUsageFromPreset. const ( MeasureUsageFromPresetCurrentPeriodStart MeasureUsageFromPreset = "CURRENT_PERIOD_START" @@ -379,6 +337,16 @@ const ( OAuth2AuthorizationCodeGrantErrorTypeUnsupportedResponseType OAuth2AuthorizationCodeGrantErrorType = "unsupported_response_type" ) +// Defines values for PaymentTermDueDateType. +const ( + PaymentTermDueDateTypeDueDate PaymentTermDueDateType = "due_date" +) + +// Defines values for PaymentTermInstantType. +const ( + PaymentTermInstantTypeInstant PaymentTermInstantType = "instant" +) + // Defines values for PhasesOrderBy. const ( PhasesOrderByKey PhasesOrderBy = "key" @@ -555,6 +523,27 @@ const ( UnitPriceWithCommitmentsTypeUnit UnitPriceWithCommitmentsType = "unit" ) +// Defines values for ValidationIssueSeverity. +const ( + ValidationIssueSeverityCritical ValidationIssueSeverity = "critical" + ValidationIssueSeverityWarning ValidationIssueSeverity = "warning" +) + +// Defines values for VoidInvoiceLineDiscardActionType. +const ( + VoidInvoiceLineDiscardActionTypeDiscard VoidInvoiceLineDiscardActionType = "discard" +) + +// Defines values for VoidInvoiceLinePendingActionCreateType. +const ( + VoidInvoiceLinePendingActionCreateTypePending VoidInvoiceLinePendingActionCreateType = "pending" +) + +// Defines values for VoidInvoiceLinePendingActionCreateItemType. +const ( + VoidInvoiceLinePendingActionCreateItemTypePending VoidInvoiceLinePendingActionCreateItemType = "pending" +) + // Defines values for GetSubscriptionParamsExpand. const ( GetSubscriptionParamsExpandFalse GetSubscriptionParamsExpand = false @@ -682,18 +671,13 @@ type BalanceHistoryWindow struct { Usage float64 `json:"usage"` } -// BillingCreditNoteOriginalInvoiceRef Omitted fields: -// period: Tax period in which the referred document had an effect required by some tax regimes and formats. -// stamps: Seals of approval from other organisations that may need to be listed. -// ext: Extensions for additional codes that may be required. -type BillingCreditNoteOriginalInvoiceRef = BillingGenericDocumentRef +// BillingLineCharge InvoiceLineCharge represents an amount added to the line, and will be applied before taxes. +type BillingLineCharge struct { + // Amount Fixed discount amount to apply (calculated if percent present). + Amount Numeric `json:"amount"` -// BillingCustomerOverride Customer specific workflow overrides. -type BillingCustomerOverride struct { - // BillingProfile The billing profile this override is associated with. - // - // If not provided, the default billing profile is chosen if available. - BillingProfile *string `json:"billingProfile,omitempty"` + // Code Reason code. + Code *string `json:"code,omitempty"` // CreatedAt Timestamp of when the resource was created. CreatedAt time.Time `json:"createdAt"` @@ -701,907 +685,476 @@ type BillingCustomerOverride struct { // DeletedAt Timestamp of when the resource was permanently deleted. DeletedAt *time.Time `json:"deletedAt,omitempty"` - // UpdatedAt Timestamp of when the resource was last updated. - UpdatedAt time.Time `json:"updatedAt"` - - // Workflow Customer specific workflow overrides. - Workflow BillingCustomerWorkflowOverride `json:"workflow"` -} - -// BillingCustomerOverrideOrderBy Order by options for customers. -type BillingCustomerOverrideOrderBy string - -// BillingCustomerWorkflowOverride Customer specific workflow overrides. -type BillingCustomerWorkflowOverride struct { - Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"` - - // CreatedAt Timestamp of when the resource was created. - CreatedAt time.Time `json:"createdAt"` + // Description Text description as to why the discount was applied. + Description *string `json:"description,omitempty"` - // DeletedAt Timestamp of when the resource was permanently deleted. - DeletedAt *time.Time `json:"deletedAt,omitempty"` + // Id ID of the charge or discount. + Id string `json:"id"` - // Id A unique identifier for the resource. - Id string `json:"id"` - Invoicing *BillingWorkflowInvoicingSettings `json:"invoicing,omitempty"` - InvoicingApp App `json:"invoicingApp"` - Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"` - PaymentApp App `json:"paymentApp"` - TaxApp App `json:"taxApp"` + // Percent Percentage if fixed amount not applied + Percent *Percentage `json:"percent,omitempty"` // UpdatedAt Timestamp of when the resource was last updated. UpdatedAt time.Time `json:"updatedAt"` } -// BillingDocumentRef CreditNoteOriginalInvoiceRef is used to reference the original invoice that a credit note is based on. -type BillingDocumentRef = BillingCreditNoteOriginalInvoiceRef +// BillingParty Party represents a person or business entity. +type BillingParty struct { + // Addresses Regular post addresses for where information should be sent if needed. + Addresses *[]Address `json:"addresses,omitempty"` -// BillingDocumentRefType DocumentRefType defines the type of document that is being referenced. -type BillingDocumentRefType string + // Id Unique identifier for the party (if available) + Id *string `json:"id,omitempty"` -// BillingDueDate DueDate contains an amount that should be paid by the given date. -type BillingDueDate struct { - Amount Numeric `json:"amount"` - Currency *CurrencyCode `json:"currency,omitempty"` + // Name Legal name or representation of the organization. + Name *string `json:"name,omitempty"` - // DueAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - DueAt time.Time `json:"dueAt"` - Notes *string `json:"notes,omitempty"` - Percent *Percentage `json:"percent,omitempty"` + // TaxId The entity's legal ID code used for tax purposes. They may have + // other numbers, but we're only interested in those valid for tax purposes. + TaxId *BillingPartyTaxIdentity `json:"taxId,omitempty"` +} + +// BillingPartyTaxIdentity Identity stores the details required to identify an entity for tax purposes in a specific country. +type BillingPartyTaxIdentity struct { + // Code Normalized tax code shown on the original identity document. + Code *BillingTaxIdentificationCode `json:"code,omitempty"` } -// BillingFlatFeeLine BillingFlatFeeLine represents a line item that is sold to the customer as a manually added fee. -type BillingFlatFeeLine struct { - Charges *[]BillingLineCharge `json:"charges,omitempty"` - Children *[]BillingInvoiceLine `json:"children"` +// BillingProfile BillingProfile represents a billing profile +type BillingProfile struct { + // Apps The applications used by this billing profile. + // + // Expand settings govern if this includes the whole app object or just the ID references. + Apps BillingProfileAppsOrReference `json:"apps"` // CreatedAt Timestamp of when the resource was created. - CreatedAt time.Time `json:"createdAt"` - Currency CurrencyCode `json:"currency"` + CreatedAt time.Time `json:"createdAt"` + + // Default Is this the default profile? + Default bool `json:"default"` // DeletedAt Timestamp of when the resource was permanently deleted. DeletedAt *time.Time `json:"deletedAt,omitempty"` // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` - Discounts *[]BillingLineDiscount `json:"discounts,omitempty"` - - // Id ULID (Universally Unique Lexicographically Sortable Identifier). - Id string `json:"id"` - Invoice *BillingInvoiceReference `json:"invoice,omitempty"` + Description *string `json:"description,omitempty"` - // InvoiceAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - InvoiceAt time.Time `json:"invoiceAt"` + // Id A unique identifier for the resource. + Id string `json:"id"` // Metadata Additional metadata for the resource. Metadata *Metadata `json:"metadata"` // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` - PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"` - PerUnitAmount Numeric `json:"perUnitAmount"` - Period BillingPeriod `json:"period"` - Quantity Numeric `json:"quantity"` - Status BillingLineStatus `json:"status"` - TaxConfig *TaxConfig `json:"taxConfig"` - Taxes *[]BillingTaxItem `json:"taxes,omitempty"` - Totals BillingInvoiceTotals `json:"totals"` - Type BillingFlatFeeLineType `json:"type"` + Name string `json:"name"` + + // Supplier The name and contact information for the supplier this billing profile represents + Supplier BillingParty `json:"supplier"` // UpdatedAt Timestamp of when the resource was last updated. UpdatedAt time.Time `json:"updatedAt"` + + // Workflow The billing workflow settings for this profile + Workflow BillingWorkflow `json:"workflow"` } -// BillingFlatFeeLineType defines model for BillingFlatFeeLine.Type. -type BillingFlatFeeLineType string +// BillingProfileAppReferences BillingProfileAppReferences represents the references (id, type) to the apps used by a billing profile +type BillingProfileAppReferences struct { + // Invoicing The invoicing app used for this workflow + Invoicing AppReference `json:"invoicing"` -// BillingFlatFeeLineCreate BillingFlatFeeLine represents a line item that is sold to the customer as a manually added fee. -type BillingFlatFeeLineCreate struct { - Currency CurrencyCode `json:"currency"` + // Payment The payment app used for this workflow + Payment AppReference `json:"payment"` - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` - Invoice *BillingInvoiceReference `json:"invoice,omitempty"` + // Tax The tax app used for this workflow + Tax AppReference `json:"tax"` +} - // InvoiceAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - InvoiceAt time.Time `json:"invoiceAt"` +// BillingProfileApps BillingProfileApps represents the applications used by a billing profile +type BillingProfileApps struct { + Invoicing App `json:"invoicing"` + Payment App `json:"payment"` + Tax App `json:"tax"` +} - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` +// BillingProfileAppsCreate BillingProfileAppsCreate represents the input for creating a billing profile's apps +type BillingProfileAppsCreate struct { + // Invoicing The invoicing app used for this workflow + Invoicing string `json:"invoicing"` - // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` - PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"` - PerUnitAmount Numeric `json:"perUnitAmount"` - Period BillingPeriod `json:"period"` - Quantity Numeric `json:"quantity"` - TaxConfig *TaxConfig `json:"taxConfig"` - Type BillingFlatFeeLineCreateType `json:"type"` + // Payment The payment app used for this workflow + Payment string `json:"payment"` + + // Tax The tax app used for this workflow + Tax string `json:"tax"` +} + +// BillingProfileAppsOrReference ProfileAppsOrReference represents the union of ProfileApps and ProfileAppReferences +// for a billing profile. +type BillingProfileAppsOrReference struct { + union json.RawMessage } -// BillingFlatFeeLineCreateType defines model for BillingFlatFeeLineCreate.Type. -type BillingFlatFeeLineCreateType string +// BillingProfileCreate BillingProfileCreate represents the input for creating a billing profile +type BillingProfileCreate struct { + // Apps The apps used by this billing profile. + Apps BillingProfileAppsCreate `json:"apps"` -// BillingFlatFeeLineCreateItem BillingFlatFeeLine represents a line item that is sold to the customer as a manually added fee. -type BillingFlatFeeLineCreateItem struct { - Currency CurrencyCode `json:"currency"` + // Default Is this the default profile? + Default bool `json:"default"` // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` - Invoice *BillingInvoiceReference `json:"invoice,omitempty"` - - // InvoiceAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - InvoiceAt time.Time `json:"invoiceAt"` + Description *string `json:"description,omitempty"` // Metadata Additional metadata for the resource. Metadata *Metadata `json:"metadata"` // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` - PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"` - PerUnitAmount Numeric `json:"perUnitAmount"` - Period BillingPeriod `json:"period"` - Quantity Numeric `json:"quantity"` - TaxConfig *TaxConfig `json:"taxConfig"` - Type BillingFlatFeeLineCreateItemType `json:"type"` -} + Name string `json:"name"` -// BillingFlatFeeLineCreateItemType defines model for BillingFlatFeeLineCreateItem.Type. -type BillingFlatFeeLineCreateItemType string + // Supplier The name and contact information for the supplier this billing profile represents + Supplier BillingParty `json:"supplier"` -// BillingGenericDocumentRef Omitted fields: -// period: Tax period in which the referred document had an effect required by some tax regimes and formats. -// stamps: Seals of approval from other organisations that may need to be listed. -// ext: Extensions for additional codes that may be required. -type BillingGenericDocumentRef struct { - Description *string `json:"description,omitempty"` - Reason *string `json:"reason,omitempty"` - Type BillingDocumentRefType `json:"type"` + // Workflow The billing workflow settings for this profile. + Workflow BillingWorkflowCreate `json:"workflow"` } -// BillingInvoice Invoice represents an invoice in the system. -type BillingInvoice struct { +// BillingProfileCustomerOverride Customer specific workflow overrides. +type BillingProfileCustomerOverride struct { + // BillingProfile The billing profile this override is associated with. + // + // If not provided, the default billing profile is chosen if available. + BillingProfile *string `json:"billingProfile,omitempty"` + // CreatedAt Timestamp of when the resource was created. - CreatedAt time.Time `json:"createdAt"` - Currency CurrencyCode `json:"currency"` - Customer BillingParty `json:"customer"` + CreatedAt time.Time `json:"createdAt"` // DeletedAt Timestamp of when the resource was permanently deleted. DeletedAt *time.Time `json:"deletedAt,omitempty"` - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` - Discounts *[]BillingInvoiceDiscount `json:"discounts,omitempty"` + // UpdatedAt Timestamp of when the resource was last updated. + UpdatedAt time.Time `json:"updatedAt"` - // DraftUntil The time until the invoice is in draft status. - // - // On draft invoice creation it is calculated from the workflow settings. + // Workflow Customer specific workflow overrides. + Workflow *BillingProfileCustomerWorkflowOverride `json:"workflow,omitempty"` +} + +// BillingProfileCustomerOverrideCreate Payload for creating a new or updating an existing customer override. +type BillingProfileCustomerOverrideCreate struct { + // BillingProfile The billing profile this override is associated with. // - // If manual approval is required, the draftUntil time is set. - DraftUntil *time.Time `json:"draftUntil,omitempty"` + // If not provided, the default billing profile is chosen if available. + BillingProfile *string `json:"billingProfile,omitempty"` - // DueAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - DueAt *time.Time `json:"dueAt,omitempty"` + // Workflow Resource create operation model. + Workflow *BillingProfileCustomerWorkflowOverrideCreate `json:"workflow,omitempty"` +} - // Id A unique identifier for the resource. - Id string `json:"id"` +// BillingProfileCustomerOverrideOrderBy Order by options for customers. +type BillingProfileCustomerOverrideOrderBy string - // IssuedAt The time the invoice was issued. - // - // Depending on the status of the invoice this can mean multiple things: - // - draft, gathering: The time the invoice will be issued based on the workflow settings. - // - issued: The time the invoice was issued. - IssuedAt *time.Time `json:"issuedAt,omitempty"` - Lines *[]BillingInvoiceLine `json:"lines,omitempty"` +// BillingProfileCustomerOverridePaginatedResponse Paginated response +type BillingProfileCustomerOverridePaginatedResponse struct { + // Items The items in the current page. + Items []BillingProfileCustomerOverride `json:"items"` - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` + // Page The items in the current page. + Page int `json:"page"` - // Number Number specifies the human readable key used to reference this Invoice. - // - // The number only gets populated after the invoice had been issued. - // - // Please note that the number is (depending on the upstream settings) either unique for the - // whole organization or unique for the customer, or in multi (stripe) account setups unique for the - // account. - Number *BillingInvoiceNumber `json:"number,omitempty"` - Payment *BillingInvoicePayment `json:"payment,omitempty"` - Period *BillingPeriod `json:"period,omitempty"` - Preceding *[]BillingDocumentRef `json:"preceding,omitempty"` - Status BillingInvoiceStatus `json:"status"` - StatusDetails BillingInvoiceStatusDetails `json:"statusDetails"` - Supplier BillingParty `json:"supplier"` - Totals BillingInvoiceTotals `json:"totals"` - Type BillingInvoiceType `json:"type"` + // PageSize The items in the current page. + PageSize int `json:"pageSize"` - // UpdatedAt Timestamp of when the resource was last updated. - // - // For updates the updatedAt field is used to detect conflicts. - UpdatedAt time.Time `json:"updatedAt"` - ValidationIssues *[]BillingValidationIssue `json:"validationIssues,omitempty"` + // TotalCount The items in the current page. + TotalCount int `json:"totalCount"` +} - // VoidedAt The time the invoice was voided. - // - // If the invoice was voided, this field will be set to the time the invoice was voided. - VoidedAt *time.Time `json:"voidedAt,omitempty"` +// BillingProfileCustomerWorkflowOverride Customer specific workflow overrides. +type BillingProfileCustomerWorkflowOverride struct { + // Collection The collection settings for this workflow + Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"` - // Workflow The workflow associated with the invoice. - // - // It is always a snapshot of the workflow settings at the time of invoice creation. The - // field is optional as it should be explicitly requested with expand options. - Workflow *BillingInvoiceWorkflowSettings `json:"workflow,omitempty"` -} + // CreatedAt Timestamp of when the resource was created. + CreatedAt time.Time `json:"createdAt"` -// BillingInvoiceAction BillingInvoiceAction represents the actions that can be performed on an invoice. -type BillingInvoiceAction string + // DeletedAt Timestamp of when the resource was permanently deleted. + DeletedAt *time.Time `json:"deletedAt,omitempty"` -// BillingInvoiceCreate BillingInvoiceCreate is the input for creating an invoice. -// -// Invoice creation is always based on already pending line items created by the billingCreateLineByCustomer -// operation. Empty invoices are not allowed. -type BillingInvoiceCreate struct { - // AsOf The time as of which the invoice is created. - // - // If not provided, the current time is used. - AsOf *time.Time `json:"asOf,omitempty"` + // Id A unique identifier for the resource. + Id string `json:"id"` - // IncludePendingLines The pending line items to include in the invoice, if not provided: - // - all line items that have invoice_at < asOf will be included - // - all usage based line items will be included up to asOf, new usage-based line items will be staged for the rest - // of the billing cycle - IncludePendingLines *[]string `json:"includePendingLines,omitempty"` -} + // Invoicing The invoicing settings for this workflow + Invoicing *BillingWorkflowInvoicingSettings `json:"invoicing,omitempty"` + InvoicingApp App `json:"invoicingApp"` -// BillingInvoiceDiscount Discount represents an allowance applied to the complete document independent from the individual lines. -type BillingInvoiceDiscount struct { - Amount Numeric `json:"amount"` - Base *Numeric `json:"base,omitempty"` - Percent *Percentage `json:"percent,omitempty"` - Reason *string `json:"reason,omitempty"` + // Payment The payment settings for this workflow + Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"` + PaymentApp App `json:"paymentApp"` + TaxApp App `json:"taxApp"` + + // UpdatedAt Timestamp of when the resource was last updated. + UpdatedAt time.Time `json:"updatedAt"` } -// BillingInvoiceExpand InvoiceExpand specifies the parts of the invoice to expand in the list output. -type BillingInvoiceExpand string +// BillingProfileCustomerWorkflowOverrideCreate Resource create operation model. +type BillingProfileCustomerWorkflowOverrideCreate struct { + // Collection The collection settings for this workflow + Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"` -// BillingInvoiceExtendedStatus InvoiceExtendedStatus describes the extended status of an invoice. -// -// This is used to provide more detailed information about the status of the invoice. Useful for -// troubelshooting invoice workflow issues. -type BillingInvoiceExtendedStatus string + // Invoicing The invoicing settings for this workflow + Invoicing *BillingWorkflowInvoicingSettings `json:"invoicing,omitempty"` -// BillingInvoiceLine BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price. -type BillingInvoiceLine struct { - union json.RawMessage + // Payment The payment settings for this workflow + Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"` } -// BillingInvoiceLineCreate BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price. -type BillingInvoiceLineCreate struct { - union json.RawMessage -} +// BillingProfileExpand BillingProfileExpand details what profile fields to expand +type BillingProfileExpand string -// BillingInvoiceLineCreateItem BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price. -type BillingInvoiceLineCreateItem struct { - union json.RawMessage -} +// BillingProfileOrderBy BillingProfileOrderBy specifies the ordering options for profiles +type BillingProfileOrderBy string -// BillingInvoiceLines CreateLinesRequest is the request for creating manual line items. -type BillingInvoiceLines struct { - Lines []BillingInvoiceLine `json:"lines"` -} +// BillingProfilePaginatedResponse Paginated response +type BillingProfilePaginatedResponse struct { + // Items The items in the current page. + Items []BillingProfile `json:"items"` -// BillingInvoiceNumber InvoiceNumber is a unique identifier for the invoice, generated by the -// invoicing app. -// -// The uniqueness depends on a lot of factors: -// - app setting (unique per app or unique per customer) -// - multiple app scenarios (multiple apps generating invoices with the same prefix) -type BillingInvoiceNumber = string + // Page The items in the current page. + Page int `json:"page"` -// BillingInvoiceOrderBy InvoiceOrderBy specifies the ordering options for invoice listing. -type BillingInvoiceOrderBy string + // PageSize The items in the current page. + PageSize int `json:"pageSize"` -// BillingInvoicePayment Payment contains details as to how the invoice should be paid. -type BillingInvoicePayment struct { - // Terms PaymentTerms defines the terms for payment. - Terms *BillingPaymentTerms `json:"terms,omitempty"` + // TotalCount The items in the current page. + TotalCount int `json:"totalCount"` } -// BillingInvoiceReference Reference to an invoice. -type BillingInvoiceReference struct { - // Id ULID (Universally Unique Lexicographically Sortable Identifier). - Id string `json:"id"` - Number *BillingInvoiceNumber `json:"number,omitempty"` -} +// BillingProfileReplaceUpdateWithWorkflow BillingProfileReplaceUpdate represents the input for updating a billing profile +// +// The apps field cannot be updated directly, if an app change is desired a new +// profile should be created. +type BillingProfileReplaceUpdateWithWorkflow struct { + // Default Is this the default profile? + Default bool `json:"default"` -// BillingInvoiceStatus InvoiceStatus describes the status of an invoice. -type BillingInvoiceStatus string + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` -// BillingInvoiceStatusDetails InvoiceStatusDetails represents the details of the invoice status. -// -// API users are encouraged to rely on the immutable/failed/avaliableActions fields to determine -// the next steps of the invoice instead of the extendedStatus field. -type BillingInvoiceStatusDetails struct { - AvailableActions []BillingInvoiceAction `json:"availableActions"` - ExtendedStatus BillingInvoiceExtendedStatus `json:"extendedStatus"` - Failed bool `json:"failed"` - Immutable bool `json:"immutable"` -} - -// BillingInvoiceTotals Totals contains the summaries of all calculations for the invoice. -type BillingInvoiceTotals struct { - Amount Numeric `json:"amount"` - ChargesTotal Numeric `json:"chargesTotal"` - DiscountsTotal Numeric `json:"discountsTotal"` - TaxesExclusiveTotal Numeric `json:"taxesExclusiveTotal"` - TaxesInclusiveTotal Numeric `json:"taxesInclusiveTotal"` - TaxesTotal Numeric `json:"taxesTotal"` - Total Numeric `json:"total"` -} + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` -// BillingInvoiceType InvoiceType represents the type of invoice. -// -// The type of invoice determines the purpose of the invoice and how it should be handled. -type BillingInvoiceType string + // Name Human-readable name for the resource. Between 1 and 256 characters. + Name string `json:"name"` -// BillingInvoiceWorkflowSettings InvoiceWorkflowSettings represents the workflow settings used by the invoice. -// -// This is a clone of the billing profile's workflow settings at the time of invoice creation -// with customer overrides considered. -type BillingInvoiceWorkflowSettings struct { - Apps *BillingProfileAppsOrReference `json:"apps,omitempty"` + // Supplier The name and contact information for the supplier this billing profile represents + Supplier BillingParty `json:"supplier"` - // SourceBillingProfileID sourceBillingProfileID is the billing profile on which the workflow was based on. - // - // The profile is snapshotted on invoice creation, after which it can be altered independently - // of the profile itself. - SourceBillingProfileID string `json:"sourceBillingProfileID"` - Timezone string `json:"timezone"` - Workflow BillingWorkflowSettings `json:"workflow"` + // Workflow The billing workflow settings for this profile. + Workflow BillingWorkflow `json:"workflow"` } -// BillingLineCharge LineCharge represents an amount added to the line, and will be applied before taxes. -type BillingLineCharge struct { - // Amount Fixed discount amount to apply (calculated if percent present). - Amount Numeric `json:"amount"` - Code *string `json:"code,omitempty"` +// BillingTaxIdentificationCode TaxIdentificationCode is a normalized tax code shown on the original identity document. +type BillingTaxIdentificationCode = string + +// BillingWorkflow BillingWorkflow represents a billing workflow +type BillingWorkflow struct { + // Collection The collection settings for this workflow + Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"` // CreatedAt Timestamp of when the resource was created. CreatedAt time.Time `json:"createdAt"` // DeletedAt Timestamp of when the resource was permanently deleted. - DeletedAt *time.Time `json:"deletedAt,omitempty"` - Description *string `json:"description,omitempty"` + DeletedAt *time.Time `json:"deletedAt,omitempty"` - // Id ULID (Universally Unique Lexicographically Sortable Identifier). + // Id A unique identifier for the resource. Id string `json:"id"` - // Percent Percentage if fixed amount not applied - Percent *Percentage `json:"percent,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"` // UpdatedAt Timestamp of when the resource was last updated. UpdatedAt time.Time `json:"updatedAt"` } -// BillingLineDiscount LineDiscount represents an amount deducted from the line, and will be applied before taxes. -type BillingLineDiscount struct { - // Amount Fixed discount amount to apply (calculated if percent present). - Amount Numeric `json:"amount"` - Code *string `json:"code,omitempty"` - - // CreatedAt Timestamp of when the resource was created. - CreatedAt time.Time `json:"createdAt"` +// BillingWorkflowCollectionAlignment BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items +// into an invoice. +type BillingWorkflowCollectionAlignment = BillingWorkflowCollectionAlignmentSubscription - // DeletedAt Timestamp of when the resource was permanently deleted. - DeletedAt *time.Time `json:"deletedAt,omitempty"` - Description *string `json:"description,omitempty"` +// BillingWorkflowCollectionAlignmentSubscription BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items +// into an invoice. +type BillingWorkflowCollectionAlignmentSubscription struct { + Type BillingWorkflowCollectionAlignmentSubscriptionType `json:"type"` +} - // Id ULID (Universally Unique Lexicographically Sortable Identifier). - Id string `json:"id"` +// BillingWorkflowCollectionAlignmentSubscriptionType defines model for BillingWorkflowCollectionAlignmentSubscription.Type. +type BillingWorkflowCollectionAlignmentSubscriptionType string - // Percent Percentage if fixed amount not applied - Percent *Percentage `json:"percent,omitempty"` +// BillingWorkflowCollectionSettings Workflow collection specifies how to collect the pending line items for an invoice +type BillingWorkflowCollectionSettings struct { + Alignment *BillingWorkflowCollectionAlignment `json:"alignment,omitempty"` - // UpdatedAt Timestamp of when the resource was last updated. - UpdatedAt time.Time `json:"updatedAt"` + // 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"` } -// BillingLineStatus Line status specifies the status of the line. -type BillingLineStatus string +// BillingWorkflowCreate Resource create operation model. +type BillingWorkflowCreate struct { + // Collection The collection settings for this workflow + Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"` -// BillingParty Party represents a person or business entity. -type BillingParty struct { - Addresses *[]Address `json:"addresses,omitempty"` + // Invoicing The invoicing settings for this workflow + Invoicing *BillingWorkflowInvoicingSettings `json:"invoicing,omitempty"` - // Id ULID (Universally Unique Lexicographically Sortable Identifier). - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - TaxId *BillingTaxIdentity `json:"taxId,omitempty"` + // Payment The payment settings for this workflow + Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"` } -// BillingPartyCreate Party represents a person or business entity. -type BillingPartyCreate struct { - Addresses *[]Address `json:"addresses,omitempty"` - Name *string `json:"name,omitempty"` - TaxId *BillingTaxIdentity `json:"taxId,omitempty"` +// BillingWorkflowInvoicingSettings BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow +type BillingWorkflowInvoicingSettings struct { + // AutoAdvance Whether to automatically issue the invoice after the draftPeriod has passed. + AutoAdvance *bool `json:"autoAdvance,omitempty"` + + // DraftPeriod The period for the invoice to be kept in draft status for manual reviews. + DraftPeriod *string `json:"draftPeriod,omitempty"` + + // DueAfter The period after which the invoice is due. + DueAfter *string `json:"dueAfter,omitempty"` } -// BillingPaymentTermDueDate PaymentTermDueDate defines the terms for payment on a specific date. -type BillingPaymentTermDueDate struct { - Detail *string `json:"detail,omitempty"` - DueAt []BillingDueDate `json:"dueAt"` - Notes *string `json:"notes,omitempty"` - Type BillingPaymentTermDueDateType `json:"type"` +// BillingWorkflowPaymentSettings BillingWorkflowPaymentSettings represents the payment settings for a billing workflow +type BillingWorkflowPaymentSettings struct { + // CollectionMethod The payment method for the invoice. + CollectionMethod *CollectionMethod `json:"collectionMethod,omitempty"` } -// BillingPaymentTermDueDateType defines model for BillingPaymentTermDueDate.Type. -type BillingPaymentTermDueDateType string +// BillingWorkflowSettings BillingWorkflowSettings represents the settings for a billing workflow. +type BillingWorkflowSettings struct { + // Collection The collection settings for this workflow + Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"` -// BillingPaymentTermInstant PaymentTermInstant defines the terms for payment on receipt of invoice. -type BillingPaymentTermInstant struct { - Detail *string `json:"detail,omitempty"` - Notes *string `json:"notes,omitempty"` - Type BillingPaymentTermInstantType `json:"type"` -} + // Invoicing The invoicing settings for this workflow + Invoicing *BillingWorkflowInvoicingSettings `json:"invoicing,omitempty"` -// BillingPaymentTermInstantType defines model for BillingPaymentTermInstant.Type. -type BillingPaymentTermInstantType string + // Payment The payment settings for this workflow + Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"` +} -// BillingPaymentTerms PaymentTerms defines the terms for payment. -type BillingPaymentTerms struct { - union json.RawMessage +// CheckoutSessionCustomTextAfterSubmitParams Stripe CheckoutSession.custom_text +type CheckoutSessionCustomTextAfterSubmitParams struct { + AfterSubmit *struct { + Message *string `json:"message,omitempty"` + } `json:"afterSubmit,omitempty"` + ShippingAddress *struct { + Message *string `json:"message,omitempty"` + } `json:"shippingAddress,omitempty"` + Submit *struct { + Message *string `json:"message,omitempty"` + } `json:"submit,omitempty"` + TermsOfServiceAcceptance *struct { + Message *string `json:"message,omitempty"` + } `json:"termsOfServiceAcceptance,omitempty"` } -// BillingPeriod Period represents a time range. -// -// Billing always treats periods as start being inclusive and end being exclusive. -type BillingPeriod struct { - // End [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - End time.Time `json:"end"` +// CheckoutSessionUIMode Stripe CheckoutSession.ui_mode +type CheckoutSessionUIMode string - // Start [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - Start time.Time `json:"start"` +// ClientAppStartResponse Response from the client app (OpenMeter backend) to start the OAuth2 flow. +type ClientAppStartResponse struct { + // Url The URL to start the OAuth2 authorization code grant flow. + Url string `json:"url"` } -// BillingProfile Profile represents a billing profile -type BillingProfile struct { - Apps BillingProfileAppsOrReference `json:"apps"` - - // CreatedAt Timestamp of when the resource was created. - CreatedAt time.Time `json:"createdAt"` - Default bool `json:"default"` +// CollectionMethod CollectionMethod specifies how the invoice should be collected (automatic vs manual) +type CollectionMethod string - // DeletedAt Timestamp of when the resource was permanently deleted. - DeletedAt *time.Time `json:"deletedAt,omitempty"` +// ConflictProblemResponse A Problem Details object (RFC 7807). +// Additional properties specific to the problem type may be present. +type ConflictProblemResponse = UnexpectedProblemResponse - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` +// 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 CountryCode = string - // Id A unique identifier for the resource. - Id string `json:"id"` +// CreateCustomSubscriptionRequestBody Create a custom subscription. +type CreateCustomSubscriptionRequestBody struct { + // ActiveFrom [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. + ActiveFrom time.Time `json:"activeFrom"` - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` + // Currency Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. + // Custom three-letter currency codes are also supported for convenience. + Currency CurrencyCode `json:"currency"` - // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` - Supplier BillingParty `json:"supplier"` + // CustomPlan Resource create operation model. + CustomPlan PlanCreate `json:"customPlan"` - // UpdatedAt When the resource was last updated. - // - // For updates this field must be set to the last update time to detect conflicts. - UpdatedAt time.Time `json:"updatedAt"` - Workflow BillingWorkflow `json:"workflow"` + // CustomerId ULID (Universally Unique Lexicographically Sortable Identifier). + CustomerId string `json:"customerId"` } -// BillingProfileAppReferences ProfileAppsReference represents the references (id, type) to the apps used by a billing profile -type BillingProfileAppReferences struct { - Invoicing AppReference `json:"invoicing"` - Payment AppReference `json:"payment"` - Tax AppReference `json:"tax"` -} +// CreateStripeCheckoutSessionRequest Create Stripe checkout session request. +type CreateStripeCheckoutSessionRequest struct { + // AppId If not provided, the default Stripe app is used if any. + AppId *string `json:"appId,omitempty"` -// BillingProfileApps ProfileApps represents the applications used by a billing profile -type BillingProfileApps struct { - // Invoicing App. - // One of: stripe - Invoicing App `json:"invoicing"` + // Customer Provide a customer ID to use an existing OpenMeter customer. + // or provide a customer object to create a new customer. + Customer CreateStripeCheckoutSessionRequest_Customer `json:"customer"` - // Payment App. - // One of: stripe - Payment App `json:"payment"` + // Options Options passed to Stripe when creating the checkout session. + Options CreateStripeCheckoutSessionRequestOptions `json:"options"` - // Tax App. - // One of: stripe - Tax App `json:"tax"` + // StripeCustomerId Stripe customer ID. + // If not provided OpenMeter creates a new Stripe customer or + // uses the OpenMeter customer's default Stripe customer ID. + StripeCustomerId *string `json:"stripeCustomerId,omitempty"` } -// BillingProfileAppsOrReference ProfileAppsOrReference represents the union of ProfileApps and ProfileAppReferences -// for a billing profile. -type BillingProfileAppsOrReference struct { +// CreateStripeCheckoutSessionRequest_Customer Provide a customer ID to use an existing OpenMeter customer. +// or provide a customer object to create a new customer. +type CreateStripeCheckoutSessionRequest_Customer struct { union json.RawMessage } -// BillingProfileCreateAppsInput ProfileCreateAppsInput represents the input for creating a billing profile's apps -type BillingProfileCreateAppsInput struct { - Invoicing BillingWorkflowAppIdOrType `json:"invoicing"` - Payment BillingWorkflowAppIdOrType `json:"payment"` - Tax BillingWorkflowAppIdOrType `json:"tax"` -} - -// BillingProfileCreateInput ProfileCreateInput represents the input for creating a billing profile -type BillingProfileCreateInput struct { - // Apps ProfileCreateAppsInput represents the input for creating a billing profile's apps - Apps BillingProfileCreateAppsInput `json:"apps"` - Default bool `json:"default"` +// CreateStripeCheckoutSessionRequestOptions Create Stripe checkout session options +type CreateStripeCheckoutSessionRequestOptions struct { + CancelURL *string `json:"cancelURL,omitempty"` + ClientReferenceID *string `json:"clientReferenceID,omitempty"` - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` + // Currency Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. + // Custom three-letter currency codes are also supported for convenience. + Currency *CurrencyCode `json:"currency,omitempty"` - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` + // CustomText Stripe CheckoutSession.custom_text + CustomText *CheckoutSessionCustomTextAfterSubmitParams `json:"customText,omitempty"` + Metadata *map[string]string `json:"metadata,omitempty"` + PaymentMethodTypes *[]string `json:"paymentMethodTypes,omitempty"` + ReturnURL *string `json:"returnURL,omitempty"` + SuccessURL *string `json:"successURL,omitempty"` - // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` - Supplier BillingPartyCreate `json:"supplier"` - Workflow BillingWorkflow `json:"workflow"` + // UiMode Stripe CheckoutSession.ui_mode + UiMode *CheckoutSessionUIMode `json:"uiMode,omitempty"` } -// BillingProfileExpand ProfileExpand details what profile fields to expand -type BillingProfileExpand string +// CreateStripeCheckoutSessionResult Create Stripe Checkout Session response. +type CreateStripeCheckoutSessionResult struct { + // CancelURL Cancel URL. + CancelURL *string `json:"cancelURL,omitempty"` -// BillingProfileOrderBy ProfileOrderBy specifies the ordering options for profiles -type BillingProfileOrderBy string + // CustomerId The OpenMeter customer ID. + CustomerId string `json:"customerId"` -// BillingTaxBehavior TaxBehavior details how the tax item is applied to the base amount. -// -// Inclusive means the tax is included in the base amount. -// Exclusive means the tax is added to the base amount. -type BillingTaxBehavior string + // Mode Mode + // Always `setup` for now. + Mode StripeCheckoutSessionMode `json:"mode"` -// BillingTaxIdentificationCode defines model for BillingTaxIdentificationCode. -type BillingTaxIdentificationCode = string - -// BillingTaxIdentity Identity stores the details required to identify an entity for tax purposes in a specific country. -type BillingTaxIdentity struct { - Code *BillingTaxIdentificationCode `json:"code,omitempty"` -} - -// BillingTaxItem TaxConfig stores the configuration for a tax line relative to an invoice line. -type BillingTaxItem struct { - Behavior *BillingTaxBehavior `json:"behavior,omitempty"` - Config *TaxConfig `json:"config,omitempty"` - Percent *Percentage `json:"percent,omitempty"` - Surcharge *Numeric `json:"surcharge,omitempty"` -} - -// BillingUsageBasedLine UsageBasedLine represents a line item that is sold to the customer based on usage. -type BillingUsageBasedLine struct { - Charges *[]BillingLineCharge `json:"charges,omitempty"` - Children *[]BillingInvoiceLine `json:"children"` - - // CreatedAt Timestamp of when the resource was created. - CreatedAt time.Time `json:"createdAt"` - Currency CurrencyCode `json:"currency"` - - // DeletedAt Timestamp of when the resource was permanently deleted. - DeletedAt *time.Time `json:"deletedAt,omitempty"` - - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` - Discounts *[]BillingLineDiscount `json:"discounts,omitempty"` - - // FeatureKey A key is a unique string that is used to identify a resource. - FeatureKey string `json:"featureKey"` - - // Id ULID (Universally Unique Lexicographically Sortable Identifier). - Id string `json:"id"` - Invoice *BillingInvoiceReference `json:"invoice,omitempty"` - - // InvoiceAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - InvoiceAt time.Time `json:"invoiceAt"` - - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` - - // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` - Period BillingPeriod `json:"period"` - - // Price The price of the usage based rate card. - Price RateCardUsageBasedPrice `json:"price"` - Quantity *Numeric `json:"quantity,omitempty"` - Status BillingLineStatus `json:"status"` - TaxConfig *TaxConfig `json:"taxConfig"` - Taxes *[]BillingTaxItem `json:"taxes,omitempty"` - Totals BillingInvoiceTotals `json:"totals"` - Type BillingUsageBasedLineType `json:"type"` - - // UpdatedAt Timestamp of when the resource was last updated. - UpdatedAt time.Time `json:"updatedAt"` -} - -// BillingUsageBasedLineType defines model for BillingUsageBasedLine.Type. -type BillingUsageBasedLineType string - -// BillingUsageBasedLineCreate UsageBasedLine represents a line item that is sold to the customer based on usage. -type BillingUsageBasedLineCreate struct { - Currency CurrencyCode `json:"currency"` - - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` - - // FeatureKey A key is a unique string that is used to identify a resource. - FeatureKey string `json:"featureKey"` - Invoice *BillingInvoiceReference `json:"invoice,omitempty"` - - // InvoiceAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - InvoiceAt time.Time `json:"invoiceAt"` - - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` - - // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` - Period BillingPeriod `json:"period"` - - // Price The price of the usage based rate card. - Price RateCardUsageBasedPrice `json:"price"` - TaxConfig *TaxConfig `json:"taxConfig"` - Type BillingUsageBasedLineCreateType `json:"type"` -} - -// BillingUsageBasedLineCreateType defines model for BillingUsageBasedLineCreate.Type. -type BillingUsageBasedLineCreateType string - -// BillingUsageBasedLineCreateItem UsageBasedLine represents a line item that is sold to the customer based on usage. -type BillingUsageBasedLineCreateItem struct { - Currency CurrencyCode `json:"currency"` - - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` - - // FeatureKey A key is a unique string that is used to identify a resource. - FeatureKey string `json:"featureKey"` - Invoice *BillingInvoiceReference `json:"invoice,omitempty"` - - // InvoiceAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - InvoiceAt time.Time `json:"invoiceAt"` - - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` - - // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` - Period BillingPeriod `json:"period"` - - // Price The price of the usage based rate card. - Price RateCardUsageBasedPrice `json:"price"` - TaxConfig *TaxConfig `json:"taxConfig"` - Type BillingUsageBasedLineCreateItemType `json:"type"` -} - -// BillingUsageBasedLineCreateItemType defines model for BillingUsageBasedLineCreateItem.Type. -type BillingUsageBasedLineCreateItemType string - -// BillingValidationIssue ValidationIssue captures any validation issues related to the invoice. -// -// Issues with severity "critical" will prevent the invoice from being issued. -type BillingValidationIssue struct { - Code *string `json:"code,omitempty"` - Component string `json:"component"` - Field *string `json:"field,omitempty"` - Message string `json:"message"` - Metadata *Metadata `json:"metadata,omitempty"` - Severity BillingValidationIssueSeverity `json:"severity"` -} - -// BillingValidationIssueSeverity ValidationIssueSeverity describes the severity of a validation issue. -// -// Issues with severity "critical" will prevent the invoice from being issued. -type BillingValidationIssueSeverity string - -// BillingVoidInvoiceAction InvoiceVoidAction describes how to handle the voided line items. -type BillingVoidInvoiceAction struct { - Action BillingVoidInvoiceLineAction `json:"action"` - Percentage Percentage `json:"percentage"` -} - -// BillingVoidInvoiceInput Request to void an invoice -type BillingVoidInvoiceInput struct { - // Action The action to take on the voided line items. - Action BillingVoidInvoiceAction `json:"action"` - - // Overrides Per line item overrides for the action. - // - // If not specified, the `action` will be applied to all line items. - Overrides *[]BillingVoidInvoiceLineOverride `json:"overrides"` - - // Reason The reason for voiding the invoice. - Reason string `json:"reason"` -} - -// BillingVoidInvoiceLineAction VoidInvoiceLineAction describes how to handle the voidied line item in the invoice. -type BillingVoidInvoiceLineAction string - -// BillingVoidInvoiceLineOverride VoidInvoiceLineOverride describes how to handle a specific line item in the invoice when voiding. -type BillingVoidInvoiceLineOverride struct { - Action BillingVoidInvoiceAction `json:"action"` - - // LineId ULID (Universally Unique Lexicographically Sortable Identifier). - LineId string `json:"lineId"` -} - -// BillingWorkflow Workflow represents a billing workflow -type BillingWorkflow struct { - Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"` - - // CreatedAt Timestamp of when the resource was created. - CreatedAt time.Time `json:"createdAt"` - - // DeletedAt Timestamp of when the resource was permanently deleted. - DeletedAt *time.Time `json:"deletedAt,omitempty"` - - // Id A unique identifier for the resource. - Id string `json:"id"` - Invoicing *BillingWorkflowInvoicingSettings `json:"invoicing,omitempty"` - Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"` - - // UpdatedAt Timestamp of when the resource was last updated. - UpdatedAt time.Time `json:"updatedAt"` -} - -// BillingWorkflowAppIdOrType AppIdOrType can be used to reference an app during creation only. -// -// This can be either an AppType or the ULID of an app. -type BillingWorkflowAppIdOrType = string - -// BillingWorkflowCollectionAlignment CollectionAlignment specifies when the pending line items should be collected into -// an invoice. -type BillingWorkflowCollectionAlignment string - -// BillingWorkflowCollectionMethod CollectionMethod specifies how the invoice should be collected (automatic vs manual) -type BillingWorkflowCollectionMethod string - -// BillingWorkflowCollectionSettings Workflow collection specifies how to collect the pending line items for an invoice -type BillingWorkflowCollectionSettings struct { - // Alignment When to collect the pending line items into an invoice. - Alignment *BillingWorkflowCollectionAlignment `json:"alignment,omitempty"` - - // Interval The interval for collecting the pending line items into an invoice. - Interval *string `json:"interval,omitempty"` -} - -// BillingWorkflowInvoicingSettings WorkflowInvoice represents the invoice settings for a billing workflow -type BillingWorkflowInvoicingSettings struct { - // AutoAdvance Whether to automatically issue the invoice after the draftPeriod has passed. - AutoAdvance *bool `json:"autoAdvance,omitempty"` - - // DraftPeriod The period for the invoice to be kept in draft status for manual reviews. - DraftPeriod *string `json:"draftPeriod,omitempty"` - - // DueAfter The period after which the invoice is due. - DueAfter *string `json:"dueAfter,omitempty"` -} - -// BillingWorkflowPaymentSettings WorkflowPaymentSettings represents the payment settings for a billing workflow -type BillingWorkflowPaymentSettings struct { - CollectionMethod *BillingWorkflowCollectionMethod `json:"collectionMethod,omitempty"` -} - -// BillingWorkflowSettings WorkflowSettings represents the settings for a billing workflow. -type BillingWorkflowSettings struct { - Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"` - Invoicing *BillingWorkflowInvoicingSettings `json:"invoicing,omitempty"` - Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"` -} - -// CheckoutSessionCustomTextAfterSubmitParams Stripe CheckoutSession.custom_text -type CheckoutSessionCustomTextAfterSubmitParams struct { - AfterSubmit *struct { - Message *string `json:"message,omitempty"` - } `json:"afterSubmit,omitempty"` - ShippingAddress *struct { - Message *string `json:"message,omitempty"` - } `json:"shippingAddress,omitempty"` - Submit *struct { - Message *string `json:"message,omitempty"` - } `json:"submit,omitempty"` - TermsOfServiceAcceptance *struct { - Message *string `json:"message,omitempty"` - } `json:"termsOfServiceAcceptance,omitempty"` -} - -// CheckoutSessionUIMode Stripe CheckoutSession.ui_mode -type CheckoutSessionUIMode string - -// ClientAppStartResponse Response from the client app (OpenMeter backend) to start the OAuth2 flow. -type ClientAppStartResponse struct { - // Url The URL to start the OAuth2 authorization code grant flow. - Url string `json:"url"` -} - -// ConflictProblemResponse A Problem Details object (RFC 7807). -// Additional properties specific to the problem type may be present. -type ConflictProblemResponse = UnexpectedProblemResponse - -// 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 CountryCode = string - -// CreateCustomSubscriptionRequestBody Create a custom subscription. -type CreateCustomSubscriptionRequestBody struct { - // ActiveFrom [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - ActiveFrom time.Time `json:"activeFrom"` - - // Currency Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. - // Custom three-letter currency codes are also supported for convenience. - Currency CurrencyCode `json:"currency"` - - // CustomPlan Resource create operation model. - CustomPlan PlanCreate `json:"customPlan"` - - // CustomerId ULID (Universally Unique Lexicographically Sortable Identifier). - CustomerId string `json:"customerId"` -} - -// CreateStripeCheckoutSessionRequest Create Stripe checkout session request. -type CreateStripeCheckoutSessionRequest struct { - // AppId If not provided, the default Stripe app is used if any. - AppId *string `json:"appId,omitempty"` - - // Customer Provide a customer ID to use an existing OpenMeter customer. - // or provide a customer object to create a new customer. - Customer CreateStripeCheckoutSessionRequest_Customer `json:"customer"` - - // Options Options passed to Stripe when creating the checkout session. - Options CreateStripeCheckoutSessionRequestOptions `json:"options"` - - // StripeCustomerId Stripe customer ID. - // If not provided OpenMeter creates a new Stripe customer or - // uses the OpenMeter customer's default Stripe customer ID. - StripeCustomerId *string `json:"stripeCustomerId,omitempty"` -} - -// CreateStripeCheckoutSessionRequest_Customer Provide a customer ID to use an existing OpenMeter customer. -// or provide a customer object to create a new customer. -type CreateStripeCheckoutSessionRequest_Customer struct { - union json.RawMessage -} - -// CreateStripeCheckoutSessionRequestOptions Create Stripe checkout session options -type CreateStripeCheckoutSessionRequestOptions struct { - CancelURL *string `json:"cancelURL,omitempty"` - ClientReferenceID *string `json:"clientReferenceID,omitempty"` - - // Currency Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. - // Custom three-letter currency codes are also supported for convenience. - Currency *CurrencyCode `json:"currency,omitempty"` - - // CustomText Stripe CheckoutSession.custom_text - CustomText *CheckoutSessionCustomTextAfterSubmitParams `json:"customText,omitempty"` - Metadata *map[string]string `json:"metadata,omitempty"` - PaymentMethodTypes *[]string `json:"paymentMethodTypes,omitempty"` - ReturnURL *string `json:"returnURL,omitempty"` - SuccessURL *string `json:"successURL,omitempty"` - - // UiMode Stripe CheckoutSession.ui_mode - UiMode *CheckoutSessionUIMode `json:"uiMode,omitempty"` -} - -// CreateStripeCheckoutSessionResult Create Stripe Checkout Session response. -type CreateStripeCheckoutSessionResult struct { - // CancelURL Cancel URL. - CancelURL *string `json:"cancelURL,omitempty"` - - // CustomerId The OpenMeter customer ID. - CustomerId string `json:"customerId"` - - // Mode Mode - // Always `setup` for now. - Mode StripeCheckoutSessionMode `json:"mode"` - - // ReturnURL Return URL. - ReturnURL *string `json:"returnURL,omitempty"` + // ReturnURL Return URL. + ReturnURL *string `json:"returnURL,omitempty"` // SessionId The checkout session ID. SessionId string `json:"sessionId"` @@ -1619,6 +1172,12 @@ type CreateStripeCheckoutSessionResult struct { Url string `json:"url"` } +// CreditNoteOriginalInvoiceRef Omitted fields: +// period: Tax period in which the referred document had an effect required by some tax regimes and formats. +// stamps: Seals of approval from other organisations that may need to be listed. +// ext: Extensions for additional codes that may be required. +type CreditNoteOriginalInvoiceRef = InvoiceGenericDocumentRef + // 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 CurrencyCode = string @@ -1729,25 +1288,10 @@ type CustomerId struct { // CustomerOrderBy Order by options for customers. type CustomerOrderBy string -// CustomerOverridePaginatedResponse Paginated response -type CustomerOverridePaginatedResponse struct { +// CustomerPaginatedResponse Paginated response +type CustomerPaginatedResponse struct { // Items The items in the current page. - Items []BillingCustomerOverride `json:"items"` - - // Page The items in the current page. - Page int `json:"page"` - - // PageSize The items in the current page. - PageSize int `json:"pageSize"` - - // TotalCount The items in the current page. - TotalCount int `json:"totalCount"` -} - -// CustomerPaginatedResponse Paginated response -type CustomerPaginatedResponse struct { - // Items The items in the current page. - Items []Customer `json:"items"` + Items []Customer `json:"items"` // Page The items in the current page. Page int `json:"page"` @@ -2415,316 +1959,316 @@ type IngestedEvent struct { // Additional properties specific to the problem type may be present. type InternalServerErrorProblemResponse = UnexpectedProblemResponse -// InvoicePaginatedResponse Paginated response -type InvoicePaginatedResponse struct { - // Items The items in the current page. - Items []BillingInvoice `json:"items"` - - // Page The items in the current page. - Page int `json:"page"` +// Invoice Invoice represents an invoice in the system. +type Invoice struct { + // CreatedAt Timestamp of when the resource was created. + CreatedAt time.Time `json:"createdAt"` - // PageSize The items in the current page. - PageSize int `json:"pageSize"` + // Currency Currency for all invoice line items. + // + // Multi currency invoices are not supported yet. + Currency CurrencyCode `json:"currency"` - // TotalCount The items in the current page. - TotalCount int `json:"totalCount"` -} + // Customer Legal entity receiving the goods or services. + Customer BillingParty `json:"customer"` -// LinesUpdate Resource create or update operation model. -type LinesUpdate struct { - Lines *[]BillingInvoiceLineCreateItem `json:"lines,omitempty"` -} + // DeletedAt Timestamp of when the resource was permanently deleted. + DeletedAt *time.Time `json:"deletedAt,omitempty"` -// ListEntitlementsResult List entitlements result -type ListEntitlementsResult struct { - union json.RawMessage -} + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` -// ListEntitlementsResult0 defines model for . -type ListEntitlementsResult0 = []Entitlement + // Discounts Discounts or allowances applied to the complete invoice. + Discounts *[]Discount `json:"discounts,omitempty"` -// ListFeaturesResult List features result -type ListFeaturesResult struct { - union json.RawMessage -} + // DraftUntil The time until the invoice is in draft status. + // + // On draft invoice creation it is calculated from the workflow settings. + // + // If manual approval is required, the draftUntil time is set. + DraftUntil *time.Time `json:"draftUntil,omitempty"` -// ListFeaturesResult0 defines model for . -type ListFeaturesResult0 = []Feature + // DueAt Due time of the fulfillment of the invoice (if available). + DueAt *time.Time `json:"dueAt,omitempty"` -// MarketplaceListing A marketplace listing. -// Represent an available app in the app marketplace that can be installed to the organization. -// -// Marketplace apps only exist in config so they don't extend the Resource model. -type MarketplaceListing struct { - // Capabilities The app's capabilities. - Capabilities []AppCapability `json:"capabilities"` + // Id A unique identifier for the resource. + Id string `json:"id"` - // Description The app's description. - Description string `json:"description"` + // IssuedAt The time the invoice was issued. + // + // Depending on the status of the invoice this can mean multiple things: + // - draft, gathering: The time the invoice will be issued based on the workflow settings. + // - issued: The time the invoice was issued. + IssuedAt *time.Time `json:"issuedAt,omitempty"` - // IconUrl The app's icon URL. - IconUrl string `json:"iconUrl"` + // Lines List of invoice lines representing each of the items sold to the customer. + Lines *[]InvoiceLine `json:"lines,omitempty"` - // Name The app's name. - Name string `json:"name"` + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` - // Type The app's type - Type AppType `json:"type"` -} + // Number Number specifies the human readable key used to reference this Invoice. + // + // The number only gets populated after the invoice had been issued. + // + // Please note that the number is (depending on the upstream settings) either unique for the + // whole organization or unique for the customer, or in multi (stripe) account setups unique for the + // account. + Number *InvoiceNumber `json:"number,omitempty"` -// MarketplaceListingList A page of results. -type MarketplaceListingList struct { - // Items The items in the page. - Items []MarketplaceListing `json:"items"` + // Payment Information on when, how, and to whom the invoice should be paid. + Payment *InvoicePaymentTerms `json:"payment,omitempty"` - // Page The page number. - Page int `json:"page"` + // Period The period the invoice covers. If the invoice has no line items, it's not set. + Period *Period `json:"period,omitempty"` - // PageSize The number of items in the page. - PageSize int `json:"pageSize"` + // Preceding Key information regarding previous invoices and potentially details as to why they were corrected. + Preceding *[]InvoiceDocumentRef `json:"preceding,omitempty"` - // TotalCount The total number of items. - TotalCount int `json:"totalCount"` -} + // Status The status of the invoice. + // + // This field only conatins a simplified status, for more detailed information use the statusDetails field. + Status InvoiceStatus `json:"status"` -// MeasureUsageFrom Measure usage from -type MeasureUsageFrom struct { - union json.RawMessage -} + // StatusDetails The details of the current invoice status. + StatusDetails InvoiceStatusDetails `json:"statusDetails"` -// MeasureUsageFromPreset Start of measurement options -type MeasureUsageFromPreset string + // Supplier The taxable entity supplying the goods or services. + Supplier BillingParty `json:"supplier"` -// MeasureUsageFromTime [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. -type MeasureUsageFromTime = time.Time + // Totals Summary of all the invoice totals, including taxes (calculated). + Totals InvoiceTotals `json:"totals"` -// Metadata Set of key-value pairs. -// Metadata can be used to store additional information about a resource. -type Metadata = map[string]string + // Type Type of the invoice. + // + // The type of invoice determines the purpose of the invoice and how it should be handled. + // + // Supported types: + // - standard: A regular commercial invoice document between a supplier and customer. + // - credit_note: Reflects a refund either partial or complete of the preceding document. A credit note effectively *extends* the previous document. + Type InvoiceType `json:"type"` -// Meter A meter is a configuration that defines how to match and aggregate events. -type Meter = models.Meter + // UpdatedAt Timestamp of when the resource was last updated. + UpdatedAt time.Time `json:"updatedAt"` -// MeterAggregation The aggregation type to use for the meter. -type MeterAggregation = models.MeterAggregation + // ValidationIssues Validation issues reported by the invoice workflow. + ValidationIssues *[]ValidationIssue `json:"validationIssues,omitempty"` -// MeterQueryResult The result of a meter query. -type MeterQueryResult struct { - Data []MeterQueryRow `json:"data"` + // VoidedAt The time the invoice was voided. + // + // If the invoice was voided, this field will be set to the time the invoice was voided. + VoidedAt *time.Time `json:"voidedAt,omitempty"` - // From [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - From *time.Time `json:"from,omitempty"` + // Workflow The workflow associated with the invoice. + // + // It is always a snapshot of the workflow settings at the time of invoice creation. The + // field is optional as it should be explicitly requested with expand options. + Workflow *InvoiceWorkflowSettings `json:"workflow,omitempty"` +} - // To [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - To *time.Time `json:"to,omitempty"` +// InvoiceAction InvoiceAction represents the actions that can be performed on an invoice. +type InvoiceAction string - // WindowSize Aggregation window size. - WindowSize *WindowSize `json:"windowSize,omitempty"` -} +// InvoiceDocumentRef CreditNoteOriginalInvoiceRef is used to reference the original invoice that a credit note is based on. +type InvoiceDocumentRef = CreditNoteOriginalInvoiceRef -// MeterQueryRow A row in the result of a meter query. -type MeterQueryRow = models.MeterQueryRow +// InvoiceDocumentRefType InvoiceDocumentRefType defines the type of document that is being referenced. +type InvoiceDocumentRefType string -// NotFoundProblemResponse A Problem Details object (RFC 7807). -// Additional properties specific to the problem type may be present. -type NotFoundProblemResponse = UnexpectedProblemResponse +// InvoiceExpand InvoiceExpand specifies the parts of the invoice to expand in the list output. +type InvoiceExpand string -// NotificationChannel Notification channel with webhook type. -type NotificationChannel = NotificationChannelWebhook +// InvoiceFlatFeeLine InvoiceFlatFeeLine represents a line item that is sold to the customer as a manually added fee. +type InvoiceFlatFeeLine struct { + // Charges Charges applied to this line. (like minimum spend) + // + // New charges can be added via the invoice's charges API, to facilitate + // charges that are affecting multiple lines. + Charges *[]BillingLineCharge `json:"charges,omitempty"` -// NotificationChannelCreateRequest Request with input parameters for creating new notification channel with webhook type. -type NotificationChannelCreateRequest = NotificationChannelWebhookCreateRequest + // Children The lines detailing the item or service sold. + Children *[]InvoiceLine `json:"children,omitempty"` -// NotificationChannelMeta Metadata only fields of a notification channel. -type NotificationChannelMeta struct { - // Id Identifies the notification channel. - Id string `json:"id"` + // CreatedAt Timestamp of when the resource was created. + CreatedAt time.Time `json:"createdAt"` - // Type Notification channel type. - Type NotificationChannelType `json:"type"` -} + // Currency The currency of this line. + Currency CurrencyCode `json:"currency"` -// NotificationChannelOrderBy Order by options for notification channels. -type NotificationChannelOrderBy string + // DeletedAt Timestamp of when the resource was permanently deleted. + DeletedAt *time.Time `json:"deletedAt,omitempty"` -// NotificationChannelPaginatedResponse Paginated response -type NotificationChannelPaginatedResponse struct { - // Items The items in the current page. - Items []NotificationChannel `json:"items"` + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` - // Page The items in the current page. - Page int `json:"page"` + // Discounts Discounts detailes applied to this line. + // + // New discounts can be added via the invoice's discounts API, to facilitate + // discounts that are affecting multiple lines. + Discounts *[]InvoiceLineDiscount `json:"discounts,omitempty"` - // PageSize The items in the current page. - PageSize int `json:"pageSize"` + // Id ULID (Universally Unique Lexicographically Sortable Identifier). + Id string `json:"id"` - // TotalCount The items in the current page. - TotalCount int `json:"totalCount"` -} + // Invoice The invoice this item belongs to. + Invoice *InvoiceReference `json:"invoice,omitempty"` -// NotificationChannelType Type of the notification channel. -type NotificationChannelType string + // InvoiceAt The time this line item should be invoiced. + InvoiceAt time.Time `json:"invoiceAt"` -// NotificationChannelWebhook Notification channel with webhook type. -type NotificationChannelWebhook struct { - // CreatedAt Timestamp of when the resource was created. - CreatedAt time.Time `json:"createdAt"` + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` - // CustomHeaders Custom HTTP headers sent as part of the webhook request. - CustomHeaders *map[string]string `json:"customHeaders,omitempty"` + // Name Human-readable name for the resource. Between 1 and 256 characters. + Name string `json:"name"` - // DeletedAt Timestamp of when the resource was permanently deleted. - DeletedAt *time.Time `json:"deletedAt,omitempty"` + // PaymentTerm Payment term of the line. + PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"` - // Disabled Whether the channel is disabled or not. - Disabled *bool `json:"disabled,omitempty"` + // PerUnitAmount Price of the item being sold. + PerUnitAmount Numeric `json:"perUnitAmount"` - // Id Identifies the notification channel. - Id string `json:"id"` + // Period Period of the line item applies to for revenue recognition pruposes. + // + // Billing always treats periods as start being inclusive and end being exclusive. + Period Period `json:"period"` - // Name User friendly name of the channel. - Name string `json:"name"` + // Quantity Quantity of the item being sold. + Quantity Numeric `json:"quantity"` - // SigningSecret Signing secret used for webhook request validation on the receiving end. + // Status Status of the line. // - // Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24 - SigningSecret *string `json:"signingSecret,omitempty"` + // External calls always create valid lines, other line types are managed by the + // billing engine of OpenMeter. + Status InvoiceLineStatus `json:"status"` - // Type Notification channel type. - Type NotificationChannelWebhookType `json:"type"` + // TaxConfig Tax config specify the tax configuration for this line. + TaxConfig *TaxConfig `json:"taxConfig,omitempty"` + + // Taxes Taxes applied to the invoice totals. + Taxes *[]InvoiceLineTaxItem `json:"taxes,omitempty"` + + // Totals Totals for this line. + Totals InvoiceTotals `json:"totals"` + Type InvoiceFlatFeeLineType `json:"type"` // UpdatedAt Timestamp of when the resource was last updated. UpdatedAt time.Time `json:"updatedAt"` - - // Url Webhook URL where the notification is sent. - Url string `json:"url"` } -// NotificationChannelWebhookType Notification channel type. -type NotificationChannelWebhookType string +// InvoiceFlatFeeLineType defines model for InvoiceFlatFeeLine.Type. +type InvoiceFlatFeeLineType string -// NotificationChannelWebhookCreateRequest Request with input parameters for creating new notification channel with webhook type. -type NotificationChannelWebhookCreateRequest struct { - // CustomHeaders Custom HTTP headers sent as part of the webhook request. - CustomHeaders *map[string]string `json:"customHeaders,omitempty"` +// InvoiceFlatFeeLineCreate Resource create operation model. +type InvoiceFlatFeeLineCreate struct { + // Currency The currency of this line. + Currency CurrencyCode `json:"currency"` - // Disabled Whether the channel is disabled or not. - Disabled *bool `json:"disabled,omitempty"` + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` - // Name User friendly name of the channel. + // Invoice The invoice this item belongs to. + Invoice *InvoiceReference `json:"invoice,omitempty"` + + // InvoiceAt The time this line item should be invoiced. + InvoiceAt time.Time `json:"invoiceAt"` + + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` + + // Name Human-readable name for the resource. Between 1 and 256 characters. Name string `json:"name"` - // SigningSecret Signing secret used for webhook request validation on the receiving end. + // PaymentTerm Payment term of the line. + PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"` + + // PerUnitAmount Price of the item being sold. + PerUnitAmount Numeric `json:"perUnitAmount"` + + // Period Period of the line item applies to for revenue recognition pruposes. // - // Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24 - SigningSecret *string `json:"signingSecret,omitempty"` + // Billing always treats periods as start being inclusive and end being exclusive. + Period Period `json:"period"` - // Type Notification channel type. - Type NotificationChannelWebhookCreateRequestType `json:"type"` + // Quantity Quantity of the item being sold. + Quantity Numeric `json:"quantity"` - // Url Webhook URL where the notification is sent. - Url string `json:"url"` + // TaxConfig Tax config specify the tax configuration for this line. + TaxConfig *TaxConfig `json:"taxConfig,omitempty"` + Type InvoiceFlatFeeLineCreateType `json:"type"` } -// NotificationChannelWebhookCreateRequestType Notification channel type. -type NotificationChannelWebhookCreateRequestType string +// InvoiceFlatFeeLineCreateType defines model for InvoiceFlatFeeLineCreate.Type. +type InvoiceFlatFeeLineCreateType string -// NotificationEvent Type of the notification event. -type NotificationEvent struct { - // Annotations Set of key-value pairs managed by the system. Cannot be modified by user. - Annotations *Annotations `json:"annotations,omitempty"` +// InvoiceFlatFeeLineReplaceUpdate Resource update operation model. +type InvoiceFlatFeeLineReplaceUpdate struct { + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` - // CreatedAt Timestamp when the notification event was created in RFC 3339 format. - CreatedAt time.Time `json:"createdAt"` + // InvoiceAt The time this line item should be invoiced. + InvoiceAt time.Time `json:"invoiceAt"` - // DeliveryStatus The delivery status of the notification event. - DeliveryStatus []NotificationEventDeliveryStatus `json:"deliveryStatus"` + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` - // Id A unique identifier of the notification event. - Id string `json:"id"` - Payload NotificationEventPayload `json:"payload"` - Rule NotificationRule `json:"rule"` + // Name Human-readable name for the resource. Between 1 and 256 characters. + Name string `json:"name"` - // Type Type of the notification event. - Type NotificationEventType `json:"type"` -} - -// NotificationEventBalanceThresholdPayload Payload for notification event with `entitlements.balance.threshold` type. -type NotificationEventBalanceThresholdPayload struct { - // Data The data of the payload. - Data NotificationEventBalanceThresholdPayloadData `json:"data"` - - // Id A unique identifier for the notification event the payload belongs to. - Id string `json:"id"` + // PaymentTerm Payment term of the line. + PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"` - // Timestamp Timestamp when the notification event was created in RFC 3339 format. - Timestamp time.Time `json:"timestamp"` + // PerUnitAmount Price of the item being sold. + PerUnitAmount Numeric `json:"perUnitAmount"` - // Type Type of the notification event. - Type NotificationEventBalanceThresholdPayloadType `json:"type"` -} + // Period Period of the line item applies to for revenue recognition pruposes. + // + // Billing always treats periods as start being inclusive and end being exclusive. + Period Period `json:"period"` -// NotificationEventBalanceThresholdPayloadType Type of the notification event. -type NotificationEventBalanceThresholdPayloadType string + // Quantity Quantity of the item being sold. + Quantity Numeric `json:"quantity"` -// NotificationEventBalanceThresholdPayloadData Data of the payload for notification event with `entitlements.balance.threshold` type. -type NotificationEventBalanceThresholdPayloadData struct { - Entitlement EntitlementMetered `json:"entitlement"` - Feature Feature `json:"feature"` - Subject Subject `json:"subject"` - Threshold NotificationRuleBalanceThresholdValue `json:"threshold"` - Value EntitlementValue `json:"value"` + // TaxConfig Tax config specify the tax configuration for this line. + TaxConfig *TaxConfig `json:"taxConfig,omitempty"` + Type InvoiceFlatFeeLineReplaceUpdateType `json:"type"` } -// NotificationEventDeliveryStatus The delivery status of the notification event. -type NotificationEventDeliveryStatus struct { - // Channel Notification channel the delivery sattus associated with. - Channel NotificationChannelMeta `json:"channel"` +// InvoiceFlatFeeLineReplaceUpdateType defines model for InvoiceFlatFeeLineReplaceUpdate.Type. +type InvoiceFlatFeeLineReplaceUpdateType string - // Reason The reason of the last deliverry state update. - Reason string `json:"reason"` +// InvoiceGenericDocumentRef Omitted fields: +// period: Tax period in which the referred document had an effect required by some tax regimes and formats. +// stamps: Seals of approval from other organisations that may need to be listed. +// ext: Extensions for additional codes that may be required. +type InvoiceGenericDocumentRef struct { + // Description Additional details about the document. + Description *string `json:"description,omitempty"` - // State Delivery state of the notification event to the channel. - State NotificationEventDeliveryStatusState `json:"state"` + // Reason Human readable description on why this reference is here or needs to be used. + Reason *string `json:"reason,omitempty"` - // UpdatedAt Timestamp of when the status was last updated in RFC 3339 format. - UpdatedAt time.Time `json:"updatedAt"` + // Type Type of the document referenced. + Type InvoiceDocumentRefType `json:"type"` } -// NotificationEventDeliveryStatusState The delivery state of the notification event to the channel. -type NotificationEventDeliveryStatusState string - -// NotificationEventOrderBy Order by options for notification channels. -type NotificationEventOrderBy string - -// NotificationEventPaginatedResponse Paginated response -type NotificationEventPaginatedResponse struct { - // Items The items in the current page. - Items []NotificationEvent `json:"items"` - - // Page The items in the current page. - Page int `json:"page"` - - // PageSize The items in the current page. - PageSize int `json:"pageSize"` - - // TotalCount The items in the current page. - TotalCount int `json:"totalCount"` +// InvoiceLine BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price. +type InvoiceLine struct { + union json.RawMessage } -// NotificationEventPayload Payload for notification event with `entitlements.balance.threshold` type. -type NotificationEventPayload = NotificationEventBalanceThresholdPayload - -// NotificationEventType Type of the notification event. -type NotificationEventType string +// InvoiceLineCreate InvoiceLineCreate represents the create model for an invoice line. +type InvoiceLineCreate struct { + union json.RawMessage +} -// NotificationRule Notification rule with entitlements.balance.threshold type. -type NotificationRule = NotificationRuleBalanceThreshold +// InvoiceLineDiscount InvoiceLineDiscount represents an amount deducted from the line, and will be applied before taxes. +type InvoiceLineDiscount struct { + // Amount Fixed discount amount to apply (calculated if percent present). + Amount Numeric `json:"amount"` -// NotificationRuleBalanceThreshold Notification rule with entitlements.balance.threshold type. -type NotificationRuleBalanceThreshold struct { - // Channels List of notification channels the rule applies to. - Channels []NotificationChannelMeta `json:"channels"` + // Code Reason code. + Code *string `json:"code,omitempty"` // CreatedAt Timestamp of when the resource was created. CreatedAt time.Time `json:"createdAt"` @@ -2732,77 +2276,65 @@ type NotificationRuleBalanceThreshold struct { // DeletedAt Timestamp of when the resource was permanently deleted. DeletedAt *time.Time `json:"deletedAt,omitempty"` - // Disabled Whether the rule is disabled or not. - Disabled *bool `json:"disabled,omitempty"` - - // Features Optional field containing list of features the rule applies to. - Features *[]FeatureMeta `json:"features,omitempty"` + // Description Text description as to why the discount was applied. + Description *string `json:"description,omitempty"` - // Id Identifies the notification rule. + // Id ID of the charge or discount. Id string `json:"id"` - // Name The user friendly name of the notification rule. - Name string `json:"name"` - - // Thresholds List of thresholds the rule suppose to be triggered. - Thresholds []NotificationRuleBalanceThresholdValue `json:"thresholds"` - - // Type Notification rule type. - Type NotificationRuleBalanceThresholdType `json:"type"` + // Percent Percentage if fixed amount not applied + Percent *Percentage `json:"percent,omitempty"` // UpdatedAt Timestamp of when the resource was last updated. UpdatedAt time.Time `json:"updatedAt"` } -// NotificationRuleBalanceThresholdType Notification rule type. -type NotificationRuleBalanceThresholdType string - -// NotificationRuleBalanceThresholdCreateRequest Request with input parameters for creating new notification rule with entitlements.balance.threashold type. -type NotificationRuleBalanceThresholdCreateRequest struct { - // Channels List of notification channels the rule is applied to. - Channels []string `json:"channels"` - - // Disabled Whether the rule is disabled or not. - Disabled *bool `json:"disabled,omitempty"` - - // Features Optional field for defining the scope of notification by feature. It may contain features by id or key. - Features *[]string `json:"features,omitempty"` +// InvoiceLineReplaceUpdate InvoiceLineReplaceUpdate represents the update model for an invoice line. +type InvoiceLineReplaceUpdate struct { + union json.RawMessage +} - // Name The user friendly name of the notification rule. - Name string `json:"name"` +// InvoiceLineStatus Line status specifies the status of the line. +type InvoiceLineStatus string - // Thresholds List of thresholds the rule suppose to be triggered. - Thresholds []NotificationRuleBalanceThresholdValue `json:"thresholds"` +// InvoiceLineTaxBehavior InvoiceLineTaxBehavior details how the tax item is applied to the base amount. +// +// Inclusive means the tax is included in the base amount. +// Exclusive means the tax is added to the base amount. +type InvoiceLineTaxBehavior string - // Type Notification rule type. - Type NotificationRuleBalanceThresholdCreateRequestType `json:"type"` -} +// InvoiceLineTaxItem TaxConfig stores the configuration for a tax line relative to an invoice line. +type InvoiceLineTaxItem struct { + // Behavior Is the tax item inclusive or exclusive of the base amount. + Behavior *InvoiceLineTaxBehavior `json:"behavior,omitempty"` -// NotificationRuleBalanceThresholdCreateRequestType Notification rule type. -type NotificationRuleBalanceThresholdCreateRequestType string + // Config Tax provider configuration. + Config *TaxConfig `json:"config,omitempty"` -// NotificationRuleBalanceThresholdValue Threshold value with multiple supported types. -type NotificationRuleBalanceThresholdValue struct { - // Type Type of the threshold. - Type NotificationRuleBalanceThresholdValueType `json:"type"` + // Percent Percent defines the percentage set manually or determined from + // the rate key (calculated if rate present). A nil percent implies that + // this tax combo is **exempt** from tax.") + Percent *Percentage `json:"percent,omitempty"` - // Value Value of the threshold. - Value float64 `json:"value"` + // Surcharge Some countries require an additional surcharge (calculated if rate present). + Surcharge *Numeric `json:"surcharge,omitempty"` } -// NotificationRuleBalanceThresholdValueType Type of the rule in the balance threshold specification. -type NotificationRuleBalanceThresholdValueType string - -// NotificationRuleCreateRequest Request with input parameters for creating new notification rule with entitlements.balance.threashold type. -type NotificationRuleCreateRequest = NotificationRuleBalanceThresholdCreateRequest +// InvoiceNumber InvoiceNumber is a unique identifier for the invoice, generated by the +// invoicing app. +// +// The uniqueness depends on a lot of factors: +// - app setting (unique per app or unique per customer) +// - multiple app scenarios (multiple apps generating invoices with the same prefix) +type InvoiceNumber = string -// NotificationRuleOrderBy Order by options for notification channels. -type NotificationRuleOrderBy string +// InvoiceOrderBy InvoiceOrderBy specifies the ordering options for invoice listing. +type InvoiceOrderBy string -// NotificationRulePaginatedResponse Paginated response -type NotificationRulePaginatedResponse struct { +// InvoicePaginatedResponse Paginated response +type InvoicePaginatedResponse struct { // Items The items in the current page. - Items []NotificationRule `json:"items"` + Items []Invoice `json:"items"` // Page The items in the current page. Page int `json:"page"` @@ -2814,33 +2346,103 @@ type NotificationRulePaginatedResponse struct { TotalCount int `json:"totalCount"` } -// Numeric Numeric represents an arbitrary precision number. -type Numeric = string +// InvoicePaymentTerms Payment contains details as to how the invoice should be paid. +type InvoicePaymentTerms struct { + // Terms The terms of payment for the invoice. + Terms *PaymentTerms `json:"terms,omitempty"` +} -// OAuth2AuthorizationCodeGrantErrorType OAuth2 authorization code grant error types. -type OAuth2AuthorizationCodeGrantErrorType string +// InvoicePendingLinesActionInput BillingInvoiceActionInput is the input for creating an invoice. +// +// Invoice creation is always based on already pending line items created by the billingCreateLineByCustomer +// operation. Empty invoices are not allowed. +type InvoicePendingLinesActionInput struct { + // AsOf The time as of which the invoice is created. + // + // If not provided, the current time is used. + AsOf *time.Time `json:"asOf,omitempty"` -// Percentage Numeric representation of a percentage -type Percentage = string + // IncludePendingLines The pending line items to include in the invoice, if not provided: + // - all line items that have invoice_at < asOf will be included + // - all usage based line items will be included up to asOf, new usage-based line items will be staged for the rest + // of the billing cycle + IncludePendingLines *[]string `json:"includePendingLines,omitempty"` +} -// Period A period with a start and end time. -type Period struct { - // From Period start time. - From time.Time `json:"from"` +// InvoiceReference Reference to an invoice. +type InvoiceReference struct { + // Id The ID of the invoice. + Id string `json:"id"` - // To Period end time. - To time.Time `json:"to"` + // Number The number of the invoice. + Number *InvoiceNumber `json:"number,omitempty"` } -// PhasesOrderBy Order by options for plan phases. -type PhasesOrderBy string +// InvoiceStatus InvoiceStatus describes the status of an invoice. +type InvoiceStatus string + +// InvoiceStatusDetails InvoiceStatusDetails represents the details of the invoice status. +// +// API users are encouraged to rely on the immutable/failed/avaliableActions fields to determine +// the next steps of the invoice instead of the extendedStatus field. +type InvoiceStatusDetails struct { + // AvailableActions The actions that can be performed on the invoice. + AvailableActions []InvoiceAction `json:"availableActions"` + + // ExtendedStatus Extended status information for the invoice. + ExtendedStatus string `json:"extendedStatus"` + + // Failed Is the invoice in a failed state? + Failed bool `json:"failed"` + + // Immutable Is the invoice editable? + Immutable bool `json:"immutable"` +} + +// InvoiceTotals Totals contains the summaries of all calculations for the invoice. +type InvoiceTotals struct { + // Amount The total value of the line before taxes, discounts and commitments. + Amount Numeric `json:"amount"` + + // ChargesTotal The amount of value of the line that are due to additional charges. + ChargesTotal Numeric `json:"chargesTotal"` + + // DiscountsTotal The amount of value of the line that are due to discounts. + DiscountsTotal Numeric `json:"discountsTotal"` + + // TaxesExclusiveTotal The total amount of taxes that are added on top of amount from the line. + TaxesExclusiveTotal Numeric `json:"taxesExclusiveTotal"` + + // TaxesInclusiveTotal The total amount of taxes that are included in the line. + TaxesInclusiveTotal Numeric `json:"taxesInclusiveTotal"` + + // TaxesTotal The total amount of taxes for this line. + TaxesTotal Numeric `json:"taxesTotal"` + + // Total The total amount value of the line after taxes, discounts and commitments. + Total Numeric `json:"total"` +} + +// InvoiceType InvoiceType represents the type of invoice. +// +// The type of invoice determines the purpose of the invoice and how it should be handled. +type InvoiceType string + +// InvoiceUsageBasedLine InvoiceUsageBasedLine represents a line item that is sold to the customer based on usage. +type InvoiceUsageBasedLine struct { + // Charges Charges applied to this line. (like minimum spend) + // + // New charges can be added via the invoice's charges API, to facilitate + // charges that are affecting multiple lines. + Charges *[]BillingLineCharge `json:"charges,omitempty"` + + // Children The lines detailing the item or service sold. + Children *[]InvoiceLine `json:"children,omitempty"` -// Plan Plans provide a template for subscriptions. -type Plan struct { // CreatedAt Timestamp of when the resource was created. CreatedAt time.Time `json:"createdAt"` - // Currency The currency code of the plan. + // Currency The currency of this line. Currency CurrencyCode `json:"currency"` // DeletedAt Timestamp of when the resource was permanently deleted. @@ -2849,17 +2451,23 @@ type Plan struct { // Description Optional description of the resource. Maximum 1024 characters. Description *string `json:"description,omitempty"` - // EffectiveFrom The date and time when the plan becomes effective. When not specified, the plan is a draft. - EffectiveFrom *time.Time `json:"effectiveFrom,omitempty"` + // Discounts Discounts detailes applied to this line. + // + // New discounts can be added via the invoice's discounts API, to facilitate + // discounts that are affecting multiple lines. + Discounts *[]InvoiceLineDiscount `json:"discounts,omitempty"` - // EffectiveTo The date and time when the plan is no longer effective. When not specified, the plan is effective indefinitely. - EffectiveTo *time.Time `json:"effectiveTo,omitempty"` + // FeatureKey The feature that the usage is based on. + FeatureKey string `json:"featureKey"` - // Id A unique identifier for the resource. + // Id ULID (Universally Unique Lexicographically Sortable Identifier). Id string `json:"id"` - // Key A semi-unique identifier for the resource. - Key string `json:"key"` + // Invoice The invoice this item belongs to. + Invoice *InvoiceReference `json:"invoice,omitempty"` + + // InvoiceAt The time this line item should be invoiced. + InvoiceAt time.Time `json:"invoiceAt"` // Metadata Additional metadata for the resource. Metadata *Metadata `json:"metadata"` @@ -2867,35 +2475,61 @@ type Plan struct { // Name Human-readable name for the resource. Between 1 and 256 characters. Name string `json:"name"` - // Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. - // A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices. - Phases []PlanPhase `json:"phases"` + // Period Period of the line item applies to for revenue recognition pruposes. + // + // Billing always treats periods as start being inclusive and end being exclusive. + Period Period `json:"period"` - // Status The status of the plan. - // Computed based on the effective start and end dates: - // - draft = no effectiveFrom - // - active = effectiveFrom <= now < effectiveTo - // - archived / inactive = effectiveTo <= now - // - scheduled = now < effectiveFrom < effectiveTo - Status PlanStatus `json:"status"` + // PreLinePeriodQuantity The quantity of the item used in before this line's period. + // + // It is non-zero in case of progressive billing, when this shows how much of the usage was already billed. + PreLinePeriodQuantity *Numeric `json:"preLinePeriodQuantity,omitempty"` + + // Price The price of the usage based rate card. + Price RateCardUsageBasedPrice `json:"price"` + + // Quantity The quantity of the item being sold. + Quantity *Numeric `json:"quantity,omitempty"` + + // Status Status of the line. + // + // External calls always create valid lines, other line types are managed by the + // billing engine of OpenMeter. + Status InvoiceLineStatus `json:"status"` + + // TaxConfig Tax config specify the tax configuration for this line. + TaxConfig *TaxConfig `json:"taxConfig,omitempty"` + + // Taxes Taxes applied to the invoice totals. + Taxes *[]InvoiceLineTaxItem `json:"taxes,omitempty"` + + // Totals Totals for this line. + Totals InvoiceTotals `json:"totals"` + Type InvoiceUsageBasedLineType `json:"type"` // UpdatedAt Timestamp of when the resource was last updated. UpdatedAt time.Time `json:"updatedAt"` - - // Version Version of the plan. Incremented when the plan is updated. - Version int `json:"version"` } -// PlanCreate Resource create operation model. -type PlanCreate struct { - // Currency The currency code of the plan. +// InvoiceUsageBasedLineType defines model for InvoiceUsageBasedLine.Type. +type InvoiceUsageBasedLineType string + +// InvoiceUsageBasedLineCreate Resource create operation model. +type InvoiceUsageBasedLineCreate struct { + // Currency The currency of this line. Currency CurrencyCode `json:"currency"` // Description Optional description of the resource. Maximum 1024 characters. Description *string `json:"description,omitempty"` - // Key A semi-unique identifier for the resource. - Key string `json:"key"` + // FeatureKey The feature that the usage is based on. + FeatureKey string `json:"featureKey"` + + // Invoice The invoice this item belongs to. + Invoice *InvoiceReference `json:"invoice,omitempty"` + + // InvoiceAt The time this line item should be invoiced. + InvoiceAt time.Time `json:"invoiceAt"` // Metadata Additional metadata for the resource. Metadata *Metadata `json:"metadata"` @@ -2903,39 +2537,29 @@ type PlanCreate struct { // Name Human-readable name for the resource. Between 1 and 256 characters. Name string `json:"name"` - // Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. - // A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices. - Phases []PlanPhase `json:"phases"` -} + // Period Period of the line item applies to for revenue recognition pruposes. + // + // Billing always treats periods as start being inclusive and end being exclusive. + Period Period `json:"period"` -// PlanOrderBy Order by options for plans. -type PlanOrderBy string + // Price The price of the usage based rate card. + Price RateCardUsageBasedPrice `json:"price"` -// PlanPaginatedResponse Paginated response -type PlanPaginatedResponse struct { - // Items The items in the current page. - Items []Plan `json:"items"` - - // Page The items in the current page. - Page int `json:"page"` - - // PageSize The items in the current page. - PageSize int `json:"pageSize"` - - // TotalCount The items in the current page. - TotalCount int `json:"totalCount"` + // TaxConfig Tax config specify the tax configuration for this line. + TaxConfig *TaxConfig `json:"taxConfig,omitempty"` + Type InvoiceUsageBasedLineCreateType `json:"type"` } -// PlanPhase The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. -type PlanPhase struct { +// InvoiceUsageBasedLineCreateType defines model for InvoiceUsageBasedLineCreate.Type. +type InvoiceUsageBasedLineCreateType string + +// InvoiceUsageBasedLineReplaceUpdate Resource update operation model. +type InvoiceUsageBasedLineReplaceUpdate struct { // Description Optional description of the resource. Maximum 1024 characters. Description *string `json:"description,omitempty"` - // Discounts The discounts on the plan. - Discounts *[]Discount `json:"discounts,omitempty"` - - // Key A semi-unique identifier for the resource. - Key string `json:"key"` + // InvoiceAt The time this line item should be invoiced. + InvoiceAt time.Time `json:"invoiceAt"` // Metadata Additional metadata for the resource. Metadata *Metadata `json:"metadata"` @@ -2943,205 +2567,642 @@ type PlanPhase struct { // Name Human-readable name for the resource. Between 1 and 256 characters. Name string `json:"name"` - // RateCards The rate cards of the plan. - RateCards []RateCard `json:"rateCards"` + // Period Period of the line item applies to for revenue recognition pruposes. + // + // Billing always treats periods as start being inclusive and end being exclusive. + Period Period `json:"period"` - // StartAfter The time after which the plan starts compared to subscription start - StartAfter *string `json:"startAfter"` + // Price The price of the usage based rate card. + Price RateCardUsageBasedPrice `json:"price"` + + // TaxConfig Tax config specify the tax configuration for this line. + TaxConfig *TaxConfig `json:"taxConfig,omitempty"` + Type InvoiceUsageBasedLineReplaceUpdateType `json:"type"` } -// PlanPhaseCreate Resource create operation model. -type PlanPhaseCreate struct { - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` +// InvoiceUsageBasedLineReplaceUpdateType defines model for InvoiceUsageBasedLineReplaceUpdate.Type. +type InvoiceUsageBasedLineReplaceUpdateType string - // Discounts The discounts on the plan. - Discounts *[]Discount `json:"discounts,omitempty"` +// InvoiceWorkflowSettings InvoiceWorkflowSettings represents the workflow settings used by the invoice. +// +// This is a clone of the billing profile's workflow settings at the time of invoice creation +// with customer overrides considered. +type InvoiceWorkflowSettings struct { + // Apps The apps that will be used to orchestrate the invoice's workflow. + Apps *BillingProfileAppsOrReference `json:"apps,omitempty"` - // Key A semi-unique identifier for the resource. - Key string `json:"key"` + // SourceBillingProfileID sourceBillingProfileID is the billing profile on which the workflow was based on. + // + // The profile is snapshotted on invoice creation, after which it can be altered independently + // of the profile itself. + SourceBillingProfileID string `json:"sourceBillingProfileID"` - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` + // Timezone Timezone of the invoice's date fields. + Timezone string `json:"timezone"` - // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` + // Workflow The workflow details used by this invoice. + Workflow BillingWorkflowSettings `json:"workflow"` +} - // RateCards The rate cards of the plan. - RateCards []RateCard `json:"rateCards"` +// ListEntitlementsResult List entitlements result +type ListEntitlementsResult struct { + union json.RawMessage +} - // StartAfter The time after which the plan starts compared to subscription start - StartAfter *string `json:"startAfter"` +// ListEntitlementsResult0 defines model for . +type ListEntitlementsResult0 = []Entitlement + +// ListFeaturesResult List features result +type ListFeaturesResult struct { + union json.RawMessage } -// PlanPhasePaginatedResponse Paginated response -type PlanPhasePaginatedResponse struct { - // Items The items in the current page. - Items []PlanPhase `json:"items"` +// ListFeaturesResult0 defines model for . +type ListFeaturesResult0 = []Feature - // Page The items in the current page. - Page int `json:"page"` +// MarketplaceListing A marketplace listing. +// Represent an available app in the app marketplace that can be installed to the organization. +// +// Marketplace apps only exist in config so they don't extend the Resource model. +type MarketplaceListing struct { + // Capabilities The app's capabilities. + Capabilities []AppCapability `json:"capabilities"` - // PageSize The items in the current page. - PageSize int `json:"pageSize"` + // Description The app's description. + Description string `json:"description"` - // TotalCount The items in the current page. - TotalCount int `json:"totalCount"` -} + // IconUrl The app's icon URL. + IconUrl string `json:"iconUrl"` -// PlanPhaseUpdate Resource create or update operation model. -type PlanPhaseUpdate struct { - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` + // Name The app's name. + Name string `json:"name"` - // Discounts The discounts on the plan. - Discounts *[]Discount `json:"discounts,omitempty"` + // Type The app's type + Type AppType `json:"type"` +} - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` +// MarketplaceListingList A page of results. +type MarketplaceListingList struct { + // Items The items in the page. + Items []MarketplaceListing `json:"items"` - // Name Human-readable name for the resource. Between 1 and 256 characters. - Name *string `json:"name,omitempty"` + // Page The page number. + Page int `json:"page"` - // RateCards The rate cards of the plan. - RateCards *[]RateCard `json:"rateCards,omitempty"` + // PageSize The number of items in the page. + PageSize int `json:"pageSize"` - // StartAfter The time after which the plan starts compared to subscription start - StartAfter *string `json:"startAfter"` + // TotalCount The total number of items. + TotalCount int `json:"totalCount"` } -// PlanReference References an exact plan. -type PlanReference struct { - // Key The plan key. - Key string `json:"key"` - - // Version The plan version. - Version int `json:"version"` +// MeasureUsageFrom Measure usage from +type MeasureUsageFrom struct { + union json.RawMessage } -// PlanReplaceUpdate Resource update operation model. -type PlanReplaceUpdate struct { - // Description Optional description of the resource. Maximum 1024 characters. - Description *string `json:"description,omitempty"` +// MeasureUsageFromPreset Start of measurement options +type MeasureUsageFromPreset string - // Metadata Additional metadata for the resource. - Metadata *Metadata `json:"metadata"` +// MeasureUsageFromTime [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. +type MeasureUsageFromTime = time.Time - // Name Human-readable name for the resource. Between 1 and 256 characters. - Name string `json:"name"` +// Metadata Set of key-value pairs. +// Metadata can be used to store additional information about a resource. +type Metadata = map[string]string - // Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. - // A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices. - Phases []PlanPhase `json:"phases"` -} +// Meter A meter is a configuration that defines how to match and aggregate events. +type Meter = models.Meter -// PlanStatus The status of a plan. -type PlanStatus string +// MeterAggregation The aggregation type to use for the meter. +type MeterAggregation = models.MeterAggregation -// PlanSubscriptionChange Change subscription based on plan. -type PlanSubscriptionChange struct { - // ActiveFrom [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - ActiveFrom time.Time `json:"activeFrom"` +// MeterQueryResult The result of a meter query. +type MeterQueryResult struct { + Data []MeterQueryRow `json:"data"` - // Currency Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. - // Custom three-letter currency codes are also supported for convenience. - Currency CurrencyCode `json:"currency"` + // From [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. + From *time.Time `json:"from,omitempty"` - // Customizations Batch processing commands for customizing the susbcription. - // The key format is `/phases/{phaseKey}/items/{itemKey}`. - // - // Add operations insert a new member based on the creation input without altering the existing members. - // - // Remove operations remove the member from the document. - Customizations []PlanSubscriptionChange_Customizations_Item `json:"customizations"` - Plan struct { - // Key A key is a unique string that is used to identify a resource. - Key string `json:"key"` - Version int `json:"version"` - } `json:"plan"` -} + // To [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. + To *time.Time `json:"to,omitempty"` -// PlanSubscriptionChange_Customizations_Item defines model for PlanSubscriptionChange.customizations.Item. -type PlanSubscriptionChange_Customizations_Item struct { - union json.RawMessage + // WindowSize Aggregation window size. + WindowSize *WindowSize `json:"windowSize,omitempty"` } -// PlanSubscriptionCreate Create subscription based on plan. -type PlanSubscriptionCreate struct { - // ActiveFrom [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - ActiveFrom time.Time `json:"activeFrom"` +// MeterQueryRow A row in the result of a meter query. +type MeterQueryRow = models.MeterQueryRow - // Currency Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. - // Custom three-letter currency codes are also supported for convenience. - Currency CurrencyCode `json:"currency"` +// NotFoundProblemResponse A Problem Details object (RFC 7807). +// Additional properties specific to the problem type may be present. +type NotFoundProblemResponse = UnexpectedProblemResponse - // CustomerId ULID (Universally Unique Lexicographically Sortable Identifier). - CustomerId string `json:"customerId"` +// NotificationChannel Notification channel with webhook type. +type NotificationChannel = NotificationChannelWebhook - // Customizations Batch processing commands for customizing the susbcription. - // The key format is `/phases/{phaseKey}/items/{itemKey}`. - // - // Add operations insert a new member based on the creation input without altering the existing members. - // - // Remove operations remove the member from the document. - Customizations []PlanSubscriptionCreate_Customizations_Item `json:"customizations"` - Plan struct { - // Key A key is a unique string that is used to identify a resource. - Key string `json:"key"` - Version int `json:"version"` - } `json:"plan"` -} +// NotificationChannelCreateRequest Request with input parameters for creating new notification channel with webhook type. +type NotificationChannelCreateRequest = NotificationChannelWebhookCreateRequest -// PlanSubscriptionCreate_Customizations_Item defines model for PlanSubscriptionCreate.customizations.Item. -type PlanSubscriptionCreate_Customizations_Item struct { - union json.RawMessage +// NotificationChannelMeta Metadata only fields of a notification channel. +type NotificationChannelMeta struct { + // Id Identifies the notification channel. + Id string `json:"id"` + + // Type Notification channel type. + Type NotificationChannelType `json:"type"` } -// PortalToken A consumer portal token. -// -// Validator doesn't obey required for readOnly properties -// See: https://github.com/stoplightio/spectral/issues/1274 -type PortalToken struct { - // AllowedMeterSlugs Optional, if defined only the specified meters will be allowed. - AllowedMeterSlugs *[]string `json:"allowedMeterSlugs,omitempty"` +// NotificationChannelOrderBy Order by options for notification channels. +type NotificationChannelOrderBy string - // CreatedAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - CreatedAt *time.Time `json:"createdAt,omitempty"` - Expired *bool `json:"expired,omitempty"` +// NotificationChannelPaginatedResponse Paginated response +type NotificationChannelPaginatedResponse struct { + // Items The items in the current page. + Items []NotificationChannel `json:"items"` - // ExpiresAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. - ExpiresAt *time.Time `json:"expiresAt,omitempty"` + // Page The items in the current page. + Page int `json:"page"` - // Id ULID (Universally Unique Lexicographically Sortable Identifier). - Id *string `json:"id,omitempty"` - Subject string `json:"subject"` + // PageSize The items in the current page. + PageSize int `json:"pageSize"` - // Token The token is only returned at creation. - Token *string `json:"token,omitempty"` + // TotalCount The items in the current page. + TotalCount int `json:"totalCount"` } -// PricePaymentTerm The payment term of a flat price. -// One of: in_advance or in_arrears. -type PricePaymentTerm string +// NotificationChannelType Type of the notification channel. +type NotificationChannelType string + +// NotificationChannelWebhook Notification channel with webhook type. +type NotificationChannelWebhook struct { + // CreatedAt Timestamp of when the resource was created. + CreatedAt time.Time `json:"createdAt"` + + // CustomHeaders Custom HTTP headers sent as part of the webhook request. + CustomHeaders *map[string]string `json:"customHeaders,omitempty"` + + // DeletedAt Timestamp of when the resource was permanently deleted. + DeletedAt *time.Time `json:"deletedAt,omitempty"` + + // Disabled Whether the channel is disabled or not. + Disabled *bool `json:"disabled,omitempty"` + + // Id Identifies the notification channel. + Id string `json:"id"` + + // Name User friendly name of the channel. + Name string `json:"name"` + + // SigningSecret Signing secret used for webhook request validation on the receiving end. + // + // Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24 + SigningSecret *string `json:"signingSecret,omitempty"` + + // Type Notification channel type. + Type NotificationChannelWebhookType `json:"type"` + + // UpdatedAt Timestamp of when the resource was last updated. + UpdatedAt time.Time `json:"updatedAt"` + + // Url Webhook URL where the notification is sent. + Url string `json:"url"` +} + +// NotificationChannelWebhookType Notification channel type. +type NotificationChannelWebhookType string + +// NotificationChannelWebhookCreateRequest Request with input parameters for creating new notification channel with webhook type. +type NotificationChannelWebhookCreateRequest struct { + // CustomHeaders Custom HTTP headers sent as part of the webhook request. + CustomHeaders *map[string]string `json:"customHeaders,omitempty"` + + // Disabled Whether the channel is disabled or not. + Disabled *bool `json:"disabled,omitempty"` + + // Name User friendly name of the channel. + Name string `json:"name"` + + // SigningSecret Signing secret used for webhook request validation on the receiving end. + // + // Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24 + SigningSecret *string `json:"signingSecret,omitempty"` + + // Type Notification channel type. + Type NotificationChannelWebhookCreateRequestType `json:"type"` + + // Url Webhook URL where the notification is sent. + Url string `json:"url"` +} + +// NotificationChannelWebhookCreateRequestType Notification channel type. +type NotificationChannelWebhookCreateRequestType string + +// NotificationEvent Type of the notification event. +type NotificationEvent struct { + // Annotations Set of key-value pairs managed by the system. Cannot be modified by user. + Annotations *Annotations `json:"annotations,omitempty"` + + // CreatedAt Timestamp when the notification event was created in RFC 3339 format. + CreatedAt time.Time `json:"createdAt"` + + // DeliveryStatus The delivery status of the notification event. + DeliveryStatus []NotificationEventDeliveryStatus `json:"deliveryStatus"` + + // Id A unique identifier of the notification event. + Id string `json:"id"` + Payload NotificationEventPayload `json:"payload"` + Rule NotificationRule `json:"rule"` + + // Type Type of the notification event. + Type NotificationEventType `json:"type"` +} + +// NotificationEventBalanceThresholdPayload Payload for notification event with `entitlements.balance.threshold` type. +type NotificationEventBalanceThresholdPayload struct { + // Data The data of the payload. + Data NotificationEventBalanceThresholdPayloadData `json:"data"` + + // Id A unique identifier for the notification event the payload belongs to. + Id string `json:"id"` + + // Timestamp Timestamp when the notification event was created in RFC 3339 format. + Timestamp time.Time `json:"timestamp"` + + // Type Type of the notification event. + Type NotificationEventBalanceThresholdPayloadType `json:"type"` +} + +// NotificationEventBalanceThresholdPayloadType Type of the notification event. +type NotificationEventBalanceThresholdPayloadType string + +// NotificationEventBalanceThresholdPayloadData Data of the payload for notification event with `entitlements.balance.threshold` type. +type NotificationEventBalanceThresholdPayloadData struct { + Entitlement EntitlementMetered `json:"entitlement"` + Feature Feature `json:"feature"` + Subject Subject `json:"subject"` + Threshold NotificationRuleBalanceThresholdValue `json:"threshold"` + Value EntitlementValue `json:"value"` +} + +// NotificationEventDeliveryStatus The delivery status of the notification event. +type NotificationEventDeliveryStatus struct { + // Channel Notification channel the delivery sattus associated with. + Channel NotificationChannelMeta `json:"channel"` + + // Reason The reason of the last deliverry state update. + Reason string `json:"reason"` + + // State Delivery state of the notification event to the channel. + State NotificationEventDeliveryStatusState `json:"state"` + + // UpdatedAt Timestamp of when the status was last updated in RFC 3339 format. + UpdatedAt time.Time `json:"updatedAt"` +} + +// NotificationEventDeliveryStatusState The delivery state of the notification event to the channel. +type NotificationEventDeliveryStatusState string + +// NotificationEventOrderBy Order by options for notification channels. +type NotificationEventOrderBy string + +// NotificationEventPaginatedResponse Paginated response +type NotificationEventPaginatedResponse struct { + // Items The items in the current page. + Items []NotificationEvent `json:"items"` + + // Page The items in the current page. + Page int `json:"page"` + + // PageSize The items in the current page. + PageSize int `json:"pageSize"` + + // TotalCount The items in the current page. + TotalCount int `json:"totalCount"` +} + +// NotificationEventPayload Payload for notification event with `entitlements.balance.threshold` type. +type NotificationEventPayload = NotificationEventBalanceThresholdPayload + +// NotificationEventType Type of the notification event. +type NotificationEventType string + +// NotificationRule Notification rule with entitlements.balance.threshold type. +type NotificationRule = NotificationRuleBalanceThreshold + +// NotificationRuleBalanceThreshold Notification rule with entitlements.balance.threshold type. +type NotificationRuleBalanceThreshold struct { + // Channels List of notification channels the rule applies to. + Channels []NotificationChannelMeta `json:"channels"` + + // CreatedAt Timestamp of when the resource was created. + CreatedAt time.Time `json:"createdAt"` + + // DeletedAt Timestamp of when the resource was permanently deleted. + DeletedAt *time.Time `json:"deletedAt,omitempty"` + + // Disabled Whether the rule is disabled or not. + Disabled *bool `json:"disabled,omitempty"` + + // Features Optional field containing list of features the rule applies to. + Features *[]FeatureMeta `json:"features,omitempty"` + + // Id Identifies the notification rule. + Id string `json:"id"` + + // Name The user friendly name of the notification rule. + Name string `json:"name"` + + // Thresholds List of thresholds the rule suppose to be triggered. + Thresholds []NotificationRuleBalanceThresholdValue `json:"thresholds"` + + // Type Notification rule type. + Type NotificationRuleBalanceThresholdType `json:"type"` + + // UpdatedAt Timestamp of when the resource was last updated. + UpdatedAt time.Time `json:"updatedAt"` +} + +// NotificationRuleBalanceThresholdType Notification rule type. +type NotificationRuleBalanceThresholdType string + +// NotificationRuleBalanceThresholdCreateRequest Request with input parameters for creating new notification rule with entitlements.balance.threashold type. +type NotificationRuleBalanceThresholdCreateRequest struct { + // Channels List of notification channels the rule is applied to. + Channels []string `json:"channels"` + + // Disabled Whether the rule is disabled or not. + Disabled *bool `json:"disabled,omitempty"` + + // Features Optional field for defining the scope of notification by feature. It may contain features by id or key. + Features *[]string `json:"features,omitempty"` + + // Name The user friendly name of the notification rule. + Name string `json:"name"` + + // Thresholds List of thresholds the rule suppose to be triggered. + Thresholds []NotificationRuleBalanceThresholdValue `json:"thresholds"` + + // Type Notification rule type. + Type NotificationRuleBalanceThresholdCreateRequestType `json:"type"` +} + +// NotificationRuleBalanceThresholdCreateRequestType Notification rule type. +type NotificationRuleBalanceThresholdCreateRequestType string + +// NotificationRuleBalanceThresholdValue Threshold value with multiple supported types. +type NotificationRuleBalanceThresholdValue struct { + // Type Type of the threshold. + Type NotificationRuleBalanceThresholdValueType `json:"type"` + + // Value Value of the threshold. + Value float64 `json:"value"` +} + +// NotificationRuleBalanceThresholdValueType Type of the rule in the balance threshold specification. +type NotificationRuleBalanceThresholdValueType string + +// NotificationRuleCreateRequest Request with input parameters for creating new notification rule with entitlements.balance.threashold type. +type NotificationRuleCreateRequest = NotificationRuleBalanceThresholdCreateRequest + +// NotificationRuleOrderBy Order by options for notification channels. +type NotificationRuleOrderBy string + +// NotificationRulePaginatedResponse Paginated response +type NotificationRulePaginatedResponse struct { + // Items The items in the current page. + Items []NotificationRule `json:"items"` + + // Page The items in the current page. + Page int `json:"page"` + + // PageSize The items in the current page. + PageSize int `json:"pageSize"` + + // TotalCount The items in the current page. + TotalCount int `json:"totalCount"` +} + +// Numeric Numeric represents an arbitrary precision number. +type Numeric = string + +// OAuth2AuthorizationCodeGrantErrorType OAuth2 authorization code grant error types. +type OAuth2AuthorizationCodeGrantErrorType string + +// PaymentDueDate PaymentDueDate contains an amount that should be paid by the given date. +type PaymentDueDate struct { + // Amount How much needs to be paid by the date. + Amount Numeric `json:"amount"` + + // Currency If different from the parent document's base currency. + Currency *CurrencyCode `json:"currency,omitempty"` + + // DueAt When the payment is due. + DueAt time.Time `json:"dueAt"` + + // Notes Other details to take into account for the due date. + Notes *string `json:"notes,omitempty"` + + // Percent Percentage of the total that should be paid by the date. + Percent *Percentage `json:"percent,omitempty"` +} + +// PaymentTermDueDate PaymentTermDueDate defines the terms for payment on a specific date. +type PaymentTermDueDate struct { + // Detail Text detail of the chosen payment terms. + Detail *string `json:"detail,omitempty"` + + // DueAt When the payment is due. + DueAt []PaymentDueDate `json:"dueAt"` + + // Notes Description of the conditions for payment. + Notes *string `json:"notes,omitempty"` + + // Type Type of terms to be applied. + Type PaymentTermDueDateType `json:"type"` +} + +// PaymentTermDueDateType Type of terms to be applied. +type PaymentTermDueDateType string + +// PaymentTermInstant PaymentTermInstant defines the terms for payment on receipt of invoice. +type PaymentTermInstant struct { + // Detail Text detail of the chosen payment terms. + Detail *string `json:"detail,omitempty"` + + // Notes Description of the conditions for payment. + Notes *string `json:"notes,omitempty"` + + // Type Type of terms to be applied. + Type PaymentTermInstantType `json:"type"` +} + +// PaymentTermInstantType Type of terms to be applied. +type PaymentTermInstantType string + +// PaymentTerms PaymentTerms defines the terms for payment. +type PaymentTerms struct { + union json.RawMessage +} + +// Percentage Numeric representation of a percentage +type Percentage = string + +// Period A period with a start and end time. +type Period struct { + // From Period start time. + From time.Time `json:"from"` + + // To Period end time. + To time.Time `json:"to"` +} + +// PhasesOrderBy Order by options for plan phases. +type PhasesOrderBy string + +// Plan Plans provide a template for subscriptions. +type Plan struct { + // CreatedAt Timestamp of when the resource was created. + CreatedAt time.Time `json:"createdAt"` + + // Currency The currency code of the plan. + Currency CurrencyCode `json:"currency"` + + // DeletedAt Timestamp of when the resource was permanently deleted. + DeletedAt *time.Time `json:"deletedAt,omitempty"` + + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` + + // EffectiveFrom The date and time when the plan becomes effective. When not specified, the plan is a draft. + EffectiveFrom *time.Time `json:"effectiveFrom,omitempty"` + + // EffectiveTo The date and time when the plan is no longer effective. When not specified, the plan is effective indefinitely. + EffectiveTo *time.Time `json:"effectiveTo,omitempty"` + + // Id A unique identifier for the resource. + Id string `json:"id"` + + // Key A semi-unique identifier for the resource. + Key string `json:"key"` + + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` + + // Name Human-readable name for the resource. Between 1 and 256 characters. + Name string `json:"name"` + + // Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. + // A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices. + Phases []PlanPhase `json:"phases"` + + // Status The status of the plan. + // Computed based on the effective start and end dates: + // - draft = no effectiveFrom + // - active = effectiveFrom <= now < effectiveTo + // - archived / inactive = effectiveTo <= now + // - scheduled = now < effectiveFrom < effectiveTo + Status PlanStatus `json:"status"` + + // UpdatedAt Timestamp of when the resource was last updated. + UpdatedAt time.Time `json:"updatedAt"` + + // Version Version of the plan. Incremented when the plan is updated. + Version int `json:"version"` +} + +// PlanCreate Resource create operation model. +type PlanCreate struct { + // Currency The currency code of the plan. + Currency CurrencyCode `json:"currency"` + + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` + + // Key A semi-unique identifier for the resource. + Key string `json:"key"` + + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` + + // Name Human-readable name for the resource. Between 1 and 256 characters. + Name string `json:"name"` + + // Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. + // A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices. + Phases []PlanPhase `json:"phases"` +} + +// PlanOrderBy Order by options for plans. +type PlanOrderBy string + +// PlanPaginatedResponse Paginated response +type PlanPaginatedResponse struct { + // Items The items in the current page. + Items []Plan `json:"items"` + + // Page The items in the current page. + Page int `json:"page"` + + // PageSize The items in the current page. + PageSize int `json:"pageSize"` + + // TotalCount The items in the current page. + TotalCount int `json:"totalCount"` +} + +// PlanPhase The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. +type PlanPhase struct { + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` + + // Discounts The discounts on the plan. + Discounts *[]Discount `json:"discounts,omitempty"` + + // Key A semi-unique identifier for the resource. + Key string `json:"key"` + + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` + + // Name Human-readable name for the resource. Between 1 and 256 characters. + Name string `json:"name"` + + // RateCards The rate cards of the plan. + RateCards []RateCard `json:"rateCards"` + + // StartAfter The time after which the plan starts compared to subscription start + StartAfter *string `json:"startAfter"` +} + +// PlanPhaseCreate Resource create operation model. +type PlanPhaseCreate struct { + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` -// PriceTier A price tier. -// At least one price component is required in each tier. -type PriceTier struct { - // FlatPrice The flat price component of the tier. - FlatPrice *FlatPrice `json:"flatPrice"` + // Discounts The discounts on the plan. + Discounts *[]Discount `json:"discounts,omitempty"` - // UnitPrice The unit price component of the tier. - UnitPrice *UnitPrice `json:"unitPrice"` + // Key A semi-unique identifier for the resource. + Key string `json:"key"` - // UpToAmount Up to and including to this quantity will be contained in the tier. - // If null, the tier is open-ended. - UpToAmount *float64 `json:"upToAmount"` + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` + + // Name Human-readable name for the resource. Between 1 and 256 characters. + Name string `json:"name"` + + // RateCards The rate cards of the plan. + RateCards []RateCard `json:"rateCards"` + + // StartAfter The time after which the plan starts compared to subscription start + StartAfter *string `json:"startAfter"` } -// ProfilePaginatedResponse Paginated response -type ProfilePaginatedResponse struct { +// PlanPhasePaginatedResponse Paginated response +type PlanPhasePaginatedResponse struct { // Items The items in the current page. - Items []BillingProfile `json:"items"` + Items []PlanPhase `json:"items"` // Page The items in the current page. Page int `json:"page"` @@ -3153,6 +3214,155 @@ type ProfilePaginatedResponse struct { TotalCount int `json:"totalCount"` } +// PlanPhaseUpdate Resource create or update operation model. +type PlanPhaseUpdate struct { + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` + + // Discounts The discounts on the plan. + Discounts *[]Discount `json:"discounts,omitempty"` + + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` + + // Name Human-readable name for the resource. Between 1 and 256 characters. + Name *string `json:"name,omitempty"` + + // RateCards The rate cards of the plan. + RateCards *[]RateCard `json:"rateCards,omitempty"` + + // StartAfter The time after which the plan starts compared to subscription start + StartAfter *string `json:"startAfter"` +} + +// PlanReference References an exact plan. +type PlanReference struct { + // Key The plan key. + Key string `json:"key"` + + // Version The plan version. + Version int `json:"version"` +} + +// PlanReplaceUpdate Resource update operation model. +type PlanReplaceUpdate struct { + // Description Optional description of the resource. Maximum 1024 characters. + Description *string `json:"description,omitempty"` + + // Metadata Additional metadata for the resource. + Metadata *Metadata `json:"metadata"` + + // Name Human-readable name for the resource. Between 1 and 256 characters. + Name string `json:"name"` + + // Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. + // A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices. + Phases []PlanPhase `json:"phases"` +} + +// PlanStatus The status of a plan. +type PlanStatus string + +// PlanSubscriptionChange Change subscription based on plan. +type PlanSubscriptionChange struct { + // ActiveFrom [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. + ActiveFrom time.Time `json:"activeFrom"` + + // Currency Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. + // Custom three-letter currency codes are also supported for convenience. + Currency CurrencyCode `json:"currency"` + + // Customizations Batch processing commands for customizing the susbcription. + // The key format is `/phases/{phaseKey}/items/{itemKey}`. + // + // Add operations insert a new member based on the creation input without altering the existing members. + // + // Remove operations remove the member from the document. + Customizations []PlanSubscriptionChange_Customizations_Item `json:"customizations"` + Plan struct { + // Key A key is a unique string that is used to identify a resource. + Key string `json:"key"` + Version int `json:"version"` + } `json:"plan"` +} + +// PlanSubscriptionChange_Customizations_Item defines model for PlanSubscriptionChange.customizations.Item. +type PlanSubscriptionChange_Customizations_Item struct { + union json.RawMessage +} + +// PlanSubscriptionCreate Create subscription based on plan. +type PlanSubscriptionCreate struct { + // ActiveFrom [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. + ActiveFrom time.Time `json:"activeFrom"` + + // Currency Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. + // Custom three-letter currency codes are also supported for convenience. + Currency CurrencyCode `json:"currency"` + + // CustomerId ULID (Universally Unique Lexicographically Sortable Identifier). + CustomerId string `json:"customerId"` + + // Customizations Batch processing commands for customizing the susbcription. + // The key format is `/phases/{phaseKey}/items/{itemKey}`. + // + // Add operations insert a new member based on the creation input without altering the existing members. + // + // Remove operations remove the member from the document. + Customizations []PlanSubscriptionCreate_Customizations_Item `json:"customizations"` + Plan struct { + // Key A key is a unique string that is used to identify a resource. + Key string `json:"key"` + Version int `json:"version"` + } `json:"plan"` +} + +// PlanSubscriptionCreate_Customizations_Item defines model for PlanSubscriptionCreate.customizations.Item. +type PlanSubscriptionCreate_Customizations_Item struct { + union json.RawMessage +} + +// PortalToken A consumer portal token. +// +// Validator doesn't obey required for readOnly properties +// See: https://github.com/stoplightio/spectral/issues/1274 +type PortalToken struct { + // AllowedMeterSlugs Optional, if defined only the specified meters will be allowed. + AllowedMeterSlugs *[]string `json:"allowedMeterSlugs,omitempty"` + + // CreatedAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. + CreatedAt *time.Time `json:"createdAt,omitempty"` + Expired *bool `json:"expired,omitempty"` + + // ExpiresAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC. + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + + // Id ULID (Universally Unique Lexicographically Sortable Identifier). + Id *string `json:"id,omitempty"` + Subject string `json:"subject"` + + // Token The token is only returned at creation. + Token *string `json:"token,omitempty"` +} + +// PricePaymentTerm The payment term of a flat price. +// One of: in_advance or in_arrears. +type PricePaymentTerm string + +// PriceTier A price tier. +// At least one price component is required in each tier. +type PriceTier struct { + // FlatPrice The flat price component of the tier. + FlatPrice *FlatPrice `json:"flatPrice"` + + // UnitPrice The unit price component of the tier. + UnitPrice *UnitPrice `json:"unitPrice"` + + // UpToAmount Up to and including to this quantity will be contained in the tier. + // If null, the tier is open-ended. + UpToAmount *float64 `json:"upToAmount"` +} + // RateCard A rate card defines the pricing and entitlement of a feature or service. type RateCard struct { union json.RawMessage @@ -3914,48 +4124,171 @@ type TieredPriceWithCommitments struct { // - In `graduated` tiering, pricing can change as the quantity grows. Mode TieredPriceMode `json:"mode"` - // Tiers The tiers of the tiered price. - // At least one price component is required in each tier. - Tiers []PriceTier `json:"tiers"` - Type TieredPriceWithCommitmentsType `json:"type"` + // Tiers The tiers of the tiered price. + // At least one price component is required in each tier. + Tiers []PriceTier `json:"tiers"` + Type TieredPriceWithCommitmentsType `json:"type"` +} + +// TieredPriceWithCommitmentsType defines model for TieredPriceWithCommitments.Type. +type TieredPriceWithCommitmentsType string + +// UnauthorizedProblemResponse A Problem Details object (RFC 7807). +// Additional properties specific to the problem type may be present. +type UnauthorizedProblemResponse = UnexpectedProblemResponse + +// UnexpectedProblemResponse A Problem Details object (RFC 7807). +// Additional properties specific to the problem type may be present. +type UnexpectedProblemResponse = models.StatusProblem + +// UnitPrice Unit price. +type UnitPrice struct { + // Amount The amount of the unit price. + Amount Numeric `json:"amount"` + Type UnitPriceType `json:"type"` +} + +// UnitPriceType defines model for UnitPrice.Type. +type UnitPriceType string + +// UnitPriceWithCommitments Unit price with spend commitments. +type UnitPriceWithCommitments struct { + // Amount The amount of the unit price. + Amount Numeric `json:"amount"` + + // MaximumAmount The customer is limited to spend at most the amount. + MaximumAmount *Numeric `json:"maximumAmount,omitempty"` + + // MinimumAmount The customer is committed to spend at least the amount. + MinimumAmount *Numeric `json:"minimumAmount,omitempty"` + Type UnitPriceWithCommitmentsType `json:"type"` +} + +// UnitPriceWithCommitmentsType defines model for UnitPriceWithCommitments.Type. +type UnitPriceWithCommitmentsType string + +// ValidationIssue ValidationIssue captures any validation issues related to the invoice. +// +// Issues with severity "critical" will prevent the invoice from being issued. +type ValidationIssue struct { + // Code Machine indentifiable code for the issue, if available. + Code *string `json:"code,omitempty"` + + // Component Component reporting the issue. + Component string `json:"component"` + + // CreatedAt Timestamp of when the resource was created. + CreatedAt time.Time `json:"createdAt"` + + // DeletedAt Timestamp of when the resource was permanently deleted. + DeletedAt *time.Time `json:"deletedAt,omitempty"` + + // Field The field that the issue is related to, if available in JSON path format. + Field *string `json:"field,omitempty"` + + // Id ID of the charge or discount. + Id string `json:"id"` + + // Message A human-readable description of the issue. + Message string `json:"message"` + + // Metadata Additional context for the issue. + Metadata *Metadata `json:"metadata,omitempty"` + + // Severity The severity of the issue. + Severity ValidationIssueSeverity `json:"severity"` + + // UpdatedAt Timestamp of when the resource was last updated. + UpdatedAt time.Time `json:"updatedAt"` +} + +// ValidationIssueSeverity ValidationIssueSeverity describes the severity of a validation issue. +// +// Issues with severity "critical" will prevent the invoice from being issued. +type ValidationIssueSeverity string + +// VoidInvoiceActionCreate InvoiceVoidAction describes how to handle the voided line items. +type VoidInvoiceActionCreate struct { + // Action VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding. + Action VoidInvoiceLineActionCreate `json:"action"` + + // Percentage How much of the total line items to be voided? (e.g. 100% means all charges are voided) + Percentage Percentage `json:"percentage"` +} + +// VoidInvoiceActionCreateItem InvoiceVoidAction describes how to handle the voided line items. +type VoidInvoiceActionCreateItem struct { + // Action VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding. + Action VoidInvoiceLineActionCreateItem `json:"action"` + + // Percentage How much of the total line items to be voided? (e.g. 100% means all charges are voided) + Percentage Percentage `json:"percentage"` +} + +// VoidInvoiceActionInput Request to void an invoice +type VoidInvoiceActionInput struct { + // Action The action to take on the voided line items. + Action VoidInvoiceActionCreate `json:"action"` + + // Overrides Per line item overrides for the action. + // + // If not specified, the `action` will be applied to all line items. + Overrides *[]VoidInvoiceActionLineOverride `json:"overrides"` + + // Reason The reason for voiding the invoice. + Reason string `json:"reason"` } -// TieredPriceWithCommitmentsType defines model for TieredPriceWithCommitments.Type. -type TieredPriceWithCommitmentsType string +// VoidInvoiceActionLineOverride VoidInvoiceLineOverride describes how to handle a specific line item in the invoice when voiding. +type VoidInvoiceActionLineOverride struct { + // Action The action to take on the line item. + Action VoidInvoiceActionCreateItem `json:"action"` -// UnauthorizedProblemResponse A Problem Details object (RFC 7807). -// Additional properties specific to the problem type may be present. -type UnauthorizedProblemResponse = UnexpectedProblemResponse + // LineId The line item ID to override. + LineId string `json:"lineId"` +} -// UnexpectedProblemResponse A Problem Details object (RFC 7807). -// Additional properties specific to the problem type may be present. -type UnexpectedProblemResponse = models.StatusProblem +// VoidInvoiceLineActionCreate VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding. +type VoidInvoiceLineActionCreate struct { + union json.RawMessage +} -// UnitPrice Unit price. -type UnitPrice struct { - // Amount The amount of the unit price. - Amount Numeric `json:"amount"` - Type UnitPriceType `json:"type"` +// VoidInvoiceLineActionCreateItem VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding. +type VoidInvoiceLineActionCreateItem struct { + union json.RawMessage } -// UnitPriceType defines model for UnitPrice.Type. -type UnitPriceType string +// VoidInvoiceLineDiscardAction VoidInvoiceLineDiscardAction describes how to handle the voidied line item in the invoice. +type VoidInvoiceLineDiscardAction struct { + Type VoidInvoiceLineDiscardActionType `json:"type"` +} -// UnitPriceWithCommitments Unit price with spend commitments. -type UnitPriceWithCommitments struct { - // Amount The amount of the unit price. - Amount Numeric `json:"amount"` +// VoidInvoiceLineDiscardActionType defines model for VoidInvoiceLineDiscardAction.Type. +type VoidInvoiceLineDiscardActionType string - // MaximumAmount The customer is limited to spend at most the amount. - MaximumAmount *Numeric `json:"maximumAmount,omitempty"` +// VoidInvoiceLinePendingActionCreate VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice. +type VoidInvoiceLinePendingActionCreate struct { + // NextInvoiceAt The time at which the line item should be invoiced again. + // + // If not provided, the line item will be re-invoiced now. + NextInvoiceAt *time.Time `json:"nextInvoiceAt,omitempty"` + Type VoidInvoiceLinePendingActionCreateType `json:"type"` +} - // MinimumAmount The customer is committed to spend at least the amount. - MinimumAmount *Numeric `json:"minimumAmount,omitempty"` - Type UnitPriceWithCommitmentsType `json:"type"` +// VoidInvoiceLinePendingActionCreateType defines model for VoidInvoiceLinePendingActionCreate.Type. +type VoidInvoiceLinePendingActionCreateType string + +// VoidInvoiceLinePendingActionCreateItem VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice. +type VoidInvoiceLinePendingActionCreateItem struct { + // NextInvoiceAt The time at which the line item should be invoiced again. + // + // If not provided, the line item will be re-invoiced now. + NextInvoiceAt *time.Time `json:"nextInvoiceAt,omitempty"` + Type VoidInvoiceLinePendingActionCreateItemType `json:"type"` } -// UnitPriceWithCommitmentsType defines model for UnitPriceWithCommitments.Type. -type UnitPriceWithCommitmentsType string +// VoidInvoiceLinePendingActionCreateItemType defines model for VoidInvoiceLinePendingActionCreateItem.Type. +type VoidInvoiceLinePendingActionCreateItemType string // WindowSize Aggregation window size. type WindowSize = models.WindowSize @@ -3972,20 +4305,17 @@ type WindowedBalanceHistory struct { WindowedHistory []BalanceHistoryWindow `json:"windowedHistory"` } -// BillingInvoiceListParamsExpand defines model for BillingInvoiceListParams.expand. -type BillingInvoiceListParamsExpand = []BillingInvoiceExpand +// BillingProfileCustomerOverrideOrderByOrderingOrder The order direction. +type BillingProfileCustomerOverrideOrderByOrderingOrder = SortOrder -// BillingInvoiceListParamsExtendedStatuses defines model for BillingInvoiceListParams.extendedStatuses. -type BillingInvoiceListParamsExtendedStatuses = []BillingInvoiceExtendedStatus +// BillingProfileCustomerOverrideOrderByOrderingOrderBy Order by options for customers. +type BillingProfileCustomerOverrideOrderByOrderingOrderBy = BillingProfileCustomerOverrideOrderBy -// BillingInvoiceListParamsIssuedAfter defines model for BillingInvoiceListParams.issuedAfter. -type BillingInvoiceListParamsIssuedAfter = time.Time +// BillingProfileOrderByOrderingOrder The order direction. +type BillingProfileOrderByOrderingOrder = SortOrder -// BillingInvoiceListParamsIssuedBefore defines model for BillingInvoiceListParams.issuedBefore. -type BillingInvoiceListParamsIssuedBefore = time.Time - -// BillingInvoiceListParamsStatuses defines model for BillingInvoiceListParams.statuses. -type BillingInvoiceListParamsStatuses = []BillingInvoiceStatus +// BillingProfileOrderByOrderingOrderBy BillingProfileOrderBy specifies the ordering options for profiles +type BillingProfileOrderByOrderingOrderBy = BillingProfileOrderBy // CustomerOrderByOrderingOrder The order direction. type CustomerOrderByOrderingOrder = SortOrder @@ -3993,12 +4323,6 @@ type CustomerOrderByOrderingOrder = SortOrder // CustomerOrderByOrderingOrderBy Order by options for customers. type CustomerOrderByOrderingOrderBy = CustomerOrderBy -// CustomerOverrideOrderByOrderingOrder The order direction. -type CustomerOverrideOrderByOrderingOrder = SortOrder - -// CustomerOverrideOrderByOrderingOrderBy Order by options for customers. -type CustomerOverrideOrderByOrderingOrderBy = BillingCustomerOverrideOrderBy - // EntitlementOrderByOrderingOrder The order direction. type EntitlementOrderByOrderingOrder = SortOrder @@ -4017,11 +4341,26 @@ type GrantOrderByOrderingOrder = SortOrder // GrantOrderByOrderingOrderBy Order by options for grants. type GrantOrderByOrderingOrderBy = GrantOrderBy +// InvoiceListParamsExpand defines model for InvoiceListParams.expand. +type InvoiceListParamsExpand = []InvoiceExpand + +// InvoiceListParamsExtendedStatuses defines model for InvoiceListParams.extendedStatuses. +type InvoiceListParamsExtendedStatuses = []string + +// InvoiceListParamsIssuedAfter defines model for InvoiceListParams.issuedAfter. +type InvoiceListParamsIssuedAfter = time.Time + +// InvoiceListParamsIssuedBefore defines model for InvoiceListParams.issuedBefore. +type InvoiceListParamsIssuedBefore = time.Time + +// InvoiceListParamsStatuses defines model for InvoiceListParams.statuses. +type InvoiceListParamsStatuses = []InvoiceStatus + // InvoiceOrderByOrderingOrder The order direction. type InvoiceOrderByOrderingOrder = SortOrder // InvoiceOrderByOrderingOrderBy InvoiceOrderBy specifies the ordering options for invoice listing. -type InvoiceOrderByOrderingOrderBy = BillingInvoiceOrderBy +type InvoiceOrderByOrderingOrderBy = InvoiceOrderBy // LimitOffsetLimit defines model for LimitOffset.limit. type LimitOffsetLimit = int @@ -4113,12 +4452,6 @@ type PlanOrderByOrderingOrder = SortOrder // PlanOrderByOrderingOrderBy Order by options for plans. type PlanOrderByOrderingOrderBy = PlanOrderBy -// ProfileOrderByOrderingOrder The order direction. -type ProfileOrderByOrderingOrder = SortOrder - -// ProfileOrderByOrderingOrderBy ProfileOrderBy specifies the ordering options for profiles -type ProfileOrderByOrderingOrderBy = BillingProfileOrderBy - // QueryCustomerListIncludeDeleted defines model for queryCustomerList.includeDeleted. type QueryCustomerListIncludeDeleted = bool @@ -4140,8 +4473,8 @@ type ListAppsParams struct { PageSize *PaginatedQueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` } -// BillingListCustomerOverridesParams defines parameters for BillingListCustomerOverrides. -type BillingListCustomerOverridesParams struct { +// ListBillingProfileCustomerOverridesParams defines parameters for ListBillingProfileCustomerOverrides. +type ListBillingProfileCustomerOverridesParams struct { BillingProfile *[]string `form:"billingProfile,omitempty" json:"billingProfile,omitempty"` // Page Start date-time in RFC 3339 format. @@ -4165,20 +4498,30 @@ type BillingListCustomerOverridesParams struct { Limit *LimitOffsetLimit `form:"limit,omitempty" json:"limit,omitempty"` // Order The order direction. - Order *CustomerOverrideOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"` + Order *BillingProfileCustomerOverrideOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"` // OrderBy The order by field. - OrderBy *CustomerOverrideOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` + OrderBy *BillingProfileCustomerOverrideOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` } -// BillingListInvoicesParams defines parameters for BillingListInvoices. -type BillingListInvoicesParams struct { - Customers *[]string `form:"customers,omitempty" json:"customers,omitempty"` - Statuses *BillingInvoiceListParamsStatuses `form:"statuses,omitempty" json:"statuses,omitempty"` - ExtendedStatuses *BillingInvoiceListParamsExtendedStatuses `form:"extendedStatuses,omitempty" json:"extendedStatuses,omitempty"` - IssuedAfter *BillingInvoiceListParamsIssuedAfter `form:"issuedAfter,omitempty" json:"issuedAfter,omitempty"` - IssuedBefore *BillingInvoiceListParamsIssuedBefore `form:"issuedBefore,omitempty" json:"issuedBefore,omitempty"` - Expand *BillingInvoiceListParamsExpand `form:"expand,omitempty" json:"expand,omitempty"` +// ListInvoicesParams defines parameters for ListInvoices. +type ListInvoicesParams struct { + Customers *[]string `form:"customers,omitempty" json:"customers,omitempty"` + + // Statuses Filter by the invoice status. + Statuses *InvoiceListParamsStatuses `form:"statuses,omitempty" json:"statuses,omitempty"` + + // ExtendedStatuses Filter by invoice extended statuses + ExtendedStatuses *InvoiceListParamsExtendedStatuses `form:"extendedStatuses,omitempty" json:"extendedStatuses,omitempty"` + + // IssuedAfter Filter by invoice creation time + IssuedAfter *InvoiceListParamsIssuedAfter `form:"issuedAfter,omitempty" json:"issuedAfter,omitempty"` + + // IssuedBefore Filter by invoice creation time + IssuedBefore *InvoiceListParamsIssuedBefore `form:"issuedBefore,omitempty" json:"issuedBefore,omitempty"` + + // Expand What parts of the list output to expand in listings + Expand *InvoiceListParamsExpand `form:"expand,omitempty" json:"expand,omitempty"` // Page Start date-time in RFC 3339 format. // @@ -4207,13 +4550,22 @@ type BillingListInvoicesParams struct { OrderBy *InvoiceOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` } -// BillingListInvoicesByCustomerParams defines parameters for BillingListInvoicesByCustomer. -type BillingListInvoicesByCustomerParams struct { - Statuses *BillingInvoiceListParamsStatuses `form:"statuses,omitempty" json:"statuses,omitempty"` - ExtendedStatuses *BillingInvoiceListParamsExtendedStatuses `form:"extendedStatuses,omitempty" json:"extendedStatuses,omitempty"` - IssuedAfter *BillingInvoiceListParamsIssuedAfter `form:"issuedAfter,omitempty" json:"issuedAfter,omitempty"` - IssuedBefore *BillingInvoiceListParamsIssuedBefore `form:"issuedBefore,omitempty" json:"issuedBefore,omitempty"` - Expand *BillingInvoiceListParamsExpand `form:"expand,omitempty" json:"expand,omitempty"` +// ListInvoicesByCustomerParams defines parameters for ListInvoicesByCustomer. +type ListInvoicesByCustomerParams struct { + // Statuses Filter by the invoice status. + Statuses *InvoiceListParamsStatuses `form:"statuses,omitempty" json:"statuses,omitempty"` + + // ExtendedStatuses Filter by invoice extended statuses + ExtendedStatuses *InvoiceListParamsExtendedStatuses `form:"extendedStatuses,omitempty" json:"extendedStatuses,omitempty"` + + // IssuedAfter Filter by invoice creation time + IssuedAfter *InvoiceListParamsIssuedAfter `form:"issuedAfter,omitempty" json:"issuedAfter,omitempty"` + + // IssuedBefore Filter by invoice creation time + IssuedBefore *InvoiceListParamsIssuedBefore `form:"issuedBefore,omitempty" json:"issuedBefore,omitempty"` + + // Expand What parts of the list output to expand in listings + Expand *InvoiceListParamsExpand `form:"expand,omitempty" json:"expand,omitempty"` // Page Start date-time in RFC 3339 format. // @@ -4242,13 +4594,17 @@ type BillingListInvoicesByCustomerParams struct { OrderBy *InvoiceOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` } -// BillingGetInvoiceByCustomerInvoiceIdParams defines parameters for BillingGetInvoiceByCustomerInvoiceId. -type BillingGetInvoiceByCustomerInvoiceIdParams struct { - Expand []BillingInvoiceExpand `form:"expand" json:"expand"` +// GetInvoiceParams defines parameters for GetInvoice. +type GetInvoiceParams struct { + Expand []InvoiceExpand `form:"expand" json:"expand"` + IncludeDeletedLines bool `form:"includeDeletedLines" json:"includeDeletedLines"` } -// BillingListProfilesParams defines parameters for BillingListProfiles. -type BillingListProfilesParams struct { +// CreateInvoiceLineByCustomerJSONBody defines parameters for CreateInvoiceLineByCustomer. +type CreateInvoiceLineByCustomerJSONBody = []InvoiceLineCreate + +// ListBillingProfilesParams defines parameters for ListBillingProfiles. +type ListBillingProfilesParams struct { IncludeArchived *bool `form:"includeArchived,omitempty" json:"includeArchived,omitempty"` Expand *[]BillingProfileExpand `form:"expand,omitempty" json:"expand,omitempty"` @@ -4273,14 +4629,14 @@ type BillingListProfilesParams struct { Limit *LimitOffsetLimit `form:"limit,omitempty" json:"limit,omitempty"` // Order The order direction. - Order *ProfileOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"` + Order *BillingProfileOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"` // OrderBy The order by field. - OrderBy *ProfileOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` + OrderBy *BillingProfileOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` } -// BillingGetProfileParams defines parameters for BillingGetProfile. -type BillingGetProfileParams struct { +// GetBillingProfileParams defines parameters for GetBillingProfile. +type GetBillingProfileParams struct { Expand *[]BillingProfileExpand `form:"expand,omitempty" json:"expand,omitempty"` } @@ -4809,505 +5165,151 @@ type GetSubscriptionParams struct { At *time.Time `form:"at,omitempty" json:"at,omitempty"` } -// GetSubscriptionParamsExpand defines parameters for GetSubscription. -type GetSubscriptionParamsExpand bool - -// EditSubscriptionJSONBody defines parameters for EditSubscription. -type EditSubscriptionJSONBody = []EditSubscriptionJSONBody_Item - -// EditSubscriptionJSONBody_Item defines parameters for EditSubscription. -type EditSubscriptionJSONBody_Item struct { - union json.RawMessage -} - -// CancelSubscriptionJSONBody defines parameters for CancelSubscription. -type CancelSubscriptionJSONBody struct { - // EffectiveDate If not provided the subscription is canceled immediately. - EffectiveDate *time.Time `json:"effectiveDate,omitempty"` -} - -// MigrateSubscriptionJSONBody defines parameters for MigrateSubscription. -type MigrateSubscriptionJSONBody struct { - TargetVersion int `json:"targetVersion"` -} - -// AppStripeWebhookJSONRequestBody defines body for AppStripeWebhook for application/json ContentType. -type AppStripeWebhookJSONRequestBody = StripeWebhookEvent - -// BillingUpsertCustomerOverrideJSONRequestBody defines body for BillingUpsertCustomerOverride for application/json ContentType. -type BillingUpsertCustomerOverrideJSONRequestBody = BillingCustomerWorkflowOverride - -// BillingCreateInvoiceJSONRequestBody defines body for BillingCreateInvoice for application/json ContentType. -type BillingCreateInvoiceJSONRequestBody = BillingInvoiceCreate - -// BillingUpdateInvoiceLineJSONRequestBody defines body for BillingUpdateInvoiceLine for application/json ContentType. -type BillingUpdateInvoiceLineJSONRequestBody = BillingInvoiceLineCreate - -// BillingVoidInvoiceJSONRequestBody defines body for BillingVoidInvoice for application/json ContentType. -type BillingVoidInvoiceJSONRequestBody = BillingVoidInvoiceInput - -// BillingCreateLineByCustomerJSONRequestBody defines body for BillingCreateLineByCustomer for application/json ContentType. -type BillingCreateLineByCustomerJSONRequestBody = LinesUpdate - -// BillingCreateProfileJSONRequestBody defines body for BillingCreateProfile for application/json ContentType. -type BillingCreateProfileJSONRequestBody = BillingProfileCreateInput - -// BillingUpdateProfileJSONRequestBody defines body for BillingUpdateProfile for application/json ContentType. -type BillingUpdateProfileJSONRequestBody = BillingProfile - -// CreateCustomerJSONRequestBody defines body for CreateCustomer for application/json ContentType. -type CreateCustomerJSONRequestBody = CustomerCreate - -// UpdateCustomerJSONRequestBody defines body for UpdateCustomer for application/json ContentType. -type UpdateCustomerJSONRequestBody = CustomerReplaceUpdate - -// IngestEventsApplicationCloudeventsPlusJSONRequestBody defines body for IngestEvents for application/cloudevents+json ContentType. -type IngestEventsApplicationCloudeventsPlusJSONRequestBody = Event - -// IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody defines body for IngestEvents for application/cloudevents-batch+json ContentType. -type IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody = IngestEventsApplicationCloudeventsBatchPlusJSONBody - -// IngestEventsJSONRequestBody defines body for IngestEvents for application/json ContentType. -type IngestEventsJSONRequestBody = IngestEventsBody - -// CreateFeatureJSONRequestBody defines body for CreateFeature for application/json ContentType. -type CreateFeatureJSONRequestBody = FeatureCreateInputs - -// CreateStripeCheckoutSessionJSONRequestBody defines body for CreateStripeCheckoutSession for application/json ContentType. -type CreateStripeCheckoutSessionJSONRequestBody = CreateStripeCheckoutSessionRequest - -// MarketplaceAppAPIKeyInstallJSONRequestBody defines body for MarketplaceAppAPIKeyInstall for application/json ContentType. -type MarketplaceAppAPIKeyInstallJSONRequestBody MarketplaceAppAPIKeyInstallJSONBody - -// CreateNotificationChannelJSONRequestBody defines body for CreateNotificationChannel for application/json ContentType. -type CreateNotificationChannelJSONRequestBody = NotificationChannelCreateRequest - -// UpdateNotificationChannelJSONRequestBody defines body for UpdateNotificationChannel for application/json ContentType. -type UpdateNotificationChannelJSONRequestBody = NotificationChannelCreateRequest - -// CreateNotificationRuleJSONRequestBody defines body for CreateNotificationRule for application/json ContentType. -type CreateNotificationRuleJSONRequestBody = NotificationRuleCreateRequest - -// UpdateNotificationRuleJSONRequestBody defines body for UpdateNotificationRule for application/json ContentType. -type UpdateNotificationRuleJSONRequestBody = NotificationRuleCreateRequest - -// ReceiveSvixOperationalEventJSONRequestBody defines body for ReceiveSvixOperationalEvent for application/json ContentType. -type ReceiveSvixOperationalEventJSONRequestBody = SvixOperationalWebhookRequest - -// CreatePlanJSONRequestBody defines body for CreatePlan for application/json ContentType. -type CreatePlanJSONRequestBody = PlanCreate - -// UpdatePlanJSONRequestBody defines body for UpdatePlan for application/json ContentType. -type UpdatePlanJSONRequestBody = PlanReplaceUpdate - -// CreatePlanPhaseJSONRequestBody defines body for CreatePlanPhase for application/json ContentType. -type CreatePlanPhaseJSONRequestBody = PlanPhaseCreate - -// UpdatePlanPhaseJSONRequestBody defines body for UpdatePlanPhase for application/json ContentType. -type UpdatePlanPhaseJSONRequestBody = PlanPhaseUpdate - -// CreatePortalTokenJSONRequestBody defines body for CreatePortalToken for application/json ContentType. -type CreatePortalTokenJSONRequestBody = PortalToken - -// CreateEntitlementJSONRequestBody defines body for CreateEntitlement for application/json ContentType. -type CreateEntitlementJSONRequestBody = EntitlementCreateInputs - -// CreateGrantJSONRequestBody defines body for CreateGrant for application/json ContentType. -type CreateGrantJSONRequestBody = EntitlementGrantCreateInput - -// OverrideEntitlementJSONRequestBody defines body for OverrideEntitlement for application/json ContentType. -type OverrideEntitlementJSONRequestBody = EntitlementCreateInputs - -// ResetEntitlementUsageJSONRequestBody defines body for ResetEntitlementUsage for application/json ContentType. -type ResetEntitlementUsageJSONRequestBody = ResetEntitlementUsageInput - -// CreateSubscriptionJSONRequestBody defines body for CreateSubscription for application/json ContentType. -type CreateSubscriptionJSONRequestBody = SubscriptionCreate - -// EditSubscriptionJSONRequestBody defines body for EditSubscription for application/json ContentType. -type EditSubscriptionJSONRequestBody = EditSubscriptionJSONBody - -// CancelSubscriptionJSONRequestBody defines body for CancelSubscription for application/json ContentType. -type CancelSubscriptionJSONRequestBody CancelSubscriptionJSONBody - -// ChangeSubscriptionJSONRequestBody defines body for ChangeSubscription for application/json ContentType. -type ChangeSubscriptionJSONRequestBody = SubscriptionChange - -// MigrateSubscriptionJSONRequestBody defines body for MigrateSubscription for application/json ContentType. -type MigrateSubscriptionJSONRequestBody MigrateSubscriptionJSONBody - -// AsStripeApp returns the union data inside the App as a StripeApp -func (t App) AsStripeApp() (StripeApp, error) { - var body StripeApp - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromStripeApp overwrites any union data inside the App as the provided StripeApp -func (t *App) FromStripeApp(v StripeApp) error { - v.Type = "stripe" - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeStripeApp performs a merge with any union data inside the App, using the provided StripeApp -func (t *App) MergeStripeApp(v StripeApp) error { - v.Type = "stripe" - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsSandboxApp returns the union data inside the App as a SandboxApp -func (t App) AsSandboxApp() (SandboxApp, error) { - var body SandboxApp - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromSandboxApp overwrites any union data inside the App as the provided SandboxApp -func (t *App) FromSandboxApp(v SandboxApp) error { - v.Type = "sandbox" - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeSandboxApp performs a merge with any union data inside the App, using the provided SandboxApp -func (t *App) MergeSandboxApp(v SandboxApp) error { - v.Type = "sandbox" - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t App) Discriminator() (string, error) { - var discriminator struct { - Discriminator string `json:"type"` - } - err := json.Unmarshal(t.union, &discriminator) - return discriminator.Discriminator, err -} - -func (t App) ValueByDiscriminator() (interface{}, error) { - discriminator, err := t.Discriminator() - if err != nil { - return nil, err - } - switch discriminator { - case "sandbox": - return t.AsSandboxApp() - case "stripe": - return t.AsStripeApp() - default: - return nil, errors.New("unknown discriminator value: " + discriminator) - } -} - -func (t App) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} +// GetSubscriptionParamsExpand defines parameters for GetSubscription. +type GetSubscriptionParamsExpand bool -func (t *App) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err +// EditSubscriptionJSONBody defines parameters for EditSubscription. +type EditSubscriptionJSONBody = []EditSubscriptionJSONBody_Item + +// EditSubscriptionJSONBody_Item defines parameters for EditSubscription. +type EditSubscriptionJSONBody_Item struct { + union json.RawMessage } -// AsBillingUsageBasedLine returns the union data inside the BillingInvoiceLine as a BillingUsageBasedLine -func (t BillingInvoiceLine) AsBillingUsageBasedLine() (BillingUsageBasedLine, error) { - var body BillingUsageBasedLine - err := json.Unmarshal(t.union, &body) - return body, err +// CancelSubscriptionJSONBody defines parameters for CancelSubscription. +type CancelSubscriptionJSONBody struct { + // EffectiveDate If not provided the subscription is canceled immediately. + EffectiveDate *time.Time `json:"effectiveDate,omitempty"` } -// FromBillingUsageBasedLine overwrites any union data inside the BillingInvoiceLine as the provided BillingUsageBasedLine -func (t *BillingInvoiceLine) FromBillingUsageBasedLine(v BillingUsageBasedLine) error { - v.Type = "usage_based" - b, err := json.Marshal(v) - t.union = b - return err +// MigrateSubscriptionJSONBody defines parameters for MigrateSubscription. +type MigrateSubscriptionJSONBody struct { + TargetVersion int `json:"targetVersion"` } -// MergeBillingUsageBasedLine performs a merge with any union data inside the BillingInvoiceLine, using the provided BillingUsageBasedLine -func (t *BillingInvoiceLine) MergeBillingUsageBasedLine(v BillingUsageBasedLine) error { - v.Type = "usage_based" - b, err := json.Marshal(v) - if err != nil { - return err - } +// AppStripeWebhookJSONRequestBody defines body for AppStripeWebhook for application/json ContentType. +type AppStripeWebhookJSONRequestBody = StripeWebhookEvent - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} +// UpsertBillingProfileCustomerOverrideJSONRequestBody defines body for UpsertBillingProfileCustomerOverride for application/json ContentType. +type UpsertBillingProfileCustomerOverrideJSONRequestBody = BillingProfileCustomerOverrideCreate -// AsBillingFlatFeeLine returns the union data inside the BillingInvoiceLine as a BillingFlatFeeLine -func (t BillingInvoiceLine) AsBillingFlatFeeLine() (BillingFlatFeeLine, error) { - var body BillingFlatFeeLine - err := json.Unmarshal(t.union, &body) - return body, err -} +// InvoicePendingLinesActionJSONRequestBody defines body for InvoicePendingLinesAction for application/json ContentType. +type InvoicePendingLinesActionJSONRequestBody = InvoicePendingLinesActionInput -// FromBillingFlatFeeLine overwrites any union data inside the BillingInvoiceLine as the provided BillingFlatFeeLine -func (t *BillingInvoiceLine) FromBillingFlatFeeLine(v BillingFlatFeeLine) error { - v.Type = "flat_fee" - b, err := json.Marshal(v) - t.union = b - return err -} +// UpdateInvoiceLineJSONRequestBody defines body for UpdateInvoiceLine for application/json ContentType. +type UpdateInvoiceLineJSONRequestBody = InvoiceLineReplaceUpdate -// MergeBillingFlatFeeLine performs a merge with any union data inside the BillingInvoiceLine, using the provided BillingFlatFeeLine -func (t *BillingInvoiceLine) MergeBillingFlatFeeLine(v BillingFlatFeeLine) error { - v.Type = "flat_fee" - b, err := json.Marshal(v) - if err != nil { - return err - } +// VoidInvoiceActionJSONRequestBody defines body for VoidInvoiceAction for application/json ContentType. +type VoidInvoiceActionJSONRequestBody = VoidInvoiceActionInput - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} +// CreateInvoiceLineByCustomerJSONRequestBody defines body for CreateInvoiceLineByCustomer for application/json ContentType. +type CreateInvoiceLineByCustomerJSONRequestBody = CreateInvoiceLineByCustomerJSONBody -func (t BillingInvoiceLine) Discriminator() (string, error) { - var discriminator struct { - Discriminator string `json:"type"` - } - err := json.Unmarshal(t.union, &discriminator) - return discriminator.Discriminator, err -} +// CreateBillingProfileJSONRequestBody defines body for CreateBillingProfile for application/json ContentType. +type CreateBillingProfileJSONRequestBody = BillingProfileCreate -func (t BillingInvoiceLine) ValueByDiscriminator() (interface{}, error) { - discriminator, err := t.Discriminator() - if err != nil { - return nil, err - } - switch discriminator { - case "flat_fee": - return t.AsBillingFlatFeeLine() - case "usage_based": - return t.AsBillingUsageBasedLine() - default: - return nil, errors.New("unknown discriminator value: " + discriminator) - } -} +// UpdateBillingProfileJSONRequestBody defines body for UpdateBillingProfile for application/json ContentType. +type UpdateBillingProfileJSONRequestBody = BillingProfileReplaceUpdateWithWorkflow -func (t BillingInvoiceLine) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} +// CreateCustomerJSONRequestBody defines body for CreateCustomer for application/json ContentType. +type CreateCustomerJSONRequestBody = CustomerCreate -func (t *BillingInvoiceLine) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} +// UpdateCustomerJSONRequestBody defines body for UpdateCustomer for application/json ContentType. +type UpdateCustomerJSONRequestBody = CustomerReplaceUpdate -// AsBillingUsageBasedLineCreate returns the union data inside the BillingInvoiceLineCreate as a BillingUsageBasedLineCreate -func (t BillingInvoiceLineCreate) AsBillingUsageBasedLineCreate() (BillingUsageBasedLineCreate, error) { - var body BillingUsageBasedLineCreate - err := json.Unmarshal(t.union, &body) - return body, err -} +// IngestEventsApplicationCloudeventsPlusJSONRequestBody defines body for IngestEvents for application/cloudevents+json ContentType. +type IngestEventsApplicationCloudeventsPlusJSONRequestBody = Event -// FromBillingUsageBasedLineCreate overwrites any union data inside the BillingInvoiceLineCreate as the provided BillingUsageBasedLineCreate -func (t *BillingInvoiceLineCreate) FromBillingUsageBasedLineCreate(v BillingUsageBasedLineCreate) error { - v.Type = "usage_based" - b, err := json.Marshal(v) - t.union = b - return err -} +// IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody defines body for IngestEvents for application/cloudevents-batch+json ContentType. +type IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody = IngestEventsApplicationCloudeventsBatchPlusJSONBody -// MergeBillingUsageBasedLineCreate performs a merge with any union data inside the BillingInvoiceLineCreate, using the provided BillingUsageBasedLineCreate -func (t *BillingInvoiceLineCreate) MergeBillingUsageBasedLineCreate(v BillingUsageBasedLineCreate) error { - v.Type = "usage_based" - b, err := json.Marshal(v) - if err != nil { - return err - } +// IngestEventsJSONRequestBody defines body for IngestEvents for application/json ContentType. +type IngestEventsJSONRequestBody = IngestEventsBody - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} +// CreateFeatureJSONRequestBody defines body for CreateFeature for application/json ContentType. +type CreateFeatureJSONRequestBody = FeatureCreateInputs -// AsBillingFlatFeeLineCreate returns the union data inside the BillingInvoiceLineCreate as a BillingFlatFeeLineCreate -func (t BillingInvoiceLineCreate) AsBillingFlatFeeLineCreate() (BillingFlatFeeLineCreate, error) { - var body BillingFlatFeeLineCreate - err := json.Unmarshal(t.union, &body) - return body, err -} +// CreateStripeCheckoutSessionJSONRequestBody defines body for CreateStripeCheckoutSession for application/json ContentType. +type CreateStripeCheckoutSessionJSONRequestBody = CreateStripeCheckoutSessionRequest -// FromBillingFlatFeeLineCreate overwrites any union data inside the BillingInvoiceLineCreate as the provided BillingFlatFeeLineCreate -func (t *BillingInvoiceLineCreate) FromBillingFlatFeeLineCreate(v BillingFlatFeeLineCreate) error { - v.Type = "flat_fee" - b, err := json.Marshal(v) - t.union = b - return err -} +// MarketplaceAppAPIKeyInstallJSONRequestBody defines body for MarketplaceAppAPIKeyInstall for application/json ContentType. +type MarketplaceAppAPIKeyInstallJSONRequestBody MarketplaceAppAPIKeyInstallJSONBody -// MergeBillingFlatFeeLineCreate performs a merge with any union data inside the BillingInvoiceLineCreate, using the provided BillingFlatFeeLineCreate -func (t *BillingInvoiceLineCreate) MergeBillingFlatFeeLineCreate(v BillingFlatFeeLineCreate) error { - v.Type = "flat_fee" - b, err := json.Marshal(v) - if err != nil { - return err - } +// CreateNotificationChannelJSONRequestBody defines body for CreateNotificationChannel for application/json ContentType. +type CreateNotificationChannelJSONRequestBody = NotificationChannelCreateRequest - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} +// UpdateNotificationChannelJSONRequestBody defines body for UpdateNotificationChannel for application/json ContentType. +type UpdateNotificationChannelJSONRequestBody = NotificationChannelCreateRequest -func (t BillingInvoiceLineCreate) Discriminator() (string, error) { - var discriminator struct { - Discriminator string `json:"type"` - } - err := json.Unmarshal(t.union, &discriminator) - return discriminator.Discriminator, err -} +// CreateNotificationRuleJSONRequestBody defines body for CreateNotificationRule for application/json ContentType. +type CreateNotificationRuleJSONRequestBody = NotificationRuleCreateRequest -func (t BillingInvoiceLineCreate) ValueByDiscriminator() (interface{}, error) { - discriminator, err := t.Discriminator() - if err != nil { - return nil, err - } - switch discriminator { - case "flat_fee": - return t.AsBillingFlatFeeLineCreate() - case "usage_based": - return t.AsBillingUsageBasedLineCreate() - default: - return nil, errors.New("unknown discriminator value: " + discriminator) - } -} +// UpdateNotificationRuleJSONRequestBody defines body for UpdateNotificationRule for application/json ContentType. +type UpdateNotificationRuleJSONRequestBody = NotificationRuleCreateRequest -func (t BillingInvoiceLineCreate) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} +// ReceiveSvixOperationalEventJSONRequestBody defines body for ReceiveSvixOperationalEvent for application/json ContentType. +type ReceiveSvixOperationalEventJSONRequestBody = SvixOperationalWebhookRequest -func (t *BillingInvoiceLineCreate) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} +// CreatePlanJSONRequestBody defines body for CreatePlan for application/json ContentType. +type CreatePlanJSONRequestBody = PlanCreate -// AsBillingUsageBasedLineCreateItem returns the union data inside the BillingInvoiceLineCreateItem as a BillingUsageBasedLineCreateItem -func (t BillingInvoiceLineCreateItem) AsBillingUsageBasedLineCreateItem() (BillingUsageBasedLineCreateItem, error) { - var body BillingUsageBasedLineCreateItem - err := json.Unmarshal(t.union, &body) - return body, err -} +// UpdatePlanJSONRequestBody defines body for UpdatePlan for application/json ContentType. +type UpdatePlanJSONRequestBody = PlanReplaceUpdate -// FromBillingUsageBasedLineCreateItem overwrites any union data inside the BillingInvoiceLineCreateItem as the provided BillingUsageBasedLineCreateItem -func (t *BillingInvoiceLineCreateItem) FromBillingUsageBasedLineCreateItem(v BillingUsageBasedLineCreateItem) error { - v.Type = "usage_based" - b, err := json.Marshal(v) - t.union = b - return err -} +// CreatePlanPhaseJSONRequestBody defines body for CreatePlanPhase for application/json ContentType. +type CreatePlanPhaseJSONRequestBody = PlanPhaseCreate -// MergeBillingUsageBasedLineCreateItem performs a merge with any union data inside the BillingInvoiceLineCreateItem, using the provided BillingUsageBasedLineCreateItem -func (t *BillingInvoiceLineCreateItem) MergeBillingUsageBasedLineCreateItem(v BillingUsageBasedLineCreateItem) error { - v.Type = "usage_based" - b, err := json.Marshal(v) - if err != nil { - return err - } +// UpdatePlanPhaseJSONRequestBody defines body for UpdatePlanPhase for application/json ContentType. +type UpdatePlanPhaseJSONRequestBody = PlanPhaseUpdate - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} +// CreatePortalTokenJSONRequestBody defines body for CreatePortalToken for application/json ContentType. +type CreatePortalTokenJSONRequestBody = PortalToken -// AsBillingFlatFeeLineCreateItem returns the union data inside the BillingInvoiceLineCreateItem as a BillingFlatFeeLineCreateItem -func (t BillingInvoiceLineCreateItem) AsBillingFlatFeeLineCreateItem() (BillingFlatFeeLineCreateItem, error) { - var body BillingFlatFeeLineCreateItem - err := json.Unmarshal(t.union, &body) - return body, err -} +// CreateEntitlementJSONRequestBody defines body for CreateEntitlement for application/json ContentType. +type CreateEntitlementJSONRequestBody = EntitlementCreateInputs -// FromBillingFlatFeeLineCreateItem overwrites any union data inside the BillingInvoiceLineCreateItem as the provided BillingFlatFeeLineCreateItem -func (t *BillingInvoiceLineCreateItem) FromBillingFlatFeeLineCreateItem(v BillingFlatFeeLineCreateItem) error { - v.Type = "flat_fee" - b, err := json.Marshal(v) - t.union = b - return err -} +// CreateGrantJSONRequestBody defines body for CreateGrant for application/json ContentType. +type CreateGrantJSONRequestBody = EntitlementGrantCreateInput -// MergeBillingFlatFeeLineCreateItem performs a merge with any union data inside the BillingInvoiceLineCreateItem, using the provided BillingFlatFeeLineCreateItem -func (t *BillingInvoiceLineCreateItem) MergeBillingFlatFeeLineCreateItem(v BillingFlatFeeLineCreateItem) error { - v.Type = "flat_fee" - b, err := json.Marshal(v) - if err != nil { - return err - } +// OverrideEntitlementJSONRequestBody defines body for OverrideEntitlement for application/json ContentType. +type OverrideEntitlementJSONRequestBody = EntitlementCreateInputs - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} +// ResetEntitlementUsageJSONRequestBody defines body for ResetEntitlementUsage for application/json ContentType. +type ResetEntitlementUsageJSONRequestBody = ResetEntitlementUsageInput -func (t BillingInvoiceLineCreateItem) Discriminator() (string, error) { - var discriminator struct { - Discriminator string `json:"type"` - } - err := json.Unmarshal(t.union, &discriminator) - return discriminator.Discriminator, err -} +// CreateSubscriptionJSONRequestBody defines body for CreateSubscription for application/json ContentType. +type CreateSubscriptionJSONRequestBody = SubscriptionCreate -func (t BillingInvoiceLineCreateItem) ValueByDiscriminator() (interface{}, error) { - discriminator, err := t.Discriminator() - if err != nil { - return nil, err - } - switch discriminator { - case "flat_fee": - return t.AsBillingFlatFeeLineCreateItem() - case "usage_based": - return t.AsBillingUsageBasedLineCreateItem() - default: - return nil, errors.New("unknown discriminator value: " + discriminator) - } -} +// EditSubscriptionJSONRequestBody defines body for EditSubscription for application/json ContentType. +type EditSubscriptionJSONRequestBody = EditSubscriptionJSONBody -func (t BillingInvoiceLineCreateItem) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} +// CancelSubscriptionJSONRequestBody defines body for CancelSubscription for application/json ContentType. +type CancelSubscriptionJSONRequestBody CancelSubscriptionJSONBody -func (t *BillingInvoiceLineCreateItem) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} +// ChangeSubscriptionJSONRequestBody defines body for ChangeSubscription for application/json ContentType. +type ChangeSubscriptionJSONRequestBody = SubscriptionChange + +// MigrateSubscriptionJSONRequestBody defines body for MigrateSubscription for application/json ContentType. +type MigrateSubscriptionJSONRequestBody MigrateSubscriptionJSONBody -// AsBillingPaymentTermInstant returns the union data inside the BillingPaymentTerms as a BillingPaymentTermInstant -func (t BillingPaymentTerms) AsBillingPaymentTermInstant() (BillingPaymentTermInstant, error) { - var body BillingPaymentTermInstant +// AsStripeApp returns the union data inside the App as a StripeApp +func (t App) AsStripeApp() (StripeApp, error) { + var body StripeApp err := json.Unmarshal(t.union, &body) return body, err } -// FromBillingPaymentTermInstant overwrites any union data inside the BillingPaymentTerms as the provided BillingPaymentTermInstant -func (t *BillingPaymentTerms) FromBillingPaymentTermInstant(v BillingPaymentTermInstant) error { +// FromStripeApp overwrites any union data inside the App as the provided StripeApp +func (t *App) FromStripeApp(v StripeApp) error { + v.Type = "stripe" b, err := json.Marshal(v) t.union = b return err } -// MergeBillingPaymentTermInstant performs a merge with any union data inside the BillingPaymentTerms, using the provided BillingPaymentTermInstant -func (t *BillingPaymentTerms) MergeBillingPaymentTermInstant(v BillingPaymentTermInstant) error { +// MergeStripeApp performs a merge with any union data inside the App, using the provided StripeApp +func (t *App) MergeStripeApp(v StripeApp) error { + v.Type = "stripe" b, err := json.Marshal(v) if err != nil { return err @@ -5318,22 +5320,24 @@ func (t *BillingPaymentTerms) MergeBillingPaymentTermInstant(v BillingPaymentTer return err } -// AsBillingPaymentTermDueDate returns the union data inside the BillingPaymentTerms as a BillingPaymentTermDueDate -func (t BillingPaymentTerms) AsBillingPaymentTermDueDate() (BillingPaymentTermDueDate, error) { - var body BillingPaymentTermDueDate +// AsSandboxApp returns the union data inside the App as a SandboxApp +func (t App) AsSandboxApp() (SandboxApp, error) { + var body SandboxApp err := json.Unmarshal(t.union, &body) return body, err } -// FromBillingPaymentTermDueDate overwrites any union data inside the BillingPaymentTerms as the provided BillingPaymentTermDueDate -func (t *BillingPaymentTerms) FromBillingPaymentTermDueDate(v BillingPaymentTermDueDate) error { +// FromSandboxApp overwrites any union data inside the App as the provided SandboxApp +func (t *App) FromSandboxApp(v SandboxApp) error { + v.Type = "sandbox" b, err := json.Marshal(v) t.union = b return err } -// MergeBillingPaymentTermDueDate performs a merge with any union data inside the BillingPaymentTerms, using the provided BillingPaymentTermDueDate -func (t *BillingPaymentTerms) MergeBillingPaymentTermDueDate(v BillingPaymentTermDueDate) error { +// MergeSandboxApp performs a merge with any union data inside the App, using the provided SandboxApp +func (t *App) MergeSandboxApp(v SandboxApp) error { + v.Type = "sandbox" b, err := json.Marshal(v) if err != nil { return err @@ -5344,12 +5348,35 @@ func (t *BillingPaymentTerms) MergeBillingPaymentTermDueDate(v BillingPaymentTer return err } -func (t BillingPaymentTerms) MarshalJSON() ([]byte, error) { +func (t App) Discriminator() (string, error) { + var discriminator struct { + Discriminator string `json:"type"` + } + err := json.Unmarshal(t.union, &discriminator) + return discriminator.Discriminator, err +} + +func (t App) ValueByDiscriminator() (interface{}, error) { + discriminator, err := t.Discriminator() + if err != nil { + return nil, err + } + switch discriminator { + case "sandbox": + return t.AsSandboxApp() + case "stripe": + return t.AsStripeApp() + default: + return nil, errors.New("unknown discriminator value: " + discriminator) + } +} + +func (t App) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *BillingPaymentTerms) UnmarshalJSON(b []byte) error { +func (t *App) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } @@ -5625,24 +5652,266 @@ func (t *EntitlementCreateInputs) MergeEntitlementMeteredCreateInputs(v Entitlem return err } -// AsEntitlementStaticCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementStaticCreateInputs -func (t EntitlementCreateInputs) AsEntitlementStaticCreateInputs() (EntitlementStaticCreateInputs, error) { - var body EntitlementStaticCreateInputs +// AsEntitlementStaticCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementStaticCreateInputs +func (t EntitlementCreateInputs) AsEntitlementStaticCreateInputs() (EntitlementStaticCreateInputs, error) { + var body EntitlementStaticCreateInputs + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromEntitlementStaticCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementStaticCreateInputs +func (t *EntitlementCreateInputs) FromEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error { + v.Type = "static" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeEntitlementStaticCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementStaticCreateInputs +func (t *EntitlementCreateInputs) MergeEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error { + v.Type = "static" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsEntitlementBooleanCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementBooleanCreateInputs +func (t EntitlementCreateInputs) AsEntitlementBooleanCreateInputs() (EntitlementBooleanCreateInputs, error) { + var body EntitlementBooleanCreateInputs + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromEntitlementBooleanCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementBooleanCreateInputs +func (t *EntitlementCreateInputs) FromEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error { + v.Type = "boolean" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeEntitlementBooleanCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementBooleanCreateInputs +func (t *EntitlementCreateInputs) MergeEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error { + v.Type = "boolean" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t EntitlementCreateInputs) Discriminator() (string, error) { + var discriminator struct { + Discriminator string `json:"type"` + } + err := json.Unmarshal(t.union, &discriminator) + return discriminator.Discriminator, err +} + +func (t EntitlementCreateInputs) ValueByDiscriminator() (interface{}, error) { + discriminator, err := t.Discriminator() + if err != nil { + return nil, err + } + switch discriminator { + case "boolean": + return t.AsEntitlementBooleanCreateInputs() + case "metered": + return t.AsEntitlementMeteredCreateInputs() + case "static": + return t.AsEntitlementStaticCreateInputs() + default: + return nil, errors.New("unknown discriminator value: " + discriminator) + } +} + +func (t EntitlementCreateInputs) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *EntitlementCreateInputs) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsEvent returns the union data inside the IngestEventsBody as a Event +func (t IngestEventsBody) AsEvent() (Event, error) { + var body Event + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromEvent overwrites any union data inside the IngestEventsBody as the provided Event +func (t *IngestEventsBody) FromEvent(v Event) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeEvent performs a merge with any union data inside the IngestEventsBody, using the provided Event +func (t *IngestEventsBody) MergeEvent(v Event) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsIngestEventsBody1 returns the union data inside the IngestEventsBody as a IngestEventsBody1 +func (t IngestEventsBody) AsIngestEventsBody1() (IngestEventsBody1, error) { + var body IngestEventsBody1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromIngestEventsBody1 overwrites any union data inside the IngestEventsBody as the provided IngestEventsBody1 +func (t *IngestEventsBody) FromIngestEventsBody1(v IngestEventsBody1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeIngestEventsBody1 performs a merge with any union data inside the IngestEventsBody, using the provided IngestEventsBody1 +func (t *IngestEventsBody) MergeIngestEventsBody1(v IngestEventsBody1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t IngestEventsBody) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *IngestEventsBody) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsInvoiceUsageBasedLine returns the union data inside the InvoiceLine as a InvoiceUsageBasedLine +func (t InvoiceLine) AsInvoiceUsageBasedLine() (InvoiceUsageBasedLine, error) { + var body InvoiceUsageBasedLine + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvoiceUsageBasedLine overwrites any union data inside the InvoiceLine as the provided InvoiceUsageBasedLine +func (t *InvoiceLine) FromInvoiceUsageBasedLine(v InvoiceUsageBasedLine) error { + v.Type = "usage_based" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvoiceUsageBasedLine performs a merge with any union data inside the InvoiceLine, using the provided InvoiceUsageBasedLine +func (t *InvoiceLine) MergeInvoiceUsageBasedLine(v InvoiceUsageBasedLine) error { + v.Type = "usage_based" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvoiceFlatFeeLine returns the union data inside the InvoiceLine as a InvoiceFlatFeeLine +func (t InvoiceLine) AsInvoiceFlatFeeLine() (InvoiceFlatFeeLine, error) { + var body InvoiceFlatFeeLine + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvoiceFlatFeeLine overwrites any union data inside the InvoiceLine as the provided InvoiceFlatFeeLine +func (t *InvoiceLine) FromInvoiceFlatFeeLine(v InvoiceFlatFeeLine) error { + v.Type = "flat_fee" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvoiceFlatFeeLine performs a merge with any union data inside the InvoiceLine, using the provided InvoiceFlatFeeLine +func (t *InvoiceLine) MergeInvoiceFlatFeeLine(v InvoiceFlatFeeLine) error { + v.Type = "flat_fee" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t InvoiceLine) Discriminator() (string, error) { + var discriminator struct { + Discriminator string `json:"type"` + } + err := json.Unmarshal(t.union, &discriminator) + return discriminator.Discriminator, err +} + +func (t InvoiceLine) ValueByDiscriminator() (interface{}, error) { + discriminator, err := t.Discriminator() + if err != nil { + return nil, err + } + switch discriminator { + case "flat_fee": + return t.AsInvoiceFlatFeeLine() + case "usage_based": + return t.AsInvoiceUsageBasedLine() + default: + return nil, errors.New("unknown discriminator value: " + discriminator) + } +} + +func (t InvoiceLine) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *InvoiceLine) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsInvoiceUsageBasedLineCreate returns the union data inside the InvoiceLineCreate as a InvoiceUsageBasedLineCreate +func (t InvoiceLineCreate) AsInvoiceUsageBasedLineCreate() (InvoiceUsageBasedLineCreate, error) { + var body InvoiceUsageBasedLineCreate err := json.Unmarshal(t.union, &body) return body, err } -// FromEntitlementStaticCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementStaticCreateInputs -func (t *EntitlementCreateInputs) FromEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error { - v.Type = "static" +// FromInvoiceUsageBasedLineCreate overwrites any union data inside the InvoiceLineCreate as the provided InvoiceUsageBasedLineCreate +func (t *InvoiceLineCreate) FromInvoiceUsageBasedLineCreate(v InvoiceUsageBasedLineCreate) error { + v.Type = "usage_based" b, err := json.Marshal(v) t.union = b return err } -// MergeEntitlementStaticCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementStaticCreateInputs -func (t *EntitlementCreateInputs) MergeEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error { - v.Type = "static" +// MergeInvoiceUsageBasedLineCreate performs a merge with any union data inside the InvoiceLineCreate, using the provided InvoiceUsageBasedLineCreate +func (t *InvoiceLineCreate) MergeInvoiceUsageBasedLineCreate(v InvoiceUsageBasedLineCreate) error { + v.Type = "usage_based" b, err := json.Marshal(v) if err != nil { return err @@ -5653,24 +5922,24 @@ func (t *EntitlementCreateInputs) MergeEntitlementStaticCreateInputs(v Entitleme return err } -// AsEntitlementBooleanCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementBooleanCreateInputs -func (t EntitlementCreateInputs) AsEntitlementBooleanCreateInputs() (EntitlementBooleanCreateInputs, error) { - var body EntitlementBooleanCreateInputs +// AsInvoiceFlatFeeLineCreate returns the union data inside the InvoiceLineCreate as a InvoiceFlatFeeLineCreate +func (t InvoiceLineCreate) AsInvoiceFlatFeeLineCreate() (InvoiceFlatFeeLineCreate, error) { + var body InvoiceFlatFeeLineCreate err := json.Unmarshal(t.union, &body) return body, err } -// FromEntitlementBooleanCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementBooleanCreateInputs -func (t *EntitlementCreateInputs) FromEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error { - v.Type = "boolean" +// FromInvoiceFlatFeeLineCreate overwrites any union data inside the InvoiceLineCreate as the provided InvoiceFlatFeeLineCreate +func (t *InvoiceLineCreate) FromInvoiceFlatFeeLineCreate(v InvoiceFlatFeeLineCreate) error { + v.Type = "flat_fee" b, err := json.Marshal(v) t.union = b return err } -// MergeEntitlementBooleanCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementBooleanCreateInputs -func (t *EntitlementCreateInputs) MergeEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error { - v.Type = "boolean" +// MergeInvoiceFlatFeeLineCreate performs a merge with any union data inside the InvoiceLineCreate, using the provided InvoiceFlatFeeLineCreate +func (t *InvoiceLineCreate) MergeInvoiceFlatFeeLineCreate(v InvoiceFlatFeeLineCreate) error { + v.Type = "flat_fee" b, err := json.Marshal(v) if err != nil { return err @@ -5681,7 +5950,7 @@ func (t *EntitlementCreateInputs) MergeEntitlementBooleanCreateInputs(v Entitlem return err } -func (t EntitlementCreateInputs) Discriminator() (string, error) { +func (t InvoiceLineCreate) Discriminator() (string, error) { var discriminator struct { Discriminator string `json:"type"` } @@ -5689,49 +5958,49 @@ func (t EntitlementCreateInputs) Discriminator() (string, error) { return discriminator.Discriminator, err } -func (t EntitlementCreateInputs) ValueByDiscriminator() (interface{}, error) { +func (t InvoiceLineCreate) ValueByDiscriminator() (interface{}, error) { discriminator, err := t.Discriminator() if err != nil { return nil, err } switch discriminator { - case "boolean": - return t.AsEntitlementBooleanCreateInputs() - case "metered": - return t.AsEntitlementMeteredCreateInputs() - case "static": - return t.AsEntitlementStaticCreateInputs() + case "flat_fee": + return t.AsInvoiceFlatFeeLineCreate() + case "usage_based": + return t.AsInvoiceUsageBasedLineCreate() default: return nil, errors.New("unknown discriminator value: " + discriminator) } } -func (t EntitlementCreateInputs) MarshalJSON() ([]byte, error) { +func (t InvoiceLineCreate) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *EntitlementCreateInputs) UnmarshalJSON(b []byte) error { +func (t *InvoiceLineCreate) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } -// AsEvent returns the union data inside the IngestEventsBody as a Event -func (t IngestEventsBody) AsEvent() (Event, error) { - var body Event +// AsInvoiceUsageBasedLineReplaceUpdate returns the union data inside the InvoiceLineReplaceUpdate as a InvoiceUsageBasedLineReplaceUpdate +func (t InvoiceLineReplaceUpdate) AsInvoiceUsageBasedLineReplaceUpdate() (InvoiceUsageBasedLineReplaceUpdate, error) { + var body InvoiceUsageBasedLineReplaceUpdate err := json.Unmarshal(t.union, &body) return body, err } -// FromEvent overwrites any union data inside the IngestEventsBody as the provided Event -func (t *IngestEventsBody) FromEvent(v Event) error { +// FromInvoiceUsageBasedLineReplaceUpdate overwrites any union data inside the InvoiceLineReplaceUpdate as the provided InvoiceUsageBasedLineReplaceUpdate +func (t *InvoiceLineReplaceUpdate) FromInvoiceUsageBasedLineReplaceUpdate(v InvoiceUsageBasedLineReplaceUpdate) error { + v.Type = "usage_based" b, err := json.Marshal(v) t.union = b return err } -// MergeEvent performs a merge with any union data inside the IngestEventsBody, using the provided Event -func (t *IngestEventsBody) MergeEvent(v Event) error { +// MergeInvoiceUsageBasedLineReplaceUpdate performs a merge with any union data inside the InvoiceLineReplaceUpdate, using the provided InvoiceUsageBasedLineReplaceUpdate +func (t *InvoiceLineReplaceUpdate) MergeInvoiceUsageBasedLineReplaceUpdate(v InvoiceUsageBasedLineReplaceUpdate) error { + v.Type = "usage_based" b, err := json.Marshal(v) if err != nil { return err @@ -5742,22 +6011,24 @@ func (t *IngestEventsBody) MergeEvent(v Event) error { return err } -// AsIngestEventsBody1 returns the union data inside the IngestEventsBody as a IngestEventsBody1 -func (t IngestEventsBody) AsIngestEventsBody1() (IngestEventsBody1, error) { - var body IngestEventsBody1 +// AsInvoiceFlatFeeLineReplaceUpdate returns the union data inside the InvoiceLineReplaceUpdate as a InvoiceFlatFeeLineReplaceUpdate +func (t InvoiceLineReplaceUpdate) AsInvoiceFlatFeeLineReplaceUpdate() (InvoiceFlatFeeLineReplaceUpdate, error) { + var body InvoiceFlatFeeLineReplaceUpdate err := json.Unmarshal(t.union, &body) return body, err } -// FromIngestEventsBody1 overwrites any union data inside the IngestEventsBody as the provided IngestEventsBody1 -func (t *IngestEventsBody) FromIngestEventsBody1(v IngestEventsBody1) error { +// FromInvoiceFlatFeeLineReplaceUpdate overwrites any union data inside the InvoiceLineReplaceUpdate as the provided InvoiceFlatFeeLineReplaceUpdate +func (t *InvoiceLineReplaceUpdate) FromInvoiceFlatFeeLineReplaceUpdate(v InvoiceFlatFeeLineReplaceUpdate) error { + v.Type = "flat_fee" b, err := json.Marshal(v) t.union = b return err } -// MergeIngestEventsBody1 performs a merge with any union data inside the IngestEventsBody, using the provided IngestEventsBody1 -func (t *IngestEventsBody) MergeIngestEventsBody1(v IngestEventsBody1) error { +// MergeInvoiceFlatFeeLineReplaceUpdate performs a merge with any union data inside the InvoiceLineReplaceUpdate, using the provided InvoiceFlatFeeLineReplaceUpdate +func (t *InvoiceLineReplaceUpdate) MergeInvoiceFlatFeeLineReplaceUpdate(v InvoiceFlatFeeLineReplaceUpdate) error { + v.Type = "flat_fee" b, err := json.Marshal(v) if err != nil { return err @@ -5768,12 +6039,35 @@ func (t *IngestEventsBody) MergeIngestEventsBody1(v IngestEventsBody1) error { return err } -func (t IngestEventsBody) MarshalJSON() ([]byte, error) { +func (t InvoiceLineReplaceUpdate) Discriminator() (string, error) { + var discriminator struct { + Discriminator string `json:"type"` + } + err := json.Unmarshal(t.union, &discriminator) + return discriminator.Discriminator, err +} + +func (t InvoiceLineReplaceUpdate) ValueByDiscriminator() (interface{}, error) { + discriminator, err := t.Discriminator() + if err != nil { + return nil, err + } + switch discriminator { + case "flat_fee": + return t.AsInvoiceFlatFeeLineReplaceUpdate() + case "usage_based": + return t.AsInvoiceUsageBasedLineReplaceUpdate() + default: + return nil, errors.New("unknown discriminator value: " + discriminator) + } +} + +func (t InvoiceLineReplaceUpdate) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *IngestEventsBody) UnmarshalJSON(b []byte) error { +func (t *InvoiceLineReplaceUpdate) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } @@ -5964,6 +6258,68 @@ func (t *MeasureUsageFrom) UnmarshalJSON(b []byte) error { return err } +// AsPaymentTermInstant returns the union data inside the PaymentTerms as a PaymentTermInstant +func (t PaymentTerms) AsPaymentTermInstant() (PaymentTermInstant, error) { + var body PaymentTermInstant + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromPaymentTermInstant overwrites any union data inside the PaymentTerms as the provided PaymentTermInstant +func (t *PaymentTerms) FromPaymentTermInstant(v PaymentTermInstant) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergePaymentTermInstant performs a merge with any union data inside the PaymentTerms, using the provided PaymentTermInstant +func (t *PaymentTerms) MergePaymentTermInstant(v PaymentTermInstant) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsPaymentTermDueDate returns the union data inside the PaymentTerms as a PaymentTermDueDate +func (t PaymentTerms) AsPaymentTermDueDate() (PaymentTermDueDate, error) { + var body PaymentTermDueDate + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromPaymentTermDueDate overwrites any union data inside the PaymentTerms as the provided PaymentTermDueDate +func (t *PaymentTerms) FromPaymentTermDueDate(v PaymentTermDueDate) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergePaymentTermDueDate performs a merge with any union data inside the PaymentTerms, using the provided PaymentTermDueDate +func (t *PaymentTerms) MergePaymentTermDueDate(v PaymentTermDueDate) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t PaymentTerms) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *PaymentTerms) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + // AsSubscriptionEditAddItem returns the union data inside the PlanSubscriptionChange_Customizations_Item as a SubscriptionEditAddItem func (t PlanSubscriptionChange_Customizations_Item) AsSubscriptionEditAddItem() (SubscriptionEditAddItem, error) { var body SubscriptionEditAddItem @@ -6742,6 +7098,184 @@ func (t *SubscriptionItem_Price) UnmarshalJSON(b []byte) error { return err } +// AsVoidInvoiceLineDiscardAction returns the union data inside the VoidInvoiceLineActionCreate as a VoidInvoiceLineDiscardAction +func (t VoidInvoiceLineActionCreate) AsVoidInvoiceLineDiscardAction() (VoidInvoiceLineDiscardAction, error) { + var body VoidInvoiceLineDiscardAction + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVoidInvoiceLineDiscardAction overwrites any union data inside the VoidInvoiceLineActionCreate as the provided VoidInvoiceLineDiscardAction +func (t *VoidInvoiceLineActionCreate) FromVoidInvoiceLineDiscardAction(v VoidInvoiceLineDiscardAction) error { + v.Type = "discard" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVoidInvoiceLineDiscardAction performs a merge with any union data inside the VoidInvoiceLineActionCreate, using the provided VoidInvoiceLineDiscardAction +func (t *VoidInvoiceLineActionCreate) MergeVoidInvoiceLineDiscardAction(v VoidInvoiceLineDiscardAction) error { + v.Type = "discard" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsVoidInvoiceLinePendingActionCreate returns the union data inside the VoidInvoiceLineActionCreate as a VoidInvoiceLinePendingActionCreate +func (t VoidInvoiceLineActionCreate) AsVoidInvoiceLinePendingActionCreate() (VoidInvoiceLinePendingActionCreate, error) { + var body VoidInvoiceLinePendingActionCreate + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVoidInvoiceLinePendingActionCreate overwrites any union data inside the VoidInvoiceLineActionCreate as the provided VoidInvoiceLinePendingActionCreate +func (t *VoidInvoiceLineActionCreate) FromVoidInvoiceLinePendingActionCreate(v VoidInvoiceLinePendingActionCreate) error { + v.Type = "pending" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVoidInvoiceLinePendingActionCreate performs a merge with any union data inside the VoidInvoiceLineActionCreate, using the provided VoidInvoiceLinePendingActionCreate +func (t *VoidInvoiceLineActionCreate) MergeVoidInvoiceLinePendingActionCreate(v VoidInvoiceLinePendingActionCreate) error { + v.Type = "pending" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t VoidInvoiceLineActionCreate) Discriminator() (string, error) { + var discriminator struct { + Discriminator string `json:"type"` + } + err := json.Unmarshal(t.union, &discriminator) + return discriminator.Discriminator, err +} + +func (t VoidInvoiceLineActionCreate) ValueByDiscriminator() (interface{}, error) { + discriminator, err := t.Discriminator() + if err != nil { + return nil, err + } + switch discriminator { + case "discard": + return t.AsVoidInvoiceLineDiscardAction() + case "pending": + return t.AsVoidInvoiceLinePendingActionCreate() + default: + return nil, errors.New("unknown discriminator value: " + discriminator) + } +} + +func (t VoidInvoiceLineActionCreate) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *VoidInvoiceLineActionCreate) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsVoidInvoiceLineDiscardAction returns the union data inside the VoidInvoiceLineActionCreateItem as a VoidInvoiceLineDiscardAction +func (t VoidInvoiceLineActionCreateItem) AsVoidInvoiceLineDiscardAction() (VoidInvoiceLineDiscardAction, error) { + var body VoidInvoiceLineDiscardAction + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVoidInvoiceLineDiscardAction overwrites any union data inside the VoidInvoiceLineActionCreateItem as the provided VoidInvoiceLineDiscardAction +func (t *VoidInvoiceLineActionCreateItem) FromVoidInvoiceLineDiscardAction(v VoidInvoiceLineDiscardAction) error { + v.Type = "discard" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVoidInvoiceLineDiscardAction performs a merge with any union data inside the VoidInvoiceLineActionCreateItem, using the provided VoidInvoiceLineDiscardAction +func (t *VoidInvoiceLineActionCreateItem) MergeVoidInvoiceLineDiscardAction(v VoidInvoiceLineDiscardAction) error { + v.Type = "discard" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsVoidInvoiceLinePendingActionCreateItem returns the union data inside the VoidInvoiceLineActionCreateItem as a VoidInvoiceLinePendingActionCreateItem +func (t VoidInvoiceLineActionCreateItem) AsVoidInvoiceLinePendingActionCreateItem() (VoidInvoiceLinePendingActionCreateItem, error) { + var body VoidInvoiceLinePendingActionCreateItem + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVoidInvoiceLinePendingActionCreateItem overwrites any union data inside the VoidInvoiceLineActionCreateItem as the provided VoidInvoiceLinePendingActionCreateItem +func (t *VoidInvoiceLineActionCreateItem) FromVoidInvoiceLinePendingActionCreateItem(v VoidInvoiceLinePendingActionCreateItem) error { + v.Type = "pending" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVoidInvoiceLinePendingActionCreateItem performs a merge with any union data inside the VoidInvoiceLineActionCreateItem, using the provided VoidInvoiceLinePendingActionCreateItem +func (t *VoidInvoiceLineActionCreateItem) MergeVoidInvoiceLinePendingActionCreateItem(v VoidInvoiceLinePendingActionCreateItem) error { + v.Type = "pending" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t VoidInvoiceLineActionCreateItem) Discriminator() (string, error) { + var discriminator struct { + Discriminator string `json:"type"` + } + err := json.Unmarshal(t.union, &discriminator) + return discriminator.Discriminator, err +} + +func (t VoidInvoiceLineActionCreateItem) ValueByDiscriminator() (interface{}, error) { + discriminator, err := t.Discriminator() + if err != nil { + return nil, err + } + switch discriminator { + case "discard": + return t.AsVoidInvoiceLineDiscardAction() + case "pending": + return t.AsVoidInvoiceLinePendingActionCreateItem() + default: + return nil, errors.New("unknown discriminator value: " + discriminator) + } +} + +func (t VoidInvoiceLineActionCreateItem) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *VoidInvoiceLineActionCreateItem) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + // ServerInterface represents all server handlers. type ServerInterface interface { // List apps @@ -6758,73 +7292,73 @@ type ServerInterface interface { AppStripeWebhook(w http.ResponseWriter, r *http.Request, id string) // List customer overrides // (GET /api/v1/billing/customer) - BillingListCustomerOverrides(w http.ResponseWriter, r *http.Request, params BillingListCustomerOverridesParams) + ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request, params ListBillingProfileCustomerOverridesParams) // Delete a customer override // (DELETE /api/v1/billing/customer/{customerId}) - BillingDeleteCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) + DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) // Get a customer override // (GET /api/v1/billing/customer/{customerId}) - BillingGetCustomerOverrideById(w http.ResponseWriter, r *http.Request, customerId string) - // Create/update a customer override + GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) + // Create a new or update a customer override // (POST /api/v1/billing/customer/{customerId}) - BillingUpsertCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) + UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) // List invoices // (GET /api/v1/billing/invoices) - BillingListInvoices(w http.ResponseWriter, r *http.Request, params BillingListInvoicesParams) + ListInvoices(w http.ResponseWriter, r *http.Request, params ListInvoicesParams) // List invoices // (GET /api/v1/billing/invoices/{customerId}) - BillingListInvoicesByCustomer(w http.ResponseWriter, r *http.Request, customerId string, params BillingListInvoicesByCustomerParams) - // Create an invoice - // (POST /api/v1/billing/invoices/{customerId}) - BillingCreateInvoice(w http.ResponseWriter, r *http.Request, customerId string) + ListInvoicesByCustomer(w http.ResponseWriter, r *http.Request, customerId string, params ListInvoicesByCustomerParams) + // Invoice a customer based on the pending line items + // (POST /api/v1/billing/invoices/{customerId}/invoice) + InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request, customerId string) // Delete an invoice // (DELETE /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}) - BillingDeleteInvoiceByCustomerInvoiceId(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) + DeleteInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) // Get an invoice // (GET /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}) - BillingGetInvoiceByCustomerInvoiceId(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, params BillingGetInvoiceByCustomerInvoiceIdParams) + GetInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, params GetInvoiceParams) // Advance the invoice's state to the next status // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/advance) - BillingInvoiceAdvance(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) + AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) // Send the invoice to the customer // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/approve) - BillingApproveInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) + ApproveInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) // Delete an invoice line // (DELETE /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) - BillingDeleteInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) + DeleteInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) // Get an invoice line // (GET /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) - BillingGetInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) + GetInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) // Update an invoice line // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) - BillingUpdateInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) + UpdateInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) // Retry advancing the invoice after a failed attempt. // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/retry) - BillingInvoiceRetry(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) + RetryInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) // Recalculate an invoice's tax amounts // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/tax/recalculate) - BillingRecalculateInvoiceTax(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) + RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) // Void an invoice // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/void) - BillingVoidInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) + VoidInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) // Create line items // (POST /api/v1/billing/invoices/{customerId}/lines) - BillingCreateLineByCustomer(w http.ResponseWriter, r *http.Request, customerId string) + CreateInvoiceLineByCustomer(w http.ResponseWriter, r *http.Request, customerId string) // List billing profiles // (GET /api/v1/billing/profile) - BillingListProfiles(w http.ResponseWriter, r *http.Request, params BillingListProfilesParams) + ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams) // Create a new billing profile // (POST /api/v1/billing/profile) - BillingCreateProfile(w http.ResponseWriter, r *http.Request) - // Archive a billing profile + CreateBillingProfile(w http.ResponseWriter, r *http.Request) + // Delete a billing profile // (DELETE /api/v1/billing/profile/{id}) - BillingArchiveProfile(w http.ResponseWriter, r *http.Request, id string) - // Get a billing profile by ID + DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id string) + // Get a billing profile // (GET /api/v1/billing/profile/{id}) - BillingGetProfile(w http.ResponseWriter, r *http.Request, id string, params BillingGetProfileParams) + GetBillingProfile(w http.ResponseWriter, r *http.Request, id string, params GetBillingProfileParams) // Update a billing profile // (PUT /api/v1/billing/profile/{id}) - BillingUpdateProfile(w http.ResponseWriter, r *http.Request, id string) + UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id string) // List customers // (GET /api/v1/customers) ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams) @@ -7076,139 +7610,139 @@ func (_ Unimplemented) AppStripeWebhook(w http.ResponseWriter, r *http.Request, // List customer overrides // (GET /api/v1/billing/customer) -func (_ Unimplemented) BillingListCustomerOverrides(w http.ResponseWriter, r *http.Request, params BillingListCustomerOverridesParams) { +func (_ Unimplemented) ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request, params ListBillingProfileCustomerOverridesParams) { w.WriteHeader(http.StatusNotImplemented) } // Delete a customer override // (DELETE /api/v1/billing/customer/{customerId}) -func (_ Unimplemented) BillingDeleteCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { +func (_ Unimplemented) DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { w.WriteHeader(http.StatusNotImplemented) } // Get a customer override // (GET /api/v1/billing/customer/{customerId}) -func (_ Unimplemented) BillingGetCustomerOverrideById(w http.ResponseWriter, r *http.Request, customerId string) { +func (_ Unimplemented) GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { w.WriteHeader(http.StatusNotImplemented) } -// Create/update a customer override +// Create a new or update a customer override // (POST /api/v1/billing/customer/{customerId}) -func (_ Unimplemented) BillingUpsertCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { +func (_ Unimplemented) UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { w.WriteHeader(http.StatusNotImplemented) } // List invoices // (GET /api/v1/billing/invoices) -func (_ Unimplemented) BillingListInvoices(w http.ResponseWriter, r *http.Request, params BillingListInvoicesParams) { +func (_ Unimplemented) ListInvoices(w http.ResponseWriter, r *http.Request, params ListInvoicesParams) { w.WriteHeader(http.StatusNotImplemented) } // List invoices // (GET /api/v1/billing/invoices/{customerId}) -func (_ Unimplemented) BillingListInvoicesByCustomer(w http.ResponseWriter, r *http.Request, customerId string, params BillingListInvoicesByCustomerParams) { +func (_ Unimplemented) ListInvoicesByCustomer(w http.ResponseWriter, r *http.Request, customerId string, params ListInvoicesByCustomerParams) { w.WriteHeader(http.StatusNotImplemented) } -// Create an invoice -// (POST /api/v1/billing/invoices/{customerId}) -func (_ Unimplemented) BillingCreateInvoice(w http.ResponseWriter, r *http.Request, customerId string) { +// Invoice a customer based on the pending line items +// (POST /api/v1/billing/invoices/{customerId}/invoice) +func (_ Unimplemented) InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request, customerId string) { w.WriteHeader(http.StatusNotImplemented) } // Delete an invoice // (DELETE /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}) -func (_ Unimplemented) BillingDeleteInvoiceByCustomerInvoiceId(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { +func (_ Unimplemented) DeleteInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { w.WriteHeader(http.StatusNotImplemented) } // Get an invoice // (GET /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}) -func (_ Unimplemented) BillingGetInvoiceByCustomerInvoiceId(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, params BillingGetInvoiceByCustomerInvoiceIdParams) { +func (_ Unimplemented) GetInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, params GetInvoiceParams) { w.WriteHeader(http.StatusNotImplemented) } // Advance the invoice's state to the next status // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/advance) -func (_ Unimplemented) BillingInvoiceAdvance(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { +func (_ Unimplemented) AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { w.WriteHeader(http.StatusNotImplemented) } // Send the invoice to the customer // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/approve) -func (_ Unimplemented) BillingApproveInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { +func (_ Unimplemented) ApproveInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { w.WriteHeader(http.StatusNotImplemented) } // Delete an invoice line // (DELETE /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) -func (_ Unimplemented) BillingDeleteInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { +func (_ Unimplemented) DeleteInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { w.WriteHeader(http.StatusNotImplemented) } // Get an invoice line // (GET /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) -func (_ Unimplemented) BillingGetInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { +func (_ Unimplemented) GetInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { w.WriteHeader(http.StatusNotImplemented) } // Update an invoice line // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) -func (_ Unimplemented) BillingUpdateInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { +func (_ Unimplemented) UpdateInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { w.WriteHeader(http.StatusNotImplemented) } // Retry advancing the invoice after a failed attempt. // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/retry) -func (_ Unimplemented) BillingInvoiceRetry(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { +func (_ Unimplemented) RetryInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { w.WriteHeader(http.StatusNotImplemented) } // Recalculate an invoice's tax amounts // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/tax/recalculate) -func (_ Unimplemented) BillingRecalculateInvoiceTax(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { +func (_ Unimplemented) RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { w.WriteHeader(http.StatusNotImplemented) } // Void an invoice // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/void) -func (_ Unimplemented) BillingVoidInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { +func (_ Unimplemented) VoidInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { w.WriteHeader(http.StatusNotImplemented) } // Create line items // (POST /api/v1/billing/invoices/{customerId}/lines) -func (_ Unimplemented) BillingCreateLineByCustomer(w http.ResponseWriter, r *http.Request, customerId string) { +func (_ Unimplemented) CreateInvoiceLineByCustomer(w http.ResponseWriter, r *http.Request, customerId string) { w.WriteHeader(http.StatusNotImplemented) } // List billing profiles // (GET /api/v1/billing/profile) -func (_ Unimplemented) BillingListProfiles(w http.ResponseWriter, r *http.Request, params BillingListProfilesParams) { +func (_ Unimplemented) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams) { w.WriteHeader(http.StatusNotImplemented) } // Create a new billing profile // (POST /api/v1/billing/profile) -func (_ Unimplemented) BillingCreateProfile(w http.ResponseWriter, r *http.Request) { +func (_ Unimplemented) CreateBillingProfile(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusNotImplemented) } -// Archive a billing profile +// Delete a billing profile // (DELETE /api/v1/billing/profile/{id}) -func (_ Unimplemented) BillingArchiveProfile(w http.ResponseWriter, r *http.Request, id string) { +func (_ Unimplemented) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id string) { w.WriteHeader(http.StatusNotImplemented) } -// Get a billing profile by ID +// Get a billing profile // (GET /api/v1/billing/profile/{id}) -func (_ Unimplemented) BillingGetProfile(w http.ResponseWriter, r *http.Request, id string, params BillingGetProfileParams) { +func (_ Unimplemented) GetBillingProfile(w http.ResponseWriter, r *http.Request, id string, params GetBillingProfileParams) { w.WriteHeader(http.StatusNotImplemented) } // Update a billing profile // (PUT /api/v1/billing/profile/{id}) -func (_ Unimplemented) BillingUpdateProfile(w http.ResponseWriter, r *http.Request, id string) { +func (_ Unimplemented) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id string) { w.WriteHeader(http.StatusNotImplemented) } @@ -7769,13 +8303,13 @@ func (siw *ServerInterfaceWrapper) AppStripeWebhook(w http.ResponseWriter, r *ht handler.ServeHTTP(w, r) } -// BillingListCustomerOverrides operation middleware -func (siw *ServerInterfaceWrapper) BillingListCustomerOverrides(w http.ResponseWriter, r *http.Request) { +// ListBillingProfileCustomerOverrides operation middleware +func (siw *ServerInterfaceWrapper) ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request) { var err error // Parameter object where we will unmarshal all parameters from the context - var params BillingListCustomerOverridesParams + var params ListBillingProfileCustomerOverridesParams // ------------- Optional query parameter "billingProfile" ------------- @@ -7834,7 +8368,7 @@ func (siw *ServerInterfaceWrapper) BillingListCustomerOverrides(w http.ResponseW } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingListCustomerOverrides(w, r, params) + siw.Handler.ListBillingProfileCustomerOverrides(w, r, params) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -7844,8 +8378,8 @@ func (siw *ServerInterfaceWrapper) BillingListCustomerOverrides(w http.ResponseW handler.ServeHTTP(w, r) } -// BillingDeleteCustomerOverride operation middleware -func (siw *ServerInterfaceWrapper) BillingDeleteCustomerOverride(w http.ResponseWriter, r *http.Request) { +// DeleteBillingProfileCustomerOverride operation middleware +func (siw *ServerInterfaceWrapper) DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request) { var err error @@ -7859,7 +8393,7 @@ func (siw *ServerInterfaceWrapper) BillingDeleteCustomerOverride(w http.Response } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingDeleteCustomerOverride(w, r, customerId) + siw.Handler.DeleteBillingProfileCustomerOverride(w, r, customerId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -7869,8 +8403,8 @@ func (siw *ServerInterfaceWrapper) BillingDeleteCustomerOverride(w http.Response handler.ServeHTTP(w, r) } -// BillingGetCustomerOverrideById operation middleware -func (siw *ServerInterfaceWrapper) BillingGetCustomerOverrideById(w http.ResponseWriter, r *http.Request) { +// GetBillingProfileCustomerOverride operation middleware +func (siw *ServerInterfaceWrapper) GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request) { var err error @@ -7884,7 +8418,7 @@ func (siw *ServerInterfaceWrapper) BillingGetCustomerOverrideById(w http.Respons } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingGetCustomerOverrideById(w, r, customerId) + siw.Handler.GetBillingProfileCustomerOverride(w, r, customerId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -7894,8 +8428,8 @@ func (siw *ServerInterfaceWrapper) BillingGetCustomerOverrideById(w http.Respons handler.ServeHTTP(w, r) } -// BillingUpsertCustomerOverride operation middleware -func (siw *ServerInterfaceWrapper) BillingUpsertCustomerOverride(w http.ResponseWriter, r *http.Request) { +// UpsertBillingProfileCustomerOverride operation middleware +func (siw *ServerInterfaceWrapper) UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request) { var err error @@ -7909,7 +8443,7 @@ func (siw *ServerInterfaceWrapper) BillingUpsertCustomerOverride(w http.Response } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingUpsertCustomerOverride(w, r, customerId) + siw.Handler.UpsertBillingProfileCustomerOverride(w, r, customerId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -7919,13 +8453,13 @@ func (siw *ServerInterfaceWrapper) BillingUpsertCustomerOverride(w http.Response handler.ServeHTTP(w, r) } -// BillingListInvoices operation middleware -func (siw *ServerInterfaceWrapper) BillingListInvoices(w http.ResponseWriter, r *http.Request) { +// ListInvoices operation middleware +func (siw *ServerInterfaceWrapper) ListInvoices(w http.ResponseWriter, r *http.Request) { var err error // Parameter object where we will unmarshal all parameters from the context - var params BillingListInvoicesParams + var params ListInvoicesParams // ------------- Optional query parameter "customers" ------------- @@ -8024,7 +8558,7 @@ func (siw *ServerInterfaceWrapper) BillingListInvoices(w http.ResponseWriter, r } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingListInvoices(w, r, params) + siw.Handler.ListInvoices(w, r, params) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8034,8 +8568,8 @@ func (siw *ServerInterfaceWrapper) BillingListInvoices(w http.ResponseWriter, r handler.ServeHTTP(w, r) } -// BillingListInvoicesByCustomer operation middleware -func (siw *ServerInterfaceWrapper) BillingListInvoicesByCustomer(w http.ResponseWriter, r *http.Request) { +// ListInvoicesByCustomer operation middleware +func (siw *ServerInterfaceWrapper) ListInvoicesByCustomer(w http.ResponseWriter, r *http.Request) { var err error @@ -8049,7 +8583,7 @@ func (siw *ServerInterfaceWrapper) BillingListInvoicesByCustomer(w http.Response } // Parameter object where we will unmarshal all parameters from the context - var params BillingListInvoicesByCustomerParams + var params ListInvoicesByCustomerParams // ------------- Optional query parameter "statuses" ------------- @@ -8140,7 +8674,7 @@ func (siw *ServerInterfaceWrapper) BillingListInvoicesByCustomer(w http.Response } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingListInvoicesByCustomer(w, r, customerId, params) + siw.Handler.ListInvoicesByCustomer(w, r, customerId, params) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8150,8 +8684,8 @@ func (siw *ServerInterfaceWrapper) BillingListInvoicesByCustomer(w http.Response handler.ServeHTTP(w, r) } -// BillingCreateInvoice operation middleware -func (siw *ServerInterfaceWrapper) BillingCreateInvoice(w http.ResponseWriter, r *http.Request) { +// InvoicePendingLinesAction operation middleware +func (siw *ServerInterfaceWrapper) InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request) { var err error @@ -8165,7 +8699,7 @@ func (siw *ServerInterfaceWrapper) BillingCreateInvoice(w http.ResponseWriter, r } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingCreateInvoice(w, r, customerId) + siw.Handler.InvoicePendingLinesAction(w, r, customerId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8175,8 +8709,8 @@ func (siw *ServerInterfaceWrapper) BillingCreateInvoice(w http.ResponseWriter, r handler.ServeHTTP(w, r) } -// BillingDeleteInvoiceByCustomerInvoiceId operation middleware -func (siw *ServerInterfaceWrapper) BillingDeleteInvoiceByCustomerInvoiceId(w http.ResponseWriter, r *http.Request) { +// DeleteInvoice operation middleware +func (siw *ServerInterfaceWrapper) DeleteInvoice(w http.ResponseWriter, r *http.Request) { var err error @@ -8199,7 +8733,7 @@ func (siw *ServerInterfaceWrapper) BillingDeleteInvoiceByCustomerInvoiceId(w htt } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingDeleteInvoiceByCustomerInvoiceId(w, r, customerId, invoiceId) + siw.Handler.DeleteInvoice(w, r, customerId, invoiceId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8209,8 +8743,8 @@ func (siw *ServerInterfaceWrapper) BillingDeleteInvoiceByCustomerInvoiceId(w htt handler.ServeHTTP(w, r) } -// BillingGetInvoiceByCustomerInvoiceId operation middleware -func (siw *ServerInterfaceWrapper) BillingGetInvoiceByCustomerInvoiceId(w http.ResponseWriter, r *http.Request) { +// GetInvoice operation middleware +func (siw *ServerInterfaceWrapper) GetInvoice(w http.ResponseWriter, r *http.Request) { var err error @@ -8233,7 +8767,7 @@ func (siw *ServerInterfaceWrapper) BillingGetInvoiceByCustomerInvoiceId(w http.R } // Parameter object where we will unmarshal all parameters from the context - var params BillingGetInvoiceByCustomerInvoiceIdParams + var params GetInvoiceParams // ------------- Required query parameter "expand" ------------- @@ -8250,8 +8784,23 @@ func (siw *ServerInterfaceWrapper) BillingGetInvoiceByCustomerInvoiceId(w http.R return } + // ------------- Required query parameter "includeDeletedLines" ------------- + + if paramValue := r.URL.Query().Get("includeDeletedLines"); paramValue != "" { + + } else { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "includeDeletedLines"}) + return + } + + err = runtime.BindQueryParameter("form", false, true, "includeDeletedLines", r.URL.Query(), ¶ms.IncludeDeletedLines) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "includeDeletedLines", Err: err}) + return + } + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingGetInvoiceByCustomerInvoiceId(w, r, customerId, invoiceId, params) + siw.Handler.GetInvoice(w, r, customerId, invoiceId, params) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8261,8 +8810,8 @@ func (siw *ServerInterfaceWrapper) BillingGetInvoiceByCustomerInvoiceId(w http.R handler.ServeHTTP(w, r) } -// BillingInvoiceAdvance operation middleware -func (siw *ServerInterfaceWrapper) BillingInvoiceAdvance(w http.ResponseWriter, r *http.Request) { +// AdvanceInvoiceAction operation middleware +func (siw *ServerInterfaceWrapper) AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request) { var err error @@ -8285,7 +8834,7 @@ func (siw *ServerInterfaceWrapper) BillingInvoiceAdvance(w http.ResponseWriter, } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingInvoiceAdvance(w, r, customerId, invoiceId) + siw.Handler.AdvanceInvoiceAction(w, r, customerId, invoiceId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8295,8 +8844,8 @@ func (siw *ServerInterfaceWrapper) BillingInvoiceAdvance(w http.ResponseWriter, handler.ServeHTTP(w, r) } -// BillingApproveInvoice operation middleware -func (siw *ServerInterfaceWrapper) BillingApproveInvoice(w http.ResponseWriter, r *http.Request) { +// ApproveInvoiceAction operation middleware +func (siw *ServerInterfaceWrapper) ApproveInvoiceAction(w http.ResponseWriter, r *http.Request) { var err error @@ -8319,7 +8868,7 @@ func (siw *ServerInterfaceWrapper) BillingApproveInvoice(w http.ResponseWriter, } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingApproveInvoice(w, r, customerId, invoiceId) + siw.Handler.ApproveInvoiceAction(w, r, customerId, invoiceId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8329,8 +8878,8 @@ func (siw *ServerInterfaceWrapper) BillingApproveInvoice(w http.ResponseWriter, handler.ServeHTTP(w, r) } -// BillingDeleteInvoiceLine operation middleware -func (siw *ServerInterfaceWrapper) BillingDeleteInvoiceLine(w http.ResponseWriter, r *http.Request) { +// DeleteInvoiceLine operation middleware +func (siw *ServerInterfaceWrapper) DeleteInvoiceLine(w http.ResponseWriter, r *http.Request) { var err error @@ -8362,7 +8911,7 @@ func (siw *ServerInterfaceWrapper) BillingDeleteInvoiceLine(w http.ResponseWrite } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingDeleteInvoiceLine(w, r, customerId, invoiceId, lineId) + siw.Handler.DeleteInvoiceLine(w, r, customerId, invoiceId, lineId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8372,8 +8921,8 @@ func (siw *ServerInterfaceWrapper) BillingDeleteInvoiceLine(w http.ResponseWrite handler.ServeHTTP(w, r) } -// BillingGetInvoiceLine operation middleware -func (siw *ServerInterfaceWrapper) BillingGetInvoiceLine(w http.ResponseWriter, r *http.Request) { +// GetInvoiceLine operation middleware +func (siw *ServerInterfaceWrapper) GetInvoiceLine(w http.ResponseWriter, r *http.Request) { var err error @@ -8405,7 +8954,7 @@ func (siw *ServerInterfaceWrapper) BillingGetInvoiceLine(w http.ResponseWriter, } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingGetInvoiceLine(w, r, customerId, invoiceId, lineId) + siw.Handler.GetInvoiceLine(w, r, customerId, invoiceId, lineId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8415,8 +8964,8 @@ func (siw *ServerInterfaceWrapper) BillingGetInvoiceLine(w http.ResponseWriter, handler.ServeHTTP(w, r) } -// BillingUpdateInvoiceLine operation middleware -func (siw *ServerInterfaceWrapper) BillingUpdateInvoiceLine(w http.ResponseWriter, r *http.Request) { +// UpdateInvoiceLine operation middleware +func (siw *ServerInterfaceWrapper) UpdateInvoiceLine(w http.ResponseWriter, r *http.Request) { var err error @@ -8448,7 +8997,7 @@ func (siw *ServerInterfaceWrapper) BillingUpdateInvoiceLine(w http.ResponseWrite } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingUpdateInvoiceLine(w, r, customerId, invoiceId, lineId) + siw.Handler.UpdateInvoiceLine(w, r, customerId, invoiceId, lineId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8458,8 +9007,8 @@ func (siw *ServerInterfaceWrapper) BillingUpdateInvoiceLine(w http.ResponseWrite handler.ServeHTTP(w, r) } -// BillingInvoiceRetry operation middleware -func (siw *ServerInterfaceWrapper) BillingInvoiceRetry(w http.ResponseWriter, r *http.Request) { +// RetryInvoiceAction operation middleware +func (siw *ServerInterfaceWrapper) RetryInvoiceAction(w http.ResponseWriter, r *http.Request) { var err error @@ -8482,7 +9031,7 @@ func (siw *ServerInterfaceWrapper) BillingInvoiceRetry(w http.ResponseWriter, r } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingInvoiceRetry(w, r, customerId, invoiceId) + siw.Handler.RetryInvoiceAction(w, r, customerId, invoiceId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8492,8 +9041,8 @@ func (siw *ServerInterfaceWrapper) BillingInvoiceRetry(w http.ResponseWriter, r handler.ServeHTTP(w, r) } -// BillingRecalculateInvoiceTax operation middleware -func (siw *ServerInterfaceWrapper) BillingRecalculateInvoiceTax(w http.ResponseWriter, r *http.Request) { +// RecalculateInvoiceTaxAction operation middleware +func (siw *ServerInterfaceWrapper) RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request) { var err error @@ -8516,7 +9065,7 @@ func (siw *ServerInterfaceWrapper) BillingRecalculateInvoiceTax(w http.ResponseW } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingRecalculateInvoiceTax(w, r, customerId, invoiceId) + siw.Handler.RecalculateInvoiceTaxAction(w, r, customerId, invoiceId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8526,8 +9075,8 @@ func (siw *ServerInterfaceWrapper) BillingRecalculateInvoiceTax(w http.ResponseW handler.ServeHTTP(w, r) } -// BillingVoidInvoice operation middleware -func (siw *ServerInterfaceWrapper) BillingVoidInvoice(w http.ResponseWriter, r *http.Request) { +// VoidInvoiceAction operation middleware +func (siw *ServerInterfaceWrapper) VoidInvoiceAction(w http.ResponseWriter, r *http.Request) { var err error @@ -8550,7 +9099,7 @@ func (siw *ServerInterfaceWrapper) BillingVoidInvoice(w http.ResponseWriter, r * } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingVoidInvoice(w, r, customerId, invoiceId) + siw.Handler.VoidInvoiceAction(w, r, customerId, invoiceId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8560,8 +9109,8 @@ func (siw *ServerInterfaceWrapper) BillingVoidInvoice(w http.ResponseWriter, r * handler.ServeHTTP(w, r) } -// BillingCreateLineByCustomer operation middleware -func (siw *ServerInterfaceWrapper) BillingCreateLineByCustomer(w http.ResponseWriter, r *http.Request) { +// CreateInvoiceLineByCustomer operation middleware +func (siw *ServerInterfaceWrapper) CreateInvoiceLineByCustomer(w http.ResponseWriter, r *http.Request) { var err error @@ -8575,7 +9124,7 @@ func (siw *ServerInterfaceWrapper) BillingCreateLineByCustomer(w http.ResponseWr } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingCreateLineByCustomer(w, r, customerId) + siw.Handler.CreateInvoiceLineByCustomer(w, r, customerId) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8585,13 +9134,13 @@ func (siw *ServerInterfaceWrapper) BillingCreateLineByCustomer(w http.ResponseWr handler.ServeHTTP(w, r) } -// BillingListProfiles operation middleware -func (siw *ServerInterfaceWrapper) BillingListProfiles(w http.ResponseWriter, r *http.Request) { +// ListBillingProfiles operation middleware +func (siw *ServerInterfaceWrapper) ListBillingProfiles(w http.ResponseWriter, r *http.Request) { var err error // Parameter object where we will unmarshal all parameters from the context - var params BillingListProfilesParams + var params ListBillingProfilesParams // ------------- Optional query parameter "includeArchived" ------------- @@ -8658,7 +9207,7 @@ func (siw *ServerInterfaceWrapper) BillingListProfiles(w http.ResponseWriter, r } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingListProfiles(w, r, params) + siw.Handler.ListBillingProfiles(w, r, params) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8668,11 +9217,11 @@ func (siw *ServerInterfaceWrapper) BillingListProfiles(w http.ResponseWriter, r handler.ServeHTTP(w, r) } -// BillingCreateProfile operation middleware -func (siw *ServerInterfaceWrapper) BillingCreateProfile(w http.ResponseWriter, r *http.Request) { +// CreateBillingProfile operation middleware +func (siw *ServerInterfaceWrapper) CreateBillingProfile(w http.ResponseWriter, r *http.Request) { handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingCreateProfile(w, r) + siw.Handler.CreateBillingProfile(w, r) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8682,8 +9231,8 @@ func (siw *ServerInterfaceWrapper) BillingCreateProfile(w http.ResponseWriter, r handler.ServeHTTP(w, r) } -// BillingArchiveProfile operation middleware -func (siw *ServerInterfaceWrapper) BillingArchiveProfile(w http.ResponseWriter, r *http.Request) { +// DeleteBillingProfile operation middleware +func (siw *ServerInterfaceWrapper) DeleteBillingProfile(w http.ResponseWriter, r *http.Request) { var err error @@ -8697,7 +9246,7 @@ func (siw *ServerInterfaceWrapper) BillingArchiveProfile(w http.ResponseWriter, } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingArchiveProfile(w, r, id) + siw.Handler.DeleteBillingProfile(w, r, id) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8707,8 +9256,8 @@ func (siw *ServerInterfaceWrapper) BillingArchiveProfile(w http.ResponseWriter, handler.ServeHTTP(w, r) } -// BillingGetProfile operation middleware -func (siw *ServerInterfaceWrapper) BillingGetProfile(w http.ResponseWriter, r *http.Request) { +// GetBillingProfile operation middleware +func (siw *ServerInterfaceWrapper) GetBillingProfile(w http.ResponseWriter, r *http.Request) { var err error @@ -8722,7 +9271,7 @@ func (siw *ServerInterfaceWrapper) BillingGetProfile(w http.ResponseWriter, r *h } // Parameter object where we will unmarshal all parameters from the context - var params BillingGetProfileParams + var params GetBillingProfileParams // ------------- Optional query parameter "expand" ------------- @@ -8733,7 +9282,7 @@ func (siw *ServerInterfaceWrapper) BillingGetProfile(w http.ResponseWriter, r *h } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingGetProfile(w, r, id, params) + siw.Handler.GetBillingProfile(w, r, id, params) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -8743,8 +9292,8 @@ func (siw *ServerInterfaceWrapper) BillingGetProfile(w http.ResponseWriter, r *h handler.ServeHTTP(w, r) } -// BillingUpdateProfile operation middleware -func (siw *ServerInterfaceWrapper) BillingUpdateProfile(w http.ResponseWriter, r *http.Request) { +// UpdateBillingProfile operation middleware +func (siw *ServerInterfaceWrapper) UpdateBillingProfile(w http.ResponseWriter, r *http.Request) { var err error @@ -8758,7 +9307,7 @@ func (siw *ServerInterfaceWrapper) BillingUpdateProfile(w http.ResponseWriter, r } handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.BillingUpdateProfile(w, r, id) + siw.Handler.UpdateBillingProfile(w, r, id) })) for i := len(siw.HandlerMiddlewares) - 1; i >= 0; i-- { @@ -11551,73 +12100,73 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl r.Post(options.BaseURL+"/api/v1/apps/{id}/stripe/webhook", wrapper.AppStripeWebhook) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/billing/customer", wrapper.BillingListCustomerOverrides) + r.Get(options.BaseURL+"/api/v1/billing/customer", wrapper.ListBillingProfileCustomerOverrides) }) r.Group(func(r chi.Router) { - r.Delete(options.BaseURL+"/api/v1/billing/customer/{customerId}", wrapper.BillingDeleteCustomerOverride) + r.Delete(options.BaseURL+"/api/v1/billing/customer/{customerId}", wrapper.DeleteBillingProfileCustomerOverride) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/billing/customer/{customerId}", wrapper.BillingGetCustomerOverrideById) + r.Get(options.BaseURL+"/api/v1/billing/customer/{customerId}", wrapper.GetBillingProfileCustomerOverride) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/customer/{customerId}", wrapper.BillingUpsertCustomerOverride) + r.Post(options.BaseURL+"/api/v1/billing/customer/{customerId}", wrapper.UpsertBillingProfileCustomerOverride) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/billing/invoices", wrapper.BillingListInvoices) + r.Get(options.BaseURL+"/api/v1/billing/invoices", wrapper.ListInvoices) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/billing/invoices/{customerId}", wrapper.BillingListInvoicesByCustomer) + r.Get(options.BaseURL+"/api/v1/billing/invoices/{customerId}", wrapper.ListInvoicesByCustomer) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}", wrapper.BillingCreateInvoice) + r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoice", wrapper.InvoicePendingLinesAction) }) r.Group(func(r chi.Router) { - r.Delete(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}", wrapper.BillingDeleteInvoiceByCustomerInvoiceId) + r.Delete(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}", wrapper.DeleteInvoice) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}", wrapper.BillingGetInvoiceByCustomerInvoiceId) + r.Get(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}", wrapper.GetInvoice) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/advance", wrapper.BillingInvoiceAdvance) + r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/advance", wrapper.AdvanceInvoiceAction) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/approve", wrapper.BillingApproveInvoice) + r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/approve", wrapper.ApproveInvoiceAction) }) r.Group(func(r chi.Router) { - r.Delete(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}", wrapper.BillingDeleteInvoiceLine) + r.Delete(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}", wrapper.DeleteInvoiceLine) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}", wrapper.BillingGetInvoiceLine) + r.Get(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}", wrapper.GetInvoiceLine) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}", wrapper.BillingUpdateInvoiceLine) + r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}", wrapper.UpdateInvoiceLine) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/retry", wrapper.BillingInvoiceRetry) + r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/retry", wrapper.RetryInvoiceAction) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/tax/recalculate", wrapper.BillingRecalculateInvoiceTax) + r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/tax/recalculate", wrapper.RecalculateInvoiceTaxAction) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/void", wrapper.BillingVoidInvoice) + r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/void", wrapper.VoidInvoiceAction) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/lines", wrapper.BillingCreateLineByCustomer) + r.Post(options.BaseURL+"/api/v1/billing/invoices/{customerId}/lines", wrapper.CreateInvoiceLineByCustomer) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/billing/profile", wrapper.BillingListProfiles) + r.Get(options.BaseURL+"/api/v1/billing/profile", wrapper.ListBillingProfiles) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/billing/profile", wrapper.BillingCreateProfile) + r.Post(options.BaseURL+"/api/v1/billing/profile", wrapper.CreateBillingProfile) }) r.Group(func(r chi.Router) { - r.Delete(options.BaseURL+"/api/v1/billing/profile/{id}", wrapper.BillingArchiveProfile) + r.Delete(options.BaseURL+"/api/v1/billing/profile/{id}", wrapper.DeleteBillingProfile) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/billing/profile/{id}", wrapper.BillingGetProfile) + r.Get(options.BaseURL+"/api/v1/billing/profile/{id}", wrapper.GetBillingProfile) }) r.Group(func(r chi.Router) { - r.Put(options.BaseURL+"/api/v1/billing/profile/{id}", wrapper.BillingUpdateProfile) + r.Put(options.BaseURL+"/api/v1/billing/profile/{id}", wrapper.UpdateBillingProfile) }) r.Group(func(r chi.Router) { r.Get(options.BaseURL+"/api/v1/customers", wrapper.ListCustomers) @@ -11845,705 +12394,718 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+z9C3MbN7YoCv8VFL99KvYcipbkJJP4q6kpWpZjTWxLo0cymdBXgbpBEttNoNNAS2Jy", - "/d9vYS0Aje5G8yFLtuTw1Jwdi403Ftb78WcvkbNcCia06j37s5fTgs6YZgX89ZxnGReTA3EpecJec6WP", - "zHc1YNc5Falpwq7zTKas92xMM8X6PS56z3q/l6yY9/o9QWes96xnW/d7KpmyGTXduGYzmOJ/CjbuPev9", - "/55U63iCzdST+vT7OMqHfk9znZlxf55STXJaaEXkmOgpIxlXmshS56UmWhKcmHABH7iYqF6/p+e56UyL", - "gs57Hz70F+1SM5Gy9ERTXSqmVt9vo99H7zwcLzyBlzzTrCAXc8KxKXFzE1VNvvqOuVIlS4djzYpVNxt2", - "CffJruksh0Xubu8+3dre2dreOd3eeQb/G2xv7/y31++NZTGjuvesl1LNtjSfsd6izSUFo5pLQVxL3JjS", - "BReTVXb2nI1lwdbbmu1zj/em1oRPdUtwuQgezWt0W8P5YoC4VyotZ6w4LFJWPJ/Df7iYDKT5h1lMylRS", - "8NwcTO9Z73TKCHwiKS9YYn4d9Por7RlHDDe8aJ8nstCwmOWrfD5ftM6LORlzlqVrLfP5fOWFNpZWX+4l", - "KwqesgdyuItW+3kP2UJ9x0phF/sCnsCMCX2/j3vZQj/vSbdXB4t+yagui3sOyIsW+XlPtb4yWOwPBb3v", - "kNq9xM97muG6YKGWGt7v01y0yHuBXesLhDW/5jOuD8djxfQgM/9uL/NtObtghWH/gX8xTH/BdFmIwUiM", - "xAs2pmWmCVdkZ3t71Q3gVOHyUxyn92xne7vfm9FrPitn8Jf5kwv7p2dwuNBsYg8+3ISE/6y0C/We5809", - "rLwDO090C+GKt6MrfkOL90znGU3YMOc/svmBUJpm2TH7vWRKD7BLDGDMFyeK0Tw3++DY16wcVppTPa0W", - "CkP1ewX7veQFS3vPdFGyVQFnmOenpn9jzYfDUk937ZrNv2XB/2D3evFG4P63ucLBGBjoHwpZ5rFXecKN", - "3EGwFRnLgkxMU3IxV+SK6ylh1zTRZEZ1MvWrbgBHfYpwvTRNuZmIZkeFzFmhOcoUDVHEA428+F+WaPOD", - "0nPg/1PG8kP/a7ivQs4i29G00MTLR0ZQP365R54+ffo9QfEJnsCBSLJS8UvWuSUz+i0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3m+cXJFDxMAeqo", - "VeeHweLasqh6KbKWuPxj1iMamjELBKbTOutrSSt1jV73Kg1rET+tm+guPvo4l+gaG4uOH2tT2WgwKJzn", - "zTWmKxzxekrToylVTN1vdnDBGj8vE1hbGC41o+KeH2bXCj/zUVbLwmUWcszvu5yyaJH3wtRTXyCsGQZ2", - "BvbXXOkBN4gzZS9YxjRLI9ox/E5SbEAS21mtuvjGBFHUZbtbDHUhZcao6FgwDhtXkFarM2dsWg5GYo8q", - "tsWFYkJxzS8ZuLJxmlXq+1W2Af9ZTP3ba80LPqPFfH9Gebbamm0PwkyXW1t8bR3rbmKJUrq+fqsx1brg", - "FyVwZLb7re0lptRubuOD+wia7mGaFkypiFhgP/R7ec0Qk3A9j6rIE1kKXcyXegthM8Onm14ZF2wnOp75", - "shv9kk+lYMhCxL9LpWm2Z6Wd1mcvC7QvuGVUGgohNXAzaoF16kO/yZgxbZib92y+hSJATnmhyIwKOmGp", - "801Tc6XZbED2qJmFXDAykylqxgFaHP9rtf5/glNnIWh2kPae9bZ3vt/5ejdJtuj2zrdbf//+W7r13c7O", - "060d+v3Xu2OWpLvfplFD2TDPYS9ifjjuPft1CVrXBc+Z6fKhv6QlFemFvIam75oHMszzwUgcCkbk+BlI", - "L2C3TLlpNDMMI+p7ZjTPzWU8+7OncLwVpuv37IAr7MFB8/xtYED9gKfynKqYfHyhdGGEOdDdz2TKMpB9", - "rWGWpYTmuQLO9Zg5QdEIX3ketNESrlwWEyqsxAiSIldgVjNytC5Bb6A0FQnrowDNtSLyyojlYswnZWEV", - "CiIlScFAw0EzoDaNR1owI90MI4jplM+Y0nSWGwAF2c8KfLIsEgbSru1dA77e7vbu1+uYnApG00ORzZ1J", - "2rln7jkf09OoacoADhDDG649Z8WMmuvP5o4s380+gGYv3scqGr3gZ2dScvsZkDcosJCd7d2vSTKlBgwt", - "dzGj16+ZmOipkWZ2vw7XFWrcWqviETZmSEpQQjidGbd2/dpiaoe4vfPDt9/89+/ffDN8+fPwx1f7O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s4M", - "5P9qLnL1gYcwbuQstHlyaVf202gzb5nGs2H2YyDANyi5q5TRrMY5k4WTtCGOJVZ1M64VIGeKjUuo5TES", - "upDlBcvUVEqNZpC6UGKFl/BKvOK8Zw1ePVTt4y+oFXSfzi2h9n+jGercmaHOMX+u/+wEtGrwc5uo1P+t", - "5iIJv5u/z8dwDP63K8rNGOe01NLP5b8C23Ou5TmstVp9MHT4ixt8OS/nkgCsVmHG9oUk2AafpValvlKv", - "MO1AW25pL+tGnrAVq1h5SzwqBdePSV5YnnhRJRvvy7T6Xmw60nOYet2T66xx0z6Piu3+iMuyg6x/Za7j", - "l3Nxdkc3vz5/lmtfonMG/+iLtAGFN7tM7PylXSjs6mMv1QVqrn6xEWpaCZ/KZux20rDLTV2Th627QyWs", - "tLnf27B+NpOPmItL3FNoSQghy4WzL+e4qnJvUe7irTey0QUeAV649DWWrWg/ElUeOQqlytAiiEMJpgzD", - "YiQLhcCXoT5rTBMtCzSn0zx3CiQASbOEnBWYK99b6vKgJuBj081b5qF/wgQtuFTkUfi7cusNOBMVFNim", - "M2YEizG/flyT/w7e/rRVqZG3tneW+48vJuydyTbr3xuMr7TVP2uZOCt7ODgl1rJ5OYu39ez1/hJhiGtU", - "37acNTmqzJP1HThHdZ/xq27omsqrhRbF5qPSrFj5LQUu9WoVCXpBgYfjRga3QGn3JdRlCLDMwYtVXIbu", - "PIV3vaBI3ei4Wt2IqJ2z64FFhaeozLSuoLL86Zw0LagLVmhbNVUTDYto3RIKSHd4dACFL1FrykQiywKU", - "auC9kc2d4wSfzUqAwCcolTyhRjoyPwytLhsd8Z2drZhxwUYC/DHYtSZKs7y1joYuhNUlVl+VuKE8com+", - "7cQ3pKRWfd+gpUsV8/EH4O1mrCWb3+QdNCT8UJmz3xDcQwG8QXVBj2NlyECPc6Aad0AowVYwJvtnr137", - "uN/z979gKJZyaBIbofk2/XB+ia3D67evevl7PvWG9YY+HNNceGoD7xhs5FAVDa3kNUVd6zTvQotZleJA", - "LWIY5HT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Srw7PjXr/3YvhLr9/7eX//x16/9+bw7emrXr/3y/7wOG6RbqYRWJAzIp5FoK2N67SwItMET43P", - "IMmb9gbXYPAIb7azG7PopuXNsyb44+7QEgiu/UKdXiOyxia0+SX17UHE+EBboShm3vBsPw1UT1Q7uZkJ", - "80xTIy2nXOG/zep88SOoUXsh9RR+RjxmemuayQlGGze8GBp5P4pkyi9vrGx33W/Z0d8q2ocwOs26bZyb", - "DJaf3Vr6MM1272MK4HtR+s7VYKmyYppFWXbF4og70PYGIh2cDSprwtp7Xhr1M32wCXp/KGSZP5+/5Jlm", - "hVogXMVeQbQyNgxLJmZcw4eNcWTEd+Myc2oPbKYSmYOO7qKQNAW9EBWYXcTj1IIm703//U7XX2pHg6bg", - "ApxlRMv3DB26QV08wY06V1RHJ6C4en8ktHuqbtoEBsfVoy7DtPzHJNdbXzfkaPhieAnzLXTjBM12rS51", - "5GRixQFhOydZObl9QK8eLxyQOgcNzC2/ANypMhuIgLurwR2+l2mkAvfyh/Pwzc0rZiFDU5OVEXm6iFVZ", - "bLX9/GzLBn1v0PcGfW/QdxP1BShuAXYzL6d9qq8xaKpSgCP/DmXNHERUqB8UWlwkWZkyhaYTI93a+6h4", - "XUUe8bRvLiySVyfGO581R6it4BO4TNgbsWdF7Hq8hrLorcpOmzt1gCoIn81KDRdbxnYYvjsE32khy8lU", - "oomKDI8O+iMxrlKTIT3mQrOCJhoTN+opoU7795VqO/D7g5vk+utzBP7IltHRaQU1k9n2AjhbL9zAmdND", - "LTzMsnq8gZ33AcQaOJXIJs7gU8QZvMyoPip4zPJgPtlC5AuSwq7GkbwtZ6zgSYeKzUYSurcezBtxGzKf", - "IyAe986x61y485+5nto0maesmC06CEQkOTYmmhWzz3o0eX3VK3rwm+7hfnFiZ9Dh4pymlxStQpEUlcHe", - "I6saiRdBoB4XxI51tzcpiwuepkwcFfIiY7MQt612JmeCXecs0SxtDtGRr5AVl6wgpUhZobSUqZX+fi+Z", - "0uA7UbBxqcAsSWipp7Lgf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UynfR/YeNobwAoHmtlWWhMblY/SauI311QdsL/ZMeIbPnL3111BVcTPB", - "rsy5t3aE9p+EFZpyHGDVPcaDUL32DQQ+G6gMxEF0nOfyiNJGcrmugT5xRhaXJ8ee40phputZdCKH3mHh", - "icGqv8xlKz+NGYXQly4q8MTBYT1v6dgdtp2nFxZrjflQR9b1APySYjht45z0KZyTul7YwhzonfjHgu7P", - "+89fHR7+uKKxxxGgd/HluM+tFb3tROZX2MW//4ZJ/kGXhDKSwCtG04/L84EeIJAylkxxNIIeP4rkQcyU", - "O8nQ/dGtNRjCLSiWFvcLSZLmsuAsrxUZ5jZ3YMlVlUYHkX8kXXmTLL1wU0Zr7H7RbELcY+RMsYKMC85E", - "ms1r2UWiu/Nis4XiXnsxb2mHyzefCC4mJywponZw/EwUfEcDqyHqjecSemFLB90J45dYlCZ1CukZ1c/I", - "bxdUsW+//g2cllNDiqlI5YxczDVTPuogm5O8YGN+7epf/HY1VSw5/20AcS+zGROmr+J/sGdk9+vaeWDL", - "k28nu69ei9Or9Pvh9NXV2cGbl5PJTyffH47lER2//a5+84+w0+N//kq3/hhu/Xd76/v/++Qf7/58utvf", - "2d6upRtxh2IPbeWctAtZtxhJiXFvX2oRqpjXlaWI5Oz4ta110XrtHNF5feFO9+Dy8xqJu/00gtFvnKcs", - "5F2tV5XZyYoMSFTii3hO4xuDVwBZmgzloqAyQBZ7RdFvCbfw8CjuPaNUG1y+weUfjcvvNx5cH9V1xBx2", - "Slm+nkHDp0cIiRpHtYafbNAp4j8ddSuzxaQgzh+i6G1luz1YARSIkqnPul8qNLF2poUOV7BiEmhPptvn", - "EgpmRpx2KfatIv1uUluvkh6aX7JifqKpLjtUJ64N1Gsq1eKrX1uVAkD2or6MDwtlIFyMbdpWwKzq0rNw", - "G6H48a/dH98e7fxy+p9/H//n1emLf33949Hx34/+u3374gecxRKpw5aHuZl+EiY4siOYZ1VfiTn3Mruh", - "7vPY9IyOeXN96r536IhYPZaiocXHvEShWldowrG0nkt1Gyu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XSLFkCm3mLQhKohkWnzjUBjiIxAuyCBXYPLWp4kdnolxmRS6Q6arKM5f", - "FTNK0sguvMnYlcjgSLYNzYB7xNiZpbn3wi59NFGMxmO//BmjeD83TjwU2wg3MxSzc8YdJQ7yiYlb6dS4", - "nyto0aVwr1lRgre488HYigNgOJGlRHMxTEJddiEdy3xinlfetMChMBWECw6hJGhqVwC7y9nu9dwBsZZk", - "QBX5rudbV1ho+fLaped6EHYc5Tq40SwZPCSXMk/i0MQwFnJAvu3BmbptPxxGX0juNzRQaLu4ts8imTJN", - "epPj1+96k7Np17xCjNs3DoarbodjB91h0DJqZj9T8cwZ0QrRCrXIX7kW+dvek7V3wIEUg4RHZsUJG8GS", - "H0ygpJVVVhYWUBX5YifGSaF3tKEGpEPTREWCRoK+9QRtMcRRzioADeGgHMx0LW9krBuNWHQuc9PVTGvL", - "tfaR6p1BvOFluIP4O5o8F06gggN/9Ym7eEN+DHNq9ARy024Nc1u0smsmOjwg0iHSIdKhYQDCzr31+JgG", - "jxL57GXZwhSlKVXnzECm8W7iPCMWWQ2EQbfrqw57CpplpFRW/SH468kFr0JdMwqj5U45WfxzztR41cPR", - "8m3ugHST1ouzz2s/0JgRmQWZBU/4UGTfz1RHFfm5BnHd/WjGGZuf6oiWhTPxd5L+GFJB1voNzMqupc52", - "jEv42HywM6/j97LM5Xu8YamMEhklMkpklMgoke+jdb3dusbMUJ7oIBHXJ5W7XGhDk8Rees7GzecIh+46", - "O2vLovqCU7L39pC8ZONZMV2SZHtZtvf28CUb+3JW3ldXyuKTgrxI6kC3OLl8vZOKTNnGG+4EOoU6ak04", - "4HnP2bhYP71Zvpq20rG/ubOEcEtnNuNIIJOZvCM0ZSXlRWi4fVP8kIVsOVYSaFZNkQTBskrDxA1Lv9Gk", - "VEWnLvlJiYt+D13wobhOOqP2pc5k1odDe1m2TzW6WCIDIQMhAyED3cM44548sqzADYsq62cgaV+gnUZF", - "RQmBQluO9nIz6pyJY3Cu04SSd8evYAmHhGp2iOESstPpkUEiL+dCEly646t5wcy741d3RalxAOJqL8sg", - "09wqizwKdRTqKNRRqKNQv2uKDSfuwnaWOGm3GZneLd6iRum+V7xnvl2RjFnnTPzCFB9wpkvC3P7iog9c", - "RSMqhgx8lCDEADHy3K5dwi7LA8X0yH2ztNgvmrGyhsQVE+6Hmg5kzMDv5cQKUa3f2qt1B6ytl7FKWL5I", - "2yWfW6Jbdlx5MHvWXuA/y0O+9sJzxZcpdOHI16i0SlT2yK2J1cl7zGKuWOSfCykJKQkpCSkJKemOqT6c", - "vFiVkjxBzDOadNc0WEUyn71s86nIoSpMQY7iD8Ufij8Uf2iPWIimkszz8ujDrIzrfoTPw/gI8lctNDlk", - "Plnn4VPo6iQf1psaglRaRhFfqX6uRj6lV6+YGJpRa/e7b9utlIvw57atyNg3rbXb+p/f6dZfva0nH/72", - "4P/s/rP44+H/81//7//83tv6/sPvva0ne1s//f3l6zdvt05/2XpPt0b/Ok9FtmUutv768HHn8af/qjnp", - "36j9ohPiKLRRaKPQRsdHdHxEarl3RxupR4bVmaXrwrg2kQu4B3pyse8dRMHqkPqvZ2AGLruDOLOE0t1+", - "ON9K+2a2VrvFyBVvuOQilpfLhridufGUp+y9FKveHMIOr9gfEBrZ56pf8d5huGvjQAn1FUE42i3Drkw3", - "0hfVYqYnBjIoMigyKDIoMigy6H1i0DIPlv5/PSINWRLmHyEVaTmcHQyUMedA6SQUinq16ySJQLBBsEGw", - "wRMxlOv39ESskLcLZLqQhg/C00QjKgRLlsi7Vb6NhNvqxfmb0qUHoYIFiaSmUhrVV0e4mHREJUNTNbfR", - "jxYC/riZtEgNj8G1ndDXfg5/+49Q8apP4m++vRmeaibQtZMwLVvWpnVWNe2oSaaEGIcYhxiHGIcYdw8x", - "rpYVSjRXFiHldOtz47y7cON1RTdFfK+RVBuK915Tk2vCF4r2XvfkGN8dRTiKcBThKMJRhC8T3pzWytqF", - "UnyRgqb70f9vQcLEEzkwXolS2xDSHxMeg9LhCFKE11/FdaGJ4aaUkNC+4PD1LDw4BUo9PCw+0Cmebu5h", - "jo+k1tpt9bZffPf4/fePH+89/3Xv5U/Ptnfe/NY7+PnJ859a1WOdtZ7dYAo/5AHkATQ5QZMTBCIEogVA", - "5IDgukDUnueoNYds6vy17jaU9L4a/QfqM5BfkF+QX5BfkF/uhtvWNdEly2vQ5V0W0watzCy1uIvvHLh8", - "rWdIyFDIUMhQyFDIUMhQyFDrYyjPPGs+FIOptarNsrtpscXyM1f4AntliFpP7MNtGZ4ywgU5fn5AHj16", - "9MSuASk1nTMB1sCaX4DjfZ3FLnie1yPZTm/n0VZve6u3fdrb3oV/nV5v+32r3XLlt3ZbRfX1HvDVFj8T", - "8We318ibau1z8EH3OR/TPDE8SxgZMGpyxQiPtX21ztlYV+2n/QU/+s+t7bO819v5bvrrnT+aBsRdUHnK", - "pV2wlnwIb6ff/BD+gh/9Z3iI6a8bHyJ4/W/yIVSewDBUW26//bG3/fcf/r7zj9/e77x5/Ov+by97T549", - "ff98/+T9a/cck4u+Pf72l/c/bf/Qe3n88ufvHr3Z3/ll73HTU9nb6h9papv16vApefBO8AumNE2SMXkn", - "+J85I6/YFY/kUNFsxCP44UQqAwv7IUDVgDP1sAPG9je4MbruCBRH9dOD4H8IXfyPn77//od/7Pcef/f3", - "k94PP7w9+O3UjUP1upPt4+0XT5798ua7neMXO4/2nrz+7u9NQzFZv+/FaHyVfhEgptbiFdFc0k36REAr", - "0CMCt864dUZzStw5okfEjEcECxuzz9k0dj/Cp7eiXNbEAO5Z0sAABNlSWnrfkrk6+i91/O+eAqUvSl+U", - "vqi4RsU14sc9P/xnXqxfDz5UnrBVFdZwz2J99TEU/TnhNaCi2x5bY8mH+CKBNVZUbXdvWK+9Xo3dmdgj", - "52xs1yFKcnerw9eCrHLtoIq728bOIdZBgH3s06OnR7vOcwZKmaxPWia5W6sl0XmWSWVIX5oRgVZTEZOX", - "tmoB65ymKSM6YxEIt0jGbMiEfaG+bEy46yp83XSnUdVRq1n7u3f8/tGbp89enp788u3x8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lQ9bxoTidtr78+TgFCXcUahdJGxf2xsS", - "rs3EY821/dI+qvOZs601YBjqjsntr1D9IhT1jb5tRNqenq4nhiroINBnOn9RI2EKjsszc5cUp8u2p46f", - "H5BHjx49Ia7HO+SpWzkKPXJCtQnudS+Y/V7lwnm2+ivsiOQJdVPEmSWVQhxCj9pBqDsnh4SOmzknn+mg", - "ZyJec/cIedk5E4cDkNZCXtpHF2S47k4y8qa6yL3Imv/FGppSSo45b7LOkyC/lvJrzrYAomrylP1lGQdM", - "aeDEIaJJlCfUBCZw7dCduc0sUnHWxlBpvTs9uGHzirBOeqfTsPLgpg83fbjpw00fbvpw03e/jSxGBYtv", - "evMHQAvOfrUxYVzkiJSqcyfGdIBr53VUibxcs/tz4UcENxysEdx+KgTC6JA9M12oL8qVyzV4ucVE5q4k", - "v+UBO16Z2LkCkTPKprxczQba6JBDQy7BLtmMMx/tpc+s6IzCjgva4buQ9P0L6FsDznpgsewbNlWhzvtF", - "n8E+8F1ovg874qt0e1vbTXUhY6ZLLfdtONUvW1rTJJGXIBRcPJOiAu5CgYgxAKQ39YilfSAty3tOKqKR", - "C+9j6kMWhi0xH0DM9LqYGzBBSpMTHv1Wnmqs37uwtm9WCLiBpiCI0IjQiNCI0IjQiNALENqR6vVPTop6", - "dZmG6wKMnZQu3lCu2nIVrtKbTllbeUhUzCFVIFVguC10sUd0uLvhtnRVrgd4OKmwwYd262qL+xnqxXAT", - "SIAqrvjTOzV5E4uZk/gpqlhKf1Iqe66+Y3JS2tt+8d3j998/frz3/Ne9lz89295581vv4Ocnz3+COiGW", - "cmu39T+/97a+//B7b+vJ3tZPf3/5+s3brdNftt7TrdG/zlORbZmLrb8+fNx5/Om/6k9Tl0m+wK4yKqp5", - "HZjI09bu7+4m+xAf6nM71B+VEmr8hPXKvOKiUlSCEDyW+NPqIp5Yedlzh94Q1wtUXss8DjVfqZ87FeOj", - "AUyi5XmvvfzFz2AYWdz69AExETERMRGVT6h8QoK8f+e3FeCY/mIlngQSi0az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8p2SMZUSTiDz4wz1FqXkCJHdzZZVX7QPSG2eH2", + "Il1wnhHMWhZspm1xrvnVacjqNwcjtosl2aBMEiapopcEvNsUZ6WVucs24D+LmVRzrbmgMyzm+zNMs25r", + "tiMQ0UNubfGVday6iSW20+r6rWFPKUEvChAc7PBb20vM9lrfxkf3EAyywzQVREY8su5Bv5dX/AUJVfOo", + "JTfhBVNivjT6yrymxUk9KqOMbEXn00+2o0/yKWfEcLr4cy4VznatUN547EXW5gE3fB9DxrgCpisXOFE+", + "9uvyA1GaB38g8w0jqeaYColmmOEJSZ2bW86lIrMB2sX6K+iCoBlPjQEXsMWJadY4/SdEUwiGs4O0t9Pb", + "3Hq+9WQ7STbw5tazje+fP8MbP2xtPd7Yws+fbI9Jkm4/S6P+nGGew17Y/HDc2/l1CSVXguZED/nYX/Im", + "ZukFv4ZX39cBMszzwYgdMoL4eAeEbHCvpVS/NNNyjTFLzHCe68PY+bMnzXwdPtfv2Qk77MFh8/xt4Of7", + "aKDyAsuYGnchldA6B5iYZzwlGaho1n9IUoTzXIKAdUycPqN1hDwP3lEcjpyLCWZWsQGFhkrw/mh1TxWg", + "3kqFWUL6Rs+jSiJ+pbVHNqaTQli9l6UoEQQUcZwBt6ldUkG0ED6MEKZTOiNS4VmuERRUFKuX8EIkBJQy", + "O7qCfL3tze0nq3hGBMHpIcvmznMKgYG9nd6uC1c5jXpQNOIAM7zh2nMiZlgffzZ3bPlu9gE8e/E+uhie", + "gp+d58PtZ4DeGLkabW1uP0HJFGs0tNLFDF+/Jmyiplro3n4Sris0DDVWRSNizBAVoCs70w617ufKYipA", + "3Nz68dnT/37/9Onw5bvhT6/2t7bf/rK5++/nL19pVMRKk6neTu///XVz4/v3v25uPB9uvPrXT2/eHm2c", + "/rzxX7wx/d+HGcs31OXGH+//3H768W8LAH2wF9uHja8DQpZlHQhZEETw2o5tkiktfM7KF10UnzEHKLis", + "4a3XV1dThRQZQbq6hY/93owonGKFV1imGxGhoaURzM0bPSZWZBm+0L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Rw10a6TeSdua1smdEdswfAb9", + "QxPrCpvTz7AZ+o/qEzQqNjcfJ3rIlf03ClgFDBTJlF6SFD1ClDVnOeXhHHqA3ntaZCRF8WmD74bTLEnp", + "MVn530K5oksipJeJrPS4VceNn81LFcRABywx7aRI2uTQwb7CNmBtK7UfWN7dC7xVLsCrJRbMKB+Xfsqg", + "Z730mermTkXVoAwz4/Bb0HzefHt58/n7KtTfR2F4LUasxYi1GPG5xYh4N3tDQwPKuYRgrm41agYhNOg2", + "0NhzHNB3/UebJekrCEEAg9c67OBzhB2Ul+IL0peIC+U+Mt6USnDetpUYcI+d7O9Ei044v2dHhwlne/6D", + "zbuwlgL+WlKAvlW7+lK1VHAILt14dew7trOH2Hfsp4zr1EINx9GmptCWGC69fo6upjSZlloPjJRILwIL", + "2741pAvS9mUp9byjrV+29ipKne2RuuCwTT9f41NZ5u4xDNUCvoRzZZMLaeetqUFrureme2u6t6Z7Xwnd", + "+0pUCa/0rfWJz6dPGHtqB54orBF0zR1vgTuuGc+a8dxPxhOlFMcEDHpJlE7YRxBST65xojyEq2QhKhF6", + "44XN072b3uKhUyj6dfvGYLnHpmrVe98KsDzDyXLi+nWT1DUVWzsP/gLOgyW+gkXlTMsIBOypog+jF3hs", + "EqcUvdTfccEAWrJ3bv5W98BJANpdffwRBDe/V0/BRz3EiTReEL53z/sfh77p7h5p19HOJsRFzvEFFEzN", + "BU+I1HitOfQMs9TWQrGjfcmKQl64wYMR00jwgcwtMBCV6LdHBp8e/Qn//YnMPz4C1H70p/6P/vs3KAwx", + "TNOSMWh1QRLNuSH5dkZmF0RUQ1gSF5FrarZcUTXlhUI4U0S41UFXX/2HmUDCh47JjF+S8FvC/KJH2C/5", + "XDCXBFa5kd1C/kOU3U+pGqapvp5L4/7r48x6zdD3teIHmxHt0YZld5BGPqmYx2eQXj5RNqm9DoCpeEWD", + "29+4F63kLyRELQZW8/uaEHUhREQcpN9CvaI1WV2T1TVZXUpWK9c+SmP1dc5O+QfCYpBNOJPFj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Ei/MNAH4r5PD", + "tyjHAhrJ1eSIcFJ0OqXS9mXSalQmeenLhsJdyZQkHzRUQyps2lMYl5yLORoXme2WZigr6IKUkY2JMP44", + "O8iTYHtq9g70EdUsxtYMowzNeSEQv2JIzqUiswF6hX3lbYYMvKsu9j/RyNxiGyI26u2gX0c9E3Qz6r1H", + "H0ME+J/8wnkYizwz1oTetSa8RYVF6LhY5b+P7sRgxTd0LAYz3LKLsTLzqs7GcHDodgzckbHSr/rphomm", + "jBlmjIrloy3h9TsyxCyho2tzytoxsXZMfHs2nyadKqOGqgBaW1uWWltChvalvQL1A43H/YUmPKM61JhR", + "F/6/sj1Rg2ZRJMIpPPVDd/lsRhXEYNj4qqVRb/VhnyoqtJtG+x3j8JorWnJx2mHQImAslgbXosZa1Fh7", + "btZcfM3FPycXvwH/dk73Nluaf6HaBIuVBjaNmJghzJIpF1UfW8/8uDjBxE2k8XT4S8A7XdaSnaPJZMrU", + "FvMO2HawdaSI+sLr6RQr55Xakxnab7Vkm5bb6Xydqmdw4CZYEEqv8YkGBMN9NETQcp56kXv3oO9g2wEz", + "TMrwAcsLtUaSvxKSdMCNg2A3q66lTPf5LcXz3/rotytCPuj/zjhT09/6mkL/NidY/BZSTY0E/d67/f2f", + "ev3em8O3p696/d4v+8PjqLfApNJCHZKTKR0rq03Eqo4JkoQSnK3AogcZYza2P1GXPlwh5m/Jter1e0eC", + "XLYsRBIVSF/AQVsvFXiZsMAm2bIhHft+IkO1qLaVCgpbWTcN/uC7evUd6wPLOONXA3TqX0wwY1yhC9+1", + "f1yAvRkZbQ5a6KWl7V+JgiXgfbWG+RllhTLNehVHU36FplQqLmhi5CwiEEhaVCL9c6RRyadl/tccYrHG", + "n4qIGegkV1MC7YdbfWAc7FXQgroPbwia+oTz8ki/k16YuCBTfEm5GIzYBlrqZHNvBe614DX36UHUdSaI", + "wpQNW4hgyy6NBm4JnyWOgNY2+4mL0q1X6ckztM0rG9taMmNkh60jFn03AoJYpbQTzNILfj3M8yZI7D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r46v9br91", + "boREDcgiSQhJW9I3zApP9GbNVlo3AQCxW4j1vzbiaku192Csl2wHXVlnYwaaDpbGoXhCe1RZ52IJovkp", + "N2dUI6zBevnCmxJ801NSmfNcP5crzwwUqNobYGmlz1WJc/s1aFP1g+W6KxClGZ4UeKQKzrb98p+G8S0L", + "Y1U0/ytpcz0TJ0YzjoykYCdJCfgfKuVgU57IgVVtEj57pPC1/v8b+m1ZIcjqOknPtzbN/6uKcvBoNEr/", + "/OHj3xoRLulykpssJo/vyMWU8w/7l4vu+ZV5CfJeVavToyWX9xIuuM38VI5tVSL/KFOPt6Opeu7uts3r", + "7mF1QdxXAl2OrSGdq8OOtxfTpAu32yIkLBZLFwic7dKF+Z5+PujGfS0v9UvxjLhnob0UV9ob49XQxXXH", + "ixSsz/NvqXD7t1KGXktmMscJ+Ra2E+lP4/bWtwgYRfWyjHAjUcaWBAiLs9dUd4wKSQTiwkQdzOv2WGPR", + "NpE5+yz1cRTbIItv7sD//usrots3oQ9ZLeYieDc1OpaNZnemR/TWyNnLjbvGZOhLJQOZCAWnaXEhc24M", + "Z8Zm1vPK025wAfQU5/96c5glSv708w8R81hj+1+iknYD1qt0qqieyJcrBL7y8itI0sTtadUmkAZqu7cN", + "WPyvLqqObg0zxadawqJf/SIVxlvy58zS+3UQ/v/svftuG7my8PsqhLA3JjlblmRnMrNiYLDhXMcrF2ds", + "J1kz4+w1VDclcbmb7CHZljU5AfZDnD/P93LrST6wSLa6pZbUciQntgsIIEdi896sH4vFqqZNqb53V9nB", + "fF7lOmd2jZt/dWd8ppff4pVDWkcZtqsWrK5LtLMnlRBopSCJM7HRtAEHJAvi4JzK+ZwPB2EAKgWETbZd", + "sKUZMTXmmjnHIkZCBLeQJYmZkMZfnLY/2Jdt07FwbvDpQTmOT7PNYjWiD+wPvR+M1ruTp626/WIoBHY+", + "Qc9XHtPOmfjgfc0odsGdhtj2DyM0jkmaJ4ZPc9F5lkllyia3oVKr2O60fNvm8GltXa6f3/AIB49wVh/h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tku+NEe37Lj8YPZsPMN/lod845nnijfJdOXI", + "16i0SlT2wK2J1cl7zGKuWOTbhZSElISUhJSElHTLVB9OXqxLSZ4glhlNujQLrCKZj162/VDkUBSGIEfx", + "h+IPxR+KP7RHLERTSeZ5efRxXsZ1P8HnYXwE8atWmhwyH6zz8Cl0dZIP600NQSo1UcRXil+qkU/p5Ssm", + "hmbU2v/h+3Yr5SL8d9cWZOyb1tpv/c/vdOev3s6jj/9177/3/1n85/7/8x//7//83tv58ePvvZ1HBzs/", + "//3l6zdvd07f7/xGd0b/Ok9FtmMudv76+Gnv4ef/qDnp36r9ohPiKLRRaKPQxouPePERqeXOHW2kHhnW", + "Z5auc+O6iFzgeqAnF/vegResDqn/eg5mINktxJkGSnf74e5W2jeztd4jRq75wJiLWI6buride/CUp+w3", + "KdZ9OLgdXrM/wDWyj1W/5rPD8NTWgRLKK5xwtFuGXZpupC+q2cxODGRQZFBkUGRQZFBk0LvEoGUeLP19", + "NSINURKWHyEVYTmcHQzkseRA6SRkinq1qwSJQLBBsEGwwRMxlOt39ESskLcrZLqQhg9Ca6IRFYIlDeJu", + "lR8j4bF6cf6mlPRJKGBFIKmZkEb1xREuph1RidBUjW30k4WAP64nLNKCZnBtJ/SV2+Ef/wkKXrcl/uGb", + "G+GpZgJdOQhT07y2rbOqqUdNMCXEOMQ4xDjEOMS4O4hxtaxQormyCCmHW1/q5925G6/LepHH9xpJtSV/", + "7zUluSp8JW/vdS1H/+4owlGEowhHEY4ivIl7c1ora1dK8VUKmu4n/9eKgIkncmC8EqW2IqQ/ITwGpcMR", + "hAivT8V1oYnhphSQ0L7g8PU8PDgFSj08rD7QKVq39DDHe1Jr7bd6uy9+ePjbjw8fHjz/cPDy52e7e29+", + "7T355dHzn1vVY52Nnt1gCD/kAeQBNDlBkxMEIgSiFUDkgOCqQNRedlFrCdnU3de63VDS+2b0H6jPQH5B", + "fkF+QX5Bfrkd17auiC5ZXoMu77KYLtDKzFOLS3zrwOVbPUNChkKGQoZChkKGQoZChtocQ3nm2fChGEyt", + "dW2W3UOrLZafucxX2CuD13piG7djeMoIF+T4+RPy4MGDR3YNSKnpnAmwBtb8Ai7e11nsws3zeiTb6+09", + "2Ont7vR2T3u7+/Cv0+vt/tZqt1z+rf1WUXz9DfhqjZ+J+Ivra+R11fY53EH3MR/TPDE8SxgZMGpyxQiP", + "tX21ztlEV+2nfYKf/OfO7lne6+39MPv13h+LBsQlqLSy8RWsho3wdvqLG+ET/OQ/QyNmv17YiHDrf5uN", + "UHkCw1Ctuf32p97u3//2971//Prb3puHHx7/+rL36NnT354/PvnttWvHNNH3x9+//+3n3b/1Xh6//OWH", + "B28e770/eLioVfax+ibNbLNeHT4l994JfsGUpkkyIe8E/zNn5BW75JEcKpqNeAQ/nEhlYGE/BKgacKbu", + "d8DY/ho3RlcdgeKofnYQ/A+hi//x848//u0fj3sPf/j7Se9vf3v75NdTNw7VdCe7x7svHj17/+aHveMX", + "ew8OHr3+4e+LhmK6ft+J0fgm70WAmNrIrYjFOV3nnQioBd6IwK0zbp3RnBJ3jngjYu5GBAsbsy/ZNHY/", + "wae3omxqYgDPNDQwAEHWSEvva7JUR/+1jv9dK1D6ovRF6YuKa1RcI37c8cN/5sX61eBD5QlbV2ENz6zW", + "Vx9D1l/iXgMKuum+NRo24qs41lhTtd29Zr32ZjV2Z+KAnLOJXYcoyd2jDl8Lssq1gyruHpu4C7EOAmyz", + "T4+eHu27mzOQy3R90jLJ3Votic6zTCpD+tKMCNSaipi8tEULWOc0TRnRGYtAuEUyZkMm7Av1dX3CXVXh", + "66Y7jaoXtRZrfw+Of3vw5umzl6cn778/Pn7+/JcfHr14+PzgfY32d+/Xh//4/s2bF7+cPNh78vxvux8e", + "PXz24Era35uqTrWr6Ea0qQszuk5lqq0E6lJxN4e7OdSl4mYGdalzulTlNw2bdi1j823iV+bYHeZv2yDY", + "FvPNeJSBNqM7GZTZKLNRZqPMRpl9BXcy3gjuC5SQ3U/246peZMDsb7kLGWcZuAn/MR4SVh+k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rLJ5659/03CUtuE1V4Sy6lhyaDE", + "Z9ghz6Ui0YhF53ZWlhISGtn1vU1y7ca6e0GTnJXOZlxIr/qd9YnL/lm5mk3OYartXHoYU3OQskZsMHcd", + "Lr7e4GCN9uilPsM9OkIEQgRCBEIE7tG1qYjxEjmUhSy595gZen/JNv0oYwLOsmH1MCPFGLEyRhM5qJSw", + "7zTxLG4TLwHb4MZNG2p45ELH2gftIp4xZSYktulTLphb0OHHaqbuKXiRk4mdwQNGTa6cMzi3qttepYbb", + "aTLmZgQ5lbEEctUZi/jArnZcVOaQFwI01L3yqGAs1oQWhVKtZeRmCRTln7oPboB2yGPX6io9xWzABfOd", + "MM3Js5ItnZy1nthXWjNycnI0s+6etTo26xP3eCXnhBkykTnJqNaEJlIMnS5lwIe5oys71xNGhooKK5Jm", + "S32n3ZrAdVEvaNY/yK9EM2Mf0Wctcs8WMO05V8J9qNbr+U7TZEQvGEmpmECTIqqZbruVyGdK8ozkVpLu", + "9KnN2FULnESnmcvFprIDm7BLkDzcSmVtaahDyDNnsbwPcyPKtZGpowUocLfX6/XIwaHXSJE4V2Hpg0It", + "FnBZRJYtTzY7jAdkyC+YCLwL2UqRTFyzpGAhAO09IcWOd+p0vzJtMqZCh75kkw45HMA4GTUBS6Sg9hJs", + "XHnMcfb0Qbee00QxGk9gwtMi+m3puXZlPsO6NqA8CTP0+94jt1SUfFVVpigsuN6joq2mp65UxnwwIdy0", + "XfNdS0FG1ivmyhi6ZXLf0k28Ugtckw5Flht93R4zKzyPPjOR95H3t2w79GjjLXgixSDhkVlzvCKZJ7Ef", + "MS//7EtbgG7ks52STjAsgnDoQabVjRPuanBXc1tUo1WAWbmzWVtB2v1U+p9N8byAss9doOkGOlSXjnCt", + "c+Z8SVar7bY2ZRCzqNlnfscQE8bNyEVt4TYfGP0SVtaqUUsd8MLVc/tK1JoMF3bft6agbVhECLDSbvgC", + "QN8fhags164GhuJRF4xsiGyIumCkJtQFV3XBHk2urBF2ZBE0m5T02YhecKns9q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ZP/+3/8vuI01I5aCrOQ+ZWlt", + "s42wq56SiZOk0sX3sEuR0A5xnfzUsKSSV69el/uxzrlZTVSM4NvWziWYs5yFwCfuvSwVY2fTmOsROJeF", + "iAzkdMQ0LHY+ZATIPvuu6rYXLd7WRjsB5UafwZ8uBkzMNB/C0UjhZ5fb+WyXey4FOLAdMsEUj+zrQfuw", + "eA0SdglDXe4x6oLGXNjRzbWrYmXEO+Q0OPptE1qEeKaRi7pMSS74nzkjHNh6wJmqjI6eaMNSHxbZNtIK", + "vDAnOuT3Y0ZjkkrFPt4LS7PMmHBdxWU3lpHuRonM48It8/3SiIWxqBmmAz+xgDKCG14qJm6HZcdFMB9L", + "Q9HonNAoyhVYqTtXyOC5xNY7uDC2TRA0mRgeaZLlKpPaDkjDJkhht1m6C5XacdFyyi15Bt/UtOM1KAhg", + "soF9lgWJ4VCxoaXDUhPd3JhAQjdBXGI5GDA1jQoUnrWDb7ebMnaLpItvQTT/i2m7pYQwjdyQER/a95zG", + "NDMBcdzIhmXbdmP5LXIVbn3++Pn/BgAA//9Vu4/8eQEHAA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/api/openapi.yaml b/api/openapi.yaml index 9f58bcf70..c73080f08 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -280,7 +280,7 @@ paths: x-internal: true /api/v1/billing/customer: get: - operationId: billingListCustomerOverrides + operationId: listBillingProfileCustomerOverrides summary: List customer overrides description: List customer overrides parameters: @@ -299,15 +299,15 @@ paths: - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/LimitOffset.offset' - $ref: '#/components/parameters/LimitOffset.limit' - - $ref: '#/components/parameters/CustomerOverrideOrderByOrdering.order' - - $ref: '#/components/parameters/CustomerOverrideOrderByOrdering.orderBy' + - $ref: '#/components/parameters/BillingProfileCustomerOverrideOrderByOrdering.order' + - $ref: '#/components/parameters/BillingProfileCustomerOverrideOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/CustomerOverridePaginatedResponse' + $ref: '#/components/schemas/BillingProfileCustomerOverridePaginatedResponse' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -349,9 +349,9 @@ paths: x-internal: true /api/v1/billing/customer/{customerId}: post: - operationId: billingUpsertCustomerOverride - summary: Create/update a customer override - description: Create/update a new customer override. + operationId: upsertBillingProfileCustomerOverride + summary: Create a new or update a customer override + description: Create a new or update an existing customer override. parameters: - name: customerId in: path @@ -366,13 +366,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingCustomerOverride' + anyOf: + - $ref: '#/components/schemas/BillingProfileCustomerOverride' + - $ref: '#/components/schemas/BillingProfileCustomerOverride' '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: - $ref: '#/components/schemas/BillingCustomerOverride' + $ref: '#/components/schemas/BillingProfileCustomerOverride' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -422,12 +424,12 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingCustomerWorkflowOverride' + $ref: '#/components/schemas/BillingProfileCustomerOverrideCreate' x-internal: true get: - operationId: billingGetCustomerOverrideById + operationId: getBillingProfileCustomerOverride summary: Get a customer override - description: Get a customer override by id. + description: Get a customer override by customer id. parameters: - name: customerId in: path @@ -442,7 +444,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingCustomerOverride' + $ref: '#/components/schemas/BillingProfileCustomerOverride' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -489,9 +491,9 @@ paths: - Billing (Experimental) x-internal: true delete: - operationId: billingDeleteCustomerOverride + operationId: deleteBillingProfileCustomerOverride summary: Delete a customer override - description: Delete a customer override by id. + description: Delete a customer override by customer id. parameters: - name: customerId in: path @@ -550,7 +552,7 @@ paths: x-internal: true /api/v1/billing/invoices: get: - operationId: billingListInvoices + operationId: listInvoices summary: List invoices description: List invoices parameters: @@ -566,11 +568,11 @@ paths: description: ULID (Universally Unique Lexicographically Sortable Identifier). title: Filter by the customer ID or key explode: false - - $ref: '#/components/parameters/BillingInvoiceListParams.statuses' - - $ref: '#/components/parameters/BillingInvoiceListParams.extendedStatuses' - - $ref: '#/components/parameters/BillingInvoiceListParams.issuedAfter' - - $ref: '#/components/parameters/BillingInvoiceListParams.issuedBefore' - - $ref: '#/components/parameters/BillingInvoiceListParams.expand' + - $ref: '#/components/parameters/InvoiceListParams.statuses' + - $ref: '#/components/parameters/InvoiceListParams.extendedStatuses' + - $ref: '#/components/parameters/InvoiceListParams.issuedAfter' + - $ref: '#/components/parameters/InvoiceListParams.issuedBefore' + - $ref: '#/components/parameters/InvoiceListParams.expand' - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/LimitOffset.offset' @@ -624,19 +626,10 @@ paths: - Billing (Experimental) x-internal: true /api/v1/billing/invoices/{customerId}: - post: - operationId: billingCreateInvoice - summary: Create an invoice - description: |- - Create a new invoice from the pending line items. - - This should be only called if for some reason we need to invoice a customer outside of the normal billing cycle. - - When creating an invoice, the pending line items will be marked as invoiced and the invoice will be created with the total amount of the pending items. - - New pending line items will be created for the period between now() and the next billing cycle's begining date for any metered item. - - The call can return multiple invoices if the pending line items are in different currencies. + get: + operationId: listInvoicesByCustomer + summary: List invoices + description: List invoices for a specific customer parameters: - name: customerId in: path @@ -645,15 +638,24 @@ paths: type: string example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + - $ref: '#/components/parameters/InvoiceListParams.statuses' + - $ref: '#/components/parameters/InvoiceListParams.extendedStatuses' + - $ref: '#/components/parameters/InvoiceListParams.issuedAfter' + - $ref: '#/components/parameters/InvoiceListParams.issuedBefore' + - $ref: '#/components/parameters/InvoiceListParams.expand' + - $ref: '#/components/parameters/Pagination.page' + - $ref: '#/components/parameters/Pagination.pageSize' + - $ref: '#/components/parameters/LimitOffset.offset' + - $ref: '#/components/parameters/LimitOffset.limit' + - $ref: '#/components/parameters/InvoiceOrderByOrdering.order' + - $ref: '#/components/parameters/InvoiceOrderByOrdering.orderBy' responses: - '201': - description: The request has succeeded and a new resource has been created as a result. + '200': + description: The request has succeeded. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/BillingInvoice' + $ref: '#/components/schemas/InvoicePaginatedResponse' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -692,17 +694,21 @@ paths: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing (Experimental) - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/BillingInvoiceCreate' x-internal: true - get: - operationId: billingListInvoicesByCustomer - summary: List invoices - description: List invoices for a specific customer + /api/v1/billing/invoices/{customerId}/invoice: + post: + operationId: invoicePendingLinesAction + summary: Invoice a customer based on the pending line items + description: |- + Create a new invoice from the pending line items. + + This should be only called if for some reason we need to invoice a customer outside of the normal billing cycle. + + When creating an invoice, the pending line items will be marked as invoiced and the invoice will be created with the total amount of the pending items. + + New pending line items will be created for the period between now() and the next billing cycle's begining date for any metered item. + + The call can return multiple invoices if the pending line items are in different currencies. parameters: - name: customerId in: path @@ -711,24 +717,15 @@ paths: type: string example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - - $ref: '#/components/parameters/BillingInvoiceListParams.statuses' - - $ref: '#/components/parameters/BillingInvoiceListParams.extendedStatuses' - - $ref: '#/components/parameters/BillingInvoiceListParams.issuedAfter' - - $ref: '#/components/parameters/BillingInvoiceListParams.issuedBefore' - - $ref: '#/components/parameters/BillingInvoiceListParams.expand' - - $ref: '#/components/parameters/Pagination.page' - - $ref: '#/components/parameters/Pagination.pageSize' - - $ref: '#/components/parameters/LimitOffset.offset' - - $ref: '#/components/parameters/LimitOffset.limit' - - $ref: '#/components/parameters/InvoiceOrderByOrdering.order' - - $ref: '#/components/parameters/InvoiceOrderByOrdering.orderBy' responses: - '200': - description: The request has succeeded. + '201': + description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: - $ref: '#/components/schemas/InvoicePaginatedResponse' + type: array + items: + $ref: '#/components/schemas/Invoice' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -767,10 +764,16 @@ paths: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing (Experimental) + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/InvoicePendingLinesActionInput' x-internal: true /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}: get: - operationId: billingGetInvoiceByCustomerInvoiceId + operationId: getInvoice summary: Get an invoice description: Get an invoice by ID. parameters: @@ -794,17 +797,24 @@ paths: schema: type: array items: - $ref: '#/components/schemas/BillingInvoiceExpand' + $ref: '#/components/schemas/InvoiceExpand' default: - lines explode: false + - name: includeDeletedLines + in: query + required: true + schema: + type: boolean + default: false + explode: false responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/BillingInvoice' + $ref: '#/components/schemas/Invoice' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -851,7 +861,7 @@ paths: - Billing (Experimental) x-internal: true delete: - operationId: billingDeleteInvoiceByCustomerInvoiceId + operationId: deleteInvoice summary: Delete an invoice description: |- Delete an invoice @@ -922,7 +932,7 @@ paths: x-internal: true /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/advance: post: - operationId: billingInvoiceAdvance + operationId: advanceInvoiceAction summary: Advance the invoice's state to the next status description: |- Advance the invoice's state to the next status. @@ -951,7 +961,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingInvoice' + $ref: '#/components/schemas/Invoice' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -999,7 +1009,7 @@ paths: x-internal: true /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/approve: post: - operationId: billingApproveInvoice + operationId: approveInvoiceAction summary: Send the invoice to the customer description: |- Approve an invoice and start executing the payment workflow. @@ -1030,7 +1040,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingInvoice' + $ref: '#/components/schemas/Invoice' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -1078,7 +1088,7 @@ paths: x-internal: true /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}: get: - operationId: billingGetInvoiceLine + operationId: getInvoiceLine summary: Get an invoice line description: Get an invoice line parameters: @@ -1104,12 +1114,12 @@ paths: example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: - '204': - description: 'There is no content to send for this request, but the headers may be useful. ' + '200': + description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/BillingInvoiceLine' + $ref: '#/components/schemas/InvoiceLine' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -1156,7 +1166,7 @@ paths: - Billing (Experimental) x-internal: true delete: - operationId: billingDeleteInvoiceLine + operationId: deleteInvoiceLine summary: Delete an invoice line description: Delete an invoice line parameters: @@ -1230,7 +1240,7 @@ paths: - Billing (Experimental) x-internal: true post: - operationId: billingUpdateInvoiceLine + operationId: updateInvoiceLine summary: Update an invoice line description: Update an invoice line parameters: @@ -1261,7 +1271,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingInvoiceLine' + $ref: '#/components/schemas/InvoiceLine' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -1311,11 +1321,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingInvoiceLineCreate' + $ref: '#/components/schemas/InvoiceLineReplaceUpdate' x-internal: true /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/retry: post: - operationId: billingInvoiceRetry + operationId: retryInvoiceAction summary: Retry advancing the invoice after a failed attempt. description: |- Retry advancing the invoice after a failed attempt. @@ -1342,7 +1352,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingInvoice' + $ref: '#/components/schemas/Invoice' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -1390,7 +1400,7 @@ paths: x-internal: true /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/tax/recalculate: post: - operationId: billingRecalculateInvoiceTax + operationId: recalculateInvoiceTaxAction summary: Recalculate an invoice's tax amounts description: |- Recalculate an invoice's tax amounts (using the app set in the customer's billing profile) @@ -1417,7 +1427,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingInvoice' + $ref: '#/components/schemas/Invoice' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -1465,7 +1475,7 @@ paths: x-internal: true /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/void: post: - operationId: billingVoidInvoice + operationId: voidInvoiceAction summary: Void an invoice description: |- Void an invoice @@ -1494,7 +1504,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingInvoice' + $ref: '#/components/schemas/Invoice' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -1544,11 +1554,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingVoidInvoiceInput' + $ref: '#/components/schemas/VoidInvoiceActionInput' x-internal: true /api/v1/billing/invoices/{customerId}/lines: post: - operationId: billingCreateLineByCustomer + operationId: createInvoiceLineByCustomer summary: Create line items description: |- Create a new pending line item (charge). @@ -1576,7 +1586,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingInvoiceLines' + type: array + items: + $ref: '#/components/schemas/InvoiceLine' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -1620,11 +1632,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LinesUpdate' + type: array + items: + $ref: '#/components/schemas/InvoiceLineCreate' x-internal: true /api/v1/billing/profile: get: - operationId: billingListProfiles + operationId: listBillingProfiles summary: List billing profiles description: List all billing profiles parameters: @@ -1647,15 +1661,15 @@ paths: - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/LimitOffset.offset' - $ref: '#/components/parameters/LimitOffset.limit' - - $ref: '#/components/parameters/ProfileOrderByOrdering.order' - - $ref: '#/components/parameters/ProfileOrderByOrdering.orderBy' + - $ref: '#/components/parameters/BillingProfileOrderByOrdering.order' + - $ref: '#/components/parameters/BillingProfileOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/ProfilePaginatedResponse' + $ref: '#/components/schemas/BillingProfilePaginatedResponse' '400': description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). content: @@ -1696,7 +1710,7 @@ paths: - Billing (Experimental) x-internal: true post: - operationId: billingCreateProfile + operationId: createBillingProfile summary: Create a new billing profile description: |- Create a new billing profile @@ -1754,19 +1768,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingProfileCreateInput' + $ref: '#/components/schemas/BillingProfileCreate' x-internal: true /api/v1/billing/profile/{id}: delete: - operationId: billingArchiveProfile - summary: Archive a billing profile - description: Archive a billing profile + operationId: deleteBillingProfile + summary: Delete a billing profile + description: Delete a billing profile parameters: - name: id in: path required: true schema: type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' @@ -1816,8 +1832,8 @@ paths: - Billing (Experimental) x-internal: true get: - operationId: billingGetProfile - summary: Get a billing profile by ID + operationId: getBillingProfile + summary: Get a billing profile description: Get a billing profile by ID parameters: - name: id @@ -1825,6 +1841,8 @@ paths: required: true schema: type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - name: expand in: query required: false @@ -1886,7 +1904,7 @@ paths: - Billing (Experimental) x-internal: true put: - operationId: billingUpdateProfile + operationId: updateBillingProfile summary: Update a billing profile description: Update a billing profile parameters: @@ -1895,6 +1913,8 @@ paths: required: true schema: type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '200': description: The request has succeeded. @@ -1951,7 +1971,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BillingProfile' + $ref: '#/components/schemas/BillingProfileReplaceUpdateWithWorkflow' x-internal: true /api/v1/customers: post: @@ -7146,57 +7166,24 @@ paths: x-internal: true components: parameters: - BillingInvoiceListParams.expand: - name: expand - in: query - required: false - schema: - type: array - items: - $ref: '#/components/schemas/BillingInvoiceExpand' - title: What parts of the list output to expand in listings - explode: false - BillingInvoiceListParams.extendedStatuses: - name: extendedStatuses - in: query - required: false - schema: - type: array - items: - $ref: '#/components/schemas/BillingInvoiceExtendedStatus' - title: Filter by invoice extended statuses - explode: false - BillingInvoiceListParams.issuedAfter: - name: issuedAfter - in: query - required: false - schema: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - title: Filter by invoice creation time - explode: false - BillingInvoiceListParams.issuedBefore: - name: issuedBefore + BillingProfileCustomerOverrideOrderByOrdering.order: + name: order in: query required: false + description: The order direction. schema: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - title: Filter by invoice creation time + $ref: '#/components/schemas/SortOrder' + default: ASC explode: false - BillingInvoiceListParams.statuses: - name: statuses + BillingProfileCustomerOverrideOrderByOrdering.orderBy: + name: orderBy in: query required: false + description: The order by field. schema: - type: array - items: - $ref: '#/components/schemas/BillingInvoiceStatus' - title: Filter by the invoice status + $ref: '#/components/schemas/BillingProfileCustomerOverrideOrderBy' explode: false - CustomerOrderByOrdering.order: + BillingProfileOrderByOrdering.order: name: order in: query required: false @@ -7205,15 +7192,15 @@ components: $ref: '#/components/schemas/SortOrder' default: ASC explode: false - CustomerOrderByOrdering.orderBy: + BillingProfileOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: - $ref: '#/components/schemas/CustomerOrderBy' + $ref: '#/components/schemas/BillingProfileOrderBy' explode: false - CustomerOverrideOrderByOrdering.order: + CustomerOrderByOrdering.order: name: order in: query required: false @@ -7222,13 +7209,13 @@ components: $ref: '#/components/schemas/SortOrder' default: ASC explode: false - CustomerOverrideOrderByOrdering.orderBy: + CustomerOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: - $ref: '#/components/schemas/BillingCustomerOverrideOrderBy' + $ref: '#/components/schemas/CustomerOrderBy' explode: false EntitlementOrderByOrdering.order: name: order @@ -7281,6 +7268,56 @@ components: schema: $ref: '#/components/schemas/GrantOrderBy' explode: false + InvoiceListParams.expand: + name: expand + in: query + required: false + description: What parts of the list output to expand in listings + schema: + type: array + items: + $ref: '#/components/schemas/InvoiceExpand' + explode: false + InvoiceListParams.extendedStatuses: + name: extendedStatuses + in: query + required: false + description: Filter by invoice extended statuses + schema: + type: array + items: + type: string + explode: false + InvoiceListParams.issuedAfter: + name: issuedAfter + in: query + required: false + description: Filter by invoice creation time + schema: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + explode: false + InvoiceListParams.issuedBefore: + name: issuedBefore + in: query + required: false + description: Filter by invoice creation time + schema: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + explode: false + InvoiceListParams.statuses: + name: statuses + in: query + required: false + description: Filter by the invoice status. + schema: + type: array + items: + $ref: '#/components/schemas/InvoiceStatus' + explode: false InvoiceOrderByOrdering.order: name: order in: query @@ -7296,7 +7333,7 @@ components: required: false description: The order by field. schema: - $ref: '#/components/schemas/BillingInvoiceOrderBy' + $ref: '#/components/schemas/InvoiceOrderBy' explode: false LimitOffset.limit: name: limit @@ -7594,23 +7631,6 @@ components: schema: $ref: '#/components/schemas/PlanOrderBy' explode: false - ProfileOrderByOrdering.order: - name: order - in: query - required: false - description: The order direction. - schema: - $ref: '#/components/schemas/SortOrder' - default: ASC - explode: false - ProfileOrderByOrdering.orderBy: - name: orderBy - in: query - required: false - description: The order by field. - schema: - $ref: '#/components/schemas/BillingProfileOrderBy' - explode: false queryCustomerList.includeDeleted: name: includeDeleted in: query @@ -7879,40 +7899,21 @@ components: description: The entitlement balance at the start of the period. readOnly: true description: The balance history window. - BillingCreditNoteOriginalInvoiceRef: - type: object - required: - - type - - url - properties: - type: - type: string - enum: - - credit_node_original_invoice - issuedAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: IssueAt reflects the time the document was issued. - number: - allOf: - - $ref: '#/components/schemas/BillingInvoiceNumber' - title: (Serial) Number of the referenced document. - readOnly: true - url: - type: string - format: uri - title: Link to the source document. - allOf: - - $ref: '#/components/schemas/BillingGenericDocumentRef' - description: CreditNoteOriginalInvoiceRef is used to reference the original invoice that a credit note is based on. - BillingCustomerOverride: + BillingCollectionAlignment: + type: string + enum: + - subscription + description: |- + BillingCollectionAlignment specifies when the pending line items should be collected into + an invoice. + title: Collection alignment + BillingLineCharge: type: object required: - createdAt - updatedAt - - workflow + - id + - amount properties: createdAt: type: string @@ -7935,139 +7936,77 @@ components: description: Timestamp of when the resource was permanently deleted. title: Deletion Time readOnly: true - workflow: - $ref: '#/components/schemas/BillingCustomerWorkflowOverride' - billingProfile: + id: type: string example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: |- - The billing profile this override is associated with. - - If not provided, the default billing profile is chosen if available. - description: Customer specific workflow overrides. - BillingCustomerOverrideOrderBy: - type: string - enum: - - id - description: Order by options for customers. - BillingCustomerWorkflowOverride: + description: ID of the charge or discount. + readOnly: true + percent: + allOf: + - $ref: '#/components/schemas/Percentage' + description: Percentage if fixed amount not applied + amount: + allOf: + - $ref: '#/components/schemas/Numeric' + description: Fixed discount amount to apply (calculated if percent present). + code: + type: string + description: Reason code. + description: + type: string + description: Text description as to why the discount was applied. + description: InvoiceLineCharge represents an amount added to the line, and will be applied before taxes. + BillingParty: type: object - required: - - createdAt - - updatedAt - - id - - taxApp - - invoicingApp - - paymentApp properties: - createdAt: + id: type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was created. - title: Creation Time + description: Unique identifier for the party (if available) readOnly: true - updatedAt: + name: type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was last updated. - title: Last Update Time - readOnly: true - deletedAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was permanently deleted. - title: Deletion Time - readOnly: true - collection: - allOf: - - $ref: '#/components/schemas/BillingWorkflowCollectionSettings' - title: The collection settings for this workflow - invoicing: - allOf: - - $ref: '#/components/schemas/BillingWorkflowInvoicingSettings' - title: The invoicing settings for this workflow - payment: - allOf: - - $ref: '#/components/schemas/BillingWorkflowPaymentSettings' - title: The payment settings for this workflow - id: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: A unique identifier for the resource. - title: ID - readOnly: true - taxApp: - allOf: - - $ref: '#/components/schemas/App' - readOnly: true - invoicingApp: - allOf: - - $ref: '#/components/schemas/App' - readOnly: true - paymentApp: + description: Legal name or representation of the organization. + taxId: allOf: - - $ref: '#/components/schemas/App' - readOnly: true - description: Customer specific workflow overrides. - BillingDocumentRef: - type: object - allOf: - - $ref: '#/components/schemas/BillingCreditNoteOriginalInvoiceRef' - description: DocumentRef is used to describe a reference to an existing document (invoice). - BillingDocumentRefType: - type: string - enum: - - credit_node_original_invoice - description: DocumentRefType defines the type of document that is being referenced. - BillingDueDate: + - $ref: '#/components/schemas/BillingPartyTaxIdentity' + description: |- + The entity's legal ID code used for tax purposes. They may have + other numbers, but we're only interested in those valid for tax purposes. + addresses: + type: array + items: + $ref: '#/components/schemas/Address' + maxItems: 1 + description: Regular post addresses for where information should be sent if needed. + description: Party represents a person or business entity. + BillingPartyTaxIdentity: type: object - required: - - dueAt - - amount properties: - dueAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: When the payment is due. - notes: - type: string - title: Other details to take into account for the due date. - amount: - allOf: - - $ref: '#/components/schemas/Numeric' - title: How much needs to be paid by the date. - percent: - allOf: - - $ref: '#/components/schemas/Percentage' - title: Percentage of the total that should be paid by the date. - currency: + code: allOf: - - $ref: '#/components/schemas/CurrencyCode' - title: If different from the parent document's base currency. - description: DueDate contains an amount that should be paid by the given date. - BillingFlatFeeLine: + - $ref: '#/components/schemas/BillingTaxIdentificationCode' + description: Normalized tax code shown on the original identity document. + description: Identity stores the details required to identify an entity for tax purposes in a specific country. + BillingProfile: type: object required: + - id - name - createdAt - updatedAt - - id - - status - - currency - - totals - - period - - invoiceAt - - type - - perUnitAmount - - quantity + - supplier + - workflow + - apps + - default properties: + id: + type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: A unique identifier for the resource. + title: ID + readOnly: true name: type: string minLength: 1 @@ -8107,97 +8046,120 @@ components: description: Timestamp of when the resource was permanently deleted. title: Deletion Time readOnly: true - id: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: ULID (Universally Unique Lexicographically Sortable Identifier). - status: + supplier: allOf: - - $ref: '#/components/schemas/BillingLineStatus' - readOnly: true - discounts: - type: array - items: - $ref: '#/components/schemas/BillingLineDiscount' - title: Discounts applied to this line. - readOnly: true - charges: - type: array - items: - $ref: '#/components/schemas/BillingLineCharge' - title: Charges applied to this line. - readOnly: true - invoice: + - $ref: '#/components/schemas/BillingParty' + description: The name and contact information for the supplier this billing profile represents + workflow: allOf: - - $ref: '#/components/schemas/BillingInvoiceReference' - title: The invoice this item belongs to. - currency: + - $ref: '#/components/schemas/BillingWorkflow' + description: The billing workflow settings for this profile + readOnly: true + apps: allOf: - - $ref: '#/components/schemas/CurrencyCode' - title: The currency of this line - taxes: - type: array - items: - $ref: '#/components/schemas/BillingTaxItem' - title: Map of taxes to be applied and used in the invoice totals. + - $ref: '#/components/schemas/BillingProfileAppsOrReference' + description: |- + The applications used by this billing profile. + + Expand settings govern if this includes the whole app object or just the ID references. readOnly: true - taxConfig: - type: object + default: + type: boolean + description: Is this the default profile? + description: BillingProfile represents a billing profile + BillingProfileAppReferences: + type: object + required: + - tax + - invoicing + - payment + properties: + tax: allOf: - - $ref: '#/components/schemas/TaxConfig' - nullable: true - title: Tax config specify the tax configuration for this line. - children: - nullable: true - title: The lines detailing the item or service sold. + - $ref: '#/components/schemas/AppReference' + description: The tax app used for this workflow readOnly: true - type: array - items: - $ref: '#/components/schemas/BillingInvoiceLine' - totals: + invoicing: allOf: - - $ref: '#/components/schemas/BillingInvoiceTotals' - title: Totals for this line. + - $ref: '#/components/schemas/AppReference' + description: The invoicing app used for this workflow readOnly: true - period: + payment: allOf: - - $ref: '#/components/schemas/BillingPeriod' - title: Period of the line item applies to for revenue recognition pruposes. - invoiceAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: The time this line item should be invoiced. - type: - type: string - enum: - - flat_fee - perUnitAmount: + - $ref: '#/components/schemas/AppReference' + description: The payment app used for this workflow + readOnly: true + description: BillingProfileAppReferences represents the references (id, type) to the apps used by a billing profile + BillingProfileApps: + type: object + required: + - tax + - invoicing + - payment + properties: + tax: allOf: - - $ref: '#/components/schemas/Numeric' - title: Price of the item being sold. - paymentTerm: + - $ref: '#/components/schemas/App' + readOnly: true + invoicing: allOf: - - $ref: '#/components/schemas/PricePaymentTerm' - title: Payment term of the line. - default: in_advance - quantity: + - $ref: '#/components/schemas/App' + readOnly: true + payment: allOf: - - $ref: '#/components/schemas/Numeric' - title: Quantity of the item being sold. - description: BillingFlatFeeLine represents a line item that is sold to the customer as a manually added fee. - BillingFlatFeeLineCreate: + - $ref: '#/components/schemas/App' + readOnly: true + description: BillingProfileApps represents the applications used by a billing profile + BillingProfileAppsCreate: + type: object + required: + - tax + - invoicing + - payment + properties: + tax: + anyOf: + - type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: ULID (Universally Unique Lexicographically Sortable Identifier). + - type: string + description: The tax app used for this workflow + x-go-type: string + invoicing: + anyOf: + - type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: ULID (Universally Unique Lexicographically Sortable Identifier). + - type: string + description: The invoicing app used for this workflow + x-go-type: string + payment: + anyOf: + - type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: ULID (Universally Unique Lexicographically Sortable Identifier). + - type: string + description: The payment app used for this workflow + x-go-type: string + description: BillingProfileAppsCreate represents the input for creating a billing profile's apps + BillingProfileAppsOrReference: + anyOf: + - $ref: '#/components/schemas/BillingProfileApps' + - $ref: '#/components/schemas/BillingProfileAppReferences' + description: |- + ProfileAppsOrReference represents the union of ProfileApps and ProfileAppReferences + for a billing profile. + BillingProfileCreate: type: object required: - name - - currency - - period - - invoiceAt - - type - - perUnitAmount - - quantity + - supplier + - default + - workflow + - apps properties: name: type: string @@ -8217,174 +8179,115 @@ components: nullable: true description: Additional metadata for the resource. title: Metadata - invoice: - allOf: - - $ref: '#/components/schemas/BillingInvoiceReference' - title: The invoice this item belongs to. - currency: + supplier: allOf: - - $ref: '#/components/schemas/CurrencyCode' - title: The currency of this line - taxConfig: - type: object + - $ref: '#/components/schemas/BillingParty' + description: The name and contact information for the supplier this billing profile represents + default: + type: boolean + description: Is this the default profile? + workflow: allOf: - - $ref: '#/components/schemas/TaxConfig' - nullable: true - title: Tax config specify the tax configuration for this line. - period: + - $ref: '#/components/schemas/BillingWorkflowCreate' + description: The billing workflow settings for this profile. + apps: allOf: - - $ref: '#/components/schemas/BillingPeriod' - title: Period of the line item applies to for revenue recognition pruposes. - invoiceAt: + - $ref: '#/components/schemas/BillingProfileAppsCreate' + description: The apps used by this billing profile. + description: BillingProfileCreate represents the input for creating a billing profile + BillingProfileCustomerOverride: + type: object + required: + - createdAt + - updatedAt + properties: + createdAt: type: string format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: The time this line item should be invoiced. - type: + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was created. + title: Creation Time + readOnly: true + updatedAt: type: string - enum: - - flat_fee - perUnitAmount: - allOf: - - $ref: '#/components/schemas/Numeric' - title: Price of the item being sold. - paymentTerm: - allOf: - - $ref: '#/components/schemas/PricePaymentTerm' - title: Payment term of the line. - default: in_advance - quantity: - allOf: - - $ref: '#/components/schemas/Numeric' - title: Quantity of the item being sold. - description: BillingFlatFeeLine represents a line item that is sold to the customer as a manually added fee. - BillingFlatFeeLineCreateItem: - type: object - required: - - name - - currency - - period - - invoiceAt - - type - - perUnitAmount - - quantity - properties: - name: - type: string - minLength: 1 - maxLength: 256 - description: Human-readable name for the resource. Between 1 and 256 characters. - title: Display name - description: - type: string - maxLength: 1024 - description: Optional description of the resource. Maximum 1024 characters. - title: Description - metadata: - type: object - allOf: - - $ref: '#/components/schemas/Metadata' - nullable: true - description: Additional metadata for the resource. - title: Metadata - invoice: - allOf: - - $ref: '#/components/schemas/BillingInvoiceReference' - title: The invoice this item belongs to. - currency: - allOf: - - $ref: '#/components/schemas/CurrencyCode' - title: The currency of this line - taxConfig: - type: object - allOf: - - $ref: '#/components/schemas/TaxConfig' - nullable: true - title: Tax config specify the tax configuration for this line. - period: - allOf: - - $ref: '#/components/schemas/BillingPeriod' - title: Period of the line item applies to for revenue recognition pruposes. - invoiceAt: + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was last updated. + title: Last Update Time + readOnly: true + deletedAt: type: string format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: The time this line item should be invoiced. - type: + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was permanently deleted. + title: Deletion Time + readOnly: true + workflow: + $ref: '#/components/schemas/BillingProfileCustomerWorkflowOverride' + billingProfile: type: string - enum: - - flat_fee - perUnitAmount: - allOf: - - $ref: '#/components/schemas/Numeric' - title: Price of the item being sold. - paymentTerm: - allOf: - - $ref: '#/components/schemas/PricePaymentTerm' - title: Payment term of the line. - default: in_advance - quantity: - allOf: - - $ref: '#/components/schemas/Numeric' - title: Quantity of the item being sold. - description: BillingFlatFeeLine represents a line item that is sold to the customer as a manually added fee. - BillingGenericDocumentRef: + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: |- + The billing profile this override is associated with. + + If not provided, the default billing profile is chosen if available. + description: Customer specific workflow overrides. + BillingProfileCustomerOverrideCreate: type: object - required: - - type properties: - type: - allOf: - - $ref: '#/components/schemas/BillingDocumentRefType' - title: Type of the document referenced. - readOnly: true - reason: - type: string - title: Human readable description on why this reference is here or needs to be used. - description: + workflow: + $ref: '#/components/schemas/BillingProfileCustomerWorkflowOverrideCreate' + billingProfile: type: string - title: Additional details about the document. - description: |- - Omitted fields: - period: Tax period in which the referred document had an effect required by some tax regimes and formats. - stamps: Seals of approval from other organisations that may need to be listed. - ext: Extensions for additional codes that may be required. - title: DocumentRef is used to describe an existing document or a specific part of it's contents. - BillingInvoice: + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: |- + The billing profile this override is associated with. + + If not provided, the default billing profile is chosen if available. + description: Payload for creating a new or updating an existing customer override. + BillingProfileCustomerOverrideOrderBy: + type: string + enum: + - id + description: Order by options for customers. + BillingProfileCustomerOverridePaginatedResponse: + type: object + required: + - totalCount + - page + - pageSize + - items + properties: + totalCount: + type: integer + example: 500 + description: The items in the current page. + page: + type: integer + example: 1 + description: The items in the current page. + pageSize: + type: integer + example: 100 + description: The items in the current page. + items: + type: array + items: + $ref: '#/components/schemas/BillingProfileCustomerOverride' + description: The items in the current page. + description: Paginated response + BillingProfileCustomerWorkflowOverride: type: object required: - - id - createdAt - updatedAt - - type - - supplier - - customer - - currency - - totals - - status - - statusDetails + - id + - taxApp + - invoicingApp + - paymentApp properties: - id: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: A unique identifier for the resource. - title: ID - readOnly: true - description: - type: string - maxLength: 1024 - description: Optional description of the resource. Maximum 1024 characters. - title: Description - metadata: - type: object - allOf: - - $ref: '#/components/schemas/Metadata' - nullable: true - description: Additional metadata for the resource. - title: Metadata createdAt: type: string format: date-time @@ -8392,681 +8295,565 @@ components: description: Timestamp of when the resource was created. title: Creation Time readOnly: true - deletedAt: + updatedAt: type: string format: date-time example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was permanently deleted. - title: Deletion Time + description: Timestamp of when the resource was last updated. + title: Last Update Time readOnly: true - updatedAt: + deletedAt: type: string format: date-time example: 2024-01-01T01:01:01.001Z - description: |- - Timestamp of when the resource was last updated. - - For updates the updatedAt field is used to detect conflicts. - title: Last Update Time - type: - allOf: - - $ref: '#/components/schemas/BillingInvoiceType' + description: Timestamp of when the resource was permanently deleted. + title: Deletion Time readOnly: true - supplier: + collection: allOf: - - $ref: '#/components/schemas/BillingParty' - title: The taxable entity supplying the goods or services. - customer: + - $ref: '#/components/schemas/BillingWorkflowCollectionSettings' + description: The collection settings for this workflow + invoicing: allOf: - - $ref: '#/components/schemas/BillingParty' - title: Legal entity receiving the goods or services. - number: + - $ref: '#/components/schemas/BillingWorkflowInvoicingSettings' + description: The invoicing settings for this workflow + payment: allOf: - - $ref: '#/components/schemas/BillingInvoiceNumber' - description: |- - Number specifies the human readable key used to reference this Invoice. - - The number only gets populated after the invoice had been issued. - - Please note that the number is (depending on the upstream settings) either unique for the - whole organization or unique for the customer, or in multi (stripe) account setups unique for the - account. - title: (Serial) Number of the invoice + - $ref: '#/components/schemas/BillingWorkflowPaymentSettings' + description: The payment settings for this workflow + id: + type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: A unique identifier for the resource. readOnly: true - currency: + taxApp: allOf: - - $ref: '#/components/schemas/CurrencyCode' - title: Currency for all invoice totals. - readOnly: true - preceding: - type: array - items: - $ref: '#/components/schemas/BillingDocumentRef' - title: Key information regarding previous invoices and potentially details as to why they were corrected. + - $ref: '#/components/schemas/App' readOnly: true - totals: + invoicingApp: allOf: - - $ref: '#/components/schemas/BillingInvoiceTotals' - title: Summary of all the invoice totals, including taxes (calculated). + - $ref: '#/components/schemas/App' readOnly: true - status: + paymentApp: allOf: - - $ref: '#/components/schemas/BillingInvoiceStatus' - title: The status of the invoice. + - $ref: '#/components/schemas/App' readOnly: true - statusDetails: + description: Customer specific workflow overrides. + BillingProfileCustomerWorkflowOverrideCreate: + type: object + properties: + collection: allOf: - - $ref: '#/components/schemas/BillingInvoiceStatusDetails' - title: The details of the current invoice status - readOnly: true - issuedAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: |- - The time the invoice was issued. - - Depending on the status of the invoice this can mean multiple things: - - draft, gathering: The time the invoice will be issued based on the workflow settings. - - issued: The time the invoice was issued. - title: The time the invoice was issued. - readOnly: true - draftUntil: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: |- - The time until the invoice is in draft status. - - On draft invoice creation it is calculated from the workflow settings. - - If manual approval is required, the draftUntil time is set. - title: The time until the invoice is in draft status. - dueAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: Due time of the fulfillment of the invoice. - readOnly: true - period: + - $ref: '#/components/schemas/BillingWorkflowCollectionSettings' + description: The collection settings for this workflow + invoicing: allOf: - - $ref: '#/components/schemas/BillingPeriod' - title: The period the invoice covers. If the invoice has no line items, it's not set. - voidedAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: |- - The time the invoice was voided. - - If the invoice was voided, this field will be set to the time the invoice was voided. - title: The time the invoice was voided. - readOnly: true - workflow: - allOf: - - $ref: '#/components/schemas/BillingInvoiceWorkflowSettings' - description: |- - The workflow associated with the invoice. - - It is always a snapshot of the workflow settings at the time of invoice creation. The - field is optional as it should be explicitly requested with expand options. - title: The workflow settings associated with this invoice - lines: - type: array - items: - $ref: '#/components/schemas/BillingInvoiceLine' - title: List of invoice lines representing each of the items sold to the customer. - readOnly: true - discounts: - type: array - items: - $ref: '#/components/schemas/BillingInvoiceDiscount' - title: Discounts or allowances applied to the complete invoice. - readOnly: true + - $ref: '#/components/schemas/BillingWorkflowInvoicingSettings' + description: The invoicing settings for this workflow payment: allOf: - - $ref: '#/components/schemas/BillingInvoicePayment' - title: Information on when, how, and to whom the invoice should be paid. - readOnly: true - validationIssues: - type: array - items: - $ref: '#/components/schemas/BillingValidationIssue' - title: Validation issues reported by the invoice workflow. - readOnly: true - description: Invoice represents an invoice in the system. - BillingInvoiceAction: + - $ref: '#/components/schemas/BillingWorkflowPaymentSettings' + description: The payment settings for this workflow + description: Resource create operation model. + BillingProfileExpand: type: string enum: - - advance - - approve - - delete - - retry - - void - description: BillingInvoiceAction represents the actions that can be performed on an invoice. - BillingInvoiceCreate: + - apps + - '*' + description: BillingProfileExpand details what profile fields to expand + x-enum-varnames: + - apps + - all + BillingProfileOrderBy: + type: string + enum: + - createdAt + - updatedAt + - default + - name + description: BillingProfileOrderBy specifies the ordering options for profiles + BillingProfilePaginatedResponse: type: object + required: + - totalCount + - page + - pageSize + - items properties: - includePendingLines: + totalCount: + type: integer + example: 500 + description: The items in the current page. + page: + type: integer + example: 1 + description: The items in the current page. + pageSize: + type: integer + example: 100 + description: The items in the current page. + items: type: array items: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: ULID (Universally Unique Lexicographically Sortable Identifier). - description: |- - The pending line items to include in the invoice, if not provided: - - all line items that have invoice_at < asOf will be included - - all usage based line items will be included up to asOf, new usage-based line items will be staged for the rest - of the billing cycle - asOf: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: |- - The time as of which the invoice is created. - - If not provided, the current time is used. - description: |- - BillingInvoiceCreate is the input for creating an invoice. - - Invoice creation is always based on already pending line items created by the billingCreateLineByCustomer - operation. Empty invoices are not allowed. - BillingInvoiceDiscount: + $ref: '#/components/schemas/BillingProfile' + description: The items in the current page. + description: Paginated response + BillingProfileReplaceUpdateWithWorkflow: type: object required: - - amount + - name + - supplier + - default + - workflow properties: - base: + name: + type: string + minLength: 1 + maxLength: 256 + description: Human-readable name for the resource. Between 1 and 256 characters. + title: Display name + description: + type: string + maxLength: 1024 + description: Optional description of the resource. Maximum 1024 characters. + title: Description + metadata: + type: object allOf: - - $ref: '#/components/schemas/Numeric' - title: Base represents the value used as a base for percent calculations instead of the invoice's sum of lines. - percent: + - $ref: '#/components/schemas/Metadata' + nullable: true + description: Additional metadata for the resource. + title: Metadata + supplier: allOf: - - $ref: '#/components/schemas/Percentage' - title: Percentage to apply to the base or invoice's sum. - amount: + - $ref: '#/components/schemas/BillingParty' + description: The name and contact information for the supplier this billing profile represents + default: + type: boolean + description: Is this the default profile? + workflow: allOf: - - $ref: '#/components/schemas/Numeric' - title: Amount to apply (calculated if percent present). - reason: - type: string - title: Text description as to why the discount was applied - description: Discount represents an allowance applied to the complete document independent from the individual lines. - BillingInvoiceExpand: - type: string - enum: - - '*' - - lines - - preceding - - workflow - - workflow.apps - description: InvoiceExpand specifies the parts of the invoice to expand in the list output. - x-enum-varnames: - - all - - lines - - preceding - - workflow - - workflowApps - BillingInvoiceExtendedStatus: - type: string - enum: - - gathering - - draft - - issuing - - issued - - draft_created - - draft_manual_approval_needed - - draft_validating - - draft_invalid - - draft_syncing - - draft_sync_failed - - draft_waiting_auto_approval - - draft_ready_to_issue - - issuing_syncing - - issuing_sync_failed + - $ref: '#/components/schemas/BillingWorkflow' + description: The billing workflow settings for this profile. description: |- - InvoiceExtendedStatus describes the extended status of an invoice. + BillingProfileReplaceUpdate represents the input for updating a billing profile - This is used to provide more detailed information about the status of the invoice. Useful for - troubelshooting invoice workflow issues. - BillingInvoiceLine: - anyOf: - - $ref: '#/components/schemas/BillingUsageBasedLine' - - $ref: '#/components/schemas/BillingFlatFeeLine' - discriminator: - propertyName: type - mapping: - usage_based: '#/components/schemas/BillingUsageBasedLine' - flat_fee: '#/components/schemas/BillingFlatFeeLine' - description: BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price. - BillingInvoiceLineCreate: - anyOf: - - $ref: '#/components/schemas/BillingUsageBasedLineCreate' - - $ref: '#/components/schemas/BillingFlatFeeLineCreate' - discriminator: - propertyName: type - mapping: - usage_based: '#/components/schemas/BillingUsageBasedLineCreate' - flat_fee: '#/components/schemas/BillingFlatFeeLineCreate' - description: BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price. - BillingInvoiceLineCreateItem: - anyOf: - - $ref: '#/components/schemas/BillingUsageBasedLineCreateItem' - - $ref: '#/components/schemas/BillingFlatFeeLineCreateItem' - discriminator: - propertyName: type - mapping: - usage_based: '#/components/schemas/BillingUsageBasedLineCreateItem' - flat_fee: '#/components/schemas/BillingFlatFeeLineCreateItem' - description: BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price. - BillingInvoiceLines: - type: object - required: - - lines - properties: - lines: - type: array - items: - $ref: '#/components/schemas/BillingInvoiceLine' - title: The line to create - description: CreateLinesRequest is the request for creating manual line items. - BillingInvoiceNumber: + The apps field cannot be updated directly, if an app change is desired a new + profile should be created. + BillingTaxIdentificationCode: type: string - example: INV-2024-01-01-01 minLength: 1 - maxLength: 256 - description: |- - InvoiceNumber is a unique identifier for the invoice, generated by the - invoicing app. - - The uniqueness depends on a lot of factors: - - app setting (unique per app or unique per customer) - - multiple app scenarios (multiple apps generating invoices with the same prefix) - BillingInvoiceOrderBy: - type: string - enum: - - customer.name - - issuedAt - - status - - createdAt - - updatedAt - description: InvoiceOrderBy specifies the ordering options for invoice listing. - BillingInvoicePayment: - type: object - properties: - terms: - $ref: '#/components/schemas/BillingPaymentTerms' - description: Payment contains details as to how the invoice should be paid. - BillingInvoiceReference: + maxLength: 32 + pattern: ^[A-Za-z0-9]+([\.\-\/ _]?[A-Za-z0-9]+)*$ + description: TaxIdentificationCode is a normalized tax code shown on the original identity document. + BillingWorkflow: type: object required: + - createdAt + - updatedAt - id properties: + createdAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was created. + title: Creation Time + readOnly: true + updatedAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was last updated. + title: Last Update Time + readOnly: true + deletedAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was permanently deleted. + title: Deletion Time + readOnly: true + collection: + allOf: + - $ref: '#/components/schemas/BillingWorkflowCollectionSettings' + description: The collection settings for this workflow + invoicing: + allOf: + - $ref: '#/components/schemas/BillingWorkflowInvoicingSettings' + description: The invoicing settings for this workflow + payment: + allOf: + - $ref: '#/components/schemas/BillingWorkflowPaymentSettings' + description: The payment settings for this workflow id: type: string example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: ULID (Universally Unique Lexicographically Sortable Identifier). - title: The ID of the invoice. - number: - allOf: - - $ref: '#/components/schemas/BillingInvoiceNumber' - title: The number of the invoice. + description: A unique identifier for the resource. readOnly: true - description: Reference to an invoice. - BillingInvoiceStatus: + description: BillingWorkflow represents a billing workflow + BillingWorkflowAppReferenceType: type: string enum: - - gathering - - draft - - issuing - - issued - description: InvoiceStatus describes the status of an invoice. - BillingInvoiceStatusDetails: + - app_id + - app_type + description: App reference type specifies the type of reference inside an app reference + BillingWorkflowCollectionAlignment: + type: object + allOf: + - $ref: '#/components/schemas/BillingWorkflowCollectionAlignmentSubscription' + description: |- + 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). + BillingWorkflowCollectionAlignmentSubscription: type: object required: - - immutable - - failed - - extendedStatus - - availableActions + - type properties: - immutable: - type: boolean - title: Is the invoice editable? - failed: - type: boolean - title: Is the invoice in a failed state? - extendedStatus: - allOf: - - $ref: '#/components/schemas/BillingInvoiceExtendedStatus' - title: Extended status information for the invoice. - availableActions: - type: array - items: - $ref: '#/components/schemas/BillingInvoiceAction' - title: The actions that can be performed on the invoice. + type: + type: string + enum: + - subscription description: |- - InvoiceStatusDetails represents the details of the invoice status. + BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items + into an invoice. + BillingWorkflowCollectionSettings: + type: object + properties: + alignment: + allOf: + - $ref: '#/components/schemas/BillingWorkflowCollectionAlignment' + default: + type: subscription + interval: + type: string + format: ISO8601 + example: P1D + description: |- + This grace period can be used to delay the collection of the pending line items specified in + alignment. - API users are encouraged to rely on the immutable/failed/avaliableActions fields to determine - the next steps of the invoice instead of the extendedStatus field. - BillingInvoiceTotals: + This is useful, in case of multiple subscriptions having slightly different billing periods. + default: PT1H + description: Workflow collection specifies how to collect the pending line items for an invoice + BillingWorkflowCreate: type: object - required: - - amount - - chargesTotal - - discountsTotal - - taxesInclusiveTotal - - taxesExclusiveTotal - - taxesTotal - - total properties: - amount: + collection: allOf: - - $ref: '#/components/schemas/Numeric' - title: The total value of the line before taxes, discounts and commitments. - chargesTotal: + - $ref: '#/components/schemas/BillingWorkflowCollectionSettings' + description: The collection settings for this workflow + invoicing: allOf: - - $ref: '#/components/schemas/Numeric' - title: The amount of value of the line that are due to additional charges. - discountsTotal: + - $ref: '#/components/schemas/BillingWorkflowInvoicingSettings' + description: The invoicing settings for this workflow + payment: allOf: - - $ref: '#/components/schemas/Numeric' - title: The amount of value of the line that are due to discounts. - taxesInclusiveTotal: + - $ref: '#/components/schemas/BillingWorkflowPaymentSettings' + description: The payment settings for this workflow + description: Resource create operation model. + BillingWorkflowInvoicingSettings: + type: object + properties: + autoAdvance: + type: boolean + description: Whether to automatically issue the invoice after the draftPeriod has passed. + default: true + draftPeriod: + type: string + format: ISO8601 + example: P1D + description: The period for the invoice to be kept in draft status for manual reviews. + default: P1D + dueAfter: + type: string + format: ISO8601 + example: P1D + description: The period after which the invoice is due. + default: P7D + description: BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow + title: Workflow invoice settings + BillingWorkflowLineResolution: + type: string + enum: + - day + - period + description: BillingWorkflowLineResolution specifies how the line items should be resolved in the invoice + title: Item resolution + BillingWorkflowPaymentSettings: + type: object + properties: + collectionMethod: allOf: - - $ref: '#/components/schemas/Numeric' - title: The total amount of taxes that are included in the line. - taxesExclusiveTotal: + - $ref: '#/components/schemas/CollectionMethod' + description: The payment method for the invoice. + default: charge_automatically + description: BillingWorkflowPaymentSettings represents the payment settings for a billing workflow + title: Workflow payment settings + BillingWorkflowSettings: + type: object + properties: + collection: allOf: - - $ref: '#/components/schemas/Numeric' - title: The total amount of taxes that are added on top of amount from the line. - taxesTotal: + - $ref: '#/components/schemas/BillingWorkflowCollectionSettings' + description: The collection settings for this workflow + invoicing: allOf: - - $ref: '#/components/schemas/Numeric' - title: The total amount of taxes for this line. - total: + - $ref: '#/components/schemas/BillingWorkflowInvoicingSettings' + description: The invoicing settings for this workflow + payment: allOf: - - $ref: '#/components/schemas/Numeric' - title: The total amount value of the line after taxes, discounts and commitments. - description: Totals contains the summaries of all calculations for the invoice. - BillingInvoiceType: + - $ref: '#/components/schemas/BillingWorkflowPaymentSettings' + description: The payment settings for this workflow + description: BillingWorkflowSettings represents the settings for a billing workflow. + CheckoutSessionCustomTextAfterSubmitParams: + type: object + properties: + afterSubmit: + type: object + properties: + message: + type: string + shippingAddress: + type: object + properties: + message: + type: string + submit: + type: object + properties: + message: + type: string + termsOfServiceAcceptance: + type: object + properties: + message: + type: string + description: Stripe CheckoutSession.custom_text + CheckoutSessionUIMode: type: string enum: - - standard - - credit_note - description: |- - InvoiceType represents the type of invoice. - - The type of invoice determines the purpose of the invoice and how it should be handled. - BillingInvoiceWorkflowSettings: + - embedded + - hosted + description: Stripe CheckoutSession.ui_mode + ClientAppStartResponse: type: object required: - - sourceBillingProfileID - - workflow - - timezone + - url properties: - apps: - allOf: - - $ref: '#/components/schemas/BillingProfileAppsOrReference' - title: The apps that will be used to orchestrate the invoice's workflow. - sourceBillingProfileID: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: |- - sourceBillingProfileID is the billing profile on which the workflow was based on. - - The profile is snapshotted on invoice creation, after which it can be altered independently - of the profile itself. - title: The billing profile on which the workflow was based on. - workflow: - allOf: - - $ref: '#/components/schemas/BillingWorkflowSettings' - title: The workflow details used by this invoice. - timezone: + url: type: string - title: Timezone of the invoice's date fields. - readOnly: true + description: The URL to start the OAuth2 authorization code grant flow. + description: Response from the client app (OpenMeter backend) to start the OAuth2 flow. + CollectionMethod: + type: string + enum: + - charge_automatically + - send_invoice + description: CollectionMethod specifies how the invoice should be collected (automatic vs manual) + title: Collection method + ConflictProblemResponse: + type: object + allOf: + - $ref: '#/components/schemas/UnexpectedProblemResponse' + description: The request could not be completed due to a conflict with the current state of the target resource. + CountryCode: + type: string + example: US + minLength: 2 + maxLength: 2 + pattern: ^[A-Z]{2}$ description: |- - InvoiceWorkflowSettings represents the workflow settings used by the invoice. - - This is a clone of the billing profile's workflow settings at the time of invoice creation - with customer overrides considered. - BillingLineCharge: + [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. + CreateCustomSubscriptionRequestBody: type: object required: - - createdAt - - updatedAt - - id - - amount + - currency + - activeFrom + - customPlan + - customerId properties: - createdAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was created. - title: Creation Time - readOnly: true - updatedAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was last updated. - title: Last Update Time - readOnly: true - deletedAt: + currency: + $ref: '#/components/schemas/CurrencyCode' + activeFrom: type: string format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was permanently deleted. - title: Deletion Time - readOnly: true - id: + example: 2023-01-01T01:01:01.001Z + description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' + customPlan: + $ref: '#/components/schemas/PlanCreate' + customerId: type: string example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). - title: ID of the entity - readOnly: true - percent: - allOf: - - $ref: '#/components/schemas/Percentage' - description: Percentage if fixed amount not applied - title: Percent - amount: - allOf: - - $ref: '#/components/schemas/Numeric' - description: Fixed discount amount to apply (calculated if percent present). - title: Amount - code: - type: string - title: Reason code. - description: - type: string - title: Text description as to why the discount was applied. - description: LineCharge represents an amount added to the line, and will be applied before taxes. - BillingLineDiscount: + description: Create a custom subscription. + CreateStripeCheckoutSessionRequest: type: object required: - - createdAt - - updatedAt - - id - - amount + - customer + - options properties: - createdAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was created. - title: Creation Time - readOnly: true - updatedAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was last updated. - title: Last Update Time - readOnly: true - deletedAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was permanently deleted. - title: Deletion Time - readOnly: true - id: + appId: type: string example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: ULID (Universally Unique Lexicographically Sortable Identifier). - title: ID of the entity - readOnly: true - percent: - allOf: - - $ref: '#/components/schemas/Percentage' - description: Percentage if fixed amount not applied - title: Percent - amount: - allOf: - - $ref: '#/components/schemas/Numeric' - description: Fixed discount amount to apply (calculated if percent present). - title: Amount - code: - type: string - title: Reason code. - description: + description: If not provided, the default Stripe app is used if any. + customer: + anyOf: + - $ref: '#/components/schemas/CustomerId' + - $ref: '#/components/schemas/CustomerCreate' + description: |- + Provide a customer ID to use an existing OpenMeter customer. + or provide a customer object to create a new customer. + stripeCustomerId: type: string - title: Text description as to why the discount was applied. - description: LineDiscount represents an amount deducted from the line, and will be applied before taxes. - BillingLineStatus: - type: string - enum: - - valid - - deleted - - split - description: Line status specifies the status of the line. - BillingParty: + description: |- + Stripe customer ID. + If not provided OpenMeter creates a new Stripe customer or + uses the OpenMeter customer's default Stripe customer ID. + options: + allOf: + - $ref: '#/components/schemas/CreateStripeCheckoutSessionRequestOptions' + description: Options passed to Stripe when creating the checkout session. + description: Create Stripe checkout session request. + CreateStripeCheckoutSessionRequestOptions: type: object properties: - id: + currency: + $ref: '#/components/schemas/CurrencyCode' + cancelURL: type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: ULID (Universally Unique Lexicographically Sortable Identifier). - title: ID of the party. - name: + clientReferenceID: type: string - title: Legal name or representation of the organization. - taxId: - allOf: - - $ref: '#/components/schemas/BillingTaxIdentity' - title: The entity's legal ID code used for tax purposes. They may have other numbers, but we're only interested in those valid for tax purposes. - addresses: - type: array - items: - $ref: '#/components/schemas/Address' - maxItems: 1 - title: Regular post addresses for where information should be sent if needed. - description: Party represents a person or business entity. - BillingPartyCreate: - type: object - properties: - name: + customText: + $ref: '#/components/schemas/CheckoutSessionCustomTextAfterSubmitParams' + metadata: + type: object + additionalProperties: + type: string + returnURL: type: string - title: Legal name or representation of the organization. - taxId: - allOf: - - $ref: '#/components/schemas/BillingTaxIdentity' - title: The entity's legal ID code used for tax purposes. They may have other numbers, but we're only interested in those valid for tax purposes. - addresses: + successURL: + type: string + uiMode: + $ref: '#/components/schemas/CheckoutSessionUIMode' + paymentMethodTypes: type: array items: - $ref: '#/components/schemas/Address' - maxItems: 1 - title: Regular post addresses for where information should be sent if needed. - description: Party represents a person or business entity. - BillingPaymentTermDueDate: + type: string + description: Create Stripe checkout session options + CreateStripeCheckoutSessionResult: type: object required: - - type - - dueAt + - customerId + - stripeCustomerId + - sessionId + - setupIntentId + - url + - mode properties: - type: + customerId: type: string - enum: - - due_date - title: Type of terms to be applied. - detail: + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: The OpenMeter customer ID. + stripeCustomerId: type: string - title: Text detail of the chosen payment terms. - notes: + description: The Stripe customer ID. + sessionId: type: string - title: Description of the conditions for payment. - dueAt: - type: array - items: - $ref: '#/components/schemas/BillingDueDate' - minItems: 1 - title: When the payment is due. - description: PaymentTermDueDate defines the terms for payment on a specific date. - BillingPaymentTermInstant: + description: The checkout session ID. + setupIntentId: + type: string + description: The checkout session setup intent ID. + url: + type: string + description: URL to show the checkout session. + mode: + allOf: + - $ref: '#/components/schemas/StripeCheckoutSessionMode' + description: |- + Mode + Always `setup` for now. + cancelURL: + type: string + description: Cancel URL. + successURL: + type: string + description: Success URL. + returnURL: + type: string + description: Return URL. + description: Create Stripe Checkout Session response. + CreditNoteOriginalInvoiceRef: type: object required: - type + - url properties: type: type: string enum: - - instant - title: Type of terms to be applied. - detail: + - credit_node_original_invoice + issuedAt: type: string - title: Text detail of the chosen payment terms. - notes: + format: date-time + example: 2023-01-01T01:01:01.001Z + description: IssueAt reflects the time the document was issued. + readOnly: true + number: + allOf: + - $ref: '#/components/schemas/InvoiceNumber' + description: (Serial) Number of the referenced document. + readOnly: true + url: type: string - title: Description of the conditions for payment. - description: PaymentTermInstant defines the terms for payment on receipt of invoice. - BillingPaymentTerms: - anyOf: - - $ref: '#/components/schemas/BillingPaymentTermInstant' - - $ref: '#/components/schemas/BillingPaymentTermDueDate' - description: PaymentTerms defines the terms for payment. - BillingPeriod: + format: uri + description: Link to the source document. + readOnly: true + allOf: + - $ref: '#/components/schemas/InvoiceGenericDocumentRef' + description: CreditNoteOriginalInvoiceRef is used to reference the original invoice that a credit note is based on. + CurrencyCode: + type: string + example: USD + minLength: 3 + maxLength: 3 + pattern: ^[A-Z]{3}$ + description: |- + Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. + Custom three-letter currency codes are also supported for convenience. + CustomSubscriptionChange: type: object required: - - start - - end + - currency + - activeFrom + - customPlan properties: - start: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: Start of the period. - end: + currency: + $ref: '#/components/schemas/CurrencyCode' + activeFrom: type: string format: date-time example: 2023-01-01T01:01:01.001Z description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: End of the period. - description: |- - Period represents a time range. - - Billing always treats periods as start being inclusive and end being exclusive. - BillingProfile: + customPlan: + $ref: '#/components/schemas/PlanCreate' + description: Change a custom subscription. + Customer: type: object required: - id - name - createdAt - updatedAt - - supplier - - workflow - - apps - - default + - usageAttribution properties: id: type: string @@ -9100,6 +8887,13 @@ components: description: Timestamp of when the resource was created. title: Creation Time readOnly: true + updatedAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was last updated. + title: Last Update Time + readOnly: true deletedAt: type: string format: date-time @@ -9107,101 +8901,54 @@ components: description: Timestamp of when the resource was permanently deleted. title: Deletion Time readOnly: true - updatedAt: + timezone: type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: |- - When the resource was last updated. - - For updates this field must be set to the last update time to detect conflicts. - title: Last update time of the resource - supplier: - allOf: - - $ref: '#/components/schemas/BillingParty' - title: The name and contact information for the supplier this billing profile represents - workflow: - allOf: - - $ref: '#/components/schemas/BillingWorkflow' - title: The billing workflow settings for this profile - apps: + description: Timezone of the customer. + title: Timezone + usageAttribution: allOf: - - $ref: '#/components/schemas/BillingProfileAppsOrReference' - title: The applications used by this billing profile - readOnly: true - default: - type: boolean - title: Is this the default profile? - description: Profile represents a billing profile - BillingProfileAppReferences: - type: object - required: - - tax - - invoicing - - payment - properties: - tax: + - $ref: '#/components/schemas/CustomerUsageAttribution' + description: Mapping to attribute metered usage to the customer + title: Usage Attribution + primaryEmail: + type: string + description: The primary email address of the customer. + title: Primary Email + currency: allOf: - - $ref: '#/components/schemas/AppReference' - title: The tax app used for this workflow - invoicing: + - $ref: '#/components/schemas/CurrencyCode' + description: |- + Currency of the customer. + Used for billing, tax and invoicing. + title: Currency + billingAddress: allOf: - - $ref: '#/components/schemas/AppReference' - title: The invoicing app used for this workflow - payment: + - $ref: '#/components/schemas/Address' + description: |- + The billing address of the customer. + Used for tax and invoicing. + title: Billing Address + external: allOf: - - $ref: '#/components/schemas/AppReference' - title: The payment app used for this workflow - description: ProfileAppsReference represents the references (id, type) to the apps used by a billing profile - BillingProfileApps: - type: object - required: - - tax - - invoicing - - payment - properties: - tax: - $ref: '#/components/schemas/App' - invoicing: - $ref: '#/components/schemas/App' - payment: - $ref: '#/components/schemas/App' - description: ProfileApps represents the applications used by a billing profile - BillingProfileAppsOrReference: - anyOf: - - $ref: '#/components/schemas/BillingProfileApps' - - $ref: '#/components/schemas/BillingProfileAppReferences' - description: |- - ProfileAppsOrReference represents the union of ProfileApps and ProfileAppReferences - for a billing profile. - BillingProfileCreateAppsInput: - type: object - required: - - tax - - invoicing - - payment - properties: - tax: - allOf: - - $ref: '#/components/schemas/BillingWorkflowAppIdOrType' - title: The tax app used for this workflow - invoicing: - allOf: - - $ref: '#/components/schemas/BillingWorkflowAppIdOrType' - title: The invoicing app used for this workflow - payment: - allOf: - - $ref: '#/components/schemas/BillingWorkflowAppIdOrType' - title: The payment app used for this workflow - description: ProfileCreateAppsInput represents the input for creating a billing profile's apps - BillingProfileCreateInput: + - $ref: '#/components/schemas/CustomerExternalMapping' + description: External mappings for the customer. + title: External Mappings + example: + id: 01G65Z755AFWAKHE12NY0CQ9FH + name: ACME Inc. + usageAttribution: + subjectKeys: + - my_subject_key + external: + stripeCustomerId: cus_xxxxxxxxxxxxxx + createdAt: 2024-01-01T01:01:01.001Z + updatedAt: 2024-01-01T01:01:01.001Z + description: A customer object. + CustomerCreate: type: object required: - name - - supplier - - workflow - - default - - apps + - usageAttribution properties: name: type: string @@ -9221,98 +8968,99 @@ components: nullable: true description: Additional metadata for the resource. title: Metadata - supplier: + timezone: + type: string + description: Timezone of the customer. + title: Timezone + usageAttribution: allOf: - - $ref: '#/components/schemas/BillingPartyCreate' - title: The name and contact information for the supplier this billing profile represents - workflow: + - $ref: '#/components/schemas/CustomerUsageAttribution' + description: Mapping to attribute metered usage to the customer + title: Usage Attribution + primaryEmail: + type: string + description: The primary email address of the customer. + title: Primary Email + currency: allOf: - - $ref: '#/components/schemas/BillingWorkflow' - title: The billing workflow settings for this profile - default: - type: boolean - title: Is this the default profile? - apps: - $ref: '#/components/schemas/BillingProfileCreateAppsInput' - description: ProfileCreateInput represents the input for creating a billing profile - BillingProfileExpand: - type: string - enum: - - apps - - '*' - description: ProfileExpand details what profile fields to expand - x-enum-varnames: - - apps - - all - BillingProfileOrderBy: + - $ref: '#/components/schemas/CurrencyCode' + description: |- + Currency of the customer. + Used for billing, tax and invoicing. + title: Currency + billingAddress: + allOf: + - $ref: '#/components/schemas/Address' + description: |- + The billing address of the customer. + Used for tax and invoicing. + title: Billing Address + external: + allOf: + - $ref: '#/components/schemas/CustomerExternalMapping' + description: External mappings for the customer. + title: External Mappings + description: Resource create operation model. + CustomerExternalMapping: + type: object + properties: + stripeCustomerId: + type: string + description: |- + The Stripe customer ID. + Mapping to a Stripe Customer object. + Required to use Stripe as an invocing provider. + title: Stripe Customer + description: External mappings for the customer. + CustomerId: + type: object + required: + - id + properties: + id: + type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: ULID (Universally Unique Lexicographically Sortable Identifier). + description: Create Stripe checkout session customer ID. + CustomerOrderBy: type: string enum: - - createdAt - - updatedAt - - default + - id - name - description: ProfileOrderBy specifies the ordering options for profiles - BillingTaxBehavior: - type: string - enum: - - inclusive - - exclusive - description: |- - TaxBehavior details how the tax item is applied to the base amount. - - Inclusive means the tax is included in the base amount. - Exclusive means the tax is added to the base amount. - BillingTaxIdentificationCode: - type: string - minLength: 1 - maxLength: 32 - pattern: ^[A-Za-z0-9]+([\.\-\/ _]?[A-Za-z0-9]+)*$ - BillingTaxIdentity: - type: object - properties: - code: - allOf: - - $ref: '#/components/schemas/BillingTaxIdentificationCode' - title: Normalized tax code shown on the original identity document. - description: Identity stores the details required to identify an entity for tax purposes in a specific country. - BillingTaxItem: + - createdAt + description: Order by options for customers. + CustomerPaginatedResponse: type: object + required: + - totalCount + - page + - pageSize + - items properties: - config: - allOf: - - $ref: '#/components/schemas/TaxConfig' - title: Tax provider configuration. - percent: - allOf: - - $ref: '#/components/schemas/Percentage' - title: |- - Percent defines the percentage set manually or determined from the rate - key (calculated if rate present). A nil percent implies that this tax combo - is **exempt** from tax. - surcharge: - allOf: - - $ref: '#/components/schemas/Numeric' - title: Some countries require an additional surcharge (calculated if rate present). - behavior: - allOf: - - $ref: '#/components/schemas/BillingTaxBehavior' - title: Is the tax item inclusive or exclusive of the base amount. - description: TaxConfig stores the configuration for a tax line relative to an invoice line. - BillingUsageBasedLine: + totalCount: + type: integer + example: 500 + description: The items in the current page. + page: + type: integer + example: 1 + description: The items in the current page. + pageSize: + type: integer + example: 100 + description: The items in the current page. + items: + type: array + items: + $ref: '#/components/schemas/Customer' + description: The items in the current page. + description: Paginated response + CustomerReplaceUpdate: type: object required: - name - - createdAt - - updatedAt - - id - - status - - currency - - totals - - period - - invoiceAt - - type - - price - - featureKey + - usageAttribution properties: name: type: string @@ -9332,354 +9080,379 @@ components: nullable: true description: Additional metadata for the resource. title: Metadata - createdAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was created. - title: Creation Time - readOnly: true - updatedAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was last updated. - title: Last Update Time - readOnly: true - deletedAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was permanently deleted. - title: Deletion Time - readOnly: true - id: + timezone: type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: ULID (Universally Unique Lexicographically Sortable Identifier). - status: - allOf: - - $ref: '#/components/schemas/BillingLineStatus' - readOnly: true - discounts: - type: array - items: - $ref: '#/components/schemas/BillingLineDiscount' - title: Discounts applied to this line. - readOnly: true - charges: - type: array - items: - $ref: '#/components/schemas/BillingLineCharge' - title: Charges applied to this line. - readOnly: true - invoice: + description: Timezone of the customer. + title: Timezone + usageAttribution: allOf: - - $ref: '#/components/schemas/BillingInvoiceReference' - title: The invoice this item belongs to. + - $ref: '#/components/schemas/CustomerUsageAttribution' + description: Mapping to attribute metered usage to the customer + title: Usage Attribution + primaryEmail: + type: string + description: The primary email address of the customer. + title: Primary Email currency: allOf: - $ref: '#/components/schemas/CurrencyCode' - title: The currency of this line - taxes: - type: array - items: - $ref: '#/components/schemas/BillingTaxItem' - title: Map of taxes to be applied and used in the invoice totals. - readOnly: true - taxConfig: - type: object - allOf: - - $ref: '#/components/schemas/TaxConfig' - nullable: true - title: Tax config specify the tax configuration for this line. - children: - nullable: true - title: The lines detailing the item or service sold. - readOnly: true - type: array - items: - $ref: '#/components/schemas/BillingInvoiceLine' - totals: + description: |- + Currency of the customer. + Used for billing, tax and invoicing. + title: Currency + billingAddress: allOf: - - $ref: '#/components/schemas/BillingInvoiceTotals' - title: Totals for this line. - readOnly: true - period: + - $ref: '#/components/schemas/Address' + description: |- + The billing address of the customer. + Used for tax and invoicing. + title: Billing Address + external: allOf: - - $ref: '#/components/schemas/BillingPeriod' - title: Period of the line item applies to for revenue recognition pruposes. - invoiceAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: The time this line item should be invoiced. + - $ref: '#/components/schemas/CustomerExternalMapping' + description: External mappings for the customer. + title: External Mappings + description: Resource update operation model. + CustomerUsageAttribution: + type: object + required: + - subjectKeys + properties: + subjectKeys: + type: array + items: + type: string + minItems: 1 + maxItems: 1 + description: The subjects that are attributed to the customer. + title: SubjectKeys + description: |- + Mapping to attribute metered usage to the customer. + One customer can have multiple subjects, + but one subject can only belong to one customer. + Discount: + type: object + allOf: + - $ref: '#/components/schemas/DiscountPercentage' + description: |- + A discount on a price. + One of: percentage, amount, or usage. + DiscountPercentage: + type: object + required: + - type + - percentage + properties: type: type: string enum: - - usage_based - price: - $ref: '#/components/schemas/RateCardUsageBasedPrice' - featureKey: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: A key is a unique string that is used to identify a resource. - title: The feature that the usage is based on. - quantity: - allOf: - - $ref: '#/components/schemas/Numeric' - title: Quantity of the item being sold. - readOnly: true - description: UsageBasedLine represents a line item that is sold to the customer based on usage. - BillingUsageBasedLineCreate: + - percentage + description: The type of the discount. + title: Type + percentage: + type: number + minimum: 0 + maximum: 100 + description: The percentage of the discount. + title: Percentage + rateCards: + type: array + items: + type: string + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: A key is a unique string that is used to identify a resource. + description: |- + The rate cards that the discount applies to. + When not specified, the discount applies to all rate cards. + title: Discounted RateCards + description: Percentage discount. + DiscountPercentageUpdateItem: type: object required: - - name - - currency - - period - - invoiceAt + - percentage + properties: + percentage: + type: number + minimum: 0 + maximum: 100 + description: The percentage of the discount. + title: Percentage + rateCards: + type: array + items: + type: string + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: A key is a unique string that is used to identify a resource. + description: |- + The rate cards that the discount applies to. + When not specified, the discount applies to all rate cards. + title: Discounted RateCards + description: Percentage discount. + DiscountType: + type: string + enum: + - percentage + description: The type of the discount. + DiscountUpdateItem: + type: object + allOf: + - $ref: '#/components/schemas/DiscountPercentageUpdateItem' + description: |- + A discount on a price. + One of: percentage, amount, or usage. + Entitlement: + anyOf: + - $ref: '#/components/schemas/EntitlementMetered' + - $ref: '#/components/schemas/EntitlementStatic' + - $ref: '#/components/schemas/EntitlementBoolean' + discriminator: + propertyName: type + mapping: + metered: '#/components/schemas/EntitlementMetered' + static: '#/components/schemas/EntitlementStatic' + boolean: '#/components/schemas/EntitlementBoolean' + description: |- + Entitlement templates are used to define the entitlements of a plan. + Features are omitted from the entitlement template, as they are defined in the rate card. + EntitlementBaseTemplate: + type: object + required: + - createdAt + - updatedAt + - id - type - - price + - subjectKey - featureKey + - featureId properties: - name: + createdAt: type: string - minLength: 1 - maxLength: 256 - description: Human-readable name for the resource. Between 1 and 256 characters. - title: Display name - description: + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was created. + title: Creation Time + readOnly: true + updatedAt: type: string - maxLength: 1024 - description: Optional description of the resource. Maximum 1024 characters. - title: Description + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was last updated. + title: Last Update Time + readOnly: true + deletedAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was permanently deleted. + title: Deletion Time + readOnly: true metadata: - type: object allOf: - $ref: '#/components/schemas/Metadata' - nullable: true - description: Additional metadata for the resource. - title: Metadata - invoice: - allOf: - - $ref: '#/components/schemas/BillingInvoiceReference' - title: The invoice this item belongs to. - currency: - allOf: - - $ref: '#/components/schemas/CurrencyCode' - title: The currency of this line - taxConfig: - type: object - allOf: - - $ref: '#/components/schemas/TaxConfig' - nullable: true - title: Tax config specify the tax configuration for this line. - period: - allOf: - - $ref: '#/components/schemas/BillingPeriod' - title: Period of the line item applies to for revenue recognition pruposes. - invoiceAt: + description: Additional metadata for the feature. + id: type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: The time this line item should be invoiced. + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: Readonly unique ULID identifier. + readOnly: true type: + allOf: + - $ref: '#/components/schemas/EntitlementType' + description: The type of the entitlement. + title: Type + subjectKey: type: string - enum: - - usage_based - price: - $ref: '#/components/schemas/RateCardUsageBasedPrice' + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: The identifier key unique to the subject + example: customer-1 featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: A key is a unique string that is used to identify a resource. - title: The feature that the usage is based on. - description: UsageBasedLine represents a line item that is sold to the customer based on usage. - BillingUsageBasedLineCreateItem: + description: The feature the subject is entitled to use. + example: example-feature-key + featureId: + type: string + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: The feature the subject is entitled to use. + currentUsagePeriod: + allOf: + - $ref: '#/components/schemas/Period' + description: The current usage period. + usagePeriod: + allOf: + - $ref: '#/components/schemas/RecurringPeriod' + description: The defined usage period of the entitlement + description: Shared fields of the entitlement templates. + EntitlementBoolean: type: object required: - - name - - currency - - period - - invoiceAt - type - - price + - createdAt + - updatedAt + - id + - subjectKey - featureKey + - featureId properties: - name: + type: type: string - minLength: 1 - maxLength: 256 - description: Human-readable name for the resource. Between 1 and 256 characters. - title: Display name - description: + enum: + - boolean + createdAt: type: string - maxLength: 1024 - description: Optional description of the resource. Maximum 1024 characters. - title: Description - metadata: - type: object - allOf: - - $ref: '#/components/schemas/Metadata' - nullable: true - description: Additional metadata for the resource. - title: Metadata - invoice: - allOf: - - $ref: '#/components/schemas/BillingInvoiceReference' - title: The invoice this item belongs to. - currency: - allOf: - - $ref: '#/components/schemas/CurrencyCode' - title: The currency of this line - taxConfig: - type: object - allOf: - - $ref: '#/components/schemas/TaxConfig' - nullable: true - title: Tax config specify the tax configuration for this line. - period: - allOf: - - $ref: '#/components/schemas/BillingPeriod' - title: Period of the line item applies to for revenue recognition pruposes. - invoiceAt: + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was created. + title: Creation Time + readOnly: true + updatedAt: type: string format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - title: The time this line item should be invoiced. - type: + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was last updated. + title: Last Update Time + readOnly: true + deletedAt: type: string - enum: - - usage_based - price: - $ref: '#/components/schemas/RateCardUsageBasedPrice' + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was permanently deleted. + title: Deletion Time + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/Metadata' + description: Additional metadata for the feature. + id: + type: string + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: Readonly unique ULID identifier. + readOnly: true + subjectKey: + type: string + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: The identifier key unique to the subject + example: customer-1 featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: A key is a unique string that is used to identify a resource. - title: The feature that the usage is based on. - description: UsageBasedLine represents a line item that is sold to the customer based on usage. - BillingValidationIssue: + description: The feature the subject is entitled to use. + example: example-feature-key + featureId: + type: string + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: The feature the subject is entitled to use. + currentUsagePeriod: + allOf: + - $ref: '#/components/schemas/Period' + description: The current usage period. + usagePeriod: + allOf: + - $ref: '#/components/schemas/RecurringPeriod' + description: The defined usage period of the entitlement + allOf: + - $ref: '#/components/schemas/EntitlementBaseTemplate' + description: Entitlement template of a boolean entitlement. + EntitlementBooleanCreateInputs: type: object required: - - severity - - component - - message + - type properties: - severity: - allOf: - - $ref: '#/components/schemas/BillingValidationIssueSeverity' - title: The severity of the issue. - field: - type: string - title: The field that the issue is related to, if available in JSON path format. - code: - type: string - title: Machine indentifiable code for the issue, if available. - component: + featureKey: type: string - title: Component reporting the issue. - message: + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: |- + The feature the subject is entitled to use. + Either featureKey or featureId is required. + example: example-feature-key + featureId: type: string - title: A human-readable description of the issue. + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: |- + The feature the subject is entitled to use. + Either featureKey or featureId is required. metadata: allOf: - $ref: '#/components/schemas/Metadata' - title: Metadata - description: |- - ValidationIssue captures any validation issues related to the invoice. - - Issues with severity "critical" will prevent the invoice from being issued. - BillingValidationIssueSeverity: - type: string - enum: - - critical - - warning - description: |- - ValidationIssueSeverity describes the severity of a validation issue. - - Issues with severity "critical" will prevent the invoice from being issued. - BillingVoidInvoiceAction: - type: object - required: - - percentage - - action - properties: - percentage: - allOf: - - $ref: '#/components/schemas/Percentage' - title: How much of the total line items to be voided? (e.g. 100% means all charges are voided) - action: + description: Additional metadata for the feature. + usagePeriod: allOf: - - $ref: '#/components/schemas/BillingVoidInvoiceLineAction' - title: 'How to handle the voided line items, default: pending' - description: InvoiceVoidAction describes how to handle the voided line items. - BillingVoidInvoiceInput: + - $ref: '#/components/schemas/RecurringPeriodCreateInput' + description: The usage period associated with the entitlement. + type: + type: string + enum: + - boolean + description: Create inputs for boolean entitlement + EntitlementCreateInputs: + anyOf: + - $ref: '#/components/schemas/EntitlementMeteredCreateInputs' + - $ref: '#/components/schemas/EntitlementStaticCreateInputs' + - $ref: '#/components/schemas/EntitlementBooleanCreateInputs' + discriminator: + propertyName: type + mapping: + metered: '#/components/schemas/EntitlementMeteredCreateInputs' + static: '#/components/schemas/EntitlementStaticCreateInputs' + boolean: '#/components/schemas/EntitlementBooleanCreateInputs' + description: Create inputs for entitlement + EntitlementCreateSharedFields: type: object - required: - - action - - reason - - overrides properties: - action: - allOf: - - $ref: '#/components/schemas/BillingVoidInvoiceAction' - description: The action to take on the voided line items. - title: The action to take on the voided lines. - reason: + featureKey: type: string - description: The reason for voiding the invoice. - title: The reason for voiding the invoice - overrides: - type: array - items: - $ref: '#/components/schemas/BillingVoidInvoiceLineOverride' - nullable: true + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- - Per line item overrides for the action. - - If not specified, the `action` will be applied to all line items. - description: Request to void an invoice - BillingVoidInvoiceLineAction: - type: string - enum: - - discard - - pending - - pending_next_cycle - description: VoidInvoiceLineAction describes how to handle the voidied line item in the invoice. - BillingVoidInvoiceLineOverride: - type: object - required: - - lineId - - action - properties: - lineId: + The feature the subject is entitled to use. + Either featureKey or featureId is required. + example: example-feature-key + featureId: type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: ULID (Universally Unique Lexicographically Sortable Identifier). - title: The line item ID to override - action: + description: |- + The feature the subject is entitled to use. + Either featureKey or featureId is required. + metadata: allOf: - - $ref: '#/components/schemas/BillingVoidInvoiceAction' - title: The action to take on the line item - description: VoidInvoiceLineOverride describes how to handle a specific line item in the invoice when voiding. - BillingWorkflow: + - $ref: '#/components/schemas/Metadata' + description: Additional metadata for the feature. + usagePeriod: + allOf: + - $ref: '#/components/schemas/RecurringPeriodCreateInput' + description: The usage period associated with the entitlement. + description: Shared fields for entitlement creation + EntitlementGrant: type: object required: - createdAt - updatedAt + - amount + - effectiveAt + - expiration - id + - entitlementId properties: createdAt: type: string @@ -9702,730 +9475,433 @@ components: description: Timestamp of when the resource was permanently deleted. title: Deletion Time readOnly: true - collection: - allOf: - - $ref: '#/components/schemas/BillingWorkflowCollectionSettings' - title: The collection settings for this workflow - invoicing: + amount: + type: number + format: double + example: 100 + minimum: 0 + description: The amount to grant. Should be a positive number. + priority: + type: integer + format: uint8 + example: 1 + minimum: 1 + maximum: 255 + description: |- + The priority of the grant. Grants with higher priority are applied first. + Priority is a positive decimal numbers. With lower numbers indicating higher importance. + For example, a priority of 1 is more urgent than a priority of 2. + When there are several grants available for the same subject, the system selects the grant with the highest priority. + In cases where grants share the same priority level, the grant closest to its expiration will be used first. + In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first. + effectiveAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute). + expiration: allOf: - - $ref: '#/components/schemas/BillingWorkflowInvoicingSettings' - title: The invoicing settings for this workflow - payment: + - $ref: '#/components/schemas/ExpirationPeriod' + description: The grant expiration definition + maxRolloverAmount: + type: number + format: double + example: 100 + description: |- + Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. + Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) + default: 0 + minRolloverAmount: + type: number + format: double + example: 100 + description: |- + Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. + Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) + default: 0 + metadata: allOf: - - $ref: '#/components/schemas/BillingWorkflowPaymentSettings' - title: The payment settings for this workflow + - $ref: '#/components/schemas/Metadata' + example: + stripePaymentId: pi_4OrAkhLvyihio9p51h9iiFnB + description: The grant metadata. id: type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: A unique identifier for the resource. - title: ID + description: Readonly unique ULID identifier. readOnly: true - description: Workflow represents a billing workflow - BillingWorkflowAppIdOrType: - type: string - description: |- - AppIdOrType can be used to reference an app during creation only. - - This can be either an AppType or the ULID of an app. - BillingWorkflowAppReferenceType: - type: string - enum: - - app_id - - app_type - description: App reference type specifies the type of reference inside an app reference - BillingWorkflowCollectionAlignment: - type: string - enum: - - subscription - description: |- - CollectionAlignment specifies when the pending line items should be collected into - an invoice. - title: Collection alignment - BillingWorkflowCollectionMethod: - type: string - enum: - - charge_automatically - - send_invoice - description: CollectionMethod specifies how the invoice should be collected (automatic vs manual) - title: Collection method - BillingWorkflowCollectionSettings: - type: object - properties: - alignment: - allOf: - - $ref: '#/components/schemas/BillingWorkflowCollectionAlignment' - description: When to collect the pending line items into an invoice. - default: subscription - interval: - type: string - format: ISO8601 - example: P1D - description: The interval for collecting the pending line items into an invoice. - default: PT1H - description: Workflow collection specifies how to collect the pending line items for an invoice - BillingWorkflowInvoicingSettings: - type: object - properties: - autoAdvance: - type: boolean - description: Whether to automatically issue the invoice after the draftPeriod has passed. - default: true - draftPeriod: - type: string - format: ISO8601 - example: P1D - description: The period for the invoice to be kept in draft status for manual reviews. - default: P1D - dueAfter: - type: string - format: ISO8601 - example: P1D - description: The period after which the invoice is due. - default: P7D - description: WorkflowInvoice represents the invoice settings for a billing workflow - title: Workflow invoice settings - BillingWorkflowLineResolution: - type: string - enum: - - day - - period - description: LineResolution specifies how the line items should be resolved in the invoice - title: Item resolution - BillingWorkflowPaymentSettings: - type: object - properties: - collectionMethod: - allOf: - - $ref: '#/components/schemas/BillingWorkflowCollectionMethod' - default: charge_automatically - description: WorkflowPaymentSettings represents the payment settings for a billing workflow - title: Workflow payment settings - BillingWorkflowSettings: - type: object - properties: - collection: - allOf: - - $ref: '#/components/schemas/BillingWorkflowCollectionSettings' - title: The collection settings for this workflow - invoicing: - allOf: - - $ref: '#/components/schemas/BillingWorkflowInvoicingSettings' - title: The invoicing settings for this workflow - payment: - allOf: - - $ref: '#/components/schemas/BillingWorkflowPaymentSettings' - title: The payment settings for this workflow - description: WorkflowSettings represents the settings for a billing workflow. - CheckoutSessionCustomTextAfterSubmitParams: - type: object - properties: - afterSubmit: - type: object - properties: - message: - type: string - shippingAddress: - type: object - properties: - message: - type: string - submit: - type: object - properties: - message: - type: string - termsOfServiceAcceptance: - type: object - properties: - message: - type: string - description: Stripe CheckoutSession.custom_text - CheckoutSessionUIMode: - type: string - enum: - - embedded - - hosted - description: Stripe CheckoutSession.ui_mode - ClientAppStartResponse: - type: object - required: - - url - properties: - url: - type: string - description: The URL to start the OAuth2 authorization code grant flow. - description: Response from the client app (OpenMeter backend) to start the OAuth2 flow. - ConflictProblemResponse: - type: object - allOf: - - $ref: '#/components/schemas/UnexpectedProblemResponse' - description: The request could not be completed due to a conflict with the current state of the target resource. - CountryCode: - type: string - example: US - minLength: 2 - maxLength: 2 - pattern: ^[A-Z]{2}$ - description: |- - [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. - CreateCustomSubscriptionRequestBody: - type: object - required: - - currency - - activeFrom - - customPlan - - customerId - properties: - currency: - $ref: '#/components/schemas/CurrencyCode' - activeFrom: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - customPlan: - $ref: '#/components/schemas/PlanCreate' - customerId: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: ULID (Universally Unique Lexicographically Sortable Identifier). - description: Create a custom subscription. - CreateStripeCheckoutSessionRequest: - type: object - required: - - customer - - options - properties: - appId: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: If not provided, the default Stripe app is used if any. - customer: - anyOf: - - $ref: '#/components/schemas/CustomerId' - - $ref: '#/components/schemas/CustomerCreate' - description: |- - Provide a customer ID to use an existing OpenMeter customer. - or provide a customer object to create a new customer. - stripeCustomerId: - type: string - description: |- - Stripe customer ID. - If not provided OpenMeter creates a new Stripe customer or - uses the OpenMeter customer's default Stripe customer ID. - options: - allOf: - - $ref: '#/components/schemas/CreateStripeCheckoutSessionRequestOptions' - description: Options passed to Stripe when creating the checkout session. - description: Create Stripe checkout session request. - CreateStripeCheckoutSessionRequestOptions: - type: object - properties: - currency: - $ref: '#/components/schemas/CurrencyCode' - cancelURL: - type: string - clientReferenceID: - type: string - customText: - $ref: '#/components/schemas/CheckoutSessionCustomTextAfterSubmitParams' - metadata: - type: object - additionalProperties: - type: string - returnURL: - type: string - successURL: - type: string - uiMode: - $ref: '#/components/schemas/CheckoutSessionUIMode' - paymentMethodTypes: - type: array - items: - type: string - description: Create Stripe checkout session options - CreateStripeCheckoutSessionResult: - type: object - required: - - customerId - - stripeCustomerId - - sessionId - - setupIntentId - - url - - mode - properties: - customerId: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: The OpenMeter customer ID. - stripeCustomerId: - type: string - description: The Stripe customer ID. - sessionId: - type: string - description: The checkout session ID. - setupIntentId: - type: string - description: The checkout session setup intent ID. - url: - type: string - description: URL to show the checkout session. - mode: - allOf: - - $ref: '#/components/schemas/StripeCheckoutSessionMode' - description: |- - Mode - Always `setup` for now. - cancelURL: - type: string - description: Cancel URL. - successURL: - type: string - description: Success URL. - returnURL: - type: string - description: Return URL. - description: Create Stripe Checkout Session response. - CurrencyCode: - type: string - example: USD - minLength: 3 - maxLength: 3 - pattern: ^[A-Z]{3}$ - description: |- - Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. - Custom three-letter currency codes are also supported for convenience. - CustomSubscriptionChange: - type: object - required: - - currency - - activeFrom - - customPlan - properties: - currency: - $ref: '#/components/schemas/CurrencyCode' - activeFrom: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' - customPlan: - $ref: '#/components/schemas/PlanCreate' - description: Change a custom subscription. - Customer: - type: object - required: - - id - - name - - createdAt - - updatedAt - - usageAttribution - properties: - id: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: A unique identifier for the resource. - title: ID - readOnly: true - name: - type: string - minLength: 1 - maxLength: 256 - description: Human-readable name for the resource. Between 1 and 256 characters. - title: Display name - description: - type: string - maxLength: 1024 - description: Optional description of the resource. Maximum 1024 characters. - title: Description - metadata: - type: object - allOf: - - $ref: '#/components/schemas/Metadata' - nullable: true - description: Additional metadata for the resource. - title: Metadata - createdAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was created. - title: Creation Time - readOnly: true - updatedAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was last updated. - title: Last Update Time - readOnly: true - deletedAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was permanently deleted. - title: Deletion Time - readOnly: true - timezone: - type: string - description: Timezone of the customer. - title: Timezone - usageAttribution: - allOf: - - $ref: '#/components/schemas/CustomerUsageAttribution' - description: Mapping to attribute metered usage to the customer - title: Usage Attribution - primaryEmail: - type: string - description: The primary email address of the customer. - title: Primary Email - currency: - allOf: - - $ref: '#/components/schemas/CurrencyCode' - description: |- - Currency of the customer. - Used for billing, tax and invoicing. - title: Currency - billingAddress: - allOf: - - $ref: '#/components/schemas/Address' - description: |- - The billing address of the customer. - Used for tax and invoicing. - title: Billing Address - external: - allOf: - - $ref: '#/components/schemas/CustomerExternalMapping' - description: External mappings for the customer. - title: External Mappings - example: - id: 01G65Z755AFWAKHE12NY0CQ9FH - name: ACME Inc. - usageAttribution: - subjectKeys: - - my_subject_key - external: - stripeCustomerId: cus_xxxxxxxxxxxxxx - createdAt: 2024-01-01T01:01:01.001Z - updatedAt: 2024-01-01T01:01:01.001Z - description: A customer object. - CustomerCreate: - type: object - required: - - name - - usageAttribution - properties: - name: + entitlementId: type: string - minLength: 1 - maxLength: 256 - description: Human-readable name for the resource. Between 1 and 256 characters. - title: Display name - description: + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + description: The unique entitlement ULID that the grant is associated with. + readOnly: true + nextRecurrence: type: string - maxLength: 1024 - description: Optional description of the resource. Maximum 1024 characters. - title: Description - metadata: - type: object - allOf: - - $ref: '#/components/schemas/Metadata' - nullable: true - description: Additional metadata for the resource. - title: Metadata - timezone: + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The next time the grant will recurr. + expiresAt: type: string - description: Timezone of the customer. - title: Timezone - usageAttribution: - allOf: - - $ref: '#/components/schemas/CustomerUsageAttribution' - description: Mapping to attribute metered usage to the customer - title: Usage Attribution - primaryEmail: + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time the grant expires. + readOnly: true + voidedAt: type: string - description: The primary email address of the customer. - title: Primary Email - currency: - allOf: - - $ref: '#/components/schemas/CurrencyCode' - description: |- - Currency of the customer. - Used for billing, tax and invoicing. - title: Currency - billingAddress: - allOf: - - $ref: '#/components/schemas/Address' - description: |- - The billing address of the customer. - Used for tax and invoicing. - title: Billing Address - external: + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time the grant was voided. + recurrence: allOf: - - $ref: '#/components/schemas/CustomerExternalMapping' - description: External mappings for the customer. - title: External Mappings - description: Resource create operation model. - CustomerExternalMapping: - type: object - properties: - stripeCustomerId: - type: string - description: |- - The Stripe customer ID. - Mapping to a Stripe Customer object. - Required to use Stripe as an invocing provider. - title: Stripe Customer - description: External mappings for the customer. - CustomerId: - type: object - required: - - id - properties: - id: - type: string - example: 01G65Z755AFWAKHE12NY0CQ9FH - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: ULID (Universally Unique Lexicographically Sortable Identifier). - description: Create Stripe checkout session customer ID. - CustomerOrderBy: - type: string - enum: - - id - - name - - createdAt - description: Order by options for customers. - CustomerOverridePaginatedResponse: + - $ref: '#/components/schemas/RecurringPeriod' + description: The recurrence period of the grant. + description: The grant. + EntitlementGrantCreateInput: type: object required: - - totalCount - - page - - pageSize - - items + - amount + - effectiveAt + - expiration properties: - totalCount: - type: integer - example: 500 - description: The items in the current page. - page: - type: integer - example: 1 - description: The items in the current page. - pageSize: - type: integer + amount: + type: number + format: double example: 100 - description: The items in the current page. - items: - type: array - items: - $ref: '#/components/schemas/BillingCustomerOverride' - description: The items in the current page. - description: Paginated response - CustomerPaginatedResponse: - type: object - required: - - totalCount - - page - - pageSize - - items - properties: - totalCount: - type: integer - example: 500 - description: The items in the current page. - page: + minimum: 0 + description: The amount to grant. Should be a positive number. + priority: type: integer + format: uint8 example: 1 - description: The items in the current page. - pageSize: - type: integer + minimum: 1 + maximum: 255 + description: |- + The priority of the grant. Grants with higher priority are applied first. + Priority is a positive decimal numbers. With lower numbers indicating higher importance. + For example, a priority of 1 is more urgent than a priority of 2. + When there are several grants available for the same subject, the system selects the grant with the highest priority. + In cases where grants share the same priority level, the grant closest to its expiration will be used first. + In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first. + effectiveAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute). + expiration: + allOf: + - $ref: '#/components/schemas/ExpirationPeriod' + description: The grant expiration definition + maxRolloverAmount: + type: number + format: double example: 100 - description: The items in the current page. - items: - type: array - items: - $ref: '#/components/schemas/Customer' - description: The items in the current page. - description: Paginated response - CustomerReplaceUpdate: + description: |- + Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. + Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) + default: 0 + minRolloverAmount: + type: number + format: double + example: 100 + description: |- + Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. + Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) + default: 0 + metadata: + allOf: + - $ref: '#/components/schemas/Metadata' + example: + stripePaymentId: pi_4OrAkhLvyihio9p51h9iiFnB + description: The grant metadata. + recurrence: + allOf: + - $ref: '#/components/schemas/RecurringPeriodCreateInput' + description: The subject of the grant. + description: The grant creation input. + EntitlementMetered: type: object required: - - name - - usageAttribution + - type + - createdAt + - updatedAt + - id + - subjectKey + - featureKey + - featureId + - lastReset + - currentUsagePeriod + - measureUsageFrom + - usagePeriod properties: - name: + type: + type: string + enum: + - metered + isSoftLimit: + type: boolean + description: If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true. + title: Soft limit + default: false + isUnlimited: + type: boolean + description: Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future. + deprecated: true + default: false + issueAfterReset: + type: number + format: double + minimum: 0 + description: |- + You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. + If an amount is specified here, a grant will be created alongside the entitlement with the specified amount. + That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here. + Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same. + title: Initial grant amount + issueAfterResetPriority: + type: integer + format: uint8 + minimum: 1 + maximum: 255 + description: Defines the grant priority for the default grant. + title: Issue grant after reset priority + default: 1 + preserveOverageAtReset: + type: boolean + description: If true, the overage is preserved at reset. If false, the usage is reset to 0. + title: Preserve overage at reset + default: false + createdAt: type: string - minLength: 1 - maxLength: 256 - description: Human-readable name for the resource. Between 1 and 256 characters. - title: Display name - description: + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was created. + title: Creation Time + readOnly: true + updatedAt: type: string - maxLength: 1024 - description: Optional description of the resource. Maximum 1024 characters. - title: Description + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was last updated. + title: Last Update Time + readOnly: true + deletedAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was permanently deleted. + title: Deletion Time + readOnly: true metadata: - type: object allOf: - $ref: '#/components/schemas/Metadata' - nullable: true - description: Additional metadata for the resource. - title: Metadata - timezone: + description: Additional metadata for the feature. + id: type: string - description: Timezone of the customer. - title: Timezone - usageAttribution: - allOf: - - $ref: '#/components/schemas/CustomerUsageAttribution' - description: Mapping to attribute metered usage to the customer - title: Usage Attribution - primaryEmail: + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: Readonly unique ULID identifier. + readOnly: true + subjectKey: type: string - description: The primary email address of the customer. - title: Primary Email - currency: - allOf: - - $ref: '#/components/schemas/CurrencyCode' - description: |- - Currency of the customer. - Used for billing, tax and invoicing. - title: Currency - billingAddress: + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: The identifier key unique to the subject + example: customer-1 + featureKey: + type: string + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: The feature the subject is entitled to use. + example: example-feature-key + featureId: + type: string + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: The feature the subject is entitled to use. + lastReset: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time the last reset happened. + readOnly: true + currentUsagePeriod: allOf: - - $ref: '#/components/schemas/Address' - description: |- - The billing address of the customer. - Used for tax and invoicing. - title: Billing Address - external: + - $ref: '#/components/schemas/Period' + description: The current usage period. + readOnly: true + measureUsageFrom: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time from which usage is measured. If not specified on creation, defaults to entitlement creation time. + readOnly: true + usagePeriod: allOf: - - $ref: '#/components/schemas/CustomerExternalMapping' - description: External mappings for the customer. - title: External Mappings - description: Resource update operation model. - CustomerUsageAttribution: + - $ref: '#/components/schemas/RecurringPeriod' + description: THe usage period of the entitlement. + readOnly: true + description: |- + Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems. + Access is determined based on feature usage using a balance calculation (the "usage allowance" provided by the issued grants is "burnt down" by the usage). + EntitlementMeteredCalculatedFields: type: object required: - - subjectKeys + - lastReset + - currentUsagePeriod + - measureUsageFrom + - usagePeriod properties: - subjectKeys: - type: array - items: - type: string - minItems: 1 - maxItems: 1 - description: The subjects that are attributed to the customer. - title: SubjectKeys - description: |- - Mapping to attribute metered usage to the customer. - One customer can have multiple subjects, - but one subject can only belong to one customer. - Discount: - type: object - allOf: - - $ref: '#/components/schemas/DiscountPercentage' - description: |- - A discount on a price. - One of: percentage, amount, or usage. - DiscountPercentage: + lastReset: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time the last reset happened. + readOnly: true + currentUsagePeriod: + allOf: + - $ref: '#/components/schemas/Period' + description: The current usage period. + readOnly: true + measureUsageFrom: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time from which usage is measured. If not specified on creation, defaults to entitlement creation time. + readOnly: true + usagePeriod: + allOf: + - $ref: '#/components/schemas/RecurringPeriod' + description: THe usage period of the entitlement. + readOnly: true + description: Calculated fields for metered entitlements. + EntitlementMeteredCreateInputs: type: object required: - type - - percentage + - usagePeriod properties: + featureKey: + type: string + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: |- + The feature the subject is entitled to use. + Either featureKey or featureId is required. + example: example-feature-key + featureId: + type: string + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: |- + The feature the subject is entitled to use. + Either featureKey or featureId is required. + metadata: + allOf: + - $ref: '#/components/schemas/Metadata' + description: Additional metadata for the feature. type: type: string enum: - - percentage - description: The type of the discount. - title: Type - percentage: + - metered + isSoftLimit: + type: boolean + description: If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true. + title: Soft limit + default: false + isUnlimited: + type: boolean + description: Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future. + deprecated: true + default: false + usagePeriod: + allOf: + - $ref: '#/components/schemas/RecurringPeriodCreateInput' + description: The usage period associated with the entitlement. + measureUsageFrom: + allOf: + - $ref: '#/components/schemas/MeasureUsageFrom' + description: Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time. + issueAfterReset: type: number + format: double minimum: 0 - maximum: 100 - description: The percentage of the discount. - title: Percentage - rateCards: - type: array - items: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: A key is a unique string that is used to identify a resource. description: |- - The rate cards that the discount applies to. - When not specified, the discount applies to all rate cards. - title: Discounted RateCards - description: Percentage discount. - DiscountPercentageUpdateItem: + You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. + If an amount is specified here, a grant will be created alongside the entitlement with the specified amount. + That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here. + Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same. + title: Initial grant amount + issueAfterResetPriority: + type: integer + format: uint8 + minimum: 1 + maximum: 255 + description: Defines the grant priority for the default grant. + title: Issue grant after reset priority + default: 1 + preserveOverageAtReset: + type: boolean + description: If true, the overage is preserved at reset. If false, the usage is reset to 0. + title: Preserve overage at reset + default: false + description: Create inpurs for metered entitlement + EntitlementOrderBy: + type: string + enum: + - createdAt + - updatedAt + description: Order by options for entitlements. + EntitlementPaginatedResponse: type: object required: - - percentage + - totalCount + - page + - pageSize + - items properties: - percentage: - type: number - minimum: 0 - maximum: 100 - description: The percentage of the discount. - title: Percentage - rateCards: + totalCount: + type: integer + example: 500 + description: The items in the current page. + page: + type: integer + example: 1 + description: The items in the current page. + pageSize: + type: integer + example: 100 + description: The items in the current page. + items: type: array items: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: A key is a unique string that is used to identify a resource. - description: |- - The rate cards that the discount applies to. - When not specified, the discount applies to all rate cards. - title: Discounted RateCards - description: Percentage discount. - DiscountType: - type: string - enum: - - percentage - description: The type of the discount. - DiscountUpdateItem: - type: object - allOf: - - $ref: '#/components/schemas/DiscountPercentageUpdateItem' - description: |- - A discount on a price. - One of: percentage, amount, or usage. - Entitlement: - anyOf: - - $ref: '#/components/schemas/EntitlementMetered' - - $ref: '#/components/schemas/EntitlementStatic' - - $ref: '#/components/schemas/EntitlementBoolean' - discriminator: - propertyName: type - mapping: - metered: '#/components/schemas/EntitlementMetered' - static: '#/components/schemas/EntitlementStatic' - boolean: '#/components/schemas/EntitlementBoolean' - description: |- - Entitlement templates are used to define the entitlements of a plan. - Features are omitted from the entitlement template, as they are defined in the rate card. - EntitlementBaseTemplate: + $ref: '#/components/schemas/Entitlement' + description: The items in the current page. + description: Paginated response + EntitlementStatic: type: object required: + - type + - config - createdAt - updatedAt - id - - type - subjectKey - featureKey - featureId properties: + type: + type: string + enum: + - static + config: + type: string + format: json + example: '{ "integrations": ["github"] }' + description: The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object. createdAt: type: string format: date-time @@ -10457,11 +9933,6 @@ components: pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. readOnly: true - type: - allOf: - - $ref: '#/components/schemas/EntitlementType' - description: The type of the entitlement. - title: Type subjectKey: type: string minLength: 1 @@ -10487,24 +9958,201 @@ components: description: The current usage period. usagePeriod: allOf: - - $ref: '#/components/schemas/RecurringPeriod' - description: The defined usage period of the entitlement - description: Shared fields of the entitlement templates. - EntitlementBoolean: + - $ref: '#/components/schemas/RecurringPeriod' + description: The defined usage period of the entitlement + description: A static entitlement. + EntitlementStaticCreateInputs: + type: object + required: + - type + - config + properties: + featureKey: + type: string + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: |- + The feature the subject is entitled to use. + Either featureKey or featureId is required. + example: example-feature-key + featureId: + type: string + example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: |- + The feature the subject is entitled to use. + Either featureKey or featureId is required. + metadata: + allOf: + - $ref: '#/components/schemas/Metadata' + description: Additional metadata for the feature. + usagePeriod: + allOf: + - $ref: '#/components/schemas/RecurringPeriodCreateInput' + description: The usage period associated with the entitlement. + type: + type: string + enum: + - static + config: + type: string + format: json + example: '{ "integrations": ["github"] }' + description: The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object. + description: Create inputs for static entitlement + EntitlementType: + type: string + enum: + - metered + - boolean + - static + description: Type of the entitlement. + x-go-type: string + EntitlementValue: + type: object + required: + - hasAccess + properties: + hasAccess: + type: boolean + example: true + description: Whether the subject has access to the feature. Shared accross all entitlement types. + readOnly: true + balance: + type: number + format: double + example: 100 + description: Only available for metered entitlements. Metered entitlements are built around a balance calculation where feature usage is deducted from the issued grants. Balance represents the remaining balance of the entitlement, it's value never turns negative. + readOnly: true + usage: + type: number + format: double + example: 50 + description: Only available for metered entitlements. Returns the total feature usage in the current period. + readOnly: true + overage: + type: number + format: double + example: 0 + description: Only available for metered entitlements. Overage represents the usage that wasn't covered by grants, e.g. if the subject had a total feature usage of 100 in the period but they were only granted 80, there would be 20 overage. + readOnly: true + config: + type: string + example: '{ key: "value" }' + description: Only available for static entitlements. The JSON parsable config of the entitlement. + readOnly: true + description: Entitlements are the core of OpenMeter access management. They define access to features for subjects. Entitlements can be metered, boolean, or static. + Event: + type: object + required: + - id + - source + - specversion + - type + - subject + properties: + id: + type: string + example: 5c10fade-1c9e-4d6c-8275-c52c36731d3c + minLength: 1 + description: Identifies the event. + source: + type: string + example: service-name + minLength: 1 + format: uri-reference + description: Identifies the context in which an event happened. + specversion: + type: string + example: '1.0' + minLength: 1 + description: The version of the CloudEvents specification which the event uses. + default: '1.0' + type: + type: string + example: com.example.someevent + minLength: 1 + description: Contains a value describing the type of event related to the originating occurrence. + datacontenttype: + type: string + enum: + - application/json + nullable: true + example: application/json + description: Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP. + dataschema: + type: string + format: uri + nullable: true + minLength: 1 + description: Identifies the schema that data adheres to. + subject: + type: string + example: customer-id + minLength: 1 + description: Describes the subject of the event in the context of the event producer (identified by source). + time: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: Timestamp of when the occurrence happened. Must adhere to RFC 3339. + nullable: true + data: + type: object + additionalProperties: {} + nullable: true + description: |- + The event payload. + Optional, if present it must be a JSON object. + example: + id: 5c10fade-1c9e-4d6c-8275-c52c36731d3c + source: service-name + specversion: '1.0' + type: prompt + subject: customer-id + time: 2023-01-01T01:01:01.001Z + description: |- + CloudEvents Specification JSON Schema + + Optional properties are nullable according to the CloudEvents specification: + OPTIONAL not omitted attributes MAY be represented as a null JSON value. + x-go-type-import: + path: github.com/cloudevents/sdk-go/v2/event + x-go-type: event.Event + ExpirationDuration: + type: string + enum: + - HOUR + - DAY + - WEEK + - MONTH + - YEAR + description: The expiration duration enum + ExpirationPeriod: + type: object + required: + - duration + - count + properties: + duration: + allOf: + - $ref: '#/components/schemas/ExpirationDuration' + description: The unit of time for the expiration period. + count: + type: integer + example: 12 + description: The number of time units in the expiration period. + description: The grant expiration definition + Feature: type: object required: - - type - createdAt - updatedAt + - key + - name - id - - subjectKey - - featureKey - - featureId properties: - type: - type: string - enum: - - boolean createdAt: type: string format: date-time @@ -10526,348 +10174,403 @@ components: description: Timestamp of when the resource was permanently deleted. title: Deletion Time readOnly: true - metadata: - allOf: - - $ref: '#/components/schemas/Metadata' - description: Additional metadata for the feature. - id: + archivedAt: type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: Readonly unique ULID identifier. + format: date-time + example: 2023-01-01T01:01:01.001Z + description: Timestamp of when the resource was archived. + title: Archival Time readOnly: true - subjectKey: + key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: The identifier key unique to the subject - example: customer-1 - featureKey: + description: A key is a unique string that is used to identify a resource. + title: The unique key of the feature + name: + type: string + title: The human-readable name of the feature + metadata: + allOf: + - $ref: '#/components/schemas/Metadata' + example: + key: value + title: Optional metadata + meterSlug: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: The feature the subject is entitled to use. - example: example-feature-key - featureId: + description: A key is a unique string that is used to identify a resource. + example: tokens_total + title: Meter slug + meterGroupByFilters: + type: object + additionalProperties: + type: string + example: + model: gpt-4 + type: input + description: |- + Optional meter group by filters. + Useful if the meter scope is broader than what feature tracks. + Example scenario would be a meter tracking all token use with groupBy fields for the model, + then the feature could filter for model=gpt-4. + title: Meter group by filters + id: type: string example: 01ARZ3NDEKTSV4RRFFQ69G5FAV pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: The feature the subject is entitled to use. - currentUsagePeriod: - allOf: - - $ref: '#/components/schemas/Period' - description: The current usage period. - usagePeriod: - allOf: - - $ref: '#/components/schemas/RecurringPeriod' - description: The defined usage period of the entitlement - allOf: - - $ref: '#/components/schemas/EntitlementBaseTemplate' - description: Entitlement template of a boolean entitlement. - EntitlementBooleanCreateInputs: + description: Readonly unique ULID identifier. + readOnly: true + description: |- + Represents a feature that can be enabled or disabled for a plan. + Used both for product catalog and entitlements. + FeatureCreateInputs: type: object required: - - type + - key + - name properties: - featureKey: + key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: |- - The feature the subject is entitled to use. - Either featureKey or featureId is required. - example: example-feature-key - featureId: + description: A key is a unique string that is used to identify a resource. + title: The unique key of the feature + name: type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: |- - The feature the subject is entitled to use. - Either featureKey or featureId is required. + title: The human-readable name of the feature metadata: allOf: - $ref: '#/components/schemas/Metadata' - description: Additional metadata for the feature. - usagePeriod: - allOf: - - $ref: '#/components/schemas/RecurringPeriodCreateInput' - description: The usage period associated with the entitlement. - type: - type: string - enum: - - boolean - description: Create inputs for boolean entitlement - EntitlementCreateInputs: - anyOf: - - $ref: '#/components/schemas/EntitlementMeteredCreateInputs' - - $ref: '#/components/schemas/EntitlementStaticCreateInputs' - - $ref: '#/components/schemas/EntitlementBooleanCreateInputs' - discriminator: - propertyName: type - mapping: - metered: '#/components/schemas/EntitlementMeteredCreateInputs' - static: '#/components/schemas/EntitlementStaticCreateInputs' - boolean: '#/components/schemas/EntitlementBooleanCreateInputs' - description: Create inputs for entitlement - EntitlementCreateSharedFields: - type: object - properties: - featureKey: + example: + key: value + title: Optional metadata + meterSlug: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: A key is a unique string that is used to identify a resource. + example: tokens_total + title: Meter slug + meterGroupByFilters: + type: object + additionalProperties: + type: string + example: + model: gpt-4 + type: input description: |- - The feature the subject is entitled to use. - Either featureKey or featureId is required. - example: example-feature-key - featureId: + Optional meter group by filters. + Useful if the meter scope is broader than what feature tracks. + Example scenario would be a meter tracking all token use with groupBy fields for the model, + then the feature could filter for model=gpt-4. + title: Meter group by filters + description: |- + Represents a feature that can be enabled or disabled for a plan. + Used both for product catalog and entitlements. + FeatureMeta: + type: object + required: + - id + - key + properties: + id: type: string example: 01ARZ3NDEKTSV4RRFFQ69G5FAV pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: Unique identifier of a feature. + title: Feature Unique Identifier + key: + type: string + example: gpt4_tokens description: |- - The feature the subject is entitled to use. - Either featureKey or featureId is required. - metadata: - allOf: - - $ref: '#/components/schemas/Metadata' - description: Additional metadata for the feature. - usagePeriod: + The key is an immutable unique identifier of the feature used throughout the API, + for example when interacting with a subject's entitlements. + title: Feature Key + description: Limited representation of a feature resource which includes only its unique identifiers (id, key). + FeatureOrderBy: + type: string + enum: + - id + - createdAt + - updatedAt + description: Order by options for features. + FeaturePaginatedResponse: + type: object + required: + - totalCount + - page + - pageSize + - items + properties: + totalCount: + type: integer + example: 500 + description: The items in the current page. + page: + type: integer + example: 1 + description: The items in the current page. + pageSize: + type: integer + example: 100 + description: The items in the current page. + items: + type: array + items: + $ref: '#/components/schemas/Feature' + description: The items in the current page. + description: Paginated response + FlatPrice: + type: object + required: + - type + - amount + properties: + type: + type: string + enum: + - flat + amount: allOf: - - $ref: '#/components/schemas/RecurringPeriodCreateInput' - description: The usage period associated with the entitlement. - description: Shared fields for entitlement creation - EntitlementGrant: + - $ref: '#/components/schemas/Numeric' + description: The amount of the flat price. + description: Flat price. + FlatPriceWithPaymentTerm: type: object required: - - createdAt - - updatedAt + - type - amount - - effectiveAt - - expiration - - id - - entitlementId properties: - createdAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was created. - title: Creation Time - readOnly: true - updatedAt: - type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was last updated. - title: Last Update Time - readOnly: true - deletedAt: + type: type: string - format: date-time - example: 2024-01-01T01:01:01.001Z - description: Timestamp of when the resource was permanently deleted. - title: Deletion Time - readOnly: true + enum: + - flat amount: + allOf: + - $ref: '#/components/schemas/Numeric' + description: The amount of the flat price. + paymentTerm: + allOf: + - $ref: '#/components/schemas/PricePaymentTerm' + description: |- + The payment term of the flat price. + Defaults to in advance. + default: in_advance + description: Flat price with payment term. + ForbiddenProblemResponse: + type: object + allOf: + - $ref: '#/components/schemas/UnexpectedProblemResponse' + description: The server understood the request but refuses to authorize it. + GatewayTimeoutProblemResponse: + type: object + allOf: + - $ref: '#/components/schemas/UnexpectedProblemResponse' + description: The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. + GrantBurnDownHistorySegment: + type: object + required: + - period + - usage + - overage + - balanceAtStart + - grantBalancesAtStart + - balanceAtEnd + - grantBalancesAtEnd + - grantUsages + properties: + period: + allOf: + - $ref: '#/components/schemas/Period' + description: The period of the segment. + usage: type: number format: double example: 100 - minimum: 0 - description: The amount to grant. Should be a positive number. - priority: - type: integer - format: uint8 - example: 1 - minimum: 1 - maximum: 255 - description: |- - The priority of the grant. Grants with higher priority are applied first. - Priority is a positive decimal numbers. With lower numbers indicating higher importance. - For example, a priority of 1 is more urgent than a priority of 2. - When there are several grants available for the same subject, the system selects the grant with the highest priority. - In cases where grants share the same priority level, the grant closest to its expiration will be used first. - In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first. - effectiveAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute). - expiration: - allOf: - - $ref: '#/components/schemas/ExpirationPeriod' - description: The grant expiration definition - maxRolloverAmount: + description: The total usage of the grant in the period. + readOnly: true + overage: type: number format: double example: 100 - description: |- - Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. - Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) - default: 0 - minRolloverAmount: + description: Overuse that wasn't covered by grants. + readOnly: true + balanceAtStart: type: number format: double example: 100 - description: |- - Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. - Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) - default: 0 - metadata: - allOf: - - $ref: '#/components/schemas/Metadata' + description: entitlement balance at the start of the period. + readOnly: true + grantBalancesAtStart: + type: object + additionalProperties: + type: number + format: double example: - stripePaymentId: pi_4OrAkhLvyihio9p51h9iiFnB - description: The grant metadata. - id: - type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: Readonly unique ULID identifier. + 01G65Z755AFWAKHE12NY0CQ9FH: 100 + description: 'The balance breakdown of each active grant at the start of the period: GrantID: Balance' readOnly: true - entitlementId: - type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - description: The unique entitlement ULID that the grant is associated with. + balanceAtEnd: + type: number + format: double + example: 100 + description: The entitlement balance at the end of the period. readOnly: true - nextRecurrence: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: The next time the grant will recurr. - expiresAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: The time the grant expires. + grantBalancesAtEnd: + type: object + additionalProperties: + type: number + format: double + example: + 01G65Z755AFWAKHE12NY0CQ9FH: 100 + description: 'The balance breakdown of each active grant at the end of the period: GrantID: Balance' readOnly: true - voidedAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: The time the grant was voided. - recurrence: - allOf: - - $ref: '#/components/schemas/RecurringPeriod' - description: The recurrence period of the grant. - description: The grant. - EntitlementGrantCreateInput: + grantUsages: + type: array + items: + $ref: '#/components/schemas/GrantUsageRecord' + description: Which grants were actually burnt down in the period and by what amount. + readOnly: true + description: |- + A segment of the grant burn down history. + + A given segment represents the usage of a grant between events that changed either the grant burn down priority order or the usag period. + GrantOrderBy: + type: string + enum: + - id + - createdAt + - updatedAt + description: Order by options for grants. + GrantPaginatedResponse: type: object required: - - amount - - effectiveAt - - expiration + - totalCount + - page + - pageSize + - items properties: - amount: + totalCount: + type: integer + example: 500 + description: The items in the current page. + page: + type: integer + example: 1 + description: The items in the current page. + pageSize: + type: integer + example: 100 + description: The items in the current page. + items: + type: array + items: + $ref: '#/components/schemas/EntitlementGrant' + description: The items in the current page. + description: Paginated response + GrantUsageRecord: + type: object + required: + - grantId + - usage + properties: + grantId: + type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: The id of the grant + usage: type: number format: double example: 100 - minimum: 0 - description: The amount to grant. Should be a positive number. - priority: - type: integer - format: uint8 - example: 1 - minimum: 1 - maximum: 255 - description: |- - The priority of the grant. Grants with higher priority are applied first. - Priority is a positive decimal numbers. With lower numbers indicating higher importance. - For example, a priority of 1 is more urgent than a priority of 2. - When there are several grants available for the same subject, the system selects the grant with the highest priority. - In cases where grants share the same priority level, the grant closest to its expiration will be used first. - In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first. - effectiveAt: + description: The usage in the period + description: Usage Record + IngestEventsBody: + anyOf: + - $ref: '#/components/schemas/Event' + - type: array + items: + $ref: '#/components/schemas/Event' + description: |- + The body of the events request. + Either a single event or a batch of events. + IngestedEvent: + type: object + required: + - event + - ingestedAt + - storedAt + properties: + event: + $ref: '#/components/schemas/Event' + validationError: + type: string + description: The validation error if the event failed validation. + ingestedAt: type: string format: date-time example: 2023-01-01T01:01:01.001Z - description: Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute). - expiration: - allOf: - - $ref: '#/components/schemas/ExpirationPeriod' - description: The grant expiration definition - maxRolloverAmount: - type: number - format: double - example: 100 - description: |- - Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. - Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) - default: 0 - minRolloverAmount: - type: number - format: double - example: 100 - description: |- - Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. - Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) - default: 0 - metadata: - allOf: - - $ref: '#/components/schemas/Metadata' - example: - stripePaymentId: pi_4OrAkhLvyihio9p51h9iiFnB - description: The grant metadata. - recurrence: - allOf: - - $ref: '#/components/schemas/RecurringPeriodCreateInput' - description: The subject of the grant. - description: The grant creation input. - EntitlementMetered: + description: The date and time the event was ingested. + storedAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The date and time the event was stored. + example: + event: + id: 5c10fade-1c9e-4d6c-8275-c52c36731d3c + source: service-name + specversion: '1.0' + type: prompt + subject: customer-id + time: 2023-01-01T01:01:01.001Z + ingestedAt: 2023-01-01T01:01:01.001Z + storedAt: 2023-01-01T01:01:02.001Z + description: An ingested event with optional validation error. + InternalServerErrorProblemResponse: + type: object + allOf: + - $ref: '#/components/schemas/UnexpectedProblemResponse' + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + Invoice: type: object required: - - type + - id - createdAt - updatedAt - - id - - subjectKey - - featureKey - - featureId - - lastReset - - currentUsagePeriod - - measureUsageFrom - - usagePeriod + - type + - supplier + - customer + - currency + - totals + - status + - statusDetails properties: - type: + id: type: string - enum: - - metered - isSoftLimit: - type: boolean - description: If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true. - title: Soft limit - default: false - isUnlimited: - type: boolean - description: Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future. - deprecated: true - default: false - issueAfterReset: - type: number - format: double - minimum: 0 - description: |- - You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. - If an amount is specified here, a grant will be created alongside the entitlement with the specified amount. - That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here. - Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same. - title: Initial grant amount - issueAfterResetPriority: - type: integer - format: uint8 - minimum: 1 - maximum: 255 - description: Defines the grant priority for the default grant. - title: Issue grant after reset priority - default: 1 - preserveOverageAtReset: - type: boolean - description: If true, the overage is preserved at reset. If false, the usage is reset to 0. - title: Preserve overage at reset - default: false + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: A unique identifier for the resource. + title: ID + readOnly: true + description: + type: string + maxLength: 1024 + description: Optional description of the resource. Maximum 1024 characters. + title: Description + metadata: + type: object + allOf: + - $ref: '#/components/schemas/Metadata' + nullable: true + description: Additional metadata for the resource. + title: Metadata createdAt: type: string format: date-time @@ -10889,216 +10592,205 @@ components: description: Timestamp of when the resource was permanently deleted. title: Deletion Time readOnly: true - metadata: + type: allOf: - - $ref: '#/components/schemas/Metadata' - description: Additional metadata for the feature. - id: - type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: Readonly unique ULID identifier. - readOnly: true - subjectKey: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: The identifier key unique to the subject - example: customer-1 - featureKey: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: The feature the subject is entitled to use. - example: example-feature-key - featureId: - type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: The feature the subject is entitled to use. - lastReset: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: The time the last reset happened. + - $ref: '#/components/schemas/InvoiceType' + description: |- + Type of the invoice. + + The type of invoice determines the purpose of the invoice and how it should be handled. + + Supported types: + - standard: A regular commercial invoice document between a supplier and customer. + - credit_note: Reflects a refund either partial or complete of the preceding document. A credit note effectively *extends* the previous document. readOnly: true - currentUsagePeriod: + supplier: allOf: - - $ref: '#/components/schemas/Period' - description: The current usage period. + - $ref: '#/components/schemas/BillingParty' + description: The taxable entity supplying the goods or services. + customer: + allOf: + - $ref: '#/components/schemas/BillingParty' + description: Legal entity receiving the goods or services. + number: + allOf: + - $ref: '#/components/schemas/InvoiceNumber' + description: |- + Number specifies the human readable key used to reference this Invoice. + + The number only gets populated after the invoice had been issued. + + Please note that the number is (depending on the upstream settings) either unique for the + whole organization or unique for the customer, or in multi (stripe) account setups unique for the + account. readOnly: true - measureUsageFrom: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: The time from which usage is measured. If not specified on creation, defaults to entitlement creation time. + currency: + allOf: + - $ref: '#/components/schemas/CurrencyCode' + description: |- + Currency for all invoice line items. + + Multi currency invoices are not supported yet. + preceding: + type: array + items: + $ref: '#/components/schemas/InvoiceDocumentRef' + description: Key information regarding previous invoices and potentially details as to why they were corrected. readOnly: true - usagePeriod: + totals: allOf: - - $ref: '#/components/schemas/RecurringPeriod' - description: THe usage period of the entitlement. + - $ref: '#/components/schemas/InvoiceTotals' + description: Summary of all the invoice totals, including taxes (calculated). readOnly: true - description: |- - Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems. - Access is determined based on feature usage using a balance calculation (the "usage allowance" provided by the issued grants is "burnt down" by the usage). - EntitlementMeteredCalculatedFields: - type: object - required: - - lastReset - - currentUsagePeriod - - measureUsageFrom - - usagePeriod - properties: - lastReset: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: The time the last reset happened. + status: + allOf: + - $ref: '#/components/schemas/InvoiceStatus' + description: |- + The status of the invoice. + + This field only conatins a simplified status, for more detailed information use the statusDetails field. readOnly: true - currentUsagePeriod: + statusDetails: allOf: - - $ref: '#/components/schemas/Period' - description: The current usage period. + - $ref: '#/components/schemas/InvoiceStatusDetails' + description: The details of the current invoice status. readOnly: true - measureUsageFrom: + issuedAt: type: string format: date-time example: 2023-01-01T01:01:01.001Z - description: The time from which usage is measured. If not specified on creation, defaults to entitlement creation time. - readOnly: true - usagePeriod: - allOf: - - $ref: '#/components/schemas/RecurringPeriod' - description: THe usage period of the entitlement. - readOnly: true - description: Calculated fields for metered entitlements. - EntitlementMeteredCreateInputs: - type: object - required: - - type - - usagePeriod - properties: - featureKey: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- - The feature the subject is entitled to use. - Either featureKey or featureId is required. - example: example-feature-key - featureId: + The time the invoice was issued. + + Depending on the status of the invoice this can mean multiple things: + - draft, gathering: The time the invoice will be issued based on the workflow settings. + - issued: The time the invoice was issued. + readOnly: true + draftUntil: type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + format: date-time + example: 2023-01-01T01:01:01.001Z description: |- - The feature the subject is entitled to use. - Either featureKey or featureId is required. - metadata: - allOf: - - $ref: '#/components/schemas/Metadata' - description: Additional metadata for the feature. - type: + The time until the invoice is in draft status. + + On draft invoice creation it is calculated from the workflow settings. + + If manual approval is required, the draftUntil time is set. + dueAt: type: string - enum: - - metered - isSoftLimit: - type: boolean - description: If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true. - title: Soft limit - default: false - isUnlimited: - type: boolean - description: Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future. - deprecated: true - default: false - usagePeriod: + format: date-time + example: 2023-01-01T01:01:01.001Z + description: Due time of the fulfillment of the invoice (if available). + readOnly: true + period: allOf: - - $ref: '#/components/schemas/RecurringPeriodCreateInput' - description: The usage period associated with the entitlement. - measureUsageFrom: + - $ref: '#/components/schemas/Period' + description: The period the invoice covers. If the invoice has no line items, it's not set. + voidedAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: |- + The time the invoice was voided. + + If the invoice was voided, this field will be set to the time the invoice was voided. + readOnly: true + workflow: allOf: - - $ref: '#/components/schemas/MeasureUsageFrom' - description: Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time. - issueAfterReset: - type: number - format: double - minimum: 0 + - $ref: '#/components/schemas/InvoiceWorkflowSettings' description: |- - You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. - If an amount is specified here, a grant will be created alongside the entitlement with the specified amount. - That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here. - Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same. - title: Initial grant amount - issueAfterResetPriority: - type: integer - format: uint8 - minimum: 1 - maximum: 255 - description: Defines the grant priority for the default grant. - title: Issue grant after reset priority - default: 1 - preserveOverageAtReset: - type: boolean - description: If true, the overage is preserved at reset. If false, the usage is reset to 0. - title: Preserve overage at reset - default: false - description: Create inpurs for metered entitlement - EntitlementOrderBy: + The workflow associated with the invoice. + + It is always a snapshot of the workflow settings at the time of invoice creation. The + field is optional as it should be explicitly requested with expand options. + lines: + type: array + items: + $ref: '#/components/schemas/InvoiceLine' + description: List of invoice lines representing each of the items sold to the customer. + readOnly: true + discounts: + type: array + items: + $ref: '#/components/schemas/Discount' + description: Discounts or allowances applied to the complete invoice. + payment: + allOf: + - $ref: '#/components/schemas/InvoicePaymentTerms' + description: Information on when, how, and to whom the invoice should be paid. + validationIssues: + type: array + items: + $ref: '#/components/schemas/ValidationIssue' + description: Validation issues reported by the invoice workflow. + readOnly: true + description: Invoice represents an invoice in the system. + InvoiceAction: type: string enum: - - createdAt - - updatedAt - description: Order by options for entitlements. - EntitlementPaginatedResponse: + - advance + - approve + - delete + - retry + - void + description: InvoiceAction represents the actions that can be performed on an invoice. + InvoiceDocumentRef: type: object - required: - - totalCount - - page - - pageSize - - items - properties: - totalCount: - type: integer - example: 500 - description: The items in the current page. - page: - type: integer - example: 1 - description: The items in the current page. - pageSize: - type: integer - example: 100 - description: The items in the current page. - items: - type: array - items: - $ref: '#/components/schemas/Entitlement' - description: The items in the current page. - description: Paginated response - EntitlementStatic: + allOf: + - $ref: '#/components/schemas/CreditNoteOriginalInvoiceRef' + description: InvoiceDocumentRef is used to describe a reference to an existing document (invoice). + InvoiceDocumentRefType: + type: string + enum: + - credit_node_original_invoice + description: InvoiceDocumentRefType defines the type of document that is being referenced. + InvoiceExpand: + type: string + enum: + - '*' + - lines + - preceding + - workflow.apps + description: InvoiceExpand specifies the parts of the invoice to expand in the list output. + x-enum-varnames: + - all + - lines + - preceding + - workflowApps + InvoiceFlatFeeLine: type: object required: - - type - - config + - name - createdAt - updatedAt - id - - subjectKey - - featureKey - - featureId + - status + - currency + - totals + - period + - invoiceAt + - type + - perUnitAmount + - quantity properties: - type: + name: type: string - enum: - - static - config: + minLength: 1 + maxLength: 256 + description: Human-readable name for the resource. Between 1 and 256 characters. + title: Display name + description: type: string - format: json - example: '{ "integrations": ["github"] }' - description: The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object. + maxLength: 1024 + description: Optional description of the resource. Maximum 1024 characters. + title: Description + metadata: + type: object + allOf: + - $ref: '#/components/schemas/Metadata' + nullable: true + description: Additional metadata for the resource. + title: Metadata createdAt: type: string format: date-time @@ -11120,235 +10812,283 @@ components: description: Timestamp of when the resource was permanently deleted. title: Deletion Time readOnly: true - metadata: - allOf: - - $ref: '#/components/schemas/Metadata' - description: Additional metadata for the feature. id: type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: Readonly unique ULID identifier. + description: ULID (Universally Unique Lexicographically Sortable Identifier). + status: + allOf: + - $ref: '#/components/schemas/InvoiceLineStatus' + description: |- + Status of the line. + + External calls always create valid lines, other line types are managed by the + billing engine of OpenMeter. readOnly: true - subjectKey: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: The identifier key unique to the subject - example: customer-1 - featureKey: + discounts: + type: array + items: + $ref: '#/components/schemas/InvoiceLineDiscount' + description: |- + Discounts detailes applied to this line. + + New discounts can be added via the invoice's discounts API, to facilitate + discounts that are affecting multiple lines. + readOnly: true + charges: + type: array + items: + $ref: '#/components/schemas/BillingLineCharge' + description: |- + Charges applied to this line. (like minimum spend) + + New charges can be added via the invoice's charges API, to facilitate + charges that are affecting multiple lines. + readOnly: true + invoice: + allOf: + - $ref: '#/components/schemas/InvoiceReference' + description: The invoice this item belongs to. + currency: + allOf: + - $ref: '#/components/schemas/CurrencyCode' + description: The currency of this line. + taxes: + type: array + items: + $ref: '#/components/schemas/InvoiceLineTaxItem' + description: Taxes applied to the invoice totals. + readOnly: true + taxConfig: + allOf: + - $ref: '#/components/schemas/TaxConfig' + description: Tax config specify the tax configuration for this line. + children: + description: The lines detailing the item or service sold. + readOnly: true + type: array + items: + $ref: '#/components/schemas/InvoiceLine' + totals: + allOf: + - $ref: '#/components/schemas/InvoiceTotals' + description: Totals for this line. + readOnly: true + period: + allOf: + - $ref: '#/components/schemas/Period' + description: |- + Period of the line item applies to for revenue recognition pruposes. + + Billing always treats periods as start being inclusive and end being exclusive. + invoiceAt: type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: The feature the subject is entitled to use. - example: example-feature-key - featureId: + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time this line item should be invoiced. + type: type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: The feature the subject is entitled to use. - currentUsagePeriod: + enum: + - flat_fee + perUnitAmount: + allOf: + - $ref: '#/components/schemas/Numeric' + description: Price of the item being sold. + paymentTerm: allOf: - - $ref: '#/components/schemas/Period' - description: The current usage period. - usagePeriod: + - $ref: '#/components/schemas/PricePaymentTerm' + description: Payment term of the line. + default: in_advance + quantity: allOf: - - $ref: '#/components/schemas/RecurringPeriod' - description: The defined usage period of the entitlement - description: A static entitlement. - EntitlementStaticCreateInputs: + - $ref: '#/components/schemas/Numeric' + description: Quantity of the item being sold. + description: InvoiceFlatFeeLine represents a line item that is sold to the customer as a manually added fee. + InvoiceFlatFeeLineCreate: type: object required: + - name + - currency + - period + - invoiceAt - type - - config + - perUnitAmount + - quantity properties: - featureKey: + name: type: string minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: |- - The feature the subject is entitled to use. - Either featureKey or featureId is required. - example: example-feature-key - featureId: + maxLength: 256 + description: Human-readable name for the resource. Between 1 and 256 characters. + title: Display name + description: type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: |- - The feature the subject is entitled to use. - Either featureKey or featureId is required. + maxLength: 1024 + description: Optional description of the resource. Maximum 1024 characters. + title: Description metadata: + type: object allOf: - $ref: '#/components/schemas/Metadata' - description: Additional metadata for the feature. - usagePeriod: + nullable: true + description: Additional metadata for the resource. + title: Metadata + invoice: allOf: - - $ref: '#/components/schemas/RecurringPeriodCreateInput' - description: The usage period associated with the entitlement. + - $ref: '#/components/schemas/InvoiceReference' + description: The invoice this item belongs to. + currency: + allOf: + - $ref: '#/components/schemas/CurrencyCode' + description: The currency of this line. + taxConfig: + allOf: + - $ref: '#/components/schemas/TaxConfig' + description: Tax config specify the tax configuration for this line. + period: + allOf: + - $ref: '#/components/schemas/Period' + description: |- + Period of the line item applies to for revenue recognition pruposes. + + Billing always treats periods as start being inclusive and end being exclusive. + invoiceAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time this line item should be invoiced. type: type: string enum: - - static - config: - type: string - format: json - example: '{ "integrations": ["github"] }' - description: The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object. - description: Create inputs for static entitlement - EntitlementType: - type: string - enum: - - metered - - boolean - - static - description: Type of the entitlement. - x-go-type: string - EntitlementValue: - type: object - required: - - hasAccess - properties: - hasAccess: - type: boolean - example: true - description: Whether the subject has access to the feature. Shared accross all entitlement types. - readOnly: true - balance: - type: number - format: double - example: 100 - description: Only available for metered entitlements. Metered entitlements are built around a balance calculation where feature usage is deducted from the issued grants. Balance represents the remaining balance of the entitlement, it's value never turns negative. - readOnly: true - usage: - type: number - format: double - example: 50 - description: Only available for metered entitlements. Returns the total feature usage in the current period. - readOnly: true - overage: - type: number - format: double - example: 0 - description: Only available for metered entitlements. Overage represents the usage that wasn't covered by grants, e.g. if the subject had a total feature usage of 100 in the period but they were only granted 80, there would be 20 overage. - readOnly: true - config: - type: string - example: '{ key: "value" }' - description: Only available for static entitlements. The JSON parsable config of the entitlement. - readOnly: true - description: Entitlements are the core of OpenMeter access management. They define access to features for subjects. Entitlements can be metered, boolean, or static. - Event: + - flat_fee + perUnitAmount: + allOf: + - $ref: '#/components/schemas/Numeric' + description: Price of the item being sold. + paymentTerm: + allOf: + - $ref: '#/components/schemas/PricePaymentTerm' + description: Payment term of the line. + default: in_advance + quantity: + allOf: + - $ref: '#/components/schemas/Numeric' + description: Quantity of the item being sold. + description: Resource create operation model. + InvoiceFlatFeeLineReplaceUpdate: type: object required: - - id - - source - - specversion + - name + - period + - invoiceAt - type - - subject + - perUnitAmount + - quantity properties: - id: - type: string - example: 5c10fade-1c9e-4d6c-8275-c52c36731d3c - minLength: 1 - description: Identifies the event. - source: - type: string - example: service-name - minLength: 1 - format: uri-reference - description: Identifies the context in which an event happened. - specversion: - type: string - example: '1.0' - minLength: 1 - description: The version of the CloudEvents specification which the event uses. - default: '1.0' - type: - type: string - example: com.example.someevent - minLength: 1 - description: Contains a value describing the type of event related to the originating occurrence. - datacontenttype: - type: string - enum: - - application/json - nullable: true - example: application/json - description: Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP. - dataschema: - type: string - format: uri - nullable: true - minLength: 1 - description: Identifies the schema that data adheres to. - subject: + name: type: string - example: customer-id minLength: 1 - description: Describes the subject of the event in the context of the event producer (identified by source). - time: + maxLength: 256 + description: Human-readable name for the resource. Between 1 and 256 characters. + title: Display name + description: type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: Timestamp of when the occurrence happened. Must adhere to RFC 3339. - nullable: true - data: + maxLength: 1024 + description: Optional description of the resource. Maximum 1024 characters. + title: Description + metadata: type: object - additionalProperties: {} + allOf: + - $ref: '#/components/schemas/Metadata' nullable: true + description: Additional metadata for the resource. + title: Metadata + taxConfig: + allOf: + - $ref: '#/components/schemas/TaxConfig' + description: Tax config specify the tax configuration for this line. + period: + allOf: + - $ref: '#/components/schemas/Period' description: |- - The event payload. - Optional, if present it must be a JSON object. - example: - id: 5c10fade-1c9e-4d6c-8275-c52c36731d3c - source: service-name - specversion: '1.0' - type: prompt - subject: customer-id - time: 2023-01-01T01:01:01.001Z - description: |- - CloudEvents Specification JSON Schema + Period of the line item applies to for revenue recognition pruposes. - Optional properties are nullable according to the CloudEvents specification: - OPTIONAL not omitted attributes MAY be represented as a null JSON value. - x-go-type-import: - path: github.com/cloudevents/sdk-go/v2/event - x-go-type: event.Event - ExpirationDuration: - type: string - enum: - - HOUR - - DAY - - WEEK - - MONTH - - YEAR - description: The expiration duration enum - ExpirationPeriod: - type: object - required: - - duration - - count - properties: - duration: + Billing always treats periods as start being inclusive and end being exclusive. + invoiceAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time this line item should be invoiced. + type: + type: string + enum: + - flat_fee + perUnitAmount: allOf: - - $ref: '#/components/schemas/ExpirationDuration' - description: The unit of time for the expiration period. - count: - type: integer - example: 12 - description: The number of time units in the expiration period. - description: The grant expiration definition - Feature: + - $ref: '#/components/schemas/Numeric' + description: Price of the item being sold. + paymentTerm: + allOf: + - $ref: '#/components/schemas/PricePaymentTerm' + description: Payment term of the line. + default: in_advance + quantity: + allOf: + - $ref: '#/components/schemas/Numeric' + description: Quantity of the item being sold. + description: Resource update operation model. + InvoiceGenericDocumentRef: + type: object + required: + - type + properties: + type: + allOf: + - $ref: '#/components/schemas/InvoiceDocumentRefType' + description: Type of the document referenced. + readOnly: true + reason: + type: string + description: Human readable description on why this reference is here or needs to be used. + readOnly: true + description: + type: string + description: Additional details about the document. + readOnly: true + description: |- + Omitted fields: + period: Tax period in which the referred document had an effect required by some tax regimes and formats. + stamps: Seals of approval from other organisations that may need to be listed. + ext: Extensions for additional codes that may be required. + title: InvoiceGenericDocumentRef is used to describe an existing document or a specific part of it's contents. + InvoiceLine: + anyOf: + - $ref: '#/components/schemas/InvoiceUsageBasedLine' + - $ref: '#/components/schemas/InvoiceFlatFeeLine' + discriminator: + propertyName: type + mapping: + usage_based: '#/components/schemas/InvoiceUsageBasedLine' + flat_fee: '#/components/schemas/InvoiceFlatFeeLine' + description: BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price. + InvoiceLineCreate: + anyOf: + - $ref: '#/components/schemas/InvoiceUsageBasedLineCreate' + - $ref: '#/components/schemas/InvoiceFlatFeeLineCreate' + discriminator: + propertyName: type + mapping: + usage_based: '#/components/schemas/InvoiceUsageBasedLineCreate' + flat_fee: '#/components/schemas/InvoiceFlatFeeLineCreate' + description: InvoiceLineCreate represents the create model for an invoice line. + InvoiceLineDiscount: type: object required: - createdAt - updatedAt - - key - - name - id + - amount properties: createdAt: type: string @@ -11371,281 +11111,103 @@ components: description: Timestamp of when the resource was permanently deleted. title: Deletion Time readOnly: true - archivedAt: - type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: Timestamp of when the resource was archived. - title: Archival Time - readOnly: true - key: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: A key is a unique string that is used to identify a resource. - title: The unique key of the feature - name: - type: string - title: The human-readable name of the feature - metadata: - allOf: - - $ref: '#/components/schemas/Metadata' - example: - key: value - title: Optional metadata - meterSlug: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: A key is a unique string that is used to identify a resource. - example: tokens_total - title: Meter slug - meterGroupByFilters: - type: object - additionalProperties: - type: string - example: - model: gpt-4 - type: input - description: |- - Optional meter group by filters. - Useful if the meter scope is broader than what feature tracks. - Example scenario would be a meter tracking all token use with groupBy fields for the model, - then the feature could filter for model=gpt-4. - title: Meter group by filters id: type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV + example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: Readonly unique ULID identifier. + description: ID of the charge or discount. readOnly: true - description: |- - Represents a feature that can be enabled or disabled for a plan. - Used both for product catalog and entitlements. - FeatureCreateInputs: - type: object - required: - - key - - name - properties: - key: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: A key is a unique string that is used to identify a resource. - title: The unique key of the feature - name: - type: string - title: The human-readable name of the feature - metadata: + percent: allOf: - - $ref: '#/components/schemas/Metadata' - example: - key: value - title: Optional metadata - meterSlug: - type: string - minLength: 1 - maxLength: 64 - pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - description: A key is a unique string that is used to identify a resource. - example: tokens_total - title: Meter slug - meterGroupByFilters: - type: object - additionalProperties: - type: string - example: - model: gpt-4 - type: input - description: |- - Optional meter group by filters. - Useful if the meter scope is broader than what feature tracks. - Example scenario would be a meter tracking all token use with groupBy fields for the model, - then the feature could filter for model=gpt-4. - title: Meter group by filters - description: |- - Represents a feature that can be enabled or disabled for a plan. - Used both for product catalog and entitlements. - FeatureMeta: - type: object - required: - - id - - key - properties: - id: - type: string - example: 01ARZ3NDEKTSV4RRFFQ69G5FAV - pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: Unique identifier of a feature. - title: Feature Unique Identifier - key: - type: string - example: gpt4_tokens - description: |- - The key is an immutable unique identifier of the feature used throughout the API, - for example when interacting with a subject's entitlements. - title: Feature Key - description: Limited representation of a feature resource which includes only its unique identifiers (id, key). - FeatureOrderBy: - type: string - enum: - - id - - createdAt - - updatedAt - description: Order by options for features. - FeaturePaginatedResponse: - type: object - required: - - totalCount - - page - - pageSize - - items - properties: - totalCount: - type: integer - example: 500 - description: The items in the current page. - page: - type: integer - example: 1 - description: The items in the current page. - pageSize: - type: integer - example: 100 - description: The items in the current page. - items: - type: array - items: - $ref: '#/components/schemas/Feature' - description: The items in the current page. - description: Paginated response - FlatPrice: - type: object - required: - - type - - amount - properties: - type: - type: string - enum: - - flat + - $ref: '#/components/schemas/Percentage' + description: Percentage if fixed amount not applied amount: allOf: - $ref: '#/components/schemas/Numeric' - description: The amount of the flat price. - description: Flat price. - FlatPriceWithPaymentTerm: - type: object - required: - - type - - amount - properties: - type: + description: Fixed discount amount to apply (calculated if percent present). + code: type: string - enum: - - flat - amount: - allOf: - - $ref: '#/components/schemas/Numeric' - description: The amount of the flat price. - paymentTerm: - allOf: - - $ref: '#/components/schemas/PricePaymentTerm' - description: |- - The payment term of the flat price. - Defaults to in advance. - default: in_advance - description: Flat price with payment term. - ForbiddenProblemResponse: - type: object - allOf: - - $ref: '#/components/schemas/UnexpectedProblemResponse' - description: The server understood the request but refuses to authorize it. - GatewayTimeoutProblemResponse: - type: object - allOf: - - $ref: '#/components/schemas/UnexpectedProblemResponse' - description: The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. - GrantBurnDownHistorySegment: - type: object - required: - - period - - usage - - overage - - balanceAtStart - - grantBalancesAtStart - - balanceAtEnd - - grantBalancesAtEnd - - grantUsages + description: Reason code. + description: + type: string + description: Text description as to why the discount was applied. + description: InvoiceLineDiscount represents an amount deducted from the line, and will be applied before taxes. + InvoiceLineReplaceUpdate: + anyOf: + - $ref: '#/components/schemas/InvoiceUsageBasedLineReplaceUpdate' + - $ref: '#/components/schemas/InvoiceFlatFeeLineReplaceUpdate' + discriminator: + propertyName: type + mapping: + usage_based: '#/components/schemas/InvoiceUsageBasedLineReplaceUpdate' + flat_fee: '#/components/schemas/InvoiceFlatFeeLineReplaceUpdate' + description: InvoiceLineReplaceUpdate represents the update model for an invoice line. + InvoiceLineStatus: + type: string + enum: + - valid + - detail + - split + description: Line status specifies the status of the line. + InvoiceLineTaxBehavior: + type: string + enum: + - inclusive + - exclusive + description: |- + InvoiceLineTaxBehavior details how the tax item is applied to the base amount. + + Inclusive means the tax is included in the base amount. + Exclusive means the tax is added to the base amount. + InvoiceLineTaxItem: + type: object properties: - period: + config: allOf: - - $ref: '#/components/schemas/Period' - description: The period of the segment. - usage: - type: number - format: double - example: 100 - description: The total usage of the grant in the period. - readOnly: true - overage: - type: number - format: double - example: 100 - description: Overuse that wasn't covered by grants. - readOnly: true - balanceAtStart: - type: number - format: double - example: 100 - description: entitlement balance at the start of the period. - readOnly: true - grantBalancesAtStart: - type: object - additionalProperties: - type: number - format: double - example: - 01G65Z755AFWAKHE12NY0CQ9FH: 100 - description: 'The balance breakdown of each active grant at the start of the period: GrantID: Balance' + - $ref: '#/components/schemas/TaxConfig' + description: Tax provider configuration. readOnly: true - balanceAtEnd: - type: number - format: double - example: 100 - description: The entitlement balance at the end of the period. + percent: + allOf: + - $ref: '#/components/schemas/Percentage' + description: |- + Percent defines the percentage set manually or determined from + the rate key (calculated if rate present). A nil percent implies that + this tax combo is **exempt** from tax.") readOnly: true - grantBalancesAtEnd: - type: object - additionalProperties: - type: number - format: double - example: - 01G65Z755AFWAKHE12NY0CQ9FH: 100 - description: 'The balance breakdown of each active grant at the end of the period: GrantID: Balance' + surcharge: + allOf: + - $ref: '#/components/schemas/Numeric' + description: Some countries require an additional surcharge (calculated if rate present). readOnly: true - grantUsages: - type: array - items: - $ref: '#/components/schemas/GrantUsageRecord' - description: Which grants were actually burnt down in the period and by what amount. + behavior: + allOf: + - $ref: '#/components/schemas/InvoiceLineTaxBehavior' + description: Is the tax item inclusive or exclusive of the base amount. readOnly: true + description: TaxConfig stores the configuration for a tax line relative to an invoice line. + InvoiceNumber: + type: string + example: INV-2024-01-01-01 + minLength: 1 + maxLength: 256 description: |- - A segment of the grant burn down history. + InvoiceNumber is a unique identifier for the invoice, generated by the + invoicing app. - A given segment represents the usage of a grant between events that changed either the grant burn down priority order or the usag period. - GrantOrderBy: + The uniqueness depends on a lot of factors: + - app setting (unique per app or unique per customer) + - multiple app scenarios (multiple apps generating invoices with the same prefix) + InvoiceOrderBy: type: string enum: - - id + - customer.name + - issuedAt + - status - createdAt - updatedAt - description: Order by options for grants. - GrantPaginatedResponse: + description: InvoiceOrderBy specifies the ordering options for invoice listing. + InvoicePaginatedResponse: type: object required: - totalCount @@ -11668,108 +11230,464 @@ components: items: type: array items: - $ref: '#/components/schemas/EntitlementGrant' + $ref: '#/components/schemas/Invoice' description: The items in the current page. description: Paginated response - GrantUsageRecord: + InvoicePaymentTerms: + type: object + properties: + terms: + allOf: + - $ref: '#/components/schemas/PaymentTerms' + description: The terms of payment for the invoice. + description: Payment contains details as to how the invoice should be paid. + InvoicePendingLinesActionInput: + type: object + properties: + includePendingLines: + type: array + items: + type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: ULID (Universally Unique Lexicographically Sortable Identifier). + description: |- + The pending line items to include in the invoice, if not provided: + - all line items that have invoice_at < asOf will be included + - all usage based line items will be included up to asOf, new usage-based line items will be staged for the rest + of the billing cycle + asOf: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: |- + The time as of which the invoice is created. + + If not provided, the current time is used. + description: |- + BillingInvoiceActionInput is the input for creating an invoice. + + Invoice creation is always based on already pending line items created by the billingCreateLineByCustomer + operation. Empty invoices are not allowed. + InvoiceReference: type: object required: - - grantId - - usage + - id properties: - grantId: + id: + type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: The ID of the invoice. + readOnly: true + number: + allOf: + - $ref: '#/components/schemas/InvoiceNumber' + description: The number of the invoice. + readOnly: true + description: Reference to an invoice. + InvoiceStatus: + type: string + enum: + - gathering + - draft + - issuing + - issued + description: InvoiceStatus describes the status of an invoice. + InvoiceStatusDetails: + type: object + required: + - immutable + - failed + - extendedStatus + - availableActions + properties: + immutable: + type: boolean + description: Is the invoice editable? + readOnly: true + failed: + type: boolean + description: Is the invoice in a failed state? + readOnly: true + extendedStatus: + type: string + description: Extended status information for the invoice. + readOnly: true + availableActions: + type: array + items: + $ref: '#/components/schemas/InvoiceAction' + description: The actions that can be performed on the invoice. + description: |- + InvoiceStatusDetails represents the details of the invoice status. + + API users are encouraged to rely on the immutable/failed/avaliableActions fields to determine + the next steps of the invoice instead of the extendedStatus field. + InvoiceTotals: + type: object + required: + - amount + - chargesTotal + - discountsTotal + - taxesInclusiveTotal + - taxesExclusiveTotal + - taxesTotal + - total + properties: + amount: + allOf: + - $ref: '#/components/schemas/Numeric' + description: The total value of the line before taxes, discounts and commitments. + readOnly: true + chargesTotal: + allOf: + - $ref: '#/components/schemas/Numeric' + description: The amount of value of the line that are due to additional charges. + readOnly: true + discountsTotal: + allOf: + - $ref: '#/components/schemas/Numeric' + description: The amount of value of the line that are due to discounts. + readOnly: true + taxesInclusiveTotal: + allOf: + - $ref: '#/components/schemas/Numeric' + description: The total amount of taxes that are included in the line. + readOnly: true + taxesExclusiveTotal: + allOf: + - $ref: '#/components/schemas/Numeric' + description: The total amount of taxes that are added on top of amount from the line. + readOnly: true + taxesTotal: + allOf: + - $ref: '#/components/schemas/Numeric' + description: The total amount of taxes for this line. + readOnly: true + total: + allOf: + - $ref: '#/components/schemas/Numeric' + description: The total amount value of the line after taxes, discounts and commitments. + readOnly: true + description: Totals contains the summaries of all calculations for the invoice. + InvoiceType: + type: string + enum: + - standard + - credit_note + description: |- + InvoiceType represents the type of invoice. + + The type of invoice determines the purpose of the invoice and how it should be handled. + InvoiceUsageBasedLine: + type: object + required: + - name + - createdAt + - updatedAt + - id + - status + - currency + - totals + - period + - invoiceAt + - type + - price + - featureKey + properties: + name: + type: string + minLength: 1 + maxLength: 256 + description: Human-readable name for the resource. Between 1 and 256 characters. + title: Display name + description: + type: string + maxLength: 1024 + description: Optional description of the resource. Maximum 1024 characters. + title: Description + metadata: + type: object + allOf: + - $ref: '#/components/schemas/Metadata' + nullable: true + description: Additional metadata for the resource. + title: Metadata + createdAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was created. + title: Creation Time + readOnly: true + updatedAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was last updated. + title: Last Update Time + readOnly: true + deletedAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was permanently deleted. + title: Deletion Time + readOnly: true + id: type: string example: 01G65Z755AFWAKHE12NY0CQ9FH pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - description: The id of the grant - usage: - type: number - format: double - example: 100 - description: The usage in the period - description: Usage Record - IngestEventsBody: - anyOf: - - $ref: '#/components/schemas/Event' - - type: array + description: ULID (Universally Unique Lexicographically Sortable Identifier). + status: + allOf: + - $ref: '#/components/schemas/InvoiceLineStatus' + description: |- + Status of the line. + + External calls always create valid lines, other line types are managed by the + billing engine of OpenMeter. + readOnly: true + discounts: + type: array items: - $ref: '#/components/schemas/Event' - description: |- - The body of the events request. - Either a single event or a batch of events. - IngestedEvent: + $ref: '#/components/schemas/InvoiceLineDiscount' + description: |- + Discounts detailes applied to this line. + + New discounts can be added via the invoice's discounts API, to facilitate + discounts that are affecting multiple lines. + readOnly: true + charges: + type: array + items: + $ref: '#/components/schemas/BillingLineCharge' + description: |- + Charges applied to this line. (like minimum spend) + + New charges can be added via the invoice's charges API, to facilitate + charges that are affecting multiple lines. + readOnly: true + invoice: + allOf: + - $ref: '#/components/schemas/InvoiceReference' + description: The invoice this item belongs to. + currency: + allOf: + - $ref: '#/components/schemas/CurrencyCode' + description: The currency of this line. + taxes: + type: array + items: + $ref: '#/components/schemas/InvoiceLineTaxItem' + description: Taxes applied to the invoice totals. + readOnly: true + taxConfig: + allOf: + - $ref: '#/components/schemas/TaxConfig' + description: Tax config specify the tax configuration for this line. + children: + description: The lines detailing the item or service sold. + readOnly: true + type: array + items: + $ref: '#/components/schemas/InvoiceLine' + totals: + allOf: + - $ref: '#/components/schemas/InvoiceTotals' + description: Totals for this line. + readOnly: true + period: + allOf: + - $ref: '#/components/schemas/Period' + description: |- + Period of the line item applies to for revenue recognition pruposes. + + Billing always treats periods as start being inclusive and end being exclusive. + invoiceAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time this line item should be invoiced. + type: + type: string + enum: + - usage_based + price: + $ref: '#/components/schemas/RateCardUsageBasedPrice' + featureKey: + type: string + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: The feature that the usage is based on. + quantity: + allOf: + - $ref: '#/components/schemas/Numeric' + description: The quantity of the item being sold. + readOnly: true + preLinePeriodQuantity: + allOf: + - $ref: '#/components/schemas/Numeric' + description: |- + The quantity of the item used in before this line's period. + + It is non-zero in case of progressive billing, when this shows how much of the usage was already billed. + readOnly: true + description: InvoiceUsageBasedLine represents a line item that is sold to the customer based on usage. + InvoiceUsageBasedLineCreate: type: object required: - - event - - ingestedAt - - storedAt + - name + - currency + - period + - invoiceAt + - type + - price + - featureKey properties: - event: - $ref: '#/components/schemas/Event' - validationError: + name: type: string - description: The validation error if the event failed validation. - ingestedAt: + minLength: 1 + maxLength: 256 + description: Human-readable name for the resource. Between 1 and 256 characters. + title: Display name + description: type: string - format: date-time - example: 2023-01-01T01:01:01.001Z - description: The date and time the event was ingested. - storedAt: + maxLength: 1024 + description: Optional description of the resource. Maximum 1024 characters. + title: Description + metadata: + type: object + allOf: + - $ref: '#/components/schemas/Metadata' + nullable: true + description: Additional metadata for the resource. + title: Metadata + invoice: + allOf: + - $ref: '#/components/schemas/InvoiceReference' + description: The invoice this item belongs to. + currency: + allOf: + - $ref: '#/components/schemas/CurrencyCode' + description: The currency of this line. + taxConfig: + allOf: + - $ref: '#/components/schemas/TaxConfig' + description: Tax config specify the tax configuration for this line. + period: + allOf: + - $ref: '#/components/schemas/Period' + description: |- + Period of the line item applies to for revenue recognition pruposes. + + Billing always treats periods as start being inclusive and end being exclusive. + invoiceAt: type: string format: date-time example: 2023-01-01T01:01:01.001Z - description: The date and time the event was stored. - example: - event: - id: 5c10fade-1c9e-4d6c-8275-c52c36731d3c - source: service-name - specversion: '1.0' - type: prompt - subject: customer-id - time: 2023-01-01T01:01:01.001Z - ingestedAt: 2023-01-01T01:01:01.001Z - storedAt: 2023-01-01T01:01:02.001Z - description: An ingested event with optional validation error. - InternalServerErrorProblemResponse: - type: object - allOf: - - $ref: '#/components/schemas/UnexpectedProblemResponse' - description: The server encountered an unexpected condition that prevented it from fulfilling the request. - InvoicePaginatedResponse: + description: The time this line item should be invoiced. + type: + type: string + enum: + - usage_based + price: + $ref: '#/components/schemas/RateCardUsageBasedPrice' + featureKey: + type: string + minLength: 1 + maxLength: 64 + pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ + description: The feature that the usage is based on. + description: Resource create operation model. + InvoiceUsageBasedLineReplaceUpdate: type: object required: - - totalCount - - page - - pageSize - - items + - name + - period + - invoiceAt + - type + - price properties: - totalCount: - type: integer - example: 500 - description: The items in the current page. - page: - type: integer - example: 1 - description: The items in the current page. - pageSize: - type: integer - example: 100 - description: The items in the current page. - items: - type: array - items: - $ref: '#/components/schemas/BillingInvoice' - description: The items in the current page. - description: Paginated response - LinesUpdate: + name: + type: string + minLength: 1 + maxLength: 256 + description: Human-readable name for the resource. Between 1 and 256 characters. + title: Display name + description: + type: string + maxLength: 1024 + description: Optional description of the resource. Maximum 1024 characters. + title: Description + metadata: + type: object + allOf: + - $ref: '#/components/schemas/Metadata' + nullable: true + description: Additional metadata for the resource. + title: Metadata + taxConfig: + allOf: + - $ref: '#/components/schemas/TaxConfig' + description: Tax config specify the tax configuration for this line. + period: + allOf: + - $ref: '#/components/schemas/Period' + description: |- + Period of the line item applies to for revenue recognition pruposes. + + Billing always treats periods as start being inclusive and end being exclusive. + invoiceAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: The time this line item should be invoiced. + type: + type: string + enum: + - usage_based + price: + $ref: '#/components/schemas/RateCardUsageBasedPrice' + description: Resource update operation model. + InvoiceWorkflowSettings: type: object + required: + - sourceBillingProfileID + - workflow + - timezone properties: - lines: - type: array - items: - $ref: '#/components/schemas/BillingInvoiceLineCreateItem' - title: The line to create - description: Resource create or update operation model. + apps: + allOf: + - $ref: '#/components/schemas/BillingProfileAppsOrReference' + description: The apps that will be used to orchestrate the invoice's workflow. + readOnly: true + sourceBillingProfileID: + type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: |- + sourceBillingProfileID is the billing profile on which the workflow was based on. + + The profile is snapshotted on invoice creation, after which it can be altered independently + of the profile itself. + readOnly: true + workflow: + allOf: + - $ref: '#/components/schemas/BillingWorkflowSettings' + description: The workflow details used by this invoice. + readOnly: true + timezone: + type: string + description: Timezone of the invoice's date fields. + readOnly: true + description: |- + InvoiceWorkflowSettings represents the workflow settings used by the invoice. + + This is a clone of the billing profile's workflow settings at the time of invoice creation + with customer overrides considered. ListAppsRequest: type: object properties: @@ -12723,6 +12641,89 @@ components: - server_error - temporarily_unavailable description: OAuth2 authorization code grant error types. + PaymentDueDate: + type: object + required: + - dueAt + - amount + properties: + dueAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: When the payment is due. + readOnly: true + notes: + type: string + description: Other details to take into account for the due date. + readOnly: true + amount: + allOf: + - $ref: '#/components/schemas/Numeric' + description: How much needs to be paid by the date. + readOnly: true + percent: + allOf: + - $ref: '#/components/schemas/Percentage' + description: Percentage of the total that should be paid by the date. + readOnly: true + currency: + allOf: + - $ref: '#/components/schemas/CurrencyCode' + description: If different from the parent document's base currency. + readOnly: true + description: PaymentDueDate contains an amount that should be paid by the given date. + PaymentTermDueDate: + type: object + required: + - type + - dueAt + properties: + type: + type: string + enum: + - due_date + description: Type of terms to be applied. + detail: + type: string + description: Text detail of the chosen payment terms. + readOnly: true + notes: + type: string + description: Description of the conditions for payment. + readOnly: true + dueAt: + type: array + items: + $ref: '#/components/schemas/PaymentDueDate' + minItems: 1 + description: When the payment is due. + readOnly: true + description: PaymentTermDueDate defines the terms for payment on a specific date. + PaymentTermInstant: + type: object + required: + - type + properties: + type: + type: string + enum: + - instant + description: Type of terms to be applied. + detail: + type: string + description: Text detail of the chosen payment terms. + readOnly: true + notes: + type: string + description: Description of the conditions for payment. + readOnly: true + description: PaymentTermInstant defines the terms for payment on receipt of invoice. + PaymentTerms: + anyOf: + - $ref: '#/components/schemas/PaymentTermInstant' + - $ref: '#/components/schemas/PaymentTermDueDate' + description: PaymentTerms defines the terms for payment. Percentage: type: string pattern: ^\-?[0-9]+(\.[0-9]+)?%$ @@ -13439,32 +13440,6 @@ components: - unit - tiered description: The type of the price. - ProfilePaginatedResponse: - type: object - required: - - totalCount - - page - - pageSize - - items - properties: - totalCount: - type: integer - example: 500 - description: The items in the current page. - page: - type: integer - example: 1 - description: The items in the current page. - pageSize: - type: integer - example: 100 - description: The items in the current page. - items: - type: array - items: - $ref: '#/components/schemas/BillingProfile' - description: The items in the current page. - description: Paginated response RateCard: oneOf: - $ref: '#/components/schemas/RateCardFlatFee' @@ -15187,6 +15162,219 @@ components: description: The customer is limited to spend at most the amount. title: Maximum amount description: Unit price with spend commitments. + ValidationIssue: + type: object + required: + - createdAt + - updatedAt + - id + - severity + - component + - message + properties: + createdAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was created. + title: Creation Time + readOnly: true + updatedAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was last updated. + title: Last Update Time + readOnly: true + deletedAt: + type: string + format: date-time + example: 2024-01-01T01:01:01.001Z + description: Timestamp of when the resource was permanently deleted. + title: Deletion Time + readOnly: true + id: + type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: ID of the charge or discount. + readOnly: true + severity: + allOf: + - $ref: '#/components/schemas/ValidationIssueSeverity' + description: The severity of the issue. + readOnly: true + field: + type: string + description: The field that the issue is related to, if available in JSON path format. + readOnly: true + code: + type: string + description: Machine indentifiable code for the issue, if available. + readOnly: true + component: + type: string + description: Component reporting the issue. + readOnly: true + message: + type: string + description: A human-readable description of the issue. + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/Metadata' + description: Additional context for the issue. + readOnly: true + description: |- + ValidationIssue captures any validation issues related to the invoice. + + Issues with severity "critical" will prevent the invoice from being issued. + ValidationIssueSeverity: + type: string + enum: + - critical + - warning + description: |- + ValidationIssueSeverity describes the severity of a validation issue. + + Issues with severity "critical" will prevent the invoice from being issued. + VoidInvoiceActionCreate: + type: object + required: + - percentage + - action + properties: + percentage: + allOf: + - $ref: '#/components/schemas/Percentage' + description: How much of the total line items to be voided? (e.g. 100% means all charges are voided) + action: + $ref: '#/components/schemas/VoidInvoiceLineActionCreate' + description: InvoiceVoidAction describes how to handle the voided line items. + VoidInvoiceActionCreateItem: + type: object + required: + - percentage + - action + properties: + percentage: + allOf: + - $ref: '#/components/schemas/Percentage' + description: How much of the total line items to be voided? (e.g. 100% means all charges are voided) + action: + $ref: '#/components/schemas/VoidInvoiceLineActionCreateItem' + description: InvoiceVoidAction describes how to handle the voided line items. + VoidInvoiceActionInput: + type: object + required: + - action + - reason + properties: + action: + allOf: + - $ref: '#/components/schemas/VoidInvoiceActionCreate' + description: The action to take on the voided line items. + reason: + type: string + description: The reason for voiding the invoice. + overrides: + type: array + items: + $ref: '#/components/schemas/VoidInvoiceActionLineOverride' + nullable: true + description: |- + Per line item overrides for the action. + + If not specified, the `action` will be applied to all line items. + description: Request to void an invoice + VoidInvoiceActionLineOverride: + type: object + required: + - lineId + - action + properties: + lineId: + type: string + example: 01G65Z755AFWAKHE12NY0CQ9FH + pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ + description: The line item ID to override. + action: + allOf: + - $ref: '#/components/schemas/VoidInvoiceActionCreateItem' + description: The action to take on the line item. + description: VoidInvoiceLineOverride describes how to handle a specific line item in the invoice when voiding. + VoidInvoiceLineActionCreate: + anyOf: + - $ref: '#/components/schemas/VoidInvoiceLineDiscardAction' + - $ref: '#/components/schemas/VoidInvoiceLinePendingActionCreate' + discriminator: + propertyName: type + mapping: + discard: '#/components/schemas/VoidInvoiceLineDiscardAction' + pending: '#/components/schemas/VoidInvoiceLinePendingActionCreate' + description: VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding. + VoidInvoiceLineActionCreateItem: + anyOf: + - $ref: '#/components/schemas/VoidInvoiceLineDiscardAction' + - $ref: '#/components/schemas/VoidInvoiceLinePendingActionCreateItem' + discriminator: + propertyName: type + mapping: + discard: '#/components/schemas/VoidInvoiceLineDiscardAction' + pending: '#/components/schemas/VoidInvoiceLinePendingActionCreateItem' + description: VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding. + VoidInvoiceLineActionType: + type: string + enum: + - discard + - pending + description: VoidInvoiceLineActionType describes how to handle the voidied line item in the invoice. + VoidInvoiceLineDiscardAction: + type: object + required: + - type + properties: + type: + type: string + enum: + - discard + description: VoidInvoiceLineDiscardAction describes how to handle the voidied line item in the invoice. + VoidInvoiceLinePendingActionCreate: + type: object + required: + - type + properties: + type: + type: string + enum: + - pending + nextInvoiceAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: |- + The time at which the line item should be invoiced again. + + If not provided, the line item will be re-invoiced now. + description: VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice. + VoidInvoiceLinePendingActionCreateItem: + type: object + required: + - type + properties: + type: + type: string + enum: + - pending + nextInvoiceAt: + type: string + format: date-time + example: 2023-01-01T01:01:01.001Z + description: |- + The time at which the line item should be invoiced again. + + If not provided, the line item will be re-invoiced now. + description: VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice. WindowSize: type: string enum: diff --git a/api/spec/src/billing/customeroverride.tsp b/api/spec/src/billing/customeroverride.tsp index bdfeb850e..f4d3896cc 100644 --- a/api/spec/src/billing/customeroverride.tsp +++ b/api/spec/src/billing/customeroverride.tsp @@ -11,67 +11,68 @@ interface CustomerOverrides { */ @get @summary("List customer overrides") - @operationId("billingListCustomerOverrides") + @operationId("listBillingProfileCustomerOverrides") @extension("x-internal", true) list( @query - billingProfile?: Array, + billingProfile?: ULID[], ...OpenMeter.QueryPagination, ...OpenMeter.QueryLimitOffset, - ...OpenMeter.QueryOrdering, - ): OpenMeter.PaginatedResponse | OpenMeter.CommonErrors; + ...OpenMeter.QueryOrdering, + ): OpenMeter.PaginatedResponse | OpenMeter.CommonErrors; /** - * Create/update a new customer override. + * Create a new or update an existing customer override. */ @post @route("/{customerId}") - @summary("Create/update a customer override") - @operationId("billingUpsertCustomerOverride") + @operationId("upsertBillingProfileCustomerOverride") + @summary("Create a new or update a customer override") @extension("x-internal", true) upsert( @path customerId: ULID, @body - request: CustomerWorkflowOverride, + request: BillingProfileCustomerOverrideCreate, ): | { - // Updated - @statusCode _: 200; + // Created + @statusCode _: 201; - @body body: CustomerOverride; + @body body: BillingProfileCustomerOverride; } | { - // Created - @statusCode _: 201; + // Updated + @statusCode _: 200; - @body body: CustomerOverride; + @body body: BillingProfileCustomerOverride; } + | BillingProfileCustomerOverride | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** - * Get a customer override by id. + * Get a customer override by customer id. */ @get @route("/{customerId}") @summary("Get a customer override") - @operationId("billingGetCustomerOverrideById") + @operationId("getBillingProfileCustomerOverride") @extension("x-internal", true) get( @path customerId: ULID, - ): CustomerOverride | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + ): BillingProfileCustomerOverride | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** - * Delete a customer override by id. + * Delete a customer override by customer id. */ @delete @route("/{customerId}") @summary("Delete a customer override") - @operationId("billingDeleteCustomerOverride") + @operationId("deleteBillingProfileCustomerOverride") @extension("x-internal", true) delete( @path @@ -84,18 +85,33 @@ interface CustomerOverrides { /** * Order by options for customers. */ -@friendlyName("BillingCustomerOverrideOrderBy") -enum CustomerOverrideOrderBy { +@friendlyName("BillingProfileCustomerOverrideOrderBy") +enum BillingProfileCustomerOverrideOrderBy { id: "id", } /** * Customer specific workflow overrides. */ -@friendlyName("BillingCustomerOverride") -model CustomerOverride { +@friendlyName("BillingProfileCustomerOverride") +model BillingProfileCustomerOverride { ...ResourceTimestamps; - workflow: CustomerWorkflowOverride; + workflow?: BillingProfileCustomerWorkflowOverride; + + /** + * The billing profile this override is associated with. + * + * If not provided, the default billing profile is chosen if available. + */ + billingProfile?: ULID; +} + +/** + * Payload for creating a new or updating an existing customer override. + */ +@friendlyName("BillingProfileCustomerOverrideCreate") +model BillingProfileCustomerOverrideCreate { + workflow?: Rest.Resource.ResourceCreateModel; /** * The billing profile this override is associated with. @@ -108,9 +124,9 @@ model CustomerOverride { /** * Customer specific workflow overrides. */ -@friendlyName("BillingCustomerWorkflowOverride") -model CustomerWorkflowOverride { - ...OmitProperties; +@friendlyName("BillingProfileCustomerWorkflowOverride") +model BillingProfileCustomerWorkflowOverride { + ...BillingWorkflow; // Note: these are only available for read, as provider override is not supported via the customer override. // to do that the customer should be assocatied with a new billing profile instead. diff --git a/api/spec/src/billing/invoices.tsp b/api/spec/src/billing/invoices.tsp index 9b9aa58c5..ce82faad4 100644 --- a/api/spec/src/billing/invoices.tsp +++ b/api/spec/src/billing/invoices.tsp @@ -15,12 +15,12 @@ interface InvoiceEndpoints { */ @get @summary("List invoices") - @operationId("billingListInvoices") + @operationId("listInvoices") @extension("x-internal", true) list( @query @summary("Filter by the customer ID or key") - customers?: Array, + customers?: ULID[], ...InvoiceListParams, ...OpenMeter.QueryPagination, @@ -48,15 +48,16 @@ interface CustomerInvoicesEndpoints { * The call can return multiple invoices if the pending line items are in different currencies. */ @post - @summary("Create an invoice") - @operationId("billingCreateInvoice") + @route("/invoice") + @summary("Invoice a customer based on the pending line items") + @operationId("invoicePendingLinesAction") @extension("x-internal", true) - create( + invoicePendingLinesAction( @path customerId: ULID, @body - request: InvoiceCreate, + request: InvoicePendingLinesActionInput, ): { @statusCode _: 201; @@ -69,7 +70,7 @@ interface CustomerInvoicesEndpoints { */ @get @summary("List invoices") - @operationId("billingListInvoicesByCustomer") + @operationId("listInvoicesByCustomer") @extension("x-internal", true) listInvoicesByCustomer( @path customerId: ULID, @@ -95,17 +96,17 @@ interface CustomerInvoicesEndpoints { @post @route("/lines") @summary("Create line items") - @operationId("billingCreateLineByCustomer") + @operationId("createInvoiceLineByCustomer") @extension("x-internal", true) - createLine( + createInvoiceLine( @path customerId: ULID, @body - request: TypeSpec.Rest.Resource.ResourceCreateOrUpdateModel, + request: Invoices.InvoiceLineCreate[], ): { @statusCode _: 201; - @body body: Lines; + @body body: Invoices.InvoiceLine[]; } | OpenMeter.CommonErrors; } @@ -120,7 +121,7 @@ interface CustomerInvoiceEndpoints { */ @get @summary("Get an invoice") - @operationId("billingGetInvoiceByCustomerInvoiceId") + @operationId("getInvoice") @extension("x-internal", true) getInvoice( @path @@ -131,6 +132,9 @@ interface CustomerInvoiceEndpoints { @query expand: InvoiceExpand[] = #[InvoiceExpand.lines], + + @query + includeDeletedLines: boolean = false, ): Invoices.Invoice | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** @@ -140,7 +144,7 @@ interface CustomerInvoiceEndpoints { */ @delete @summary("Delete an invoice") - @operationId("billingDeleteInvoiceByCustomerInvoiceId") + @operationId("deleteInvoice") @extension("x-internal", true) deleteInvoice( @path @@ -156,23 +160,19 @@ interface CustomerInvoiceEndpoints { * Recalculate an invoice's tax amounts (using the app set in the customer's billing profile) * * Note: charges might apply, depending on the tax provider. - * */ @post @route("/tax/recalculate") @summary("Recalculate an invoice's tax amounts") - @operationId("billingRecalculateInvoiceTax") + @operationId("recalculateInvoiceTaxAction") @extension("x-internal", true) - recalculateTax( + recalculateTaxAction( @path customerId: ULID, @path invoiceId: ULID, - ): { - @statusCode _: 200; - @body body: Invoices.Invoice; - } | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + ): Invoices.Invoice | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** * Approve an invoice and start executing the payment workflow. @@ -186,18 +186,15 @@ interface CustomerInvoiceEndpoints { @post @route("/approve") @summary("Send the invoice to the customer") - @operationId("billingApproveInvoice") + @operationId("approveInvoiceAction") @extension("x-internal", true) - approve( + approveAction( @path customerId: ULID, @path invoiceId: ULID, - ): { - @statusCode _: 200; - @body body: Invoices.Invoice; - } | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + ): Invoices.Invoice | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** * Void an invoice @@ -209,9 +206,9 @@ interface CustomerInvoiceEndpoints { @post @route("/void") @summary("Void an invoice") - @operationId("billingVoidInvoice") + @operationId("voidInvoiceAction") @extension("x-internal", true) - voidInvoice( + voidInvoiceAction( @path customerId: ULID, @@ -219,11 +216,8 @@ interface CustomerInvoiceEndpoints { invoiceId: ULID, @body - request: VoidInvoiceInput, - ): { - @statusCode _: 200; - @body body: Invoices.Invoice; - } | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + request: VoidInvoiceActionInput, + ): Invoices.Invoice | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** * Advance the invoice's state to the next status. @@ -235,18 +229,15 @@ interface CustomerInvoiceEndpoints { @post @route("/advance") @summary("Advance the invoice's state to the next status") - @operationId("billingInvoiceAdvance") + @operationId("advanceInvoiceAction") @extension("x-internal", true) - advance( + advanceAction( @path customerId: ULID, @path invoiceId: ULID, - ): { - @statusCode _: 200; - @body body: Invoices.Invoice; - } | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + ): Invoices.Invoice | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** * Retry advancing the invoice after a failed attempt. @@ -256,18 +247,15 @@ interface CustomerInvoiceEndpoints { @post @route("/retry") @summary("Retry advancing the invoice after a failed attempt.") - @operationId("billingInvoiceRetry") + @operationId("retryInvoiceAction") @extension("x-internal", true) - retry( + retryAction( @path customerId: ULID, @path invoiceId: ULID, - ): { - @statusCode _: 200; - @body body: Invoices.Invoice; - } | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + ): Invoices.Invoice | OpenMeter.NotFoundError | OpenMeter.CommonErrors; // Line management @@ -277,16 +265,13 @@ interface CustomerInvoiceEndpoints { @get @route("/lines/{lineId}") @summary("Get an invoice line") - @operationId("billingGetInvoiceLine") + @operationId("getInvoiceLine") @extension("x-internal", true) getInvoiceLine( @path customerId: ULID, @path invoiceId: ULID, @path lineId: ULID, - ): { - @statusCode _: 204; - @body body: Invoices.InvoiceLine; - } | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + ): Invoices.InvoiceLine | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** * Delete an invoice line @@ -294,7 +279,7 @@ interface CustomerInvoiceEndpoints { @delete @route("/lines/{lineId}") @summary("Delete an invoice line") - @operationId("billingDeleteInvoiceLine") + @operationId("deleteInvoiceLine") @extension("x-internal", true) deleteInvoiceLine( @path customerId: ULID, @@ -310,7 +295,7 @@ interface CustomerInvoiceEndpoints { @post @route("/lines/{lineId}") @summary("Update an invoice line") - @operationId("billingUpdateInvoiceLine") + @operationId("updateInvoiceLine") @extension("x-internal", true) updateInvoiceLine( @path customerId: ULID, @@ -318,11 +303,8 @@ interface CustomerInvoiceEndpoints { @path lineId: ULID, @body - request: Invoices.InvoiceLine, - ): { - @statusCode _: 200; - @body body: Invoices.InvoiceLine; - } | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + request: Invoices.InvoiceLineReplaceUpdate, + ): Invoices.InvoiceLine | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** * TODOs: @@ -335,7 +317,7 @@ interface CustomerInvoiceEndpoints { /** * InvoiceOrderBy specifies the ordering options for invoice listing. */ -@friendlyName("BillingInvoiceOrderBy") +@friendlyName("InvoiceOrderBy") enum InvoiceOrderBy { customerName: "customer.name", issuedAt: "issuedAt", @@ -344,30 +326,21 @@ enum InvoiceOrderBy { updatedAt: "updatedAt", } -/** - * CreateLinesRequest is the request for creating manual line items. - */ -@friendlyName("BillingInvoiceLines") -model Lines { - @summary("The line to create") - lines: Invoices.InvoiceLine[]; -} - /** * Request to void an invoice */ -@friendlyName("BillingVoidInvoiceInput") -model VoidInvoiceInput { +@friendlyName("VoidInvoiceActionInput") +model VoidInvoiceActionInput { /** * The action to take on the voided line items. */ - @summary("The action to take on the voided lines.") + @visibility("create") action: VoidInvoiceAction; /** * The reason for voiding the invoice. */ - @summary("The reason for voiding the invoice") + @visibility("create") reason: string; /** @@ -375,104 +348,155 @@ model VoidInvoiceInput { * * If not specified, the `action` will be applied to all line items. */ - overrides: VoidInvoiceLineOverride[] | null; + @visibility("create") + overrides?: VoidInvoiceActionLineOverride[] | null; } /** * InvoiceVoidAction describes how to handle the voided line items. */ -@friendlyName("BillingVoidInvoiceAction") +@friendlyName("VoidInvoiceAction") model VoidInvoiceAction { - @summary("How much of the total line items to be voided? (e.g. 100% means all charges are voided)") + /** + * How much of the total line items to be voided? (e.g. 100% means all charges are voided) + */ + @visibility("create") percentage: Percentage; - @summary("How to handle the voided line items, default: pending") action: VoidInvoiceLineAction; } /** - * VoidInvoiceLineAction describes how to handle the voidied line item in the invoice. + * VoidInvoiceLineActionType describes how to handle the voidied line item in the invoice. */ -@friendlyName("BillingVoidInvoiceLineAction") -enum VoidInvoiceLineAction { - @summary("The line items will never be charged for again") +@friendlyName("VoidInvoiceLineActionType") +enum VoidInvoiceLineActionType { + /** + * The line items will never be charged for again + */ discard: "discard", - @summary("Queue the line items into the pending state, they will be included in the next invoice. (We want to generate an invoice right now)") + /** + * Queue the line items into the pending state, they will be included in the next invoice. (We want to generate an invoice right now) + */ pending: "pending", +} + +/** + * VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding. + */ +@friendlyName("VoidInvoiceLineAction") +@discriminator("type") +union VoidInvoiceLineAction { + discard: VoidInvoiceLineDiscardAction, + pending: VoidInvoiceLinePendingAction, +} - @summary("Queue the line items into the pending state, they will be included in the next invoice, but not in the current one") - pendingNextCycle: "pending_next_cycle", +/** + * VoidInvoiceLineDiscardAction describes how to handle the voidied line item in the invoice. + */ +@friendlyName("VoidInvoiceLineDiscardAction") +model VoidInvoiceLineDiscardAction { + type: VoidInvoiceLineActionType.discard; +} + +/** + * VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice. + */ +@friendlyName("VoidInvoiceLinePendingAction") +model VoidInvoiceLinePendingAction { + type: VoidInvoiceLineActionType.pending; + + /** + * The time at which the line item should be invoiced again. + * + * If not provided, the line item will be re-invoiced now. + */ + @visibility("create") + nextInvoiceAt?: DateTime; } /** * VoidInvoiceLineOverride describes how to handle a specific line item in the invoice when voiding. */ -@friendlyName("BillingVoidInvoiceLineOverride") -model VoidInvoiceLineOverride { - @summary("The line item ID to override") +@friendlyName("VoidInvoiceActionLineOverride") +model VoidInvoiceActionLineOverride { + /** + * The line item ID to override. + */ + @visibility("create") lineId: ULID; - @summary("The action to take on the line item") + /** + * The action to take on the line item. + */ + @visibility("create") action: VoidInvoiceAction; } /** * Common parameters for listing invoices */ -@friendlyName("BillingInvoiceListParams") +@friendlyName("InvoiceListParams") model InvoiceListParams { + /** + * Filter by the invoice status. + */ @query - @summary("Filter by the invoice status") - statuses?: Array; + statuses?: Invoices.InvoiceStatus[]; + /** + * Filter by invoice extended statuses + */ @query - @summary("Filter by invoice extended statuses") - extendedStatuses?: Array; + extendedStatuses?: Invoices.InvoiceExtendedStatus[]; + /** + * Filter by invoice creation time + */ @query - @summary("Filter by invoice creation time") issuedAfter?: DateTime; + /** + * Filter by invoice creation time + */ @query - @summary("Filter by invoice creation time") issuedBefore?: DateTime; + /** + * What parts of the list output to expand in listings + */ @query - @summary("What parts of the list output to expand in listings") - expand?: Array; + expand?: InvoiceExpand[]; } /** * InvoiceExpand specifies the parts of the invoice to expand in the list output. */ -@friendlyName("BillingInvoiceExpand") -@extension( - "x-enum-varnames", - ["all", "lines", "preceding", "workflow", "workflowApps"] -) +@friendlyName("InvoiceExpand") +@extension("x-enum-varnames", ["all", "lines", "preceding", "workflowApps"]) enum InvoiceExpand { all: "*", lines: "lines", preceding: "preceding", - workflow: "workflow", workflowApps: "workflow.apps", } /** - * BillingInvoiceCreate is the input for creating an invoice. + * BillingInvoiceActionInput is the input for creating an invoice. * * Invoice creation is always based on already pending line items created by the billingCreateLineByCustomer * operation. Empty invoices are not allowed. */ -@friendlyName("BillingInvoiceCreate") -model InvoiceCreate { +@friendlyName("InvoicePendingLinesActionInput") +model InvoicePendingLinesActionInput { /** * The pending line items to include in the invoice, if not provided: * - all line items that have invoice_at < asOf will be included * - all usage based line items will be included up to asOf, new usage-based line items will be staged for the rest * of the billing cycle */ + @visibility("create") includePendingLines?: ULID[]; /** @@ -480,5 +504,6 @@ model InvoiceCreate { * * If not provided, the current time is used. */ + @visibility("create") asOf?: DateTime; } diff --git a/api/spec/src/billing/invoices/docref.tsp b/api/spec/src/billing/invoices/docref.tsp index bc92e1083..63d582ab0 100644 --- a/api/spec/src/billing/invoices/docref.tsp +++ b/api/spec/src/billing/invoices/docref.tsp @@ -9,10 +9,10 @@ using TypeSpec.OpenAPI; namespace Invoices; /** - * DocumentRefType defines the type of document that is being referenced. + * InvoiceDocumentRefType defines the type of document that is being referenced. */ -@friendlyName("BillingDocumentRefType") -enum DocumentRefType { +@friendlyName("InvoiceDocumentRefType") +enum InvoiceDocumentRefType { creditNoteOriginalInvoice: "credit_node_original_invoice", } @@ -22,43 +22,59 @@ enum DocumentRefType { * stamps: Seals of approval from other organisations that may need to be listed. * ext: Extensions for additional codes that may be required. */ -@summary("DocumentRef is used to describe an existing document or a specific part of it's contents.") -@friendlyName("BillingGenericDocumentRef") -model GenericDocumentRef { - @summary("Type of the document referenced.") +@summary("InvoiceGenericDocumentRef is used to describe an existing document or a specific part of it's contents.") +@friendlyName("InvoiceGenericDocumentRef") +model InvoiceGenericDocumentRef { + /** + * Type of the document referenced. + */ @visibility("read") - type: DocumentRefType; + type: InvoiceDocumentRefType; - @summary("Human readable description on why this reference is here or needs to be used.") + /** + * Human readable description on why this reference is here or needs to be used. + */ + @visibility("read") reason?: string; - @summary("Additional details about the document.") + /** + * Additional details about the document. + */ + @visibility("read") description?: string; } /** * CreditNoteOriginalInvoiceRef is used to reference the original invoice that a credit note is based on. */ -@friendlyName("BillingCreditNoteOriginalInvoiceRef") -model CreditNoteOriginalInvoiceRef extends GenericDocumentRef { - type: DocumentRefType.creditNoteOriginalInvoice; +@friendlyName("CreditNoteOriginalInvoiceRef") +model InvoiceCreditNoteOriginalInvoiceRef extends InvoiceGenericDocumentRef { + type: InvoiceDocumentRefType.creditNoteOriginalInvoice; - @summary("IssueAt reflects the time the document was issued.") + /** + * IssueAt reflects the time the document was issued. + */ + @visibility("read") issuedAt?: DateTime; - @summary("(Serial) Number of the referenced document.") + /** + * (Serial) Number of the referenced document. + */ @visibility("read") number?: InvoiceNumber; - @summary("Link to the source document.") + /** + * Link to the source document. + */ @format("uri") + @visibility("read") url: string; } /** - * DocumentRef is used to describe a reference to an existing document (invoice). + * InvoiceDocumentRef is used to describe a reference to an existing document (invoice). */ -@friendlyName("BillingDocumentRef") -union DocumentRef { - creditNoteOriginalInvoice: CreditNoteOriginalInvoiceRef, +@friendlyName("InvoiceDocumentRef") +union InvoiceDocumentRef { + creditNoteOriginalInvoice: InvoiceCreditNoteOriginalInvoiceRef, } diff --git a/api/spec/src/billing/invoices/invoice.tsp b/api/spec/src/billing/invoices/invoice.tsp index 69660220c..28464446e 100644 --- a/api/spec/src/billing/invoices/invoice.tsp +++ b/api/spec/src/billing/invoices/invoice.tsp @@ -21,7 +21,7 @@ namespace Invoices; @example("INV-2024-01-01-01") @minLength(1) @maxLength(256) -@friendlyName("BillingInvoiceNumber") +@friendlyName("InvoiceNumber") scalar InvoiceNumber extends string; /* Omitted fields (not required yet, from GOBL schema): @@ -43,30 +43,33 @@ scalar InvoiceNumber extends string; /** * Invoice represents an invoice in the system. */ -@friendlyName("BillingInvoice") +@friendlyName("Invoice") model Invoice { - ...OmitProperties; + ...OmitProperties; /** - * Timestamp of when the resource was last updated. + * Type of the invoice. * - * For updates the updatedAt field is used to detect conflicts. + * The type of invoice determines the purpose of the invoice and how it should be handled. + * + * Supported types: + * - standard: A regular commercial invoice document between a supplier and customer. + * - credit_note: Reflects a refund either partial or complete of the preceding document. A credit note effectively *extends* the previous document. */ - @summary("Last Update Time") - @visibility("read", "update") - @example(DateTime.fromISO("2024-01-01T01:01:01.001Z")) - updatedAt: DateTime; - @visibility("read") type: InvoiceType; - @summary("The taxable entity supplying the goods or services.") - @visibility("read", "update") - supplier: Party; + /** + * The taxable entity supplying the goods or services. + */ + @visibility("read", "update", "create") + supplier: BillingParty; - @summary("Legal entity receiving the goods or services.") - @visibility("read", "update") - customer: Party; + /** + * Legal entity receiving the goods or services. + */ + @visibility("read", "update", "create") + customer: BillingParty; /** * Number specifies the human readable key used to reference this Invoice. @@ -77,28 +80,41 @@ model Invoice { * whole organization or unique for the customer, or in multi (stripe) account setups unique for the * account. */ - @summary("(Serial) Number of the invoice") @visibility("read") number?: InvoiceNumber; - @summary("Currency for all invoice totals.") - @visibility("read") + /** + * Currency for all invoice line items. + * + * Multi currency invoices are not supported yet. + */ + @visibility("read", "create") currency: CurrencyCode; - @summary("Key information regarding previous invoices and potentially details as to why they were corrected.") - @visibility("read") // We only populate this for voided invoices - preceding?: DocumentRef[]; + /** + * Key information regarding previous invoices and potentially details as to why they were corrected. + */ + @visibility("read") + preceding?: InvoiceDocumentRef[]; - @summary("Summary of all the invoice totals, including taxes (calculated).") + /** + * Summary of all the invoice totals, including taxes (calculated). + */ @visibility("read") - totals: Totals; + totals: InvoiceTotals; + /** + * The status of the invoice. + * + * This field only conatins a simplified status, for more detailed information use the statusDetails field. + */ @visibility("read") - @summary("The status of the invoice.") status: InvoiceStatus; + /** + * The details of the current invoice status. + */ @visibility("read") - @summary("The details of the current invoice status") statusDetails: InvoiceStatusDetails; /** @@ -108,7 +124,6 @@ model Invoice { * - draft, gathering: The time the invoice will be issued based on the workflow settings. * - issued: The time the invoice was issued. */ - @summary("The time the invoice was issued.") @visibility("read") issuedAt?: DateTime; @@ -119,15 +134,19 @@ model Invoice { * * If manual approval is required, the draftUntil time is set. */ - @summary("The time until the invoice is in draft status.") @visibility("read", "update") draftUntil?: DateTime; - @summary("Due time of the fulfillment of the invoice.") + /** + * Due time of the fulfillment of the invoice (if available). + */ @visibility("read") dueAt?: DateTime; - @summary("The period the invoice covers. If the invoice has no line items, it's not set.") + /** + * The period the invoice covers. If the invoice has no line items, it's not set. + */ + @visibility("read", "create", "update") period?: Period; /** @@ -135,7 +154,6 @@ model Invoice { * * If the invoice was voided, this field will be set to the time the invoice was voided. */ - @summary("The time the invoice was voided.") @visibility("read") voidedAt?: DateTime; @@ -145,45 +163,62 @@ model Invoice { * It is always a snapshot of the workflow settings at the time of invoice creation. The * field is optional as it should be explicitly requested with expand options. */ - @summary("The workflow settings associated with this invoice") - @visibility("read", "update") + @visibility("read", "create", "update") workflow?: InvoiceWorkflowSettings; - @summary("List of invoice lines representing each of the items sold to the customer.") + /** + * List of invoice lines representing each of the items sold to the customer. + */ @visibility("read") // Seperate API endpoint is available for updating lines?: InvoiceLine[]; - @summary("Discounts or allowances applied to the complete invoice.") - @visibility("read") // Seperate API endpoint is available for updating + /** + * Discounts or allowances applied to the complete invoice. + */ + @visibility("read", "create") // Updates and later deletions are handled by the restful API discounts?: Discount[]; - @summary("Information on when, how, and to whom the invoice should be paid.") - @visibility("read") // Seperate API endpoint is available for updating - payment?: Payment; + /** + * Information on when, how, and to whom the invoice should be paid. + */ + @visibility("read", "create", "update") + payment?: InvoicePaymentTerms; - @summary("Validation issues reported by the invoice workflow.") + /** + * Validation issues reported by the invoice workflow. + */ @visibility("read") validationIssues?: ValidationIssue[]; } /** - * BillingInvoiceAction represents the actions that can be performed on an invoice. + * InvoiceAction represents the actions that can be performed on an invoice. */ -@friendlyName("BillingInvoiceAction") +@friendlyName("InvoiceAction") enum InvoiceAction { - @summary("Advance the invoice to the next status.") + /** + * Advance the invoice to the next status. + */ advance: "advance", - @summary("Approve an invoice that requires manual approval.") + /** + * Approve an invoice that requires manual approval. + */ approve: "approve", - @summary("Delete the invoice (only non-issued invoices can be deleted).") + /** + * Delete the invoice (only non-issued invoices can be deleted). + */ delete: "delete", - @summary("Retry an invoice issuing step that failed.") + /** + * Retry an invoice issuing step that failed. + */ retry: "retry", - @summary("Void an already issued invoice.") + /** + * Void an already issued invoice. + */ `void`: "void", } @@ -193,31 +228,48 @@ enum InvoiceAction { * API users are encouraged to rely on the immutable/failed/avaliableActions fields to determine * the next steps of the invoice instead of the extendedStatus field. */ -@friendlyName("BillingInvoiceStatusDetails") +@friendlyName("InvoiceStatusDetails") model InvoiceStatusDetails { - @summary("Is the invoice editable?") + /** + * Is the invoice editable? + */ + @visibility("read") immutable: boolean; - @summary("Is the invoice in a failed state?") + /** + * Is the invoice in a failed state? + */ + @visibility("read") failed: boolean; - @summary("Extended status information for the invoice.") + /** + * Extended status information for the invoice. + */ + @visibility("read") extendedStatus: InvoiceExtendedStatus; - @summary("The actions that can be performed on the invoice.") + /** + * The actions that can be performed on the invoice. + */ availableActions: InvoiceAction[]; } +// TODO[later]: we can make this an enum, but only if we have reached a stable state with the statuses. +scalar InvoiceExtendedStatus extends string; + /** * InvoiceWorkflowSettings represents the workflow settings used by the invoice. * * This is a clone of the billing profile's workflow settings at the time of invoice creation * with customer overrides considered. */ -@friendlyName("BillingInvoiceWorkflowSettings") +@friendlyName("InvoiceWorkflowSettings") model InvoiceWorkflowSettings { - @summary("The apps that will be used to orchestrate the invoice's workflow.") - apps?: OpenMeter.Billing.ProfileAppsOrReference; + /** + * The apps that will be used to orchestrate the invoice's workflow. + */ + @visibility("read") + apps?: OpenMeter.Billing.BillingProfileAppsOrReference; /** * sourceBillingProfileID is the billing profile on which the workflow was based on. @@ -225,13 +277,18 @@ model InvoiceWorkflowSettings { * The profile is snapshotted on invoice creation, after which it can be altered independently * of the profile itself. */ - @summary("The billing profile on which the workflow was based on.") + @visibility("read") sourceBillingProfileID: ULID; - @summary("The workflow details used by this invoice.") - workflow: OpenMeter.Billing.WorkflowSettings; + /** + * The workflow details used by this invoice. + */ + @visibility("read") + workflow: OpenMeter.Billing.BillingWorkflowSettings; - @summary("Timezone of the invoice's date fields.") + /** + * Timezone of the invoice's date fields. + */ @visibility("read") timezone: string; } @@ -239,7 +296,7 @@ model InvoiceWorkflowSettings { /** * InvoiceStatus describes the status of an invoice. */ -@friendlyName("BillingInvoiceStatus") +@friendlyName("InvoiceStatus") enum InvoiceStatus { /** * The list of line items for the next invoice is being gathered. @@ -262,47 +319,6 @@ enum InvoiceStatus { issued: "issued", } -/** - * InvoiceExtendedStatus describes the extended status of an invoice. - * - * This is used to provide more detailed information about the status of the invoice. Useful for - * troubelshooting invoice workflow issues. - */ -@friendlyName("BillingInvoiceExtendedStatus") -enum InvoiceExtendedStatus { - ...InvoiceStatus, - - @summary("The draft is available for processing.") - draftCreated: "draft_created", - - @summary("The draft is waiting for manual approval.") - draftManualApprovalNeeded: "draft_manual_approval_needed", - - @summary("The draft is being validated.") - draftValidating: "draft_validating", - - @summary("The draft is invalid, needs fixes to apps or contents.") - draftInvalid: "draft_invalid", - - @summary("The draft is syncing with external systems.") - draftSyncing: "draft_syncing", - - @summary("The draft failed to sync with external systems.") - draftSyncFailed: "draft_sync_failed", - - @summary("The draft is waiting for auto-approval.") - draftWaitingAutoApproval: "draft_waiting_auto_approval", - - @summary("The draft is ready to be issued.") - draftReadyToIssue: "draft_ready_to_issue", - - @summary("The draft is being issued.") - issuingSyncing: "issuing_syncing", - - @summary("The draft failed to issue.") - issuingSyncFailed: "issuing_sync_failed", -} - /* * Omitted types: proforma, corrected, debit-note, other */ @@ -311,30 +327,46 @@ enum InvoiceExtendedStatus { * * The type of invoice determines the purpose of the invoice and how it should be handled. */ -@friendlyName("BillingInvoiceType") +@friendlyName("InvoiceType") enum InvoiceType { - @summary("A regular commercial invoice document between a supplier and customer.") + /** + * A regular commercial invoice document between a supplier and customer. + */ standard: "standard", - @summary("Reflects a refund either partial or complete of the preceding document. A credit note effectively *extends* the previous document.") + /** + * Reflects a refund either partial or complete of the preceding document. A credit note effectively *extends* the previous document. + */ creditNote: "credit_note", } /** * Discount represents an allowance applied to the complete document independent from the individual lines. */ -@friendlyName("BillingInvoiceDiscount") -model Discount { - @summary("Base represents the value used as a base for percent calculations instead of the invoice's sum of lines.") +@friendlyName("InvoiceDiscount") +model InvoiceDiscount { + /** + * Base represents the value used as a base for percent calculations instead of the invoice's sum of lines. + */ + @visibility("read", "create", "update") base?: Numeric; - @summary("Percentage to apply to the base or invoice's sum.") + /** + * Percentage to apply to the base or invoice's sum. + */ + @visibility("read", "create", "update") percent?: Percentage; - @summary("Amount to apply (calculated if percent present).") + /** + * Fixed discount amount to apply (calculated if percent present). + */ + @visibility("read", "create", "update") amount: Numeric; - @summary("Text description as to why the discount was applied") + /** + * Text description as to why the discount was applied. + */ + @visibility("read", "create", "update") reason?: string; // TODO: Add reference fields to plan/subscriptions if the discount is coming from there. @@ -343,197 +375,292 @@ model Discount { /** * BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price. */ -@friendlyName("BillingInvoiceLine") +@friendlyName("InvoiceLine") @discriminator("type") union InvoiceLine { - usageBased: UsageBasedLine, - flatFee: FlatFeeLine, + usageBased: InvoiceUsageBasedLine, + flatFee: InvoiceFlatFeeLine, } /** - * LineTypes represents the different types of lines that can be used in an invoice. + * InvoiceLineReplaceUpdate represents the update model for an invoice line. + */ +@friendlyName("InvoiceLineReplaceUpdate") +@discriminator("type") +union InvoiceLineReplaceUpdate { + usageBased: Rest.Resource.ResourceReplaceModel, + flatFee: Rest.Resource.ResourceReplaceModel, +} + +/** + * InvoiceLineCreate represents the create model for an invoice line. */ -@friendlyName("BillingLineTypes") -enum LineTypes { - // TODO: Implement when we have support for subscriptions - // subscriptionFlatFee: "subs_flat_fee", - // subscriptionUsageBased: "subs_usage_based", +@friendlyName("InvoiceLineCreate") +@discriminator("type") +union InvoiceLineCreate { + usageBased: Rest.Resource.ResourceCreateModel, + flatFee: Rest.Resource.ResourceCreateModel, +} +/** + * LineTypes represents the different types of lines that can be used in an invoice. + */ +@friendlyName("InvoiceLineTypes") +enum InvoiceLineTypes { flatFee: "flat_fee", - usageBased: "usage_based", } /** * Line status specifies the status of the line. */ -@friendlyName("BillingLineStatus") -enum LineStatus { +@friendlyName("InvoiceLineStatus") +enum InvoiceLineStatus { + /** + * The line is valid and can be used in the invoice. + */ valid: "valid", - deleted: "deleted", + + /** + * The line is a detail line which is used to detail the individual + * charges and discounts of a valid line. + */ + detail: "detail", + + /** + * The line has been split into multiple valid lines due to progressive + * billing. + */ split: "split", } /** - * Line represents a single item or service sold to the customer. + * InvoiceLine represents a single item or service sold to the customer. * * This is a base class for all line types, and should not be used directly. * */ @discriminator("type") -@friendlyName("BillingLine") -model Line { +@friendlyName("InvoiceLine") +model InvoiceLineBase { + // Note: ID has updated visibility as we support batch line creations and upserts ...OmitProperties; @visibility("read", "update") id: ULID; - type: LineTypes; + /** + * Type of the line. + * + * A line's type cannot be changed after creation. + */ + @visibility("read", "create") + type: InvoiceLineTypes; + /** + * Status of the line. + * + * External calls always create valid lines, other line types are managed by the + * billing engine of OpenMeter. + */ @visibility("read") - status: LineStatus; + status: InvoiceLineStatus; - @summary("Discounts applied to this line.") + /** + * Discounts detailes applied to this line. + * + * New discounts can be added via the invoice's discounts API, to facilitate + * discounts that are affecting multiple lines. + */ @visibility("read") - discounts?: LineDiscount[]; + discounts?: InvoiceLineDiscount[]; - @summary("Charges applied to this line.") + /** + * Charges applied to this line. (like minimum spend) + * + * New charges can be added via the invoice's charges API, to facilitate + * charges that are affecting multiple lines. + */ @visibility("read") - charges?: LineCharge[]; + charges?: InvoiceLineCharge[]; - @summary("The invoice this item belongs to.") + /** + * The invoice this item belongs to. + */ + @visibility("read", "create") invoice?: InvoiceReference; - @summary("The currency of this line") + /** + * The currency of this line. + */ + @visibility("read", "create") currency: CurrencyCode; - @summary("Map of taxes to be applied and used in the invoice totals.") + /** + * Taxes applied to the invoice totals. + */ @visibility("read") // Tax is handled by the tax provider, we only need to show the output of that here - taxes?: TaxItem[]; + taxes?: InvoiceLineTaxItem[]; - @summary("Tax config specify the tax configuration for this line.") - taxConfig?: OpenMeter.ProductCatalog.TaxConfig | null; + /** + * Tax config specify the tax configuration for this line. + */ + @visibility("read", "create", "update") + taxConfig?: OpenMeter.ProductCatalog.TaxConfig; + /** + * The lines detailing the item or service sold. + */ @visibility("read") - @summary("The lines detailing the item or service sold.") - children?: InvoiceLine[] | null; + children?: InvoiceLine[]; + /** + * Totals for this line. + */ @visibility("read") - @summary("Totals for this line.") - totals: Totals; + totals: InvoiceTotals; - @summary("Period of the line item applies to for revenue recognition pruposes.") + /** + * Period of the line item applies to for revenue recognition pruposes. + * + * Billing always treats periods as start being inclusive and end being exclusive. + */ + @visibility("read", "create", "update") period: Period; - @summary("The time this line item should be invoiced.") + /** + * The time this line item should be invoiced. + */ + @visibility("read", "create", "update") invoiceAt: DateTime; } /** * Reference to an invoice. */ -@friendlyName("BillingInvoiceReference") +@friendlyName("InvoiceReference") model InvoiceReference { - @summary("The ID of the invoice.") + /** + * The ID of the invoice. + */ + @visibility("read") id: ULID; + /** + * The number of the invoice. + */ @visibility("read") - @summary("The number of the invoice.") number?: InvoiceNumber; } /** - * Period represents a time range. - * - * Billing always treats periods as start being inclusive and end being exclusive. - */ -@friendlyName("BillingPeriod") -model Period { - @summary("Start of the period.") - start: DateTime; - - @summary("End of the period.") - end: DateTime; -} - -/** - * UsageBasedLine represents a line item that is sold to the customer based on usage. + * InvoiceUsageBasedLine represents a line item that is sold to the customer based on usage. */ -@friendlyName("BillingUsageBasedLine") -model UsageBasedLine { - ...OmitProperties; - type: LineTypes.usageBased; +@friendlyName("InvoiceUsageBasedLine") +model InvoiceUsageBasedLine { + ...OmitProperties; + type: InvoiceLineTypes.usageBased; price: OpenMeter.ProductCatalog.RateCardUsageBasedPrice; - @summary("The feature that the usage is based on.") + /** + * The feature that the usage is based on. + */ + @visibility("read", "create") featureKey: Key; - @summary("Quantity of the item being sold.") + /** + * The quantity of the item being sold. + */ @visibility("read") quantity?: Numeric; + + /** + * The quantity of the item used in before this line's period. + * + * It is non-zero in case of progressive billing, when this shows how much of the usage was already billed. + */ + @visibility("read") + preLinePeriodQuantity?: Numeric; } /** - * BillingFlatFeeLine represents a line item that is sold to the customer as a manually added fee. + * InvoiceFlatFeeLine represents a line item that is sold to the customer as a manually added fee. */ -@friendlyName("BillingFlatFeeLine") -model FlatFeeLine { - ...OmitProperties; - type: LineTypes.flatFee; +@friendlyName("InvoiceFlatFeeLine") +model InvoiceFlatFeeLine { + ...OmitProperties; + type: InvoiceLineTypes.flatFee; - @summary("Price of the item being sold.") + /** + * Price of the item being sold. + */ + @visibility("read", "create", "update") perUnitAmount: Money; - @summary("Payment term of the line.") + /** + * Payment term of the line. + */ + @visibility("read", "create", "update") paymentTerm?: OpenMeter.ProductCatalog.PricePaymentTerm = OpenMeter.ProductCatalog.PricePaymentTerm.inAdvance; - @summary("Quantity of the item being sold.") + /** + * Quantity of the item being sold. + */ + @visibility("read", "create", "update") quantity: Numeric; } /** - * GenericCharge represents a charge or discount that can be applied to a line or the entire invoice. + * InvoiceGenericCharge represents a charge or discount that can be applied to a line or the entire invoice. */ -@friendlyName("BillingGenericCharge") -model GenericCharge { +@friendlyName("InvoiceGenericCharge") +model InvoiceGenericCharge { ...ResourceTimestamps; - @summary("ID of the entity") + /** + * ID of the charge or discount. + */ @visibility("read") id: ULID; /** * Percentage if fixed amount not applied */ - @summary("Percent") + @visibility("read", "create", "update") percent?: Percentage; /** * Fixed discount amount to apply (calculated if percent present). */ - @summary("Amount") + @visibility("read", "create", "update") amount: Numeric; - @summary("Reason code.") + /** + * Reason code. + */ + @visibility("read", "create", "update") code?: string; - @summary("Text description as to why the discount was applied.") + /** + * Text description as to why the discount was applied. + */ + @visibility("read", "create", "update") description?: string; } /** - * LineDiscount represents an amount deducted from the line, and will be applied before taxes. + * InvoiceLineDiscount represents an amount deducted from the line, and will be applied before taxes. */ -@friendlyName("BillingLineDiscount") -model LineDiscount { - ...GenericCharge; +@friendlyName("InvoiceLineDiscount") +model InvoiceLineDiscount { + ...InvoiceGenericCharge; } /** - * LineCharge represents an amount added to the line, and will be applied before taxes. + * InvoiceLineCharge represents an amount added to the line, and will be applied before taxes. */ @friendlyName("BillingLineCharge") -model LineCharge { - ...GenericCharge; +model InvoiceLineCharge { + ...InvoiceGenericCharge; } /* @@ -544,27 +671,48 @@ model LineCharge { /** * Totals contains the summaries of all calculations for the invoice. */ -@friendlyName("BillingInvoiceTotals") -model Totals { - @summary("The total value of the line before taxes, discounts and commitments.") +@friendlyName("InvoiceTotals") +model InvoiceTotals { + /** + * The total value of the line before taxes, discounts and commitments. + */ + @visibility("read") amount: Numeric; - @summary("The amount of value of the line that are due to additional charges.") + /** + * The amount of value of the line that are due to additional charges. + */ + @visibility("read") chargesTotal: Numeric; - @summary("The amount of value of the line that are due to discounts.") + /** + * The amount of value of the line that are due to discounts. + */ + @visibility("read") discountsTotal: Numeric; - @summary("The total amount of taxes that are included in the line.") + /** + * The total amount of taxes that are included in the line. + */ + @visibility("read") taxesInclusiveTotal: Numeric; - @summary("The total amount of taxes that are added on top of amount from the line.") + /** + * The total amount of taxes that are added on top of amount from the line. + */ + @visibility("read") taxesExclusiveTotal: Numeric; - @summary("The total amount of taxes for this line.") + /** + * The total amount of taxes for this line. + */ + @visibility("read") taxesTotal: Numeric; - @summary("The total amount value of the line after taxes, discounts and commitments.") + /** + * The total amount value of the line after taxes, discounts and commitments. + */ + @visibility("read") total: Numeric; } @@ -581,8 +729,12 @@ model Totals { /** * Payment contains details as to how the invoice should be paid. */ -@friendlyName("BillingInvoicePayment") -model Payment { +@friendlyName("InvoicePaymentTerms") +model InvoicePaymentTerms { + /** + * The terms of payment for the invoice. + */ + @visibility("read", "create", "update") terms?: PaymentTerms; } @@ -591,7 +743,7 @@ model Payment { * * Issues with severity "critical" will prevent the invoice from being issued. */ -@friendlyName("BillingValidationIssueSeverity") +@friendlyName("ValidationIssueSeverity") enum ValidationIssueSeverity { critical: "critical", warning: "warning", @@ -602,25 +754,49 @@ enum ValidationIssueSeverity { * * Issues with severity "critical" will prevent the invoice from being issued. */ -@friendlyName("BillingValidationIssue") +@friendlyName("ValidationIssue") model ValidationIssue { - @summary("The severity of the issue.") + ...ResourceTimestamps; + + /** + * ID of the charge or discount. + */ + @visibility("read") + id: ULID; + + /** + * The severity of the issue. + */ + @visibility("read") severity: ValidationIssueSeverity; - @summary("The field that the issue is related to, if available in JSON path format.") + /** + * The field that the issue is related to, if available in JSON path format. + */ + @visibility("read") field?: string; - @summary("Machine indentifiable code for the issue, if available.") - // NOTE: on the long run we might make this an enum, but for now, let's keep it as a string, as - // we would need to extract the codes from go code and maybe external systems too. + /** + * Machine indentifiable code for the issue, if available. + */ + @visibility("read") code?: string; - @summary("Component reporting the issue.") + /** + * Component reporting the issue. + */ + @visibility("read") component: string; - @summary("A human-readable description of the issue.") + /** + * A human-readable description of the issue. + */ + @visibility("read") message: string; - @summary("Metadata") + /** + * Additional context for the issue. + */ + @visibility("read") metadata?: Metadata; } diff --git a/api/spec/src/billing/invoices/org.tsp b/api/spec/src/billing/invoices/org.tsp index 5fc0c28c3..1f174b123 100644 --- a/api/spec/src/billing/invoices/org.tsp +++ b/api/spec/src/billing/invoices/org.tsp @@ -29,20 +29,42 @@ namespace Invoices; * Party represents a person or business entity. */ @friendlyName("BillingParty") -model Party { - @summary("ID of the party.") - @visibility("read", "update") - // id is null if there's no dedicated entity different from the parent object to store the party (these are not updated directly via - // the underlying entity so it's not a problem) - id?: ULID; +model BillingParty { + /** + * Unique identifier for the party (if available) + */ + @visibility("read") + id?: string; - @summary("Legal name or representation of the organization.") + /** + * Legal name or representation of the organization. + */ + @visibility("read", "update", "create") name?: string; - @summary("The entity's legal ID code used for tax purposes. They may have other numbers, but we're only interested in those valid for tax purposes.") - taxId?: TaxIdentity; + /** + * The entity's legal ID code used for tax purposes. They may have + * other numbers, but we're only interested in those valid for tax purposes. + */ + @visibility("read", "update", "create") + taxId?: BillingPartyTaxIdentity; - @summary("Regular post addresses for where information should be sent if needed.") + /** + * Regular post addresses for where information should be sent if needed. + */ @maxItems(1) - addresses?: Array
; + @visibility("read", "update", "create") + addresses?: Address[]; +} + +/** + * Identity stores the details required to identify an entity for tax purposes in a specific country. + */ +@friendlyName("BillingPartyTaxIdentity") +model BillingPartyTaxIdentity { + /** + * Normalized tax code shown on the original identity document. + */ + @visibility("read", "update", "create") + code?: TaxIdentificationCode; } diff --git a/api/spec/src/billing/invoices/pay.tsp b/api/spec/src/billing/invoices/pay.tsp index eadb68471..3fc8a3b18 100644 --- a/api/spec/src/billing/invoices/pay.tsp +++ b/api/spec/src/billing/invoices/pay.tsp @@ -9,24 +9,39 @@ using TypeSpec.OpenAPI; namespace Invoices; /** - * DueDate contains an amount that should be paid by the given date. + * PaymentDueDate contains an amount that should be paid by the given date. */ -@friendlyName("BillingDueDate") -model DueDate { - @summary("When the payment is due.") +@friendlyName("PaymentDueDate") +model PaymentDueDate { + /** + * When the payment is due. + */ // Note: This is a date-time, but we should use a date-time string to be more specific. (original schema has a Date field) + @visibility("read") dueAt: DateTime; - @summary("Other details to take into account for the due date.") + /** + * Other details to take into account for the due date. + */ + @visibility("read") notes?: string; - @summary("How much needs to be paid by the date.") + /** + * How much needs to be paid by the date. + */ + @visibility("read") amount: Money; - @summary("Percentage of the total that should be paid by the date.") + /** + * Percentage of the total that should be paid by the date. + */ + @visibility("read") percent?: Percentage; - @summary("If different from the parent document's base currency.") + /** + * If different from the parent document's base currency. + */ + @visibility("read") currency?: CurrencyCode; } @@ -34,35 +49,47 @@ model DueDate { * Most of the allowed values are omited, please see https://docs.gobl.org/draft-0/pay/terms */ /** - * PaymentPaymentTermType defines the type of terms to be applied. + * PaymentTermType defines the type of terms to be applied. */ -@friendlyName("BillingPaymentTermType") +@friendlyName("PaymentTermType") enum PaymentTermType { - @summary("Due on a specific date") + /** + * Due on a specific date. + */ dueDate: "due_date", - @summary("On receipt of invoice") + /** + * On receipt of invoice + */ instant: "instant", } @summary("Terms defines when we expect the customer to pay, or have paid, for the contents of the document.") -@friendlyName("BillingGenericPaymentTerms") +@friendlyName("GenericPaymentTerms") @discriminator("type") model GenericPaymentTerms { - @summary("Type of terms to be applied.") + /** + * Type of terms to be applied. + */ type: T; - @summary("Text detail of the chosen payment terms.") + /** + * Text detail of the chosen payment terms. + */ + @visibility("read") detail?: string; - @summary("Description of the conditions for payment.") + /** + * Description of the conditions for payment. + */ + @visibility("read") notes?: string; } /** * PaymentTermInstant defines the terms for payment on receipt of invoice. */ -@friendlyName("BillingPaymentTermInstant") +@friendlyName("PaymentTermInstant") model PaymentTermInstant { ...GenericPaymentTerms; } @@ -70,19 +97,22 @@ model PaymentTermInstant { /** * PaymentTermDueDate defines the terms for payment on a specific date. */ -@friendlyName("BillingPaymentTermDueDate") +@friendlyName("PaymentTermDueDate") model PaymentTermDueDate { ...GenericPaymentTerms; - @summary("When the payment is due.") + /** + * When the payment is due. + */ @minItems(1) - dueAt: DueDate[]; + @visibility("read") + dueAt: PaymentDueDate[]; } /** * PaymentTerms defines the terms for payment. */ -@friendlyName("BillingPaymentTerms") +@friendlyName("PaymentTerms") union PaymentTerms { instant: PaymentTermInstant, dueDate: PaymentTermDueDate, diff --git a/api/spec/src/billing/invoices/tax.tsp b/api/spec/src/billing/invoices/tax.tsp index e57ab0842..06efe2fe3 100644 --- a/api/spec/src/billing/invoices/tax.tsp +++ b/api/spec/src/billing/invoices/tax.tsp @@ -12,47 +12,50 @@ namespace Invoices; /** * TaxConfig stores the configuration for a tax line relative to an invoice line. */ -@friendlyName("BillingTaxItem") -model TaxItem { - @summary("Tax provider configuration.") +@friendlyName("InvoiceLineTaxItem") +model InvoiceLineTaxItem { + /** + * Tax provider configuration. + */ + @visibility("read") config?: TaxConfig; - @summary("Percent defines the percentage set manually or determined from the rate\nkey (calculated if rate present). A nil percent implies that this tax combo\nis **exempt** from tax.") + /** + * Percent defines the percentage set manually or determined from + * the rate key (calculated if rate present). A nil percent implies that + * this tax combo is **exempt** from tax.") + */ + @visibility("read") percent?: Percentage; - @summary("Some countries require an additional surcharge (calculated if rate present).") + /** + * Some countries require an additional surcharge (calculated if rate present). + */ + @visibility("read") surcharge?: Numeric; - @summary("Is the tax item inclusive or exclusive of the base amount.") - behavior?: TaxBehavior; + /** + * Is the tax item inclusive or exclusive of the base amount. + */ + @visibility("read") + behavior?: InvoiceLineTaxBehavior; } /** - * TaxBehavior details how the tax item is applied to the base amount. + * InvoiceLineTaxBehavior details how the tax item is applied to the base amount. * * Inclusive means the tax is included in the base amount. * Exclusive means the tax is added to the base amount. */ -@friendlyName("BillingTaxBehavior") -enum TaxBehavior { - @summary("Tax is included in the base amount.") +@friendlyName("InvoiceLineTaxBehavior") +enum InvoiceLineTaxBehavior { + /** + * Tax is included in the base amount. + */ inclusive: "inclusive", - @summary("Tax is added to the base amount.") + /** + * Tax is added to the base amount. + */ exclusive: "exclusive", } - -@pattern("^[A-Za-z0-9]+([\\.\\-\\/ _]?[A-Za-z0-9]+)*$") -@minLength(1) -@maxLength(32) -@friendlyName("BillingTaxIdentificationCode") -scalar TaxIdentificationCode extends string; - -/** - * Identity stores the details required to identify an entity for tax purposes in a specific country. - */ -@friendlyName("BillingTaxIdentity") -model TaxIdentity { - @summary("Normalized tax code shown on the original identity document.") - code?: TaxIdentificationCode; -} diff --git a/api/spec/src/billing/profile.tsp b/api/spec/src/billing/profile.tsp index a4001825b..49c0b5063 100644 --- a/api/spec/src/billing/profile.tsp +++ b/api/spec/src/billing/profile.tsp @@ -1,3 +1,5 @@ +import "../rest.tsp"; + using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -10,7 +12,7 @@ interface Profiles { * List all billing profiles */ @get - @operationId("billingListProfiles") + @operationId("listBillingProfiles") @summary("List billing profiles") @extension("x-internal", true) list( @@ -18,12 +20,12 @@ interface Profiles { includeArchived?: boolean = false, @query - expand?: ProfileExpand[], + expand?: BillingProfileExpand[], ...OpenMeter.QueryPagination, ...OpenMeter.QueryLimitOffset, - ...OpenMeter.QueryOrdering, - ): OpenMeter.PaginatedResponse | OpenMeter.CommonErrors; + ...OpenMeter.QueryOrdering, + ): OpenMeter.PaginatedResponse | OpenMeter.CommonErrors; /** * Create a new billing profile @@ -33,37 +35,42 @@ interface Profiles { */ @post @summary("Create a new billing profile") - @operationId("billingCreateProfile") + @operationId("createBillingProfile") @extension("x-internal", true) - create(@body profile: ProfileCreateInput): { + create(@body profile: BillingProfileCreate): { @statusCode _: 201; - @body profile: Profile; + @body profile: BillingProfile; } | OpenMeter.CommonErrors; /** - * Archive a billing profile + * Delete a billing profile */ @route("/{id}") @delete - @summary("Archive a billing profile") - @operationId("billingArchiveProfile") + @summary("Delete a billing profile") + @operationId("deleteBillingProfile") @extension("x-internal", true) - archive(@path id: string): { + delete( + @path + id: ULID, + ): { @statusCode _: 204; - } | OpenMeter.CommonErrors | OpenMeter.NotFoundError; + } | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** * Get a billing profile by ID */ @route("/{id}") @get - @summary("Get a billing profile by ID") - @operationId("billingGetProfile") + @summary("Get a billing profile") + @operationId("getBillingProfile") @extension("x-internal", true) get( - @path id: string, - @query expand?: ProfileExpand[], - ): Profile | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + @path + id: ULID, + + @query expand?: BillingProfileExpand[], + ): BillingProfile | OpenMeter.NotFoundError | OpenMeter.CommonErrors; /** * Update a billing profile @@ -71,21 +78,21 @@ interface Profiles { @route("/{id}") @put @summary("Update a billing profile") - @operationId("billingUpdateProfile") + @operationId("updateBillingProfile") @extension("x-internal", true) - update(@path id: string, @body profile: Profile): { - @statusCode _: 200; - @body profile: Profile; - } | OpenMeter.NotFoundError | OpenMeter.CommonErrors; + update( + @path + id: ULID, - // Customer overrides + @body profile: BillingProfileReplaceUpdate, + ): BillingProfile | OpenMeter.NotFoundError | OpenMeter.CommonErrors; } /** - * ProfileOrderBy specifies the ordering options for profiles + * BillingProfileOrderBy specifies the ordering options for profiles */ @friendlyName("BillingProfileOrderBy") -enum ProfileOrderBy { +enum BillingProfileOrderBy { createdAt: "createdAt", updatedAt: "updatedAt", default: "default", @@ -93,78 +100,131 @@ enum ProfileOrderBy { } /** - * ProfileExpand details what profile fields to expand + * BillingProfileExpand details what profile fields to expand */ @friendlyName("BillingProfileExpand") @extension("x-enum-varnames", ["apps", "all"]) -enum ProfileExpand { +enum BillingProfileExpand { apps: "apps", all: "*", } /** - * Profile represents a billing profile + * BillingProfile represents a billing profile */ @friendlyName("BillingProfile") -model Profile { - ...OmitProperties; +model BillingProfile { + ...global.Resource; /** - * When the resource was last updated. - * - * For updates this field must be set to the last update time to detect conflicts. + * The name and contact information for the supplier this billing profile represents */ - @summary("Last update time of the resource") - @visibility("read", "update") - updatedAt: DateTime; - - @summary("The name and contact information for the supplier this billing profile represents") - supplier: Invoices.Party; + @visibility("read", "create", "update") + supplier: Invoices.BillingParty; - @summary("The billing workflow settings for this profile") - workflow: Workflow; + /** + * The billing workflow settings for this profile + */ + @visibility("read") + workflow: BillingWorkflow; - @summary("The applications used by this billing profile") + /** + * The applications used by this billing profile. + * + * Expand settings govern if this includes the whole app object or just the ID references. + */ @visibility("read") - apps: ProfileAppsOrReference; + apps: BillingProfileAppsOrReference; - @summary("Is this the default profile?") + /** + * Is this the default profile? + */ + @visibility("read", "create", "update") default: boolean; } /** - * ProfileApps represents the applications used by a billing profile + * BillingProfileCreate represents the input for creating a billing profile + */ +@friendlyName("BillingProfileCreate") +model BillingProfileCreate + is Rest.Resource.ResourceCreateModel { + /** + * The billing workflow settings for this profile. + */ + @visibility("create") + workflow: Rest.Resource.ResourceCreateModel; + + /** + * The apps used by this billing profile. + */ + @visibility("create") + apps: BillingProfileAppsCreate; +} + +/** + * BillingProfileReplaceUpdate represents the input for updating a billing profile + * + * The apps field cannot be updated directly, if an app change is desired a new + * profile should be created. + */ +// Note: Rest.Resource.ResourceReplaceModel yields a BillingProfileReplaceUpdate that's why we +// need a different friendly name here. +@friendlyName("BillingProfileReplaceUpdateWithWorkflow") +model BillingProfileReplaceUpdate + is Rest.Resource.ResourceReplaceModel { + /** + * The billing workflow settings for this profile. + */ + @visibility("update") + workflow: BillingWorkflow; +} + +/** + * BillingProfileApps represents the applications used by a billing profile */ @friendlyName("BillingProfileApps") -model ProfileApps { +model BillingProfileApps { /* * The tax app used for this workflow */ + @visibility("read") tax: OpenMeter.App.App; /* * The invoicing app used for this workflow */ + @visibility("read") invoicing: OpenMeter.App.App; /* * The payment app used for this workflow */ + @visibility("read") payment: OpenMeter.App.App; } /** - * ProfileAppsReference represents the references (id, type) to the apps used by a billing profile + * BillingProfileAppReferences represents the references (id, type) to the apps used by a billing profile */ @friendlyName("BillingProfileAppReferences") -model ProfileAppReferences { - @summary("The tax app used for this workflow") +model BillingProfileAppReferences { + /** + * The tax app used for this workflow + */ + @visibility("read") tax: OpenMeter.App.AppReference; - @summary("The invoicing app used for this workflow") + /** + * The invoicing app used for this workflow + */ + @visibility("read") invoicing: OpenMeter.App.AppReference; - @summary("The payment app used for this workflow") + /** + * The payment app used for this workflow + */ + @visibility("read") payment: OpenMeter.App.AppReference; } @@ -173,135 +233,166 @@ model ProfileAppReferences { * for a billing profile. */ @friendlyName("BillingProfileAppsOrReference") -union ProfileAppsOrReference { - profileApps: ProfileApps, - profileAppReferences: ProfileAppReferences, +union BillingProfileAppsOrReference { + profileApps: BillingProfileApps, + profileAppReferences: BillingProfileAppReferences, } /** - * Workflow represents a billing workflow + * App reference type specifies the type of reference inside an app reference + */ +@friendlyName("BillingWorkflowAppReferenceType") +enum BillingWorkflowAppReferenceType { + appId: "app_id", + appType: "app_type", +} + +/** + * BillingProfileAppsCreate represents the input for creating a billing profile's apps + */ +@friendlyName("BillingProfileAppsCreate") +model BillingProfileAppsCreate { + /** + * The tax app used for this workflow + */ + @visibility("create") + @extension("x-go-type", "string") + tax: ULID | string; + + /** + * The invoicing app used for this workflow + */ + @extension("x-go-type", "string") + @visibility("create") + invoicing: ULID | string; + + /** + * The payment app used for this workflow + */ + @extension("x-go-type", "string") + @visibility("create") + payment: ULID | string; +} + +/** + * BillingWorkflow represents a billing workflow */ @friendlyName("BillingWorkflow") -model Workflow { +model BillingWorkflow { ...ResourceTimestamps; - ...WorkflowSettings; + ...BillingWorkflowSettings; /** * A unique identifier for the resource. */ @visibility("read") @example("01G65Z755AFWAKHE12NY0CQ9FH") - @summary("ID") id: ULID; } /** - * WorkflowSettings represents the settings for a billing workflow. + * BillingWorkflowSettings represents the settings for a billing workflow. */ @friendlyName("BillingWorkflowSettings") -model WorkflowSettings { - @summary("The collection settings for this workflow") - collection?: WorkflowCollectionSettings; +model BillingWorkflowSettings { + /** + * The collection settings for this workflow + */ + @visibility("read", "create", "update") + collection?: BillingWorkflowCollectionSettings; - @summary("The invoicing settings for this workflow") - invoicing?: WorkflowInvoicingSettings; + /** + * The invoicing settings for this workflow + */ + @visibility("read", "create", "update") + invoicing?: BillingWorkflowInvoicingSettings; - @summary("The payment settings for this workflow") - payment?: WorkflowPaymentSettings; + /** + * The payment settings for this workflow + */ + @visibility("read", "create", "update") + payment?: BillingWorkflowPaymentSettings; } /** * Workflow collection specifies how to collect the pending line items for an invoice */ @friendlyName("BillingWorkflowCollectionSettings") -model WorkflowCollectionSettings { - /** - * When to collect the pending line items into an invoice. - */ - - // TODO: make it an union type - alignment?: CollectionAlignment = CollectionAlignment.subscription; +model BillingWorkflowCollectionSettings { + alignment?: BillingWorkflowCollectionAlignment = #{ + type: BillingCollectionAlignment.subscription, + }; /** - * The interval for collecting the pending line items into an invoice. + * 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. */ @encode(DurationKnownEncoding.ISO8601) @example("P1D") + @visibility("read", "create", "update") interval?: string = "PT1H"; } /** - * WorkflowPaymentSettings represents the payment settings for a billing workflow - */ -@summary("Workflow payment settings") -@friendlyName("BillingWorkflowPaymentSettings") -model WorkflowPaymentSettings { - collectionMethod?: CollectionMethod = CollectionMethod.chargeAutomatically; -} - -/** - * App reference type specifies the type of reference inside an app reference + * BillingCollectionAlignment specifies when the pending line items should be collected into + * an invoice. */ -@friendlyName("BillingWorkflowAppReferenceType") -enum AppReferenceType { - appId: "app_id", - appType: "app_type", +@friendlyName("BillingCollectionAlignment") +@summary("Collection alignment") +enum BillingCollectionAlignment { + /** + * Align the collection to the start of the subscription period. + */ + subscription: "subscription", } /** - * AppIdOrType can be used to reference an app during creation only. + * The alignment for collecting the pending line items into an invoice. * - * This can be either an AppType or the ULID of an app. + * 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). */ -@friendlyName("BillingWorkflowAppIdOrType") -scalar AppIdOrType extends string; - -/** - * ProfileCreateInput represents the input for creating a billing profile - */ -@friendlyName("BillingProfileCreateInput") -model ProfileCreateInput { - ...OmitProperties; - apps: ProfileCreateAppsInput; +@friendlyName("BillingWorkflowCollectionAlignment") +@discriminator("type") +union BillingWorkflowCollectionAlignment { + subscription: BillingWorkflowCollectionAlignmentSubscription, } /** - * ProfileCreateAppsInput represents the input for creating a billing profile's apps + * BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items + * into an invoice. */ -@friendlyName("BillingProfileCreateAppsInput") -model ProfileCreateAppsInput { - @summary("The tax app used for this workflow") - tax: AppIdOrType; - - @summary("The invoicing app used for this workflow") - invoicing: AppIdOrType; - - @summary("The payment app used for this workflow") - payment: AppIdOrType; +@friendlyName("BillingWorkflowCollectionAlignmentSubscription") +model BillingWorkflowCollectionAlignmentSubscription { + @visibility("read", "create", "update") + type: BillingCollectionAlignment.subscription; } /** - * CollectionAlignment specifies when the pending line items should be collected into - * an invoice. + * BillingWorkflowPaymentSettings represents the payment settings for a billing workflow */ -@friendlyName("BillingWorkflowCollectionAlignment") -@summary("Collection alignment") -enum CollectionAlignment { +@summary("Workflow payment settings") +@friendlyName("BillingWorkflowPaymentSettings") +model BillingWorkflowPaymentSettings { /** - * Align the collection to the start of the subscription period. + * The payment method for the invoice. */ - subscription: "subscription", + @visibility("read", "create", "update") + collectionMethod?: CollectionMethod = CollectionMethod.chargeAutomatically; } /** - * WorkflowInvoice represents the invoice settings for a billing workflow + * BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow */ @summary("Workflow invoice settings") @friendlyName("BillingWorkflowInvoicingSettings") -model WorkflowInvoicingSettings { +model BillingWorkflowInvoicingSettings { /** * Whether to automatically issue the invoice after the draftPeriod has passed. */ + @visibility("read", "create", "update") autoAdvance?: boolean = true; /** @@ -309,6 +400,7 @@ model WorkflowInvoicingSettings { */ @encode(DurationKnownEncoding.ISO8601) @example("P1D") + @visibility("read", "create", "update") draftPeriod?: string = "P1D"; /** @@ -316,13 +408,14 @@ model WorkflowInvoicingSettings { */ @encode(DurationKnownEncoding.ISO8601) @example("P1D") + @visibility("read", "create", "update") dueAfter?: string = "P7D"; } /** * CollectionMethod specifies how the invoice should be collected (automatic vs manual) */ -@friendlyName("BillingWorkflowCollectionMethod") +@friendlyName("CollectionMethod") @summary("Collection method") enum CollectionMethod { chargeAutomatically: "charge_automatically", @@ -330,11 +423,11 @@ enum CollectionMethod { } /** - * LineResolution specifies how the line items should be resolved in the invoice + * BillingWorkflowLineResolution specifies how the line items should be resolved in the invoice */ @friendlyName("BillingWorkflowLineResolution") @summary("Item resolution") -enum LineResolution { +enum BillingWorkflowLineResolution { /** * Create line items for each day in the billing period. */ diff --git a/api/spec/src/types.tsp b/api/spec/src/types.tsp index b212f5ad7..c3a1f6498 100644 --- a/api/spec/src/types.tsp +++ b/api/spec/src/types.tsp @@ -328,3 +328,12 @@ scalar Percentage extends Numeric; */ @friendlyName("Unit") scalar Unit extends string; + +/** + * TaxIdentificationCode is a normalized tax code shown on the original identity document. + */ +@pattern("^[A-Za-z0-9]+([\\.\\-\\/ _]?[A-Za-z0-9]+)*$") +@minLength(1) +@maxLength(32) +@friendlyName("BillingTaxIdentificationCode") +scalar TaxIdentificationCode extends string; diff --git a/openmeter/billing/adapter/invoice.go b/openmeter/billing/adapter/invoice.go index e35714fd5..1f158e3c3 100644 --- a/openmeter/billing/adapter/invoice.go +++ b/openmeter/billing/adapter/invoice.go @@ -195,15 +195,15 @@ func (a *adapter) ListInvoices(ctx context.Context, input billing.ListInvoicesIn } switch input.OrderBy { - case api.BillingInvoiceOrderByCustomerName: + case api.InvoiceOrderByCustomerName: query = query.Order(billinginvoice.ByCustomerName(order...)) - case api.BillingInvoiceOrderByIssuedAt: + case api.InvoiceOrderByIssuedAt: query = query.Order(billinginvoice.ByIssuedAt(order...)) - case api.BillingInvoiceOrderByStatus: + case api.InvoiceOrderByStatus: query = query.Order(billinginvoice.ByStatus(order...)) - case api.BillingInvoiceOrderByUpdatedAt: + case api.InvoiceOrderByUpdatedAt: query = query.Order(billinginvoice.ByUpdatedAt(order...)) - case api.BillingInvoiceOrderByCreatedAt: + case api.InvoiceOrderByCreatedAt: fallthrough default: query = query.Order(billinginvoice.ByCreatedAt(order...)) diff --git a/openmeter/billing/entity/invoiceline.go b/openmeter/billing/entity/invoiceline.go index 799ba4d87..91fd9075f 100644 --- a/openmeter/billing/entity/invoiceline.go +++ b/openmeter/billing/entity/invoiceline.go @@ -57,7 +57,7 @@ func (InvoiceLineStatus) Values() []string { } // Period represents a time period, in billing the time period is always interpreted as -// [start, end) (i.e. start is inclusive, end is exclusive). +// [from, to) (i.e. from is inclusive, to is exclusive). type Period struct { Start time.Time `json:"start"` End time.Time `json:"end"` diff --git a/openmeter/billing/httpdriver/handler.go b/openmeter/billing/httpdriver/handler.go index 2453ab1bd..01e1d6722 100644 --- a/openmeter/billing/httpdriver/handler.go +++ b/openmeter/billing/httpdriver/handler.go @@ -21,7 +21,7 @@ type Handler interface { type ProfileHandler interface { CreateProfile() CreateProfileHandler GetProfile() GetProfileHandler - ArchiveProfile() ArchiveProfileHandler + DeleteProfile() DeleteProfileHandler UpdateProfile() UpdateProfileHandler ListProfiles() ListProfilesHandler } @@ -29,17 +29,20 @@ type ProfileHandler interface { type InvoiceLineHandler interface { CreateLineByCustomer() CreateLineByCustomerHandler GetLine() GetLineHandler + DeleteLine() DeleteLineHandler + UpdateLine() UpdateLineHandler } type InvoiceHandler interface { ListInvoices() ListInvoicesHandler - CreateInvoice() CreateInvoiceHandler + InvoicePendingLinesAction() InvoicePendingLinesActionHandler + DeleteInvoice() DeleteInvoiceHandler GetInvoice() GetInvoiceHandler ProgressInvoice(ProgressAction) ProgressInvoiceHandler // ConvertListInvoicesByCustomerToListInvoices converts the input parameters for listing invoices by customer, so that we // can use the same handler for both listing all invoices and listing invoices by customer. - ConvertListInvoicesByCustomerToListInvoices(customerID string, params api.BillingListInvoicesByCustomerParams) api.BillingListInvoicesParams + ConvertListInvoicesByCustomerToListInvoices(customerID string, params api.ListInvoicesByCustomerParams) api.ListInvoicesParams } type handler struct { diff --git a/openmeter/billing/httpdriver/invoice.go b/openmeter/billing/httpdriver/invoice.go index cc76f5d71..b091ecb73 100644 --- a/openmeter/billing/httpdriver/invoice.go +++ b/openmeter/billing/httpdriver/invoice.go @@ -24,7 +24,7 @@ var _ InvoiceHandler = (*handler)(nil) type ( ListInvoicesRequest = billing.ListInvoicesInput ListInvoicesResponse = api.InvoicePaginatedResponse - ListInvoicesParams = api.BillingListInvoicesParams + ListInvoicesParams = api.ListInvoicesParams ListInvoicesHandler httptransport.HandlerWithArgs[ListInvoicesRequest, ListInvoicesResponse, ListInvoicesParams] ) @@ -42,13 +42,13 @@ func (h *handler) ListInvoices() ListInvoicesHandler { Customers: lo.FromPtrOr(input.Customers, nil), Statuses: lo.Map( lo.FromPtrOr(input.Statuses, nil), - func(status api.BillingInvoiceStatus, _ int) string { + func(status api.InvoiceStatus, _ int) string { return string(status) }, ), ExtendedStatuses: lo.Map( lo.FromPtrOr(input.ExtendedStatuses, nil), - func(status api.BillingInvoiceExtendedStatus, _ int) billingentity.InvoiceStatus { + func(status string, _ int) billingentity.InvoiceStatus { return billingentity.InvoiceStatus(status) }, ), @@ -70,7 +70,7 @@ func (h *handler) ListInvoices() ListInvoicesHandler { } res := ListInvoicesResponse{ - Items: make([]api.BillingInvoice, 0, len(invoices.Items)), + Items: make([]api.Invoice, 0, len(invoices.Items)), Page: invoices.Page.PageNumber, PageSize: invoices.Page.PageSize, TotalCount: invoices.TotalCount, @@ -90,33 +90,33 @@ func (h *handler) ListInvoices() ListInvoicesHandler { commonhttp.JSONResponseEncoderWithStatus[ListInvoicesResponse](http.StatusOK), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingListLinvoices"), + httptransport.WithOperationName("ListInvoices"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) } type ( - CreateInvoiceRequest = billing.CreateInvoiceInput - CreateInvoiceResponse = []api.BillingInvoice - CreateInvoiceHandler httptransport.HandlerWithArgs[CreateInvoiceRequest, CreateInvoiceResponse, string] + InvoicePendingLinesActionRequest = billing.InvoicePendingLinesInput + InvoicePendingLinesActionResponse = []api.Invoice + InvoicePendingLinesActionHandler httptransport.HandlerWithArgs[InvoicePendingLinesActionRequest, InvoicePendingLinesActionResponse, string] ) -func (h *handler) CreateInvoice() CreateInvoiceHandler { +func (h *handler) InvoicePendingLinesAction() InvoicePendingLinesActionHandler { return httptransport.NewHandlerWithArgs( - func(ctx context.Context, r *http.Request, customerID string) (CreateInvoiceRequest, error) { - body := api.BillingCreateInvoiceJSONRequestBody{} + func(ctx context.Context, r *http.Request, customerID string) (InvoicePendingLinesActionRequest, error) { + body := api.InvoicePendingLinesActionInput{} if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { - return CreateInvoiceRequest{}, err + return InvoicePendingLinesActionRequest{}, err } ns, err := h.resolveNamespace(ctx) if err != nil { - return CreateInvoiceRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) + return InvoicePendingLinesActionRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) } - return CreateInvoiceRequest{ + return InvoicePendingLinesActionRequest{ Customer: customerentity.CustomerID{ ID: customerID, Namespace: ns, @@ -126,13 +126,13 @@ func (h *handler) CreateInvoice() CreateInvoiceHandler { AsOf: body.AsOf, }, nil }, - func(ctx context.Context, request CreateInvoiceRequest) (CreateInvoiceResponse, error) { - invoices, err := h.service.CreateInvoice(ctx, request) + func(ctx context.Context, request InvoicePendingLinesActionRequest) (InvoicePendingLinesActionResponse, error) { + invoices, err := h.service.InvoicePendingLines(ctx, request) if err != nil { return nil, err } - out := make([]api.BillingInvoice, 0, len(invoices)) + out := make([]api.Invoice, 0, len(invoices)) for _, invoice := range invoices { invoice, err := mapInvoiceToAPI(invoice) @@ -145,10 +145,10 @@ func (h *handler) CreateInvoice() CreateInvoiceHandler { return out, nil }, - commonhttp.JSONResponseEncoderWithStatus[CreateInvoiceResponse](http.StatusCreated), + commonhttp.JSONResponseEncoderWithStatus[InvoicePendingLinesActionResponse](http.StatusCreated), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingCreateInvoice"), + httptransport.WithOperationName("InvoicePendingLinesAction"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) @@ -156,11 +156,12 @@ func (h *handler) CreateInvoice() CreateInvoiceHandler { type ( GetInvoiceRequest = billing.GetInvoiceByIdInput - GetInvoiceResponse = api.BillingInvoice + GetInvoiceResponse = api.Invoice GetInvoiceParams struct { - CustomerID string - InvoiceID string - Expand []api.BillingInvoiceExpand + CustomerID string + InvoiceID string + Expand []api.InvoiceExpand + IncludeDeletedLines bool } GetInvoiceHandler httptransport.HandlerWithArgs[GetInvoiceRequest, GetInvoiceResponse, GetInvoiceParams] ) @@ -185,7 +186,7 @@ func (h *handler) GetInvoice() GetInvoiceHandler { ID: params.InvoiceID, Namespace: ns, }, - Expand: mapInvoiceExpandToEntity(params.Expand), + Expand: mapInvoiceExpandToEntity(params.Expand).SetDeletedLines(params.IncludeDeletedLines), }, nil }, func(ctx context.Context, request GetInvoiceRequest) (GetInvoiceResponse, error) { @@ -199,7 +200,7 @@ func (h *handler) GetInvoice() GetInvoiceHandler { commonhttp.JSONResponseEncoderWithStatus[GetInvoiceResponse](http.StatusOK), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingGetInvoice"), + httptransport.WithOperationName("GetInvoice"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) @@ -220,9 +221,9 @@ var ( InvoiceProgressActionAdvance, } invoiceProgressOperationNames = map[ProgressAction]string{ - InvoiceProgressActionApprove: "Approve", - InvoiceProgressActionRetry: "Retry", - InvoiceProgressActionAdvance: "Advance", + InvoiceProgressActionApprove: "ApproveInvoiceAction", + InvoiceProgressActionRetry: "RetryInvoiceAction", + InvoiceProgressActionAdvance: "AdvanceInvoiceAction", } ) @@ -230,7 +231,7 @@ type ( ProgressInvoiceRequest struct { Invoice billingentity.InvoiceID } - ProgressInvoiceResponse = api.BillingInvoice + ProgressInvoiceResponse = api.Invoice ProgressInvoiceParams struct { CustomerID string InvoiceID string @@ -295,8 +296,55 @@ func (h *handler) ProgressInvoice(action ProgressAction) ProgressInvoiceHandler ) } -func (h *handler) ConvertListInvoicesByCustomerToListInvoices(customerID string, params api.BillingListInvoicesByCustomerParams) api.BillingListInvoicesParams { - return api.BillingListInvoicesParams{ +type ( + DeleteInvoiceRequest = billing.DeleteInvoiceInput + DeleteInvoiceResponse = struct{} + DeleteInvoiceParams struct { + CustomerID string + InvoiceID string + } + DeleteInvoiceHandler httptransport.HandlerWithArgs[DeleteInvoiceRequest, DeleteInvoiceResponse, DeleteInvoiceParams] +) + +func (h *handler) DeleteInvoice() DeleteInvoiceHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, params DeleteInvoiceParams) (DeleteInvoiceRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { + return DeleteInvoiceRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) + } + + if err := h.service.ValidateInvoiceOwnership(ctx, billing.ValidateInvoiceOwnershipInput{ + Namespace: ns, + InvoiceID: params.InvoiceID, + CustomerID: params.CustomerID, + }); err != nil { + return DeleteInvoiceRequest{}, billingentity.NotFoundError{Err: err} + } + + return billingentity.InvoiceID{ + ID: params.InvoiceID, + Namespace: ns, + }, nil + }, + func(ctx context.Context, request DeleteInvoiceRequest) (DeleteInvoiceResponse, error) { + if err := h.service.DeleteInvoice(ctx, request); err != nil { + return DeleteInvoiceResponse{}, err + } + + return DeleteInvoiceResponse{}, nil + }, + commonhttp.JSONResponseEncoderWithStatus[DeleteInvoiceResponse](http.StatusNoContent), + httptransport.AppendOptions( + h.options, + httptransport.WithOperationName("DeleteInvoice"), + httptransport.WithErrorEncoder(errorEncoder()), + )..., + ) +} + +func (h *handler) ConvertListInvoicesByCustomerToListInvoices(customerID string, params api.ListInvoicesByCustomerParams) api.ListInvoicesParams { + return api.ListInvoicesParams{ Customers: lo.ToPtr([]string{customerID}), Statuses: params.Statuses, @@ -315,7 +363,7 @@ func (h *handler) ConvertListInvoicesByCustomerToListInvoices(customerID string, } } -func mapInvoiceToAPI(invoice billingentity.Invoice) (api.BillingInvoice, error) { +func mapInvoiceToAPI(invoice billingentity.Invoice) (api.Invoice, error) { var apps *api.BillingProfileAppsOrReference // If the workflow is not expanded we won't have this @@ -325,17 +373,17 @@ func mapInvoiceToAPI(invoice billingentity.Invoice) (api.BillingInvoice, error) if invoice.Workflow.Apps != nil { apps, err = mapProfileAppsToAPI(invoice.Workflow.Apps) if err != nil { - return api.BillingInvoice{}, fmt.Errorf("failed to map profile apps to API: %w", err) + return api.Invoice{}, fmt.Errorf("failed to map profile apps to API: %w", err) } } else { apps, err = mapProfileAppReferencesToAPI(&invoice.Workflow.AppReferences) if err != nil { - return api.BillingInvoice{}, fmt.Errorf("failed to map profile app references to API: %w", err) + return api.Invoice{}, fmt.Errorf("failed to map profile app references to API: %w", err) } } } - out := api.BillingInvoice{ + out := api.Invoice{ Id: invoice.ID, CreatedAt: invoice.CreatedAt, @@ -354,26 +402,30 @@ func mapInvoiceToAPI(invoice billingentity.Invoice) (api.BillingInvoice, error) Description: invoice.Description, Metadata: lo.EmptyableToPtr(invoice.Metadata), - Status: api.BillingInvoiceStatus(invoice.Status.ShortStatus()), - StatusDetails: api.BillingInvoiceStatusDetails{ + Status: api.InvoiceStatus(invoice.Status.ShortStatus()), + StatusDetails: api.InvoiceStatusDetails{ Failed: invoice.StatusDetails.Failed, Immutable: invoice.StatusDetails.Immutable, - ExtendedStatus: api.BillingInvoiceExtendedStatus(invoice.Status), + ExtendedStatus: string(invoice.Status), - AvailableActions: lo.Map(invoice.StatusDetails.AvailableActions, func(a billingentity.InvoiceAction, _ int) api.BillingInvoiceAction { - return api.BillingInvoiceAction(a) + AvailableActions: lo.Map(invoice.StatusDetails.AvailableActions, func(a billingentity.InvoiceAction, _ int) api.InvoiceAction { + return api.InvoiceAction(a) }), }, Supplier: mapSupplierContactToAPI(invoice.Supplier), Totals: mapTotalsToAPI(invoice.Totals), // TODO[OM-943]: Implement Payment: nil, - Type: api.BillingInvoiceType(invoice.Type), + Type: api.InvoiceType(invoice.Type), ValidationIssues: lo.EmptyableToPtr( - lo.Map(invoice.ValidationIssues, func(v billingentity.ValidationIssue, _ int) api.BillingValidationIssue { - return api.BillingValidationIssue{ - // TODO[later]: CreatedAt, UpdatedAt - Severity: api.BillingValidationIssueSeverity(v.Severity), + lo.Map(invoice.ValidationIssues, func(v billingentity.ValidationIssue, _ int) api.ValidationIssue { + return api.ValidationIssue{ + Id: v.ID, + CreatedAt: v.CreatedAt, + UpdatedAt: v.UpdatedAt, + DeletedAt: v.DeletedAt, + + Severity: api.ValidationIssueSeverity(v.Severity), Message: v.Message, Code: lo.EmptyableToPtr(v.Code), Component: string(v.Component), @@ -383,7 +435,7 @@ func mapInvoiceToAPI(invoice billingentity.Invoice) (api.BillingInvoice, error) } if invoice.Workflow != nil { - out.Workflow = &api.BillingInvoiceWorkflowSettings{ + out.Workflow = &api.InvoiceWorkflowSettings{ Apps: apps, SourceBillingProfileID: invoice.Workflow.SourceBillingProfileID, Workflow: mapWorkflowConfigSettingsToAPI(invoice.Workflow.Config), @@ -391,16 +443,16 @@ func mapInvoiceToAPI(invoice billingentity.Invoice) (api.BillingInvoice, error) } } - outLines, err := slicesx.MapWithErr(invoice.Lines.OrEmpty(), func(line *billingentity.Line) (api.BillingInvoiceLine, error) { + outLines, err := slicesx.MapWithErr(invoice.Lines.OrEmpty(), func(line *billingentity.Line) (api.InvoiceLine, error) { mappedLine, err := mapBillingLineToAPI(line) if err != nil { - return api.BillingInvoiceLine{}, fmt.Errorf("failed to map billing line[%s] to API: %w", line.ID, err) + return api.InvoiceLine{}, fmt.Errorf("failed to map billing line[%s] to API: %w", line.ID, err) } return mappedLine, nil }) if err != nil { - return api.BillingInvoice{}, err + return api.Invoice{}, err } if len(outLines) > 0 { @@ -410,14 +462,15 @@ func mapInvoiceToAPI(invoice billingentity.Invoice) (api.BillingInvoice, error) return out, nil } -func mapPeriodToAPI(p *billingentity.Period) *api.BillingPeriod { +func mapPeriodToAPI(p *billingentity.Period) *api.Period { if p == nil { return nil } - return &api.BillingPeriod{ - Start: p.Start, - End: p.End, + // TODO[later]: let's use a common model for this + return &api.Period{ + From: p.Start, + To: p.End, } } @@ -441,28 +494,24 @@ func mapInvoiceCustomerToAPI(c billingentity.InvoiceCustomer) api.BillingParty { } } -func mapInvoiceExpandToEntity(expand []api.BillingInvoiceExpand) billingentity.InvoiceExpand { +func mapInvoiceExpandToEntity(expand []api.InvoiceExpand) billingentity.InvoiceExpand { if len(expand) == 0 { return billingentity.InvoiceExpand{} } - if slices.Contains(expand, api.BillingInvoiceExpandAll) { - return billingentity.InvoiceExpand{ - Lines: true, - Preceding: true, - WorkflowApps: true, - } + if slices.Contains(expand, api.InvoiceExpandAll) { + return billingentity.InvoiceExpandAll } return billingentity.InvoiceExpand{ - Lines: slices.Contains(expand, api.BillingInvoiceExpandLines), - Preceding: slices.Contains(expand, api.BillingInvoiceExpandPreceding), - WorkflowApps: slices.Contains(expand, api.BillingInvoiceExpandWorkflowApps), + Lines: slices.Contains(expand, api.InvoiceExpandLines), + Preceding: slices.Contains(expand, api.InvoiceExpandPreceding), + WorkflowApps: slices.Contains(expand, api.InvoiceExpandWorkflowApps), } } -func mapTotalsToAPI(t billingentity.Totals) api.BillingInvoiceTotals { - return api.BillingInvoiceTotals{ +func mapTotalsToAPI(t billingentity.Totals) api.InvoiceTotals { + return api.InvoiceTotals{ Amount: t.Amount.String(), ChargesTotal: t.ChargesTotal.String(), DiscountsTotal: t.DiscountsTotal.String(), diff --git a/openmeter/billing/httpdriver/invoiceline.go b/openmeter/billing/httpdriver/invoiceline.go index c088b911a..53913705c 100644 --- a/openmeter/billing/httpdriver/invoiceline.go +++ b/openmeter/billing/httpdriver/invoiceline.go @@ -7,6 +7,7 @@ import ( "github.com/alpacahq/alpacadecimal" "github.com/samber/lo" + "github.com/samber/mo" "github.com/openmeterio/openmeter/api" "github.com/openmeterio/openmeter/openmeter/billing" @@ -22,16 +23,16 @@ var _ InvoiceLineHandler = (*handler)(nil) type ( CreateLineByCustomerRequest = billing.CreateInvoiceLinesInput - CreateLineByCustomerResponse = api.BillingInvoiceLines + CreateLineByCustomerResponse = []api.InvoiceLine CreateLineByCustomerHandler httptransport.HandlerWithArgs[CreateLineByCustomerRequest, CreateLineByCustomerResponse, string] ) func (h *handler) CreateLineByCustomer() CreateLineByCustomerHandler { return httptransport.NewHandlerWithArgs( func(ctx context.Context, r *http.Request, customerID string) (CreateLineByCustomerRequest, error) { - body := api.BillingCreateLineByCustomerJSONRequestBody{} + lines := []api.InvoiceLineCreate{} - if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { + if err := commonhttp.JSONRequestBodyDecoder(r, &lines); err != nil { return CreateLineByCustomerRequest{}, fmt.Errorf("failed to decode request body: %w", err) } @@ -42,24 +43,25 @@ func (h *handler) CreateLineByCustomer() CreateLineByCustomerHandler { return CreateLineByCustomerRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) } - if body.Lines == nil || len(*body.Lines) == 0 { + if len(lines) == 0 { return CreateLineByCustomerRequest{}, billingentity.ValidationError{ Err: fmt.Errorf("no lines provided"), } } - lines := make([]billingentity.Line, 0, len(*body.Lines)) - for _, line := range *body.Lines { - line, err := mapCreateLineToEntity(line, ns) + + lineEntities := make([]billingentity.Line, 0, len(lines)) + for _, line := range lines { + lineEntity, err := mapCreateLineToEntity(line, ns) if err != nil { return CreateLineByCustomerRequest{}, fmt.Errorf("failed to map line: %w", err) } - lines = append(lines, line) + lineEntities = append(lineEntities, lineEntity) } return CreateLineByCustomerRequest{ CustomerID: customerID, Namespace: ns, - Lines: lines, + Lines: lineEntities, }, nil }, func(ctx context.Context, request CreateLineByCustomerRequest) (CreateLineByCustomerResponse, error) { @@ -68,16 +70,14 @@ func (h *handler) CreateLineByCustomer() CreateLineByCustomerHandler { return CreateLineByCustomerResponse{}, fmt.Errorf("failed to create invoice lines: %w", err) } - res := CreateLineByCustomerResponse{ - Lines: make([]api.BillingInvoiceLine, 0, len(lines)), - } + res := make(CreateLineByCustomerResponse, 0, len(lines)) for _, line := range lines { line, err := mapBillingLineToAPI(line) if err != nil { return CreateLineByCustomerResponse{}, fmt.Errorf("failed to map line: %w", err) } - res.Lines = append(res.Lines, line) + res = append(res, line) } return res, nil @@ -85,7 +85,7 @@ func (h *handler) CreateLineByCustomer() CreateLineByCustomerHandler { commonhttp.JSONResponseEncoderWithStatus[CreateLineByCustomerResponse](http.StatusCreated), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingCreateLineByCustomer"), + httptransport.WithOperationName("CreateInvoiceLineByCustomer"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) @@ -96,7 +96,7 @@ type ( GetInvoiceLineInput billing.GetInvoiceLineInput CustomerID string } - GetLineResponse = api.BillingInvoiceLine + GetLineResponse = api.InvoiceLine GetLineParams struct { CustomerID string InvoiceID string @@ -141,13 +141,114 @@ func (h *handler) GetLine() GetLineHandler { commonhttp.JSONResponseEncoderWithStatus[GetLineResponse](http.StatusOK), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingGetLine"), + httptransport.WithOperationName("GetInvoiceLine"), + httptransport.WithErrorEncoder(errorEncoder()), + )..., + ) +} + +type ( + DeleteLineRequest = billing.DeleteInvoiceLineInput + DeleteLineParams struct { + CustomerID string + InvoiceID string + LineID string + } + DeleteLineHandler = httptransport.HandlerWithArgs[DeleteLineRequest, struct{}, DeleteLineParams] +) + +func (h *handler) DeleteLine() DeleteLineHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, params DeleteLineParams) (DeleteLineRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { + return DeleteLineRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) + } + + if err := h.service.ValidateLineOwnership(ctx, billing.ValidateLineOwnershipInput{ + Namespace: ns, + CustomerID: params.CustomerID, + LineID: params.LineID, + InvoiceID: params.InvoiceID, + }); err != nil { + return DeleteLineRequest{}, billingentity.NotFoundError{Err: err} + } + + return DeleteLineRequest{ + Namespace: ns, + ID: params.LineID, + }, nil + }, + func(ctx context.Context, request DeleteLineRequest) (struct{}, error) { + if err := h.service.DeleteInvoiceLine(ctx, request); err != nil { + return struct{}{}, fmt.Errorf("failed to delete invoice line: %w", err) + } + + return struct{}{}, nil + }, + commonhttp.JSONResponseEncoderWithStatus[struct{}](http.StatusNoContent), + httptransport.AppendOptions( + h.options, + httptransport.WithOperationName("DeleteInvoiceLine"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) } -func mapCreateLineToEntity(line api.BillingInvoiceLineCreateItem, ns string) (billingentity.Line, error) { +type ( + UpdateLineRequest = billing.UpdateInvoiceLineInput + UpdateLineResponse = api.InvoiceLine + UpdateLineParams struct { + CustomerID string + InvoiceID string + LineID string + } + UpdateLineHandler = httptransport.HandlerWithArgs[UpdateLineRequest, UpdateLineResponse, UpdateLineParams] +) + +func (h *handler) UpdateLine() UpdateLineHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, params UpdateLineParams) (UpdateLineRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { + return UpdateLineRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) + } + + if err := h.service.ValidateLineOwnership(ctx, billing.ValidateLineOwnershipInput{ + Namespace: ns, + CustomerID: params.CustomerID, + LineID: params.LineID, + InvoiceID: params.InvoiceID, + }); err != nil { + return UpdateLineRequest{}, billingentity.NotFoundError{Err: err} + } + + line := api.InvoiceLineReplaceUpdate{} + + if err := commonhttp.JSONRequestBodyDecoder(r, &line); err != nil { + return UpdateLineRequest{}, fmt.Errorf("failed to decode request body: %w", err) + } + + return mapUpdateLineRequestToEntity(ns, params, line) + }, + func(ctx context.Context, request UpdateLineRequest) (UpdateLineResponse, error) { + line, err := h.service.UpdateInvoiceLine(ctx, request) + if err != nil { + return UpdateLineResponse{}, fmt.Errorf("failed to update invoice line: %w", err) + } + + return mapBillingLineToAPI(line) + }, + commonhttp.JSONResponseEncoderWithStatus[UpdateLineResponse](http.StatusOK), + httptransport.AppendOptions( + h.options, + httptransport.WithOperationName("UpdateInvoiceLine"), + httptransport.WithErrorEncoder(errorEncoder()), + )..., + ) +} + +func mapCreateLineToEntity(line api.InvoiceLineCreate, ns string) (billingentity.Line, error) { // This should not fail, and we would have at least the discriminator unmarshaled discriminator, err := line.Discriminator() if err != nil { @@ -155,14 +256,14 @@ func mapCreateLineToEntity(line api.BillingInvoiceLineCreateItem, ns string) (bi } switch discriminator { - case string(api.BillingFlatFeeLineCreateItemTypeFlatFee): - fee, err := line.AsBillingFlatFeeLineCreateItem() + case string(api.InvoiceFlatFeeLineTypeFlatFee): + fee, err := line.AsInvoiceFlatFeeLineCreate() if err != nil { return billingentity.Line{}, fmt.Errorf("failed to map fee line: %w", err) } return mapCreateFlatFeeLineToEntity(fee, ns) - case string(api.BillingUsageBasedLineCreateItemTypeUsageBased): - usageBased, err := line.AsBillingUsageBasedLineCreateItem() + case string(api.InvoiceUsageBasedLineTypeUsageBased): + usageBased, err := line.AsInvoiceUsageBasedLineCreate() if err != nil { return billingentity.Line{}, fmt.Errorf("failed to map usage based line: %w", err) } @@ -172,7 +273,7 @@ func mapCreateLineToEntity(line api.BillingInvoiceLineCreateItem, ns string) (bi } } -func mapCreateFlatFeeLineToEntity(line api.BillingFlatFeeLineCreateItem, ns string) (billingentity.Line, error) { +func mapCreateFlatFeeLineToEntity(line api.InvoiceFlatFeeLineCreate, ns string) (billingentity.Line, error) { qty, err := alpacadecimal.NewFromString(line.Quantity) if err != nil { return billingentity.Line{}, fmt.Errorf("failed to map quantity: %w", err) @@ -201,8 +302,8 @@ func mapCreateFlatFeeLineToEntity(line api.BillingFlatFeeLineCreateItem, ns stri Status: billingentity.InvoiceLineStatusValid, // This is not settable from outside Currency: currencyx.Code(line.Currency), Period: billingentity.Period{ - Start: line.Period.Start, - End: line.Period.End, + Start: line.Period.From, + End: line.Period.To, }, InvoiceAt: line.InvoiceAt, @@ -216,7 +317,7 @@ func mapCreateFlatFeeLineToEntity(line api.BillingFlatFeeLineCreateItem, ns stri }, nil } -func mapCreateUsageBasedLineToEntity(line api.BillingUsageBasedLineCreateItem, ns string) (billingentity.Line, error) { +func mapCreateUsageBasedLineToEntity(line api.InvoiceUsageBasedLineCreate, ns string) (billingentity.Line, error) { invoiceId := "" if line.Invoice != nil { invoiceId = line.Invoice.Id @@ -240,8 +341,8 @@ func mapCreateUsageBasedLineToEntity(line api.BillingUsageBasedLineCreateItem, n Status: billingentity.InvoiceLineStatusValid, // This is not settable from outside Currency: currencyx.Code(line.Currency), Period: billingentity.Period{ - Start: line.Period.Start, - End: line.Period.End, + Start: line.Period.From, + End: line.Period.To, }, InvoiceAt: line.InvoiceAt, @@ -254,6 +355,102 @@ func mapCreateUsageBasedLineToEntity(line api.BillingUsageBasedLineCreateItem, n }, nil } +func mapUpdateLineRequestToEntity(ns string, params UpdateLineParams, line api.InvoiceLineReplaceUpdate) (billing.UpdateInvoiceLineInput, error) { + // This should not fail, and we would have at least the discriminator unmarshaled + discriminator, err := line.Discriminator() + if err != nil { + return billing.UpdateInvoiceLineInput{}, fmt.Errorf("failed to get type discriminator: %w", err) + } + + switch discriminator { + case string(api.InvoiceFlatFeeLineTypeFlatFee): + fee, err := line.AsInvoiceFlatFeeLineReplaceUpdate() + if err != nil { + return billing.UpdateInvoiceLineInput{}, fmt.Errorf("failed to map fee line: %w", err) + } + return mapUpdateFlatFeeLineToEntity(ns, params, fee) + case string(api.InvoiceUsageBasedLineTypeUsageBased): + usageBased, err := line.AsInvoiceUsageBasedLineReplaceUpdate() + if err != nil { + return billing.UpdateInvoiceLineInput{}, fmt.Errorf("failed to map usage based line: %w", err) + } + return mapUpdateUsageBasedLineToEntity(ns, params, usageBased) + default: + return billing.UpdateInvoiceLineInput{}, fmt.Errorf("unsupported type: %s", discriminator) + } +} + +func mapUpdateFlatFeeLineToEntity(ns string, params UpdateLineParams, line api.InvoiceFlatFeeLineReplaceUpdate) (billing.UpdateInvoiceLineInput, error) { + perUnitAmount, err := alpacadecimal.NewFromString(line.PerUnitAmount) + if err != nil { + return billing.UpdateInvoiceLineInput{}, billingentity.ValidationError{ + Err: fmt.Errorf("failed to parse perUnitAmount: %w", err), + } + } + + qty, err := alpacadecimal.NewFromString(line.Quantity) + if err != nil { + return billing.UpdateInvoiceLineInput{}, billingentity.ValidationError{ + Err: fmt.Errorf("failed to parse quantity: %w", err), + } + } + + return billing.UpdateInvoiceLineInput{ + Line: billingentity.LineID{ + Namespace: ns, + ID: params.LineID, + }, + Type: billingentity.InvoiceLineTypeFee, + + LineBase: billing.UpdateInvoiceLineBaseInput{ + InvoiceAt: mo.Some(line.InvoiceAt), + Metadata: mo.Some(lo.FromPtrOr(line.Metadata, map[string]string{})), + Name: mo.Some(line.Name), + Period: mo.Some(billingentity.Period{ + Start: line.Period.From, + End: line.Period.To, + }), + TaxConfig: mo.Some(mapTaxConfigToEntity(line.TaxConfig)), + }, + + FlatFee: billing.UpdateInvoiceLineFlatFeeInput{ + PerUnitAmount: mo.Some(perUnitAmount), + Quantity: mo.Some(qty), + PaymentTerm: mo.Some(productcatalog.PaymentTermType(lo.FromPtrOr(line.PaymentTerm, api.PricePaymentTermInArrears))), + }, + }, nil +} + +func mapUpdateUsageBasedLineToEntity(ns string, params UpdateLineParams, line api.InvoiceUsageBasedLineReplaceUpdate) (billing.UpdateInvoiceLineInput, error) { + price, err := planhttpdriver.AsPrice(line.Price) + if err != nil { + return billing.UpdateInvoiceLineInput{}, fmt.Errorf("failed to map price: %w", err) + } + + return billing.UpdateInvoiceLineInput{ + Line: billingentity.LineID{ + Namespace: ns, + ID: params.LineID, + }, + Type: billingentity.InvoiceLineTypeUsageBased, + + LineBase: billing.UpdateInvoiceLineBaseInput{ + InvoiceAt: mo.Some(line.InvoiceAt), + Metadata: mo.Some(lo.FromPtrOr(line.Metadata, map[string]string{})), + Name: mo.Some(line.Name), + Period: mo.Some(billingentity.Period{ + Start: line.Period.From, + End: line.Period.To, + }), + TaxConfig: mo.Some(mapTaxConfigToEntity(line.TaxConfig)), + }, + + UsageBased: billing.UpdateInvoiceLineUsageBasedInput{ + Price: price, + }, + }, nil +} + func mapTaxConfigToEntity(tc *api.TaxConfig) *billingentity.TaxConfig { if tc == nil { return nil @@ -270,25 +467,25 @@ func mapTaxConfigToAPI(to *billingentity.TaxConfig) *api.TaxConfig { return lo.ToPtr(planhttpdriver.FromTaxConfig(*to)) } -func mapBillingLineToAPI(line *billingentity.Line) (api.BillingInvoiceLine, error) { +func mapBillingLineToAPI(line *billingentity.Line) (api.InvoiceLine, error) { switch line.Type { case billingentity.InvoiceLineTypeFee: return mapFeeLineToAPI(line) case billingentity.InvoiceLineTypeUsageBased: return mapUsageBasedLineToAPI(line) default: - return api.BillingInvoiceLine{}, fmt.Errorf("unsupported type: %s", line.Type) + return api.InvoiceLine{}, fmt.Errorf("unsupported type: %s", line.Type) } } -func mapChildLinesToAPI(optChildren billingentity.LineChildren) (*[]api.BillingInvoiceLine, error) { +func mapChildLinesToAPI(optChildren billingentity.LineChildren) (*[]api.InvoiceLine, error) { if optChildren.IsAbsent() { return nil, nil } children := optChildren.OrEmpty() - out := make([]api.BillingInvoiceLine, 0, len(children)) + out := make([]api.InvoiceLine, 0, len(children)) for _, child := range children { mappedLine, err := mapBillingLineToAPI(child) @@ -301,14 +498,14 @@ func mapChildLinesToAPI(optChildren billingentity.LineChildren) (*[]api.BillingI return &out, nil } -func mapFeeLineToAPI(line *billingentity.Line) (api.BillingInvoiceLine, error) { +func mapFeeLineToAPI(line *billingentity.Line) (api.InvoiceLine, error) { children, err := mapChildLinesToAPI(line.Children) if err != nil { - return api.BillingInvoiceLine{}, fmt.Errorf("failed to map children: %w", err) + return api.InvoiceLine{}, fmt.Errorf("failed to map children: %w", err) } - feeLine := api.BillingFlatFeeLine{ - Type: api.BillingFlatFeeLineTypeFlatFee, + feeLine := api.InvoiceFlatFeeLine{ + Type: api.InvoiceFlatFeeLineTypeFlatFee, Id: line.ID, CreatedAt: line.CreatedAt, @@ -317,19 +514,19 @@ func mapFeeLineToAPI(line *billingentity.Line) (api.BillingInvoiceLine, error) { InvoiceAt: line.InvoiceAt, Currency: string(line.Currency), - Status: api.BillingLineStatus(line.Status), + Status: api.InvoiceLineStatus(line.Status), Description: line.Description, Name: line.Name, - Invoice: &api.BillingInvoiceReference{ + Invoice: &api.InvoiceReference{ Id: line.InvoiceID, }, Metadata: lo.EmptyableToPtr(line.Metadata), - Period: api.BillingPeriod{ - Start: line.Period.Start, - End: line.Period.End, + Period: api.Period{ + From: line.Period.Start, + To: line.Period.End, }, PerUnitAmount: line.FlatFee.PerUnitAmount.String(), @@ -341,28 +538,28 @@ func mapFeeLineToAPI(line *billingentity.Line) (api.BillingInvoiceLine, error) { Children: children, } - out := api.BillingInvoiceLine{} - err = out.FromBillingFlatFeeLine(feeLine) + out := api.InvoiceLine{} + err = out.FromInvoiceFlatFeeLine(feeLine) if err != nil { - return api.BillingInvoiceLine{}, fmt.Errorf("failed to map fee line: %w", err) + return api.InvoiceLine{}, fmt.Errorf("failed to map fee line: %w", err) } return out, nil } -func mapUsageBasedLineToAPI(line *billingentity.Line) (api.BillingInvoiceLine, error) { +func mapUsageBasedLineToAPI(line *billingentity.Line) (api.InvoiceLine, error) { price, err := mapPriceToAPI(line.UsageBased.Price) if err != nil { - return api.BillingInvoiceLine{}, fmt.Errorf("failed to map price: %w", err) + return api.InvoiceLine{}, fmt.Errorf("failed to map price: %w", err) } children, err := mapChildLinesToAPI(line.Children) if err != nil { - return api.BillingInvoiceLine{}, fmt.Errorf("failed to map children: %w", err) + return api.InvoiceLine{}, fmt.Errorf("failed to map children: %w", err) } - ubpLine := api.BillingUsageBasedLine{ - Type: api.BillingUsageBasedLineTypeUsageBased, + ubpLine := api.InvoiceUsageBasedLine{ + Type: api.InvoiceUsageBasedLineTypeUsageBased, Id: line.ID, CreatedAt: line.CreatedAt, @@ -371,19 +568,19 @@ func mapUsageBasedLineToAPI(line *billingentity.Line) (api.BillingInvoiceLine, e InvoiceAt: line.InvoiceAt, Currency: string(line.Currency), - Status: api.BillingLineStatus(line.Status), + Status: api.InvoiceLineStatus(line.Status), Description: line.Description, Name: line.Name, - Invoice: &api.BillingInvoiceReference{ + Invoice: &api.InvoiceReference{ Id: line.InvoiceID, }, Metadata: lo.EmptyableToPtr(line.Metadata), - Period: api.BillingPeriod{ - Start: line.Period.Start, - End: line.Period.End, + Period: api.Period{ + From: line.Period.Start, + To: line.Period.End, }, TaxConfig: mapTaxConfigToAPI(line.TaxConfig), @@ -397,23 +594,23 @@ func mapUsageBasedLineToAPI(line *billingentity.Line) (api.BillingInvoiceLine, e Totals: mapTotalsToAPI(line.Totals), } - out := api.BillingInvoiceLine{} + out := api.InvoiceLine{} - if err := out.FromBillingUsageBasedLine(ubpLine); err != nil { - return api.BillingInvoiceLine{}, fmt.Errorf("failed to map fee line: %w", err) + if err := out.FromInvoiceUsageBasedLine(ubpLine); err != nil { + return api.InvoiceLine{}, fmt.Errorf("failed to map fee line: %w", err) } return out, nil } -func mapDiscountsToAPI(optDiscounts billingentity.LineDiscounts) *[]api.BillingLineDiscount { +func mapDiscountsToAPI(optDiscounts billingentity.LineDiscounts) *[]api.InvoiceLineDiscount { if optDiscounts.IsAbsent() { return nil } discounts := optDiscounts.OrEmpty() - out := make([]api.BillingLineDiscount, 0, len(discounts)) + out := make([]api.InvoiceLineDiscount, 0, len(discounts)) for _, discount := range discounts { out = append(out, mapDiscountToAPI(discount)) @@ -422,8 +619,8 @@ func mapDiscountsToAPI(optDiscounts billingentity.LineDiscounts) *[]api.BillingL return &out } -func mapDiscountToAPI(discount billingentity.LineDiscount) api.BillingLineDiscount { - return api.BillingLineDiscount{ +func mapDiscountToAPI(discount billingentity.LineDiscount) api.InvoiceLineDiscount { + return api.InvoiceLineDiscount{ Id: discount.ID, CreatedAt: discount.CreatedAt, diff --git a/openmeter/billing/httpdriver/profile.go b/openmeter/billing/httpdriver/profile.go index 36df43259..ee61d94ca 100644 --- a/openmeter/billing/httpdriver/profile.go +++ b/openmeter/billing/httpdriver/profile.go @@ -35,7 +35,7 @@ type ( func (h *handler) CreateProfile() CreateProfileHandler { return httptransport.NewHandler( func(ctx context.Context, r *http.Request) (CreateProfileRequest, error) { - body := api.BillingProfileCreateInput{} + body := api.BillingProfileCreate{} if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return CreateProfileRequest{}, fmt.Errorf("failed to decode request body: %w", err) } @@ -45,7 +45,7 @@ func (h *handler) CreateProfile() CreateProfileHandler { return CreateProfileRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) } - workflow, err := fromAPIBillingWorkflow(body.Workflow) + workflow, err := fromAPIBillingWorkflowCreate(body.Workflow) if err != nil { return CreateProfileRequest{}, fmt.Errorf("failed to parse workflow: %w", err) } @@ -77,7 +77,7 @@ func (h *handler) CreateProfile() CreateProfileHandler { commonhttp.JSONResponseEncoderWithStatus[CreateProfileResponse](http.StatusCreated), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingCreateProfile"), + httptransport.WithOperationName("CreateBillingProfile"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) @@ -120,42 +120,42 @@ func (h *handler) GetProfile() GetProfileHandler { commonhttp.JSONResponseEncoderWithStatus[CreateProfileResponse](http.StatusOK), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingGetProfile"), + httptransport.WithOperationName("GetBillingProfile"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) } type ( - ArchiveProfileRequest = billing.DeleteProfileInput - ArchiveProfileResponse = struct{} - ArchiveProfileHandler httptransport.HandlerWithArgs[ArchiveProfileRequest, ArchiveProfileResponse, string] + DeleteProfileRequest = billing.DeleteProfileInput + DeleteProfileResponse = struct{} + DeleteProfileHandler httptransport.HandlerWithArgs[DeleteProfileRequest, DeleteProfileResponse, string] ) -func (h *handler) ArchiveProfile() ArchiveProfileHandler { +func (h *handler) DeleteProfile() DeleteProfileHandler { return httptransport.NewHandlerWithArgs( - func(ctx context.Context, r *http.Request, id string) (ArchiveProfileRequest, error) { + func(ctx context.Context, r *http.Request, id string) (DeleteProfileRequest, error) { ns, err := h.resolveNamespace(ctx) if err != nil { - return ArchiveProfileRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) + return DeleteProfileRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) } - return ArchiveProfileRequest{ + return DeleteProfileRequest{ Namespace: ns, ID: id, }, nil }, - func(ctx context.Context, request ArchiveProfileRequest) (ArchiveProfileResponse, error) { + func(ctx context.Context, request DeleteProfileRequest) (DeleteProfileResponse, error) { if err := h.service.DeleteProfile(ctx, request); err != nil { - return ArchiveProfileResponse{}, fmt.Errorf("failed to archive profile: %w", err) + return DeleteProfileResponse{}, fmt.Errorf("failed to archive profile: %w", err) } - return ArchiveProfileResponse{}, nil + return DeleteProfileResponse{}, nil }, - commonhttp.JSONResponseEncoderWithStatus[ArchiveProfileResponse](http.StatusNoContent), + commonhttp.JSONResponseEncoderWithStatus[DeleteProfileResponse](http.StatusNoContent), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingArchiveProfile"), + httptransport.WithOperationName("DeleteBillingProfile"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) @@ -170,7 +170,7 @@ type ( func (h *handler) UpdateProfile() UpdateProfileHandler { return httptransport.NewHandlerWithArgs( func(ctx context.Context, r *http.Request, id string) (UpdateProfileRequest, error) { - body := api.BillingUpdateProfileJSONRequestBody{} + body := api.BillingProfileReplaceUpdateWithWorkflow{} if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return UpdateProfileRequest{}, fmt.Errorf("failed to decode request body: %w", err) } @@ -191,7 +191,6 @@ func (h *handler) UpdateProfile() UpdateProfileHandler { Name: body.Name, Description: body.Description, - UpdatedAt: body.UpdatedAt, Metadata: lo.FromPtrOr(body.Metadata, map[string]string{}), @@ -213,7 +212,7 @@ func (h *handler) UpdateProfile() UpdateProfileHandler { commonhttp.JSONResponseEncoderWithStatus[UpdateProfileResponse](http.StatusOK), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingArchiveProfile"), + httptransport.WithOperationName("UpdateBillingProfiles"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) @@ -221,8 +220,8 @@ func (h *handler) UpdateProfile() UpdateProfileHandler { type ( ListProfilesRequest = billing.ListProfilesInput - ListProfilesResponse = api.ProfilePaginatedResponse - ListProfilesParams = api.BillingListProfilesParams + ListProfilesResponse = api.BillingProfilePaginatedResponse + ListProfilesParams = api.ListBillingProfilesParams ListProfilesHandler httptransport.HandlerWithArgs[ListProfilesRequest, ListProfilesResponse, ListProfilesParams] ) @@ -273,13 +272,13 @@ func (h *handler) ListProfiles() ListProfilesHandler { commonhttp.JSONResponseEncoderWithStatus[ListProfilesResponse](http.StatusOK), httptransport.AppendOptions( h.options, - httptransport.WithOperationName("billingListProfile"), + httptransport.WithOperationName("ListBillingProfiles"), httptransport.WithErrorEncoder(errorEncoder()), )..., ) } -func apiBillingPartyCreateToSupplierContact(c api.BillingPartyCreate) billingentity.SupplierContact { +func apiBillingPartyCreateToSupplierContact(c api.BillingParty) billingentity.SupplierContact { out := billingentity.SupplierContact{ Name: lo.FromPtrOr(c.Name, ""), } @@ -309,7 +308,6 @@ func apiBillingPartyCreateToSupplierContact(c api.BillingPartyCreate) billingent func apiBillingPartyToSupplierContact(c api.BillingParty) billingentity.SupplierContact { out := billingentity.SupplierContact{ - ID: lo.FromPtrOr(c.Id, ""), Name: lo.FromPtrOr(c.Name, ""), } @@ -336,7 +334,7 @@ func apiBillingPartyToSupplierContact(c api.BillingParty) billingentity.Supplier return out } -func fromAPIBillingProfileCreateAppsInput(i api.BillingProfileCreateAppsInput) billing.CreateProfileAppsInput { +func fromAPIBillingProfileCreateAppsInput(i api.BillingProfileAppsCreate) billing.CreateProfileAppsInput { return billing.CreateProfileAppsInput{ Tax: fromAPIBillingAppIdOrType(i.Tax), Invoicing: fromAPIBillingAppIdOrType(i.Invoicing), @@ -394,7 +392,7 @@ func fromAPIBillingWorkflow(i api.BillingWorkflow) (billingentity.WorkflowConfig DeletedAt: i.DeletedAt, Collection: billingentity.CollectionConfig{ - Alignment: lo.FromPtrOr((*billingentity.AlignmentKind)(i.Collection.Alignment), def.Collection.Alignment), + Alignment: def.Collection.Alignment, Interval: collInterval, }, @@ -410,6 +408,14 @@ func fromAPIBillingWorkflow(i api.BillingWorkflow) (billingentity.WorkflowConfig }, nil } +func fromAPIBillingWorkflowCreate(i api.BillingWorkflowCreate) (billingentity.WorkflowConfig, error) { + return fromAPIBillingWorkflow(api.BillingWorkflow{ + Collection: i.Collection, + Invoicing: i.Invoicing, + Payment: i.Payment, + }) +} + func parseDurationPtr(d *string, defaultDuration datex.Period) (datex.Period, error) { if d == nil { return defaultDuration, nil @@ -542,6 +548,7 @@ func mapSupplierContactToAPI(c billingentity.SupplierContact) api.BillingParty { a := c.Address out := api.BillingParty{ + Id: lo.EmptyableToPtr(c.ID), Name: lo.EmptyableToPtr(c.Name), Addresses: lo.ToPtr([]api.Address{ { @@ -557,7 +564,7 @@ func mapSupplierContactToAPI(c billingentity.SupplierContact) api.BillingParty { } if c.TaxCode != nil { - out.TaxId = &api.BillingTaxIdentity{ + out.TaxId = &api.BillingPartyTaxIdentity{ Code: c.TaxCode, } } @@ -573,8 +580,10 @@ func mapWorkflowConfigToAPI(c billingentity.WorkflowConfig) api.BillingWorkflow DeletedAt: c.DeletedAt, Collection: &api.BillingWorkflowCollectionSettings{ - Alignment: (*api.BillingWorkflowCollectionAlignment)(lo.EmptyableToPtr(c.Collection.Alignment)), - Interval: lo.EmptyableToPtr(c.Collection.Interval.String()), + Alignment: &api.BillingWorkflowCollectionAlignmentSubscription{ + Type: api.BillingWorkflowCollectionAlignmentSubscriptionType(c.Collection.Alignment), + }, + Interval: lo.EmptyableToPtr(c.Collection.Interval.String()), }, Invoicing: &api.BillingWorkflowInvoicingSettings{ @@ -584,7 +593,7 @@ func mapWorkflowConfigToAPI(c billingentity.WorkflowConfig) api.BillingWorkflow }, Payment: &api.BillingWorkflowPaymentSettings{ - CollectionMethod: (*api.BillingWorkflowCollectionMethod)(lo.EmptyableToPtr(string(c.Payment.CollectionMethod))), + CollectionMethod: (*api.CollectionMethod)(lo.EmptyableToPtr(string(c.Payment.CollectionMethod))), }, } } @@ -592,8 +601,10 @@ func mapWorkflowConfigToAPI(c billingentity.WorkflowConfig) api.BillingWorkflow func mapWorkflowConfigSettingsToAPI(c billingentity.WorkflowConfig) api.BillingWorkflowSettings { return api.BillingWorkflowSettings{ Collection: &api.BillingWorkflowCollectionSettings{ - Alignment: (*api.BillingWorkflowCollectionAlignment)(lo.EmptyableToPtr(c.Collection.Alignment)), - Interval: lo.EmptyableToPtr(c.Collection.Interval.String()), + Alignment: &api.BillingWorkflowCollectionAlignmentSubscription{ + Type: api.BillingWorkflowCollectionAlignmentSubscriptionType(c.Collection.Alignment), + }, + Interval: lo.EmptyableToPtr(c.Collection.Interval.String()), }, Invoicing: &api.BillingWorkflowInvoicingSettings{ @@ -603,7 +614,7 @@ func mapWorkflowConfigSettingsToAPI(c billingentity.WorkflowConfig) api.BillingW }, Payment: &api.BillingWorkflowPaymentSettings{ - CollectionMethod: (*api.BillingWorkflowCollectionMethod)(lo.EmptyableToPtr(string(c.Payment.CollectionMethod))), + CollectionMethod: (*api.CollectionMethod)(lo.EmptyableToPtr(string(c.Payment.CollectionMethod))), }, } } diff --git a/openmeter/billing/invoice.go b/openmeter/billing/invoice.go index 4bb42df09..268d28801 100644 --- a/openmeter/billing/invoice.go +++ b/openmeter/billing/invoice.go @@ -72,7 +72,7 @@ type ListInvoicesInput struct { Expand billingentity.InvoiceExpand - OrderBy api.BillingInvoiceOrderBy + OrderBy api.InvoiceOrderBy Order sortx.Order } @@ -144,14 +144,14 @@ func (c CreateInvoiceAdapterInput) Validate() error { type CreateInvoiceAdapterRespone = billingentity.Invoice -type CreateInvoiceInput struct { +type InvoicePendingLinesInput struct { Customer customerentity.CustomerID IncludePendingLines mo.Option[[]string] AsOf *time.Time } -func (i CreateInvoiceInput) Validate() error { +func (i InvoicePendingLinesInput) Validate() error { if err := i.Customer.Validate(); err != nil { return fmt.Errorf("customer: %w", err) } diff --git a/openmeter/billing/invoiceline.go b/openmeter/billing/invoiceline.go index 1f47b2638..e55684477 100644 --- a/openmeter/billing/invoiceline.go +++ b/openmeter/billing/invoiceline.go @@ -242,15 +242,14 @@ func (u UpdateInvoiceLineBaseInput) Apply(l *billingentity.Line) error { } type UpdateInvoiceLineUsageBasedInput struct { - Price mo.Option[billingentity.Price] + Price *billingentity.Price } func (u UpdateInvoiceLineUsageBasedInput) Validate() error { var outErr error - if u.Price.IsPresent() { - price := u.Price.OrEmpty() - if err := price.Validate(); err != nil { + if u.Price != nil { + if err := u.Price.Validate(); err != nil { outErr = errors.Join(outErr, billingentity.ValidationWithFieldPrefix("price", err)) } } @@ -259,8 +258,8 @@ func (u UpdateInvoiceLineUsageBasedInput) Validate() error { } func (u UpdateInvoiceLineUsageBasedInput) Apply(l *billingentity.UsageBasedLine) error { - if u.Price.IsPresent() { - l.Price = u.Price.OrEmpty() + if u.Price != nil { + l.Price = *u.Price } return nil diff --git a/openmeter/billing/service.go b/openmeter/billing/service.go index 4cacf3e82..07e760151 100644 --- a/openmeter/billing/service.go +++ b/openmeter/billing/service.go @@ -43,7 +43,7 @@ type InvoiceLineService interface { type InvoiceService interface { ListInvoices(ctx context.Context, input ListInvoicesInput) (ListInvoicesResponse, error) GetInvoiceByID(ctx context.Context, input GetInvoiceByIdInput) (billingentity.Invoice, error) - CreateInvoice(ctx context.Context, input CreateInvoiceInput) ([]billingentity.Invoice, error) + InvoicePendingLines(ctx context.Context, input InvoicePendingLinesInput) ([]billingentity.Invoice, error) // AdvanceInvoice advances the invoice to the next stage, the advancement is stopped until: // - an error is occurred // - the invoice is in a state that cannot be advanced (e.g. waiting for draft period to expire) diff --git a/openmeter/billing/service/invoice.go b/openmeter/billing/service/invoice.go index 7155c2ced..cd94fb954 100644 --- a/openmeter/billing/service/invoice.go +++ b/openmeter/billing/service/invoice.go @@ -95,7 +95,7 @@ func (s *Service) GetInvoiceByID(ctx context.Context, input billing.GetInvoiceBy return invoice, nil } -func (s *Service) CreateInvoice(ctx context.Context, input billing.CreateInvoiceInput) ([]billingentity.Invoice, error) { +func (s *Service) InvoicePendingLines(ctx context.Context, input billing.InvoicePendingLinesInput) ([]billingentity.Invoice, error) { if err := input.Validate(); err != nil { return nil, billingentity.ValidationError{ Err: err, @@ -244,7 +244,7 @@ func (s *Service) CreateInvoice(ctx context.Context, input billing.CreateInvoice }) } -func (s *Service) gatherInscopeLines(ctx context.Context, input billing.CreateInvoiceInput, asOf time.Time) ([]lineservice.LineWithBillablePeriod, error) { +func (s *Service) gatherInscopeLines(ctx context.Context, input billing.InvoicePendingLinesInput, asOf time.Time) ([]lineservice.LineWithBillablePeriod, error) { if input.IncludePendingLines.IsPresent() { lineIDs := input.IncludePendingLines.OrEmpty() diff --git a/openmeter/billing/service/invoiceline.go b/openmeter/billing/service/invoiceline.go index 38faa11e8..3fb96bad7 100644 --- a/openmeter/billing/service/invoiceline.go +++ b/openmeter/billing/service/invoiceline.go @@ -147,7 +147,7 @@ func (s *Service) upsertLineInvoice(ctx context.Context, line billingentity.Line Namespace: input.Namespace, ExtendedStatuses: []billingentity.InvoiceStatus{billingentity.InvoiceStatusGathering}, Currencies: []currencyx.Code{line.Currency}, - OrderBy: api.BillingInvoiceOrderByCreatedAt, + OrderBy: api.InvoiceOrderByCreatedAt, Order: sortx.OrderAsc, }) if err != nil { diff --git a/openmeter/server/router/billing.go b/openmeter/server/router/billing.go index 82bfe89a0..30b90b990 100644 --- a/openmeter/server/router/billing.go +++ b/openmeter/server/router/billing.go @@ -11,33 +11,33 @@ import ( // List customer overrides // (GET /api/v1/billing/customer) -func (a *Router) BillingListCustomerOverrides(w http.ResponseWriter, r *http.Request, params api.BillingListCustomerOverridesParams) { +func (a *Router) ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request, params api.ListBillingProfileCustomerOverridesParams) { w.WriteHeader(http.StatusNotImplemented) } // Delete a customer override // (DELETE /api/v1/billing/customer/{customerId}) -func (a *Router) BillingDeleteCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { +func (a *Router) DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { w.WriteHeader(http.StatusNotImplemented) } // Get a customer override // (GET /api/v1/billing/customer/{customerId}) -func (a *Router) BillingGetCustomerOverrideById(w http.ResponseWriter, r *http.Request, customerId string) { +func (a *Router) GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { w.WriteHeader(http.StatusNotImplemented) } // Create/update a customer override // (POST /api/v1/billing/customer/{customerId}) -func (a *Router) BillingUpsertCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { +func (a *Router) UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string) { w.WriteHeader(http.StatusNotImplemented) } // List invoices // (GET /api/v1/billing/invoices) -func (a *Router) BillingListInvoices(w http.ResponseWriter, r *http.Request, params api.BillingListInvoicesParams) { +func (a *Router) ListInvoices(w http.ResponseWriter, r *http.Request, params api.ListInvoicesParams) { if !a.config.BillingEnabled { - unimplemented.BillingListInvoices(w, r, params) + unimplemented.ListInvoices(w, r, params) return } @@ -46,52 +46,76 @@ func (a *Router) BillingListInvoices(w http.ResponseWriter, r *http.Request, par // List invoices // (GET /api/v1/billing/invoices/{customerId}) -func (a *Router) BillingListInvoicesByCustomer(w http.ResponseWriter, r *http.Request, customerId string, params api.BillingListInvoicesByCustomerParams) { +func (a *Router) ListInvoicesByCustomer(w http.ResponseWriter, r *http.Request, customerId string, params api.ListInvoicesByCustomerParams) { if !a.config.BillingEnabled { - unimplemented.BillingListInvoicesByCustomer(w, r, customerId, params) + unimplemented.ListInvoicesByCustomer(w, r, customerId, params) return } a.billingHandler.ListInvoices().With(a.billingHandler.ConvertListInvoicesByCustomerToListInvoices(customerId, params)).ServeHTTP(w, r) } -// Create an invoice -// (POST /api/v1/billing/invoices/{customerId}) -func (a *Router) BillingCreateInvoice(w http.ResponseWriter, r *http.Request, customerId string) { +// Invoice a customer based on the pending line items +// (POST /api/v1/billing/invoices/{customerId}/invoice) +func (a *Router) InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request, customerId string) { if !a.config.BillingEnabled { - unimplemented.BillingCreateInvoice(w, r, customerId) + unimplemented.InvoicePendingLinesAction(w, r, customerId) return } - a.billingHandler.CreateInvoice().With(customerId).ServeHTTP(w, r) + a.billingHandler.InvoicePendingLinesAction().With(customerId).ServeHTTP(w, r) } // Delete an invoice // (DELETE /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}) -func (a *Router) BillingDeleteInvoiceByCustomerInvoiceId(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { - w.WriteHeader(http.StatusNotImplemented) +func (a *Router) DeleteInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { + if !a.config.BillingEnabled { + unimplemented.DeleteInvoice(w, r, customerId, invoiceId) + return + } + + a.billingHandler.DeleteInvoice().With(httpdriver.DeleteInvoiceParams{ + CustomerID: customerId, + InvoiceID: invoiceId, + }).ServeHTTP(w, r) } // Get an invoice // (GET /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}) -func (a *Router) BillingGetInvoiceByCustomerInvoiceId(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, params api.BillingGetInvoiceByCustomerInvoiceIdParams) { +func (a *Router) GetInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, params api.GetInvoiceParams) { if !a.config.BillingEnabled { - unimplemented.BillingGetInvoiceByCustomerInvoiceId(w, r, customerId, invoiceId, params) + unimplemented.GetInvoice(w, r, customerId, invoiceId, params) return } a.billingHandler.GetInvoice().With(httpdriver.GetInvoiceParams{ - CustomerID: customerId, - InvoiceID: invoiceId, - Expand: params.Expand, + CustomerID: customerId, + InvoiceID: invoiceId, + Expand: params.Expand, + IncludeDeletedLines: params.IncludeDeletedLines, }).ServeHTTP(w, r) } +// Advance the invoice's state to the next status +// (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/advance) +func (a *Router) AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { + if !a.config.BillingEnabled { + unimplemented.AdvanceInvoiceAction(w, r, customerId, invoiceId) + return + } + + a.billingHandler.ProgressInvoice(httpdriver.InvoiceProgressActionAdvance). + With(httpdriver.ProgressInvoiceParams{ + CustomerID: customerId, + InvoiceID: invoiceId, + }).ServeHTTP(w, r) +} + // Send the invoice to the customer // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/approve) -func (a *Router) BillingApproveInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { +func (a *Router) ApproveInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { if !a.config.BillingEnabled { - unimplemented.BillingApproveInvoice(w, r, customerId, invoiceId) + unimplemented.ApproveInvoiceAction(w, r, customerId, invoiceId) return } @@ -102,11 +126,26 @@ func (a *Router) BillingApproveInvoice(w http.ResponseWriter, r *http.Request, c }).ServeHTTP(w, r) } +// Delete an invoice line +// (DELETE /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) +func (a *Router) DeleteInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { + if !a.config.BillingEnabled { + unimplemented.DeleteInvoiceLine(w, r, customerId, invoiceId, lineId) + return + } + + a.billingHandler.DeleteLine().With(httpdriver.DeleteLineParams{ + CustomerID: customerId, + InvoiceID: invoiceId, + LineID: lineId, + }).ServeHTTP(w, r) +} + // Get an invoice line // (GET /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) -func (a *Router) BillingGetInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { +func (a *Router) GetInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { if !a.config.BillingEnabled { - unimplemented.BillingGetInvoiceLine(w, r, customerId, invoiceId, lineId) + unimplemented.GetInvoiceLine(w, r, customerId, invoiceId, lineId) return } @@ -117,50 +156,26 @@ func (a *Router) BillingGetInvoiceLine(w http.ResponseWriter, r *http.Request, c }).ServeHTTP(w, r) } -// Delete an invoice line -// (DELETE /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) -func (a *Router) BillingDeleteInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { - w.WriteHeader(http.StatusNotImplemented) -} - // Update an invoice line // (PUT /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/lines/{lineId}) -func (a *Router) BillingUpdateInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { - w.WriteHeader(http.StatusNotImplemented) -} - -// Recalculate an invoice's tax amounts -// (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/tax/recalculate) -func (a *Router) BillingRecalculateInvoiceTax(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { - w.WriteHeader(http.StatusNotImplemented) -} - -// Void an invoice -// (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/void) -func (a *Router) BillingVoidInvoice(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { - w.WriteHeader(http.StatusNotImplemented) -} - -// Advance the invoice's state to the next status -// (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/advance) -func (a *Router) BillingInvoiceAdvance(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { +func (a *Router) UpdateInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string, lineId string) { if !a.config.BillingEnabled { - unimplemented.BillingInvoiceAdvance(w, r, customerId, invoiceId) + unimplemented.UpdateInvoiceLine(w, r, customerId, invoiceId, lineId) return } - a.billingHandler.ProgressInvoice(httpdriver.InvoiceProgressActionAdvance). - With(httpdriver.ProgressInvoiceParams{ - CustomerID: customerId, - InvoiceID: invoiceId, - }).ServeHTTP(w, r) + a.billingHandler.UpdateLine().With(httpdriver.UpdateLineParams{ + CustomerID: customerId, + InvoiceID: invoiceId, + LineID: lineId, + }).ServeHTTP(w, r) } // Retry a failed synchronization step of the invoice // (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/retry) -func (a *Router) BillingInvoiceRetry(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { +func (a *Router) RetryInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { if !a.config.BillingEnabled { - unimplemented.BillingInvoiceRetry(w, r, customerId, invoiceId) + unimplemented.RetryInvoiceAction(w, r, customerId, invoiceId) return } @@ -171,11 +186,23 @@ func (a *Router) BillingInvoiceRetry(w http.ResponseWriter, r *http.Request, cus }).ServeHTTP(w, r) } +// Recalculate an invoice's tax amounts +// (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/tax/recalculate) +func (a *Router) RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { + w.WriteHeader(http.StatusNotImplemented) +} + +// Void an invoice +// (POST /api/v1/billing/invoices/{customerId}/invoices/{invoiceId}/void) +func (a *Router) VoidInvoiceAction(w http.ResponseWriter, r *http.Request, customerId string, invoiceId string) { + w.WriteHeader(http.StatusNotImplemented) +} + // Create a new item // (POST /api/v1/billing/invoices/{customerId}/items) -func (a *Router) BillingCreateLineByCustomer(w http.ResponseWriter, r *http.Request, customerId string) { +func (a *Router) CreateInvoiceLineByCustomer(w http.ResponseWriter, r *http.Request, customerId string) { if !a.config.BillingEnabled { - unimplemented.BillingCreateLineByCustomer(w, r, customerId) + unimplemented.CreateInvoiceLineByCustomer(w, r, customerId) return } @@ -183,9 +210,9 @@ func (a *Router) BillingCreateLineByCustomer(w http.ResponseWriter, r *http.Requ } // (GET /api/v1/billing/profile) -func (a *Router) BillingListProfiles(w http.ResponseWriter, r *http.Request, params api.BillingListProfilesParams) { +func (a *Router) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params api.ListBillingProfilesParams) { if !a.config.BillingEnabled { - unimplemented.BillingListProfiles(w, r, params) + unimplemented.ListBillingProfiles(w, r, params) return } @@ -194,9 +221,9 @@ func (a *Router) BillingListProfiles(w http.ResponseWriter, r *http.Request, par // Create a new billing profile // (POST /api/v1/billing/profile) -func (a *Router) BillingCreateProfile(w http.ResponseWriter, r *http.Request) { +func (a *Router) CreateBillingProfile(w http.ResponseWriter, r *http.Request) { if !a.config.BillingEnabled { - unimplemented.BillingCreateProfile(w, r) + unimplemented.CreateBillingProfile(w, r) return } @@ -205,20 +232,20 @@ func (a *Router) BillingCreateProfile(w http.ResponseWriter, r *http.Request) { // Archive a billing profile // (DELETE /api/v1/billing/profile/{id}) -func (a *Router) BillingArchiveProfile(w http.ResponseWriter, r *http.Request, id string) { +func (a *Router) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id string) { if !a.config.BillingEnabled { - unimplemented.BillingArchiveProfile(w, r, id) + unimplemented.DeleteBillingProfile(w, r, id) return } - a.billingHandler.ArchiveProfile().With(id).ServeHTTP(w, r) + a.billingHandler.DeleteProfile().With(id).ServeHTTP(w, r) } // Get a billing profile by ID // (GET /api/v1/billing/profile/{id}) -func (a *Router) BillingGetProfile(w http.ResponseWriter, r *http.Request, id string, params api.BillingGetProfileParams) { +func (a *Router) GetBillingProfile(w http.ResponseWriter, r *http.Request, id string, params api.GetBillingProfileParams) { if !a.config.BillingEnabled { - unimplemented.BillingGetProfile(w, r, id, params) + unimplemented.GetBillingProfile(w, r, id, params) return } @@ -230,9 +257,9 @@ func (a *Router) BillingGetProfile(w http.ResponseWriter, r *http.Request, id st // Update a billing profile // (PUT /api/v1/billing/profile/{id}) -func (a *Router) BillingUpdateProfile(w http.ResponseWriter, r *http.Request, id string) { +func (a *Router) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id string) { if !a.config.BillingEnabled { - unimplemented.BillingUpdateProfile(w, r, id) + unimplemented.UpdateBillingProfile(w, r, id) return } diff --git a/test/billing/invoice_test.go b/test/billing/invoice_test.go index 12fa1a052..3a1367b8d 100644 --- a/test/billing/invoice_test.go +++ b/test/billing/invoice_test.go @@ -516,7 +516,7 @@ func (s *InvoicingTestSuite) TestCreateInvoice() { } s.Run("Creating invoice in the future fails", func() { - _, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + _, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerentity.CustomerID{ ID: customerEntity.ID, Namespace: customerEntity.Namespace, @@ -529,7 +529,7 @@ func (s *InvoicingTestSuite) TestCreateInvoice() { }) s.Run("Creating invoice without any pending lines being available fails", func() { - _, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + _, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerentity.CustomerID{ ID: customerEntity.ID, Namespace: customerEntity.Namespace, @@ -554,7 +554,7 @@ func (s *InvoicingTestSuite) TestCreateInvoice() { }) s.Run("When creating an invoice with only item1 included", func() { - invoice, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + invoice, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerentity.CustomerID{ ID: customerEntity.ID, Namespace: customerEntity.Namespace, @@ -582,7 +582,7 @@ func (s *InvoicingTestSuite) TestCreateInvoice() { }) s.Run("When creating an invoice with only item2 included, but bad asof", func() { - _, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + _, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerentity.CustomerID{ ID: customerEntity.ID, Namespace: customerEntity.Namespace, @@ -597,7 +597,7 @@ func (s *InvoicingTestSuite) TestCreateInvoice() { }) s.Run("When creating an invoice with only item2 included", func() { - invoice, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + invoice, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerentity.CustomerID{ ID: customerEntity.ID, Namespace: customerEntity.Namespace, @@ -704,7 +704,7 @@ func (s *InvoicingTestSuite) createDraftInvoice(t *testing.T, ctx context.Contex require.NotEmpty(s.T(), line1ID) require.NotEmpty(s.T(), line2ID) - invoice, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + invoice, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerentity.CustomerID{ ID: in.Customer.ID, Namespace: in.Customer.Namespace, @@ -1466,7 +1466,7 @@ func (s *InvoicingTestSuite) TestUBPInvoicing() { s.Run("create invoice with empty truncated periods", func() { asOf := periodStart.Add(time.Second) - _, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + _, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerEntity.GetID(), AsOf: &asOf, }) @@ -1481,7 +1481,7 @@ func (s *InvoicingTestSuite) TestUBPInvoicing() { // Period asOf := periodStart.Add(time.Hour) - out, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + out, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerEntity.GetID(), AsOf: &asOf, }) @@ -1567,9 +1567,9 @@ func (s *InvoicingTestSuite) TestUBPInvoicing() { }, Type: billingentity.InvoiceLineTypeUsageBased, UsageBased: billing.UpdateInvoiceLineUsageBasedInput{ - Price: mo.Some(*productcatalog.NewPriceFrom(productcatalog.UnitPrice{ + Price: productcatalog.NewPriceFrom(productcatalog.UnitPrice{ Amount: alpacadecimal.NewFromFloat(250), - })), + }), }, }) require.NoError(s.T(), err) @@ -1609,7 +1609,7 @@ func (s *InvoicingTestSuite) TestUBPInvoicing() { }, Type: billingentity.InvoiceLineTypeUsageBased, UsageBased: billing.UpdateInvoiceLineUsageBasedInput{ - Price: mo.Some(*productcatalog.NewPriceFrom(productcatalog.TieredPrice{ + Price: productcatalog.NewPriceFrom(productcatalog.TieredPrice{ Mode: productcatalog.VolumeTieredPrice, Tiers: []productcatalog.PriceTier{ { @@ -1618,7 +1618,7 @@ func (s *InvoicingTestSuite) TestUBPInvoicing() { }, }, }, - })), + }), }, }) @@ -1771,7 +1771,7 @@ func (s *InvoicingTestSuite) TestUBPInvoicing() { s.MockStreamingConnector.AddSimpleEvent("tiered-graduated", 15, periodStart.Add(time.Minute*100)) asOf := periodStart.Add(2 * time.Hour) - out, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + out, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerEntity.GetID(), AsOf: &asOf, }) @@ -1935,7 +1935,7 @@ func (s *InvoicingTestSuite) TestUBPInvoicing() { s.MockStreamingConnector.AddSimpleEvent("tiered-graduated", 15, afterPreviousTest) asOf := periodEnd - out, err := s.BillingService.CreateInvoice(ctx, billing.CreateInvoiceInput{ + out, err := s.BillingService.InvoicePendingLines(ctx, billing.InvoicePendingLinesInput{ Customer: customerEntity.GetID(), AsOf: &asOf, })