Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/crud/billing"

Index

Variables

Const stripe

stripe: Stripe = new Stripe(STRIPE_SECRET_KEY)

Functions

Const cleanStripeResponse

  • cleanStripeResponse(response: IList<any>): any
  • Parameters

    • response: IList<any>

    Returns any

Const createStripeCustomer

  • createStripeCustomer(organizationId: string, customer: ICustomerCreationOptions): Promise<object>
  • Get the details of a customer

    Parameters

    • organizationId: string
    • customer: ICustomerCreationOptions

    Returns Promise<object>

Const createStripeSource

  • createStripeSource(id: string, source: any): Promise<object>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • source: any

    Returns Promise<object>

Const createStripeSubscription

  • createStripeSubscription(id: string, __namedParameters: object): Promise<object>
  • Create a new subscription

    Parameters

    • id: string

      Stripe customer ID

    • __namedParameters: object
      • billing: undefined | "charge_automatically" | "send_invoice"
      • number_of_seats: undefined | number
      • plan: string
      • tax_percent: undefined | number

    Returns Promise<object>

Const createStripeSubscriptionSession

  • createStripeSubscriptionSession(id: string, __namedParameters: object): Promise<any>
  • Create a new subscription

    Parameters

    • id: string

      Stripe customer ID

    • __namedParameters: object
      • plan: string

    Returns Promise<any>

Const deleteStripeCustomer

  • deleteStripeCustomer(id: string): Promise<object>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    Returns Promise<object>

Const deleteStripeSource

  • deleteStripeSource(id: string, sourceId: string): Promise<object>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • sourceId: string

    Returns Promise<object>

Const getStripeCustomer

  • getStripeCustomer(id: string): Promise<ICustomer>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    Returns Promise<ICustomer>

Const getStripeInvoice

  • getStripeInvoice(id: string, invoiceId: string): Promise<IInvoice>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • invoiceId: string

    Returns Promise<IInvoice>

Const getStripeInvoices

  • getStripeInvoices(id: string, __namedParameters: object): Promise<any>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • __namedParameters: object
      • billing: undefined | "charge_automatically" | "send_invoice"
      • itemsPerPage: undefined | number
      • start: undefined | string
      • subscription: undefined | string

    Returns Promise<any>

Const getStripeProductPricing

  • getStripeProductPricing(): Promise<IList<IPlan>>
  • Get the details of a customer

    Returns Promise<IList<IPlan>>

Const getStripeSource

  • getStripeSource(id: string, sourceId: string): Promise<ICard | IBitcoinReceiver | IBankAccount | ISource>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • sourceId: string

    Returns Promise<ICard | IBitcoinReceiver | IBankAccount | ISource>

Const getStripeSources

  • getStripeSources(id: string, __namedParameters: object): Promise<any>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • __namedParameters: object
      • itemsPerPage: undefined | number
      • start: undefined | string

    Returns Promise<any>

Const getStripeSubscription

  • getStripeSubscription(id: string, subscriptionId: string): Promise<ISubscription>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • subscriptionId: string

    Returns Promise<ISubscription>

Const getStripeSubscriptions

  • getStripeSubscriptions(id: string, __namedParameters: object): Promise<any>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • __namedParameters: object
      • billing: undefined | "charge_automatically" | "send_invoice"
      • itemsPerPage: undefined | number
      • plan: undefined | string
      • start: undefined | string
      • status: undefined | "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid"

    Returns Promise<any>

Const updateStripeCustomer

  • updateStripeCustomer(id: string, customer: ICustomerUpdateOptions): Promise<object>
  • Update the details of a customer

    Parameters

    • id: string
    • customer: ICustomerUpdateOptions

    Returns Promise<object>

Const updateStripeSource

  • updateStripeSource(id: string, cardId: string, data: any): Promise<object>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • cardId: string
    • data: any

    Returns Promise<object>

Const updateStripeSubscription

  • updateStripeSubscription(id: string, subscriptionId: string, data: ISubscriptionUpdateItem): Promise<object>
  • Get the details of a customer

    Parameters

    • id: string

      Stripe customer ID

    • subscriptionId: string
    • data: ISubscriptionUpdateItem

    Returns Promise<object>

Generated using TypeDoc