UNPKG

orb-billing

Version:

The official TypeScript library for the Orb API

24 lines 1.32 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.SubscriptionsPage = exports.Subscriptions = void 0; const resource_1 = require("../../resource.js"); const core_1 = require("../../core.js"); const subscriptions_1 = require("../subscriptions.js"); Object.defineProperty(exports, "SubscriptionsPage", { enumerable: true, get: function () { return subscriptions_1.SubscriptionsPage; } }); /** * A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. */ class Subscriptions extends resource_1.APIResource { list(couponId, query = {}, options) { if ((0, core_1.isRequestOptions)(query)) { return this.list(couponId, {}, query); } return this._client.getAPIList(`/coupons/${couponId}/subscriptions`, subscriptions_1.SubscriptionsPage, { query, ...options, }); } } exports.Subscriptions = Subscriptions; //# sourceMappingURL=subscriptions.js.map