Sha256: 503f1ae1787fefd1813bee79492a975db9b9cba8d1f0704803820ca56836ea08

Contents?: true

Size: 552 Bytes

Versions: 11

Compression:

Stored size: 552 Bytes

Contents

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

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

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
zendesk2-0.0.13 lib/zendesk2/client/requests/update_user.rb
zendesk2-0.0.12 lib/zendesk2/client/requests/update_user.rb
zendesk2-0.0.11 lib/zendesk2/client/requests/update_user.rb
zendesk2-0.0.10 lib/zendesk2/client/requests/update_user.rb
zendesk2-0.0.9 lib/zendesk2/client/requests/update_user.rb
zendesk2-0.0.8 lib/zendesk2/client/requests/update_user.rb
zendesk2-0.0.7 lib/zendesk2/client/requests/update_user.rb
zendesk2-0.0.6 lib/zendesk2/client/requests/update_user.rb
zendesk2-0.0.4 lib/zendesk2/requests/update_user.rb
zendesk2-0.0.3 lib/zendesk2/requests/update_user.rb
zendesk2-0.0.2 lib/zendesk2/requests/update_user.rb