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.7.5 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.7.4 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.7.2 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.7.1 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.7.0 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.6.1 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.17 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.16 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.15 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.14 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.13 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.12 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.11 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.10 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.9 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.8 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.7 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.6 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.5 lib/zendesk2/client/requests/update_request.rb
zendesk2-1.5.4 lib/zendesk2/client/requests/update_request.rb