Class: Stripe::InvoiceRenderingTemplateService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::InvoiceRenderingTemplateService
- Defined in:
- lib/stripe/services/invoice_rendering_template_service.rb
Instance Method Summary collapse
-
#archive(template, params = {}, opts = {}) ⇒ Object
Updates the status of an invoice rendering template to ‘archived’ so no new Stripe objects (customers, invoices, etc.) can reference it.
-
#list(params = {}, opts = {}) ⇒ Object
List all templates, ordered by creation date, with the most recently created template appearing first.
-
#retrieve(template, params = {}, opts = {}) ⇒ Object
Retrieves an invoice rendering template with the given ID.
-
#unarchive(template, params = {}, opts = {}) ⇒ Object
Unarchive an invoice rendering template so it can be used on new Stripe objects again.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#archive(template, params = {}, opts = {}) ⇒ Object
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.
7 8 9 10 11 12 13 14 15 |
# File 'lib/stripe/services/invoice_rendering_template_service.rb', line 7 def archive(template, params = {}, opts = {}) request( method: :post, path: format("/v1/invoice_rendering_templates/%<template>s/archive", { template: CGI.escape(template) }), params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
List all templates, ordered by creation date, with the most recently created template appearing first.
18 19 20 21 22 23 24 25 26 |
# File 'lib/stripe/services/invoice_rendering_template_service.rb', line 18 def list(params = {}, opts = {}) request( method: :get, path: "/v1/invoice_rendering_templates", params: params, opts: opts, base_address: :api ) end |
#retrieve(template, params = {}, opts = {}) ⇒ Object
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.
29 30 31 32 33 34 35 36 37 |
# File 'lib/stripe/services/invoice_rendering_template_service.rb', line 29 def retrieve(template, params = {}, opts = {}) request( method: :get, path: format("/v1/invoice_rendering_templates/%<template>s", { template: CGI.escape(template) }), params: params, opts: opts, base_address: :api ) end |
#unarchive(template, params = {}, opts = {}) ⇒ Object
Unarchive an invoice rendering template so it can be used on new Stripe objects again.
40 41 42 43 44 45 46 47 48 |
# File 'lib/stripe/services/invoice_rendering_template_service.rb', line 40 def unarchive(template, params = {}, opts = {}) request( method: :post, path: format("/v1/invoice_rendering_templates/%<template>s/unarchive", { template: CGI.escape(template) }), params: params, opts: opts, base_address: :api ) end |