Sha256: 81bf8951f4641514bfba6edc9184a077561d943a333edc76f96df2d613e3dcce

Contents?: true

Size: 891 Bytes

Versions: 9

Compression:

Stored size: 891 Bytes

Contents

class Zendesk2::Client
  class Real
    def get_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 => :get,
        :path   => path,
      )
    end
  end # Real

  class Mock
    def get_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

      response(
        :path => path,
        :body => {
          "article" => self.find!(:help_center_articles, id)
        },
      )
    end
  end # Mock
end

Version data entries

9 entries across 9 versions & 1 rubygems

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