Class: Zendesk2::UpdateHelpCenterSection

Inherits:
Object
  • Object
show all
Includes:
Request
Defined in:
lib/zendesk2/help_center/update_help_center_section.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

#mockObject



20
21
22
# File 'lib/zendesk2/help_center/update_help_center_section.rb', line 20

def mock
  mock_response('section' => find!(:help_center_sections, section_id).merge!(section_params))
end

#section_idObject



16
17
18
# File 'lib/zendesk2/help_center/update_help_center_section.rb', line 16

def section_id
  params.fetch('section').fetch('id')
end

#section_paramsObject



12
13
14
# File 'lib/zendesk2/help_center/update_help_center_section.rb', line 12

def section_params
  Cistern::Hash.slice(params.fetch('section'), *Zendesk2::CreateHelpCenterSection.accepted_attributes)
end