UNPKG

@maxio-com/advanced-billing-sdk

Version:

Ultimate billing and pricing flexibility for B2B SaaS. Maxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments.

44 lines (40 loc) 1.35 kB
/** * AdvancedBilling * * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { bigint, expandoObject, nullable, number, optional, Schema, string, } from '../schema'; export interface CouponUsage { /** The Chargify id of the product */ id?: number; /** Name of the product */ name?: string; /** Number of times the coupon has been applied */ signups?: number; /** Dollar amount of customer savings as a result of the coupon. */ savings?: number | null; /** Dollar amount of customer savings as a result of the coupon. */ savingsInCents?: bigint | null; /** Total revenue of the all subscriptions that have received a discount from this coupon. */ revenue?: number | null; /** Total revenue of the all subscriptions that have received a discount from this coupon. */ revenueInCents?: bigint; [key: string]: unknown; } export const couponUsageSchema: Schema<CouponUsage> = expandoObject({ id: ['id', optional(number())], name: ['name', optional(string())], signups: ['signups', optional(number())], savings: ['savings', optional(nullable(number()))], savingsInCents: ['savings_in_cents', optional(nullable(bigint()))], revenue: ['revenue', optional(nullable(number()))], revenueInCents: ['revenue_in_cents', optional(bigint())], });