"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 pagination_1 = require("cloudflaredev/pagination");
class Subscriptions extends resource_1.APIResource {
    /**
     * Updates a user's subscriptions.
     */
    update(identifier, body, options) {
        return this._client.put(`/user/subscriptions/${identifier}`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Deletes a user's subscription.
     */
    delete(identifier, options) {
        return this._client.delete(`/user/subscriptions/${identifier}`, options);
    }
    /**
     * Updates zone subscriptions, either plan or add-ons.
     */
    edit(identifier, body, options) {
        return this._client.put(`/zones/${identifier}/subscription`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists all of a user's subscriptions.
     */
    get(options) {
        return this._client.get('/user/subscriptions', options)._thenUnwrap((obj) => obj.result);
    }
}
exports.Subscriptions = Subscriptions;
class SubscriptionsSinglePage extends pagination_1.SinglePage {
}
exports.SubscriptionsSinglePage = SubscriptionsSinglePage;
(function (Subscriptions) {
})(Subscriptions = exports.Subscriptions || (exports.Subscriptions = {}));
//# sourceMappingURL=subscriptions.js.map