Sha256: b205a0e86080f5a25426d6ebcf094b82b21207c716f000b5c725b58fda6bb751

Contents?: true

Size: 1.07 KB

Versions: 9

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").to_s
      locale = params["locale"]

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

      body = self.find!(:help_center_sections, id).merge!(params)

      response(
        :method => :put,
        :path   => path,
        :body   => {
          "section" => 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_section.rb
zendesk2-1.4.1 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.4.0 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.3.3 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.3.2 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.3.1 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.3.0 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.2.10 lib/zendesk2/client/requests/update_help_center_section.rb
zendesk2-1.2.9 lib/zendesk2/client/requests/update_help_center_section.rb