lib/simple_spark/endpoints/templates.rb
def retrieve(id, draft = nil)
        path = "templates/#{id}"
        query_params = draft.nil? ? {} : { draft: draft }
        @client.call(method: :get, path: path, query_values: query_params)
      end
# Retrieve a Template by its ID
# @param id [String] the Unique Template ID to retrieve
# @param draft [boolean] If true, returns the most recent draft template.
#   If false, returns the most recent published template.
#   If not provided, returns the most recent template version regardless of draft or published.
# @return [Hash] the Template object
# @note https://developers.sparkpost.com/api/#/reference/templates/retrieve
Retrieve a Template by its ID
Retrieve a Template by its ID
def retrieve(id, draft = nil)
        path = "templates/#{id}"
        query_params = draft.nil? ? {} : { draft: draft }
        @client.call(method: :get, path: path, query_values: query_params)
      end
def retrieve ( id , draft = nil ) path = "templates/#{id}" query_params = draft . nil? ? { } : { draft : draft } @client . call ( method : :get , path : path , query_values : query_params ) end
Retrieve a Template by its ID
Retrieve a Template by its ID
the Template object
the Template object
Hash
id
the Unique Template ID to retrieve
the Unique Template ID to retrieve
draft
If true, returns the most recent draft template. If false, returns the most recent published template. If not provided, returns the most recent template version regardless of draft or published.
If true returns the most recent draft template . If false returns the most recent published template . If not provided returns the most recent template version regardless of draft or published .
note
None