import type { BelongsTo } from '@adonisjs/lucid/types/relations'; import Subscription from './subscription.js'; import Stripe from 'stripe'; import { DateTime } from 'luxon'; declare const SubscriptionItem_base: { new (...args: any[]): { "__#private@#prorationBehaviour": Stripe.SubscriptionCreateParams.ProrationBehavior; noProrate(): /*elided*/ any; prorate(): /*elided*/ any; alwaysInvoice(): /*elided*/ any; setProrationBehavior(prorationBehaviour: Stripe.SubscriptionCreateParams.ProrationBehavior): /*elided*/ any; prorateBehavior(): Stripe.SubscriptionCreateParams.ProrationBehavior; }; } & { new (...args: any[]): { "__#private@#paymentBehavior": Stripe.SubscriptionCreateParams.PaymentBehavior; defaultIncomplete(): /*elided*/ any; allowPaymentFailures(): /*elided*/ any; pendingIfPaymentFails(): /*elided*/ any; errorIfPaymentFails(): /*elided*/ any; paymentBehavior(): Stripe.SubscriptionCreateParams.PaymentBehavior; setPaymentBehavior(paymentBehavior: Stripe.SubscriptionCreateParams.PaymentBehavior): /*elided*/ any; }; } & { new (...args: any[]): { confirmIncompletePayment: boolean; paymentConfirmationOptions: Stripe.PaymentIntentConfirmParams; handlePaymentFailure(subscription: Subscription, paymentMethod?: Stripe.PaymentMethod | string): Promise; ignoreIncompletePayments(): /*elided*/ any; withPaymentConfirmationOptions(params: Stripe.PaymentIntentConfirmParams): /*elided*/ any; }; } & import("@adonisjs/lucid/types/model").LucidModel & (new (...args: any[]) => import("../contracts.ts").ManagesStripeContract); export default class SubscriptionItem extends SubscriptionItem_base { id: number; subscriptionId: number; subscription: BelongsTo; stripeProduct: string; stripePrice: string; quantity: number | null; updatedAt: DateTime | null; createdAt: DateTime; /** * Increment the quantity of the subscription item. */ incrementQuantity(count?: number): Promise; /** * Increment the quantity of the subscription item, and invoice immediately. */ incrementAndInvoice(count?: number): Promise; /** * Decrement the quantity of the subscription item. */ decrementQuantity(count?: number): Promise; /** * Decrement the quantity of the subscription item, and invoice immediately. */ decrementAndInvoice(count?: number): Promise; /** * Update the quantity of the subscription item. */ updateQuantity(quantity: number): Promise; /** * Swap the subscription item to a new Stripe price. */ swap(price: string, params?: Stripe.SubscriptionItemUpdateParams): Promise; /** * Swap the subscription item to a new Stripe price, and invoice immediately. */ swapAndInvoice(price: string, params?: Stripe.SubscriptionItemUpdateParams): Promise; /** * Report a meter event for a metered product. */ reportUsage(this: SubscriptionItem, eventName: string, value?: string, params?: Partial): Promise; /** * Get the meter event summaries for a metered product. */ usageRecords(this: SubscriptionItem, meterId: string, params: Omit): Promise; /** * Update the underlying Stripe subscription item information for the model. */ updateStripeSubscriptionItem(params?: Stripe.SubscriptionItemUpdateParams): Promise; /** * Get the subscription as a Stripe subscription item object. */ asStripeSubscriptionItem(expand?: string[]): Promise; } export {};