Class: FreshdeskAPI::SolutionFolder

Inherits:
Resource show all
Defined in:
lib/freshdesk_api/resources/solution_folder.rb

Instance Attribute Summary

Attributes inherited from Data

#attributes, #errors

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Read

extended, #find, #find!

Methods included from Destroy

#destroy, #destroy!, #destroyed?, included

Methods included from Update

included, #update, #update!

Methods included from Save

#save, #save!

Methods included from ResponseHandler

#handle_response

Methods included from Create

included

Methods inherited from Data

#==, #id, #initialize, #new_record?, resource_name, singular_resource_name, #to_s

Constructor Details

This class inherits a constructor from FreshdeskAPI::Data

Class Method Details

.api_url(options = {}) ⇒ Object



20
21
22
# File 'lib/freshdesk_api/resources/solution_folder.rb', line 20

def api_url(options = {})
  "/solution/categories/%{category_id}/folders" % options
end

.collection_namespaceObject



24
25
26
# File 'lib/freshdesk_api/resources/solution_folder.rb', line 24

def collection_namespace
  'category/folders'
end

Instance Method Details

#api_url(options = {}) ⇒ Object

Need to specify category_id in url



7
8
9
# File 'lib/freshdesk_api/resources/solution_folder.rb', line 7

def api_url(options = {})
  "/solution/categories/%{category_id}/folders" % attributes
end

#request_namespaceObject



11
12
13
# File 'lib/freshdesk_api/resources/solution_folder.rb', line 11

def request_namespace
  'solution_folder'
end

#response_namespaceObject



15
16
17
# File 'lib/freshdesk_api/resources/solution_folder.rb', line 15

def response_namespace
  :folder
end