Class: Zendesk2::UpdateHelpCenterTopic

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



17
18
19
# File 'lib/zendesk2/help_center/update_help_center_topic.rb', line 17

def mock
  mock_response('topic' => find!(:help_center_categories, topic_id).merge!(topic_params))
end

#topic_idObject



13
14
15
# File 'lib/zendesk2/help_center/update_help_center_topic.rb', line 13

def topic_id
  params.fetch('topic').fetch('id')
end

#topic_paramsObject



9
10
11
# File 'lib/zendesk2/help_center/update_help_center_topic.rb', line 9

def topic_params
  Cistern::Hash.slice(params.fetch('topic'), *Zendesk2::CreateHelpCenterTopic.accepted_attributes)
end