Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 4.11 KB

File metadata and controls

58 lines (40 loc) · 4.11 KB

Templates

Warning

This SDK is DEPRECATED

Overview

Available Operations

  • preview - Preview changes to a template ⚠️ Deprecated

preview

Returns a preview of a template for a given template_type, slug and body

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

require 'clerk_sdk_ruby'

Models = ::Clerk::Models
s = ::Clerk::OpenAPIClient.new(
  bearer_auth: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.templates.preview(template_type: 'email', slug: 'welcome-email', body: Models::Operations::PreviewTemplateRequestBody.new(
  subject: 'Welcome to our service!',
  body: 'Hi, thank you for joining our service.',
  from_email_name: 'hello',
  reply_to_email_name: 'support'
))

unless res.object.nil?
  # handle response
end

Parameters

Parameter Type Required Description
template_type ::String ✔️ The type of template to preview
slug ::String ✔️ The slug of the template to preview
body Crystalline::Nilable.new(Models::Operations::PreviewTemplateRequestBody) Required parameters

Response

Crystalline::Nilable.new(Models::Operations::PreviewTemplateResponse)

Errors

Error Type Status Code Content Type
Models::Errors::ClerkErrors 400, 401, 404, 422 application/json
Errors::APIError 4XX, 5XX */*