class Zendesk2::HelpCenter::Topic
Public Instance Methods
destroy!()
click to toggle source
# File lib/zendesk2/help_center/topic.rb, line 27 def destroy! requires :identity cistern.destroy_help_center_topic('topic' => { 'id' => identity }) end
posts()
click to toggle source
# File lib/zendesk2/help_center/topic.rb, line 47 def posts requires :identity cistern.help_center_posts(topic_id: identity) end
save!()
click to toggle source
# File lib/zendesk2/help_center/topic.rb, line 33 def save! response = if new_record? requires :name cistern.create_help_center_topic('topic' => attributes) else requires :identity cistern.update_help_center_topic('topic' => attributes) end merge_attributes(response.body['topic']) end
subscriptions()
click to toggle source
# File lib/zendesk2/help_center/topic.rb, line 53 def subscriptions requires :identity cistern.help_center_subscriptions(content_id: identity, content_type: 'topic') end