Sha256: 18771a93bb5932b316e7a64d761f3be237db30a4bf1d1c0fe96f3c4bf5df5ad5
Contents?: true
Size: 501 Bytes
Versions: 6
Compression:
Stored size: 501 Bytes
Contents
# frozen_string_literal: true class Zendesk2::UpdateForum include Zendesk2::Request request_method :put request_path { |r| "/forums/#{r.forum_id}.json" } request_body { |r| { 'forum' => r.forum_params } } def forum_params Cistern::Hash.slice(params.fetch('forum'), *Zendesk2::CreateForum.accepted_attributes) end def forum_id params.fetch('forum').fetch('id') end def mock mock_response( 'forum' => find!(:forums, forum_id).merge!(forum_params) ) end end
Version data entries
6 entries across 6 versions & 1 rubygems