Sha256: a8b98a0346ddca2146150dd03ee2121d6f9551f1f659475e456e754d2d0a271a
Contents?: true
Size: 1.08 KB
Versions: 9
Compression:
Stored size: 1.08 KB
Contents
class Zendesk2::Client class Real def update_help_center_category(params={}) id = require_parameters(params, "id") locale = params["locale"] path = if locale "/help_center/#{locale}/categories/#{id}.json" else "/help_center/categories/#{id}.json" end request( :method => :put, :path => path, :body => { "category" => params }, ) end end class Mock def update_help_center_category(params={}) params = Cistern::Hash.stringify_keys(params) require_parameters(params, "id") id = params.delete("id").to_s locale = params["locale"] path = if locale "/help_center/#{locale}/categories/#{id}.json" else "/help_center/categories/#{id}.json" end body = self.find!(:help_center_categories, id).merge!(params) response( :method => :put, :path => path, :body => { "category" => body, }, ) end end end
Version data entries
9 entries across 9 versions & 1 rubygems