Sha256: 2b6d7ce1bc3a1cddd8d0a219da9aab3ce0a3af653fa325d266c7e0ebbbb60ad8

Contents?: true

Size: 566 Bytes

Versions: 20

Compression:

Stored size: 566 Bytes

Contents

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

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

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
zendesk2-0.0.23 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.22 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.20 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.19 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.18 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.17 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.16 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.15 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.14 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.13 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.12 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.11 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.10 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.9 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.8 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.7 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.6 lib/zendesk2/client/requests/update_ticket.rb
zendesk2-0.0.5 lib/zendesk2/requests/update_ticket.rb
zendesk2-0.0.4 lib/zendesk2/requests/update_ticket.rb
zendesk2-0.0.3 lib/zendesk2/requests/update_ticket.rb