# File generated from our OpenAPI spec
# frozen_string_literal: true

# typed: true
module Stripe
  class InvoiceRenderingTemplateService < StripeService
    # 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.
    sig {
      params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplateArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::InvoiceRenderingTemplate)
     }
    def archive(template, params = {}, opts = {}); end

    # List all templates, ordered by creation date, with the most recently created template appearing first.
    sig {
      params(params: T.any(::Stripe::InvoiceRenderingTemplateListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::ListObject)
     }
    def list(params = {}, opts = {}); end

    # 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.
    sig {
      params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplateRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::InvoiceRenderingTemplate)
     }
    def retrieve(template, params = {}, opts = {}); end

    # Unarchive an invoice rendering template so it can be used on new Stripe objects again.
    sig {
      params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplateUnarchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::InvoiceRenderingTemplate)
     }
    def unarchive(template, params = {}, opts = {}); end
  end
end