Sha256: 68911f636511fdab39978c3828668b1986cbc42415a71370b347a95dab399052

Contents?: true

Size: 1.07 KB

Versions: 8

Compression:

Stored size: 1.07 KB

Contents

class Zendesk2::Client
  class Real
    def update_help_center_section(params={})
      id     = require_parameters(params, "id")
      locale = params["locale"]

      path = if locale
               "/help_center/#{locale}/sections/#{id}.json"
             else
               "/help_center/sections/#{id}.json"
             end

      request(
        :method => :put,
        :path   => path,
        :body   => {
          "section" => params
        },
      )
    end
  end
  class Mock
    def update_help_center_section(params={})
      params = Cistern::Hash.stringify_keys(params)

      require_parameters(params, "id")

      id     = params.delete("id")
      locale = params["locale"]

      path = if locale
               "/help_center/#{locale}/sections/#{id}.json"
             else
               "/help_center/sections/#{id}.json"
             end

      body = self.data[:help_center_sections][id.to_i].merge!(params)

      response(
        :method => :put,
        :path   => path,
        :body   => {
          "section" => body,
        },
      )
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
zendesk2-1.2.7 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.2.6 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.2.5 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.2.4 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.2.3 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.2.2 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.2.1 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.2.0 lib/zendesk2/client/requests/update_help_center_section.rb