"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Subscriptions = void 0;
const resource_1 = require("cloudflare/resource");
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);
    }
    /**
     * Updates an account subscription.
     */
    update(accountIdentifier, subscriptionIdentifier, body, options) {
        return this._client.put(`/accounts/${accountIdentifier}/subscriptions/${subscriptionIdentifier}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists all of an account's subscriptions.
     */
    list(accountIdentifier, options) {
        return this._client.get(`/accounts/${accountIdentifier}/subscriptions`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Deletes an account's subscription.
     */
    delete(accountIdentifier, subscriptionIdentifier, options) {
        return this._client.delete(`/accounts/${accountIdentifier}/subscriptions/${subscriptionIdentifier}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * 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