"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.SubscriptionsSinglePage = exports.Subscriptions = void 0;
const resource_1 = require("cloudflaredev/resource");
const subscriptions_1 = require("cloudflaredev/resources/user/subscriptions");
Object.defineProperty(exports, "SubscriptionsSinglePage", { enumerable: true, get: function () { return subscriptions_1.SubscriptionsSinglePage; } });
class Subscriptions extends resource_1.APIResource {
    /**
     * Create a zone subscription, either plan or add-ons.
     */
    create(identifier, body, options) {
        return this._client.post(`/zones/${identifier}/subscription`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists all of an account's subscriptions.
     */
    list(accountIdentifier, options) {
        return this._client.getAPIList(`/accounts/${accountIdentifier}/subscriptions`, subscriptions_1.SubscriptionsSinglePage, options);
    }
    /**
     * Lists zone subscription details.
     */
    get(identifier, options) {
        return this._client.get(`/zones/${identifier}/subscription`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.Subscriptions = Subscriptions;
(function (Subscriptions) {
})(Subscriptions = exports.Subscriptions || (exports.Subscriptions = {}));
//# sourceMappingURL=subscriptions.js.map