Class: Zendesk2::GetHelpCenterCategoriesSections
- Inherits:
-
Object
- Object
- Zendesk2::GetHelpCenterCategoriesSections
show all
- Includes:
- Request
- Defined in:
- lib/zendesk2/help_center/get_help_center_categories_sections.rb
Instance Attribute Summary
Attributes included from Request
#params
Instance Method Summary
collapse
Methods included from Request
#call, cistern_included, #data, #delete!, #error!, #find!, #html_url_for, included, #mock_response, #page, #page_params!, #page_params?, #pluralize, #real, #real_request, #request_body, #request_params, #request_path, #resources, #response, #timestamp, #url_for
Instance Method Details
#category_id ⇒ Object
11
12
13
14
15
|
# File 'lib/zendesk2/help_center/get_help_center_categories_sections.rb', line 11
def category_id
Integer(
params.fetch('category_id')
)
end
|
#mock ⇒ Object
17
18
19
20
21
|
# File 'lib/zendesk2/help_center/get_help_center_categories_sections.rb', line 17
def mock
find!(:help_center_categories, category_id)
mock_response('sections' => data[:help_center_sections].values.select { |s| s['category_id'] == category_id })
end
|