class ZendeskAPI::Ticket

@internal The following are redefined later, but needed by some circular resources (e.g. Ticket -> User, User -> Ticket)

Public Class Methods

import(client, attributes) click to toggle source

Imports a ticket through the imports/tickets endpoint @param [Client] client The {Client} object to be used @param [Hash] attributes The attributes to create. @return [Ticket] Created object or nil

# File lib/zendesk_api/resources.rb, line 468
def self.import(client, attributes)
  ticket = new(client, attributes)
  return unless ticket.save(:path => "imports/tickets")
  ticket
end
import!(client, attributes) click to toggle source

Imports a ticket through the imports/tickets endpoint using save! @param [Client] client The {Client} object to be used @param [Hash] attributes The attributes to create. @return [Ticket] Created object or nil

# File lib/zendesk_api/resources.rb, line 458
def self.import!(client, attributes)
  new(client, attributes).tap do |ticket|
    ticket.save!(:path => "imports/tickets")
  end
end
incremental_export(client, start_time) click to toggle source

Gets a incremental export of tickets from the start_time until now. @param [Client] client The {Client} object to be used @param [Integer] start_time The start_time parameter @return [Collection] Collection of {Ticket}

# File lib/zendesk_api/resources.rb, line 450
def self.incremental_export(client, start_time)
  ZendeskAPI::Collection.new(client, self, :path => "incremental/tickets?start_time=#{start_time.to_i}")
end

Public Instance Methods

to_param() click to toggle source
# File lib/zendesk_api/resources.rb, line 424
def to_param
  map(&:id)
end