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