Sha256: 564d98f49b4285e2fd92bb2fefe355a917e88d3a13cd86df54e822c1ad3da841

Contents?: true

Size: 571 Bytes

Versions: 56

Compression:

Stored size: 571 Bytes

Contents

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

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

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

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
zendesk2-1.5.3 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.4.2 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.4.1 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.4.0 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.3.3 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.3.2 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.3.1 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.3.0 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.10 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.9 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.7 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.6 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.5 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.4 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.3 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.2 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.1 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.2.0 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.1.3 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.1.2 lib/zendesk2/client/requests/update_request.rb