File

apps/recallassess/recallassess-api/src/api/admin/company/dto/company-stripe-subscription.dto.ts

Description

Snapshot of the Stripe subscription for admin company detail (from Stripe API, not local DB).

Index

Properties

Properties

cancel_at_period_end
Type : boolean | null
Decorators :
@Expose()
card_brand
Type : string | null
Decorators :
@Expose()

Default / best card on the Stripe customer (from Stripe API).

card_last4
Type : string | null
Decorators :
@Expose()
collection_method
Type : string | null
Decorators :
@Expose()
currency
Type : string | null
Decorators :
@Expose()
current_period_end
Type : string | null
Decorators :
@Expose()

ISO 8601 end of current billing period

loaded
Type : boolean
Decorators :
@Expose()
Optional message
Type : string
Decorators :
@Expose()
quantity
Type : number | null
Decorators :
@Expose()
Optional reason
Type : string
Decorators :
@Expose()

When loaded is false: STRIPE_NOT_CONFIGURED | NO_STRIPE_SUBSCRIPTION | STRIPE_ERROR

recurring_total_amount
Type : number | null
Decorators :
@Expose()

Upcoming recurring invoice total amount (major currency units), if preview available.

status
Type : string | null
Decorators :
@Expose()
stripe_api_mode
Type : "test" | "live" | null
Decorators :
@Expose()

Whether the API uses test or live Stripe keys (for correct dashboard.stripe.com links).

stripe_subscription_id
Type : string | null
Decorators :
@Expose()
import {Exclude, Expose} from "class-transformer";

/** Snapshot of the Stripe subscription for admin company detail (from Stripe API, not local DB). */
@Exclude()
export class CompanyStripeSubscriptionDto {
  @Expose()
  loaded!: boolean;

  /** When loaded is false: STRIPE_NOT_CONFIGURED | NO_STRIPE_SUBSCRIPTION | STRIPE_ERROR */
  @Expose()
  reason?: string;

  @Expose()
  message?: string;

  @Expose()
  stripe_subscription_id!: string | null;

  @Expose()
  status!: string | null;

  /** ISO 8601 end of current billing period */
  @Expose()
  current_period_end!: string | null;

  @Expose()
  cancel_at_period_end!: boolean | null;

  @Expose()
  collection_method!: string | null;

  @Expose()
  currency!: string | null;

  @Expose()
  quantity!: number | null;

  /** Upcoming recurring invoice total amount (major currency units), if preview available. */
  @Expose()
  recurring_total_amount!: number | null;

  /** Whether the API uses test or live Stripe keys (for correct dashboard.stripe.com links). */
  @Expose()
  stripe_api_mode!: "test" | "live" | null;

  /** Default / best card on the Stripe customer (from Stripe API). */
  @Expose()
  card_brand!: string | null;

  @Expose()
  card_last4!: string | null;
}

results matching ""

    No results matching ""