class Accredible::Template

Public Class Methods

api_end_point(id = nil) click to toggle source
# File lib/accredible-ruby/template.rb, line 21
def self.api_end_point(id = nil)
  Accredible.api_url("templates/#{id}")
end
copy(source_id:, new_template_name:) click to toggle source
# File lib/accredible-ruby/template.rb, line 4
def self.copy(source_id:, new_template_name:)
  uri = Template.copy_end_point
  params = {source_id: source_id, 
            new_template_name: new_template_name}.to_json
  Accredible.request(uri, :post, params)
end
copy_end_point() click to toggle source
# File lib/accredible-ruby/template.rb, line 25
def self.copy_end_point
  Accredible.api_url("templates/copy")
end
delete(template_id) click to toggle source
# File lib/accredible-ruby/template.rb, line 11
def self.delete(template_id)
  uri =  Template.api_end_point(template_id)
  Accredible.request(uri, :delete)
end
view_all() click to toggle source
# File lib/accredible-ruby/template.rb, line 16
def self.view_all
  uri = Template.view_all_end_point
  Accredible.request(uri)
end
view_all_end_point() click to toggle source
# File lib/accredible-ruby/template.rb, line 29
def self.view_all_end_point
  Accredible.api_url("templates")
end