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

Version Path
zendesk2-1.4.2 lib/zendesk2/client/requests/update_help_center_article.rb
zendesk2-1.4.1 lib/zendesk2/client/requests/update_help_center_article.rb
zendesk2-1.4.0 lib/zendesk2/client/requests/update_help_center_article.rb
zendesk2-1.3.3 lib/zendesk2/client/requests/update_help_center_article.rb
zendesk2-1.3.2 lib/zendesk2/client/requests/update_help_center_article.rb
zendesk2-1.3.1 lib/zendesk2/client/requests/update_help_center_article.rb
zendesk2-1.3.0 lib/zendesk2/client/requests/update_help_center_article.rb
zendesk2-1.2.10 lib/zendesk2/client/requests/update_help_center_article.rb
zendesk2-1.2.9 lib/zendesk2/client/requests/update_help_center_article.rb