Sha256: c4d8ce793642646460a2a4616f79a709852894b2534d28e4287d3b9f306f2ff9

Contents?: true

Size: 583 Bytes

Versions: 46

Compression:

Stored size: 583 Bytes

Contents

class Zendesk2::Client
  class Real
    def update_category(params={})
      id = params.delete("id")

      request(
        :method => :put,
        :path   => "/categories/#{id}.json",
        :body   => {
          "category" => params
        },
      )
    end
  end
  class Mock
    def update_category(params={})
      id   = params.delete("id")
      body = self.data[:categories][id].merge!(params)

      response(
        :method => :put,
        :path   => "/categories/#{id}.json",
        :body   => {
          "category" => body
        },
      )
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
zendesk2-1.2.7 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.2.6 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.2.5 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.2.4 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.2.3 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.2.2 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.2.1 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.2.0 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.1.3 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.1.2 lib/zendesk2/client/requests/update_category.rb
zendesk2-1.0.0 lib/zendesk2/client/requests/update_category.rb
zendesk2-0.5.4 lib/zendesk2/client/requests/update_category.rb
zendesk2-0.5.3 lib/zendesk2/client/requests/update_category.rb
zendesk2-0.5.2 lib/zendesk2/client/requests/update_category.rb
zendesk2-0.5.1 lib/zendesk2/client/requests/update_category.rb
zendesk2-0.5.0 lib/zendesk2/client/requests/update_category.rb
zendesk2-0.4.5 lib/zendesk2/client/requests/update_category.rb
zendesk2-0.4.4 lib/zendesk2/client/requests/update_category.rb
zendesk2-0.4.3 lib/zendesk2/client/requests/update_category.rb
zendesk2-0.4.2 lib/zendesk2/client/requests/update_category.rb