Class: ClerkHttpClient::EmailSMSTemplatesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/clerk-http-client/api/email_sms_templates_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ EmailSMSTemplatesApi

Returns a new instance of EmailSMSTemplatesApi.



19
20
21
# File 'lib/clerk-http-client/api/email_sms_templates_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_client ⇒ Object

Returns the value of attribute api_client.



17
18
19
# File 'lib/clerk-http-client/api/email_sms_templates_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_template(template_type, slug, opts = {}) ⇒ Template

Retrieve a template Returns the details of a template

Parameters:

  • template_type (String) —

    The type of templates to retrieve (email or SMS)

  • slug (String) —

    The slug (i.e. machine-friendly name) of the template to retrieve

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Returns:



29
30
31
32
# File 'lib/clerk-http-client/api/email_sms_templates_api.rb', line 29

def get_template(template_type, slug, opts = {})
  data, _status_code, _headers = get_template_with_http_info(template_type, slug, opts)
  data
end

#get_template_list(template_type, opts = {}) ⇒ Array<Template>

List all templates Returns a list of all templates. The templates are returned sorted by position.

Parameters:

  • template_type (String) —

    The type of templates to list (email or SMS)

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Returns:



104
105
106
107
# File 'lib/clerk-http-client/api/email_sms_templates_api.rb', line 104

def get_template_list(template_type, opts = {})
  data, _status_code, _headers = get_template_list_with_http_info(template_type, opts)
  data
end

#get_template_list_with_http_info(template_type, opts = {}) ⇒ Array<(Array<Template>, Integer, Hash)>

List all templates Returns a list of all templates. The templates are returned sorted by position. GET array

Parameters:

  • template_type (String) —

    The type of templates to list (email or SMS)

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Returns:

  • (Array<(Array<Template>, Integer, Hash)>) —

    Array