Class: ZendeskAPI::Ticket
- Inherits:
-
Resource
- Object
- Data
- DataResource
- Resource
- ZendeskAPI::Ticket
- Defined in:
- lib/zendesk_api/resources/ticket.rb
Defined Under Namespace
Classes: Audit
Instance Attribute Summary
Attributes inherited from Data
Class Method Summary collapse
-
.import(client, attributes) ⇒ Ticket
Imports a ticket through the imports/tickets endpoint.
-
.incremental_export(client, start_time) ⇒ Collection
Gets a incremental export of tickets from the start_time until now.
Methods included from Read
Methods included from Destroy
Methods included from Save
#save, #save!, #save_associations
Methods included from Verbs
Methods inherited from Data
#==, #id, #initialize, #method_missing, #new_record?, only_send_unnested_params, #path, resource_name, singular_resource_name, #to_s, unnested_params
Methods included from Associations
Constructor Details
This class inherits a constructor from ZendeskAPI::Data
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ZendeskAPI::Data
Class Method Details
.import(client, attributes) ⇒ Ticket
Imports a ticket through the imports/tickets endpoint
35 36 37 38 39 |
# File 'lib/zendesk_api/resources/ticket.rb', line 35 def self.import(client, attributes) ticket = new(client, attributes) return unless ticket.save(:path => "imports/tickets") ticket end |
.incremental_export(client, start_time) ⇒ Collection
Gets a incremental export of tickets from the start_time until now.
27 28 29 |
# File 'lib/zendesk_api/resources/ticket.rb', line 27 def self.incremental_export(client, start_time) ZendeskAPI::Collection.new(client, self, :path => "exports/tickets?start_time=#{start_time.to_i}") end |