UNPKG

stripe

Version:
35 lines 1.82 kB
"use strict"; // File generated from our OpenAPI spec Object.defineProperty(exports, "__esModule", { value: true }); exports.InvoiceRenderingTemplateResource = void 0; const StripeResource_js_1 = require("../StripeResource.js"); class InvoiceRenderingTemplateResource extends StripeResource_js_1.StripeResource { /** * List all templates, ordered by creation date, with the most recently created template appearing first. */ list(params, options) { return this._makeRequest('GET', '/v1/invoice_rendering_templates', params, options, { methodType: 'list', }); } /** * Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. */ retrieve(id, params, options) { return this._makeRequest('GET', `/v1/invoice_rendering_templates/${id}`, params, options); } /** * Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. */ archive(id, params, options) { return this._makeRequest('POST', `/v1/invoice_rendering_templates/${id}/archive`, params, options); } /** * Unarchive an invoice rendering template so it can be used on new Stripe objects again. */ unarchive(id, params, options) { return this._makeRequest('POST', `/v1/invoice_rendering_templates/${id}/unarchive`, params, options); } } exports.InvoiceRenderingTemplateResource = InvoiceRenderingTemplateResource; //# sourceMappingURL=InvoiceRenderingTemplates.js.map